Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_sets()
- AccIndex = 1
- AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. Default ACC Set Is LowACC. The First TP Set Of Your Main Weapon Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
- IdleIndex = 1
- IdleArray = {"Movement","Regen"} -- Default Idle Set Is Movement --
- Armor = 'None'
- Skillchain = false
- target_distance = 5 -- Set Default Distance Here --
- select_default_macro_book() -- Change Default Macro Book At The End --
- sc_map = {SC1="Exenterator", SC2="FeatherStep", SC3="HasteSamba"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
- -- Idle/Town Sets --
- sets.Idle = {}
- sets.Idle.Regen = {
- ammo="Vanir Battery",
- head="Oce. Headpiece +1",
- neck="Wiglen Gorget",
- ear1="Sanare Earring",
- ear2="Colossus's Earring",
- body="Kheper Jacket",
- hands="Iuitl Wristbands",
- ring1="Paguroidea Ring",
- ring2="Sheltered Ring",
- back="Repulse Mantle",
- waist="Flume Belt",
- legs="Iuitl Tights",
- feet="Skd. Jambeaux +1"}
- sets.Idle.Movement = set_combine(sets.Idle.Regen,{
- ammo="Vanir Battery",
- head="Oce. Headpiece +1",
- neck="Wiglen Gorget",
- ear1="Sanare Earring",
- ear2="Colossus's Earring",
- body="Kheper Jacket",
- hands="Iuitl Wristbands",
- ring1="Paguroidea Ring",
- ring2="Sheltered Ring",
- back="Repulse Mantle",
- waist="Flume Belt",
- legs="Iuitl Tights",
- feet="Skd. Jambeaux +1"})
- -- Normal TP Sets --
- sets.TP = {
- ammo="Ginsen",
- head="Iuitl Headgear +1",
- neck="Charis Necklace",
- ear1="Heartseeker Earring",
- ear2="Dudgeon Earring",
- body="Qaaxo Harness",
- hands="Iuitl Wristbands",
- ring1="Epona's Ring",
- ring2="Rajas Ring",
- back="Toetapper Mantle",
- waist="Shetal Stone",
- legs="Iuitl Tights",
- feet="Horos toe Shoes +1"}
- sets.TP.MidACC = set_combine(sets.TP,{
- ammo="Honed Tathlum",
- back="Letalis Mantle"})
- sets.TP.HighACC = set_combine(sets.TP.MidACC,{
- head="Whirlpool Mask",
- neck="Ej necklace +1",
- body="Manibozho Jerkin",
- hands="Buremte Gloves",
- ring1="Patricius Ring",
- ring2="Mars's Ring",
- waist="Hurch'lan Sash",
- legs="Maxixi Tights +1",
- feet="Horos toe Shoes +1"})
- -- March x2 + Haste --
- sets.TP.MidHaste = set_combine(sets.TP,{
- waist="Windbuffet Belt +1",
- ear1="Suppanomimi",
- neck="Asperity Necklace",
- ear2="Brutal Earring"})
- sets.TP.MidACC.MidHaste = set_combine(sets.TP.MidHaste,{
- ammo="Honed Tathlum",
- back="Letalis Mantle"})
- sets.TP.HighACC.MidHaste = set_combine(sets.TP.MidACC.MidHaste,{
- head="Whirlpool Mask",
- neck="Ej necklace +1",
- body="Manibozho Jerkin",
- hands="Buremte Gloves",
- ring1="Patricius Ring",
- ring2="Mars's Ring",
- waist="Hurch'lan Sash",
- legs="Maxixi Tights +1",
- feet="Horos Toe Shoes +1"})
- -- March x2 + Haste + Samba --
- sets.TP.HighHaste = set_combine(sets.TP.MidHaste,{
- neck="Asperity Necklace",
- ear1="Tripudio Earring",
- ear2="Brutal Earring",
- back="Bleating Mantle",
- waist="Windbuffet Belt +1"})
- sets.TP.MidACC.HighHaste = set_combine(sets.TP.HighHaste,{
- ammo="Honed Tathlum",
- ear1="Steelflash Earring",
- ear2="Bladeborn Earring",
- back="Letalis Mantle"})
- sets.TP.HighACC.HighHaste = set_combine(sets.TP.MidACC.HighHaste,{
- head="Whirlpool Mask",
- neck="Ej necklace +1",
- body="Manibozho Jerkin",
- hands="Buremte Gloves",
- ring1="Patricius Ring",
- ring2="Mars's Ring",
- waist="Hurch'lan Sash",
- legs="Maxixi Tights +1",
- feet="Horos Toe Shoes +1"})
- -- Saber Dance TP Set --
- sets.TP['Saber Dance'] = {legs="Horos Tights"}
- -- Climactic Flourish TP Set --
- sets.TP['Climactic Flourish'] = {head="Charis Tiara +2"}
- -- PDT/MDT Sets --
- sets.PDT = {
- ammo="Ginsen",
- head="Iuitl Headgear +1",
- neck="Twilight Torque",
- ear1="Suppnomimi",
- ear2="Brutal Earring",
- body="Qaaxo harness",
- hands="Iuitl Wristbands",
- ring1="Dark Ring",
- ring2="Defending Ring",
- back="Mollusca Mantle",
- waist="Flume Belt",
- legs="Iuitl Tights",
- feet="Iuitl Gaiters"}
- sets.MDT = set_combine(sets.PDT,{
- ear1="Merman's Earring",
- ear2="Sanare Earring",
- ring1="Shadow Ring",
- back="Engulfer Cape",
- waist="Resolute Belt"})
- -- Hybrid/Evasion Sets --
- sets.TP.Hybrid = set_combine(sets.PDT,{
- head="Felistris Mask",
- ear1="Heartseeker Earring",
- ear2="Dudgeon Earring",
- body="Thaumas Coat",
- waist="Windbuffet Belt"})
- sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
- sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
- sets.Evasion = set_combine(sets.PDT,{})
- -- WS Base Set --
- sets.WS = {}
- -- WS Sets --
- sets.WS.Exenterator = {
- head="Felistris Mask",
- neck="Justiciar's Torque",
- ear1="Steelflash Earring",
- ear2="Bladeborn Earring",
- body="Khepri Jacket",
- hands="Iuitl Wristbands +1",
- ring1="Stormsoul Ring",
- ring2="Epona's Ring",
- back="Atheling Mantle",
- waist="Elanid Belt",
- legs="Nahtirah Trousers",
- feet="Iuitl Gaiters +1"}
- sets.WS.Exenterator.MidACC = set_combine(sets.WS.Exenterator,{})
- sets.WS.Exenterator.HighACC = set_combine(sets.WS.Exenterator.MidACC,{})
- sets.WS["Pyrrhic Kleos"] = {
- head="Uk'uxkaj Cap",
- neck="Love Torque",
- ear1="Jupiter's Pearl",
- ear2="Brutal Earring",
- body="Manibozho Jerkin",
- hands="Buremte Gloves",
- ring1="Epona's Ring",
- ring2="Rajas Ring",
- back="Atheling Mantle",
- waist="Wanion Belt",
- legs="Manibozho Brais",
- feet="Iuitl Gaiters +1"}
- sets.WS["Pyrrhic Kleos"].MidACC = set_combine(sets.WS["Pyrrhic Kleos"],{})
- sets.WS["Pyrrhic Kleos"].HighACC = set_combine(sets.WS["Pyrrhic Kleos"].MidACC,{})
- sets.WS["Rudra's Storm"] = {
- head="Uk'uxkaj Cap",
- ammo="Charis Feather",
- neck="Snow Gorget",
- ear1="Moonshade Earring",
- ear2="Jupiter Earring",
- body=" Mekosu. Harness",
- hands="Buremte Gloves",
- ring1="Epona's Ring",
- ring2="Ramuh Rihg +1",
- back="Kayapa Cape",
- waist="Wanion Belt",
- legs="Manibozho Brais",
- feet="Horos Toe Shoes +1"}
- sets.WS["Rudra's Storm"].MidACC = set_combine(sets.WS["Rudra's Storm"],{})
- sets.WS["Rudra's Storm"].HighACC = set_combine(sets.WS["Rudra's Storm"].MidACC,{})
- sets.WS.Evisceration = {
- head="Uk'uxkaj Cap",
- ammo="Charis Feather",
- neck="Soil Gorget",
- ear1="Moonshade Earring",
- ear2="Brutal Earring",
- body=" Mekosu. Harness",
- hands="Buremte Gloves",
- ring1="Epona's Ring",
- ring2="Ramuh Rihg +1",
- back="Rancorous Mantle",
- waist="Soil Belt",
- legs="Manibozho Brais",
- feet="Horos Toe Shoes +1"}
- sets.WS.Evisceration.MidACC = set_combine(sets.WS.Evisceration,{})
- sets.WS.Evisceration.HighACC = set_combine(sets.WS.Evisceration.MidACC,{})
- -- JA Sets --
- sets.JA = {}
- sets.JA.Trance = {head="Horos Tiara +1"}
- sets.JA['No Foot Rise'] = {body="Horos Casaque"}
- -- Jig Set --
- sets.Jig = {legs="Horos Tights +1",feet="Maxixi Toe. +1"}
- -- Step Base Set --
- sets.Step = {head="Whirlpool Mask",neck="Iqabi Necklace",ear1="Zennaroi Earring",ear2="Heartseeker Earring",body="Mekosu. Harness",hands="Buremte Gloves",ring1="Ramuh Ring +1",ring2="Gorney Ring",back="Toetapper Mantle",waist="Chaac Belt",legs="Manibozho Brais",feet="Horos Toe Shoes +1"}
- sets.Step['Feather Step'] = set_combine(sets.Step,{feet="Charis Shoes +2"})
- -- Samba Set --
- sets.Samba = {head="Maxixi Tiara +1"}
- -- Flourish Base Set --
- sets.Flourish = {}
- sets.Flourish['Reverse Flourish'] = set_combine(sets.Flourish,{hands="Charis Bangles +2"})
- sets.Flourish['Climactic Flourish'] = set_combine(sets.Flourish,{head="Charis Tiara +2"})
- sets.Flourish['Striking Flourish'] = set_combine(sets.Flourish,{body="Charis Casaque +2"})
- sets.Flourish['Violent Flourish'] = set_combine(sets.Flourish,{body="Horos Casaque", waist="Chaac Belt", ring2="Gorney ring"})
- sets.Flourish['Desperate Flourish'] = set_combine(sets.Flourish)
- sets.Flourish['Wild Flourish'] = set_combine(sets.Flourish)
- sets.Skillchain = {hands="Charis Bangles +2"}
- -- Waltz Set --
- sets.Waltz = {
- head="Horos Tiara +1",
- ammo="Sonia's Plectrum",
- ear1="Enchntr. Earring +1",
- body="Maxixi Casaque",
- back="Toetapper Mantle",
- feet="Maxixi Shoes +1"}
- sets.Precast = {}
- -- Fastcast Set --
- sets.Precast.FastCast = {
- ammo="Impatiens",
- head="Haruspex Hat +1",
- neck="Orunmila's Torque",
- ear1="Loquac. Earring",
- ear2="Enchntr. Earring +1",
- hands="Thaumas Gloves",
- ring1="Prolix Ring",
- ring2="Veneficium Ring"}
- -- Utsusemi Precast Set --
- sets.Precast.Utsusemi = set_combine(sets.Precast.FastCast,{neck="Magoraga Beads"})
- sets.Midcast = {}
- -- Magic Haste Set --
- sets.Midcast.Haste = set_combine(sets.PDT,{})
- end
- function pretarget(spell, action)
- if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then
- cancel_spell()
- send_command('input /item "Echo Drops" <me>')
- elseif spell.english == "Berserk" and buffactive.Berserk then
- cancel_spell()
- send_command('Aggressor')
- elseif spell.type == "WeaponSkill" and spell.target.distance > target_distance and player.status == 'Engaged' then
- cancel_spell()
- add_to_chat(123, spell.name..' Canceled: [Out of Range]')
- return
- end
- end
- function precast(spell, action)
- if 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
- if equipSet[AccArray[AccIndex]] then
- equipSet = equipSet[AccArray[AccIndex]]
- end
- if Skillchain then
- equipSet = set_combine(equipSet,sets.Skillchain)
- end
- if spell.english == "Evisceration" and player.tp > 299 then
- equipSet = set_combine(equipSet,{ear1="Jupiter's Pearl"})
- end
- equip(equipSet)
- end
- elseif spell.type == "JobAbility" then
- if sets.JA[spell.english] then
- if spell.english == 'Trance' and buffactive['Saber Dance'] then
- cast_delay(0.2)
- send_command('cancel Saber Dance')
- end
- equip(sets.JA[spell.english])
- end
- elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
- if 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.Utsusemi)
- end
- else
- equip(sets.Precast.FastCast)
- end
- elseif spell.type == "Step" then
- if not buffactive.Presto then
- if not buffactive['Finishing Move 3'] and not buffactive['Finishing Move 4'] and not buffactive['Finishing Move 5'] then
- add_to_chat(158,'Current Step: ['..spell.english..']')
- cancel_spell()
- add_to_chat(158,'No Presto Up - Popping Presto!')
- send_command('Presto;wait 2;//'..spell.name)
- else
- add_to_chat(123,'Skipping Presto.')
- end
- elseif sets.Step[spell.english] then
- equip(sets.Step[spell.english])
- else
- equip(sets.Step)
- end
- elseif spell.type == "Waltz" then
- if buffactive['Saber Dance'] then
- cast_delay(0.2)
- send_command('cancel Saber Dance')
- end
- refine_waltz(spell,action)
- equip(sets.Waltz)
- elseif spell.type == "Jig" then
- if spell.english == 'Spectral Jig' and buffactive.Sneak then
- cast_delay(0.2)
- send_command('cancel Sneak')
- end
- equip(sets.Jig)
- elseif spell.type == 'Samba' then
- if buffactive['Fan Dance'] then
- cast_delay(0.2)
- send_command('cancel Fan Dance')
- end
- equip(sets.Samba)
- elseif string.find(spell.type,'Flourish') then
- if sets.Flourish[spell.english] then
- equip(sets.Flourish[spell.english])
- end
- end
- end
- function midcast(spell, action)
- if spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
- if 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
- equip(sets.Midcast.Haste)
- elseif spell.english == 'Monomi: Ichi' then
- if buffactive['Sneak'] then
- send_command('@wait 1.7;cancel sneak')
- end
- equip(sets.Midcast.Haste)
- else
- equip(sets.Midcast.Haste)
- end
- end
- end
- function aftercast(spell, action)
- if spell.english == "Wild Flourish" and not spell.interrupted then
- Skillchain = true
- send_command('wait 7;gs c clear Skillchain')
- elseif spell.type == "WeaponSkill" and not spell.interrupted then
- Skillchain = not Skillchain
- send_command('wait 0.2;gs c TP;wait 7;gs c clear Skillchain')
- else
- status_change(player.status)
- end
- if spell.english == 'Haste Samba' then
- timer_haste_samba()
- end
- end
- function status_change(new,old)
- if Armor == 'PDT' then
- equip(sets.PDT)
- elseif Armor == 'MDT' then
- equip(sets.MDT)
- elseif Armor == 'EVA' then
- equip(sets.Evasion)
- 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.Haste or buffactive.March) and buffactive['Haste Samba']) or (buffactive.March == 2 and buffactive.Haste and buffactive['Haste Samba']) and equipSet["HighHaste"] then
- equipSet = equipSet["HighHaste"]
- end
- if (buffactive.Embrava and (buffactive.Haste or buffactive.March or buffactive['Haste Samba'])) or (buffactive.March == 1 and buffactive.Haste and buffactive['Haste Samba'] and equipSet["MidHaste"]) or (buffactive.March == 2 and (buffactive.Haste or buffactive['Haste Samba'])) and equipSet["MidHaste"] then
- equipSet = equipSet["MidHaste"]
- end
- if buffactive['Saber Dance'] then
- equipSet = set_combine(equipSet,sets.TP['Saber Dance'])
- end
- if buffactive['Climactic Flourish'] then
- equipSet = set_combine(equipSet,sets.TP['Climactic Flourish'])
- end
- equip(equipSet)
- else
- equip(sets.Idle[IdleArray[IdleIndex]])
- 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 == 'haste samba' and not gain then
- send_command('timers delete "Haste Samba"')
- 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
- -- 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
- status_change(player.status)
- add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
- elseif command == 'C5' then -- Auto Update Gear Toggle --
- status_change(player.status)
- add_to_chat(158,'Auto Update Gear')
- 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 == 'C3' then -- Evasion Toggle --
- if Armor == 'EVA' then
- Armor = 'None'
- add_to_chat(123,'Evasion Set: [Unlocked]')
- else
- Armor = 'EVA'
- add_to_chat(158,'Evasion 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
- status_change(player.status)
- add_to_chat(158,'Idle Set: ' .. IdleArray[IdleIndex])
- 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
- end
- function timer_haste_samba()
- local duration = 90
- if player.main_job == 'DNC' then
- if player.equipment.head == "Dancer's Tiara" or player.equipment.head == "Dancer's Tiara +1" then
- duration = duration + 30
- elseif player.equipment.head == 'Maxixi Tiara' then
- duration = duration + 40
- elseif player.equipment.head == 'Maxixi Tiara +1' then
- duration = duration + 45
- end
- if buffactive['Saber Dance'] then
- local merits = player.merits.saber_dance
- if merits > 1 then
- local extend = (merits - 1) * 5
- duration = math.floor(duration + (duration * extend / 100))
- end
- end
- end
- send_command('timers create "Haste Samba" '..tostring(duration)..' down abilities/00216.png')
- 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.main_job == 'DNC' then
- if missingHP < 40 and spell.target.name == player.name then
- add_to_chat(123,'Full HP!')
- cancel_spell()
- return
- elseif missingHP < 200 then
- newWaltz = 'Curing Waltz'
- waltzID = 190
- elseif missingHP < 600 then
- newWaltz = 'Curing Waltz II'
- waltzID = 191
- elseif missingHP < 1100 then
- newWaltz = 'Curing Waltz III'
- waltzID = 192
- elseif missingHP < 1500 then
- newWaltz = 'Curing Waltz IV'
- waltzID = 193
- else
- newWaltz = 'Curing Waltz V'
- waltzID = 311
- end
- else
- return
- end
- end
- local waltzTPCost = {['Curing Waltz'] = 20, ['Curing Waltz II'] = 35, ['Curing Waltz III'] = 50, ['Curing Waltz IV'] = 65, ['Curing Waltz V'] = 80}
- local tpCost = waltzTPCost[newWaltz]
- local downgrade
- if player.tp < tpCost and not buffactive.trance then
- if player.tp < 20 then
- add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
- cancel_spell()
- return
- elseif player.tp < 35 then
- newWaltz = 'Curing Waltz'
- elseif player.tp < 50 then
- newWaltz = 'Curing Waltz II'
- elseif player.tp < 65 then
- newWaltz = 'Curing Waltz III'
- elseif player.tp < 80 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, 19)
- elseif player.sub_job == 'NIN' then
- set_macro_page(1, 19)
- elseif player.sub_job == 'SAM' then
- set_macro_page(1, 19)
- else
- set_macro_page(1, 19)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment