Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Initialization function for this job file.
- function get_sets()
- send_command('wait 1;input /lockstyleset 4')
- TP_Index = 1
- SingleWS = S{'Savage Blade', 'Judgment'}
- MultiWS = S{'Stardiver', 'Resolution', 'Evisceration'}
- ElementalWS = S{'Raiden Thrust', 'Thunder Thrust', 'Frostbite', 'Freezebite', 'Herculean Slash', 'Flash Nova', 'Sanguine Blade'}
- sets.precast = {}
- sets.precast.Berserk = {body="Pumm. Lorica +1", feet="Agoge Calligae +1"}
- sets.precast.Aggressor = {head="Pumm. Mask +1", body="Agoge Lorica +1"}
- sets.precast.Warcry = {head="Agoge Mask +1"}
- sets.precast.Tomahawk = {head="Agoge Mask +1"}
- sets.precast['Mighty Strikes'] = {hands="Agoge Mufflers +1"}
- sets.precast.Fastcast = {ammo="Impatiens", neck="Orunmila's Torque", ear1="Etiolation Earring", ear2="Loquac. Earring", hands="Leyline Gloves", ring1="Weather. Ring"}
- sets.aftercast = {ammo="Staunch Tathlum", head="Valorous Mask", neck="Loricate Torque +1", ear1="Etiolation Earring", body="Sulevia's Plate. +1", hands="Sulev. Gauntlets +1", ring1="Shadow Ring", ring2="Fortified Ring", legs="Sulevi. Cuisses +1", feet="Sulev. Leggings +1", back="Xucau Mantle"}
- sets.dt = {ammo="Staunch Tathlum", head="Sulevia's Mask +1", neck="Loricate Torque +1", ear1="Etiolation Earring", body="Sulevia's Plate. +1", hands="Sulev. Gauntlets +1", ring1="Shadow Ring", ring2="Fortified Ring", legs="Sulevi. Cuisses +1", feet="Sulev. Leggings +1", back="Xucau Mantle"}
- TP_Set = {"Normal", "Acc", "High"}
- sets.engaged = {}
- sets.engaged.Normal = {ammo="Ginsen", head={name="Valorous Mask", augments={"AGI+8"}}, ear1="Cessance Earring", ear2="Brutal Earring", neck="Asperity Necklace", body={name="Valorous Mail", augments={"MND+5"}}, hands="Sulev. Gauntlets +1", ring1="Chirich Ring", ring2="Chirich Ring", waist="Ioskeha Belt", legs={name="Odyssean Cuisses", augments={"STR+2"}}, feet={name="Valorous Greaves", augments={"INT+1"}}, back={name="Cichol's Mantle", augments={'DEX+20',}}}
- sets.engaged.Acc = set_combine(sets.engaged.Normal, {neck="Subtlety Spec.", ear1="Digni. Earring", ear2="Zennaroi Earring", ring1="Ramuh Ring +1", ring2="Ramuh Ring +1"})
- sets.engaged.High = set_combine(sets.engaged.Acc, {})
- sets.ws = {}
- sets.ws.Moonshade = {ear1="Moonshade Earring"}
- sets.ws.SA = {ammo="Yetshila"}
- sets.ws.Normal = {ammo="Seeth. Bomblet +1", head="Argosy Celata +1", neck="Fotia Gorget", ear1="Cessance Earring", ear2="Brutal Earring", body="Argosy Hauberk +1", hands="Argosy Mufflers +1", ring1="Shukuyu Ring", ring2="Rufescent Ring", waist="Fotia Belt", legs="Argosy Breeches +1", feet="Argosy Sollerets +1", back={name="Cichol's Mantle", augments={'DEX+20',}}}
- sets.ws.Acc = set_combine(sets.ws.Normal, {ear1="Digni. Earring", ear2="Zennaroi Earring", ring1="Ramuh Ring +1", ring2="Ramuh Ring +1"})
- sets.ws.High = set_combine(sets.ws.Acc, {})
- sets.ws.Dmg = {ammo="Floestone", head="Argosy Celata +1", neck="Fotia Gorget", ear1="Cessance Earring", ear2="Ishvara Earring", body="Argosy Hauberk +1", hands="Argosy Mufflers +1", ring1="Shukuyu Ring", ring2="Rufescent Ring", waist="Prosilio Belt +1", legs="Argosy Breeches +1", feet="Sulev. Leggings +1", back={name="Cichol's Mantle", augments={'Weapon skill damage +10%',}}}
- sets.ws.Elemental = {ammo="Pemphredo Tathlum", head="Jumalik Helm", neck="Sanctity Necklace", ear1="Friomisi Earring", ear2="Hecate's Earring", body="Found. Breastplate", hands="Founder's Gauntlets", ring1="Shiva Ring +1", ring2="Shiva Ring +1", waist="Prosilio Belt +1", feet="Founder's Greaves"}
- send_command('wait 1;input /macro Book 5')
- send_command('input /chatmode party')
- end
- function precast(spell)
- if spell.action_type == "Magic" then
- equip(sets.precast.Fastcast)
- elseif spell.type == "WeaponSkill" then
- ws(spell)
- else
- ability(spell)
- end
- end
- function aftercast(spell)
- if player.status == 'Engaged' then
- equip(sets.engaged[TP_Set[TP_Index]])
- else
- equip(sets.aftercast)
- end
- end
- function sub_job_change()
- send_command('wait 7;input /lockstyleset 4')
- end
- function status_change(new,old)
- if T{'Idle','Resting'}:contains(new) then
- equip(sets.aftercast)
- elseif new == 'Engaged' then
- equip(sets.engaged[TP_Set[TP_Index]])
- end
- end
- function buff_change(name,gain)
- if name == "sleep" then
- if gain then
- equip(sets.dt)
- else
- if (not buffactive['terror']) or (not buffactive['stun']) or (not buffactive['petrification']) then
- equip(sets.engaged[TP_Set[TP_Index]])
- end
- end
- elseif (name == "terror") or (name == "stun") or (name == "petrification") then
- if gain then
- equip(sets.dt)
- else
- if (not buffactive['sleep']) or (not buffactive['terror']) or (not buffactive['stun']) or (not buffactive['petrification']) then
- equip(sets.engaged[TP_Set[TP_Index]])
- end
- end
- end
- end
- function self_command(command)
- if command == 'toggle TP' then
- TP_Index = TP_Index +1
- if TP_Index > #TP_Set then TP_Index = 1 end
- send_command('@input /echo ☆★ TP Set changed to '..TP_Set[TP_Index]..' ★☆')
- equip(sets.engaged[TP_Set[TP_Index]])
- end
- if command == 'aux' then
- equip(sets.dt)
- send_command('@input /echo ★☆ DT Set ON ☆★')
- end
- end
- windower.register_event('zone change', function()
- equip(sets.aftercast)
- end)
- function ws(spell)
- if (spell.target.distance > 8) or (player.tp < 1000) or (buffactive['amnesia']) or (buffactive['sleep']) or (buffactive['terror']) then
- cancel_spell()
- else
- if SingleWS:contains(spell.name) then
- equip(sets.ws.Dmg)
- if (player.tp < 2270) then
- equip(sets.ws.Moonshade)
- end
- if buffactive['sneak attack'] then
- equip(sets.ws.SA)
- end
- elseif MultiWS:contains(spell.name) then
- equip(sets.ws[TP_Set[TP_Index]])
- if (player.tp < 3000) then
- equip(sets.ws.Moonshade)
- end
- elseif ElementalWS:contains(spell.name) then
- equip(sets.ws.Elemental)
- else
- equip(sets.ws[TP_Set[TP_Index]])
- if (player.tp < 3000) then
- equip(sets.ws.Moonshade)
- end
- end
- if buffactive['mighty strikes'] then
- equip(sets.ws.SA)
- end
- end
- end
- function ability(spell)
- local cd = windower.ffxi.get_ability_recasts()[spell.recast_id]
- if (cd ~= nil) then
- if (buffactive['amnesia']) or (buffactive['paralysis']) or (buffactive['sleep']) or (buffactive['terror']) or (cd > 0) then
- cancel_spell()
- else
- equip(sets.precast[spell.name])
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement