EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Does EVENT_HP work in 0.6.0-dr3? (https://www.eqemulator.org/forums/showthread.php?t=19133)

FaerinTelDanor 08-15-2005 07:04 PM

Does EVENT_HP work in 0.6.0-dr3?
 
I've looked through the code and the functionality seems to be in place, but the event isn't triggering. Here's some sample PERL code that should (I think) work:

Code:

sub EVENT_SPAWN
{
  quest::SetNextHPEvent(50);
}

sub EVENT_HP
{
  if ($eventhp<=50)
  {
    quest::say("EVENT_HP fired");
  }
}

I've tried with and without checking $eventhp, I've tried calling external functions instead of embedding the quest calls directly in it ... nothing seems to work.

quest::me is also not working (it acts as quest::say instead of a narrative emote).

Are these known issues with dr3, or am I going to have to start pulling apart the code peice by peice to track it down?

Thanks in advance.

cofruben 08-15-2005 11:57 PM

I'm not sure..but functions might be case sensitive (I don't think so anyways), so try quest::setnexthpevent(50);. Also, never worked with the HP event, but give it a try.

FaerinTelDanor 08-16-2005 04:04 AM

Yeah, I've tried every case imagineable and nothing would trigger it.

mwmdragon 08-16-2005 07:09 AM

quotes
 
Try using quotes around the variable like this

Code:


sub EVENT_SPAWN
{
  quest::SetNextHPEvent("50");
}

sub EVENT_HP
{
  if ($eventhp<=50)
  {
    quest::say("EVENT_HP fired");
  }
}

I found that most commands worked if you encapsulated teh variables in quotations. Hope it works for ya.

canehdian 08-16-2005 08:03 AM

here dude, a event Hp i made to have 5 spawns when a mob reaches a certain % of hp, it works, so this may give you some idea's


sub EVENT_ATTACK {
quest::shout("WHO DARES CHALLENGE ME? I AM THE LESSER OVERKING!!, YOUR QUEST ENDS HERE, MORTALS!");
quest::spawn(189142,0,0,($x-10),$y,$z);
quest::spawn(189142,0,0,($x+10),$y,$z);
quest::spawn(189142,0,0,($x-20),$y,$z);
quest::spawn(189142,0,0,($x+20),$y,$z);
quest::spawn(189142,0,0,$x,($y+10),$z);
}

sub EVENT_HP {
if($hpevent == 70) {
firstevent();
}
if($hpevent == 30) {
secondevent();
}
}

FaerinTelDanor 08-16-2005 10:04 AM

No good, tried with and without quotes ... the PERL syntax is all correct, the events just won't trigger. EVENT_TIMER isn't working either ... Not sure what else to try.

FaerinTelDanor 08-16-2005 10:42 AM

Heh, I moved sub EVENT_DEATH up to the top of the file, and now everything works .... go figure (all it contains is a quest::shout()).

Owell, thanks for the help guys.


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

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