Proximities and NPCs
I'm wanting to make an event that spawns some adds, the adds will path towards the boss and if they are able to reach him I want them to despawn and cause the boss to heal.
I was originally thinking proximities but it looks like their function is specifically for a client entering the proximity, not an NPC? I've been looking around on the wiki for the past couple hours without any luck, anyone able to point me in the right direction? |
Just saw this:
Code:
sub EVENT_SAY{ |
Quote:
plugin::CheckDistBetween2Ents(entity1, entity2, distance); http://wiki.eqemulator.org/p?Perl_Pl...ntity-distance You will also want to use something simple like quest::follow, which will follow the entity that you specify: quest::follow(EntityID, [Distance]) # Mob starts to follow "EntityID". The second field, Distance, is optional and can be used to set the distance the Mob will follow it's target at. Setting the runspeed or walkspeed of the mob if you will, will give players a longer reaction time before the adds get to the main boss. Hopefully that helps. |
Quote:
Thanks Akkadius. Don't know why I would want a dumby npc when I can use the boss :l silly me. The quest::follow you're referring to having the adds I spawn follow my boss, correct? I'm assuming they don't follow any intelligent grid if I do that, in which case I'm fairly certain they would run through walls. |
Akkadius,
Quote:
Code:
sub EVENT_SPAWN { Code:
quest::settimer(1, 1); Code:
if($timer == 1){ |
Quote:
|
Good catch Splose.
It stopped him from repeating 'timer works' every second, but, still no follow. This is exactly what it looks like right now: Code:
sub EVENT_SPAWN { |
If the boss is stationary try this. I made a script really fast trying to use the quest::follow and it didn't work for me either.
What this is going to do is the mob is going to walk/run whatever to the boss, and then you need to make sure you intercept it. If it gets to the boss it's going to walk back to its original spawnpoint.. Another way (and this is my suggestion) is to use a grid and then use the waypoint arrive event to script it. Code:
sub EVENT_SPAWN { Code:
sub EVENT_SPAWN { |
Did that work for you Splose?
I tried the: Code:
quest::follow(" " . $entity_list->GetNPCByNPCTypeID(999334) . ""); |
Quote:
|
Splose,
Thanks! I removed the stoptimer so it's constantly updating the location, works perfect. It wanting to 'return' to it's spawn point after it reaches isn't an issue because if it does reach the boss it's being 'absorbed' and healing the boss. |
Quote:
|
Quote:
I don't have the stoptimer in, so, it's constantly updating the bosses loc, have tested it and the mobs reroute themselves if the boss moves. Biggest issue is a b-line puts the mobs through walls, I think I'm going to have to spawn them on a grid, and then once they reach the end of the grid have them grab the npc to move to it. Using the 'waypoint arrive event' you mentioned I should be able to have the mobs move to the npc once they arrive at that waypoint, correct? |
Quote:
|
Playing with the sub EVENT_WAYPOINT_ARRIVE {
This is what I have currently: Code:
sub EVENT_SPAWN { |
All times are GMT -4. The time now is 05:42 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.