Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- *** Credit goes to Flippant for helping me with Gearswap *** --
- -- ** I Use Some of Motenten's Functions ** --
- -- Last Updated: 05/05/14 12:00 AM *Fixed Magic Sets & Added Precast Elemental Staff Toggle* --
- function get_sets()
- IdleIndex = 1
- IdleArray = {"Movement","Refresh"} -- Default Idle Set Is Movement --
- Armor = 'None'
- Kiting = 'OFF' -- Set Default Avatar/Sublimation Kiting Set ON or OFF Here --
- ElementalStaff = 'OFF' -- Set Default Precast Elemental Staff ON or OFF Here --
- target_distance = 5 -- Set Default Distance Here --
- select_default_macro_book() -- Change Default Macro Book At The End --
- Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
- Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
- sc_map = {SC1 = "Garuda", SC2 = "Ramuh", SC3 = "Fenrir"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
- Cities = S{
- "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","Nashmau","Tavanazian Safehold",
- "Selbina","Mhaura","Norg","Eastern Adoulin","Western Adoulin","Kazham"}
- Avatars = S{
- "Ramuh","Garuda","Alexander","Fenrir","Titan","Shiva","Ifrit","Diabolos",
- "Leviathan","Carbuncle","Odin"}
- -- Use The Following Spirit Spells Again To Trigger Auto Elemental Siphon --
- Spirits = S{
- "Fire Spirit","Ice Spirit","Air Spirit","Earth Spirit","Thunder Spirit",
- "Water Spirit","Light Spirit","Dark Spirit"}
- SpiritPacts = S{
- "FireSpirit","IceSpirit","AirSpirit","EarthSpirit","ThunderSpirit",
- "WaterSpirit","LightSpirit","DarkSpirit"}
- MagicalRagePacts = S{
- 'Inferno','Earthen Fury','Tidal Wave','Aerial Blast','Diamond Dust','Judgement Bolt',
- 'Fire II','Stone II','Water II','Aero II','Blizzard II','Thunder II',
- 'Fire IV','Stone IV','Water IV','Aero IV','Blizzard IV','Thunder IV',
- 'Thunderspark','Burning Strike','Meteorite',
- 'Heavenly Strike','Geocrush','Grand Fall','Thunderstorm',
- 'Holy Mist','Searing Light','Howling Moon','Ruinous Omen','Lunar Bay','Night Terror'}
- MagicalRageFully = S{
- 'Wind Blade','Meteor Strike','Nether Blast','Flaming Crush'}
- Staticpacts = S{
- 'Earthen Ward','Aerial Armor','Soothing Ruby'}
- DebuffBloodPactWard = S{
- 'Diamond Storm','Sleepga','Slowga','Tidal Roar','Nightmare','Pavor Nocturnus',
- 'Ultimate Terror','Somnolence','Lunar Cry','Lunar Roar'}
- -- The Following BPs Can Be Triggered By Using The Avatar Spells Again --
- -- Can Replace Whatever BPs You Like For Each Listed Avatars --
- BloodPactWard = {
- Garuda = "Fleet Wind", Ifrit = "Inferno Howl", Fenrir = "Ecliptic Growl",
- Titan = "Earthen Armor", Leviathan = "Spring Water", Carbuncle = "Soothing Ruby",
- Diabolos = "Noctoshield"}
- durations = {}
- durations['Earthen Armor'] = 232
- durations['Shining Ruby'] = 340
- durations['Dream Shroud'] = 352
- durations['Noctoshield'] = 352
- durations['Inferno Howl'] = 232
- durations['Hastega'] = 352
- durations['Perfect Defense'] = 56
- timer_icons = {}
- -- 00054 for stoneskin, or 00299 for Titan
- timer_icons['Earthen Armor'] = 'spells/00299.png'
- -- 00043 for protect, or 00296 for Carby
- timer_icons['Shining Ruby'] = 'spells/00043.png'
- -- 00304 for Diabolos
- timer_icons['Dream Shroud'] = 'spells/00304.png'
- -- 00106 for phalanx, or 00304 for Diabolos
- timer_icons['Noctoshield'] = 'spells/00106.png'
- -- 00100 for enfire, or 00298 for Ifrit
- timer_icons['Inferno Howl'] = 'spells/00298.png'
- -- 00358 for hastega, or 00301 for Garuda
- timer_icons['Hastega'] = 'spells/00358.png'
- -- Idle Sets --
- sets.Idle = {}
- sets.Idle.Refresh = {
- main="Bolelabunga",
- sub="Genbu's Shield",
- ammo="Seraphicaller",
- head="Con. horn +1",
- neck="Wiglen Gorget",
- ear1="Gifted Earring",
- ear2="Andoaa Earring",
- body="Hagondes coat +1",
- hands="Serpentes Cuffs",
- ring1="Sheltered Ring",
- ring2="Maquette Ring",
- back="Shadow Mantle",
- waist="Moepapa stone",
- legs="Nares Trews",
- feet="Serpentes Sabots"}
- sets.Idle.Movement = set_combine(sets.Idle.Refresh,{
- neck="Wiglen Gorget",
- ring1="Sheltered Ring",
- ring2="Dark Ring",
- feet="Herald's Gaiters"})
- sets.Resting = {
- main="Boonwell Staff",
- ammo="Clarus Stone",
- head="Con. horn +1",
- neck="Eidolon Pendant",
- ear1="Relaxing Earring",
- ear2="Magnetic Earring",
- body="Chelona Blazer",
- hands="Nares Cuffs",
- ring1="Maquette Ring",
- ring2="Paguroidea Ring",
- back="Vita Cape",
- waist="Austerity Belt",
- legs="Nares Trews",
- feet="Chelona Boots"}
- -- PDT Set --
- sets.PDT = {}
- sets.Sublimation = {}
- sets.Precast = {}
- -- Fastcast Set --
- sets.Precast.FastCast = {
- ammo="Impatiens",
- head="Nahtirah Hat",
- neck="Orunmila's Torque",
- ear2="Loquac. Earring",
- body="Marduk's Jubbah +1",
- hands="Repartie gloves",
- ring1="Prolix Ring",
- ring2="Veneficium Ring",
- back="Swith Cape",
- waist="Witful Belt";
- legs="Orvail Pants",
- feet="Chelona Boots"}
- -- Precast BloodPact --
- sets.Precast.BloodPact = {
- head="Glyphic horn +1",
- Body="Summoner's doublet +2",
- hands="Summoner's bracers +2",
- legs="Summoner's spats +2",
- feet="Summoner's pigaches +2"}
- -- Elemental Staves --
- sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash"})
- -- Precast Cure Set --
- sets.Precast.Cure = {
- main="Arka IV",
- sub="Vox Grip",
- head="Nahtirah Hat",
- neck="Ajari necklace",
- ear2="Loquac. Earring",
- body="Heka's Kalasiris",
- hands="Serpetes cuffs",
- ring1="Prolix Ring",
- ring2="Veneficium Ring",
- back="Swith cape",
- waist="Witful Belt";
- legs="Nares trews",
- feet="Serpentes sabots"}
- -- Midcast Base Set --
- sets.Midcast = {}
- -- Haste Set --
- sets.Midcast.Haste = {}
- -- Cure Set --
- sets.Midcast.Cure = {
- main="Tamaxchi",
- sub="Genbu's shield",
- ammo="Impatiens",
- head="Nahtirah Hat",
- neck="Phalaina locket",
- ear2="Loquac. Earring",
- body="Heka's Kalasiris",
- hands="Ayao's gages",
- ring1="Prolix Ring",
- ring2="Veneficium Ring",
- back="Pahtli cape",
- waist="Witful Belt";
- legs="Nares trews",
- feet="Chelona boots"}
- -- Curaga Set --
- sets.Midcast.Curaga = {
- main="Tamaxchi",
- sub="Genbu's Shield",
- ammo="Oreiad's Tathlum",
- head="Nahtirah Hat",
- neck="Nuna Gorget +1",
- ear1="Novia Earring",
- ear2="Loquac. Earring",
- body="Heka's Kalasiris",
- hands="Bokwus Gloves",
- ring1="Aquasoul Ring",
- ring2="Karka Ring",
- back="Pahtli Cape",
- waist="Pythia Sash +1",
- legs="Hagondes Pants",
- feet="Hagondes Sabots"}
- -- Enhancing Magic Set --
- sets.Midcast['Enhancing Magic'] = {
- main="Bolelabunga",
- sub="Genbu's shield",
- head="Umuthi hat",
- neck="Enhancing Torque",
- body="Anhur Robe",
- hands="Ayao's Gages",
- ring1="Prolix Ring",
- ring2="Veneficium Ring",
- waist="Siegel Sash",
- legs="Portent Pants",
- feet="Rubeus Boots"}
- -- Stoneskin Set --
- sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{})
- -- Avatars Sets
- sets.Avatars = {
- main="Bahamut's staff",
- sub="Vox Grip",
- ammo="Seraphicaller",
- head="Con. horn +1",
- ear2="Domes. earring",
- neck="Caller's Pendant",
- body="Hagondes coat +1",
- hands="Adhara gages",
- ring1="Evoker's Ring",
- ring2="Dark Ring",
- back='Samanisi cape',
- waist="Moepapa stone",
- legs="Nares Trews",
- feet="Con. pigaches +1"}
- sets.Avatars['Carbuncle'] = set_combine(sets.Avatars,{hands="Carbuncle Mitts"})
- sets.Avatars['Diabolos'] = set_combine(sets.Avatars,{waist="Diabolos's Rope"})
- -- Avatar's Favor Set --
- sets.Favor = set_combine(sets.Avatars,{
- head="Caller's horn +2",
- body="Caller's doublet +2",
- hands="Summoner's bracers +2",
- ear1="Andoaa earring",
- ring1="Evoker's Ring",
- ring2="Fervor Ring",
- legs="Ngen seraweels",
- waist="cimmerian sash",
- back="Conveyance cape"})
- -- Spirits Set --
- sets.Spirits = set_combine(sets.Avatars,{
- main="Tumafyrig",
- head="Glyphic horn +1",
- ear1="Andoaa earring",
- neck="Eidolon pendant",
- body="Anhur robe",
- hands="Nares cuffs",
- ring2="Fervor ring",
- back="Samanisi cape",
- waist="Cimmerian sash",
- legs="Summoner's spats +2"})
- sets.Spirits['LightSpirit'] = set_combine(sets.Spirits,{back="Conveyance Cape",head='Con. Horn +1',hands='Smn. Bracers +2' })
- sets.Midcast.Pet = {}
- -- Normal BloodPactWard/PD Set --
- sets.Midcast.Pet.BloodPactWard = {
- main="Tumafyrig",
- ammo="Seraphicaller",
- head="Con. horn +1",
- ear1="Andoaa earring",
- neck="Caller's Pendant",
- body="Anhur Robe",
- hands="Smn. Bracers +2",
- ring1="Evoker's Ring",
- ring2="Fervor Ring",
- back="Conveyance Cape",
- waist="Cimmerian Sash",
- legs="Ngen Seraweels",
- feet="Nashira Crackows"}
- -- Magic Accuracy BloodPactWard Set --
- sets.Midcast.Pet.BloodPactWard_MACC = set_combine(sets.Midcast.Pet.BloodPactWard,{
- main="Tumafyrig",
- legs="Smn. Spats +2",
- feet="Caller's Pgch. +2"})
- -- Blood Boon BloodPactWard Set --
- sets.Midcast.Pet.BloodBoon = set_combine(sets.Midcast.Pet.BloodPactWard,{
- main="Soulscourge",
- ear1="Gifted earring",
- waist="Jaq'ij Sash",
- legs="Caller's Spats +2",
- feet="Shedir Crackows"})
- -- Physical BloodPactRage Set --
- sets.Midcast.Pet.PhysicalBloodPactRage = {
- main="Tumafyrig",
- sub="Vox Grip",
- ammo="Seraphicaller",
- head="Con. horn +1",
- neck="Sacrifice torque",
- ear1="Esper Earring",
- ear2="Domes. earring",
- body="Caller's doublet +2",
- hands="Smn. Bracers +2",
- ring1="Evoker's Ring",
- ring2="Fervor Ring",
- back="Samanisi Cape",
- waist="Cimmerian Sash",
- legs="Ngen Seraweels",
- feet="Con. pigaches +1"}
- -- Magical BloodPactRage Set --
- sets.Midcast.Pet.MagicalBloodPactRage = set_combine(sets.Midcast.Pet.PhysicalBloodPactRage,{
- main="Tumafyrig",
- head= "Glyphic horn +1",
- ear2="Andoaa earring",
- neck="Eidolon Pendant",
- hands="Nares cuffs",
- back="Argocham. Mantle",
- legs="Caller's spats +2",
- feet="Hagondes Sabots"})
- -- Magical BloodPactFully Set --
- sets.Midcast.Pet.MagicalBloodPactFully = set_combine(sets.Midcast.Pet.PhysicalBloodPactRage,{
- main="Tumafyrig",
- head= "Glyphic horn +1",
- neck="Eidolon Pendant",
- hands="Nares cuffs",
- back="Argocham. Mantle",
- legs="Ngen Seraweels",
- feet="Hagondes Sabots"})
- -- Shock Squall Set --
- sets.Midcast.Pet['Shock Squall'] = {
- main="Tumafyrig",
- sub="Vox Grip",
- ammo="Seraphicaller",
- head="Con. horn +1",
- neck="Caller's Pendant",
- ear1="Andoaa earring",
- ear2="Gifted Earring",
- body="Anhur robe",
- hands="Smn. Bracers +2",
- ring1="Evoker's Ring",
- ring2="Fervor Ring",
- back="Samanisi Cape",
- legs="Summoner's spats +2",
- feet="Smn. Pigaches +2"}
- -- JA Sets --
- sets.JA = {}
- sets.JA['Mana Cede'] = {hands="Call. Bracers +2"}
- sets.JA['Elemental Siphon'] = set_combine(sets.Midcast.Pet.BloodPactWard,{feet="Caller's Pgch. +2"})
- sets.JA['Astral Flow'] = {head="Glyphic horn +1"}
- -- Melee Set --
- sets.Melee = set_combine(sets.Midcast.Haste,{})
- -- WS Base Set --
- sets.WS = {}
- sets.WS.Shattersoul = {}
- sets.WS.Myrkr = {}
- sets.WS["Garland of Bliss"] = {}
- end
- function pretarget(spell,action)
- if (spell.type:endswith('Magic') or spell.type == "SummonerPact" or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
- cancel_spell()
- send_command('input /item "Echo Drops" <me>')
- elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
- degrade_spell(spell,Cure_Spells)
- elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
- degrade_spell(spell,Curaga_Spells)
- elseif spell.english == 'Shiva' and pet.isvalid then -- Change Shiva Spell To Sleepga When Shiva Is Present --
- cancel_spell()
- send_command('input /pet "Sleepga" <t>')
- elseif spell.english == 'Ramuh' and pet.isvalid then -- Change Ramuh Spell To Shock Squall When Ramuh Is Present --
- cancel_spell()
- send_command('input /pet "Shock Squall" <t>')
- elseif Avatars:contains(spell.english) and pet.isvalid then
- cancel_spell()
- send_command('input /pet "'..BloodPactWard[pet.name]..'" <me>;wait 5;Release')
- elseif Spirits:contains(spell.english) and pet.isvalid then
- cancel_spell()
- send_command('ElementalSiphon;wait 1;Release')
- elseif buffactive['Light Arts'] or buffactive['Addendum: White'] then
- if spell.english == "Light Arts" and not buffactive['Addendum: White'] then
- cancel_spell()
- send_command('input /ja Addendum: White <me>')
- elseif spell.english == "Manifestation" then
- cancel_spell()
- send_command('input /ja Accession <me>')
- elseif spell.english == "Alacrity" then
- cancel_spell()
- send_command('input /ja Celerity <me>')
- elseif spell.english == "Parsimony" then
- cancel_spell()
- send_command('input /ja Penury <me>')
- end
- elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
- if spell.english == "Dark Arts" and not buffactive['Addendum: Black'] then
- cancel_spell()
- send_command('input /ja Addendum: Black <me>')
- elseif spell.english == "Accession" then
- cancel_spell()
- send_command('input /ja Manifestation <me>')
- elseif spell.english == "Celerity" then
- cancel_spell()
- send_command('input /ja Alacrity <me>')
- elseif spell.english == "Penury" then
- cancel_spell()
- send_command('input /ja Parsimony <me>')
- end
- end
- end
- function precast(spell,action)
- if spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
- if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
- cancel_spell()
- add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
- return
- else
- if string.find(spell.english,'Cur') and spell.english ~= "Cursna" then
- equip(sets.Precast.Cure)
- elseif string.find(spell.english,'Utsusemi') then
- if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
- cancel_spell()
- add_to_chat(123, spell.english .. ' Canceled: [3+ Images]')
- return
- else
- equip(sets.Precast.FastCast)
- end
- elseif sets.Precast[spell.skill] then
- equip(sets.Precast[spell.skill])
- else
- equip(sets.Precast.FastCast)
- end
- end
- elseif spell.type == "SummonerPact" then
- if (Avatars:contains(spell.english) or Spirits:contains(spell.english)) then
- if Cities:contains(world.area) then
- cancel_spell()
- add_to_chat(123,'Unable To Summon Pacts In Town')
- return
- else
- if buffactive.silence then -- Cancel SummoningMagic If You Are Silenced --
- cancel_spell()
- add_to_chat(123, spell.name..' Canceled: [Silenced]')
- return
- else
- equip(sets.Precast.FastCast)
- end
- end
- end
- elseif spell.type == "WeaponSkill" then
- if player.status ~= 'Engaged' then
- cancel_spell()
- add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
- return
- elseif sets.WS[spell.english] then
- equip(sets.WS[spell.english])
- end
- elseif spell.type == "JobAbility" then
- if sets.JA[spell.english] then
- equip(sets.JA[spell.english])
- end
- elseif string.find(spell.type,'BloodPact') then
- equip(sets.Precast.BloodPact)
- elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
- cast_delay(0.2)
- send_command('cancel Sneak')
- end
- if sets.Precast[spell.element] and ElementalStaff == 'ON' then
- equip(sets.Precast[spell.element])
- end
- end
- function midcast(spell,action)
- equipSet = {}
- if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' then
- equipSet = sets.Midcast
- if equipSet[spell.english] then
- equipSet = equipSet[spell.english]
- elseif string.find(spell.english,'Cure') then
- equipSet = equipSet.Cure
- elseif string.find(spell.english,'Cura') then
- equipSet = equipSet.Curaga
- elseif spell.english == "Stoneskin" then
- if buffactive.Stoneskin then
- send_command('@wait 2.8;cancel stoneskin')
- end
- equipSet = equipSet.Stoneskin
- elseif spell.english == "Sneak" then
- if spell.target.name == player.name and buffactive['Sneak'] then
- send_command('cancel sneak')
- end
- equipSet = equipSet.Haste
- elseif string.find(spell.english,'Utsusemi') then
- if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
- send_command('@wait 1.7;cancel Copy Image*')
- end
- equipSet = equipSet.Haste
- elseif spell.english == 'Monomi: Ichi' then
- if buffactive['Sneak'] then
- send_command('@wait 1.7;cancel sneak')
- end
- equipSet = equipSet.Haste
- elseif equipSet[spell.skill] then
- equipSet = equipSet[spell.skill]
- end
- elseif equipSet[spell.english] then
- equipSet = equipSet[spell.english]
- end
- equip(equipSet)
- end
- function aftercast(spell,action)
- if not string.find(spell.type,'BloodPact') and not Avatars:contains(spell.english) and not Spirits:contains(spell.english) then
- status_change(player.status)
- elseif spell.english == "Sleepga" and not spell.interrupted then -- Sleepga Countdown --
- send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
- end
- end
- function status_change(new,old)
- if Armor == 'PDT' then
- equip(sets.PDT)
- elseif pet.isvalid then
- if SpiritPacts:contains(pet.name) then
- equip(sets.Spirits)
- elseif buffactive["Avatar's Favor"] then
- equip(sets.Favor)
- else
- equip(sets.Avatars)
- if sets.Avatars[pet.name] then
- equip(sets.Avatars[pet.name])
- end
- end
- if Kiting == 'ON' then
- equip({feet="Herald's Gaiters"})
- end
- elseif buffactive["Sublimation: Activated"] then
- equip(sets.Sublimation)
- if Kiting == 'ON' then
- equip({feet="Herald's Gaiters"})
- end
- elseif new == 'Engaged' then
- equip(sets.Melee)
- elseif new == 'Idle' then
- equip(sets.Idle[IdleArray[IdleIndex]])
- elseif new == 'Resting' then
- equip(sets.Resting)
- end
- end
- function buff_change(buff,gain)
- buff = string.lower(buff)
- if buff == "aftermath: lv.3" then -- AM3 Timer/Countdown --
- if gain then
- send_command('timers create "Aftermath: Lv.3" 180 down;wait 120;input /echo Aftermath: Lv.3 [WEARING OFF IN 60 SEC.];wait 30;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 20;input /echo Aftermath: Lv.3 [WEARING OFF IN 10 SEC.]')
- else
- send_command('timers delete "Aftermath: Lv.3"')
- add_to_chat(123,'AM3: [OFF]')
- end
- elseif buff == 'weakness' then -- Weakness Timer --
- if gain then
- send_command('timers create "Weakness" 300 up')
- else
- send_command('timers delete "Weakness"')
- end
- end
- if not midaction() then
- status_change(player.status)
- end
- end
- function pet_midcast(spell)
- if spell.english == 'Perfect Defense' then
- equip(sets.Midcast.Pet.BloodPactWard)
- elseif spell.type == 'BloodPactWard' then
- if DebuffBloodPactWard:contains(spell.english) then
- equip(sets.Midcast.Pet.BloodPactWard_MACC)
- elseif Staticpacts:contains(spell.english) then
- equip(sets.Midcast.Pet.BloodBoon)
- elseif sets.Midcast.Pet[spell.english] then
- equip(sets.Midcast.Pet[spell.english])
- else
- equip(sets.Midcast.Pet.BloodPactWard)
- end
- elseif spell.type == 'BloodPactRage' then
- if MagicalRagePacts:contains(spell.english) then
- equip(sets.Midcast.Pet.MagicalBloodPactRage)
- elseif MagicalRageFully:contains(spell.english) then
- equip(sets.Midcast.Pet.MagicalBloodPactFully)
- else
- equip(sets.Midcast.Pet.PhysicalBloodPactRage)
- end
- end
- end
- function pet_aftercast(spell)
- if not spell.interrupted then
- -- Create custom timers for ward pacts.
- if durations[spell.english] then
- local timer_cmd = 'timers c "'..spell.english..'" '..tostring(durations[spell.english])..' down'
- if timer_icons[spell.english] then
- timer_cmd = timer_cmd..' '..timer_icons[spell.english]
- end
- send_command(timer_cmd)
- end
- end
- status_change(player.status)
- end
- function pet_change(pet,gain)
- status_change(player.status)
- end
- -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
- function self_command(command)
- if command == 'C1' then -- Kiting Toggle --
- if Kiting == 'ON' then
- Kiting = 'OFF'
- add_to_chat(123,'Kiting Set: [Unlocked]')
- else
- Kiting = 'ON'
- add_to_chat(158,'Kiting Set: [Locked]')
- end
- status_change(player.status)
- elseif command == 'C5' then -- Auto Update Gear Toggle --
- status_change(player.status)
- add_to_chat(158,'Auto Update Gear')
- elseif command == 'C7' then
- if Armor == 'PDT' then -- PDT Toggle --
- Armor = 'None'
- add_to_chat(123,'PDT Set: [Unlocked]')
- else
- Armor = 'PDT'
- add_to_chat(158,'PDT Set: [Locked]')
- end
- status_change(player.status)
- elseif command == 'C8' then -- Distance Toggle --
- if player.target.distance then
- target_distance = math.floor(player.target.distance*10)/10
- add_to_chat(158,'Distance: '..target_distance)
- else
- add_to_chat(123,'No Target Selected')
- end
- elseif command == 'C6' then -- Idle Toggle --
- IdleIndex = (IdleIndex % #IdleArray) + 1
- add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
- status_change(player.status)
- elseif command:match('^SC%d$') then
- send_command('//' .. sc_map[command])
- end
- end
- function actualCost(originalCost)
- if buffactive["Penury"] then
- return originalCost*.5
- elseif buffactive["Light Arts"] then
- return originalCost*.9
- else
- return originalCost
- end
- end
- function degrade_spell(spell,degrade_array)
- spell_index = table.find(degrade_array,spell.name)
- if spell_index > 1 then
- new_spell = degrade_array[spell_index - 1]
- change_spell(new_spell,spell.target.raw)
- add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
- end
- end
- function change_spell(spell_name,target)
- cancel_spell()
- send_command('//'..spell_name..' '..target)
- end
- function sub_job_change(newSubjob, oldSubjob)
- select_default_macro_book()
- end
- function set_macro_page(set,book)
- if not tonumber(set) then
- add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
- return
- end
- if set < 1 or set > 10 then
- add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
- return
- end
- if book then
- if not tonumber(book) then
- add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
- return
- end
- if book < 1 or book > 20 then
- add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
- return
- end
- send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
- else
- send_command('@input /macro set '..tostring(set))
- end
- end
- function select_default_macro_book()
- -- Default macro set/book
- if player.sub_job == 'WHM' then
- set_macro_page(1, 2)
- elseif player.sub_job == 'RDM' then
- set_macro_page(1, 2)
- elseif player.sub_job == 'SCH' then
- set_macro_page(1, 2)
- else
- set_macro_page(1, 2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement