Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include('no_interruptions.lua')
- include('spam_protection.lua')
- include('common_commands.lua')
- include('spell_stack.lua')
- include('how_about_no')
- --Spell Stack Settings
- --Use auto curing true|false
- doCures = false
- --Use Divine Caress automatically true|false
- autoCaress = false
- --Use status cures and ally buffs on alliance true|false
- allianceCheck = false
- --Use cures on alliance true|false
- allianceHeal = false
- --Use Stoneskin automatically true|false
- autoSS = false
- --Use Blink automatically true|false
- autoBlink = false
- --Use Sublimation automatically true|false
- autoSub = false
- --Use Phalanx automatically true|false
- autoPhalanx = false
- --Use Aquaveil automatically true|false
- autoAquaveil = false
- lastChat = 0
- afBodyPercent = 70
- valid_controllers = T{'Miang','Mazuki','Norzu','Ulor'}
- function get_sets()
- indiOn = false
- geoOn = false
- repeatSpell = T{'Indi-Acumen','Indi-INT'}
- geoRepeatSpell = T{'Geo-Focus'}
- entrustTarget = 'Miang'
- entrustOn = false
- lastCast = 0
- sibyl = false
- kuyin = false
- CurrentElement = 'Thunder'
- CurrentElementa = 'Thundara'
- helixName = 'Ionohelix'
- stormName = 'Thunderstorm'
- autoNuke = false
- aoeSpell = false
- spellAcc = 'Low'
- indiSpells = T{}
- indiSpells['Indi-Regen'] = 539
- indiSpells['Indi-Refresh'] = 541
- indiSpells['Indi-STR'] = 542
- indiSpells['Indi-DEX'] = 543
- indiSpells['Indi-VIT'] = 544
- indiSpells['Indi-AGI'] = 545
- indiSpells['Indi-INT'] = 546
- indiSpells['Indi-MND'] = 547
- indiSpells['Indi-CHR'] = 548
- indiSpells['Indi-Fury'] = 549
- indiSpells['Indi-Barrier'] = 550
- indiSpells['Indi-Acumen'] = 551
- indiSpells['Indi-Fend'] = 552
- indiSpells['Indi-Precision'] = 553
- indiSpells['Indi-Voidance'] = 554
- indiSpells['Indi-Focus'] = 555
- indiSpells['Indi-Attunement'] = 556
- indiSpells['Indi-Haste'] = 580
- indiSpells['Indi-Languor'] = -1
- indiSpells['Indi-Malaise'] = -1
- indiSpells['Indi-Wilt'] = -1
- indiSpells['Indi-Frailty'] = -1
- indiSpells['Indi-Fade'] = -1
- indiSpells['Indi-Vex'] = -1
- indiSpells['Indi-Slip'] = -1
- indiSpells['Indi-Torpor'] = -1
- indiSpells['Indi-Slow'] = -1
- indiSpells['Indi-Slow'] = -1
- indiSpells['Indi-Paralysis'] = -1
- indiSpells['Indi-Gravity'] = -1
- indiSpells['Indi-Poison'] = -1
- indiSpellShortnames = T{regen = 'Indi-Regen',
- refresh = 'Indi-Refresh',
- str = 'Indi-STR',
- dex = 'Indi-DEX',
- agi = 'Indi-AGI',
- int = 'Indi-INT',
- mnd = 'Indi-MND',
- chr = 'Indi-CHR',
- att = 'Indi-Fury',
- fury = 'Indi-Fury',
- def = 'Indi-Barrier',
- barrier = 'Indi-Barrier',
- mab = 'Indi-Acumen',
- acumen = 'Indi-Acumen',
- matt = 'Indi-Acumen',
- mdb = 'Indi-Fend',
- fend = 'Indi-Fend',
- mdef = 'Indi-Fend',
- acc = 'Indi-Precision',
- precision = 'Indi-Precision',
- eva = 'Indi-Voidance',
- voidance = 'Indi-Voidance',
- macc = 'Indi-Focus',
- focus = 'Indi-Focus',
- meva = 'Indi-Attunement',
- attunement = 'Indi-Attunement',
- haste = 'Indi-Haste',
- mdefdown = 'Indi-Malaise',
- defdown = 'Indi-Frailty',
- mevadown = 'Indi-Languor',
- attdown = 'Indi-Wilt',
- mabdown = 'Indi-Fade',
- mattdown = 'Indi-Fade',
- maccdown = 'Indi-Vex',
- accdown = 'Indi-Slip',
- evadown = 'Indi-Torpor',
- slow = 'Indi-Slow',
- para = 'Indi-Paralysis',
- gravity = 'Indi-Gravity',
- weight = 'Indi-Gravity',
- poison = 'Indi-Poison',
- }
- geoSpellShortnames = T{ regen = {spell='Geo-Regen',type='player'},
- refresh = {spell='Geo-Refresh',type='player'},
- str = {spell='Geo-STR',type='player'},
- dex = {spell='Geo-DEX',type='player'},
- agi = {spell='Geo-AGI',type='player'},
- int = {spell='Geo-INT',type='player'},
- mnd = {spell='Geo-MND',type='player'},
- chr = {spell='Geo-CHR',type='player'},
- att = {spell='Geo-Fury',type='player'},
- fury = {spell='Geo-Fury',type='player'},
- def = {spell='Geo-Barrier',type='player'},
- barrier = {spell='Geo-Barrier',type='player'},
- mab = {spell='Geo-Acumen',type='player'},
- acumen = {spell='Geo-Acumen',type='player'},
- matt = {spell='Geo-Acumen',type='player'},
- mdb = {spell='Geo-Fend',type='player'},
- fend = {spell='Geo-Fend',type='player'},
- mdef = {spell='Geo-Fend',type='player'},
- acc = {spell='Geo-Precision',type='player'},
- precision = {spell='Geo-Precision',type='player'},
- eva = {spell='Geo-Voidance',type='player'},
- voidance = {spell='Geo-Voidance',type='player'},
- macc = {spell='Geo-Focus',type='player'},
- focus = {spell='Geo-Focus',type='player'},
- meva = {spell='Geo-Attunement',type='player'},
- attunement = {spell='Geo-Attunement',type='player'},
- haste = {spell='Geo-Haste',type='player'},
- mdefdown = {spell='Geo-Malaise',type='bt'},
- defdown = {spell='Geo-Frailty',type='bt'},
- mevadown = {spell='Geo-Languor',type='bt'},
- attdown = {spell='Geo-Wilt',type='bt'},
- mabdown = {spell='Geo-Fade',type='bt'},
- mattdown = {spell='Geo-Fade',type='bt'},
- maccdown = {spell='Geo-Vex',type='bt'},
- accdown = {spell='Geo-Slip',type='bt'},
- evadown = {spell='Geo-Torpor',type='bt'},
- slow = {spell='Geo-Slow',type='bt'},
- para = {spell='Geo-Paralysis',type='bt'},
- gravity = {spell='Geo-Gravity',type='bt'},
- weight = {spell='Geo-Gravity',type='bt'},
- poison = {spell='Geo-Poison',type='bt'},
- }
- lastHealSent = os.clock()
- send_command('input /macro book 2;')
- include('gear/Lenus_GEO.lua')
- end
- function pretarget(spell)
- if spell.skill == 'Elemental Magic' then
- if spell.english:sub(-2) == 'ra III' then
- pretargRecastData = windower.ffxi.get_spell_recasts()
- if (player.mp >= spell.mp_cost) and pretargRecastData[spell.recast_id] ~= nil and pretargRecastData[spell.recast_id] > 60 then
- cancel_spell()
- newSpell = spell.english:gsub(spell.english:sub(-2),"ra II")
- send_command('input /ma "'..newSpell..'" <t>;')
- end
- elseif spell.english:sub(-6) == 'ra II' then
- pretargRecastData = windower.ffxi.get_spell_recasts()
- if (player.mp >= spell.mp_cost) and pretargRecastData[spell.recast_id] ~= nil and pretargRecastData[spell.recast_id] > 60 then
- cancel_spell()
- newSpell = spell.english:gsub(spell.english:sub(-6),"ra")
- send_command('input /ma "'..newSpell..'" <t>;')
- end
- elseif spell.english:sub(-2) == ' V' then
- pretargRecastData = windower.ffxi.get_spell_recasts()
- if (player.mp >= spell.mp_cost) and pretargRecastData[spell.recast_id] ~= nil and pretargRecastData[spell.recast_id] > 60 then
- cancel_spell()
- newSpell = spell.english:gsub(spell.english:sub(-2)," IV")
- send_command('input /ma "'..newSpell..'" <t>;')
- end
- elseif spell.english:sub(-3) == ' IV' then
- pretargRecastData = windower.ffxi.get_spell_recasts()
- if (player.mp >= spell.mp_cost) and pretargRecastData[spell.recast_id] ~= nil and pretargRecastData[spell.recast_id] > 60 then
- cancel_spell()
- newSpell = spell.english:gsub(spell.english:sub(-3)," III")
- send_command('input /ma "'..newSpell..'" <t>;')
- end
- elseif spell.english:sub(-3) == 'III' then
- pretargRecastData = windower.ffxi.get_spell_recasts()
- if (player.mp >= spell.mp_cost) and pretargRecastData[spell.recast_id] ~= nil and pretargRecastData[spell.recast_id] > 60 then
- cancel_spell()
- newSpell = spell.english:gsub(spell.english:sub(-3)," II")
- send_command('input /ma "'..newSpell..'" <t>;')
- end
- elseif spell.english:sub(-3) == ' II' then
- pretargRecastData = windower.ffxi.get_spell_recasts()
- if (player.mp >= spell.mp_cost) and pretargRecastData[spell.recast_id] ~= nil and pretargRecastData[spell.recast_id] > 60 then
- cancel_spell()
- newSpell = spell.english:gsub(spell.english:sub(-3),"")
- send_command('input /ma "'..newSpell..'" <t>;')
- end
- end
- end
- end
- function precast(spell,action)
- if check_ready(spell) then
- if spell.type == 'WeaponSkill' then
- if spell.target.distance > 10 or player.tp < 900 then
- cancel_spell()
- return
- end
- if sets[spell.english] then
- equip(sets[spell.english])
- end
- windower.add_to_chat(050, '['..spell.name..'] '..spell.target.name..' <'..player.tp..'%>')
- elseif spell.type == 'JobAbility' and sets.precast[spell.english] then
- equip(sets.precast[spell.english])
- elseif spell.type == 'Geomancy' then
- equip(sets.precast['Geomancy'])
- elseif spell.type == 'WhiteMagic' then
- if string.find(spell.english,'Cure') then
- equip(sets.precast['CureSet'])
- else
- equip(sets.precast['General'])
- end
- elseif spell.type == 'BlackMagic' then
- if spell.english == 'Impact' then
- equip(sets.precast['Impact'])
- else
- equip(sets.precast['General'])
- end
- else
- equip(sets.precast['General'])
- end
- spam_protection_on(spell)
- else
- cancel_spell()
- end
- end
- function midcast(spell,action)
- equipSet = sets.midcast['General']
- if spell.type == 'Ninjutsu' then
- if spell.english == 'Utsusemi: Ichi' then
- if buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
- equip(sets['UtsuSet'])
- send_command('wait 1.5;cancel 66;cancel 446;cancel 445;cancel 444;')
- end
- elseif spell.english == 'Utsusemi: Ni' then
- equip(sets['UtsuSet'])
- elseif spell.type == 'Trust' then
- equip(sets['Trust'])
- end
- elseif spell.type == 'Geomancy' then
- equipSet = sets.midcast['Geomancy']
- elseif spell.type == 'WhiteMagic' then
- if string.find(spell.english,'Cure') then
- equipSet = sets.midcast['CureSet']
- elseif spell.skill == 'Enhancing Magic' then
- if spell.english == 'Stoneskin' then
- equipSet = sets.midcast['Stoneskin']
- elseif spell.english == 'Aquaveil' then
- equipSet = sets.midcast['Aquaveil']
- elseif spell.english == 'Haste' or spell.english == 'Invisible' or spell.english == 'Sneak' or spell.english:sub(-5) == 'storm' or spell.english:sub(-8) == 'storm II' or spell.english:sub(4) == 'Prot' or spell.english:sub(4) == 'Shel' or spell.english == 'Adloquium' or spell.english:sub(-6) == 'Animus' or spell.english == 'Blink' or spell.english == 'Refresh' then
- equipSet = sets.midcast['General']
- else
- equipSet = sets.midcast['Enhancing Magic']
- end
- elseif spell.skill == 'Enfeebling Magic' then
- equipSet = sets.midcast['Enfeebling Magic']
- end
- elseif spell.type == 'BlackMagic' then
- if spell.english == 'Drain' or spell.english == 'Drain II' or spell.english == 'Aspir' or spell.english == 'Aspir II' then
- equipSet = sets.midcast[spellAcc]['Drain']
- elseif spell.skill == 'Enfeebling Magic' then
- equipSet = sets.midcast['Enfeebling Magic']
- elseif spell.english == 'Impact' then
- equipSet = sets.midcast['Impact']
- elseif spell.skill == 'Elemental Magic' then
- equipSet = sets.midcast[spellAcc]['Elemental Magic']
- if buffactive['Reive Mark'] then
- equipSet = set_combine(equipSet, {neck="Arciela's Grace +1"})
- end
- if (((player.mp-spell.mp_cost)/player.max_mp)*100) < afBodyPercent then
- equipSet = set_combine(equipSet, sets['lowMpNuke'])
- end
- end
- elseif spell.type == 'Trust' then
- equipSet = set_combine(equipSet, sets['Trust'])
- end
- equip(equipSet)
- end
- function aftercast(spell,action)
- if spam_protection_off(spell)then
- handle_idle()
- end
- checkAftercast(spell)
- end
- function status_change(new,old)
- handle_idle()
- end
- function buff_change(buff,gain_or_loss)
- if gain_or_loss then
- if buff == 'Aftermath: Lv.3' then
- send_command('timers c "AM3" 180 up "Aftermath"')
- elseif buff == 'Aftermath: Lv.2' then
- send_command('timers c "AM2" 180 up "Aftermath"')
- elseif buff == 'Aftermath: Lv.1' then
- send_command('timers c "AM1" 180 up "Aftermath"')
- end
- if buff == 'weakness' then
- send_command('timers c "Weakness" 300 up "Weakness"')
- end
- else
- if buff == 'Aftermath: Lv.3' then
- send_command('timers d "AM3"')
- elseif buff == 'Aftermath: Lv.2' then
- send_command('timers d "AM2"')
- elseif buff == 'Aftermath: Lv.1' then
- send_command('timers d "AM1"')
- elseif buff == 'encumbrance' then
- windower.send_command('gs c dt_end;')
- end
- if buff == 'weakness' then
- send_command('timers d "Weakness"')
- end
- end
- end
- function handle_idle()
- if player.status == 'Engaged' then
- equipSet = sets['Melee']
- elseif player.status == 'Resting' then
- equipSet = sets['Resting']
- if player.mpp < 50 then
- equipSet = set_combine(equipSet, sets['mpBelt'])
- end
- else
- equipSet = set_combine(sets['DT'],sets['BolelabungaSet'], sets['Running'])
- if player.mpp < 50 then
- equipSet = set_combine(equipSet, sets['mpBelt'])
- end
- end
- if buffactive['Reive Mark'] then
- equipSet = set_combine(equipSet, {neck="Arciela's Grace +1"})
- end
- if pet.isvalid then
- equipSet = set_combine(equipSet, sets['Luopan_DT'])
- end
- equip(equipSet)
- end
- function self_command(command)
- if execute_common_command(command) then
- --done
- elseif command:slice(1,8) == 'nuke_req' then
- command = command:gsub("nuke_req ","")
- if command ~= nil and string.len(command) > 0 then
- local nuke_request = T{}
- local counter = 1
- for w in string.gmatch(command, "%w+") do
- nuke_request[counter] = w
- counter = counter + 1
- end
- if nuke_request[1] ~= nil then
- self_command('element '..nuke_request[1])
- if (nuke_request[2] == 'single' or nuke_request[2] == 'aoe') and nuke_request[3] ~= nil then
- local request_test = windower.ffxi.get_mob_by_id(nuke_request[3])
- if request_test ~= nil and request_test.id ~= nil then
- if nuke_request[2] ~= 'single' and request_test.distance <= 144 then
- if player.mp > 700 and is_spell_ready(CurrentElementa..' III') and request_test.hpp > 20 then
- send_command('//'..CurrentElementa..'3 '..nuke_request[3])
- elseif is_spell_ready(CurrentElementa..' II') then
- send_command('//'..CurrentElementa..'2 '..nuke_request[3])
- elseif is_spell_ready(CurrentElementa) then
- send_command('//'..CurrentElementa..' '..nuke_request[3])
- end
- else
- if is_spell_ready(CurrentElement..' V') then
- send_command('//'..CurrentElement..'5 '..nuke_request[3])
- elseif is_spell_ready(CurrentElement..' IV') then
- send_command('//'..CurrentElement..'4 '..nuke_request[3])
- elseif is_spell_ready(CurrentElement..' III') then
- send_command('//'..CurrentElement..'3 '..nuke_request[3])
- elseif is_spell_ready(CurrentElement..' II') then
- send_command('//'..CurrentElement..'2 '..nuke_request[3])
- elseif is_spell_ready(CurrentElement) then
- send_command('//'..CurrentElement..' '..nuke_request[3])
- end
- end
- end
- end
- end
- end
- elseif command == 'indi' then
- if indiOn then
- indiOn = false
- windower.add_to_chat(050,'Not using Indi- spells automatically')
- else
- indiOn = true
- windower.add_to_chat(050,'Using Indi- spells automatically')
- end
- elseif command == 'geo' then
- if geoOn then
- geoOn = false
- windower.add_to_chat(050,'Not using Geo- spells automatically')
- else
- geoOn = true
- windower.add_to_chat(050,'Using Geo- spells automatically')
- end
- elseif command == 'nuke' or command == 'autonuke' then
- if autoNuke then
- autoNuke = false
- windower.add_to_chat(050,'Not using nukes automatically (When engaged)')
- else
- autoNuke = true
- windower.add_to_chat(050,'Using nukes automatically (When engaged)')
- end
- elseif command == 'aoenuke' or command == 'aoe' then
- if aoeSpell then
- aoeSpell = false
- windower.add_to_chat(050,'Not using AoE nukes (When engaged)')
- else
- aoeSpell = true
- windower.add_to_chat(050,'Using AoE nukes (When engaged)')
- end
- elseif command == 'entruston' then
- if entrustOn then
- entrustOn = false
- windower.add_to_chat(050,'Not using Entrust automatically')
- else
- entrustOn = true
- windower.add_to_chat(050,'Using Entrust automatically')
- end
- elseif command:sub(1,9) == 'indispell' then
- commandSplit = T{}
- command = command:gsub("[%w ]+","%1")
- command = command:lower()
- if #command > 9 then
- command = command:sub(9,#command)
- commandSplit = string.split(command," ")
- table.clear(repeatSpell)
- j = 1
- for i=1, #commandSplit, 1 do
- for shortcutName,shortcutSpellName in pairs(indiSpellShortnames) do
- if commandSplit[i] and commandSplit[i] == shortcutName then
- repeatSpell[j] = shortcutSpellName
- j = j + 1
- windower.add_to_chat(050,'Adding '..shortcutSpellName)
- end
- end
- end
- end
- elseif command:sub(1,8) == 'geospell' then
- commandSplit = T{}
- command = command:gsub("[%w ]+","%1")
- command = command:lower()
- if #command > 8 then
- command = command:sub(10,#command)
- geoRepeatSpell = false
- if command ~= '' then
- for shortcutName,shortcutSpell in pairs(geoSpellShortnames) do
- if command == shortcutName then
- geoRepeatSpell = shortcutSpell
- windower.add_to_chat(050,'Using '..shortcutSpell.spell)
- break
- end
- end
- end
- end
- elseif command:sub(1,7) == 'entrust' then
- command = command:gsub("entrust ", "")
- if #command > 0 then
- targetFound = checkName(command)
- if targetFound ~= '' and targetFound ~= player.name then
- entrustTarget = targetFound
- windower.add_to_chat(050,'Entrust target now ['..entrustTarget..']')
- else
- print('Player not found in party')
- end
- end
- elseif command == 'sneak' then
- send_command('input /ma "Sneak" <me>')
- elseif command == 'invisible' then
- send_command('input /ma "Invisible" <me>')
- elseif command == 'ws' and player.status == 'Engaged' and player.tp >= 1000 then
- send_command('input /ws "Full Swing" <t>;')
- elseif command:sub(1,7) == 'element' then
- targetElement = command:gsub("element ", "")
- targetElement = targetElement:gsub(" ", "")
- targetElement = targetElement:lower()
- if targetElement == 'water' then
- CurrentElement = 'Water'
- CurrentElementa = 'Watera'
- helixName = 'Hydrohelix'
- stormName = 'Rainstorm'
- windower.add_to_chat(167,"Water Mode")
- elseif targetElement == 'thunder' then
- CurrentElement = 'Thunder'
- CurrentElementa = 'Thundara'
- helixName = 'Ionohelix'
- stormName = 'Thunderstorm'
- windower.add_to_chat(167,"Thunder Mode")
- elseif targetElement == 'stone' then
- CurrentElement = 'Stone'
- CurrentElementa = 'Stonera'
- helixName = 'Geohelix'
- stormName = 'Sandstorm'
- windower.add_to_chat(167,"Stone Mode")
- elseif targetElement == 'aero' then
- CurrentElement = 'Aero'
- CurrentElementa = 'Aerora'
- helixName = 'Anemohelix'
- stormName = 'Rainstorm'
- windower.add_to_chat(167,"Aero Mode")
- elseif targetElement == 'blizzard' then
- CurrentElement = 'Blizzard'
- CurrentElementa = 'Blizzara'
- helixName = 'Cryohelix'
- stormName = 'Hailstorm'
- windower.add_to_chat(167,"Blizzard Mode")
- elseif targetElement == 'fire' then
- CurrentElement = 'Fire'
- CurrentElementa = 'Fira'
- helixName = 'Pyrohelix'
- stormName = 'Firestorm'
- windower.add_to_chat(167,"Fire Mode")
- end
- elseif command == 'trigger1' or command == 'next_element' then
- if CurrentElement == 'Water' then
- CurrentElement = 'Fire'
- CurrentElementa = 'Fira'
- helixName = 'Pyrohelix'
- stormName = 'Firestorm'
- windower.add_to_chat(167,"Fire Mode")
- elseif CurrentElement == 'Thunder' then
- CurrentElement = 'Water'
- CurrentElementa = 'Watera'
- helixName = 'Hydrohelix'
- stormName = 'Rainstorm'
- windower.add_to_chat(167,"Water Mode")
- elseif CurrentElement == 'Stone' then
- CurrentElement = 'Thunder'
- CurrentElementa = 'Thundara'
- helixName = 'Ionohelix'
- stormName = 'Thunderstorm'
- windower.add_to_chat(167,"Thunder Mode")
- elseif CurrentElement == 'Aero' then
- CurrentElement = 'Stone'
- CurrentElementa = 'Stonera'
- helixName = 'Geohelix'
- stormName = 'Sandstorm'
- windower.add_to_chat(167,"Stone Mode")
- elseif CurrentElement == 'Blizzard' then
- CurrentElement = 'Aero'
- CurrentElementa = 'Aerora'
- helixName = 'Anemohelix'
- stormName = 'Rainstorm'
- windower.add_to_chat(167,"Aero Mode")
- elseif CurrentElement == 'Fire' then
- CurrentElement = 'Blizzard'
- CurrentElementa = 'Blizzara'
- helixName = 'Cryohelix'
- stormName = 'Hailstorm'
- windower.add_to_chat(167,"Blizzard Mode")
- end
- elseif command == 'rtrigger1' or command == 'prev_element' then
- if CurrentElement == 'Water' then
- CurrentElement = 'Thunder'
- CurrentElementa = 'Thundara'
- helixName = 'Ionohelix'
- stormName = 'Thunderstorm'
- windower.add_to_chat(167,"Thunder Mode")
- elseif CurrentElement == 'Thunder' then
- CurrentElement = 'Stone'
- CurrentElementa = 'Stonera'
- helixName = 'Geohelix'
- stormName = 'Sandstorm'
- windower.add_to_chat(167,"Stone Mode")
- elseif CurrentElement == 'Stone' then
- CurrentElement = 'Aero'
- CurrentElementa = 'Aerora'
- helixName = 'Anemohelix'
- stormName = 'Windstorm'
- windower.add_to_chat(167,"Aero Mode")
- elseif CurrentElement == 'Aero' then
- CurrentElement = 'Blizzard'
- CurrentElementa = 'Blizzara'
- helixName = 'Cryohelix'
- stormName = 'Hailstorm'
- windower.add_to_chat(167,"Blizzard Mode")
- elseif CurrentElement == 'Blizzard' then
- CurrentElement = 'Fire'
- CurrentElementa = 'Fira'
- helixName = 'Pyrohelix'
- stormName = 'Firestorm'
- windower.add_to_chat(167,"Fire Mode")
- elseif CurrentElement == 'Fire' then
- CurrentElement = 'Water'
- CurrentElementa = 'Watera'
- helixName = 'Hydrohelix'
- stormName = 'Rainstorm'
- windower.add_to_chat(167,"Water Mode")
- end
- elseif command == 'tier1' or command == 't1' then
- if nukeType == 'single' then
- send_command('input /ma "'..CurrentElement..'" <t>;')
- else
- send_command('input /ma "'..CurrentElementa..'" <t>;')
- end
- if mirror_nuke then
- local target_info = windower.ffxi.get_mob_by_target('t')
- if type(target_info) == 'table' and target_info.id ~= nil then
- if nukeType == 'single' then
- execute_common_command('mirror ele '..CurrentElement..' single '..target_info.id)
- else
- execute_common_command('mirror ele '..CurrentElement..' aoe '..target_info.id)
- end
- end
- end
- elseif command == 'trigger3' or command == 'tier2' or command == 't2' then
- if nukeType == 'single' then
- send_command('input /ma "'..CurrentElement..' II" <t>;')
- else
- send_command('input /ma "'..CurrentElementa..' II" <t>;')
- end
- if mirror_nuke then
- local target_info = windower.ffxi.get_mob_by_target('t')
- if type(target_info) == 'table' and target_info.id ~= nil then
- if nukeType == 'single' then
- execute_common_command('mirror ele '..CurrentElement..' single '..target_info.id)
- else
- execute_common_command('mirror ele '..CurrentElement..' aoe '..target_info.id)
- end
- end
- end
- elseif command == 'trigger4' or command == 'tier3' or command == 't3' then
- if nukeType == 'single' then
- send_command('input /ma "'..CurrentElement..' III" <t>;')
- else
- send_command('input /ma "'..CurrentElementa..' III" <t>;')
- end
- if mirror_nuke then
- local target_info = windower.ffxi.get_mob_by_target('t')
- if type(target_info) == 'table' and target_info.id ~= nil then
- if nukeType == 'single' then
- execute_common_command('mirror ele '..CurrentElement..' single '..target_info.id)
- else
- execute_common_command('mirror ele '..CurrentElement..' aoe '..target_info.id)
- end
- end
- end
- elseif command == 'trigger5' or command == 'tier4' or command == 't4' then
- if nukeType == 'single' then
- send_command('input /ma "'..CurrentElement..' IV" <t>;')
- end
- if mirror_nuke then
- local target_info = windower.ffxi.get_mob_by_target('t')
- if type(target_info) == 'table' and target_info.id ~= nil then
- if nukeType == 'single' then
- execute_common_command('mirror ele '..CurrentElement..' single '..target_info.id)
- else
- execute_common_command('mirror ele '..CurrentElement..' aoe '..target_info.id)
- end
- end
- end
- elseif command == 'trigger6' or command == 'tier5' or command == 't5' then
- send_command('input /ma "'..CurrentElement..' V" <t>;')
- if mirror_nuke then
- local target_info = windower.ffxi.get_mob_by_target('t')
- if type(target_info) == 'table' and target_info.id ~= nil then
- execute_common_command('mirror ele '..CurrentElement..' single '..target_info.id)
- end
- end
- elseif stack_command(command) then
- --done
- end
- end
- function handle_ping()
- if buffactive['petrification'] then
- if os.clock()-lastChat > 10 then
- send_command('input /p stoned')
- lastChat = os.clock()
- end
- elseif buffactive['sleep'] then
- if os.clock()-lastChat > 10 then
- send_command('input /p zzz')
- lastChat = os.clock()
- end
- end
- if check_ready_silent() and player.x == lastx and player.y == lasty then
- if buffactive['silence'] and os.clock()-lastChat > 5 then
- send_command('input /item "Echo Drops" <me>;')
- lastChat = os.clock()
- end
- if autoNuke and player.status == 'Engaged' and player.mp > 250 then
- if aoeSpell and is_spell_ready(CurrentElementa..' II') then
- direct_push(CurrentElementa..' II', 'ma', 't', false)
- elseif is_spell_ready(CurrentElement..' V') then
- direct_push(CurrentElement..' V', 'ma', 't', false)
- elseif is_spell_ready(CurrentElement..' IV') then
- direct_push(CurrentElement..' IV', 'ma', 't', false)
- elseif is_spell_ready(CurrentElement..' III') then
- direct_push(CurrentElement..' III', 'ma', 't', false)
- elseif aoeSpell and is_spell_ready(CurrentElementa) then
- direct_push(CurrentElementa, 'ma', 't', false)
- elseif is_spell_ready(CurrentElement..' II') then
- direct_push(CurrentElement..' II', 'ma', 't', false)
- elseif is_spell_ready(CurrentElement) then
- direct_push(CurrentElement, 'ma', 't', false)
- end
- end
- if indiOn and #repeatSpell > 0 then
- if repeatSpell[1] == 'Indi-Acumen' then
- sibyl = false
- for i,v in pairs(partyData) do
- if type(v) == 'table' and partyData[i].name == 'StarSibyl' then
- sibyl = true
- end
- end
- if (sibyl and (buffactive[indiSpells[repeatSpell[1]]] == 0 or buffactive[indiSpells[repeatSpell[1]]] == 1)) or (not sibyl and not buffactive[indiSpells[repeatSpell[1]]]) and os.clock()-lastCast > 60 and is_spell_ready(repeatSpell[1]) then
- direct_push_front(repeatSpell[1], 'ma', player.name, false)
- lastCast = os.clock()
- elseif entrustOn and #repeatSpell > 1 and #entrustTarget > 0 and is_spell_ready(repeatSpell[2]) and is_ability_ready('Entrust') and checkRange(entrustTarget,true) then
- direct_push_front(repeatSpell[2], 'ma', entrustTarget, false)
- direct_push_front('Entrust', 'ja', player.name, false)
- end
- elseif repeatSpell[1] == 'Indi-Precision' then
- kuyin = false
- for i,v in pairs(partyData) do
- if type(v) == 'table' and partyData[i].name == 'KuyinHathdenna' then
- kuyin = true
- end
- end
- if (kuyin and (buffactive[indiSpells[repeatSpell[1]]] == 0 or buffactive[indiSpells[repeatSpell[1]]] == 1)) or (not kuyin and not buffactive[indiSpells[repeatSpell[1]]]) and os.clock()-lastCast > 60 and is_spell_ready(repeatSpell[1]) then
- direct_push_front(repeatSpell[1], 'ma', player.name, false)
- lastCast = os.clock()
- elseif entrustOn and #repeatSpell > 1 and #entrustTarget > 0 and is_spell_ready(repeatSpell[2]) and is_ability_ready('Entrust') and checkRange(entrustTarget,true) then
- direct_push_front(repeatSpell[2], 'ma', entrustTarget, false)
- direct_push_front('Entrust', 'ja', player.name, false)
- end
- else
- if indiSpells[repeatSpell[1]] == -1 and player.indi == nil then
- direct_push_front(repeatSpell[1], 'ma', player.name, false)
- elseif indiSpells[repeatSpell[1]] > 0 and not buffactive[indiSpells[repeatSpell[1]]] and is_spell_ready(repeatSpell[1]) then
- direct_push_front(repeatSpell[1], 'ma', player.name, false)
- elseif entrustOn and #repeatSpell > 1 and #entrustTarget > 0 and is_spell_ready(repeatSpell[2]) and is_ability_ready('Entrust') and checkRange(entrustTarget,true) then
- direct_push_front(repeatSpell[2], 'ma', entrustTarget, false)
- direct_push_front('Entrust', 'ja', player.name, false)
- end
- end
- end
- if geoOn and geoRepeatSpell ~= false then
- if not pet.isvalid then
- if geoRepeatSpell.type == 'bt' and player.in_combat then
- direct_push_front(geoRepeatSpell.spell, 'ma', 't', false)
- elseif geoRepeatSpell.type == 'player' then
- direct_push_front(geoRepeatSpell.spell, 'ma', player.name, false)
- end
- else
- if geoRepeatSpell.type == 'player' then
- local tempx = player.x-pet.x
- local tempy = player.y-pet.y
- if math.sqrt((tempx*tempx)+(tempy*tempy)) > 7 then
- direct_push('Full Circle', 'ja', player.name, false)
- end
- end
- end
- end
- if player.sub_job == 'NIN' and not buffactive['Copy Image (2)'] and not buffactive['Copy Image (3)'] and not buffactive['Copy Image (4)'] then
- if is_spell_ready('Utsusemi: Ni') then
- direct_push_front('Utsusemi: Ni', 'ma', player.name, false)
- elseif is_spell_ready('Utsusemi: Ichi') then
- direct_push_front('Utsusemi: Ichi', 'ma', player.name, false)
- end
- end
- if buffactive['doom'] or buffactive['curse'] and is_spell_ready('Cursna') then
- direct_push_front('Cursna', 'ma', player.name, true)
- end
- if buffactive['poison'] then
- direct_push('Poisona', 'ma', player.name, true)
- end
- if player.sub_job_level > 0 and player.sub_job == 'WHM' then
- if not buffactive['reraise'] and recastData[spellIDs['Reraise']] == 0 and player.mp > spellCosts['Reraise'] then
- direct_push('Reraise', 'ma', player.name, true)
- end
- if autoSS and not buffactive['stoneskin'] and is_spell_ready('Stoneskin') then
- direct_push('Stoneskin', 'ma', player.name, true)
- end
- if autoBlink and not buffactive['Blink'] and is_spell_ready('Blink') then
- direct_push('Blink', 'ma', player.name, true)
- end
- if autoAquaveil and not buffactive['Aquaveil'] and is_spell_ready('Aquaveil') then
- direct_push('Aquaveil', 'ma', player.name, true)
- end
- end
- if player.in_combat then
- direct_push('Fira', 'ma', 't', true)
- end
- check_auto_spell()
- if doCures then
- cure_process()
- end
- showArrayContents()
- handleSpareTime()
- else
- lastx = player.x
- lasty = player.y
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement