Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Written by Quixacotl updated 10/06/2014
- Instructions:
- Paste this file into folder; Windower4 > addons > Gearswap > data (not into the export folder).
- Custom Commands:
- There are 2 custom commands: 'cycle' and 'cycle ws'
- In chatlog type: //gs c cycle or //gs c cycle ws
- For macros use: /console gs c cycle or /console gs c cycle ws
- Useage: 'cycle' cycles through 5 separate gearmodes: Town, Fodder, Full Accuracy, Physical Defense, and Magic Defense.
- 'cycle ws' cycles through 3 different WS modes: Normal, MidAccuracy and FullAccuracy.
- Shortcut Commands (jumps straight to any gearmode):
- //gs c town
- //gs c dd or fodder
- //gs c acc
- //gs c pdt
- //gs c mdt
- Gearswap Commands:
- //lua load gearswap
- //lua unload gearswap
- //gs reload - (useful when editing these scripts while in-game)
- //gs showswaps - toggles showswaps on and off
- showswaps displays gear changes in chatlog. Useful for debugging
- --]]
- --------------------------------------
- -- Start defining the sets
- --------------------------------------
- function get_sets()
- --------------------
- -- Augmented Gear --
- --------------------
- QaaxoBody = {}
- QaaxoBody.R15B = {name="Qaaxo Harness", augments={'Accuracy+15','STR+7','Phys. dmg. taken -3'}}
- QaaxoFeet = {}
- QaaxoFeet.R15A = {name="Qaaxo Leggings", augments={'Attack+15','Evasion+15','"Dbl.Atk."+2'}}
- QaaxoFeet.R15B = {name="Qaaxo Leggings", augments={'Accuracy+15','STR+7','Phys. dmg. taken -3'}}
- --------------------------------------------
- -- City areas for town gear and behavior. --
- --------------------------------------------
- areas = {}
- areas.Cities = S{
- "Eastern Adoulin", "Western Adoulin",
- "Ru'Lude Gardens", "Upper Jeuno", "Lower Jeuno", "Port Jeuno",
- "Port Windurst", "Windurst Waters", "Windurst Woods",
- "Windurst Walls", "Heavens Tower",
- "Port San d'Oria", "Northern San d'Oria", "Southern San d'Oria",
- "Port Bastok", "Bastok Markets",
- "Bastok Mines", "Metalworks",
- "Aht Urhgan Whitegate", "Tavanazian Safehold",
- "Nashmau", "Selbina",
- "Mhaura", "Norg", "Kazham"}
- --------------------------------------------------------------------
- -- Buff Active Layers - Gear that enhances Buffs for the duration --
- --------------------------------------------------------------------
- sets.buff = {}
- sets.buff['Footwork'] = {feet="Tantra Gaiters +2"}
- sets.buff['Impetus'] = {body="Tantra Cyclas +2"}
- sets.Enmity = {ring1="Odium Ring"}
- -----------------------------
- -- Precast Sets for spells --
- -----------------------------
- sets.precast = {}
- sets.precast.Ninjutsu = {
- neck="Magoraga Beads", ammo="Honed Tathlum",
- ear2="Loquac. Earring", back="Mollusca Mantle",
- ring1="Defending Ring", ring2="Beeline Ring"}
- ----------------------
- -- Weaponskill Sets --
- ----------------------
- WS_Set_Names = {"Normal","MidAccuracy","FullAccuracy"}
- sets.WSMidAcc = {ammo="Honed Tathlum", back="Letalis Mantle", feet=QaaxoFeet.R15B}
- sets.WSFullAcc = {ammo="Honed Tathlum", head="Sukeroku Hachi.", back="Letalis Mantle", feet=QaaxoFeet.R15B}
- sets.WS = {ammo="Ginsen",
- head="Uk'uxkaj Cap", neck="Nefarious Collar +1",
- ear1="Vulcan's Pearl", ear2="Vulcan's Pearl",
- body="Anch. Cyclas +1", hands="Hes. Gloves +1",
- ring1="Ifrit Ring +1", ring2="Ifrit Ring +1",
- back="Rancorous Mantle", waist="Prosilio Belt +1",
- legs="Ighwa Trousers", feet=QaaxoFeet.R15B}
- sets.WS.Normal = sets.WS
- sets.WS.MidAccuracy = set_combine(sets.WS, sets.WSMidAcc)
- sets.WS.FullAccuracy = set_combine(sets.WS, sets.WSFullAcc)
- sets.WS["Final Heaven"] = {ammo="Tantra Tathlum",
- head="Uk'uxkaj Cap", neck="Nefarious Collar +1",
- ear1="Terra's Pearl", ear2="Terra's Pearl",
- body="Anch. Cyclas +1", hands="Hes. Gloves +1",
- ring1="Titan Ring", ring2="Titan Ring",
- back="Iximulew Cape", waist="Prosilio Belt +1",
- legs="Ighwa Trousers", feet=QaaxoFeet.R15B}
- sets.WS["Final Heaven"].Normal = sets.WS["Final Heaven"]
- sets.WS["Final Heaven"].MidAccuracy = set_combine(sets.WS["Final Heaven"], sets.WSMidAcc)
- sets.WS["Final Heaven"].FullAccuracy = set_combine(sets.WS["Final Heaven"], sets.WSFullAcc)
- sets.WS["Victory Smite"] = {ammo="Ginsen",
- head="Uk'uxkaj Cap", neck="Nefarious Collar +1",
- ear1="Vulcan's Pearl", ear2="Vulcan's Pearl",
- body="Anch. Cyclas +1", hands="Hes. Gloves +1",
- ring1="Ifrit Ring +1", ring2="Ifrit Ring +1",
- back="Rancorous Mantle", waist="Prosilio Belt +1",
- legs="Ighwa Trousers", feet=QaaxoFeet.R15B}
- sets.WS["Victory Smite"].Normal = sets.WS["Victory Smite"]
- sets.WS["Victory Smite"].MidAccuracy = set_combine(sets.WS["Victory Smite"], sets.WSMidAcc)
- sets.WS["Victory Smite"].FullAccuracy = set_combine(sets.WS["Victory Smite"], sets.WSFullAcc)
- sets.WS['Shijin Spiral'] = {
- ammo="Jukukik Feather",
- head="Whirlpool Mask", neck="Ej Necklace",
- ear1="Jupiter's Pearl", ear2="Pixie Earring",
- body=QaaxoBody.R15B, hands="Hes. Gloves +1",
- ring1="Ramuh Ring +1", ring2="Ramuh Ring",
- back="Vespid Mantle", waist="Artful Belt +1",
- legs="Hes. Hose +1", feet=QaaxoFeet.R15B}
- sets.WS['Shijin Spiral'].Normal = sets.WS['Shijin Spiral']
- sets.WS['Shijin Spiral'].MidAccuracy = set_combine(sets.WS['Shijin Spiral'], sets.WSMidAcc)
- sets.WS['Shijin Spiral'].FullAccuracy = set_combine(sets.WS['Shijin Spiral'], sets.WSFullAcc)
- sets.WS['Asuran Fists'] = {ammo="Ginsen",
- head="Uk'uxkaj Cap", neck="Nefarious Collar +1",
- ear1="Vulcan's Pearl", ear2="Vulcan's Pearl",
- body="Anch. Cyclas +1", hands="Hes. Gloves +1",
- ring1="Ifrit Ring +1", ring2="Ifrit Ring +1",
- back="Rancorous Mantle", waist="Prosilio Belt +1",
- legs="Ighwa Trousers", feet=QaaxoFeet.R15B}
- sets.WS['Asuran Fists'].Normal = sets.WS['Asuran Fists']
- sets.WS['Asuran Fists'].MidAccuracy = set_combine(sets.WS['Asuran Fists'], sets.WSMidAcc)
- sets.WS['Asuran Fists'].FullAccuracy = set_combine(sets.WS['Asuran Fists'], sets.WSFullAcc)
- -----------------
- -- Status Sets --
- -----------------
- sets.Resting = {ammo="Inlamvuyeso",
- head="Oce. Headpiece +1", neck="Wiglen Gorget",
- ear1="Dawn Earring", ear2="Brachyura Earring",
- body="Hes. Cyclas +1", hands="Hes. Gloves +1",
- ring1="Paguroidea Ring", ring2="Sheltered Ring",
- back="Letalis Mantle", waist="Windbuffet Belt +1",
- legs="Hes. Hose +1", feet="Hes. Gaiters +1"}
- ---------------
- -- Idle Sets --
- ---------------
- Idle_Set_Names = {"Town","Fodder","Full Accuracy","Physical Defense","Magic Defense"}
- sets.Idle = {}
- sets.Idle.Town = {
- main="Spharai", ammo="Inlamvuyeso",
- head="Oce. Headpiece +1", neck="Wiglen Gorget",
- ear1="Dawn Earring", ear2="Brachyura Earring",
- body="Hes. Cyclas +1", hands="Hes. Gloves +1",
- ring1="Paguroidea Ring", ring2="Sheltered Ring",
- back="Letalis Mantle", waist="Windbuffet Belt +1",
- legs="Hes. Hose +1", feet="Hermes' Sandals"}
- sets.Idle.Fodder = {
- ammo="Ginsen",
- head="Whirlpool Mask", neck="Wiglen Gorget",
- ear1="Dawn Earring", ear2="Brachyura Earring",
- body=QaaxoBody.R15B, hands="Hes. Gloves +1",
- ring1="Paguroidea Ring", ring2="Sheltered Ring",
- back="Atheling Mantle", waist="Windbuffet Belt +1",
- legs="Hes. Hose +1", feet="Hermes' Sandals"}
- sets.Idle['Full Accuracy'] = {
- ammo="Ginsen",
- head="Whirlpool Mask", neck="Wiglen Gorget",
- ear1="Dawn Earring", ear2="Brachyura Earring",
- body=QaaxoBody.R15B, hands="Hes. Gloves +1",
- ring1="Paguroidea Ring", ring2="Sheltered Ring",
- back="Letalis Mantle", waist="Anguinus Belt",
- legs="Ighwa Trousers", feet=QaaxoFeet.R15B}
- sets.Idle['Physical Defense'] = {ammo="Brigantia Pebble",
- head="Otronif Mask +1", neck="Veisa Collar",
- ear1="Dawn Earring", ear2="Brachyura Earring",
- body="Otro. Harness +1", hands="Otronif Gloves +1",
- ring1="Defending Ring", ring2="Dark Ring",
- back="Repulse Mantle", waist="Windbuffet Belt +1",
- legs="Otronif Brais +1", feet="Otronif Boots +1"}
- sets.Idle['Magic Defense'] = {ammo="Sihirik",
- head="Otronif Mask +1", neck="Asperity Necklace",
- ear1="Merman's Earring", ear2="Merman's Earring",
- body="Otro. Harness +1", hands="Otronif Gloves +1",
- ring1="Defending Ring", ring2="Yacuruna Ring +1",
- back="Engulfer Cape +1", waist="Windbuffet Belt +1",
- legs="Otronif Brais +1", feet="Otronif Boots +1"}
- -------------
- -- TP sets --
- -------------
- TP_Set_Names = {"Town","Fodder","Full Accuracy","Physical Defense","Magic Defense"}
- sets.TP = {}
- sets.TP.Town = set_combine(sets.Idle.Town,{
- ammo="Inlamvuyeso",
- head="Whirlpool Mask", neck="Asperity Necklace",
- ear1="Bladeborn Earring", ear2="Steelflash Earring",
- body="Thaumas Coat", hands="Hes. Gloves +1",
- ring1="K'ayres Ring", ring2="Epona's Ring",
- back="Letalis Mantle", waist="Windbuffet Belt +1",
- legs="Hes. Hose +1", feet="Anch. Gaiters +1"})
- sets.TP.Fodder = set_combine(sets.Idle.Fodder,{
- ammo="Ginsen",
- head="Whirlpool Mask", neck="Asperity Necklace",
- ear1="Bladeborn Earring", ear2="Steelflash Earring",
- body=QaaxoBody.R15B, hands="Hes. Gloves +1",
- ring1="Oneiros Ring", ring2="Epona's Ring",
- back="Atheling Mantle", waist="Windbuffet Belt +1",
- legs="Hes. Hose +1", feet=QaaxoFeet.R15A})
- sets.TP['Full Accuracy'] = set_combine(sets.Idle['Full Accuracy'],{
- ammo="Ginsen",
- head="Whirlpool Mask", neck="Ej Necklace",
- ear1="Bladeborn Earring", ear2="Steelflash Earring",
- body=QaaxoBody.R15B, hands="Hes. Gloves +1",
- ring1="Ramuh Ring +1", ring2="Epona's Ring",
- back="Letalis Mantle", waist="Anguinus Belt",
- legs="Ighwa Trousers", feet=QaaxoFeet.R15B})
- sets.TP['Physical Defense'] = set_combine(sets.Idle['Physical Defense'],
- {back="Mollusca Mantle"})
- sets.TP['Magic Defense'] = set_combine(sets.Idle['Magic Defense'], {})
- ----------------------
- -- Job Ability Sets --
- ----------------------
- sets.JA = {}
- sets.JA['Hundred Fists'] = {legs="Hes. Hose +1"}
- sets.JA['Boost'] = {hands="Anch. Gloves +1"}
- sets.JA['Dodge'] = {feet="Anch. Gaiters +1"}
- sets.JA['Focus'] = {head="Anchor. Crown +1"}
- sets.JA['Counterstance'] = {feet="Hes. Gaiters +1"}
- sets.JA['Mantra'] = {feet="Hes. Gaiters +1"}
- sets.JA['Formless Strikes'] = {body="Hes. Cyclas +1"}
- sets.JA['Impetus'] = {body="Tantra Cyclas +2"}
- sets.JA['Footwork'] = {feet="Tantra Gaiters +2"}
- sets.JA['Chi Blast'] = {
- head="Hes. Crown +1", neck="Aife's Medal",
- body="Otro. Harness +1", hands="Hes. Gloves +1",
- back="Tuilha Cape", waist="Crudelis Belt",
- legs="Hes. Hose +1", feet="Anch. Gaiters +1"}
- sets.JA['Chakra'] = set_combine(sets.JA['Chi Blast'],{
- ammo="Brigantia Pebble",
- head="Whirlpool Mask", neck="Tjukurrpa Medal",
- ear1="Terra's Pearl", ear2="Terra's Pearl",
- body="Anch. Cyclas +1", hands="Hes. Gloves +1",
- ring1="Titan Ring", ring2="Titan Ring",
- back="Earthcry Mantle", waist="Caudata Belt",
- legs="Ighwa Trousers", feet="Hes. Gaiters +1"})
- sets.JA['Provoke'] = sets.Enmity
- sets.JA['Warcry'] = sets.Enmity
- sets.JA['Animated Flourish'] = sets.Enmity
- sets.Waltz = set_combine(sets.JA['Chi Blast'],{
- ammo="Sonia's Plectrum",
- head="Felistris Mask", neck="Dualism Collar",
- body="Otro. Harness +1", hands="Hes. Gloves +1",
- ring1="Spiral Ring", ring2="Angel's Ring",
- back="Iximulew Cape", waist="Caudata Belt",
- legs="Qaaxo Tights", feet="Otronif Boots +1"})
- sets.Step = {ammo="Honed Tathlum",
- ear2="Choreia Earring", waist="Chaac Belt"}
- -----------------------------------
- -- Variables and notes to myself --
- -----------------------------------
- Mode_Index = 1
- WS_Index = 1
- select_macro_book_sets()
- end
- --------------------------------------
- -- Rules
- --------------------------------------
- function precast(spell)
- if sets.precast[spell.english] then
- equip(sets.precast[spell.english])
- elseif sets.JA[spell.english] then
- equip(sets.JA[spell.english])
- elseif spell.english:contains('Waltz') then
- equip(sets.Waltz)
- elseif spell.english:contains('Step') then
- equip(sets.Step)
- elseif spell.type=="WeaponSkill" then
- if sets.WS[spell.english] then
- equip(sets.WS[spell.english][WS_Set_Names[WS_Index]])
- else
- equip(sets.WS[WS_Set_Names[WS_Index]])
- end
- elseif spell.type=="Ninjutsu" then
- equip(sets.precast.Ninjutsu)
- end
- end
- function midcast(spell)
- if spell.english == 'Spectral Jig' or spell.english:startswith('Monomi') and spell.target.type == 'SELF' then
- send_command('cancel 71')
- end
- end
- function aftercast(spell,action)
- update_gear()
- end
- function status_change(new,action)
- update_gear()
- end
- -- Called when a player gains or loses a buff.
- function buff_change(buff,gain)
- if buff == "Footwork" then update_gear() end
- if buff == "Impetus" then update_gear() end
- end
- function self_command(command)
- if command:lower() == 'cycle' then
- Mode_Index = Mode_Index +1
- if Mode_Index > #Idle_Set_Names then
- Mode_Index = 1
- end
- add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
- update_gear()
- elseif command:lower() == 'mdt' then
- Mode_Index = 5
- add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
- update_gear()
- elseif command:lower() == 'pdt' then
- Mode_Index = 4
- add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
- update_gear()
- elseif command:lower() == 'acc' then
- Mode_Index = 3
- add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
- update_gear()
- elseif command:lower() == 'dd' then
- Mode_Index = 2
- add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
- update_gear()
- elseif command:lower() == 'fodder' then
- Mode_Index = 2
- add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
- update_gear()
- elseif command:lower() == 'town' then
- Mode_Index = 1
- add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
- update_gear()
- elseif command:lower() == 'cycle ws' then
- WS_Index = WS_Index +1
- if WS_Index > #WS_Set_Names then
- WS_Index = 1
- end
- add_to_chat(8,'----- Weaponskill Mode changed to '..WS_Set_Names[WS_Index]..' -----')
- else
- add_to_chat(8,'--- Command error. Commands are cycle, cycle ws, town, fodder, acc, pdt and mdt ---')
- end
- end
- function update_gear()
- if player.status == 'Engaged' then
- equip(sets.TP[TP_Set_Names[Mode_Index]])
- elseif player.status == 'Idle' then
- if areas.Cities:contains(world.area) then
- add_to_chat(8,'----- You are at '..world.area..'. Town gear equipped! -----')
- equip(sets.Idle.Town)
- else
- send_command('input /lockstyle on') -- auto /lockstyle - you can disable this if you prefer.
- equip(sets.Idle[Idle_Set_Names[Mode_Index]])
- end
- else
- equip(sets.Resting)
- end
- if buffactive['Footwork'] then equip(sets.buff['Footwork']) end
- if buffactive['Impetus'] then equip(sets.buff['Impetus']) end
- end
- -- Select default macro book on initial load or subjob change.
- function select_macro_book_sets()
- if player.sub_job == 'DNC' then
- send_command('input /macro book 2;wait .1;input /macro set 2')
- elseif player.sub_job == 'NIN' then
- send_command('input /macro book 2;wait .1;input /macro set 3')
- elseif player.sub_job == 'RUN' then
- send_command('input /macro book 2;wait .1;input /macro set 4')
- else
- send_command('input /macro book 2;wait .1;input /macro set 1')
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement