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* --
- -- Jomiru: please see my comments below in the aftercast(), status_change(), and pet_change() functions for changes. --JW 8/23/2014
- 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 = 'ON' -- Set Default Precast Elemental Staff ON or OFF Here --
- target_distance = 5 -- Set Default Distance Here --
- 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","Cait Sith"}
- -- 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','Nether Blast','Flaming Crush',
- 'Meteor Strike','Heavenly Strike','Wind Blade','Geocrush','Grand Fall','Thunderstorm',
- 'Holy Mist','Searing Light','Howling Moon','Ruinous Omen','Lunar Bay','Night Terror'}
- -- 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"}
- DebuffBloodPactWard = S{
- 'Diamond Storm','Sleepga','Slowga','Tidal Roar','Nightmare','Pavor Nocturnus',
- 'Ultimate Terror','Somnolence','Lunar Cry','Lunar Roar'}
- durations = {}
- durations['Earthen Armor'] = 232
- durations['Shining Ruby'] = 340
- durations['Dream Shroud'] = 352
- durations['Noctoshield'] = 352
- durations['Inferno Howl'] = 232
- durations['Hastega'] = 352
- 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="Convoker's Horn +1",
- neck="Twilight Torque",
- ear1="Ethereal Earring",
- ear2="Black Earring",
- body="Hagondes Coat",
- hands="Serpentes Cuffs",
- ring1={name="Dark Ring",augments={"Phys. dmg. taken -6%","Breath dmg. taken -4%","Magic dmg. taken -4%"}},
- ring2={name="Dark Ring",augments={"Enemy crit. hit rate -2","Phys. dmg. taken -5%","Magic dmg. taken -6%"}},
- back="Repulse Mantle",
- waist="Fucho-no-Obi",
- legs="Nares Trews",
- feet="Serpentes Sabots"}
- sets.Idle.Movement = set_combine(sets.Idle.Refresh,{
- feet="Herald's Gaiters"})
- sets.Resting = set_combine(sets.Idle.Refresh,{
- main="Boonwell Staff",
- sub="Vox Grip",
- ammo="Clarus Stone",
- head="Orvail Corona",
- neck="Eidolon Pendant",
- ear2="Antivenom Earring",
- hands="Nares Cuffs",
- ring1="Angha Ring",
- ring2="Star Ring",
- back="Felicitas Cape",
- waist="Austerity Belt",
- legs="Nisse Slacks",
- feet="Chelona Boots"})
- -- PDT Set --
- sets.PDT = {}
- sets.Sublimation = {}
- sets.Precast = {}
- -- Fastcast Set --
- sets.Precast.FastCast = {
- main="Plenitas Virga",
- sub="Vox Grip",
- ammo="Seraphicaller",
- head="Nahtirah Hat",
- ear2="Loquac. Earring",
- body="Hagondes Coat",
- hands="Repartie Gloves",
- ring1="Prolix Ring",
- ring2="Veneficium Ring",
- back="Ogapepo Cape",
- waist="Witful Belt",
- legs="Mes'yohi Slacks",
- feet="Chelona Boots"}
- -- Precast BloodPact --
- sets.Precast.BloodPact = {
- ammo="Seraphicaller",
- head="Convoker's Horn +1",
- body="Glyphic Doublet +1",
- ear1="Caller's Earring",
- hands="Convoker's bracers +1",
- feet="Glyphic Pigaches +1"
- }
- -- Elemental Staves --
- sets.Precast.Thunder = {}
- sets.Precast.Water = {}
- sets.Precast.Fire = {}
- sets.Precast.Ice = {}
- sets.Precast.Wind = {}
- sets.Precast.Earth = {}
- sets.Precast.Light = {}
- sets.Precast.Dark = {}
- sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash"})
- -- Precast Cure Set --
- sets.Precast.Cure = {
- main="Tamaxchi",
- sub="Genbu's Shield",
- head="Nahtirah Hat",
- ear2="Loquac. Earring",
- body="Heka's Kalasiris",
- ring1="Prolix Ring",
- ring2="Veneficium Ring",
- back="Pahtli Cape",
- waist="Witful Belt",
- feet="Chelona Boots"}
- -- Midcast Base Set --
- sets.Midcast = {
- main="Plenitas Virga",
- head="Nahtirah Hat",
- ear2="Loquac. Earring",
- body="Hagondes Coat",
- hands="Repartie Gloves",
- ring1="Prolix Ring",
- ring2="Veneficium Ring",
- back="Ogapepo Cape",
- waist="Witful Belt",
- legs="Mes'yohi Slacks",
- feet="Chelona Boots"}
- -- Haste Set --
- sets.Midcast.Haste = {
- main="Plenitas Virga",
- head="Nahtirah Hat",
- ear2="Loquac. Earring",
- body="Hagondes Coat",
- hands="Repartie Gloves",
- ring1="Prolix Ring",
- ring2="Veneficium Ring",
- back="Ogapepo Cape",
- waist="Witful Belt",
- legs="Mes'yohi Slacks",
- feet="Chelona Boots"}
- -- Cure Set --
- sets.Midcast.Cure = {
- main="Tamaxchi",
- sub="Genbu's Shield",
- head="Nahtirah Hat",
- ear1="Lifestorm Earring",
- ear2="Loquac. Earring",
- body="Heka's Kalasiris",
- hands="Bokwus Gloves",
- ring1="Sirona's Ring",
- ring2="Ephedra Ring",
- back="Pahtli Cape",
- waist="Witful Belt",
- legs="Mes'yohi Slacks",
- feet="Hagondes Sabots"}
- -- Curaga Set --
- sets.Midcast.Curaga = {
- main="Tamaxchi",
- sub="Genbu's Shield",
- head="Nahtirah Hat",
- ear1="Lifestorm Earring",
- ear2="Loquac. Earring",
- body="Heka's Kalasiris",
- hands="Bokwus Gloves",
- ring1="Sirona's Ring",
- ring2="Ephedra Ring",
- back="Pahtli Cape",
- waist="Witful Belt",
- legs="Mes'yohi Slacks",
- feet="Hagondes Sabots"}
- -- Enhancing Magic Set --
- sets.Midcast['Enhancing Magic'] = {
- neck="Colossus's Torque"}
- -- Stoneskin Set --
- sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{neck="Stone Gorget",waist="Siegel Sash"})
- -- Avatars Sets
- sets.Avatars = {
- main="Gridarvor",
- sub="Vox Grip",
- ammo="Seraphicaller",
- head="Convoker's Horn +1",
- neck="Caller's Pendant",
- ear1="Andoaa Earring",
- ear2="Gifted Earring",
- body="Glyphic Doublet +1",
- hands="Regimen Mittens",
- ring2="Fervor Ring",
- ring1="Evoker's Ring",
- back="Conveyance Cape",
- waist="Fucho-no-Obi",
- legs="Nares Trews",
- feet="Convoker's Pigaches +1"}
- sets.Avatars['Carbuncle'] = {
- main="Gridarvor",
- sub="Vox Grip",
- ammo="Seraphicaller",
- head="Convoker's Horn +1",
- neck="Caller's Pendant",
- ear1="Andoaa Earring",
- ear2="Gifted Earring",
- body="Hagondes Coat",
- hands="Carbuncle Mitts",
- ring2="Fervor Ring",
- ring1="Evoker's Ring",
- back="Conveyance Cape",
- waist="Fucho-no-Obi",
- legs="Nares Trews",
- feet="Herald's Gaiters"}
- -- Avatar's Favor Set --
- sets.Favor = {}
- -- Spirits Set --
- sets.Spirits = set_combine(sets.Avatars,{})
- sets.Midcast.Pet = {}
- -- Normal BloodPactWard/PD Set --
- sets.Midcast.Pet.BloodPactWard = {
- main="Eminent Pole",
- sub="Vox Grip",
- ammo="Seraphicaller",
- head="Convoker's Horn +1",
- neck="Caller's Pendant",
- ear1="Andoaa Earring",
- ear2="Gifted Earring",
- body="Caller's Doublet +2",
- hands="Summoner's Bracers",
- ring1="Evoker's Ring",
- ring2="Fervor Ring",
- back="Conveyance Cape",
- waist="Diabolos's Rope",
- legs="Ngen Seraweels",
- feet="Caller's Pgch. +2"}
- -- Magic Accuracy BloodPactWard Set --
- sets.Midcast.Pet.BloodPactWard_MACC = set_combine(sets.Midcast.Pet.BloodPactWard,{
- legs="Summoner's Spats +2",
- feet="Caller's Pgch. +2"})
- -- Physical BloodPactRage Set --
- sets.Midcast.Pet.PhysicalBloodPactRage = {
- main="Gridarvor",
- sub="Vox Grip",
- ammo="Seraphicaller",
- head="Hagondes Hat",
- neck="Caller's Pendant",
- ear1="Andoaa Earring",
- ear2="Gifted Earring",
- body="Convoker's Doublet +1",
- hands="Regimen Mittens",
- ring1="Evoker's Ring",
- ring2="Fervor Ring",
- back="Samanisi Cape",
- waist="Diabolos's Rope",
- legs="Ngen Seraweels",
- feet="Convoker's Pigaches +1"}
- -- Magical BloodPactRage Set --
- sets.Midcast.Pet.MagicalBloodPactRage = set_combine(sets.Midcast.Pet.PhysicalBloodPactRage,{
- main="Eminent Pole",
- head="Bokwus Circlet",
- neck="Eidolon Pendant",
- back="Altius Mantle",
- waist="Caller's Sash",
- legs="Caller's Spats +2",
- feet="Hagondes Sabots"})
- -- Shock Squall Set --
- sets.Midcast.Pet['Shock Squall'] = {
- main="Eminent Pole",
- sub="Vox Grip",
- ammo="Seraphicaller",
- head="Bokwus Circlet",
- neck="Eidolon Pendant",
- ear1="Andoaa Earring",
- ear2="Gifted Earring",
- body="Convoker's Doublet +1",
- hands="Caller's Bracers +2",
- ring1="Evoker's Ring",
- ring2="Fervor Ring",
- back="Conveyance Cape",
- waist="Caller's Sash",
- legs="Caller's Spats +2",
- feet="Caller's Pigaches +2"}
- -- JA Sets --
- sets.JA = {}
- sets.JA['Mana Cede'] = {hands="Call. Bracers +2"}
- sets.JA['Elemental Siphon'] = set_combine(sets.Midcast.Pet.BloodPactWard,{main="Soulscourge",sub="Vox Grip",back="Conveyance Cape",feet="Caller's Pgch. +2"})
- sets.JA['Astral Flow'] = {head="Summoner's Horn +2"}
- -- 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 /echo use echos!')
- 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 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)
- --[[ Since pet_change() is a function that processes on pet gain/loss completely separate from aftercast(),
- it behooves us to force aftercast() to ignore Release and let the status_change() be handled by
- pet_change() instead. Keeps the code simple.
- This is the original statement:
- if not string.find(spell.type,'BloodPact') and not Avatars:contains(spell.english) and not Spirits:contains(spell.english) then
- status_change(player.status)
- Basically this was saying "anything that isn't a bp, isn't an avatar, isn't a spirit, go ahead and hit status_change()."
- The system can't handle this...it's looking for the wrong stuff.
- However, this also suggests we need to leave BP gear on for the duration of the BP and let pet_aftercast() handle the status_change().
- This probably makes sense if it is something that needs MAB or something.
- I'll take this as read; I'm not 100% certain how summoner works, unfortunately.
- One more thing -- we want this to ignore when we summon something. We don't want aftercast() and pet_change() colliding.
- -JW
- ]]--
- if spell.english == "Release" or spell.type =='BloodPactWard' or spell.type == 'BloodPactRage' or spell.type == 'SummonerPact' then
- --add_to_chat(158,'Release or BP or summon, skipping aftercast()')
- return -- Get ouuuuutttt get ouuuttt
- end
- status_change(player.status)
- if 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)
- --add_to_chat(158,'Generic Avatar Gear Activated')
- --[[ I have found the problem with Carbuncle is not endemic to gearswap; rather
- it is a problem with the game itself. When first summoned, Carbuncle may
- spawn nameless (briefly), therefore not allowing the set to properly activate.
- I thoroughly tested that this was the case. I have not seen it happen
- with any other avatars. Therefore, I added a check to see if there is
- a pet out, but it has no "name" at the time of this activation. It
- will automatically apply the Carbuncle gear. This is a clunky clause,
- assuming this will only ever happen with Carbuncle, so I have left
- the test chat in it in case this ever occurs with another avatar. -JW
- ]]--
- if pet.name == nil then -- THE CARBY CLAUSE!
- equip(sets.Avatars['Carbuncle'])
- add_to_chat(123,'<< Nil Avatar Detected: Carbuncle Gear Applied >>')
- end
- if sets.Avatars[pet.name] then
- equip(sets.Avatars[pet.name])
- --add_to_chat(158,'Avatar-specific Gear Activated')
- 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 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 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)
- 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
- add_to_chat(158,'pet_aftercast() activated!')
- if not midaction() then
- status_change(player.status)
- end
- end
- function pet_change(pet,gain)
- --[[ This needs to have a separate check to make sure you're not in the process of doing something else
- when your pet is gained or lost. This is a separate check from your aftercast(), so this will
- goober you up if you cast too quickly after releasing without a midaction() check. --JW ]]--
- if not midaction() then
- status_change(player.status)
- end
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement