Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

Development::Feature Requests Post suggestions/feature requests here.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-06-2007, 05:38 AM
lanileb
Sarnak
 
Join Date: Jul 2007
Posts: 79
Default spawning at certain percentage of health

I was wondering if it would be possible to write a sub EVENT_SPAWN or sub EVENT_ATTACK script for a mob to make him spawn certain things when his health gets to a certain %. Like when he reaches 70% have him spawn 10-15 little mini versions that the people have to kill, then 40% maybe he takes on another form, stuff like that. And if it's possible to do this, anyone know the commands you would write? I've written some quests before but not sure how you would do a health check.
Reply With Quote
  #2  
Old 08-06-2007, 07:21 AM
Ueguvil
Hill Giant
 
Join Date: Mar 2004
Posts: 139
Default

I'm pretty sure you can do this using EVENT_HP.
Reply With Quote
  #3  
Old 08-06-2007, 09:13 AM
sfisque
Hill Giant
 
Join Date: Oct 2006
Posts: 248
Default

yes EVENT_HP will do this quite well. some points to note:

1) the spawned mobs will need to be tuned for aggro. if they spawn and are green to the players they might just stand there and watch their overlord get spanked. (set aggro appropriately similar to how undead ignore level for aggro).

2) add in a "despawn" timer or "upper minion limit" so that if the players attempt the mob several times, they dont end up having to fight several waves of the same minions.

3) add in some form of quest::shout or quest::say so that the players get some clue as to whats happened, otherwise they might assume the server screwed them with a spurious spawn.

have fun

== sfisque
Reply With Quote
  #4  
Old 08-06-2007, 10:00 AM
lanileb
Sarnak
 
Join Date: Jul 2007
Posts: 79
Default

ok cool thanks I'll play around with that. How would I Set the HP check though? I can't seem to find anything in the checks that would be like quest::hp or something of that sort. What's the check? SOmething like quest::health or such?
Reply With Quote
  #5  
Old 08-06-2007, 10:39 AM
lanileb
Sarnak
 
Join Date: Jul 2007
Posts: 79
Default

Ok i found the quest::setnexthpevent but I'm not sure how to set the correct percentage. I tried quest::setnexthpevent(80) for 80% and also tried quest::setnexthpevent(1480200) because thats 80% of his max health and neither worked. Heres the .pl file right now.

sub EVENT_DEATH
{
quest::spawn(2700027,0,0,-532.4,-1920.9,15.6);
}

sub EVENT_HP
{
quest::setnexthpevent(1480200){
quest::spawn(2700036,0,0,-532.4,-1920.9,15.6);
quest::spawn(2700036,0,0,-540.8,-1902.8,15.6);
quest::spawn(2700036,0,0,-569.5,-1895.7,15.6);
quest::spawn(2700036,0,0,-582.0,-1913.3,16.5);
}
}
Reply With Quote
  #6  
Old 08-06-2007, 01:35 PM
Striat
Sarnak
 
Join Date: Aug 2006
Posts: 60
Default

Quote:
Originally Posted by lanileb View Post
Ok i found the quest::setnexthpevent but I'm not sure how to set the correct percentage. I tried quest::setnexthpevent(80) for 80% and also tried quest::setnexthpevent(1480200) because thats 80% of his max health and neither worked. Heres the .pl file right now.

sub EVENT_DEATH
{
quest::spawn(2700027,0,0,-532.4,-1920.9,15.6);
}

sub EVENT_HP
{
quest::setnexthpevent(1480200){
quest::spawn(2700036,0,0,-532.4,-1920.9,15.6);
quest::spawn(2700036,0,0,-540.8,-1902.8,15.6);
quest::spawn(2700036,0,0,-569.5,-1895.7,15.6);
quest::spawn(2700036,0,0,-582.0,-1913.3,16.5);
}
}
There are a few examples in the quest q and a section.

Would do this:

Code:
sub EVENT_SPAWN {
quest::setnexthpevent(80);
}

