EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Help (https://www.eqemulator.org/forums/showthread.php?t=39272)

Maceblade 01-25-2015 11:45 AM

Help
 
Cant get this to work. At one point I can get it to grant aa's but I want it to be a one time quest, where it only grants aa's once but will still give the reward regardless.

Code:

#scout malityn zombie bane
sub EVENT_SAY {




  if($text =~/Hail/i)
  {
        plugin::Whisper("Speak softly the gnolls are unaware of my presence. But seeing how you are here, have you got any hero sandwiches and Qeynos teas? One thing about being on the road is never knowing when you will eat good again is. 1 of each would be enough to hold me over, I may have something helpful for you...");
  }




sub EVENT_ITEM {
  if (plugin::check_handin(\%itemcount, 29762 => 1, 9758 => 1)) {
        if($qglobals{"bb1"} == 1){
        $client->Message(4,"Thank you very much, now I can continue my research with a full belly!");       
        quest::summonitem(10276);
}

        if($qglobals{"bb1"} == 0){
    quest::say("Oh my... that is soo delicious!");
    quest::setglobal("bb1", 1, 5, "F");
    $client->AddAAPoints(1);
    $client->Message(0,"You've earned an AA point!");
    quest::summonitem(10276);
  }
  if(plugin::check_handin(\%itemcount, 29762 => 2, 9758 => 2)) {
        if($qglobals{"bb2"} == 1){
        $client->Message(4,"Thank you very much, now I can continue my research with a full belly!");       
        quest::summonitem(11460);
}

        if($qglobals{"bb2"} == 0){
    quest::say("Oh my... that is soo delicious!");
    quest::setglobal("bb2", 1, 5, "F");
    $client->Message(0,"You've earned an AA point!");
    $client->AddAAPoints(5);
    quest::say("Very generous of you! Now I shall be!");
    quest::summonitem(11460);
    quest::ding();
  }
  }
 }
}


NatedogEZ 01-25-2015 11:57 AM

Do you have qglobals turned on for the npc in question? Also the brackets on your event_item are not correct :p



I think this will work (maybe :p) #edit I flipped them which should work :p

Code:

sub EVENT_ITEM {
        if(plugin::check_handin(\%itemcount, 29762 => 2, 9758 => 2)) {
                if(defined $qglobals{"bb2"}){
                        $client->Message(4,"Thank you very much, now I can continue my research with a full belly!");       
                        quest::summonitem(11460);
                } else {
                        quest::say("Oh my... that is soo delicious!");
                        quest::setglobal("bb2", 1, 5, "F");
                        $client->Message(0,"You've earned an AA point!");
                        $client->AddAAPoints(5);
                        quest::say("Very generous of you! Now I shall be!");
                        quest::summonitem(11460);
                        quest::ding();
                }
        }
        elsif(plugin::check_handin(\%itemcount, 29762 => 1, 9758 => 1)) {
                if(defined $qglobals{"bb1"}){
                        $client->Message(4,"Thank you very much, now I can continue my research with a full belly!");       
                        quest::summonitem(10276);
                } else {
                        quest::say("Oh my... that is soo delicious!");
                        quest::setglobal("bb1", 1, 5, "F");
                        $client->AddAAPoints(1);
                        $client->Message(0,"You've earned an AA point!");
                        quest::summonitem(10276);
                }
        }
       
        plugin::return_items(\%itemcount);
 }


Maceblade 01-25-2015 12:00 PM

yea still not functioning

NatedogEZ 01-25-2015 12:08 PM

Actually I just noticed those are the same items in both turn ins.. so it will always trigger the first one and never trigger the 2nd :p

Maceblade 01-25-2015 12:22 PM

weird, before I added the globals and AA lines it worked fine. So maybe I should change the 2nd part to be different items?

NatedogEZ 01-25-2015 12:23 PM

I changed it a bit... check it again.. the top one should be the one that requires more items.. and if it doesnt trigger the 2nd one which requires less items should trigger :)

Maceblade 01-25-2015 12:28 PM

worked perfectly thanks bro!


All times are GMT -4. The time now is 08:42 PM.

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