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 01-04-2013, 04:50 PM
kmra247
Sarnak
 
Join Date: Apr 2012
Posts: 55
Default Quest Globals Question.

All right, I have a question about quest globals, if I wanted it to be an account global would it be like below?:

Code:
quest::setglobal(SpellReset$actd, 0, 5, "F");
Reply With Quote
  #2  
Old 01-04-2013, 05:14 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

Check at the bottom of http://www.eqemulator.net/wiki/wikka...=QuestTutorial

5 = this player (aka character)

If you have extra code to get acct id, I'm sure you could get it to work.
Reply With Quote
  #3  
Old 01-04-2013, 05:33 PM
kmra247
Sarnak
 
Join Date: Apr 2012
Posts: 55
Default

So if I have this below I should be able to do it, 5 = NPC and Zone all.

Code:
my $actd = $client->AccountName();
Reply With Quote
  #4  
Old 01-04-2013, 07:12 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

almost. you're not concatenating your string correctly in your first example.

you want something like this for the varname field of the qglobal:

Code:
#interpolation
my $aName = $client->AccountName();
my $qGlobal = "SpellReset$aName";
or

Code:
# concatenation
my $qGlobal = "SpellReset" . $client->AccountName();
you don't have to save the varname first. you could do it all in a single line like this:

Code:
quest::setglobal('SpellReset'.$client->AccountName(), 0, 5, 'F');
it's a style choice, really... but you likely want to save it if you intend to use it more than once for the same client in the script.
Reply With Quote
  #5  
Old 01-04-2013, 07:36 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by c0ncrete View Post
almost. you're not concatenating your string correctly in your first example.
Code:
quest::setglobal('SpellReset'.$client->AccountName(), 0, 5, 'F');
it's a style choice, really... but you likely want to save it if you intend to use it more than once for the same client in the script.
It is a style choice, however if you can get in the habit of doing it like the above, you will be better off.
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 04:03 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3