sub EVENT_AGGRO 
{
	quest::stoptimer(1);
}

sub EVENT_SLAY {
	quest::settimer(1,20);
}

sub EVENT_TIMER {
	if ($timer == 1) {
	quest::stoptimer(1);
	quest::signalwith(2700036,1,0000);
	}
}

sub EVENT_HP
{
 if($hpevent == 80)  {
		quest::spawn(2700036,0,0,-532.4,-1920.9,15.6);
		quest::spawn(2700036,0,0,-540.8,-1902.8,15.6);
		quest::spawn(2700036,0,0,-569.5,-1895.7,15.6);
		quest::spawn(2700036,0,0,-582.0,-1913.3,16.5);
}
}

sub EVENT_DEATH
{
quest::spawn(2700027,0,0,-532.4,-1920.9,15.6);
}
You can ignore my timer, event aggro and event slay. They're just for controlling add despawn. I'd add this for your adds 2700036.pl:

Code:
sub EVENT_SIGNAL {
if ($signal == 1) {
	quest::depop();
}
}
Reply With Quote
  #7  
Old 08-06-2007, 01:38 PM
sfisque
Hill Giant
 
Join Date: Oct 2006
Posts: 248
Default

add:

sub EVENT_SPAWN
{
#sets the HP event signal for 80% health
quest::setnexthpevent(80);
}



== sfisque

ps: lol striat posted just before me.
Reply With Quote
  #8  
Old 08-06-2007, 01:50 PM
lanileb
Sarnak
 
Join Date: Jul 2007
Posts: 79
Default

Awesome thank you so much for that script, except the despawn doesn't seem to work properly. I'm gonna try writing my own right now and I'll let ya know how it turns out.
Reply With Quote
  #9  
Old 08-06-2007, 02:00 PM
lanileb
Sarnak
 
Join Date: Jul 2007
Posts: 79
Default

Ahh I didn't notice the sub EVENT_SIGNAL goes into 2700036.pl I put into 25, one second and I'll try that
Reply With Quote
  #10  
Old 08-06-2007, 03:02 PM
lanileb
Sarnak
 
Join Date: Jul 2007
Posts: 79
Default

OK I got it working. Didn't have the signal set properly in my 2700025.pl file so I set that for

sub EVENT_DEATH

quest::signalwith(2700036,1)

so now the signal properly identifies to the minions to despawn. Now to start adding in my health checks, I want him to spawn 4 at 80% 6 at 60% 10 at 40% and 15 at 20% hehe
Reply With Quote
  #11  
Old 08-07-2007, 02:46 AM
lanileb
Sarnak
 
Join Date: Jul 2007
Posts: 79
Default

Ok sorry to keep this thread goin like this...now I can't get something else to work. The spawn/despawn scripts work perfect. I can't seem to get a quest::shout included in those though. This is what I have.

{
if($hpevent == 80) {
quest::shout("Come forward my Wraiths! Bring Terror upon these foolish ones who have disturbed me!");
quest::spawn(2700036,0,0,-532.4,-1920.9,15.6);
quest::spawn(2700036,0,0,-540.8,-1902.8,15.6);
quest::spawn(2700036,0,0,-569.5,-1895.7,15.6);
quest::spawn(2700036,0,0,-582.0,-1913.3,16.5);
}
if($hpevent == 60) {
quest::shout("You have gotten this far and here you will die. Prepare for the worst ignorant fools!");
quest::spawn(2700036,0,0,-536.2,-1907.0,15.6);
quest::spawn(2700036,0,0,-548.3,-1894.2,15.6);
quest::spawn(2700036,0,0,-532.4,-1920.9,15.6);
quest::spawn(2700036,0,0,-540.8,-1902.8,15.6);
quest::spawn(2700036,0,0,-569.5,-1895.7,15.6);
quest::spawn(2700036,0,0,-582.0,-1913.3,16.5);
}

The first shout will work while the second one will not. I dont see any coding problems in it however...
Reply With Quote
Reply

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 04:58 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3