View Single Post
  #22  
Old 04-24-2006, 07:24 PM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

Your last quest is how you must write quests with checkhandin now. (except there my be an extra } at its end, check that if it does not work).
If you don't want the NPC to say that he returns items, you must test that there's still some items left in the %itemcount hashtable.


Code:
if (scalar(%itemcount)>0) { 
  quest::say("Take this back");
  plugin::return_items(\%itemcount);
}
Another way is to say nothing and just add return_items.


To test that a string isn't something, use 'ne' and != for an integer

Code:
if ($class ne "Paladin") { }
if ($level != 5) { }
These is the basic perl syntax, there's many tutorials on the web...
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10

Last edited by Muuss; 04-25-2006 at 03:29 AM..
Reply With Quote