EQEmulator Forums

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

Disorder 02-25-2013 08:42 PM

Checking Quest Repetition
 
Greetings!

I'm making a quest that is repeatable. I'd like to have quest globals track the number of times it has been repeated. I'm not sure how to add to the value stored in quest globals.

here is my script (shortened)

Code:

sub EVENT_ITEM
{
        if ((plugin::check_handin(\%itemcount, 1374 => 4)))
        {
               
                if ((!defined $qglobal{fish_mort}))
                {
                        quest::setglobal("fish_mort","0","4","F");
                }
               
                elsif ((defined $qglobal{fish_mort}))
                {
                        quest::setglobal("fish_mort","0","4","F");
                        plugin::Whisper("Well thanks, friend.. er.. stranger. ");
                        quest::givecash(2,0,0,0);
                        quest::exp("5000");
                        quest::ding();
                       
                }
               
               
        }
       
}

I'd like to find a way to add +1 to the global "fish_mort".

Are we able to do:

Code:

$x = $questglobal{fish_mort};
$x=$x+1;
quest::setglobal("fish_mort","$x","4","F");

or something similar?

Thank, guys. I was unable to find an example of this.

lerxst2112 02-25-2013 08:51 PM

Look at plugins/Quest_Credit.pl. It has several examples of getting a value from a qglobal, manipulating it, and setting the new value.

Disorder 02-25-2013 11:06 PM

Thank you very much, mate.


All times are GMT -4. The time now is 07:26 AM.

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