EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Quest not returning items (https://www.eqemulator.org/forums/showthread.php?t=38031)

Esildor 04-06-2014 05:41 PM

Quest not returning items
 
Hi,

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

Code:

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

Code:

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.
Quote:

Originally Posted by Township EQ (Post 229348)
put the return item in the else.
Code:

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.");
        }
}




All times are GMT -4. The time now is 10:05 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.