EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Custom (https://www.eqemulator.org/forums/forumdisplay.php?f=671)
-   -   Getting an NPC to notice a global? (https://www.eqemulator.org/forums/showthread.php?t=38272)

Sticz 05-08-2014 09:43 PM

Getting an NPC to notice a global?
 
I am trying to make a translocator that recognizes a global. I currently have a planar projection that uses this script:

sub EVENT_SAY {
if($text=~/hail/i && !defined($qglobals{Velious}))
{
$client->Message(4,"You are now flagged for Velious!");
quest::setglobal("Velious",1,5,"F");
}
}


I then have a different NPC in a different zone that uses this script:

sub EVENT_SAY {
if(($ulevel <= 45) && !defined($qglobals{Velious})) {
if($text=~/Hail/i){
$client->Message(14,"Greetings, $name. You can travel to old-world zones);
}
}

elsif(($ulevel >= 46) && !defined($qglobals{Velious})) {
if($text=~/Hail/i){
$client->Message(14,"Greetings, $name. You are able to go to the plane of hate.);
}
}

elsif(($ulevel >= 46) && ($qglobals{Velious} == 1)) {
if($text=~/Hail/i){$client->Message(14,"Greetings, $name. You are flagged for Velious and the plane of Hate.);
}
}
}


The problem is that the last script will not run: the NPC does not seem to recognize the global variable. Any thoughts?

Sticz

lerxst2112 05-08-2014 11:36 PM

Did you set the qglobal flag in npc_types for that npc?

Sticz 05-09-2014 12:52 AM

... Never occurred to me. Fixed and is working great now, thanks!

Sticz


All times are GMT -4. The time now is 10:48 AM.

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