View Full Version : Quest Globals Question.
kmra247
01-04-2013, 04:50 PM
All right, I have a question about quest globals, if I wanted it to be an account global would it be like below?:
quest::setglobal(SpellReset$actd, 0, 5, "F");
joligario
01-04-2013, 05:14 PM
Check at the bottom of http://www.eqemulator.net/wiki/wikka.php?wakka=QuestTutorial
5 = this player (aka character)
If you have extra code to get acct id, I'm sure you could get it to work.
kmra247
01-04-2013, 05:33 PM
So if I have this below I should be able to do it, 5 = NPC and Zone all.
my $actd = $client->AccountName();
c0ncrete
01-04-2013, 07:12 PM
almost. you're not concatenating your string correctly in your first example.
you want something like this for the varname field of the qglobal:
#interpolation
my $aName = $client->AccountName();
my $qGlobal = "SpellReset$aName";
or
# 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:
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.
Akkadius
01-04-2013, 07:36 PM
almost. you're not concatenating your string correctly in your first example.
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.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.