EQEmulator Forums

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

fault 03-24-2009 10:34 AM

Variables +1
 
How would I use +1 with variables?

in this instance everytime somebody completes a task the variable would set

$variablename+1


so if the task had 10 steps each time it would +1 so at the end it would equal 10 so another NPC could just check for that variable of 10.

I was thinking quest::setglobal(variablename, +1); But not sure if that would work in this instance.

the is also $variable=+1; but I doubt that would work

Theeper 03-24-2009 11:27 AM

You could use something like this.

Code:

$variablename++;
quest::setglobal("variablename", $variablename, 5, "F");


trevius 03-24-2009 06:19 PM

I have used something like this and it works well:

Code:

quest::setglobal("variablename", $qglobals{variablename}+1, 5, "F");
Also, if you are wanting to setup something like a Task, you can use the actual task system. It is a bit complex to learn at first, but works very well once you know how to do it. It might just be the best way to do what you are wanting to do.


All times are GMT -4. The time now is 04:21 PM.

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