Thread Rating:
  • 13 Vote(s) - 2.31 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Attacking certain mobs only.
#1
Hi, I hope someone can help me im so terrible at this! *feels bad*

I wish I had more time (im even at work as we speak) to read through the lua wiki (I will soon!) but currently I don't and it's making me a bit confused.
so I hope someone could point me in the right direction! :D

lil while back I was asking on how to get the bot only attack a certain mobs that I want him to attack in the grind mode and this code was brought up:

Code:
function GetNearestGrindAttackable()
    local level = Player.level
    local el = EntityList("nearest,alive,attackable,onmesh,minLevel="..tostring(level-1)..",maxlevel="..tostring(level+1))
    if ( el ) then
        local i,e = next(el)
        if (i~=nil and e~=nil) then
            return e
        end
    end
    ml_debug("GetNearestAttackable() failed with no entity found matching params")
    return nil

Now i'm getting really confused by this currently. Where do I exactly have to change the names(or put in) of the mobs that I want it to attack.

Again sorry for the dumb question but I just don't have the time currently to read through the wiki @_@
Thanks allot if someone can put me in the right direction!
Reply
#2
Thanks allot!!
I can just add as many ID as I want right? Like contentid=12345,56789,998785, etc etc

And thanks for the tip i'll save it to change everytime :D

Edit: works like a charm, great ^-^
Reply
#3
how do i do this exactly?
Reply
#4
Go to your bot folder, > Luamods > ffxivminion > open ffxiv_helpers.lua in like notepad or something and just copy over the text
local el = EntityList("nearest,contentid=12345,alive,attackable,onmesh,minLevel="..tostring(level-1)..",maxlevel="..tostring(level+1))

Change the contentid to the ID you want it to be.

To find this go to the ingame bot > Lua Modules > Dev> toggle devmonitor on > open up target info look @ content ID paste this into the notepad content ID and control > reload lua modules.
Reply
#5
local el = EntityList("nearest,contentid=130,alive,attackable,onmesh,minLevel="..tostring(level-1)..",maxlevel="..tostring(level+1))

exactly which line to add this to?
Reply
#6
go to the ffxiv_helpers.lua you should see a line exactly the same like that one but without the contentid=. Just completely replace this line with the one you just copy'd.
Reply
#7
This doesn't work for me. It still attacks all monsters on mesh. :( And that exact line doesnt even exist, I even tried only adding contentid=xxx on the existing lines, didnt work.
Reply
#8
This works, but it only gives a priority to a certain ID. My question is how can you make the bot ignore certain ID?
Reply
#9
Doesnt seem to be working for me..
function GetNearestGrindAttackable()
local minLevel = tostring(Player.level - tonumber(gMinMobLevel))
local maxLevel = tostring(Player.level + tonumber(gMaxMobLevel))
local el = EntityList("lowesthealth,alive,contentid=411,attackable,onmesh,maxdistance="..tostring(ml_global_information.AttackRange)..",minlevel="..minLevel..",maxlevel="..maxLevel)
if ( el ) then
local i,e = next(el)
if (i~=nil and e~=nil) then
return e
end
end

local el = EntityList("nearest,contentid=411,alive,attackable,onmesh,minlevel="..minLevel..",maxlevel="..maxLevel)
if ( el ) then
local i,e = next(el)
if (i~=nil and e~=nil) then
return e
end
end
ml_debug("GetNearestAttackable() failed with no entity found matching params")
return nil
end

still is attacking everything o.o
Reply
#10
yep i try this as well its not working ;/
Reply
 


Forum Jump:


Users browsing this thread: 7 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products