PDA

View Full Version : Quest not returning items


Esildor
04-06-2014, 05:41 PM
Hi,

Not sure why this won't return items, I'm assuming because of the platinum requirement as well?


sub EVENT_ITEM {
if (($platinum >= 1000) && plugin::check_handin(\%itemcount, 132595 => 1))
{
quest::summonitem(132594);
plugin::Whisper("Here you go $name, remember, I had nothing to do with this.");
quest::exp(1000);
quest::ding();
}

else
{
quest::say("Sorry, $name, but I have no use for that.");
}
}

plugin::return_items(\%itemcount);

}

sorvani
04-06-2014, 06:12 PM
I assume that you actually mean the quest is not working and summoning the item it is supposed to?

Esildor
04-06-2014, 06:31 PM
Sorry, should've clarified. I mean when you hand him the wrong item, he isn't returning it. I get the text of "blah blah don't need that" but don't actually get anything back.

Township EQ
04-06-2014, 06:41 PM
put the return item in the else.. you have an extra } as well


sub EVENT_ITEM {
if (($platinum >= 1000) && plugin::check_handin(\%itemcount, 132595 => 1)) {
quest::summonitem(132594);
plugin::Whisper("Here you go $name, remember, I had nothing to do with this.");
quest::exp(1000);
quest::ding();
}
else {
plugin::return_items(\%itemcount);
quest::say("Sorry, $name, but I have no use for that.");
}
}

lerxst2112
04-06-2014, 10:07 PM
As has been discussed many times before, the item return should be unconditional, not in the else.

The issue with this quest is the extra closing brace which means the return isn't even part of the event.

perl -c is your friend.

sorvani
04-07-2014, 12:59 PM
Never do this.
put the return item in the else.

sub EVENT_ITEM {
if (($platinum >= 1000) && plugin::check_handin(\%itemcount, 132595 => 1)) {
quest::summonitem(132594);
plugin::Whisper("Here you go $name, remember, I had nothing to do with this.");
quest::exp(1000);
quest::ding();
}
else {
plugin::return_items(\%itemcount);
quest::say("Sorry, $name, but I have no use for that.");
}
}