Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Kanryu_RUN
- 2/4/2016
- ]]
- --!!INIT!!--
- --Organizer--
- include('organizer-lib')
- organizer_items = {
- main = 'Epeolatry',
- main = 'Aettir',
- main = 'Vampirism',
- sub = 'Duplus Grip',
- rear = 'Moonshade Earring',
- rring = 'Warp Ring',
- lring = 'Echad Ring',
- rring = 'Trizek Ring',
- back = 'Mecisto. Mantle',
- waist = 'Fucho-no-Obi'
- }
- --Command Aliases--
- send_command('alias rune gs c rune')
- send_command('alias pdt gs c pdt')
- send_command('alias mdt gs c mdt')
- send_command('alias acc gs c acc')
- send_command('alias spi gs c spi')
- send_command('alias cp gs c cp')
- --Setup--
- send_command('gs enable all')
- send_command('bind ^1 rune')
- --Set Macro Book--
- send_command('input /macro book 20; wait .1;input /macro set 10; wait 2.5; input /lockstyleset 004')
- --Main()--
- function get_sets()
- --Rune Ladder Setup--
- runeIndex = 1
- runeArray = {"Tellus", "Unda", "Flabra", "Ignis", "Gelus", "Sulpor", "Lux", "Tenebrae"}
- --Command Triggers--
- PDTTrigger = 1
- MDTTrigger = 0
- AccTrigger = 0
- SpellInt = 0
- CPTrigger = 0
- ShadowType = 'None'
- target_distance = 6
- --Idle Sets--
- sets.Idle = {}
- sets.Idle.Standard = {
- ammo = "Homiliary",
- head = "Iuitl Headgear +1",
- neck = "Twilight Torque",
- lear = "Ethereal Earring",
- rear = "Genmei Earring",
- body = "Emet Harness +1",
- hands = "Erilaz Gauntlets +1",
- lring = "Paguroidea Ring",
- rring = "Sheltered Ring",
- back = "Evasionist's Cape",
- waist = "Flume Belt",
- legs = "Eri. Leg Guards +1",
- feet = "Skd. Jambeaux +1"
- }
- sets.Idle.PDT = {
- ammo = "Inlamvuyeso",
- head = "Iuitl Headgear +1",
- neck = "Twilight Torque",
- lear = "Ethereal Earring",
- rear = "Genmei Earring",
- body = "Erilaz Surcoat +1",
- hands = "Erilaz Gauntlets +1",
- lring = "Vocane Ring",
- rring = "Defending Ring",
- back = "Evasionist's Cape",
- waist = "Flume Belt",
- legs = "Eri. Leg Guards +1",
- feet = "Erilaz Greaves +1"
- }
- sets.Idle.MDT = {
- ammo = "Vanir Battery",
- head = "Fu. Bandeau +1",
- neck = "Twilight Torque",
- lear = "Ethereal Earring",
- rear = "Spellbr. Earring",
- body = "Futhark Coat +1",
- hands = "Futhark Mitons +1",
- lring = "Shadow Ring",
- rring = "Defending Ring",
- back = "Engulfer Cape +1",
- waist = "Carrier's Sash",
- legs = "Rune. Trousers +1",
- feet = "Manabyss Pigaches"
- }
- sets.Idle.Regen = set_combine(sets.Idle.Standard, {
- head = "Oce. Headpiece +1",
- neck = "Wiglen Gorget",
- lear = "Infused Earring",
- rear = "Dawn Earring",
- body = "Futhark Coat +1",
- lring = "Sheltered Ring",
- rring = "Paguroidea Ring",
- back = "Scuta Cape"
- })
- sets.Idle.Refresh = set_combine(sets.Idle.Standard, {
- ammo = "Homiliary",
- head = "Rawhide Mask",
- body = "Runeist Coat +1"
- })
- --Misc Sets--
- sets.Enmity = {
- head = "Highwing Helm",
- neck = "Warder's Charm",
- rear = "Cryptic Earring",
- body = "Emet Harness +1",
- hands = "Futhark Mitons +1",
- back = "Evasionist's Cape",
- legs = "Eri. Leg Guards +1",
- feet = "Erilaz Greaves +1"
- }
- --TP Sets--
- sets.engaged = {
- ammo = "Vanir Battery",
- head = "Dampening Tam",
- neck = "Asperity Necklace",
- lear = "Bladeborn Earring",
- rear = "Steelflash Earring",
- body = "Thaumas Coat",
- hands = "Nomkah. Mittens +1",
- lring = "Epona's Ring",
- rring = "Petrov Ring",
- back = "Bleating Mantle",
- waist = "Windbuffet Belt +1",
- legs = "Taeon Tights",
- feet = "Taeon Boots"
- }
- sets.engaged.Acc = set_combine(sets.engaged, {
- --[[ammo = "Seeth. Bomblet +1",
- head = "Whirlpool Mask",
- lear = "Zennaroi Earring",
- body = "Manibozho Jerkin",
- hands = "Umuthi Gloves",
- lring = "Ramuh Ring +1",
- rring = "Ramuh Ring +1",
- back = "Letalis Mantle",
- waist = "Anguinus Belt",]]
- })
- sets.engaged.AM = {
- --[[ammo = "Ginsen",
- head = "Whirlpool Mask",
- neck = "Asperity Necklace",
- lear = "Bladeborn Earring",
- rear = "Steelflash Earring",
- body = "Manibozho Jerkin",
- hands = "Umuthi Gloves",
- lring = "Epona's Ring",
- rring = "Mars's Ring",
- back = "Letalis Mantle",
- waist = "Anguinus Belt",
- legs = "Taeon Tights",
- feet = "Taeon Boots"]]
- }
- --WS Sets--
- sets.precast = {}
- sets.precast.WS = {
- --[[ammo = "Seeth. Bomblet +1",
- head = "Highwing Helm",
- neck = "Soil Gorget",
- lear = "Bladeborn Earring",
- rear = "Steelflash Earring",
- body = "Manibozho Jerkin",
- hands = "Nomkah. Mittens +1",
- lring = "Epona's Ring",
- rring = "Pyrosoul Ring",
- back = "Buquwik Cape",
- waist = "Soil Belt",
- legs = "Taeon Tights",
- feet = "Taeon Boots"]]
- }
- sets.precast.WS['Dimidiation'] = {
- ammo = "Jukukik Feather",
- head = "Dampening Tam",
- neck = "Shifting Neck. +1",
- lear = "Jupiter's Pearl",
- rear = "Jupiter's Pearl",
- body = "Dread Jupon",
- hands = "Erilaz Gauntlets +1",
- lring = "Ramuh Ring +1",
- rring = "Ramuh Ring +1",
- back = "Kayapa Cape",
- waist = "Fotia Belt",
- legs = "Samnuha Tights",
- feet = "Taeon Boots"
- }
- sets.precast.WS['Sanguine Blade'] = {
- ammo = "Seeth. Bomblet +1",
- head = "Highwing Helm",
- neck = "Eddy Necklace",
- lear = "Novio Earring",
- rear = "Friomisi Earring",
- body = "Dread Jupon",
- hands = "Leyline Gloves",
- lring = "Archon Ring",
- rring = "Fenrir Ring +1",
- back = "Argocham. Mantle",
- waist = "",
- legs = "Shneddick Tights +1",
- feet = "Manabyss Pigaches"
- }
- --Spells--
- --Pre Cast--
- sets.precast.spell = {
- ammo = "",
- head = "Rune. Bandeau +1",
- lear = "Loquac. Earring",
- body = "Dread Jupon",
- hands = "Taeon Gloves",
- lring = "Prolix Ring",
- legs = "Orvail Pants",
- feet = "Chelona Boots"
- }
- sets.precast['Enhancing Magic'] = set_combine(sets.precast.spell, {
- waist = "Siegel Sash",
- legs = "Futhark Trousers +1"
- })
- sets.precast['Ninjutsu'] = set_combine(sets.precast.spell, {
- neck = "Magoraga Beads"
- })
- --Mid Cast--
- sets.midcast = {}
- sets.midcast['Enhancing Magic'] = {
- head = "Erilaz Galea +1",
- neck = "Colossus's Torque",
- hands = "Runeist Mitons +1",
- back = "Merciful Cape",
- legs = "Futhark Trousers +1"
- }
- sets.midcast.Regen = set_combine(sets.midcast['Enhancing Magic'], {
- head = "Rune. Bandeau +1"
- })
- sets.midcast.Refresh = set_combine(sets.midcast['Enhancing Magic'], {
- head = "Erilaz Galea +1"
- })
- sets.midcast.Phalanx = set_combine(sets.midcast['Enhancing Magic'], {
- head = "Fu. Bandeau +1"
- })
- sets.midcast.SpellInterrupt = set_combine(sets.Idle.PDT), {
- ammo = "Impatiens",
- neck = "Willpower Torque",
- rear = "Halasz Earring",
- hands = "Rawhide Gloves",
- rring = "Evanescence Ring",
- waist = "Rumination Sash",
- legs = "Carmine Cuisses +1",
- feet = "Karasutengu",
- })
- --Job Abilites--
- sets.precast.JA = {}
- sets.precast.JA['Elemental Sforzo'] = set_combine(sets.Enmity, {
- body = "Futhark Coat +1"
- })
- sets.precast.JA['Swordplay'] = set_combine(sets.Enmity, {
- hands = "Futhark Mitons +1"
- })
- sets.precast.JA['Vivacious Pulse'] = set_combine(sets.Enmity, {
- head = "Erilaz Galea +1"
- })
- sets.precast.JA['Lunge'] = set_combine(sets.Enmity, {
- ammo = "Seeth. Bomblet +1",
- head = "Highwing Helm",
- neck = "Eddy Necklace",
- lear = "Novio Earring",
- rear = "Friomisi Earring",
- body = "",
- hands = "Leyline Gloves",
- lring = "Fenrir Ring +1",
- rring = "Fenrir Ring +1",
- back = "Argocham. Mantle",
- waist = "",
- legs = { name="Herculean Trousers", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Mag. Acc.+5','"Mag.Atk.Bns."+8',}},
- feet = "Manabyss Pigaches"
- })
- sets.precast.JA['Gambit'] = set_combine(sets.Enmity, {
- hands = "Runeist Mitons +1"
- })
- sets.precast.JA['Rayke'] = set_combine(sets.Enmity, {
- feet = "Futhark Boots +1"
- })
- sets.precast.JA['Pflug'] = set_combine(sets.Enmity, {
- feet = "Runeist Bottes +1"
- })
- sets.precast.JA['Valiance'] = set_combine(sets.Enmity, {
- body = "Runeist Coat +1",
- legs = "Futhark Trousers +1"
- })
- sets.precast.JA['Liement'] = set_combine(sets.Enmity, {
- body = "Futhark Coat +1"
- })
- sets.precast.JA['Battuta'] = set_combine(sets.Enmity, {
- head = "Fu. Bandeau +1"
- })
- end
- --Precast Core--
- function precast(spell, action)
- --Magic--
- if spell.action_type == 'Magic' then
- precast_magic(spell)
- end
- --Job Ability--
- if spell.type == 'JobAbility' then
- precast_ja(spell)
- end
- --Effusion--
- if spell.type == "Effusion" then
- precast_effusion(spell)
- end
- --Ward--
- if spell.type == "Ward" then
- precast_ward(spell)
- end
- --Rune Switch Start--
- if spell.type == "Rune" then
- runeLock(spell)
- end
- --Weaponskills--
- if spell.type == "WeaponSkill" then
- precast_weaponskill(spell)
- end
- --AutoCancel Ichi--
- if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' and
- (buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)']) then
- cancel_spell()
- end
- --Disability Swap--
- if buffactive['terror'] or buffactive['petrification']
- or buffactive['stun'] or buffactive['sleep'] then
- if MDTTrigger == 1 then
- equip(sets.Idle.MDT)
- else
- equip(sets.Idle.PDT)
- end
- end
- --Wake Up--
- if buffactive.sleep and player.hp > 100 and player.status == "Engaged" then
- equip(set_combine(sets.Idle.PDT, {head="Frenzy Sallet"}))
- end
- end
- --Midcast Core--
- function midcast(spell, action)
- if spell.action_type == "Magic" then
- midcast_magic(spell)
- end
- end
- --Aftercast Core--
- function aftercast(spell, action)
- --Shadow Track--
- if string.find(spell.name,'Utsusemi') and not spell.interrupted then
- if spell.name == 'Utsusemi: Ichi' then
- ShadowType = 'Ichi'
- elseif spell.name == 'Utsusemi: Ni' then
- ShadowType = 'Ni'
- end
- end
- --Aftercast Function Trigger--
- if player.status == "Engaged" then
- aftercast_engaged()
- else
- aftercast_idle()
- end
- end
- --Status Change Core--
- function status_change(new, old)
- --Aftercast Function Trigger--
- if player.status == "Engaged" then
- aftercast_engaged()
- else
- aftercast_idle()
- end
- end
- --Custom Command Engine--
- function self_command(command)
- --Rune Repeater--
- if command == 'rune' then
- send_command('input /ja '..runeArray[runeIndex]..' <me>')
- end
- --PDT Trigger--
- if command == 'pdt' then
- if PDTTrigger == 1 then
- add_to_chat(170, 'PDT Toggled - Max Damage')
- PDTTrigger = 0
- else
- add_to_chat(170, 'PDT Toggled - Max PDT')
- PDTTrigger = 1
- end
- end
- --MDT Trigger--
- if command == 'mdt' then
- if MDTTrigger == 1 then
- add_to_chat(170, 'MDT Toggled - Max Damage')
- MDTTrigger = 0
- else
- add_to_chat(170, 'MDT Toggled - Max MDT')
- MDTTrigger = 1
- end
- end
- --Acc Trigger--
- if command == 'acc' then
- if AccTrigger == 1 then
- add_to_chat(170, 'Acc Toggled - Max Damage')
- AccTrigger = 0
- else
- add_to_chat(170, 'Acc Toggled - Max Acc')
- AccTrigger = 1
- end
- end
- --SpellInterrupt Trigger--
- if command == 'spi' then
- if SpellInt == 1 then
- add_to_chat(170, 'Spell Interupt Chance Down')
- SpellInt = 0
- else
- add_to_chat(170, 'Normal Cast')
- SpellInt = 1
- end
- end
- --Cap Cape Lock--
- if command == 'cp' then
- if CPTrigger == 1 then
- enable('back')
- add_to_chat(170, 'CP Cape Released')
- CPTrigger = 0
- else
- equip({back="Mecisto. Mantle"})
- disable('back')
- add_to_chat(170, 'CP Cape Locked')
- CPTrigger = 1
- end
- end
- end
- --Subfunction for Magic Precast--
- function precast_magic(spell, action)
- --Ninjutsu--
- if spell.skill == 'Ninjutsu' then
- equip(sets.precast['Ninjutsu'])
- --Enhancing--
- elseif spell.skill == 'Enhancing Magic' then
- equip(sets.precast['Enhancing Magic'])
- --Default--
- else
- equip(sets.precast.spell)
- end
- end
- --Subfunction for Job Ability Precast--
- function precast_ja(spell, action)
- --2hr Trigger--
- if spell.english == "Elemental Sforzo" then
- equip(sets.precast.JA['Elemental Sforzo'])
- --Swordplay Trigger--
- elseif spell.english == "Swordplay" then
- equip(sets.precast.JA['Swordplay'])
- --Vpulse Trigger--
- elseif spell.english == "Vivacious Pulse" then
- equip(sets.precast.JA['Vivacious Pulse'])
- --Default--
- else
- equip(sets.Enmity)
- end
- end
- --Subfunction for Effusion Precast--
- function precast_effusion(spell, action)
- --Lunge / Swipe Trigger--
- if spell.english == "Lunge" or "Swipe" then
- equip(sets.precast.JA['Lunge'])
- --Gambit Trigger--
- elseif spell.english == "Gambit" then
- equip(sets.precast.JA['Gambit'])
- --Rayke Trigger--
- elseif spell.english == "Rayke" then
- equip(sets.precast.JA['Rayke'])
- end
- end
- --Subfunction for Ward Precast--
- function precast_ward(spell, action)
- --Pflug Trigger--
- if spell.english == "Pflug" then
- equip(sets.precast.JA['Pflug'])
- --Valiance / Vallation Trigger--
- elseif spell.english == "Valiance" or "Vallation" then
- equip(sets.precast.JA['Valiance'])
- --Liement Trigger--
- elseif spell.english =="Liement" then
- equip(sets.precast.JA['Liement'])
- --Battuta Trigger--
- elseif spell.english == "Battuta" then
- equip(sets.precast.JA['Battuta'])
- end
- end
- --Subfunction for Weapon Skill Precast--
- function precast_weaponskill(spell, action)
- --Moonshade Trigger--
- if player.tp < 2750 then
- --Dimi Moonshade--
- if spell.english == "Dimidiation" then
- equip(set_combine(sets.precast.WS['Dimidiation'], {rear = 'Moonshade Earring'}))
- --Default Moonshade--
- else
- equip(set_combine(sets.precast.WS, {rear = 'Moonshade Earring'}))
- end
- --Dimidiation--
- elseif spell.english == "Dimidiation" then
- equip(sets.precast.WS['Dimidiation'])
- --Sanguine Blade--
- elseif spell.english == "Sanguine Blade" then
- equip(sets.precast.WS['Sanguine Blade'])
- --Default--
- else
- equip(sets.precast.WS)
- end
- end
- --Subfunction for Midcast Magic--
- function midcast_magic(spell, action)
- --Cancel Ni Shadows before Ichi--
- if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
- send_command('cancel Copy Image')
- send_command('cancel Copy Image (2)')
- end
- --MidCast Gear for Enhancing Magic--
- if spell.skill == 'Enhancing Magic' then
- --Regen Trigger--
- if string.find(spell.english,'Regen')then
- equip(sets.midcast.Regen)
- --Refresh Trigger--
- elseif spell.english == "Refresh" then
- equip(sets.midcast.Refresh)
- --Phalanx Trigger--
- elseif spell.english == "Phalanx" then
- equip(sets.midcast.Phalanx)
- --Foil Exception--
- elseif spell.english == "Foil" then
- equip(sets.Enmity)
- --Default Enhancing--
- else
- equip(sets.midcast['Enhancing Magic'])
- end
- --Default--
- else
- equip(sets.Enmity)
- end
- if SpellInt == 1 then
- equip(sets.midcast.SpellInterrupt)
- end
- end
- --Aftercast Swap while Idle--
- function aftercast_idle()
- --PDT Swap--
- if PDTTrigger == 1 then
- equip(sets.Idle.PDT)
- --MDT Swap--
- elseif MDTTrigger == 1 then
- equip(sets.Idle.MDT)
- --Refresh Idle--
- elseif player.mpp < 95 then
- if player.hpp < 95 then
- if player.mpp < 50 then
- equip(set_combine(sets.Idle.Regen, set_combine(
- sets.Idle.Refresh, {waist = "Fucho-no-Obi"})))
- end
- equip(set_combine(sets.Idle.Regen, sets.Idle.Refresh))
- elseif player.mpp < 50 then
- equip(set_combine(sets.Idle.Refresh, {waist = "Fucho-no-Obi"}))
- else
- equip(sets.Idle.Refresh)
- end
- --Regen Idle--
- elseif player.hpp < 95 then
- if world.time >= 6*60 and world.time <= 18*60 then
- equip(set_combine(sets.Idle.Regen, {hands = 'Garden Bangles'}))
- else
- equip(sets.Idle.Regen)
- end
- --Default--
- else
- equip(sets.Idle.Standard)
- end
- end
- --Aftercast Swap for TP--
- function aftercast_engaged()
- --PDT Swap--
- if PDTTrigger == 1 then
- equip(sets.Idle.PDT)
- --MDT Swap--
- elseif MDTTrigger == 1 then
- equip(sets.Idle.MDT)
- --Acc Swap--
- elseif AccTrigger == 1 then
- equip(sets.engaged.Acc)
- --Default--
- else
- equip(sets.engaged)
- end
- --Disability Swap--
- if buffactive['terror'] or buffactive['petrification']
- or buffactive['stun'] or buffactive['sleep'] then
- if MDTTrigger == 1 then
- equip(sets.Idle.MDT)
- else
- equip(sets.Idle.PDT)
- end
- end
- --Wake Up--
- if buffactive['sleep'] and player.hp > 100 and player.status == "Engaged" then
- equip({head="Frenzy Sallet"})
- end
- end
- --Buff Function--
- function buff_change(buff,gain)
- --Disability Swap--
- if buffactive['terror'] or buffactive['petrification']
- or buffactive['stun'] or buffactive['sleep'] then
- if MDTTrigger == 1 then
- equip(sets.Idle.MDT)
- else
- equip(sets.Idle.PDT)
- end
- end
- --Wake Up--
- if buff == "sleep" and player.hp > 100 and player.status == "Engaged" then
- equip({head="Frenzy Sallet"})
- end
- end
- --Subjob Change--
- function sub_job_change()
- send_command('wait 2.5; input /lockstyleset 003')
- end
- --Rune Switch Function--
- function runeLock(spell)
- --Rune Switch--
- if(spell.english == "Tellus" and runeIndex ~= 1) then
- runeIndex = 1
- add_to_chat(200,'Tellus Locked -- Earth Damage -- Thunder Resist')
- elseif(spell.english == "Unda" and runeIndex ~= 2) then
- runeIndex = 2
- add_to_chat(200,'Unda Locked -- Water Damage -- Fire Resist')
- elseif(spell.english == "Flabra" and runeIndex ~= 3) then
- runeIndex = 3
- add_to_chat(200,'Flabra Locked -- Wind Damage -- Earth Resist')
- elseif(spell.english == "Ignis" and runeIndex ~= 4) then
- runeIndex = 4
- add_to_chat(200,'Ignis Locked -- Fire Damage -- Ice Resist -- ')
- elseif(spell.english == "Gelus" and runeIndex ~= 5) then
- runeIndex = 5
- add_to_chat(200,'Gelus Locked -- Ice Damage -- Wind Resist')
- elseif(spell.english == "Sulpor" and runeIndex ~= 6) then
- runeIndex = 6
- add_to_chat(200,'Sulpor Locked -- Thunder Damage -- Water Resist -- ')
- elseif(spell.english == "Lux" and runeIndex ~= 7) then
- runeIndex = 7
- add_to_chat(200,'Lux Locked -- Light Damage -- Dark Resist')
- elseif(spell.english == "Tenebrae" and runeIndex ~= 8) then
- runeIndex = 8
- add_to_chat(200,'Tenebrae Locked -- Darkness Damage -- Light Resist')
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement