Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Job setup portions:
- state.Moving = M(false, "moving")
- --User Setup Portions:
- state.EngagedMoving = M('Disabled','Enabled')
- send_command('bind f1 gs c cycle EngagedMoving')
- --User Unload Portion
- send_command('unbind f1')
- --[[Put this down in the funny business section. You'll need to edit the sections for pl pl.x and pl.y then parts to include another and statements (in both the if and elseif part) to check to make sure your pet is not fighting. That way not only will it have a toggle that by default will not have you equip movementspeed gear in your engaged sets unless you turn the toggle on, but after you've edited it, ideally won't equip it if your pet is engaged either.]]
- mov = {counter=0}
- if player and player.index and windower.ffxi.get_mob_by_index(player.index) then
- mov.x = windower.ffxi.get_mob_by_index(player.index).x
- mov.y = windower.ffxi.get_mob_by_index(player.index).y
- mov.z = windower.ffxi.get_mob_by_index(player.index).z
- end
- moving = false
- windower.raw_register_event('prerender',function()
- mov.counter = mov.counter + 1;
- if mov.counter>15 then
- local pl = windower.ffxi.get_mob_by_index(player.index)
- if pl and pl.x and mov.x and state.EngagedMoving.Value == 'Disabled' then
- if player.status ~= 'Engaged' then
- dist = math.sqrt( (pl.x-mov.x)^2 + (pl.y-mov.y)^2 + (pl.z-mov.z)^2 )
- if dist > 1 and not moving then
- state.Moving.value = true
- send_command('gs c update')
- if world.area:contains("Adoulin") then
- send_command('gs equip sets.Adoulin')
- else
- send_command('gs equip sets.MoveSpeed')
- end
- moving = true
- elseif dist < 1 and moving then
- state.Moving.value = false
- send_command('gs c update')
- moving = false
- end
- end
- elseif pl and pl.x and mov.x and state.EngagedMoving.Value == 'Enabled' then
- dist = math.sqrt( (pl.x-mov.x)^2 + (pl.y-mov.y)^2 + (pl.z-mov.z)^2 )
- if dist > 1 and not moving then
- state.Moving.value = true
- send_command('gs c update')
- if world.area:contains("Adoulin") then
- send_command('gs equip sets.Adoulin')
- else
- send_command('gs equip sets.MoveSpeed')
- end
- moving = true
- elseif dist < 1 and moving then
- state.Moving.value = false
- send_command('gs c update')
- moving = false
- end
- end
- if pl and pl.x then
- mov.x = pl.x
- mov.y = pl.y
- mov.z = pl.z
- end
- mov.counter = 0
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement