What I am trying to do is have one mob set a quest global... then have 3 other mobs check for that global upon death. once all 3 die, the mob who created the global will despawn the untargetable, then respawn a targetable one..
here is the quest global creator...
Code:
#Emoush_the_Destroyer
sub EVENT_SPAWN
{
quest::setglobal("emoush",1,0,"F");
quest::shout("Who has AWAKENED ME!?!?!, You shall die for interupting my slumber!");
}
sub EVENT_SIGNAL
{
if($emoush == 4)
{
quest::spawn2(1230,0,0,-136.6,1993,-3.9);
quest::delglobal("emoush");
quest::shout("depoped, respawned");
quest::depop();
}
}
sub EVENT_DEATH
{
quest::delglobal("emoush");
quest::shout("global deleted");
}
Here is the mobs that die and make the targetable one spawn.
Code:
sub EVENT_DEATH
{
if (!defined($qglobals{emoush})){
if ($qglobals{emoush} == 1)
{
quest::delglobal("emoush");
quest::shout("deleted");
quest::setglobal("emoush",2,0,"F");
quest::shout("1");
}
else ($qglobals{emoush} == 2)
{
quest::delglobal("emoush");
quest::setglobal("emoush",3,0,"F");
quest::shout("2");
}
else ($qglobals{emoush} == 3)
{
quest::delglobal("emoush");
quest::setglobal("emoush",4,0,"F");
quest::shout("3");
quest::signal("342052,10");
}
}
}
I can get emoush to work right, but not the 3 other mobs...
Any ideas what I am doing wrong? I put shouts in so I know where the quest is not working, so I know that the quest doesnt work when I kill one of the three mobs, it doesnt even check for the global or change it.