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 |
Did you set the qglobal flag in npc_types for that npc?
|
... 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.