
Originally Posted by
Karizo
Sorry for asking again, but I think my message got buried earlier.
Are there plans to add/fix timers' interaction with Mighty Guard and Indi-Spells? As far as I can tell, neither is recognized by timers.
Also, is it possible for timers to read the augments off Telchine Pieces in order to give the correct duration of spells?
The last follow-up, is it possible for timers to actually just read the numbers off the new in-game timer SE has added to the buff icons? Seems like that would be the most accurate reading and perhaps the easiest, bypassing all additional calculations, if it's possible that is.
Thanks!
I made this a while back. You'll need to alter the values for your specific telchine enh. duration +, but that should be about it.
Code:
function job_setup()
custom_timers = {}
end
function job_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted then
if spell.skill == 'Enhancing Magic' then
adjust_timers(spell, spellMap)
end
end
end
function adjust_timers(spell, spellMap)
local current_time = os.time()
local temp_timer_list = {}
local dur = calculate_duration(spell, spellName, spellMap)
custom_timers[spell.name] = nil
send_command('timers delete "'..spell.name..' ['..spell.target.name..']"')
custom_timers[spell.name] = current_time + dur
send_command('timers create "'..spell.name..' ['..spell.target.name..']" '..dur..' down')
end
function calculate_duration(spell, spellName, spellMap)
local mult = 1.00
if player.equipment.Head == 'Telchine Cap' then mult = mult + 0.09 end
if player.equipment.Body == 'Telchine Chas.' then mult = mult + 0.09 end
if player.equipment.Hands == 'Telchine Gloves' then mult = mult + 0.09 end
if player.equipment.Legs == 'Telchine Braconi' then mult = mult + 0.09 end
if player.equipment.Feet == 'Telchine Pigaches' then mult = mult + 0.08 end
if player.equipment.Feet == 'Estq. Houseaux +2' then mult = mult + 0.20 end
if player.equipment.Legs == 'Futhark Trousers' then mult = mult + 0.10 end
if player.equipment.Legs == 'Futhark Trousers +1' then mult = mult + 0.20 end
if player.equipment.Hands == 'Atrophy Gloves' then mult = mult + 0.15 end
if player.equipment.Hands == 'Atrophy Gloves +1' then mult = mult + 0.16 end
if player.equipment.Back == 'Estoqueur\'s Cape' then mult = mult + 0.10 end
if player.equipment.Hands == 'Dynasty Mitts' then mult = mult + 0.05 end
if player.equipment.Body == 'Shabti Cuirass' then mult = mult + 0.09 end
if player.equipment.Body == 'Shabti Cuirass +1' then mult = mult + 0.10 end
if player.equipment.Feet == 'Leth. Houseaux' then mult = mult + 0.25 end
if player.equipment.Feet == 'Leth. Houseaux +1' then mult = mult + 0.30 end
if player.equipment.Head == 'Erilaz Galea' then mult = mult + 0.10 end
if player.equipment.Head == 'Erilaz Galea +1' then mult = mult + 0.15 end
local base = 0
if spell.name == 'Haste' then base = base + 180 end
if spell.name == 'Stoneskin' then base = base + 300 end
if spell.name:startswith("Bar") then base = base + 480 end
if spell.name == 'Blink' then base = base + 300 end
if spell.name == 'Aquaveil' then base = base + 600 end
if string.find(spell.english,'storm') then base = base + 180 end
if spell.name == 'Auspice' then base = base + 180 end
if spell.name:startswith("Boost") then base = base + 300 end
if spell.name == 'Phalanx' then base = base + 180 end
if spell.name:startswith("Protect") then base = base + 1800 end
if spell.name:startswith("Shell") then base = base + 1800 end
if spell.name:startswith("Refresh") then base = base + 150 end
if spell.name:startswith("Regen") then
base = base + 60
if buffactive['Light arts'] and player.main_job == 'SCH' then
base = base*2+60
-----the *2 here is the additional 60sec from Light Arts job points maxed
-----+48 is from light arts, +12 more from telchine chas.
elseif player.main_job == 'WHM' then
base = base + 60
if player.equipment.Hands == 'Ebers Mitts' then
base = base + 20
elseif player.equipment.Hands == 'Ebers Mitts +1' then
base = base + 22
end
if player.equipment.Legs == 'Theo. Pantaloons' or player.equipment.Legs == 'Theo. Pant. +1' then
base = base + 18
end
end
end
if spell.name == 'Adloquium' then base = base + 180 end
if spell.name:startswith("Animus") then base = base + 180 end
if spell.name == 'Crusade' then base = base + 300 end
if spell.name == 'Embrava' then base = base + 90 end
if spell.name:startswith("En") then base = base + 180 end
if spell.name:startswith("Flurry") then base = base + 180 end
if spell.name == 'Foil' then base = base + 30 end
if spell.name:startswith("Gain") then base = base + 180 end
if spell.name == 'Reprisal' then base = base + 60 end
if spell.name:startswith("Temper") then base = base + 180 end
if string.find(spell.english,'Spikes') then base = base + 180 end
if buffactive['Perpetuance'] then
if player.equipment.Hands == 'Arbatel Bracers' then
mult = mult*2.5
elseif player.equipment.Hands == 'Arbatel Bracers +1' then
mult = mult*2.55
else
mult = mult*2
end
end
if buffactive['Composure'] then
if spell.target.type == 'SELF' then
mult = mult*3
else
mult = mult
end
end
local totalDuration = math.floor(mult*base)
return totalDuration
end
function reset_timers()
for i,v in pairs(custom_timers) do
send_command('timers delete "'..i..'"')
end
custom_timers = {}
end