Skip to content

Commit 3f0fc6b

Browse files
committed
Added AutoEntrust toggle to Geomancer, tweaked AutoPianissimo.
1 parent 0b916fb commit 3f0fc6b

File tree

4 files changed

+21
-40
lines changed

4 files changed

+21
-40
lines changed

data/BRD.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ function job_filter_precast(spell, spellMap, eventArgs)
8989
local spell_recasts = windower.ffxi.get_spell_recasts()
9090

9191
-- Auto-Pianissimo
92-
if ((spell.target.type == 'PLAYER' and not spell.target.charmed) or (spell.target.type == 'NPC' and spell.target.in_party)) and not state.Buff['Pianissimo'] then
93-
if spell_recasts[spell.recast_id] < 10 then
92+
if ((spell.target.type == 'PLAYER' and not spell.target.charmed) or (spell.target.type == 'NPC')) and spell.target.in_party and not state.Buff['Pianissimo'] then
93+
if spell_recasts[spell.recast_id] < 1.5 then
9494
send_command('@input /ja "Pianissimo" <me>; wait 1.1; input /ma "'..spell.name..'" '..spell.target.name)
9595
eventArgs.cancel = true
9696
end

data/COR.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ end
2222
function job_setup()
2323

2424
-- Whether to use Compensator under a certain threshhold even when weapons are locked.
25-
state.CompensatorMode = M{'Never','500','1000','Always'}
25+
state.CompensatorMode = M{'Never','300','1000','Always'}
2626
-- Whether to automatically generate bullets.
2727
state.AutoAmmoMode = M(true,'Auto Ammo Mode')
2828
-- Whether to use Luzaf's Ring

data/GEO.lua

+18-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ function job_setup()
2626
last_indi = ''
2727
last_geo = ''
2828

29-
state.ShowDistance = M(true, 'Show Geomancy Buff/Debuff distance.')
29+
state.ShowDistance = M(true, 'Show Geomancy Buff/Debuff distance')
30+
state.AutoEntrust = M(false, 'AutoEntrust Mode')
3031

3132
indi_timer = ''
3233
indi_duration = 180
@@ -62,8 +63,22 @@ function job_pretarget(spell, spellMap, eventArgs)
6263
add_to_chat(204, 'Entrust active - You can\'t entrust yourself.')
6364
eventArgs.cancel = true
6465
end
65-
elseif spell.target.raw == '<t>' then
66-
change_target('<me>')
66+
elseif spell.target.type ~= 'SELF' then
67+
if state.AutoEntrust.value and ((spell.target.type == 'PLAYER' and not spell.target.charmed) or (spell.target.type == 'NPC')) and spell.target.in_party then
68+
local spell_recasts = windower.ffxi.get_spell_recasts()
69+
local abil_recasts = windower.ffxi.get_ability_recasts()
70+
eventArgs.cancel = true
71+
72+
if spell_recasts[spell.recast_id] > 1.5 then
73+
add_to_chat(123,'Abort: ['..spell.english..'] waiting on recast. ('..seconds_to_clock(spell_recasts[spell.recast_id]/60)..')')
74+
elseif abil_recasts[93] > 0 then
75+
add_to_chat(123,'Abort: [Entrust] waiting on recast. ('..seconds_to_clock(abil_recasts[93])..')')
76+
else
77+
send_command('@input /ja "Entrust" <me>; wait 1.1; input /ma "'..spell.name..'" '..spell.target.name)
78+
end
79+
elseif spell.target.raw == '<t>' then
80+
change_target('<me>')
81+
end
6782
end
6883
elseif spell.name:startswith('Geo') then
6984
if set.contains(spell.targets, 'Enemy') then

libs/Snaps-RngHelper.lua

-34
Original file line numberDiff line numberDiff line change
@@ -336,14 +336,6 @@ register_unhandled_command(function (...)
336336
if commands[1] and commands[1]:lower() == 'rh' then
337337
if commands[2] and commands[2]:lower() == 'process' then
338338
process_queue()
339-
elseif commands[2] and commands[2]:lower() == 'set' then
340-
if commands[3] then
341-
windower.add_to_chat(217, "Rnghelper : Setting weaponskill to %s":format(commands[3]))
342-
weaponskill = commands[3]
343-
else
344-
windower.add_to_chat(217, "Rnghelper : Clearing weaponskill.")
345-
weaponskill = nil
346-
end
347339
elseif commands[2] and commands[2]:lower() == 'print' then
348340
if pending then
349341
windower.add_to_chat(217, pending.prefix .. pending.english .. pending.target)
@@ -361,32 +353,6 @@ register_unhandled_command(function (...)
361353
pending = nil
362354
completion = false
363355
queue:clear()
364-
elseif commands[2] and commands[2]:lower() == 'enable' then
365-
if enabled then
366-
--windower.add_to_chat(217, "Rnghelper : Already enabled.")
367-
else
368-
--windower.add_to_chat(217, "Rnghelper : Enabling.")
369-
enabled = true
370-
end
371-
elseif commands[2] and commands[2]:lower() == 'disable' then
372-
if not enabled then
373-
--windower.add_to_chat(217, "Rnghelper : Already disabled.")
374-
else
375-
--windower.add_to_chat(217, "Rnghelper : Disabling.")
376-
target = nil
377-
pending = nil
378-
completion = false
379-
queue:clear()
380-
enabled = false
381-
end
382-
elseif commands[2] and commands[2]:lower() == 'toggle' then
383-
if enabled then
384-
--windower.add_to_chat(217, "Rnghelper : Disabling.")
385-
enabled = false
386-
else
387-
--windower.add_to_chat(217, "Rnghelper : Enabling.")
388-
enabled = true
389-
end
390356
end
391357
return true
392358
end

0 commit comments

Comments
 (0)