Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2009, 10:34 AM
fault
Hill Giant
 
Join Date: Sep 2005
Posts: 114
Default 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
Reply With Quote
  #2  
Old 03-24-2009, 11:27 AM
Theeper
Discordant
 
Join Date: May 2004
Posts: 290
Default

You could use something like this.

Code:
$variablename++;
quest::setglobal("variablename", $variablename, 5, "F");
Reply With Quote
  #3  
Old 03-24-2009, 06:19 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

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


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3