• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Mob engaged if so next mob

Rocker

New member
Joined
Jul 31, 2017
RedCents
123¢
Is there a way inside a macro to test if a mob is already engaged by someone?
If so is there also a way to target the next closest mob with that name?

Example:
Target a_rat
If a_rat is engaged target the next closest a_rat.
If a_rat is not engaged navigate to it and fight.
 
chekc to see that targets hp, if its not 100% check to see if it has a target, if it does move on.
 
Thank you.
That pointed me in the right direction.

/if (${Target.PctHPs}<100) {
 
Rich (BB code):
/target somespawnid
/delay 5 ${Target.ID}
/if (${Target.PctHPs}<100) {
    /if (${Me.TargetOfTarget.ID}) {
        /continue
    }
}

this is probably the easiest way of doing it.

but if you dont want your macro to target mobs all over the place, you could do something like
Rich (BB code):
/declare MyTargetID
/varset MyTargetID ${NearestSpawn[2,npc].ID}
/if (${Spawn[pc loc ${MyTargetID.X}${MyTargetID.Y} ${MyTargetID.z }radius 75 zradius 15].ID}) /echo player near mob lets pull another.

which checks for players around a mob you intend to pull, and if there is a player just move on to next mob on the list.

or something like that.
 
Rich (BB code):
/declare j int local
/declare k int local
/declare MyTargetID int local
/varset k ${NearestSpawn[npc a_rat radius 75].ID}
/for j = 1  to ${k}
    /varset MyTargetID ${NearestSpawn[${j},npc a_rat radius 75].ID}
    /if (${Spawn[pc loc ${MyTargetID.X}${MyTargetID.Y} ${MyTargetID.z }radius 75 zradius 15].ID}) /echo player near mob lets pull another.
/next j

you may want to visit the MQ2 wiki and take a look at the Spawn TLO and Spawn Search paramaters as well. http://www.redguides.com/docs/tlos/
 
Ctaylor maybe you can help me on this one then.

i want to target nearestspawn, that is simple, then next mob it want is the mob nearest to that mob, and then nearest to that that is not on my list yet. etc,
 
You would need to build an array using what ct has but storing the mob id's within the mob pull routine
 
got all that setup, its just the mob closest to my current mob i cant get working right.
 
Rich (BB code):
/declare j int local
/declare k int local
/declare MyTargetID1 int local
/declare MyTargetID2 int local
/varset k ${NearestSpawn[npc a_rat radius 75].ID}
/for j = 1  to ${k}
    /varset MyTargetID1 ${NearestSpawn[${j},npc a_rat radius 75].ID}
    /if (${Spawn[pc loc ${Spawn[${MyTargetID1}].X} ${Spawn[${MyTargetID1}].Y} ${Spawn[${MyTargetID1.Z}]} radius 75 zradius 15].ID}) {
        /varset MyTargetID2 ${NearestSpawn[1,npc loc ${Spawn[${MyTargetID1}].X} ${Spawn[${MyTargetID1}].Y} radius 25].ID}
    }
/next j

you can also use the /alert feature to add mobs to an alert list and use the noalert # in the NearestSpawn search.

You would just need to add code to /alert add 1 id ${MyTargetID1} and then add the noalert to the spawn search.
/varset MyTargetID2 ${NearestSpawn[1,npc loc ${Spawn[${MyTargetID1}].X} ${Spawn[${MyTargetID1}].Y} radius 25 noalert 1].ID}

Just have to reset the alert list every now and then /alert clear 1 and/or just remove the entry /alert remove 1 id ${MyTargetID2}
 
yeah i cant make it work like i want it to, i am the sucks!.. but also the tired in the head. so maybe when i am more awake.
 
Give me more information on what you are trying to do and I will see if I can point you in the correct direction. I think I know what you are trying to do, but I am not sure. Just need a little more information. You can PM me the details and I will see if I can help.
 
is from a mac i cnat remember where i found but i like using it to pull a buncha mobs and kill them for plling my tiny alts.

Rich (BB code):
| Generate our pull list
	/for a 1 to ${MaxPullCount}
|	| If we have a target start pull from that point. Otherwise pull from where I'm standing.
		/if (${Target.ID}) {
			/varset TargetID ${Spawn[id ${Target.ID}].NearestSpawn[${a},npc radius ${PullRadius}  zradius ${PullZRadius} noalert 10 ${MobsToPull}].ID}
		} else {
			/varset TargetID ${NearestSpawn[${a},npc radius ${PullRadius} zradius ${PullZRadius} noalert 10 ${MobsToPull}].ID}
			}
		/delay 1s ${TargetID}
		/if (!${TargetID}) /goto :StartPull
		/varset TotalMobs ${a}
		/varset MobArray[${a}] ${TargetID}
		/echo MobID ${a} is ${Spawn[${MobArray[${a}]}].CleanName}(${Spawn[${MobArray[${a}]}].ID})
	/next a

what i would like it to do is build the pull list as it does now but base the list on mob proximity to each other instead of to me.

so add the closest mob to me, then the next mob to be added to the list should be the mob closest to mob1, then the 3rd mob the mob closest to mob2 etc.

the noalert 10 consists of mobs i dont want to touch, and mobstopull is a list than be made of particular mobs you want to pull, but if left empty it just pulls anything that is not on the alert10 list.
 
Well you need to think of the alert list in a different manner. Lets say when you first start looking for mobs, every mob is a valid target. Now if you set up your code to dis-qualify a mob to attack, all you need to do is add that mob to the /alert list. otherwise you have a valid target to attack.

Now if you add the dis-qualified mob to the list and refresh the list using NearestSpawn. The dis-qualified mob will not be in the list of mobs returned. You just keep repeating this until you find a valid mob to attack.

Remember to keep changing the mob who's location you want to keep checking from. There is only one problem I can see that you will have to compensate for and that is when searching you need to make sure there aren't closer mobs to you that the next mob that is closest to your current dis-qualified mob. I know that sounds confusing, but you have to remember that your really searching for mobs to attack that are closest to you, but you want to use other mobs as a reference to search for other mobs. you need to check if the next closest mob NOT on the alert list is closer to you that the next closest mob to your reference mob.

I know that sounds complicated, but it's not.
 
my problem is i dont feel i can get that thing to work where i have a mob slocation and thenh search for mobs near that location.
nd then get that as my new targetid.

but yeah i will think more about it.
 
Question - Mob engaged if so next mob

Users who are viewing this thread

Back
Top
Cart