|
Savage Blade LUA
By Ineeedmoney 2015-04-07 10:50:17
Having a Hard time trying to get this to work out
What am I doing wrong in the function part?
I keep getting Errors on line 297 saying I need to put a ] Near _index but when I do it says to keep adding it or put in a )
Any help would be appreciated
Code function get_sets()
send_command('bind !f9 gs c toggle TP set')
send_command('bind ^f9 gs c toggle DW set')
send_command('bind !f10 gs c toggle Weaponskill sets')
send_command('bind ^f10 gs c toggle Idle set')
send_command('bind f9 input /ja "Gambit" <t>')
send_command('bind f10 input /ja "Lunge" <t>')
send_command('bind f11 input /ja "Swipe" <t>')
send_command('bind f12 input /ma "Flash" <t>')
send_command('bind !f12 input /ws "Dimidiation" <t>')
function file_unload()
send_command('unbind ^f9')
send_command('unbind ^f10')
send_command('unbind !f9')
send_command('unbind !f10')
send_command('unbind !f12')
send_command('unbind f9')
send_command('unbind f10')
send_command('unbind f11')
send_command('unbind f12')
end
-- JA Sets for Precast Function --
sets.JA = {}
sets.JA['Elemental Sforzo'] = {body="Futhark Coat +1"}
sets.JA['Vallation'] = {body="Runeist Coat +1",legs="Futhark Trousers"}
sets.JA['Valiance'] = {body="Runeist Coat +1",legs="Futhark Trousers"}
sets.JA['Pflug'] = {feet="Runeist Bottes"}
sets.JA['Swordplay'] = {hands="Futhark Mitons +1"}
sets.JA['Gambit'] = {hands="Runeist Mitons"}
sets.JA['Liement'] = {body="Futhark Coat +1"}
sets.JA['Battuta'] = {head="Futhark Bandeau +1"}
sets.JA['Lunge'] = {ammo="Dosis Tathlum",
head="Ejekamal mask",neck="Stoicheion medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Wayfarer robe",hands="Wayfarer cuffs",ring1="Acumen Ring",ring2="Demon's ring",
back="Evasionist's cape",waist="Salire belt",legs="Limbo trousers",feet=""}
sets.JA['Embolden'] = {back="Evasionist's Cape"}
sets.JA['Vivacious Pulse'] = {legs="Runeist Trousers +1",head="Erilaz galea"}
-- TP/Engaged sets --
sets.TP = {}
sets.TP.index = {'Reg', 'MAcc', 'HAcc', 'PDT', 'PDTA','DW','DWA','DWP','DWPA','JP','Multi','Mag'}
TP_index = 1
sets.TP.Reg = {ammo="Hageia stone",
head="Uk'uxkaj cap",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Thaumas coat",hands="Nomkahpa mittens +1",ring1="Rajas Ring",ring2="Epona's Ring",
back="Evasionist's cape",waist="Windbuffet Belt +1",legs="Augury cuisses",feet="Qaaxo leggings"}
sets.TP.MAcc = set_combine(sets.TP.Reg,{hands=""})
sets.TP.HAcc = {ammo="Honed Tathlum",
head="Uk'uxkaj cap",neck="",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Erilaz surcoat",hands="Erilaz gauntlets",ring1="Rajas Ring",ring2="Epona's Ring",
back="Evasionist's cape",waist="Anguinus Belt",legs="",feet="Futhark Boots +1"}
sets.TP.PDT = {ammo="",
head="Futhark bandeau +1",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Brutal Earring",
body="Erilaz surcoat",hands="Buremte gloves",ring1="Defending Ring",ring2="Dark ring",
back="Evasionist's cape",waist="Flume Belt",legs="Erilaz leg guards",feet="Erilaz greaves"}
sets.TP.PDTA ={ammo="",
head="Futhark bandeau +1",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Brutal Earring",
body="Erilaz surcoat",hands="Buremte gloves",ring1="Defending Ring",ring2="Dark ring",
back="Evasionist's cape",waist="Flume Belt",legs="Erilaz leg guards",feet="Erilaz greaves"}
sets.TP.DW = set_combine(sets.TP.Reg,{ear1="Suppanomimi",ear2="Brutal Earring"})
sets.TP.DWA = set_combine(sets.TP.Acc,{ear1="Suppanomimi",ear2="Brutal Earring"})
sets.TP.DWP = set_combine(sets.TP.PDT,{ear1="Suppanomimi",ear2="Brutal Earring"})
sets.TP.DWPA = set_combine(sets.TP.PDTA,{ear1="Suppanomimi",ear2="Brutal Earring"})
sets.TP.JP = set_combine(sets.TP.Reg,{back="Mecistopins Mantle"})
sets.TP.Multi = set_combine(sets.TP.Reg,{body="Thaumas Coat"})
sets.TP.Mag = set_combine(sets.TP.PDTA,{back=""})
-- Idle Sets --
sets.Idle = {}
sets.Idle.index = {'Regen','Refresh'}
Idle_index = 1
sets.Idle.Regen = {head="Ocelomeh Headpiece",
neck="Wiglen Gorget",ear1="Ethereal Earring",body="Runeist coat +1",hands="",
ring1="Paguroidea Ring",ring2="Sheltered ring",back="Shadow Mantle",waist="Flume Belt",
legs="Runeist Trousers +1"}
sets.Idle.Refresh = {head="Ocelomeh Headpiece",
neck="Wiglen Gorget",ear1="Ethereal Earring",body="Runeist coat +1",hands="",
ring1="Paguroidea Ring",ring2="Sheltered ring",back="Shadow Mantle",waist="Flume Belt",
legs="Runeist Trousers +1"}
--WS Resolution Set --
sets.WS = {ammo="Aqreaqa bomblet",
head="Sukeroku hachimaki",neck="Thunder gorget",ear1="Flame pearl",ear2="Brutal Earring",
body="Futhark coat +1",hands="Nomkahpa Mittens +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Buquwik cape",waist="Thunder belt",legs="Limbo trousers",feet="Futhark boots +1"}
sets.Resolution = {}
sets.Resolution.index = {'Normal','Accuracy'}
Resolution_index = 1
sets.Resolution.Normal = {ammo="Aqreaqa bomblet",
head="Sukeroku hachimaki",neck="Thunder gorget",ear1="Flame pearl",ear2="Brutal Earring",
body="Futhark coat +1",hands="Nomkahpa Mittens +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Buquwik cape",waist="Thunder belt",legs="Limbo trousers",feet="Futhark boots +1"}
sets.Resolution.Accuracy = {ammo="Aqreaqa bomblet",
head="Sukeroku hachimaki",neck="Thunder gorget",ear1="Flame pearl",ear2="Brutal Earring",
body="Futhark coat +1",hands="Nomkahpa Mittens +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Buquwik cape",waist="Thunder belt",legs="Limbo trousers",feet="Futhark boots +1"}
sets.Resolution.R = set_combine(sets.Resolution.Normal,{neck="Ygnas's Resolve +1"})
sets.Dimidiation = {}
sets.Dimidiation.index = {'Normal','Accuracy'}
Dimidiation_index = 1
sets.Dimidiation.Normal = {ammo="Honed tathlum",
head="Sukeroku hachimaki",neck="Rancor collar",ear1="Thunder pearl",ear2="Brutal Earring",
body="Runeist coat +1",hands="Nomkahpa Mittens +1",ring1="Ramuh ring",ring2="Epona's Ring",
back="Kayapa cape",waist="Light belt",legs="Quiahuiz Trousers",feet="Futhark boots +1"}
sets.Dimidiation.Accuracy = {ammo="Honed tathlum",
head="Sukeroku hachimaki",neck="Rancor collar",ear1="Thunder pearl",ear2="Brutal Earring",
body="Runeist coat +1",hands="Nomkahpa Mittens +1",ring1="Ramuh ring",ring2="Epona's Ring",
back="Kayapa cape",waist="Light belt",legs="Quiahuiz Trousers",feet="Futhark boots +1"}
sets.Dimidiation.R = set_combine(sets.Dimidiation.Normal,{neck="Ygnas's Resolve +1"})
-- WS Requiescat Set --
sets.Requiescat = {}
sets.Requiescat.index = {'Normal','Accuracy'}
Requiescat_index = 1
sets.Requiescat.Normal = {ammo="Ginsen",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Qaaxo Harness",hands="Futhark Mitons +1",ring1="Aquasoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Manibozho Brais",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
sets.Requiescat.Accuracy = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Manibozho Jerkin",hands="Buremte Gloves",ring1="Aquasoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Ighwa Trousers",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
-- WS Savage Blade Set --
sets.WS["Savage Blade"] = {}
sets.WS["Savage Blade"].index = {'Normal','Accuracy'}
["Savage Blade"]_index = 1
sets.WS["Savage Blade"].Normal = {ammo="Ginsen",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Qaaxo Harness",hands="Futhark Mitons +1",ring1="Aquasoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Manibozho Brais",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
sets.WS["Savage Blade"].Accuracy = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Manibozho Jerkin",hands="Buremte Gloves",ring1="Aquasoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Ighwa Trousers",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
-- WS Ruinator Set --
sets.Ruinator = {}
sets.Ruinator.index = {'Normal','Accuracy'}
Ruinator_index = 1
sets.Ruinator.Normal = {ammo="Ginsen",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Qaaxo Harness",hands="Futhark Mitons +1",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Manibozho Brais",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
sets.Ruinator.Accuracy = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Manibozho Jerkin",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Ighwa Trousers",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
-- Precast Spell sets --
sets.precast = {}
sets.precast.FC = {}
sets.precast.FC = {ammo="Impatiens",head="Runeist Bandeau +1",
body="Dread Jupon",ear1="Loquacious Earring",neck="Jeweled Collar",ring2="Weatherspoon Ring",feet="Chelona Boots"}
sets.precast.FC.Enhancing = set_combine(sets.precast.FC,{hands="Runeist Mitons +1",legs="Futhark Trousers +1"})
sets.precast.FC.Divine = set_combine(sets.precast.FC,{legs="Runeist Trousers +1"})
--Phalanx Utility--
sets.Utility = {}
sets.Utility.Phalanx = set_combine(sets.precast.FC.Enhancing,{
head="Futhark Bandeau +1"})
--Copy and pasted set from Snprphnx_SCH example--
--Obis--
sets.Obi = {}
sets.Obi.Fire = {waist='Karin Obi',ring2='Zodiac Ring'}
sets.Obi.Earth = {waist='Dorin Obi',ring2='Zodiac Ring'}
sets.Obi.Water = {waist='Suirin Obi',ring2='Zodiac Ring'}
sets.Obi.Wind = {waist='Furin Obi',ring2='Zodiac Ring'}
sets.Obi.Ice = {waist='Hyorin Obi',ring2='Zodiac Ring'}
sets.Obi.Thunder = {waist='Rairin Obi',ring2='Zodiac Ring'}
sets.Obi.Light = {waist='Korin Obi',ring2='Zodiac Ring'}
sets.Obi.Dark = {waist='Anrin Obi',ring2='Zodiac Ring'}
-----Tengu
sets.tengu = {ammo="Tengu-No-Hane"}
end
--Precast Actions--
function precast(spell,act)
if spell.type == 'JobAbility' then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
end
if spell.action_type == 'Enhancing' then
equip(sets.precast.FC.Enhancing)
end
if spell.action_type == 'Divine' then
equip(sets.precast.FC.Divine)
end
if spell.action_type == 'Magic' then
equip(sets.precast.FC)
end
if spell.action_type == 'Ninjutsu' then
equip(sets.precast.FC)
end
if spell.english == 'Lunge' or spell.english == 'Swipe' then
equip(sets.JA['Lunge'])
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.JA['Lunge'],sets.Obi[spell.element])
end
end
if spell.english == "Resolution" then
equip(sets.Resolution[sets.Resolution.index[Resolution_index]])
end
if spell.english == "Requiescat" then
equip(sets.Requiescat[sets.Requiescat.index[Requiescat_index]])
end
if spell.english == "Savage Blade" then
equip(sets.WS["Savage Blade"][sets.WS'Savage Blade'.index['Savage Blade'_index]])
end
if spell.english == "Ruinator" then
equip(sets.Ruinator[sets.Ruinator.index[Ruinator_index]])
end
if spell.english == "Dimidiation" then
equip(sets.Dimidiation[sets.Dimidiation.index[Dimidiation_index]])
end
if spell.english == "Herculean Slash" then
equip(sets.JA['Lunge'])
end
if buffactive['Reive Mark'] and spell.type == 'WeaponSkill' then
equip(sets.Resolution.R)
end
if buffactive['Reive Mark'] and spell.english == 'Dimidiation' then
equip(sets.Dimidiation.R)
end
if buffactive['Reive Mark'] and spell.english == 'Resolution' then
equip(sets.Resolution.R)
end
if buffactive['Tenebrae'] and spell.english == 'Lunge' then
equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
end
if buffactive['Tenebrae'] and spell.english == 'Swipe' then
equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
end
if buffactive['Lux'] and spell.english == 'Lunge' then
equip(sets.JA.Lunge,{ring2="Weatherspoon Ring"})
end
if buffactive['Lux'] and spell.english == 'Swipe' then
equip(sets.JA.Lunge,{ring2="Weatherspoon Ring"})
end
end
--Midcast functions for spells--
function midcast(spell,act)
if spell.english == 'Phalanx' then
equip(sets.Utility.Phalanx)
end
if spell.english == 'Flash' then
equip(sets.precast.FC.Divine)
end
if spell.english == 'Regen IV' then
equip(sets.precast.FC.Enhancing)
end
if spell.type == 'JobAbility' then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
end
if spell.english == 'Lunge' or spell.english == 'Swipe' then
equip(sets.JA['Lunge'])
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.JA['Lunge'],sets.Obi[spell.element])
end
end
if spell.english == "Resolution" then
equip(sets.Resolution[sets.Resolution.index[Resolution_index]])
end
if spell.english == "Requiescat" then
equip(sets.Requiescat[sets.Requiescat.index[Requiescat_index]])
end
if spell.english == "Ruinator" then
equip(sets.Ruinator[sets.Ruinator.index[Ruinator_index]])
end
if spell.english == "Dimidiation" then
equip(sets.Dimidiation[sets.Dimidiation.index[Dimidiation_index]])
end
if spell.english == "Herculean Slash" then
equip(sets.JA['Lunge'])
end
if buffactive['Reive Mark'] and spell.type == 'WeaponSkill' then
equip(sets.Resolution.R)
end
if buffactive['Reive Mark'] and spell.english == 'Dimidiation' then
equip(sets.Dimidiation.R)
end
if buffactive['Reive Mark'] and spell.english == 'Resolution' then
equip(sets.Resolution.R)
end
if buffactive['Tenebrae'] and spell.english == 'Lunge' then
equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
end
if buffactive['Tenebrae'] and spell.english == 'Swipe' then
equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
end
if spell.name == 'Resolution' or spell.name == "Dimidiation" then
tengu_handler()
end
end
function tengu_handler()
if world.time >= 360 and world.time < 1080 then -- 6~18
equip(sets.tengu)
end
end
--Aftercast function, returns user to TP set after actions/spells--
function aftercast(spell,act)
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_index]])
else
equip(sets.Idle[sets.Idle.index[Idle_index]])
end
if player.status == 'Engaged' and buffactive['Battuta'] then
equip{feet="Futhark Boots +1"}
end
if player.status == 'Engaged' and buffactive['Reive Mark'] then
equip{neck="Ygnas's Resolve +1"}
end
end
function buff_change(new,old)
if buffactive['Battuta'] then
equip{feet="Futhark Boots +1"}
end
if buffactive['Embolden'] then
equip{back="Evasionist's Cape"}
end
if player.status == 'Engaged' and buffactive['Reive Mark'] then
equip{neck="Ygnas's Resolve +1"}
end
end
--Status Change function, switches user to TP set upon engaging--
function status_change(new,old)
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_index]])
else
equip(sets.Idle[sets.Idle.index[Idle_index]])
end
if buffactive['Battuta'] and new == 'Engaged' then
equip{feet="Futhark Boots +1"}
end
if player.status == 'Engaged' and buffactive['Reive Mark'] then
equip{neck="Ygnas's Resolve +1"}
end
end
--Toggle Command functions--
--Gearswap direct command = //gs c toggle 'x' set
--Macro line = console gs c toggle x set
--ex: console gs c toggle TP set
-- Index is set to 1 or 'Reg', press button once to switch to 'Acc', and so on.
function self_command(command)
if command == 'toggle TP set' then
if TP_index < 5 then
TP_index = TP_index +1
else TP_index = 1 end
send_command('@ input /echo >>> TP set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle DW set' then
if TP_index < 9 and TP_index > 5 then
TP_index = TP_index +1
else TP_index = 6 end
send_command('@ input /echo >>> DW set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle dTP set' then
if TP_index < 6 and TP_index > 1 then
TP_index = TP_index -1
else TP_index = 5 end
send_command('@ input /echo >>> DW set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle Weaponskill sets' then
Resolution_index = Resolution_index +1
if Resolution_index > #sets.Resolution.index then Resolution_index = 1 end
Requiescat_index = Requiescat_index +1
if Requiescat_index > #sets.Requiescat.index then Requiescat_index = 1 end
Ruinator_index = Ruinator_index +1
if Ruinator_index > #sets.Ruinator.index then Ruinator_index = 1 end
Dimidiation_index = Dimidiation_index +1
if Dimidiation_index > #sets.Dimidiation.index then Dimidiation_index = 1 end
send_command('@ input /echo >>> All Weaponskill sets changed to '..sets.Dimidiation.index[Dimidiation_index]..' ')
elseif command == 'toggle JP set' then
if TP_index < 10 and TP_index > 0 then
TP_index = 10 end
send_command('@ input /echo >>> TP set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle Multi set' then
if TP_index < 11 and TP_index > 0 then
TP_index = 11 end
send_command('@ input /echo >>> TP set change to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle Magic set' then
if TP_index < 12 and TP_index > 0 then
TP_index = 12 end
send_command('@ input /echo >>> Defense set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle Idle set' then
Idle_index = Idle_index +1
if Idle_index > #sets.Idle.index then Idle_index = 1 end
send_command('@ input /echo >>> Idle set changed to '..sets.Idle.index[Idle_index]..' ')
equip(sets.Idle[sets.Idle.index[Idle_index]])
end
end
Lakshmi.Rooks
Administrator
Server: Lakshmi
Game: FFXI
Posts: 1566
By Lakshmi.Rooks 2015-04-07 11:29:38
So, your WS set-changing code is a bunch of copy-paste. I'd honestly just turn that into one variable, like the other sets.
Then it can just be Code
WS_sets = {'Normal', 'Accuracy'}
...
equip(sets.WS['Savage Blade'][WS_sets[WS_index]])
And then change the toggle appropriately.
By Ineeedmoney 2015-04-07 11:53:43
I'm not at home right now but I will give it a shot in a few
I'm a lua noob so if I add that in I will just have to toggle my WSs or just toggle my accuracy ? Sorry if that sounds dumb but like I said I'm new to it all.
By Ineeedmoney 2015-04-07 14:06:26
[code]
function get_sets()
send_command('bind !f9 gs c toggle TP set')
send_command('bind ^f9 gs c toggle DW set')
send_command('bind !f10 gs c toggle Weaponskill sets')
send_command('bind ^f10 gs c toggle Idle set')
send_command('bind f9 input /ja "Gambit" <t>')
send_command('bind f10 input /ja "Lunge" <t>')
send_command('bind f11 input /ja "Swipe" <t>')
send_command('bind f12 input /ma "Flash" <t>')
send_command('bind !f12 input /ws "Dimidiation" <t>')
function file_unload()
send_command('unbind ^f9')
send_command('unbind ^f10')
send_command('unbind !f9')
send_command('unbind !f10')
send_command('unbind !f12')
send_command('unbind f9')
send_command('unbind f10')
send_command('unbind f11')
send_command('unbind f12')
end
-- JA Sets for Precast Function --
sets.JA = {}
sets.JA['Elemental Sforzo'] = {body="Futhark Coat +1"}
sets.JA['Vallation'] = {body="Runeist Coat +1",legs="Futhark Trousers"}
sets.JA['Valiance'] = {body="Runeist Coat +1",legs="Futhark Trousers"}
sets.JA['Pflug'] = {feet="Runeist Bottes"}
sets.JA['Swordplay'] = {hands="Futhark Mitons +1"}
sets.JA['Gambit'] = {hands="Runeist Mitons"}
sets.JA['Liement'] = {body="Futhark Coat +1"}
sets.JA['Battuta'] = {head="Futhark Bandeau +1"}
sets.JA['Lunge'] = {ammo="Dosis Tathlum",
head="Ejekamal mask",neck="Stoicheion medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Wayfarer robe",hands="Wayfarer cuffs",ring1="Acumen Ring",ring2="Demon's ring",
back="Evasionist's cape",waist="Salire belt",legs="Limbo trousers",feet=""}
sets.JA['Embolden'] = {back="Evasionist's Cape"}
sets.JA['Vivacious Pulse'] = {legs="Runeist Trousers +1",head="Erilaz galea"}
-- TP/Engaged sets --
sets.TP = {}
sets.TP.index = {'Reg', 'MAcc', 'HAcc', 'PDT', 'PDTA','DW','DWA','DWP','DWPA','JP','Multi','Mag'}
TP_index = 1
sets.TP.Reg = {ammo="Hageia stone",
head="Uk'uxkaj cap",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Thaumas coat",hands="Nomkahpa mittens +1",ring1="Rajas Ring",ring2="Epona's Ring",
back="Evasionist's cape",waist="Windbuffet Belt +1",legs="Augury cuisses",feet="Qaaxo leggings"}
sets.TP.MAcc = set_combine(sets.TP.Reg,{hands=""})
sets.TP.HAcc = {ammo="Honed Tathlum",
head="Uk'uxkaj cap",neck="",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Erilaz surcoat",hands="Erilaz gauntlets",ring1="Rajas Ring",ring2="Epona's Ring",
back="Evasionist's cape",waist="Anguinus Belt",legs="",feet="Futhark Boots +1"}
sets.TP.PDT = {ammo="",
head="Futhark bandeau +1",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Brutal Earring",
body="Erilaz surcoat",hands="Buremte gloves",ring1="Defending Ring",ring2="Dark ring",
back="Evasionist's cape",waist="Flume Belt",legs="Erilaz leg guards",feet="Erilaz greaves"}
sets.TP.PDTA ={ammo="",
head="Futhark bandeau +1",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Brutal Earring",
body="Erilaz surcoat",hands="Buremte gloves",ring1="Defending Ring",ring2="Dark ring",
back="Evasionist's cape",waist="Flume Belt",legs="Erilaz leg guards",feet="Erilaz greaves"}
sets.TP.DW = set_combine(sets.TP.Reg,{ear1="Suppanomimi",ear2="Brutal Earring"})
sets.TP.DWA = set_combine(sets.TP.Acc,{ear1="Suppanomimi",ear2="Brutal Earring"})
sets.TP.DWP = set_combine(sets.TP.PDT,{ear1="Suppanomimi",ear2="Brutal Earring"})
sets.TP.DWPA = set_combine(sets.TP.PDTA,{ear1="Suppanomimi",ear2="Brutal Earring"})
sets.TP.JP = set_combine(sets.TP.Reg,{back="Mecistopins Mantle"})
sets.TP.Multi = set_combine(sets.TP.Reg,{body="Thaumas Coat"})
sets.TP.Mag = set_combine(sets.TP.PDTA,{back=""})
-- Idle Sets --
sets.Idle = {}
sets.Idle.index = {'Regen','Refresh'}
Idle_index = 1
sets.Idle.Regen = {head="Ocelomeh Headpiece",
neck="Wiglen Gorget",ear1="Ethereal Earring",body="Runeist coat +1",hands="",
ring1="Paguroidea Ring",ring2="Sheltered ring",back="Shadow Mantle",waist="Flume Belt",
legs="Runeist Trousers +1"}
sets.Idle.Refresh = {head="Ocelomeh Headpiece",
neck="Wiglen Gorget",ear1="Ethereal Earring",body="Runeist coat +1",hands="",
ring1="Paguroidea Ring",ring2="Sheltered ring",back="Shadow Mantle",waist="Flume Belt",
legs="Runeist Trousers +1"}
--WS Resolution Set --
sets.WS = {ammo="Aqreaqa bomblet",
head="Sukeroku hachimaki",neck="Thunder gorget",ear1="Flame pearl",ear2="Brutal Earring",
body="Futhark coat +1",hands="Nomkahpa Mittens +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Buquwik cape",waist="Thunder belt",legs="Limbo trousers",feet="Futhark boots +1"}
sets.Resolution = {}
sets.Resolution.index = {'Normal','Accuracy'}
Resolution_index = 1
sets.Resolution.Normal = {ammo="Aqreaqa bomblet",
head="Sukeroku hachimaki",neck="Thunder gorget",ear1="Flame pearl",ear2="Brutal Earring",
body="Futhark coat +1",hands="Nomkahpa Mittens +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Buquwik cape",waist="Thunder belt",legs="Limbo trousers",feet="Futhark boots +1"}
sets.Resolution.Accuracy = {ammo="Aqreaqa bomblet",
head="Sukeroku hachimaki",neck="Thunder gorget",ear1="Flame pearl",ear2="Brutal Earring",
body="Futhark coat +1",hands="Nomkahpa Mittens +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Buquwik cape",waist="Thunder belt",legs="Limbo trousers",feet="Futhark boots +1"}
sets.Resolution.R = set_combine(sets.Resolution.Normal,{neck="Ygnas's Resolve +1"})
sets.Dimidiation = {}
sets.Dimidiation.index = {'Normal','Accuracy'}
Dimidiation_index = 1
sets.Dimidiation.Normal = {ammo="Honed tathlum",
head="Sukeroku hachimaki",neck="Rancor collar",ear1="Thunder pearl",ear2="Brutal Earring",
body="Runeist coat +1",hands="Nomkahpa Mittens +1",ring1="Ramuh ring",ring2="Epona's Ring",
back="Kayapa cape",waist="Light belt",legs="Quiahuiz Trousers",feet="Futhark boots +1"}
sets.Dimidiation.Accuracy = {ammo="Honed tathlum",
head="Sukeroku hachimaki",neck="Rancor collar",ear1="Thunder pearl",ear2="Brutal Earring",
body="Runeist coat +1",hands="Nomkahpa Mittens +1",ring1="Ramuh ring",ring2="Epona's Ring",
back="Kayapa cape",waist="Light belt",legs="Quiahuiz Trousers",feet="Futhark boots +1"}
sets.Dimidiation.R = set_combine(sets.Dimidiation.Normal,{neck="Ygnas's Resolve +1"})
-- WS Requiescat Set --
sets.Requiescat = {}
sets.Requiescat.index = {'Normal','Accuracy'}
Requiescat_index = 1
sets.Requiescat.Normal = {ammo="Ginsen",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Qaaxo Harness",hands="Futhark Mitons +1",ring1="Aquasoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Manibozho Brais",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
sets.Requiescat.Accuracy = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Manibozho Jerkin",hands="Buremte Gloves",ring1="Aquasoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Ighwa Trousers",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
-- WS Savage Blade Set --
sets.WS["Savage Blade"] = {}
sets.WS["Savage Blade"].index = {'Normal','Accuracy'}
["Savage Blade"]_index = 1
sets.WS["Savage Blade"].Normal = {ammo="Ginsen",
head="Erilaz galea",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Qaaxo Harness",hands="Futhark Mitons +1",ring1="Aquasoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Manibozho Brais",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
sets.WS["Savage Blade"].Accuracy = {ammo="Honed Tathlum",
head="Erilaz galea",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Manibozho Jerkin",hands="Buremte Gloves",ring1="Aquasoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Ighwa Trousers",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
-- WS Ruinator Set --
sets.Ruinator = {}
sets.Ruinator.index = {'Normal','Accuracy'}
Ruinator_index = 1
sets.Ruinator.Normal = {ammo="Ginsen",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Qaaxo Harness",hands="Futhark Mitons +1",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Manibozho Brais",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
sets.Ruinator.Accuracy = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Manibozho Jerkin",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Ighwa Trousers",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
-- Precast Spell sets --
sets.precast = {}
sets.precast.FC = {}
sets.precast.FC = {ammo="Impatiens",head="Runeist Bandeau +1",
body="Dread Jupon",ear1="Loquacious Earring",neck="Jeweled Collar",ring2="Weatherspoon Ring",feet="Chelona Boots"}
sets.precast.FC.Enhancing = set_combine(sets.precast.FC,{hands="Runeist Mitons +1",legs="Futhark Trousers +1"})
sets.precast.FC.Divine = set_combine(sets.precast.FC,{legs="Runeist Trousers +1"})
--Phalanx Utility--
sets.Utility = {}
sets.Utility.Phalanx = set_combine(sets.precast.FC.Enhancing,{
head="Futhark Bandeau +1"})
--Copy and pasted set from Snprphnx_SCH example--
--Obis--
sets.Obi = {}
sets.Obi.Fire = {waist='Karin Obi',ring2='Zodiac Ring'}
sets.Obi.Earth = {waist='Dorin Obi',ring2='Zodiac Ring'}
sets.Obi.Water = {waist='Suirin Obi',ring2='Zodiac Ring'}
sets.Obi.Wind = {waist='Furin Obi',ring2='Zodiac Ring'}
sets.Obi.Ice = {waist='Hyorin Obi',ring2='Zodiac Ring'}
sets.Obi.Thunder = {waist='Rairin Obi',ring2='Zodiac Ring'}
sets.Obi.Light = {waist='Korin Obi',ring2='Zodiac Ring'}
sets.Obi.Dark = {waist='Anrin Obi',ring2='Zodiac Ring'}
-----Tengu
sets.tengu = {ammo="Tengu-No-Hane"}
end
--Precast Actions--
function precast(spell,act)
if spell.type == 'JobAbility' then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
end
if spell.action_type == 'Enhancing' then
equip(sets.precast.FC.Enhancing)
end
if spell.action_type == 'Divine' then
equip(sets.precast.FC.Divine)
end
if spell.action_type == 'Magic' then
equip(sets.precast.FC)
end
if spell.action_type == 'Ninjutsu' then
equip(sets.precast.FC)
end
if spell.english == 'Lunge' or spell.english == 'Swipe' then
equip(sets.JA['Lunge'])
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.JA['Lunge'],sets.Obi[spell.element])
end
end
if spell.english == "Resolution" then
equip(sets.Resolution[sets.Resolution.index[Resolution_index]])
end
if spell.english == "Requiescat" then
equip(sets.Requiescat[sets.Requiescat.index[Requiescat_index]])
end
if spell.english == "Savage Blade" then
equip(sets.WS['Savage Blade'][sets.WS[sets.WS_index]])
end
if spell.english == "Ruinator" then
equip(sets.Ruinator[sets.Ruinator.index[Ruinator_index]])
end
if spell.english == "Dimidiation" then
equip(sets.Dimidiation[sets.Dimidiation.index[Dimidiation_index]])
end
if spell.english == "Herculean Slash" then
equip(sets.JA['Lunge'])
end
if buffactive['Reive Mark'] and spell.type == 'WeaponSkill' then
equip(sets.Resolution.R)
end
if buffactive['Reive Mark'] and spell.english == 'Dimidiation' then
equip(sets.Dimidiation.R)
end
if buffactive['Reive Mark'] and spell.english == 'Resolution' then
equip(sets.Resolution.R)
end
if buffactive['Tenebrae'] and spell.english == 'Lunge' then
equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
end
if buffactive['Tenebrae'] and spell.english == 'Swipe' then
equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
end
if buffactive['Lux'] and spell.english == 'Lunge' then
equip(sets.JA.Lunge,{ring2="Weatherspoon Ring"})
end
if buffactive['Lux'] and spell.english == 'Swipe' then
equip(sets.JA.Lunge,{ring2="Weatherspoon Ring"})
end
end
--Midcast functions for spells--
function midcast(spell,act)
if spell.english == 'Phalanx' then
equip(sets.Utility.Phalanx)
end
if spell.english == 'Flash' then
equip(sets.precast.FC.Divine)
end
if spell.english == 'Regen IV' then
equip(sets.precast.FC.Enhancing)
end
if spell.type == 'JobAbility' then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
end
if spell.english == 'Lunge' or spell.english == 'Swipe' then
equip(sets.JA['Lunge'])
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.JA['Lunge'],sets.Obi[spell.element])
end
end
if spell.english == "Resolution" then
equip(sets.Resolution[sets.Resolution.index[Resolution_index]])
end
if spell.english == "Savage Blade" then
equip(sets.WS['Savage Blade'][sets.WS[sets.WS_index]])
end
if spell.english == "Ruinator" then
equip(sets.Ruinator[sets.Ruinator.index[Ruinator_index]])
end
if spell.english == "Dimidiation" then
equip(sets.Dimidiation[sets.Dimidiation.index[Dimidiation_index]])
end
if spell.english == "Herculean Slash" then
equip(sets.JA['Lunge'])
end
if buffactive['Reive Mark'] and spell.type == 'WeaponSkill' then
equip(sets.Resolution.R)
end
if buffactive['Reive Mark'] and spell.english == 'Dimidiation' then
equip(sets.Dimidiation.R)
end
if buffactive['Reive Mark'] and spell.english == 'Resolution' then
equip(sets.Resolution.R)
end
if buffactive['Tenebrae'] and spell.english == 'Lunge' then
equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
end
if buffactive['Tenebrae'] and spell.english == 'Swipe' then
equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
end
if spell.name == 'Resolution' or spell.name == "Dimidiation" then
tengu_handler()
end
end
function tengu_handler()
if world.time >= 360 and world.time < 1080 then -- 6~18
equip(sets.tengu)
end
end
--Aftercast function, returns user to TP set after actions/spells--
function aftercast(spell,act)
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_index]])
else
equip(sets.Idle[sets.Idle.index[Idle_index]])
end
if player.status == 'Engaged' and buffactive['Battuta'] then
equip{feet="Futhark Boots +1"}
end
if player.status == 'Engaged' and buffactive['Reive Mark'] then
equip{neck="Ygnas's Resolve +1"}
end
end
function buff_change(new,old)
if buffactive['Battuta'] then
equip{feet="Futhark Boots +1"}
end
if buffactive['Embolden'] then
equip{back="Evasionist's Cape"}
end
if player.status == 'Engaged' and buffactive['Reive Mark'] then
equip{neck="Ygnas's Resolve +1"}
end
end
--Status Change function, switches user to TP set upon engaging--
function status_change(new,old)
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_index]])
else
equip(sets.Idle[sets.Idle.index[Idle_index]])
end
if buffactive['Battuta'] and new == 'Engaged' then
equip{feet="Futhark Boots +1"}
end
if player.status == 'Engaged' and buffactive['Reive Mark'] then
equip{neck="Ygnas's Resolve +1"}
end
end
--Toggle Command functions--
--Gearswap direct command = //gs c toggle 'x' set
--Macro line = console gs c toggle x set
--ex: console gs c toggle TP set
-- Index is set to 1 or 'Reg', press button once to switch to 'Acc', and so on.
function self_command(command)
if command == 'toggle TP set' then
if TP_index < 5 then
TP_index = TP_index +1
else TP_index = 1 end
send_command('@ input /echo >>> TP set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle DW set' then
if TP_index < 9 and TP_index > 5 then
TP_index = TP_index +1
else TP_index = 6 end
send_command('@ input /echo >>> DW set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle dTP set' then
if TP_index < 6 and TP_index > 1 then
TP_index = TP_index -1
else TP_index = 5 end
send_command('@ input /echo >>> DW set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle Weaponskill sets' then
Resolution_index = Resolution_index +1
if Resolution_index > #sets.Resolution.index then Resolution_index = 1 end
(['Savage Blade'])_index = '([Savage Blade')]_index +1
if ['Savage Blade']_index > #sets.['Savage Blade'].index then ['Savage Blade']_index = 1 end
Ruinator_index = Ruinator_index +1
if Ruinator_index > #sets.Ruinator.index then Ruinator_index = 1 end
Dimidiation_index = Dimidiation_index +1
if Dimidiation_index > #sets.Dimidiation.index then Dimidiation_index = 1 end
send_command('@ input /echo >>> All Weaponskill sets changed to '..sets.Dimidiation.index[Dimidiation_index]..' ')
elseif command == 'toggle JP set' then
if TP_index < 10 and TP_index > 0 then
TP_index = 10 end
send_command('@ input /echo >>> TP set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle Multi set' then
if TP_index < 11 and TP_index > 0 then
TP_index = 11 end
send_command('@ input /echo >>> TP set change to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle Magic set' then
if TP_index < 12 and TP_index > 0 then
TP_index = 12 end
send_command('@ input /echo >>> Defense set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle Idle set' then
Idle_index = Idle_index +1
if Idle_index > #sets.Idle.index then Idle_index = 1 end
send_command('@ input /echo >>> Idle set changed to '..sets.Idle.index[Idle_index]..' ')
equip(sets.Idle[sets.Idle.index[Idle_index]])
end
end
[code]]
I was able to get it to not give me errors. But its not changing gear when i use savage blade
As well i cant seem to get it to work with my toggle from normal to accuracy
Lakshmi.Zerowone
Server: Lakshmi
Game: FFXI
Posts: 6949
By Lakshmi.Zerowone 2015-04-07 14:13:21
I know that code! . I'll update it with savage blade when I get a chance.
Edit:
After reviewing your additions we have some errors to address.
First if you are going to create a generalize WS set variable you need to have a:
sets.ws ={}
Put that above your sets.ws line with all the gear indicated.
Second, lets stick with this format for savage blade:
Code sets.SavageBlade ={}
sets.SavageBlade.index = {'Normal','Accuracy'}
SavageBlade_index = 1
sets.SavageBlade.Normal ={paste your desired gear here}
sets.SavageBlade.Accuracy ={paste your desired gear here}
Those are the variable sets.
Now you want functions:
Code if spell.english == 'Savage Blade' then
equip(sets.SavageBlade[sets.SavageBlade.index[SavageBlade_index]])
end
You want to put that in the precast/mid cast functions. It only needs to be in precast but I double up on WSs in both due to speed of GS.
Then finally you are going to need a toggle rule:
Code SavageBlade_index = SavageBlade_index +1
if SavageBlade_index > #sets.SavageBlade.index then SavageBlade_index = 1 end.
That one you are going to want put in the sequence of toggles for WS's around Line 523.
By Ineeedmoney 2015-04-07 15:19:16
Thanks a bunch works great man
Just to let you know as well best Run Lua I have come across as well
Lakshmi.Zerowone
Server: Lakshmi
Game: FFXI
Posts: 6949
By Lakshmi.Zerowone 2015-04-07 15:27:46
Thanks.. I need to update it when I get a chance, there has been some modifications made since it was posted.
Having a Hard time trying to get this to work out
What am I doing wrong in the function part?
I keep getting Errors on line 297 saying I need to put a ] Near _index but when I do it says to keep adding it or put in a )
Any help would be appreciated
Code function get_sets()
send_command('bind !f9 gs c toggle TP set')
send_command('bind ^f9 gs c toggle DW set')
send_command('bind !f10 gs c toggle Weaponskill sets')
send_command('bind ^f10 gs c toggle Idle set')
send_command('bind f9 input /ja "Gambit" <t>')
send_command('bind f10 input /ja "Lunge" <t>')
send_command('bind f11 input /ja "Swipe" <t>')
send_command('bind f12 input /ma "Flash" <t>')
send_command('bind !f12 input /ws "Dimidiation" <t>')
function file_unload()
send_command('unbind ^f9')
send_command('unbind ^f10')
send_command('unbind !f9')
send_command('unbind !f10')
send_command('unbind !f12')
send_command('unbind f9')
send_command('unbind f10')
send_command('unbind f11')
send_command('unbind f12')
end
-- JA Sets for Precast Function --
sets.JA = {}
sets.JA['Elemental Sforzo'] = {body="Futhark Coat +1"}
sets.JA['Vallation'] = {body="Runeist Coat +1",legs="Futhark Trousers"}
sets.JA['Valiance'] = {body="Runeist Coat +1",legs="Futhark Trousers"}
sets.JA['Pflug'] = {feet="Runeist Bottes"}
sets.JA['Swordplay'] = {hands="Futhark Mitons +1"}
sets.JA['Gambit'] = {hands="Runeist Mitons"}
sets.JA['Liement'] = {body="Futhark Coat +1"}
sets.JA['Battuta'] = {head="Futhark Bandeau +1"}
sets.JA['Lunge'] = {ammo="Dosis Tathlum",
head="Ejekamal mask",neck="Stoicheion medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Wayfarer robe",hands="Wayfarer cuffs",ring1="Acumen Ring",ring2="Demon's ring",
back="Evasionist's cape",waist="Salire belt",legs="Limbo trousers",feet=""}
sets.JA['Embolden'] = {back="Evasionist's Cape"}
sets.JA['Vivacious Pulse'] = {legs="Runeist Trousers +1",head="Erilaz galea"}
-- TP/Engaged sets --
sets.TP = {}
sets.TP.index = {'Reg', 'MAcc', 'HAcc', 'PDT', 'PDTA','DW','DWA','DWP','DWPA','JP','Multi','Mag'}
TP_index = 1
sets.TP.Reg = {ammo="Hageia stone",
head="Uk'uxkaj cap",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Thaumas coat",hands="Nomkahpa mittens +1",ring1="Rajas Ring",ring2="Epona's Ring",
back="Evasionist's cape",waist="Windbuffet Belt +1",legs="Augury cuisses",feet="Qaaxo leggings"}
sets.TP.MAcc = set_combine(sets.TP.Reg,{hands=""})
sets.TP.HAcc = {ammo="Honed Tathlum",
head="Uk'uxkaj cap",neck="",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Erilaz surcoat",hands="Erilaz gauntlets",ring1="Rajas Ring",ring2="Epona's Ring",
back="Evasionist's cape",waist="Anguinus Belt",legs="",feet="Futhark Boots +1"}
sets.TP.PDT = {ammo="",
head="Futhark bandeau +1",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Brutal Earring",
body="Erilaz surcoat",hands="Buremte gloves",ring1="Defending Ring",ring2="Dark ring",
back="Evasionist's cape",waist="Flume Belt",legs="Erilaz leg guards",feet="Erilaz greaves"}
sets.TP.PDTA ={ammo="",
head="Futhark bandeau +1",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Brutal Earring",
body="Erilaz surcoat",hands="Buremte gloves",ring1="Defending Ring",ring2="Dark ring",
back="Evasionist's cape",waist="Flume Belt",legs="Erilaz leg guards",feet="Erilaz greaves"}
sets.TP.DW = set_combine(sets.TP.Reg,{ear1="Suppanomimi",ear2="Brutal Earring"})
sets.TP.DWA = set_combine(sets.TP.Acc,{ear1="Suppanomimi",ear2="Brutal Earring"})
sets.TP.DWP = set_combine(sets.TP.PDT,{ear1="Suppanomimi",ear2="Brutal Earring"})
sets.TP.DWPA = set_combine(sets.TP.PDTA,{ear1="Suppanomimi",ear2="Brutal Earring"})
sets.TP.JP = set_combine(sets.TP.Reg,{back="Mecistopins Mantle"})
sets.TP.Multi = set_combine(sets.TP.Reg,{body="Thaumas Coat"})
sets.TP.Mag = set_combine(sets.TP.PDTA,{back=""})
-- Idle Sets --
sets.Idle = {}
sets.Idle.index = {'Regen','Refresh'}
Idle_index = 1
sets.Idle.Regen = {head="Ocelomeh Headpiece",
neck="Wiglen Gorget",ear1="Ethereal Earring",body="Runeist coat +1",hands="",
ring1="Paguroidea Ring",ring2="Sheltered ring",back="Shadow Mantle",waist="Flume Belt",
legs="Runeist Trousers +1"}
sets.Idle.Refresh = {head="Ocelomeh Headpiece",
neck="Wiglen Gorget",ear1="Ethereal Earring",body="Runeist coat +1",hands="",
ring1="Paguroidea Ring",ring2="Sheltered ring",back="Shadow Mantle",waist="Flume Belt",
legs="Runeist Trousers +1"}
--WS Resolution Set --
sets.WS = {ammo="Aqreaqa bomblet",
head="Sukeroku hachimaki",neck="Thunder gorget",ear1="Flame pearl",ear2="Brutal Earring",
body="Futhark coat +1",hands="Nomkahpa Mittens +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Buquwik cape",waist="Thunder belt",legs="Limbo trousers",feet="Futhark boots +1"}
sets.Resolution = {}
sets.Resolution.index = {'Normal','Accuracy'}
Resolution_index = 1
sets.Resolution.Normal = {ammo="Aqreaqa bomblet",
head="Sukeroku hachimaki",neck="Thunder gorget",ear1="Flame pearl",ear2="Brutal Earring",
body="Futhark coat +1",hands="Nomkahpa Mittens +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Buquwik cape",waist="Thunder belt",legs="Limbo trousers",feet="Futhark boots +1"}
sets.Resolution.Accuracy = {ammo="Aqreaqa bomblet",
head="Sukeroku hachimaki",neck="Thunder gorget",ear1="Flame pearl",ear2="Brutal Earring",
body="Futhark coat +1",hands="Nomkahpa Mittens +1",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Buquwik cape",waist="Thunder belt",legs="Limbo trousers",feet="Futhark boots +1"}
sets.Resolution.R = set_combine(sets.Resolution.Normal,{neck="Ygnas's Resolve +1"})
sets.Dimidiation = {}
sets.Dimidiation.index = {'Normal','Accuracy'}
Dimidiation_index = 1
sets.Dimidiation.Normal = {ammo="Honed tathlum",
head="Sukeroku hachimaki",neck="Rancor collar",ear1="Thunder pearl",ear2="Brutal Earring",
body="Runeist coat +1",hands="Nomkahpa Mittens +1",ring1="Ramuh ring",ring2="Epona's Ring",
back="Kayapa cape",waist="Light belt",legs="Quiahuiz Trousers",feet="Futhark boots +1"}
sets.Dimidiation.Accuracy = {ammo="Honed tathlum",
head="Sukeroku hachimaki",neck="Rancor collar",ear1="Thunder pearl",ear2="Brutal Earring",
body="Runeist coat +1",hands="Nomkahpa Mittens +1",ring1="Ramuh ring",ring2="Epona's Ring",
back="Kayapa cape",waist="Light belt",legs="Quiahuiz Trousers",feet="Futhark boots +1"}
sets.Dimidiation.R = set_combine(sets.Dimidiation.Normal,{neck="Ygnas's Resolve +1"})
-- WS Requiescat Set --
sets.Requiescat = {}
sets.Requiescat.index = {'Normal','Accuracy'}
Requiescat_index = 1
sets.Requiescat.Normal = {ammo="Ginsen",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Qaaxo Harness",hands="Futhark Mitons +1",ring1="Aquasoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Manibozho Brais",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
sets.Requiescat.Accuracy = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Manibozho Jerkin",hands="Buremte Gloves",ring1="Aquasoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Ighwa Trousers",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
-- WS Savage Blade Set --
sets.WS["Savage Blade"] = {}
sets.WS["Savage Blade"].index = {'Normal','Accuracy'}
["Savage Blade"]_index = 1
sets.WS["Savage Blade"].Normal = {ammo="Ginsen",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Qaaxo Harness",hands="Futhark Mitons +1",ring1="Aquasoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Manibozho Brais",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
sets.WS["Savage Blade"].Accuracy = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Manibozho Jerkin",hands="Buremte Gloves",ring1="Aquasoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Ighwa Trousers",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
-- WS Ruinator Set --
sets.Ruinator = {}
sets.Ruinator.index = {'Normal','Accuracy'}
Ruinator_index = 1
sets.Ruinator.Normal = {ammo="Ginsen",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Qaaxo Harness",hands="Futhark Mitons +1",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Manibozho Brais",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
sets.Ruinator.Accuracy = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Manibozho Jerkin",hands="Buremte Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Fotia Belt",legs="Ighwa Trousers",feet={ name="Qaaxo Leggings", augments={'Attack+15','"Mag.Atk.Bns."+15','STR+12',}}}
-- Precast Spell sets --
sets.precast = {}
sets.precast.FC = {}
sets.precast.FC = {ammo="Impatiens",head="Runeist Bandeau +1",
body="Dread Jupon",ear1="Loquacious Earring",neck="Jeweled Collar",ring2="Weatherspoon Ring",feet="Chelona Boots"}
sets.precast.FC.Enhancing = set_combine(sets.precast.FC,{hands="Runeist Mitons +1",legs="Futhark Trousers +1"})
sets.precast.FC.Divine = set_combine(sets.precast.FC,{legs="Runeist Trousers +1"})
--Phalanx Utility--
sets.Utility = {}
sets.Utility.Phalanx = set_combine(sets.precast.FC.Enhancing,{
head="Futhark Bandeau +1"})
--Copy and pasted set from Snprphnx_SCH example--
--Obis--
sets.Obi = {}
sets.Obi.Fire = {waist='Karin Obi',ring2='Zodiac Ring'}
sets.Obi.Earth = {waist='Dorin Obi',ring2='Zodiac Ring'}
sets.Obi.Water = {waist='Suirin Obi',ring2='Zodiac Ring'}
sets.Obi.Wind = {waist='Furin Obi',ring2='Zodiac Ring'}
sets.Obi.Ice = {waist='Hyorin Obi',ring2='Zodiac Ring'}
sets.Obi.Thunder = {waist='Rairin Obi',ring2='Zodiac Ring'}
sets.Obi.Light = {waist='Korin Obi',ring2='Zodiac Ring'}
sets.Obi.Dark = {waist='Anrin Obi',ring2='Zodiac Ring'}
-----Tengu
sets.tengu = {ammo="Tengu-No-Hane"}
end
--Precast Actions--
function precast(spell,act)
if spell.type == 'JobAbility' then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
end
if spell.action_type == 'Enhancing' then
equip(sets.precast.FC.Enhancing)
end
if spell.action_type == 'Divine' then
equip(sets.precast.FC.Divine)
end
if spell.action_type == 'Magic' then
equip(sets.precast.FC)
end
if spell.action_type == 'Ninjutsu' then
equip(sets.precast.FC)
end
if spell.english == 'Lunge' or spell.english == 'Swipe' then
equip(sets.JA['Lunge'])
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.JA['Lunge'],sets.Obi[spell.element])
end
end
if spell.english == "Resolution" then
equip(sets.Resolution[sets.Resolution.index[Resolution_index]])
end
if spell.english == "Requiescat" then
equip(sets.Requiescat[sets.Requiescat.index[Requiescat_index]])
end
if spell.english == "Savage Blade" then
equip(sets.WS["Savage Blade"][sets.WS'Savage Blade'.index['Savage Blade'_index]])
end
if spell.english == "Ruinator" then
equip(sets.Ruinator[sets.Ruinator.index[Ruinator_index]])
end
if spell.english == "Dimidiation" then
equip(sets.Dimidiation[sets.Dimidiation.index[Dimidiation_index]])
end
if spell.english == "Herculean Slash" then
equip(sets.JA['Lunge'])
end
if buffactive['Reive Mark'] and spell.type == 'WeaponSkill' then
equip(sets.Resolution.R)
end
if buffactive['Reive Mark'] and spell.english == 'Dimidiation' then
equip(sets.Dimidiation.R)
end
if buffactive['Reive Mark'] and spell.english == 'Resolution' then
equip(sets.Resolution.R)
end
if buffactive['Tenebrae'] and spell.english == 'Lunge' then
equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
end
if buffactive['Tenebrae'] and spell.english == 'Swipe' then
equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
end
if buffactive['Lux'] and spell.english == 'Lunge' then
equip(sets.JA.Lunge,{ring2="Weatherspoon Ring"})
end
if buffactive['Lux'] and spell.english == 'Swipe' then
equip(sets.JA.Lunge,{ring2="Weatherspoon Ring"})
end
end
--Midcast functions for spells--
function midcast(spell,act)
if spell.english == 'Phalanx' then
equip(sets.Utility.Phalanx)
end
if spell.english == 'Flash' then
equip(sets.precast.FC.Divine)
end
if spell.english == 'Regen IV' then
equip(sets.precast.FC.Enhancing)
end
if spell.type == 'JobAbility' then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
end
if spell.english == 'Lunge' or spell.english == 'Swipe' then
equip(sets.JA['Lunge'])
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.JA['Lunge'],sets.Obi[spell.element])
end
end
if spell.english == "Resolution" then
equip(sets.Resolution[sets.Resolution.index[Resolution_index]])
end
if spell.english == "Requiescat" then
equip(sets.Requiescat[sets.Requiescat.index[Requiescat_index]])
end
if spell.english == "Ruinator" then
equip(sets.Ruinator[sets.Ruinator.index[Ruinator_index]])
end
if spell.english == "Dimidiation" then
equip(sets.Dimidiation[sets.Dimidiation.index[Dimidiation_index]])
end
if spell.english == "Herculean Slash" then
equip(sets.JA['Lunge'])
end
if buffactive['Reive Mark'] and spell.type == 'WeaponSkill' then
equip(sets.Resolution.R)
end
if buffactive['Reive Mark'] and spell.english == 'Dimidiation' then
equip(sets.Dimidiation.R)
end
if buffactive['Reive Mark'] and spell.english == 'Resolution' then
equip(sets.Resolution.R)
end
if buffactive['Tenebrae'] and spell.english == 'Lunge' then
equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
end
if buffactive['Tenebrae'] and spell.english == 'Swipe' then
equip(sets.JA.Lunge,{head="Pixie Hairpin +1"})
end
if spell.name == 'Resolution' or spell.name == "Dimidiation" then
tengu_handler()
end
end
function tengu_handler()
if world.time >= 360 and world.time < 1080 then -- 6~18
equip(sets.tengu)
end
end
--Aftercast function, returns user to TP set after actions/spells--
function aftercast(spell,act)
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_index]])
else
equip(sets.Idle[sets.Idle.index[Idle_index]])
end
if player.status == 'Engaged' and buffactive['Battuta'] then
equip{feet="Futhark Boots +1"}
end
if player.status == 'Engaged' and buffactive['Reive Mark'] then
equip{neck="Ygnas's Resolve +1"}
end
end
function buff_change(new,old)
if buffactive['Battuta'] then
equip{feet="Futhark Boots +1"}
end
if buffactive['Embolden'] then
equip{back="Evasionist's Cape"}
end
if player.status == 'Engaged' and buffactive['Reive Mark'] then
equip{neck="Ygnas's Resolve +1"}
end
end
--Status Change function, switches user to TP set upon engaging--
function status_change(new,old)
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_index]])
else
equip(sets.Idle[sets.Idle.index[Idle_index]])
end
if buffactive['Battuta'] and new == 'Engaged' then
equip{feet="Futhark Boots +1"}
end
if player.status == 'Engaged' and buffactive['Reive Mark'] then
equip{neck="Ygnas's Resolve +1"}
end
end
--Toggle Command functions--
--Gearswap direct command = //gs c toggle 'x' set
--Macro line = console gs c toggle x set
--ex: console gs c toggle TP set
-- Index is set to 1 or 'Reg', press button once to switch to 'Acc', and so on.
function self_command(command)
if command == 'toggle TP set' then
if TP_index < 5 then
TP_index = TP_index +1
else TP_index = 1 end
send_command('@ input /echo >>> TP set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle DW set' then
if TP_index < 9 and TP_index > 5 then
TP_index = TP_index +1
else TP_index = 6 end
send_command('@ input /echo >>> DW set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle dTP set' then
if TP_index < 6 and TP_index > 1 then
TP_index = TP_index -1
else TP_index = 5 end
send_command('@ input /echo >>> DW set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle Weaponskill sets' then
Resolution_index = Resolution_index +1
if Resolution_index > #sets.Resolution.index then Resolution_index = 1 end
Requiescat_index = Requiescat_index +1
if Requiescat_index > #sets.Requiescat.index then Requiescat_index = 1 end
Ruinator_index = Ruinator_index +1
if Ruinator_index > #sets.Ruinator.index then Ruinator_index = 1 end
Dimidiation_index = Dimidiation_index +1
if Dimidiation_index > #sets.Dimidiation.index then Dimidiation_index = 1 end
send_command('@ input /echo >>> All Weaponskill sets changed to '..sets.Dimidiation.index[Dimidiation_index]..' ')
elseif command == 'toggle JP set' then
if TP_index < 10 and TP_index > 0 then
TP_index = 10 end
send_command('@ input /echo >>> TP set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle Multi set' then
if TP_index < 11 and TP_index > 0 then
TP_index = 11 end
send_command('@ input /echo >>> TP set change to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle Magic set' then
if TP_index < 12 and TP_index > 0 then
TP_index = 12 end
send_command('@ input /echo >>> Defense set changed to '..sets.TP.index[TP_index]..' ')
equip(sets.TP[sets.TP.index[TP_index]])
elseif command == 'toggle Idle set' then
Idle_index = Idle_index +1
if Idle_index > #sets.Idle.index then Idle_index = 1 end
send_command('@ input /echo >>> Idle set changed to '..sets.Idle.index[Idle_index]..' ')
equip(sets.Idle[sets.Idle.index[Idle_index]])
end
end
|
|