View Full Version : Stop attacking!
Kenej
02-05-2013, 03:36 AM
I'm having a little bit of a problem with this boss script and I was hoping one of you more experienced people could help me out.. I used the search function and found a similar thread to this one, but it didn't seem to tell me anything I haven't already tried or produce any solutions for me.
The point of this script is to have the boss cast his stun, and then run over to the location I have set.. I've pasted a snippet of the script below.
With this he casts his stun, but continues to attack you and doesn't move to where he's supposed to.. I also wasn't sure if the timing for pause was in milliseconds or not so if it's not I'll just fix that, but that's not really the issue right now!
I've tried to wipe his hate list, which just makes him go back to his spawn point.. I've also tried setting his attack flags to be unattackable/wont attack back and that doesn't work either.
I'm aware that it could be done if i set a combat state and wipe his hate list, but this is going to a happen a few times during the fight.
sub EVENT_HP
{
if($hpevent == 90)
{
quest::castspell(9406, $userid); #10 second aggro list stun for phase change
quest::moveto(-2104,181,251.9,187,1);
quest::emote("runs to the weapon rack to select a new weapon.");
quest::pause(10000);
quest::wearchange(7,4);
quest::modifynpcstat(min_hit,3000);
quest::modifynpcstat(max_hit,5100);
quest::setnexthpevent(75);
}
Zaela_S
02-05-2013, 04:40 AM
I'm no expert, but there doesn't seem to be any faculty for conveniently overriding the combat movement AI in the standard EQEmu code. On my server I added an NPC setting to disable combat AI movement and instead move to a script-defined loc regardless of aggro -- but I don't know how to add stuff for Perl so I wouldn't be able to offer it up myself.
Maybe there is already some trick to doing what you're going for here, but I think an explicit inclusion of alternative combat movement would probably be better anyway. (Or I guess maybe nothing on live works like that, so it wouldn't be made part of the standard code regardless? I'm new at this...)
wolfwalkereci
02-05-2013, 04:47 AM
Have you seen http://new.eqemulator.net/forums/showthread.php?p=184474
Looks like pause is used for waypoint pathing.
I see 2 scripts that have in the on spawn event but that is it.
Looks like you either need to use timers or figure out the work around to this.
edit: look at \quests\eastwastes\Tain_Hammerfrost.pl
Kenej
02-05-2013, 04:52 AM
I'm no expert, but there doesn't seem to be any faculty for conveniently overriding the combat movement AI in the standard EQEmu code. On my server I added an NPC setting to disable combat AI movement and instead move to a script-defined loc regardless of aggro -- but I don't know how to add stuff for Perl so I wouldn't be able to offer it up myself.
Maybe there is already some trick to doing what you're going for here, but I think an explicit inclusion of alternative combat movement would probably be better anyway. (Or I guess maybe nothing on live works like that, so it wouldn't be made part of the standard code regardless? I'm new at this...)
Heh yeah, I'm pretty new at this as well.. I might be able to do it if I keep repopping the mob with new mobid's.. I just wanted something less clunky.. Might just scrap this whole thing if nobody knows for sure if there's a less clunky way to do it.
Have you seen http://new.eqemulator.net/forums/showthread.php?p=184474
Looks like pause is used for waypoint pathing.
I see 2 scripts that have in the on spawn event but that is it.
Looks like you either need to use timers or figure out the work around to this.
Thanks for this.. didn't know pause was used for waypoint settings.
quest::pause(time) - Forces the NPC to take a break for a certain time
^ is a little vague, but like you said I can just use a timer for it anyway. The main issue I was having was with him not moving because he's in combat.
Edit: I looked at that script and tried to use $npc->MoveTo hoping it would magically override him being in combat instead of quest::moveto and that didn't work either.
Kayen
02-05-2013, 08:54 AM
There are a lot of ways to accomplish what you want.
You can make an invs NPC and have your boss go attack it to move it there.
OR if you want it to move, you have to wipe its hatelist, then when it resets, issue the move command.
Its a little complicated but it can be done.
Kenej
02-05-2013, 08:59 AM
There are a lot of ways to accomplish what you want.
You can make an invs NPC and have your boss go attack it to move it there.
OR if you want it to move, you have to wipe its hatelist, then when it resets, issue the move command.
Its a little complicated but it can be done.
I didn't think of making an invisible NPC.. that is such a great idea, thanks!
Zaela_S
02-05-2013, 09:11 AM
Pretty hacky :\
Uleat
02-05-2013, 03:51 PM
Actually, attacking an invis mob would be great for showing his anger and frustration :)
Of course, one might think he has tourrett's as well...
Kenej
02-05-2013, 06:24 PM
Actually, attacking an invis mob would be great for showing his anger and frustration :)
Of course, one might think he has tourrett's as well...
Haha, yeah.. I was thinking it'd be great since he's technically grabbing a new weapon and it should be a lot better looking.. Like I said, great idea.
c0ncrete
02-05-2013, 06:36 PM
have you tried quest::pathto($x, $y, $z) and $npc->SetRunning() after setting him immune /non-targetable / non-aggro?
sorvani
02-05-2013, 10:25 PM
If your NPC spawns, then he will always go back to his spawn point after losing aggro or the pathing ends.
The best method to get around that is to spawn the NPC in a script from a controller NPC.
joligario
02-05-2013, 10:37 PM
If your NPC spawns, then he will always go back to his spawn point after losing aggro or the pathing ends.
Unless you issue a quest::moveto($x,$y,$z,$h,1)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.