View Single Post
  #2  
Old 12-17-2012, 11:09 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

there are multiple instances in brother dremel's script (holy crap it's huge!) where you are looking to match exactly the same text in more than one condition. it will always stop at the first match it finds in the chain.

in the following example, if a client says "I require a Carved Sedgewood 1-Cam Bow, good sir!", he will always respond with "Sorry, I do not have that..."
Code:
elsif($text=~/Carved Sedgewood 1-Cam Bow/i){quest::say("Sorry, I do not have that...");}
elsif($text=~/Carved Sedgewood 1-Cam Bow/i){quest::say("I do have a Carved Sedgewood 1-Cam Bow, but I need a Golden Long Spear...");}
elsif($text=~/Carved Sedgewood 1-Cam Bow/i){quest::say("I do have a Carved Sedgewood 1-Cam Bow, but I need a Platinum Bastard Sword...");}
elsif($text=~/Carved Sedgewood 1-Cam Bow/i){quest::say("I do have a Carved Sedgewood 1-Cam Bow, but I need a Berserker Leggings...");}
it'll still exchange the correct items, but the player won't know what those are without looking through the perl script, which kind of defeats the purpose of the dialog in those cases.

additionally, he'll eat anything you give him, regardless of whether or not it was something he had requested for exchange since you're not using the check_handin() and return_items() plugins.
Reply With Quote