EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Trouble with my HP event. (https://www.eqemulator.org/forums/showthread.php?t=31885)

Bellos 08-19-2010 07:10 PM

Trouble with my HP event.
 
Its spawning the 2 the first round like it should. Then at 60% it spawns the first and and the next 2, then at the last 40% it spawns all of em, the first 2 mobs the 2nd 2 mobs and the 3rd 2 mobs.

I dunno why its doing this. Can anyone help me out?


Code:

#Grond Lieutant of Sauron
sub EVENT_SPAWN {
        quest::setnexthpevent(80);
}

sub EVENT_HP {
        if($hpevent = 80)
        {
        quest::setnexthpevent(60);
        quest::shout("Come Servants of Sauron!!");
        quest::shout("Destroy the Intruders!!");
        quest::spawn2(999240,0,0,441,764,9.6,20.9);
        quest::spawn2(999240,0,0,491.2,767.6,9.6,230);
        }
       
        if($hpevent = 60)
        {
        quest::setnexthpevent(40);
        quest::shout("Come Servants of Sauron!!");
        quest::shout("Destroy the Intruders!!");
        quest::spawn2(999239,0,0,441,764,9.6,20.9);
        quest::spawn2(999239,0,0,491.2,767.6,9.6,230);
        }
       
        if($hpevent <= 40)
        {
        quest::shout("Come Servants of Sauron!!");
        quest::shout("Destroy the Intruders!!");
        quest::spawn2(999243,0,0,441,764,9.6,20.9);
        quest::spawn2(999243,0,0,491.2,767.6,9.6,230);
        }
}


Congdar 08-19-2010 08:48 PM

use two equals signs: if($hpevent == 60) if($hpevent == 80)

Bellos 08-19-2010 08:49 PM

Quote:

Originally Posted by Congdar (Post 190830)
use two equals signs: if($hpevent == 60)

ahh i always forget that == check, = assign


All times are GMT -4. The time now is 02:29 AM.

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