Thread: coming soon
View Single Post
  #5  
Old 07-22-2004, 06:52 AM
KhaN's Avatar
KhaN
Dragon
 
Join Date: Mar 2004
Location: France, Bordeaux.
Posts: 677
Default

Quote:
people in #support have said my quest is correct
I would like to know what they smoke ?!~

Try something like this, your syntax is wrong.
Code:
*#281099.pl 
sub EVENT_SAY 
{ 
 if ($text=~/hail/i) 
 { 
  if($npcvari1 == 0) 
  {
   quest::say("Hello! Would you be interested in helping me?"); 
   $npcvari1="0";    } 
  }
 if($text=~/helping/i)
 {
  if($npcvari1 == 1 &&  
  { 
   quest::targlobal("npcvari1","1","Y5",281099,$charid,26);
   quest::say("Thanks!"); 
   quest::me("You have recieved a character flag!");
   $npcvari1="0"; 
  } 
 }
}
You check action done to NPC, then if there is a variable and its value, then you give the action to do.

One important things is to ALWAYS add "quest::targlobal" as the first actions, or you can have bugs.
Also be sure to always perl cache by using command "$npcvari1="0"; ".
*
Hope that will help and GL in dev quests.
__________________

Reply With Quote