Problem with quest
Code:
sub EVENT_ITEM { For some reason only the first line produces a reward,the rest just eat the item for some reason. Really wasnt sure how to write this when I did so I could have easily just did it wrong,any advice? |
I'm pretty sure check_handin() actually removes the checked item from the list of items the user has turned in if it's there, so that you can do the appropriate reward and return_items won't return it later. For that reason, all the following check_handin() checks on the same item will return false, because it's already been checked and removed in the first if.
You'll need to rework your checks, something like: Code:
sub EVENT_ITEM |
No go,he just eats them still :/
|
Did you restart your server or use #reloadquest to reset the quest script cache?
It's working for me adding the code to a random NPC with different ItemIDs for testing. |
I just #reloadquest might work with a restart,Ive noticed some quests do that will give it a shot
|
Nope still not working.
|
Very weird.
I added the following code to my C:\EQEmuServer\quests\felwithea\Exterminator_Valer n.pl Code:
if (plugin::check_handin(\%itemcount, 1001 => 1)) Also, I added "Cleric" to the $epic1 check since I already had a cleric tester character sitting in the zone and otherwise got a "There is no item with id 0" error in that turn-in. Hehe. |
Lol tried your version,still wouldnt work. Very odd lol. This is my full code maybe the problem lies somewhere else?
Code:
sub EVENT_SAY { |
Hmm...
1) Looks like you have a line break in your ($text=~/revenge/i) response. Not sure how Perl handles line breaks in string literals. Might be causing a problem. 2) Didn't see a closing brace ( } ) for EVENT_ITEM in this copy/paste. |
1) is fine,reads it like any other text have used it plenty of times.
2) not really sure what you mean? Mine is almost identical to yours from what I can tell,where should the } be at? |
You have a closing } for the plugin::check_handin(), but if that's the entire file, then you're missing the } for the end of EVENT_ITEM.
Otherwise, I can only guess there's something interfering with your perl. I created dummy copies of your custom items for turning in, and tested with a full replacement of my felwithea\Exterminator_Valern.pl file, after removing the line break and adding the finishing } at the end of the file. https://youtu.be/U0ZG18wQS_4 |
Gotcha,added the last } and now works perfect,ty for the help very much appreciated!
|
|
All times are GMT -4. The time now is 11:43 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.