EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Many questions about quest globals (https://www.eqemulator.org/forums/showthread.php?t=25998)

Neiv 08-22-2008 06:25 PM

Many questions about quest globals
 
1. Is this expression, literally typed, in valid syntax?
quest::setglobal("kingdomfaction","realm_1",7,"F" );
(i.e., if "realm_1" in reality represents a faction ID, is it valid to use a text label to represent the faction_ID, so long as that same label is used and defined in the qglobal script in player.pl?

2. If yes, and if I set the global (as above) in an NPC script (npcid.pl), then in the player.pl script should I have something like the following to define the label?

{
my $factioncheck = undef;
if ($qglobals{kingdomfaction} )
{
if ($qglobals{kingdomfaction} eq "realm_1")

3. If yes, then does the player.pl in such a case go into the quest/template folder, or n the quest/zone folder?

There is not much out there that explains how all this works in a quest global.

Many thanks.

Neiv 08-23-2008 11:11 AM

And another . . .
 
If I have a player.pl in quest/template, what is the impact on the player.pl in quest/zone?

Neiv 08-29-2008 10:20 AM

bump . . . anyone?

joligario 08-29-2008 08:24 PM

It says "Value" on the lexicon, but that doesn't mean that it is an integer necessarily. You could always test it..

Set up a custom script that sets that global for your character and use quest::say to tell them "Hello, your kingdomfaction is $kingdomfaction". That will let you know if it was set valid.

Neiv 08-31-2008 07:55 PM

Can anyone point me to a real-world example of a setglobal statement and one that checks the global? Maybe I can figure this out on my own by analyzing the example. Thanks.

trevius 08-31-2008 08:48 PM

I don't know much about how default.pl and player.pl work, so I didn't post earlier, but if you just want to know about how to use quest globals, it is really pretty simple. I use it a TON in my custom quests.

Here is one example that should help you understand it.

http://www.eqemulator.net/forums/showthread.php?t=25556

But, I have plenty of others if you need more.

Neiv 08-31-2008 11:44 PM

Thanks, Trevius. I am going to analyze this to see why mine is not working.

Neiv 09-01-2008 12:56 AM

That one helped with some of the syntax, but it's still not working correctly. I'd love to see others if you have them.

Neiv 09-01-2008 01:19 AM

I placed quest::emote checkpoints after each command line, and it seems to be failing here:

$factioncheck = $client->GetCharacterFaction(19927);

Anything apparently wrong with this statement?

Neiv 09-01-2008 12:07 PM

I wrote:
Quote:

I placed quest::emote checkpoints after each command line, and it seems to be failing here:

$factioncheck = $client->GetCharacterFaction(19927);

Anything apparently wrong with this statement?
I figured out the problem. The object is not . . .

$factioncheck = $client->GetCharacterFaction(19927);

The correct version is . . .

$factioncheck = $client->GetCharacterFactionLevel(19927);

As soon as I have all the details worked out, I will post the quest.


All times are GMT -4. The time now is 08:14 AM.

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