Code:
-- *** Credit goes to Flippant for helping me with Gearswap *** --
-- ** I Use Some of Motenten's Functions ** --
function get_sets()
include('organizer-lib')
AccIndex = 1
AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. Default ACC Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
WsAccIndex = 1
WsAccArray = {"LowACC","MidACC","HighACC"}
JugIndex = 1
JugArray = {"Meaty Broth","Windy Greens","Muddy Broth","Blackwater Broth","Tant. Broth","Bubbly Broth","Livid Broth","Trans. Broth"} -- Default Jug Is Meaty Broth. Add/Delete Jugs Here --
PetFoodIndex = 1
PetFoodArray = {"Pet Food Theta","Pet Food Eta","Pet Food Zeta"} -- Default Pet Food Is Theta --
IdleIndex = 1
IdleArray = {"Movement","Regen"} -- Default Idle Set Is Movement --
PetIndex = 1
PetArray = {"Haste","PDT","ACC"} -- Default Pet TP Set Is Haste --
WeaponIndex = 1
WeaponArray = {"Melee","PDT","Sic"} -- Default Weapon Type Is Melee. Don't Input Main/Sub In TP Sets. Melee = Damage Type Axes | PDT = Pet PDT/DT Type Axes | Sic = Sic/Ready Type Axes --
Armor = 'None'
Twilight = 'None'
Pet = 'OFF' -- Set Default Pet Set ON or OFF Here --
target_distance = 5 -- Set Default Distance Here --
select_default_macro_book() -- Change Default Macro Book At The End --
-- Gavialis Helm --
elements = {}
elements.equip = {head="Gavialis Helm"}
elements.Ruinator = S{"Ice","Water","Wind"}
elements.Rampage = S{"Earth"}
-- Ready Moves: Magic Type --
Magical_Ready_Moves = S{
'Acid Mist','Aqua Breath','Blaster','Bubble Shower','Chaotic Eye','Charged Whisker','Corrosive Ooze',
'Cursed Sphere','Dark Spore','Drainkiss','Dream Flower','Dust Cloud','Filamented Hold','Fireball',
'Foul Waters','Geist Wall','Gloeosuccus','Hi-Freq Field','Infrasonics','Intimidate','Jettatura',
'Molting Plumage','Nectarous Deluge','Nepenthic Plunge','Noisome Powder','Numbing Noise','Numbshroom',
'Palsy Pollen','Pestilent Plume','Plague Breath','Purulent Ooze','Queasyshroom','Roar','Sandblast','Sandpit',
'Scream','Shakeshroom','Sheep Song','Silence Gas','Snow Cloud','Soporific','Spider Web','Spoil','Spore',
'Stink Bomb','Toxic Spit','TP Drainkiss','Venom','Venom Spray'}
Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
sc_map = {SC1="Ruinator", SC2="Berserk", SC3="Aggressor"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
-- NOTICE ON STARTUP --
notice(' BEASTMASTER KEY BINDS')
notice(' F12 = Display current Idle/TP/WS Levels.')
notice(' F9 -------- Cycles Accuracy Modes')
notice(' ALT + F9 -- Cycles WS/WS Accuracy Mode')
notice(' F10 ------- Lock/unlock PDT')
notice(' CTRL + F10 - Lock/unlock MDT')
notice(' CTRL + F12 - Cycles Idle Mode')
windower.send_command('bind F9 gs c C1')
windower.send_command('bind !F9 gs c WsAcc')
windower.send_command('bind F10 gs c C7')
windower.send_command('bind ^F10 gs c C15')
windower.send_command('bind ^F12 gs c C6')
windower.send_command('bind F12 gs c current')
-- END --
--Organizer--
organizer_items = {
echos="Echo Drops",
shihei="Shihei",
instantwarp="Instant Warp",
capacity="Capacity Ring",
kumbhakarna="Kumbhakarna",
charmersmerlin="Charmer's Merlin",
}
sets.Idle = {}
-- Regen Set --
sets.Idle.Regen = {
head="Ocelomeh Headpiece +1",
neck="Wiglen Gorget",
ear1="Infused Earring",
ear2="Ethereal Earring",
body="Jumalik Mail",
hands="Umuthi Gloves",
ring1="Sheltered Ring",
ring2="Paguroidea Ring",
back="Solemnity Cape",
waist="Flume Belt",
legs={ name="Valor. Hose", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+3','System: 1 ID: 1795 Val: 8','Pet: Attack+10 Pet: Rng.Atk.+10',}},
feet="Amm Greaves"
}
-- Damage Type Axe & Shield --
sets.Idle.Regen.Melee = set_combine(sets.Idle.Regen,{
main="Kumbhakarna",
sub="Beatific Shield +1"})
-- Damage Type Axes: NIN Sub --
sets.Idle.Regen.Melee.NIN = set_combine(sets.Idle.Regen,{
main="Kumbhakarna",
sub="Hunahpu"})
-- Damage Type Axes: DNC Sub --
sets.Idle.Regen.Melee.DNC = set_combine(sets.Idle.Regen,{
main="Kumbhakarna",
sub="Hunahpu"})
-- Pet PDT/DT Type Axe & Shield --
sets.Idle.Regen.PDT = set_combine(sets.Idle.Regen,{
main="Izizoeksi",
sub="Beatific Shield +1"})
-- Pet PDT/DT Type Axes: NIN Sub --
sets.Idle.Regen.PDT.NIN = set_combine(sets.Idle.Regen,{
main="Kumbhakarna",
sub="Izizoeksi",})
-- Pet PDT/DT Type Axes: DNC Sub --
sets.Idle.Regen.PDT.DNC = set_combine(sets.Idle.Regen,{
main="Kumbhakarna",
sub="Izizoeksi",})
-- Sic/Ready Type Axe & Shield --
sets.Idle.Regen.Sic = set_combine(sets.Idle.Regen,{
main="Charmer's Merlin",
sub="Beatific Shield +1"})
-- Sic/Ready Type Axes: NIN Sub --
sets.Idle.Regen.Sic.NIN = set_combine(sets.Idle.Regen,{
main="Kumbhakarna",
sub="Charmer's Merlin"})
-- Sic/Ready Type Axes: DNC Sub --
sets.Idle.Regen.Sic.DNC = set_combine(sets.Idle.Regen,{
main="Kumbhakarna",
sub="Charmer's Merlin"})
-- Movement Set --
sets.Idle.Movement = set_combine(sets.Idle.Regen,{})
-- Damage Type Axe & Shield --
sets.Idle.Movement.Melee = set_combine(sets.Idle.Movement,{
main="Kumbhakarna",
sub="Beatific Shield +1"})
-- Damage Type Axes: NIN Sub --
sets.Idle.Movement.Melee.NIN = set_combine(sets.Idle.Movement,{
main="Kumbhakarna",
sub="Hunahpu"})
-- Damage Type Axes: DNC Sub --
sets.Idle.Movement.Melee.DNC = set_combine(sets.Idle.Movement,{
main="Kumbhakarna",
sub="Hunahpu"})
-- Pet PDT/DT Type Axe & Shield --
sets.Idle.Movement.PDT = set_combine(sets.Idle.Movement,{
main="Izizoeksi",
sub="Beatific Shield +1"})
-- Pet PDT/DT Type Axes: NIN Sub --
sets.Idle.Movement.PDT.NIN = set_combine(sets.Idle.Movement,{
main="Izizoeksi",
sub="Astolfo"})
-- Pet PDT/DT Type Axes: DNC Sub --
sets.Idle.Movement.PDT.DNC = set_combine(sets.Idle.Movement,{
main="Izizoeksi",
sub="Astolfo"})
-- Sic/Ready Type Axe & Shield --
sets.Idle.Movement.Sic = set_combine(sets.Idle.Movement,{
main="Charmer's Merlin",
sub="Beatific Shield +1"})
-- Sic/Ready Type Axes: NIN Sub --
sets.Idle.Movement.Sic.NIN = set_combine(sets.Idle.Movement,{
main="Kumbhakarna",
sub="Charmer's Merlin"})
-- Sic/Ready Type Axes: DNC Sub --
sets.Idle.Movement.Sic.DNC = set_combine(sets.Idle.Movement,{
main="Kumbhakarna",
sub="Charmer's Merlin"})
sets.Twilight = {head="Twilight Helm",body="Twilight Mail"}
-- TP Base Set --
--sets.TP = {}
--Normal TP Sets --
sets.TP = {
ammo="Ginsen",
head="Otomi Helm",
neck="Asperity Necklace",
ear1="Brutal Earring",
ear2="Suppanomimi",
body="Uac Jerkin",
hands={ name="Valorous Mitts", augments={'Pet: Accuracy+23 Pet: Rng. Acc.+23','Pet: Haste+4','Pet: Attack+9 Pet: Rng.Atk.+9',}},
ring1="Epona's Ring",
ring2="Petrov Ring",
back="Bleating Mantle",
waist="Windbuffet Belt +1",
legs="Obatala Subligar",
feet="Loyalist Sabatons",}
sets.TP.MidACC = set_combine(sets.TP,{})
sets.TP.HighACC = set_combine(sets.TP.MidACC,{})
-- High Haste Sets --
-- March x2 + Haste --
-- Embrava + (March or Haste) --
-- Geo Haste + (March or Haste or Embrava) --
sets.TP.HighHaste = set_combine(sets.TP,{})
sets.TP.MidACC.HighHaste = set_combine(sets.TP.MidACC, {})
sets.TP.HighACC.HighHaste = set_combine(sets.TP.HighACC, {})
sets.TP.Pet = {}
-- Pet Haste Gear --
sets.TP.Pet.Haste = {ammo="Demonry Core",
head={ name="Valorous Mask", augments={'Pet: Accuracy+22 Pet: Rng. Acc.+22','Pet: "Dbl.Atk."+2 Pet: Crit.hit rate +2','Pet: Attack+14 Pet: Rng.Atk.+14',}},
neck="Empath Necklace",
ear1="Domesticator's Earring",
ear2="Handler's Earring +1",
body={ name="Taeon Tabard", augments={'Pet: Accuracy+17 Pet: Rng. Acc.+17',}},
hands={ name="Valorous Mitts", augments={'Pet: Accuracy+23 Pet: Rng. Acc.+23','Pet: Haste+4','Pet: Attack+9 Pet: Rng.Atk.+9',}},
ring1="Vocane Ring",
ring2="Defending Ring",
back={ name="Pastoralist's Mantle", augments={'STR+4 DEX+4','Accuracy+2','Pet: Accuracy+15 Pet: Rng. Acc.+15','Pet: Damage taken -3%',}},
waist="Flume Belt",
legs={ name="Valor. Hose", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+3','System: 1 ID: 1795 Val: 8','Pet: Attack+10 Pet: Rng.Atk.+10',}},
feet={ name="Valorous Greaves", augments={'Pet: Accuracy+30 Pet: Rng. Acc.+30','Pet: "Regen"+5',}},
}
-- Pet PDT Gear --
sets.TP.Pet.PDT = set_combine(sets.TP.Pet.Haste,{})
-- Pet ACC Gear --
sets.TP.Pet.ACC = set_combine(sets.TP.Pet.Haste,{})
-- PDT/MDT/Kiting Sets --
sets.PDT = {
head="Jumalik Helm",
neck="Twilight Torque",
ear1="Dudgeon Earring",
ear2="Heartseeker Earring",
body="Jumalik Mail",
hands="Umuthi Gloves",
ring1="Vocane Ring",
ring2="Defending Ring",
back="Solemnity Cape",
waist="Flume Belt",
legs={ name="Valor. Hose", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+3','System: 1 ID: 1795 Val: 8','Pet: Attack+10 Pet: Rng.Atk.+10',}},
feet="Amm Greaves"}
sets.MDT = set_combine(sets.PDT,{})
sets.Kiting = set_combine(sets.PDT,{feet="Skd. Jambeaux +1"})
-- Hybrid Sets --
sets.TP.Hybrid = set_combine(sets.PDT,{})
sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
-- WS Base Set --
sets.WS = {}
-- WS Sets --
sets.WS.Ruinator = {}
sets.WS.Ruinator.MidACC = set_combine(sets.WS.Ruinator,{})
sets.WS.Ruinator.HighACC = set_combine(sets.WS.Ruinator.MidACC,{})
sets.WS.Onslaught = {}
sets.WS.Cloudsplitter = {}
sets.WS["Primal Rend"] = {}
sets.WS.Rampage = {}
-- JA Sets --
sets.JA = {}
TH_Gear = {waist="Chaac Belt"}
sets.JA.Reward = {
head="Khimaira Bonnet",
ear1="Lifestorm Earring",
body="Emet Harness +1",
hands="Ogre Gloves", --10%
ring1="Sirona's Ring",
ring2="Perception Ring",
back={ name="Pastoralist's Mantle", augments={'STR+4 DEX+4','Accuracy+2','Pet: Accuracy+15 Pet: Rng. Acc.+15','Pet: Damage taken -3%',}},
legs="Ankusa Trousers",
feet="Loyalist Sabatons"} --35%
sets.JA.Charm = {}
sets.JA.Tame = {head="Totemic Helm +1"}
sets.JA.Familiar = {legs="Ankusa Trousers +1"}
sets.JA["Call Beast"] = {body="Mirke Wardecors",hands="Monster Gloves +2"}
sets.JA["Bestial Loyalty"] = sets.JA["Call Beast"]
sets.JA["Feral Howl"] = {body="An. Jackcoat +1",waist="Chaac Belt"}
sets.JA["Killer Instinct"] = {head="Ankusa Helm +1"}
sets.JA.Provoke = TH_Gear
sets.JA.Steal = TH_Gear
sets.JA.Mug = TH_Gear
sets.Pet = {}
sets.Pet.Sic = {sub="Charmer's Merlin",legs="Desultor Tassets"}
sets.Pet.Ready = {sub="Charmer's Merlin",legs="Desultor Tassets"}
sets.Pet.Spur = {feet="Nukumi Ocreae +1"}
-- Physical Type Ready Moves: Add Pet Attack & Accuracy Gear Here --
sets.Physical_Ready_Moves = {
ammo="Demonry Core",
head={ name="Valorous Mask", augments={'Pet: Accuracy+22 Pet: Rng. Acc.+22','Pet: "Dbl.Atk."+2 Pet: Crit.hit rate +2','Pet: Attack+14 Pet: Rng.Atk.+14',}},
neck="Empath Necklace",
ear1="Domesticator's Earring",
ear2="Handler's Earring +1",
body={ name="Taeon Tabard", augments={'Pet: Accuracy+17 Pet: Rng. Acc.+17',}},
hands="Nukumi Manoplas",
ring1="Vocane Ring",
ring2="Defending Ring",
back={ name="Pastoralist's Mantle", augments={'STR+4 DEX+4','Accuracy+2','Pet: Accuracy+15 Pet: Rng. Acc.+15','Pet: Damage taken -3%',}},
waist="Flume Belt",
legs={ name="Valor. Hose", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+3','System: 1 ID: 1795 Val: 8','Pet: Attack+10 Pet: Rng.Atk.+10',}},
feet={ name="Valorous Greaves", augments={'Pet: Accuracy+30 Pet: Rng. Acc.+30','Pet: "Regen"+5',}},
}
-- Magic Type Ready Moves: Add Pet Magic Attack & Magic Accuracy Gear Here --
sets.Magical_Ready_Moves = set_combine(sets.Physical_Ready_Moves, {})
-- Step Set --
sets.Step = set_combine({},TH_Gear)
-- Flourish Set --
sets.Flourish = set_combine({},TH_Gear)
-- Waltz Set --
sets.Waltz = {}
sets.Precast = {}
-- Fastcast Set --
sets.Precast.FastCast = set_combine(sets.PDT, {
neck="Voltsurge Torque",
ear1="Loquac. Earring",
body={ name="Taeon Tabard", augments={'Pet: Accuracy+17 Pet: Rng. Acc.+17',}},
ring1="Prolix Ring"})
sets.Midcast = {}
-- Magic Haste Set --
sets.Midcast.Haste = set_combine(sets.PDT,{})
-- Cure Set --
sets.Midcast.Cure = set_combine(sets.PDT, {
ear2="Mendi. Earring",
body="Jumalik Mail",
back="Solemnity Cape"
})
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 F10')
windower.send_command('unbind ^F10')
windower.send_command('unbind F12')
notice('Unbinding Blue Mage Interface.')
end
function pretarget(spell,action)
if midaction() or pet_midaction() then
cancel_spell()
return
elseif spell.action_type == 'Magic' and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
cancel_spell()
send_command('input /item "Echo Drops" <me>')
elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
cancel_spell()
send_command('Aggressor')
elseif spell.type == 'WeaponSkill' and player.status == 'Engaged' then
if spell.english ~= 'Bora Axe' and spell.name ~= 'Mistral Axe' and spell.target.distance > target_distance then -- Cancel WS If You Are Out Of Range --
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
end
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)
end
end
function precast(spell,action)
if midaction() or pet_midaction() then
cancel_spell()
return
elseif spell.type == "WeaponSkill" then
if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
cancel_spell()
add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
return
else
equipSet = sets.WS
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
--EDITED CODE--
if equipSet[WsAccArray[WsAccIndex]] then
equipSet = equipSet[WsAccArray[WsAccIndex]]
end
--END EDITED CODE-
if elements[spell.name] and elements[spell.name]:contains(world.day_element) then
equipSet = set_combine(equipSet,elements.equip)
end
if buffactive['Killer Instinct'] then
equipSet = set_combine(equipSet,{body="Nukumi Gausape +1"})
end
--if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
--equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
--end
-- if spell.english == "Ruinator" or spell.english == "Rampage" then
-- if world.time <= (7*60) or world.time >= (17*60) then -- Equip Lugra Earring +1 From Dusk To Dawn --
-- equipSet = set_combine(equipSet,{ear1="Lugra Earring +1"})
--end
--end
equip(equipSet)
end
elseif spell.type == "JobAbility" then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
elseif spell.action_type == 'Magic' then
if spell.english == 'Utsusemi: Ni' then
if buffactive['Copy Image (3)'] then
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
return
else
equip(sets.Precast.FastCast)
end
else
equip(sets.Precast.FastCast)
end
elseif spell.type == "Waltz" then
refine_waltz(spell,action)
equip(sets.Waltz)
elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
cast_delay(0.2)
send_command('cancel Sneak')
elseif spell.type == "PetCommand" then
equip(sets.Pet[spell.english])
end
if Pet == 'ON' then -- Use Pet Toggle For Pet TP Set --
equip(sets.TP.Pet[PetArray[PetIndex]])
end
if Twilight == 'Twilight' then
equip(sets.Twilight)
end
end
function midcast(spell,action)
if pet_midaction() then
return
elseif spell.action_type == 'Magic' then
if spell.english:startswith('Cur') and spell.english ~= "Cursna" then
equip(sets.Midcast.Cure)
elseif spell.english:startswith('Utsusemi') then
if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then
send_command('@wait 1.7;cancel Copy Image*')
end
equip(sets.Midcast.Haste)
elseif spell.english == 'Monomi: Ichi' then -- Cancel Sneak --
if buffactive['Sneak'] then
send_command('@wait 1.7;cancel sneak')
end
equip(sets.Midcast.Haste)
elseif spell.english == 'Flash' or spell.english == 'Drain' or spell.english == 'Aspir' or spell.english == 'Dispel' or spell.english:startswith('Dia') or spell.english:startswith('Bio') or spell.english:startswith('Sleep') then
equip(set_combine(sets.Midcast.Haste,{waist="Chaac Belt"}))
else
equip(sets.Midcast.Haste)
end
end
if spell.type == 'Trust' then
equip(sets.Midcast.Trust)
end
end
function aftercast(spell,action)
if pet_midaction() then
return
elseif spell.type == "WeaponSkill" and not spell.interrupted then
send_command('wait 0.2;gs c TP')
elseif not spell.type == "PetCommand" then
status_change(player.status)
end
end
function status_change(new,old)
check_equip_lock()
if Armor == 'PDT' then
equip(sets.PDT)
elseif Armor == 'MDT' then
equip(sets.MDT)
elseif Armor == 'Kiting' then
equip(sets.Kiting)
elseif new == 'Engaged' then
equipSet = sets.TP
if Armor == 'Hybrid' and equipSet["Hybrid"] then
equipSet = equipSet["Hybrid"]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if (buffactive.Embrava and (buffactive.March or buffactive.Haste)) or (buffactive.March == 2 and buffactive.Haste) or (buffactive[580] and (buffactive.March or buffactive.Haste or buffactive.Embrava)) and equipSet["HighHaste"] then
equipSet = equipSet["HighHaste"]
end
equip(equipSet)
else
equipSet = sets.Idle
if equipSet[IdleArray[IdleIndex]] then
equipSet = equipSet[IdleArray[IdleIndex]]
end
if equipSet[WeaponArray[WeaponIndex]] then
equipSet = equipSet[WeaponArray[WeaponIndex]]
end
if equipSet[player.sub_job] then
equipSet = equipSet[player.sub_job]
end
if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
end
if world.area:endswith('Adoulin') then
equipSet = set_combine(equipSet,{body="Councilor's Garb"})
end
equip(equipSet)
end
if Pet == 'ON' then -- Use Pet Toggle For Pet TP Set --
equip(sets.TP.Pet[PetArray[PetIndex]])
end
if Twilight == 'Twilight' then
equip(sets.Twilight)
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 150;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 15;input /echo Aftermath: Lv.3 [WEARING OFF IN 15 SEC.];wait 5;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() and not pet_midaction() then
status_change(player.status)
end
if buff == 'doom' then
if gain then
send_command('timers create "Doom" 29 down')
send_command('gs disable ring1 ;gs disable ring2')
equip(sets.buffs.Doom)
add_to_chat(123,'Doom ring on')
elseif not gain then
send_command('timers delete "Doom"')
enable('left_ring')
enable('right_ring')
add_to_chat(123,'DOOM IS OFF')
status_change(player.status)
end
end
end
function pet_midcast(spell,action)
if spell.target.type == 'MONSTER' then
if Magical_Ready_Moves:contains(spell.english) then
equip(sets.Magical_Ready_Moves)
else
equip(sets.Physical_Ready_Moves)
end
end
end
function pet_aftercast(spell,action)
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 -- Accuracy Level Toggle --
AccIndex = (AccIndex % #AccArray) + 1
add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
status_change(player.status)
--MANUAL CODE--
elseif command == 'WsAcc' then -- WS ACC TOGGLE
WsAccIndex = (WsAccIndex % #WsAccArray) +1
add_to_chat(158,'Weapon Skill ACC Lv.: '..WsAccArray[WsAccIndex])
status_change(player.status)
--END MANUAL CODE--
elseif command == 'C5' then -- Auto Update Gear Toggle --
status_change(player.status)
add_to_chat(158,'Auto Update Gear')
elseif command == 'C17' then -- Weapon Type Toggle --
WeaponIndex = (WeaponIndex % #WeaponArray) + 1
add_to_chat(158,'Weapon Type: '..WeaponArray[WeaponIndex])
status_change(player.status)
elseif command == 'C16' then -- Pet TP Set Toggle --
PetIndex = (PetIndex % #PetArray) + 1
add_to_chat(158,'Pet TP Set: ' .. PetArray[PetIndex])
status_change(player.status)
elseif command == 'C10' then -- Jug Toggle --
JugIndex = (JugIndex % #JugArray) + 1
add_to_chat(158,'Jug: ' .. JugArray[JugIndex])
sets.JA['Call Beast'].ammo = JugArray[JugIndex]
status_change(player.status)
elseif command == 'C11' then -- Pet Food Toggle --
PetFoodIndex = (PetFoodIndex % #PetFoodArray) + 1
add_to_chat(158,'Pet Food: ' .. PetFoodArray[PetFoodIndex])
sets.JA.Reward.ammo = PetFoodArray[PetFoodIndex]
status_change(player.status)
elseif command == 'C2' then -- Hybrid Toggle --
if Armor == 'Hybrid' then
Armor = 'None'
add_to_chat(123,'Hybrid Set: [Unlocked]')
else
Armor = 'Hybrid'
add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
end
status_change(player.status)
elseif command == 'C7' then -- PDT Toggle --
if Armor == 'PDT' then
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 == 'C15' then -- MDT Toggle --
if Armor == 'MDT' then
Armor = 'None'
add_to_chat(123,'MDT Set: [Unlocked]')
else
Armor = 'MDT'
add_to_chat(158,'MDT Set: [Locked]')
end
status_change(player.status)
elseif command == 'C12' then -- Kiting Toggle --
if Armor == 'Kiting' then
Armor = 'None'
add_to_chat(123,'Kiting Set: [Unlocked]')
else
Armor = 'Kiting'
add_to_chat(158,'Kiting Set: [Locked]')
end
status_change(player.status)
elseif command == 'C9' then -- Pet Toggle --
if Pet == 'ON' then
Pet = 'OFF'
add_to_chat(123,'Pet Set: [Unlocked]')
else
Pet = 'ON'
add_to_chat(158,'Pet Set: [Locked]')
end
status_change(player.status)
elseif command == 'C3' then -- Twilight Toggle --
if Twilight == 'Twilight' then
Twilight = 'None'
add_to_chat(123,'Twilight Set: [Unlocked]')
else
Twilight = 'Twilight'
add_to_chat(158,'Twilight 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 == 'TP' then
add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
elseif command:match('^SC%d$') then
send_command('//' .. sc_map[command])
end
if command == 'current' then
add_to_chat(207,'Idle Set Active: '..IdleArray[IdleIndex]..'')
add_to_chat(207,'TP Set Active: '..AccArray[AccIndex]..'')
add_to_chat(207,'WS Set Active: '..WsAccArray[WsAccIndex]..'')
end
end
function check_equip_lock() -- Lock Equipment Here --
--[[if player.equipment.left_ring == "Warp Ring" or player.equipment.left_ring == "Capacity Ring" or player.equipment.right_ring == "Warp Ring" or player.equipment.right_ring == "Capacity Ring" then
disable('ring1','ring2')
elseif player.equipment.back == "Mecisto. Mantle" or player.equipment.back == "Aptitude Mantle +1" or player.equipment.back == "Aptitude Mantle" then
disable('back')
else
enable('ring1','ring2','back')
end --]]
end
function actualCost(originalCost)
if buffactive["Penury"] then
return originalCost*.5
elseif buffactive["Light Arts"] or buffactive["Addendum: White"] then
return originalCost*.9
elseif buffactive["Dark Arts"] or buffactive["Addendum: Black"] then
return originalCost*1.1
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 refine_waltz(spell,action)
if spell.type ~= 'Waltz' then
return
end
if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" or spell.name == "Divine Waltz II" then
return
end
local newWaltz = spell.english
local waltzID
local missingHP
if spell.target.type == "SELF" then
missingHP = player.max_hp - player.hp
elseif spell.target.isallymember then
local target = find_player_in_alliance(spell.target.name)
local est_max_hp = target.hp / (target.hpp/100)
missingHP = math.floor(est_max_hp - target.hp)
end
if missingHP ~= nil then
if player.sub_job == 'DNC' then
if missingHP < 40 and spell.target.name == player.name then
add_to_chat(123,'Full HP!')
cancel_spell()
return
elseif missingHP < 150 then
newWaltz = 'Curing Waltz'
waltzID = 190
elseif missingHP < 300 then
newWaltz = 'Curing Waltz II'
waltzID = 191
else
newWaltz = 'Curing Waltz III'
waltzID = 192
end
else
return
end
end
local waltzTPCost = {['Curing Waltz'] = 200, ['Curing Waltz II'] = 350, ['Curing Waltz III'] = 500, ['Curing Waltz IV'] = 650, ['Curing Waltz V'] = 800}
local tpCost = waltzTPCost[newWaltz]
local downgrade
if player.tp < tpCost and not buffactive.trance then
if player.tp < 200 then
add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
cancel_spell()
return
elseif player.tp < 350 then
newWaltz = 'Curing Waltz'
elseif player.tp < 500 then
newWaltz = 'Curing Waltz II'
elseif player.tp < 650 then
newWaltz = 'Curing Waltz III'
elseif player.tp < 800 then
newWaltz = 'Curing Waltz IV'
end
downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
end
if newWaltz ~= spell.english then
send_command('@input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
if downgrade then
add_to_chat(158, downgrade)
end
cancel_spell()
return
end
if missingHP > 0 then
add_to_chat(158,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
end
end
function find_player_in_alliance(name)
for i,v in ipairs(alliance) do
for k,p in ipairs(v) do
if p.name == name then
return p
end
end
end
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 == 'WAR' then
set_macro_page(1, 17)
elseif player.sub_job == 'WHM' then
set_macro_page(1, 17)
elseif player.sub_job == 'DNC' then
set_macro_page(1, 17)
elseif player.sub_job == 'NIN' then
set_macro_page(1, 17)
else
set_macro_page(1, 17)
end
end
Overall , all the gearswaps this person makes has been good for me and normally extremely easy for me to edit coding or adding coding in without breaking anything, however the BST one seems to have an issue. If anyone would be able to help figure out what's wrong with it, I'd be very grateful. I'm assuming the problem code may be around line ~421.