Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 07-12-2008, 08:42 PM
JLB2414
Fire Beetle
 
Join Date: Jul 2007
Posts: 16
Default EVENT_HP issues ( any help greatly appreciated)

This is a learning experience for me, and so far I have been pretty successful with writing some quests, but for some reason I cannot figure out what is wrong with this one.

I thought a trained eye might be able to help .

Code:
#Script for Mob

sub EVENT_SPAWN 
{
	quest::shout("Defilers of the Temple beware - You shall not be tolerated!");
	quest::setnexthpevent(76);
	quest::setnexthpevent(26);
	quest::setnexthpevent(11);
}

sub EVENT_HP 
{

	if ($hpevent <= 76) 
{
	quest::shout("Intolerable!");
	quest::castspell($userid,2821); #Harm Touch
	}

sub EVENT_HP 
{
	if ($hpevent <= 26)
{
	quest::emote("Xarendyr's eyes take on a deathly allure!");
	quest::settimer(1,10)
}

sub EVENT_TIMER 
{
	if ($timer == 1) 
{
		quest::shout("Heretic! Feel the Embrace of Fear!");
		quest::castspell($userid,7477); #Death Touch
		quest::stoptimer (1);
	}
}

sub EVENT_HP 
{
	if ($hpevent <= 11) 
{
	quest::depop;
}

sub EVENT_ATTACK 
{
	quest::shout("Fool! You dare challenge the might of Cazic Thule?");
}
}
The mob shouts on spawn and also shouts when attacked, but none of the events activate.

I read in the wiki that quest::castspell(id,spell) could cause bugs, but even the shouts and emote do not go off.

Thanks for any suggestions in advance .
Reply With Quote
  #2  
Old 07-12-2008, 09:12 PM
VallonTallonZek
Sarnak
 
Join Date: May 2008
Location: Halas
Posts: 42
Default

I am not in a situation at the moment to test this, but give this a shot.

Code:
#Script for Mob

sub EVENT_SPAWN 
{
	quest::shout("Defilers of the Temple beware - You shall not be tolerated!");
	quest::setnexthpevent(76);
}

sub EVENT_HP 
{

	if ($hpevent == 11) 
	{
		quest::depop;
	}
	
	elsif ($hpevent == 26)
	{
		quest::setnexthpevent(11);
		quest::emote("Xarendyr's eyes take on a deathly allure!");
		quest::settimer(1,10);
	}

	elsif ($hpevent == 76) 
	{
		quest::setnexthpevent(26);
		quest::shout("Intolerable!");
		quest::castspell($userid,2821); #Harm Touch
	}
}
	


sub EVENT_TIMER 
{
	if ($timer == 1) 
	{
		quest::shout("Heretic! Feel the Embrace of Fear!");
		quest::castspell($userid,7477); #Death Touch
		quest::stoptimer (1);
	}
}


sub EVENT_ATTACK 
{
	quest::shout("Fool! You dare challenge the might of Cazic Thule?");
}
Reply With Quote
  #3  
Old 07-12-2008, 09:30 PM
JLB2414
Fire Beetle
 
Join Date: Jul 2007
Posts: 16
Default making progress

Thanks for the excellent suggestion.

The events are actually taking place now, which is a lot further than I've got previously.

Like the wiki mentioned quest::castspell(id,spellid); doesn't seem to be going off.

So should it look something like this instead?

Code:
sub EVENT_HP 
{

	if ($hpevent == 11) 
	{
		quest::depop;
	}
	
	elsif ($hpevent == 26)
	{
		quest::setnexthpevent(11);
		quest::emote("Xarendyr's eyes take on a deathly allure!");
		quest::settimer(1,10);
	}

	elsif ($hpevent == 76) 
	{
		quest::setnexthpevent(26);
		quest::shout("Intolerable!");
		$npc->CastSpell($userid,7477); #Harm Touch
	}
}
The timer also seems to not be activating either.

At any rate, this has helped out a ton. I feel as if a door has swung open . I can put this information to use a thousand times over.

Thanks a billion!
Reply With Quote
  #4  
Old 07-12-2008, 09:44 PM
JLB2414
Fire Beetle
 
Join Date: Jul 2007
Posts: 16
Default More progress

Okay the event is working, I think I was just killing him too quickly for it too activate.

My only remaining problem is the spells aren't being cast.
Reply With Quote
  #5  
Old 07-12-2008, 10:16 PM
JLB2414
Fire Beetle
 
Join Date: Jul 2007
Posts: 16
Default Finished

Oops it's $npc->CastSpell(7477,#userid).

All worked out now.
Reply With Quote
  #6  
Old 07-13-2008, 10:36 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

I remember >= being an issue in the logic, the event needs == which will recognize going under the value you did == too. Hope makes sense. I had same problem
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:19 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3