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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-07-2012, 12:40 PM
deaddraqear
Sarnak
 
Join Date: May 2008
Location: california
Posts: 45
Default

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);
	}
Reply With Quote
 


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 10:26 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