PDA

View Full Version : Open to suggestions :)


solid11
06-07-2005, 05:02 PM
This is a copy/paste from PEQ forum and wanted to open it to everyone since everyone has to be smarter than me when it comes to perl writing, LOL. Any thoughts or suggestions is greatly appreciated.
#
#
#
Here is the problem I'm having with this test quest, which I'm using Lanken_Rjarn from erudnint as a test subject because his initial text is simple. I'm trying to make this like live but the problem is I need something in the quest text that checks for a certain item on the player for the proximity to trigger. It needs to check that the starting note for that player is on them. Any help or suggestions is greatly welcomed.

BTW, this quest, as it is now, works perfectly in the game, minus ding sound, but everyone who enters the NPC's proximity will trigger it, which we don't want. Only the person with that item (example 18729) will trigger it, and once they give it to the NPC, they will no longer get the mob's prox spam text. Hope you all understand what I'm trying to do here seeing i'm a super newb to all this, LOL.

To reiterate, this quest is done and WORKING except needing the check for item part.
#
#
#
sub EVENT_SPAWN {
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 20, $x + 20, $y - 20, $y + 20);
}
sub EVENT_ENTER {
$client->Message(15, "A commanding, yet kind looking Erudite turns towards you. 'Do not be startled. I am Lanken Rjarn, Guild Master for all aspiring Enchanters. Read the note in your inventory and hand it to me when you are ready to begin your training. I look forward to training you.'");
}
sub EVENT_SAY {
if ($text=~/Hail/i){
quest::say("I do not have time to speak with thee. I have a problem on my hands. Feel free to speak with any of my trainers.");
}
if ($text=~/problem/i){
quest::say("My problems are of no concern of yours. but if you must know it deals with Nolusia's brother. I can tell you no more. Leave me be.");
}
}
sub EVENT_ITEM {
if ($item1=="18729"){
quest::say("Welcome to the Craft Keepers! You have much to learn. and I'm sure you are anxious to get started. Here's your training robe. Go see Nolusia. she'll give you your first lesson.");
quest::ding();
quest::summonitem("13549");
quest::exp("100");
}
}
#END of FILE Zone:erudnint ID:24032 -- Lanken_Rjarn

mollymillions
06-09-2005, 04:52 AM
sub EVENT_ENTER {
if ($hasitem("18729")) {
$client->Message(15, "A commanding, yet kind looking Erudite turns towards you. 'Do not be startled. I am Lanken Rjarn, Guild Master for all aspiring Enchanters. Read the note in your inventory and hand it to me when you are ready to begin your training. I look forward to training you.'");
}
}

Or quest::hasitem() ?

solid11
06-09-2005, 06:01 AM
Thanks for the reply but I got it working yesterday, here is the final working quest. I will be redoing all starting guild leaders quests to work with starting notes.

sub EVENT_SPAWN {
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 20, $x + 20, $y - 20, $y + 20);
}
sub EVENT_ENTER {
if($hasitem{18729}){
$client->Message(15, "A commanding, yet kind looking Erudite turns towards you. 'Do not be startled. I am Lanken Rjarn, Guild Master for all aspiring Enchanters. Read the note in your inventory and hand it to me when you are ready to begin your training. I look forward to training you.'");
}
}
sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("I do not have time to speak with thee. I have a problem on my hands. Feel free to speak with any of my trainers.");
}
if($text=~/problem/i){
quest::say("My problems are of no concern of yours. but if you must know it deals with Nolusia's brother. I can tell you no more. Leave me be.");
}
}
sub EVENT_ITEM {
if($item1=="18729"){
quest::say("Welcome to the Craft Keepers! You have much to learn. and I'm sure you are anxious to get started. Here's your training robe. Go see Nolusia. she'll give you your first lesson.");
quest::ding();
quest::exp("100");
quest::summonitem("13549");
#Craftkeepers
quest::faction("56","1");
#High Council of Erudin
quest::faction("145","1");
#Heretics
quest::faction("143","-1");
#High Guard of Erudin
quest::faction("147","1");
}
}
#END of FILE Zone:erudnint ID:24032 -- Lanken_Rjarn

Ghost Fire
06-09-2005, 02:22 PM
Wow Very cool :D Keep up the great work solid11.