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
  #1  
Old 03-04-2014, 09:58 AM
Melcrin
Fire Beetle
 
Join Date: Dec 2007
Location: home
Posts: 13
Default Newby Needs a Hand

I have recently been trying my hand at writing encounter scripts and while I have had some success I have found a few hangups I can't overcome.

My issue with the encounter I have set up is I cannot seem to get the second $hpevent variables to work. Here is a copy of my encounter. I would be much obliged if someone can help me out. Also any simple pointers would be awesome. I just started delving into this a week ago.

Code:
sub EVENT_SPAWN
{
	quest::shout("You will regret trespassing in my kingdom!");
	quest::setnexthpevent(75);
}
sub EVENT_HP
{
	quest::emote("quaffs a magical elixir.");
	quest::shout("Now you will die!");
	quest::npcsize(9);
	quest::modifynpcstat("min_hit",70);
	quest::modifynpcstat("max_hit",120);
	quest::setnexthpevent(50);
}
if($hpevent==50)
{
	quest::shout("Guards!");

my $x = $npc->GetX();
my $y = $npc->GetY();
my $z = $npc->GetZ();
my $h = $npc->GetHeading();

	quest::spawn2(11174,0,0,$x+5,$y+5,$z,$h);
	quest::spawn2(11175,0,0,$x+5,$y-5,$z,$h);
}
sub EVENT_AGGRO
{
	quest::emote("lunges at you.");
	quest::shout("Me thinks you will make an excellent $race stew!");
}
sub EVENT_DEATH
{
	quest::emote("whimpers in pain.");
	quest::shout("My spleen!");
}
sub EVENT_SLAY
{
	quest::emote("laughts at $targetname.");
}
Reply With Quote
 

Thread Tools
Display Modes

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:32 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