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
|