priority mobs
priority mobs
i have a question.. how can i make command to target the priority mobs. for example if "player:findNearestNameOrId(111111)" my character will target (111111) but if cant find (111111) my character "player:findNearestNameOrId(222222)" and target (222222)
Re: priority mobs
Try
Code: Select all
mob = player:findNearestNameOrId(111111) or player:findNearestNameOrId(222222)- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: priority mobs
Or even simpler...
Code: Select all
mob = player:findNearestNameOrId({111111,222222}) Re: priority mobs
Except that wont give priority to 111111. It will find the nearest of either one.Bill D Cat wrote:Or even simpler...
Code: Select all
mob = player:findNearestNameOrId({111111,222222})
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: priority mobs
it mean?? even (111111) and (222222) are in same ranged close to my character it will priority the (111111) then if no more (111111) it will target next the (222222)?rock5 wrote:TryCode: Select all
mob = player:findNearestNameOrId(111111) or player:findNearestNameOrId(222222)
or it will priority either (111111) or (222222)
Re: priority mobs
or like this??
but how my bot can distinguish what mobs he target.. and how may "end" i will use
Code: Select all
local moba = player:findNearestNameOrId(1111111)
local mobb = player:findNearestNameOrId(222222)
if moba then
player:target(moba)
if target.HP > 0 then
player:update();
player:cast("CLASS_SKILL");
else
player:target(mobb)
if target.HP > 0 then
player:update();
player:cast("CLASS_SKILL");
end
end
end- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: priority mobs
This will try to target mob 111111 and fight it if it is within range. If it can't find it but finds mob 222222 it will target and fight it instead.
If you need to know which mob you are fighting, you can look at the variable mob.Id or mob.Name as needed.
Code: Select all
mob = player:findNearestNameOrId(111111) or player:findNearestNameOrId(222222)
if mob and 200 > distance(mob, player) then
player:target(mob)
player:fight()
end
Re: priority mobs
ah ok... i was thinking if i use "player:findNearestNameOrId(111111) or player:findNearestNameOrId(222222)" it will target.. either of two.. thank you both of you.. i will try it later