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 12-15-2010, 09:57 PM
Bdiddy
Sarnak
 
Join Date: Sep 2010
Posts: 77
Default Question about quest code

Below is the code for Terris Thule in nightmareb, can someone explain to me what is going on on the death event and the timer event? I read the wiki but woudn't figure these two out exactly.

Also on a side note, is there a way to keep an npc from running at low health and how exactly do i make them kos. I tried Georges tool to make an npc kos faction but i still con indiff with or w/o the gm flag on. thx

Code:
sub EVENT_SPAWN {

quest::setnexthpevent(75);

quest::settimer(1,1);

}



sub EVENT_HP {

	if($hpevent == 75)

		{

		quest::spawn2(221006,0,0,-1858,-25,134,5);

		quest::spawn2(221006,0,0,-1780,-59,134,193); 

		quest::spawn2(221006,0,0,-1833,102,134,165);

		quest::spawn2(221006,0,0,-1852,48,134,157);

		quest::spawn2(221006,0,0,-1876,-63,134,228);



		quest::spawn2(221006,0,0,-1933,49,134,156); 

		quest::spawn2(221006,0,0,-1984,-61,134,148);



		quest::spawn2(221006,0,0,-1896,-108,134,230); 

		quest::spawn2(221006,0,0,-1899,-65,134,243);                                                              

               	quest::spawn2(221006,0,0,-1732,3,134,190);

		quest::spawn2(221006,0,0,-1773,-39,134,187);

		quest::spawn2(221006,0,0,-2005,85,134,99);

		quest::spawn2(221006,0,0,-2031,-3,134,142);



		quest::spawn2(221006,0,0,-1954,-29,134,71);

		quest::spawn2(221006,0,0,-1887,33,124,113);

		quest::setnexthpevent(50);

		}



	if($hpevent == 50) {

		$npc->CastSpell(3150,221008);

		quest::setnexthpevent(35);

		}

	if($hpevent == 35) {

		quest::spawn2(221007,0,0,-1808,-120,134,239);

		quest::spawn2(221007,0,0,-1774,-7,134,191);

		quest::spawn2(221007,0,0,-1837,91,134,159);

		}

}



sub EVENT_DEATH {

quest::spawn2(202368,0,0,$x,$y,$z,$h);

}



sub EVENT_TIMER {

if($timer == 1) {

quest::stoptimer(1);

quest::settimer(1,1);

}



if(($timer == 1 && $x <= -2100) || ($y >= 230) || ($y <= -265) || ($x >= -1600)) {

quest::depop();

quest::shout("Never shall I be removed from nightmares!");

}

 }
Reply With Quote
  #2  
Old 12-15-2010, 11:28 PM
Jaekob
Sarnak
 
Join Date: May 2010
Posts: 39
Default

Upon death another NPC will spawn at the location of NPC that was killed.

Timer is just a leash to keep the NPC in a certain spot, but looks like the NPC will despawn if outside of the specificed x, y coordinates.

Faction and whether a npc will flee are simple fixes in the db. PEQ db editor can do this fairly simply.
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 04:11 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