Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[**********************************************************
- ========== Samurai Yoichinoyumi GearSwap ===========
- Based off of the Ranger gearswap file for Suji.Phoenix.
- Updated by Munenori.Sylph for Active Combat Style shifting.
- Save this file as SAM.lua or Yourname_SAM.lua and place it in:
- Windower4.1\addons\GearSwap\data
- **************************************************************]]
- -- Meikyo feet macro --
- -- Sekkanoki tp split macro --
- -- Sengikori SC Opening macro --
- -- PLM send cmds --
- -- Set condensing --
- -- WS Distance Limiter --
- -- Configure sets below.
- function get_sets(...)
- sets.idle = {}
- sets.idle.standingGK = {
- main = "Tsurumaru",
- sub = "Pole Grip",
- ammo = "Hagneia Stone",
- head = "Lithelimb Cap",
- neck = "Wiglen Gorget",
- lear = "Brachyura Earring",
- rear = "Brutal Earring",
- body = "Kyudogi",
- hands = "Sakonji Kote",
- lring = "Sheltered Ring",
- rring = "Paguroidea Ring",
- back = "Shadow Mantle",
- legs = "Sakonji Haidate",
- waist = "Flume Belt",
- feet = "Danzo Sune-ate"
- }
- sets.idle.standingYoichi = {
- main = "Tsurumaru",
- sub = "Pole Grip",
- range = "Yoichinoyumi",
- ammo = "Tulfaire Arrow",
- head = "Lithelimb Cap",
- neck = "Wiglen Gorget",
- lear = "Brachyura Earring",
- rear = "Brutal Earring",
- body = "Kyudogi",
- hands = "Sakonji Kote",
- lring = "Sheltered Ring",
- rring = "Paguroidea Ring",
- back = "Shadow Mantle",
- legs = "Sakonji Haidate",
- waist = "Flume Belt",
- feet = "Danzo Sune-ate"
- }
- sets.idle.standingPLM = {
- main = "Eminent Lance",
- sub = "Pole Grip",
- range = "Yoichinoyumi",
- ammo = "Tulfaire Arrow",
- head = "Lithelimb Cap",
- neck = "Wiglen Gorget",
- lear = "Brachyura Earring",
- rear = "Brutal Earring",
- body = "Kyudogi",
- hands = "Sakonji Kote",
- lring = "Sheltered Ring",
- rring = "Paguroidea Ring",
- back = "Shadow Mantle",
- legs = "Sakonji Haidate",
- waist = "Flume Belt",
- feet = "Danzo Sune-ate"
- }
- sets.pdt = {
- head = "Lithelimb Cap",
- neck = "Twilight torque",
- body = "Wakido Domaru +1",
- hands = "Sakonji Kote",
- lring = "Dark Ring",
- rring = "Dark Ring",
- back = "Mollusca mantle",
- waist = "Flume Belt",
- legs = "Wakido Haidate +1",
- feet = "Sakonji Sune-ate +1"
- }
- sets.mdt = set_combine(sets.pdt, {
- hands = "Wakido Kote +1",
- lear = "Merman's Earring",
- rear = "Merman's Earring",
- lring = "Shadow Ring"
- })
- sets.mdt.GKammo = {
- ammo = "Demonry Stone",
- head = "Lithelimb Cap",
- neck = "Twilight torque",
- lear = "Merman's Earring",
- rear = "Merman's Earring",
- body = "Wakido Domaru +1",
- hands = "Wakido Kote +1",
- lring = "Shadow Ring",
- rring = "Dark Ring",
- back = "Mollusca mantle",
- waist = "Flume Belt",
- legs = "Wakido Haidate +1",
- feet = "Sakonji Sune-ate +1"
- }
- sets.RR = set_combine(sets.pdt, {
- head = "Twilight Helm",
- body = "Twilight Mail",
- })
- sets.regen = {
- head = "Twilight Helm",
- neck = "Wiglen Gorget",
- body = "Kirin's Osode",
- lring = "Sheltered Ring",
- rring = "Paguroidea Ring",
- back = "Shadow Mantle",
- waist = "Flume Belt",
- feet = "Danzo Sune-ate"
- }
- sets.tp = {}
- sets.tp.Yoichinoyumi = {}
- sets.tp.Yoichinoyumi.normal_com = {
- main = "Tsurumaru",
- sub = "Pole Grip",
- range = "Yoichinoyumi",
- ammo = "Tulfaire Arrow",
- head = "Otomi Helm",
- neck = "Ganesha's Mala",
- lear = "Steelflash Earring",
- rear = "Bladeborn earring",
- body = "Wakido Domaru +1",
- hands = "Wakido Kote +1",
- lring = "K'ayres Ring",
- rring = "Rajas Ring",
- back = "Atheling Mantle",
- waist = "Windbuffet Belt",
- legs = "Wakido Haidate +1",
- feet = "Whirlpool Greaves"
- }
- sets.tp.Yoichinoyumi.ionis_com = {
- main = "Tsurumaru",
- sub = "Pole Grip",
- range = "Yoichinoyumi",
- ammo = "Tulfaire Arrow",
- head = "Yaoyotl Helm",
- neck = "Ganesha's Mala",
- lear = "Steelflash Earring",
- rear = "Bladeborn earring",
- body = "Wakido Domaru +1",
- hands = "Wakido Kote +1",
- lring = "K'ayres Ring",
- rring = "Rajas Ring",
- back = "Takaha Mantle",
- waist = "Cetl Belt",
- legs = "Wakido Haidate +1",
- feet = "Sakonji Sune-ate +1"
- }
- sets.tp.GK = {}
- sets.tp.GK.normal_com = {
- main = "Tsurumaru",
- sub = "Pole Grip",
- ammo = "Hagneia Stone",
- head = "Otomi Helm",
- neck = "Ganesha's Mala",
- lear = "Steelflash Earring",
- rear = "Bladeborn earring",
- body = "Wakido Domaru +1",
- hands = "Wakido Kote +1",
- lring = "K'ayres Ring",
- rring = "Rajas Ring",
- back = "Atheling Mantle",
- waist = "Windbuffet Belt",
- legs = "Wakido Haidate +1",
- feet = "Whirlpool Greaves"
- }
- sets.tp.GK.ionis_com = {
- main = "Tsurumaru",
- sub = "Pole Grip",
- ammo = "Hagneia Stone",
- head = "Yaoyotl Helm",
- neck = "Ganesha's Mala",
- lear = "Steelflash Earring",
- rear = "Bladeborn earring",
- body = "Wakido Domaru +1",
- hands = "Wakido Kote +1",
- lring = "K'ayres Ring",
- rring = "Rajas Ring",
- back = "Takaha Mantle",
- waist = "Cetl Belt",
- legs = "Wakido Haidate +1",
- feet = "Sakonji Sune-ate +1"
- }
- sets.tp.PLM = {}
- sets.tp.PLM.normal_com = {
- main = "Eminent Lance",
- sub = "Pole Grip",
- range = "Yoichinoyumi",
- ammo = "Tulfaire Arrow",
- head = "Otomi Helm",
- neck = "Ganesha's Mala",
- lear = "Steelflash Earring",
- rear = "Bladeborn earring",
- body = "Wakido Domaru +1",
- hands = "Wakido Kote +1",
- lring = "K'ayres Ring",
- rring = "Rajas Ring",
- back = "Atheling Mantle",
- waist = "Windbuffet Belt",
- legs = "Wakido Haidate +1",
- feet = "Sakonji Sune-ate +1"
- }
- sets.tp.PLM.ionis_com = {
- main = "Eminent Lance",
- sub = "Pole Grip",
- range = "Yoichinoyumi",
- ammo = "Tulfaire Arrow",
- head = "Yaoyotl Helm",
- neck = "Ganesha's Mala",
- lear = "Steelflash Earring",
- rear = "Bladeborn earring",
- body = "Wakido Domaru +1",
- hands = "Wakido Kote +1",
- lring = "K'ayres Ring",
- rring = "Rajas Ring",
- back = "Tahaka Mantle",
- waist = "Cetl Belt",
- legs = "Wakido Haidate +1",
- feet = "Sakonji Sune-ate +1"
- }
- sets.ws = {}
- sets.ws.namasarrow = {}
- sets.ws.namasarrow.normal_com = {
- head = "Lithelimb Cap",
- neck = "Light Gorget",
- lear = "Flame Pearl",
- rear = "flame pearl",
- body = "Phorcys Korazin",
- hands = "Unkai Kote +2",
- lring = "Pyrosoul Ring",
- rring = "Pyrosoul Ring",
- back = "Buquwik Cape",
- waist = "Light Belt",
- legs = "Wakido Haidate +1",
- feet = "Wakido Sune-ate +1"
- }
- sets.ws.namasarrow.ionis_com = sets.ws.namasarrow.normal_com
- sets.ws.shoha = {}
- sets.ws.shoha.normal_com = {
- head = "Otomi Helm",
- neck = "Ganesha's Mala",
- lear = "Moonshade Earring",
- rear = "Brutal Earring",
- body = "Phorcys Korazin",
- hands = "Mikinaak Gauntlets",
- lring = "Pyrosoul Ring",
- rring = "Pyrosoul Ring",
- back = "Atheling Mantle",
- waist = "Windbuffet Belt",
- legs = "Wakido Haidate +1",
- feet = "Sakonji Sune-ate +1"
- }
- sets.ws.shoha.ionis_com = sets.ws.shoha.normal_com
- sets.ws.fudo = {}
- sets.ws.fudo.normal_com = {
- head = "Otomi Helm",
- neck = "Light Gorget",
- lear = "Moonshade Earring",
- rear = "Brutal Earring",
- body = "Phorcys Korazin",
- hands = "Mikinaak Gauntlets",
- lring = "Pyrosoul Ring",
- rring = "Pyrosoul Ring",
- back = "Buquwik Cape",
- waist = "Light Belt",
- legs = "Wakido Haidate +1",
- feet = "Sakonji Sune-ate +1"
- }
- sets.ws.fudo.ionis_com = sets.ws.fudo.normal_com
- sets.ws.ageha = {}
- sets.ws.ageha.normal_com = {
- head = "Lithelimb Cap",
- neck = "Ganesha's Mala",
- lear = "Moonshade Earring",
- rear = "Brutal Earring",
- body = "Phorcys Korazin",
- hands = "Wakido Kote +1",
- lring = "Pyrosoul Ring",
- rring = "Pyrosoul Ring",
- back = "Buquwik Cape",
- waist = "Windbuffet Belt",
- legs = "Wakido Haidate +1",
- feet = "Wakido Sune-ate +1"
- }
- sets.ws.ageha.ionis_com = sets.ws.ageha.normal_com
- sets.ws.yuki = {}
- sets.ws.yuki.normal_com = {
- head = "Otomi Helm",
- neck = "Ganesha's Mala",
- lear = "Moonshade Earring",
- rear = "Brutal Earring",
- body = "Phorcys Korazin",
- hands = "Mikinaak Gauntlets",
- lring = "Pyrosoul Ring",
- rring = "Pyrosoul Ring",
- back = "Buquwik Cape",
- waist = "Windbuffet Belt",
- legs = "Wakido Haidate +1",
- feet = "Sakonji Sune-ate +1"
- }
- sets.ws.yuki.ionis_com = sets.ws.yuki.normal_com
- sets.ws.gekko = {}
- sets.ws.gekko.normal_com = {
- head = "Otomi Helm",
- neck = "Ganesha's Mala",
- lear = "Moonshade Earring",
- rear = "Brutal Earring",
- body = "Phorcys Korazin",
- hands = "Mikinaak Gauntlets",
- lring = "Pyrosoul Ring",
- rring = "Pyrosoul Ring",
- back = "Buquwik Cape",
- waist = "Windbuffet Belt",
- legs = "Wakido Haidate +1",
- feet = "Sakonji Sune-ate +1"
- }
- sets.ws.gekko.ionis_com = sets.ws.gekko.normal_com
- sets.ws.kasha = {}
- sets.ws.kasha.normal_com = {
- head = "Otomi Helm",
- neck = "Light Gorget",
- lear = "Moonshade Earring",
- rear = "Brutal Earring",
- body = "Phorcys Korazin",
- hands = "Mikinaak Gauntlets",
- lring = "Pyrosoul Ring",
- rring = "Pyrosoul Ring",
- back = "Buquwik Cape",
- waist = "Light Belt",
- legs = "Wakido Haidate +1",
- feet = "Sakonji Sune-ate +1"
- }
- sets.ws.kasha.ionis_com = sets.ws.kasha.normal_com
- sets.ws.rana = {}
- sets.ws.rana.normal_com = {
- head = "Otomi Helm",
- neck = "Ganesha's Mala",
- lear = "Steelflash Earring",
- rear = "Bladeborn Earring",
- body = "Phorcys Korazin",
- hands = "Mikinaak Gauntlets",
- lring = "Pyrosoul Ring",
- rring = "Pyrosoul Ring",
- back = "Atheling Mantle",
- waist = "Windbuffet Belt",
- legs = "Wakido Haidate +1",
- feet = "Mikinaak Greaves"
- }
- sets.ws.rana.ionis_com = sets.ws.rana.normal_com
- sets.ws.penta = {}
- sets.ws.penta.normal_com = {
- head = "Otomi Helm",
- neck = "Justiciar's Torque",
- lear = "Steelflash Earring",
- rear = "Bladeborn Earring",
- body = "Wakido Domaru +1",
- hands = "Mikinaak Gauntlets",
- lring = "Pyrosoul Ring",
- rring = "Rajas Ring",
- back = "Atheling Mantle",
- waist = "Prosilio Belt",
- legs = "Wakido Haidate +1",
- feet = "Mikinaak Greaves"
- }
- sets.ws.penta.ionis_com = sets.ws.penta.normal_com
- sets.ws.sonic = {}
- sets.ws.sonic.normal_com = {
- head = "Otomi Helm",
- neck = "Light Gorget",
- lear = "Flame Pearl",
- rear = "Flame Pearl",
- body = "Phorcys Korazin",
- hands = "Mikinaak Gauntlets",
- lring = "Pyrosoul Ring",
- rring = "Rajas Ring",
- back = "Buquwik Cape",
- waist = "Light Belt",
- legs = "Wakido Haidate +1",
- feet = "Sakonji Sune-ate +1"
- }
- sets.ws.sonic.ionis_com = sets.ws.sonic.normal_com
- sets.ws.stardiver = {}
- sets.ws.stardiver.normal_com = {
- head = "Otomi Helm",
- neck = "Light Gorget",
- lear = "Steelflash Earring",
- rear = "Bladeborn Earring",
- body = "Wakido Domaru +1",
- hands = "Mikinaak Gauntlets",
- lring = "Pyrosoul Ring",
- rring = "Rajas Ring",
- back = "Atheling Mantle",
- waist = "Light Belt",
- legs = "Wakido Haidate +1",
- feet = "Mikinaak Greaves"
- }
- sets.ws.stardiver.ionis_com = sets.ws.stardiver.normal_com
- sets.ws.GKammo = {ammo = "Thew Bomblet"}
- sets.jobability = {}
- sets.jobability.Meditate = {head = "Wakido Kabuto +1",hands = "Sakonji Kote"}
- sets.jobability.BladeBash = {hands = "Sakonji Kote"}
- sets.jobability.WardingCircle = {head = "Wakido Kabuto +1"}
- sets.jobability.ThirdEye = {legs = "Sakonji Haidate"}
- sets.jobability.Sekkanoki = {hands = "Unkai Kote +2"}
- sets.jobability.MeikyoShisui = {feet = "Sakonji Sune-ate +1"}
- sets.jobability.Sengikori = {feet = "Unkai Sune-ate +2"}
- notice('Samurai Binding Interface:')
- notice(' F9 Cycles Normal or Ionis Up')
- notice(' F9+Alt Cycles Combat Style')
- notice(' F10 Enables Twilight Lock')
- notice(' `+Ctrl Enables PDT layer')
- notice(' `+Alt Enables MDT layer')
- notice(' F11 Enables Full Regen Set')
- notice(' F10+Alt Reset and clears PDT/MDT.')
- windower.send_command('bind F9 gs c cycle offense')
- windower.send_command('bind !F9 gs c cycle style')
- windower.send_command('bind ^F9 gs c cycle hybrid')
- windower.send_command('bind ^` gs c defense pdt')
- windower.send_command('bind !` gs c defense mdt')
- windower.send_command('bind F10 gs c defense RR')
- windower.send_command('bind F11 gs c defense regen')
- windower.send_command('bind !F10 gs c hardreset')
- end
- function notice(msg, color)
- if color == nil then
- color = 158
- end
- windower.add_to_chat(color, msg)
- end
- function file_unload()
- windower.send_command('unbind F9')
- windower.send_command('unbind ^F9')
- windower.send_command('unbind !F9')
- windower.send_command('unbind ^`')
- windower.send_command('unbind !`')
- windower.send_command('unbind F10')
- windower.send_command('unbind !F10')
- windower.send_command('unbind F11')
- notice('Unbinding Interface.')
- end
- --[[******************************************************************************************]]
- --[[ Configuration variables. More options can be added here and wired into sets accordingly. ]]
- local OffenseLevels = T{'normal', 'ionis'}
- local OffenseLevel = OffenseLevels[1]
- local CombatStyles = T{'GreatKatana', 'Yoichinoyumi', 'PolearmYoichi'}
- local CombatStyle = CombatStyles[1]
- --[[******************************************************************************************]]
- --[[******************************************************************************************]]
- local PDTEnabled = false;
- local MDTEnabled = false;
- local RREnabled = false;
- local RegenEnabled = false;
- function init_gear_sets()
- print(spell.name)
- if CombatStyle == 'PolearmYoichi' then
- if spell.name == "Tachi: Shoha" then
- send_command('@input /ws "double thrust"')
- if spell.name == "Double Thrust" then
- equip(sets.ws.doublethrust[OffenseLevel .. '_com'])
- end
- end
- end
- end
- function precast(spell, action)
- -- if spell.type == "WeaponSkill" then
- -- if player.equipment.ammo == "Hagneia Stone" then
- -- equip(sets.ws.GKammo)
- -- elseif player.equipment.ammo == "Demonry Stone" then
- -- equip(sets.ws.GKammo)
- -- end
- --end
- -- if spell.type == "JobAbility" then
- -- if spell.name == "Meditate" then
- -- elseif spell.name == "Blade Bash" then
- -- equip(sets.jobability.BladeBash)
- -- elseif spell.name == "Warding Circle" then
- -- equip(sets.jobability.WardingCircle)
- -- elseif spell.name == "Third Eye" then
- -- equip(sets.jobability.ThirdEye)
- -- elseif spell.name == "Sekkanoki" then
- -- equip(sets.jobability.Sekkanoki)
- --elseif spell.name == "Sengikori" then
- --equip(sets.jobability.Sengikori)
- -- elseif spell.name == "Meikyo Shisui" then
- -- equip(sets.jobability.MeikyoShisui)
- -- end
- --if spell.type == "WeaponSkill" then
- -- if spell.name == "Namas Arrow" then
- -- equip(sets.ws.namasarrow[OffenseLevel .. '_com'])
- -- if spell.name == "Tachi: Shoha" then
- -- cancel_spell()
- -- end
- -- end
- --end
- if spell.type == "Weaponskill" then
- if buffactive.sekkanoki then
- equip(sets.jobability.Sekkanoki)
- elseif buffactive.sengikori then
- equip(sets.jobability.Sengikori)
- elseif buffactive.MeikyoShisui then
- equip(sets.jobability.MeikyoShisui)
- end
- end
- end
- function update_current_set(status)
- if status == nil then
- status = player.status
- end
- local current = nil
- if status == 'Idle' and CombatStyle == 'GreatKatana' then
- current = sets.idle.standingGK
- elseif status == 'Idle' and CombatStyle == 'Yoichinoyumi' then
- current = sets.idle.standingYoichi
- elseif status == 'Idle' and CombatStyle == 'PolearmYoichi' then
- current = sets.idle.standingPLM
- elseif status == 'Engaged' and CombatStyle == 'GreatKatana' then
- current = sets.tp.GK[OffenseLevel .. '_com']
- elseif status == 'Engaged' and CombatStyle == 'Yoichinoyumi' then
- current = sets.tp.Yoichinoyumi[OffenseLevel .. '_com']
- elseif status == 'Engaged' and CombatStyle == 'PolearmYoichi' then
- current = sets.tp.PLM[OffenseLevel .. '_com']
- end
- if current then
- if PDTEnabled then
- current = set_combine(current, sets.pdt)
- elseif MDTEnabled then
- current = set_combine(current, sets.mdt)
- end
- if MDTEnabled and player.equipment.ammo == "Hagneia Stone" then
- current = set_combine(current, sets.mdt.GKammo)
- elseif MDTEnabled and player.equipment.ammo == "Thew Bomblet" then
- current = set_combine(current, sets.mdt.GKammo)
- elseif RREnabled then
- current = set_combine(current, sets.RR)
- end
- if RegenEnabled then
- current = set_combine(current, sets.regen)
- end
- equip(current)
- end
- end
- function aftercast(spell,action)
- update_current_set()
- end
- function status_change(new,old)
- if status_new == 'Engaged' then
- current = equip(sets.tp)
- elseif status_new == 'Idle' then
- current = equip(sets.idle)
- end
- update_current_set()
- return
- end
- function buff_change(status,gain_or_loss)
- if buff_gain == "Sekkanoki" then
- equip(sets.jobability.Sekkanoki)
- elseif buff_gain == "Third Eye" then
- equip(sets.jobability.ThirdEye)
- elseif buff_gain == "Sekkanoki" then
- equip(sets.jobability.Sekkanoki)
- elseif buff_gain == "Sengikori" then
- equip(sets.jobability.Sengikori)
- elseif buff_gain == "Meikyo Shisui" then
- equip(sets.jobability.MeikyoShisui)
- end
- update_current_set()
- end
- function self_command(command)
- local params = command:psplit('%s')
- if params[1] == 'cycle' then
- if params[2] == 'offense' then
- local next = cycle(OffenseLevels, OffenseLevel)
- OffenseLevel = OffenseLevels[next]
- notice('OffenseLevel: ' .. OffenseLevel:ucfirst())
- update_current_set()
- elseif params[2] == 'style' then
- local next = cycle(CombatStyles, CombatStyle)
- CombatStyle = CombatStyles[next]
- notice('Combat Style: ' .. CombatStyle:ucfirst())
- update_current_set()
- end
- elseif params[1] == 'reset' then
- update_current_set()
- elseif params[1] == 'hardreset' then
- PDTEnabled = false
- MDTEnabled = false
- RREnabled = false
- RegenEnabled = false
- notice('PDT/MDT/Twilight/Regen Reset.')
- update_current_set()
- elseif params[1] == 'defense' then
- if params[2] == 'pdt' then
- PDTEnabled = true
- notice('PDT Up')
- update_current_set()
- elseif params[2] == 'mdt' then
- MDTEnabled = true
- notice('MDT Up')
- update_current_set()
- elseif params[2] == 'RR' then
- RREnabled = true
- notice('Twilight Locked')
- update_current_set()
- elseif params[2] == 'regen' then
- RegenEnabled = true
- notice('Regen')
- update_current_set()
- end
- end
- end
- -- Finds current in possible and returns the index to the
- -- next element in the table, circularly.
- function cycle(possibles, current)
- local c = 0
- for k, v in ipairs(possibles) do
- if v == current then
- c = k
- end
- end
- return c % #possibles +1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement