Well, as it was up, it was working fine at hpevent(100), but I changed it anyway to 95.
As for the 2 mistakes.. yeah, I really don't know how I got turned around in there.. I had changed that portion of the code about 20 times using timers, I must have missed them both (rest of code uses == like it should =P )
I read a few examples, as well as the wiki regarding timers.. And I know I had them figured out and working last time I was messing around with scripting, but it seems I've drank too much in the past year maybe? =P But, after using a few examples here on the forums, I threw this together real quick (and yet, I don't really see any mistakes), but it doesn't work.. (short timer for easy testing)
Code:
sub EVENT_SPAWN
{
quest::shout("Foolish mortals! You should not have awoken me from my slumber!");
quest::settimer("depop",10);
quest::setnexthpevent(95);
}
sub EVENT_COMBAT
{
if ($combat_state == 0)
{
quest::settimer("depop",10);
$npc->SetHP(4500);
}
if ($combat_state == 1)
{
quest::stoptimer("depop");
}
}
sub EVENT_TIMER
{
if ($timer eq "depop")
{
quest::depopall(11253);
quest::depopall(11254);
quest::depopall(11255);
quest::depopall(11210);
}
}
sub EVENT_HP
{
if($hpevent == 95)
{
quest::spawn2(111254,0,0,"202.1","357","-24.2","128");
quest::setnexthpevent(75);
}
if($hpevent == 75)
{
quest::spawn2(111254,0,0,"202.1","357","-24.2","128");
quest::spawn2(111254,0,0,"202.1","357","-24.2","128");
$npc->SetHP(4275);
quest::setnexthpevent(50);
}
if($hpevent == 50)
{
quest::spawn2(111254,0,0,"202.1","357","-24.2","128");
quest::spawn2(111254,0,0,"202.1","357","-24.2","128");
quest::spawn2(111255,0,0,"202.1","357","-24.2","128");
$npc->SetHP(3375);
quest::setnexthpevent(25);
}
if($hpevent == 25)
{
quest::spawn2(111254,0,0,"202.1","357","-24.2","128");
quest::spawn2(111254,0,0,"202.1","357","-24.2","128");
quest::spawn2(111255,0,0,"202.1","357","-24.2","128");
quest::spawn2(111255,0,0,"202.1","357","-24.2","128");
$npc->SetHP(2250);
quest::setnexthpevent(0);
}
if($hpevent == 0)
{
quest::shout("Impossible!");
quest::depopall(111253);
quest::depopall(111254);
quest::depopall(111255);
}
}
sub EVENT_SLAY
{
quest::shout("Soandso will be pleased with your death! I shall feast on your corpse!");
quest::spawn2(111253,0,0,"202.1","357","-24.2","128");
}
sub EVENT_DEATH
{
quest::shout("Impossible!");
quest::depopall(111253);
quest::depopall(111254);
quest::depopall(111255);
}