Scholar Gearswap .lua

Eorzea Time
 
 
 
Language: JP EN FR DE
users online
Forum » FFXI » Jobs » Scholar » Scholar Gearswap .lua
Scholar Gearswap .lua
First Page 2 3 4 5
 Quetzalcoatl.Setsuai
Offline
Server: Quetzalcoatl
Game: FFXI
user: Setsuai
Posts: 61
By Quetzalcoatl.Setsuai 2014-06-20 21:06:31
Link | Quote | Reply
 
I mean I was using the short hand syntax spellcast recognizes rather than the correct. I still have spellcast loaded for the moment so it was refering to my spellcast files (which are non-existant now).
 Bismarck.Snprphnx
Offline
Server: Bismarck
Game: FFXI
user: Snprphnx
Posts: 2707
By Bismarck.Snprphnx 2014-06-20 21:42:08
Link | Quote | Reply
 
Yea. Gearswap and Spellcast don't like each other. Also, you can use the Shortcuts addon, which enables the spellcast shortcuts to be used with Gearswap.
 Odin.Nubbinater
Offline
Server: Odin
Game: FFXI
Posts: 3
By Odin.Nubbinater 2014-06-24 13:22:18
Link | Quote | Reply
 
I'm having trouble with my obi swapping if anyone can help me out that would be great. The line i use is
Code
if (spell.skill == 'Elemental Magic' or string.find(spell.english,'Cur') or string.find(spell.english,'Bio') or string.find(spell.english,'Dia')) and not Non_Obi_Spells:contains(spell.english) and (world.day_element == spell.element or world.weather_element == spell.element) and sets.Obi[spell.element] and Obi == 'ON' then 
equipSet = set_combine(equipSet,sets.Obi[spell.element])


based of bokura's gearswap.
My problem is getting it to work with any element other than ice, it works fine with ice but when i try thunder or healing it puts on my normal sets without obi. I can pastebin my whole file if that helps, any help is appreciated.
 Siren.Ulicaura
Offline
Server: Siren
Game: FFXI
user: danblend
Posts: 69
By Siren.Ulicaura 2014-06-25 15:38:52
Link | Quote | Reply
 
Hi guys, I am using the standard template for SCH gearswap but there doesn't seem to be a capacity for a seperate Helix set, just nuking - can someone advise how I would make a seperate set please?
necroskull Necro Bump Detected! [354 days between previous and next post]
Offline
Posts: 43
By Bursto 2015-06-14 21:21:30
Link | Quote | Reply
 
I am using this gs. I only posted my gear into it so far, but I get an error from line 229 when I use stratagems or sublimation. The error reads " failed attempt to concatenate field 'skill' (a nill value). Did I forget to fill something in?
 Bismarck.Snprphnx
Offline
Server: Bismarck
Game: FFXI
user: Snprphnx
Posts: 2707
By Bismarck.Snprphnx 2015-06-14 21:36:35
Link | Quote | Reply
 
Post it to pastebin and post the link here.
Offline
Posts: 43
By Bursto 2015-06-14 21:45:02
Link | Quote | Reply
 
function get_sets()
sets = {}

sets.aftercast_Idle_noSub = {main="Keraunos",sub="Mephitis Grip",ammo="Incantor Stone",
neck="Twilight Torque",ear1="Nourishing earring",ear2="Loquacious Earring",
body="Respite Cloak",hands="Serpentes Cuffs",ring1="Defending Ring",ring2="Patricius ring",
back="Iximulew Cape",waist="Fucho-no-obi",legs="Assiduity Pants",feet="Serpentes Sabots"}

sets.aftercast_Idle_Sub = {main="Keraunos",sub="Mephitis Grip",ammo="Incantor Stone",
neck="Twilight Torque",ear1="Nourishing earring",ear2="Loquacious Earring",
body="Respite Cloak",hands="Serpentes Cuffs",ring1="Defending Ring",ring2="Patricius ring",
back="Iximulew Cape",waist="Fucho-no-obi",legs="Assiduity Pants",feet="Serpentes Sabots"}

sets.aftercast_Idle = sets.aftercast_Idle_noSub

sets.precast_FastCast = {ammo="Incantor Stone",head="Nahtirah Hat",ear2="Loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Orvail Pants",feet="Chelona Boots"}

sets.Resting = {main="Chatoyant Staff",sub="Mephitis Grip",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Hagondes Coat",hands="Nares Cuffs",ring1="Sangoma Ring",ring2="Maquette Ring",
back="Shadow Mantle",waist="Korin Obi",legs="Nares Trews",feet="Chelona Boots"}

sets.midcast_ElementalMagic = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_DarkMagic = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_EnfeeblingMagic = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_Impact = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_Embrava = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_EnhancingMagic = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",
back="Swith Cape",waist="Ninurta's Sash",legs="Orvail Pants",feet="Chelona Boots"}

sets.precast_Stun = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}




sets.midcast_Cure = {main="Keraunos",sub="Mephitis Grip",head="Nahtirah Hat",ear1="Roundel Earring",ear2="Loquacious Earring",
neck="Orunmila's Torque",body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Patricius Ring",ring2="Kunaji Ring",
back="Tempered +1",waist="Witful Belt",legs="Nares Trews",feet="Regal pumps"}

sets.midcast_Helix = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_Stoneskin = {main="Kirin's Pole",neck="Stone Gorget",waist="Siegel Sash",legs="Shedir Seraweels"}

sets.Obi = {}
sets.Obi.Fire = {waist='Karin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Earth = {waist='Dorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Water = {waist='Suirin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Wind = {waist='Furin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Ice = {waist='Hyorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Thunder = {waist='Rairin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Light = {waist='Korin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Dark = {waist='Anrin Obi',back='Twilight Cape',lring='Zodiac Ring'}

sets.staves = {}

sets.staves.damage = {main="Keraunos"}
sets.staves.damage.Thunder = {main="Keraunos"}
sets.staves.damage.Fire = {main="Keraunos"}

sets.staves.accuracy = {main="Keraunos"}
sets.staves.damage.Thunder = {main="Keraunos"}
sets.staves.damage.Ice = {main="Keraunos"}

stuntarg = 'Shantotto'


end

function precast(spell,action)
if spell.english == 'Impact' then
cast_delay(2)
equip(sets['precast_FastCast'],{body="Twilight Cloak"})
if not buffactive['elemental seal'] then
add_to_chat(8,'--------- Elemental Seal is down ---------')
end

elseif spell.skill=='ElementalMagic' and spell.casttime < 3 then
cast_delay(0.1)
equip(sets.midcast_ElementalMagic)
if spell.element == 'Earth' then
equip({neck="Quanpur Necklace"})
end
if spell.element == world.weather_element or spell_element == world.day_element and sets.Obi[spell.element] then
equip(sets.Obi[spell.element])
end
elseif spell.english == 'Stun' then
cast_delay(0.1)
equip(sets['precast_Stun'])
if not buffactive.thunderstorm then
add_to_chat(8,'--------- Thunderstorm is down ---------')
elseif not buffactive.klimaform then
add_to_chat(8,'----------- Klimaform is down -----------')
end
if stuntarg ~= 'Shantotto' then
send_command('@input /t '..stuntarg..' ---- Byrth Stunned!!! ---- ')
end
else
equip(sets['precast_FastCast'])
cast_delay(0.5)
end

if (buffactive.alacrity or buffactive.celerity) and world.weather_element == spell.element then
equip({feet='Argute Loafers +2'})
end
end

function midcast(spell,action)
if string.find(spell.english,'Cur') then
equip(sets.midcast_Cure)
if spell.element == world.weather_element or spell_element == world.day_element then
equip({main="Chatoyant Staff"},sets.Obi[spell.element])
end
if buffactive.rapture then
equip({head="Savant's Bonnet +2"})
end
elseif spell.english == 'Impact' then
local tempset = sets['midcast_Impact']
tempset['body'] = 'Twilight Cloak'
tempset['head'] = empty
equip(tempset)
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.Obi[spell.element])
end
if sets.staves.damage[spell.element] then
equip(sets.staves.damage[spell.element])
end
elseif spell.skill=="ElementalMagic" then
if string.find(spell.english,'helix') then
equip(sets['midcast_Helix'])
else
equip(sets.midcast_ElementalMagic)
if spell.element=='Earth' then
equip({neck="Quanpur Necklace"})
end
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.Obi[spell.element])
end
end
if buffactive.ebullience then
equip({head="Savant's Bonnet +2"})
end
if buffactive.klimform then
equip ({feet="Savant's Loafers +2"})
end

elseif spell.english == 'Stoneskin' then
equip(sets['midcast_Stoneskin'])
elseif spell.skill == 'EnhancingMagic' then
if spell.english == 'Embrava' then
equip(sets['midcast_Embrava'])
if not buffactive.perpetuance then
add_to_chat(8,'--------- Perpetuance is down ---------')
end
if not buffactive.accession then
add_to_chat(8,'--------- Accession is down ---------')
end
if not buffactive.penury then
add_to_chat(8,'--------- Penury is down ---------')
end
end
if buffactive.perpetuance then
equip(sets['midcast_EnhancingMagic'],{hands="Savant's Bracers +2"})
else
equip(sets['midcast_EnhancingMagic'])
end
else
weathercheck(spell.element,sets['midcast_'..spell.skill])
end

if spell.english == 'Sneak' then
send_command('@wait 1.8;cancel 71;')
end
end

function aftercast(spell,action)
equip(sets['aftercast_Idle'])

if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
end
end

function status_change(new,tab)
if new == 'Resting' then
equip(sets['Resting'])
else
equip(sets['aftercast_Idle'])
end
end

function buff_change(status,gain_or_loss)
if status == 'Sublimation: Complete' and gain_or_loss == 'gain' and not 'stunmode' then -- True whether gained or lost
sets.aftercast_Idle = sets.aftercast_Idle_noSub
elseif status == 'Sublimation: Activated' and gain_or_loss == 'gain' and not 'stunmode' then
sets.aftercast_Idle = sets.aftercast_Idle_Sub
end
equip(sets.aftercast_Idle)
end

function pet_midcast(spell,action)
end

function pet_aftercast(spell,action)
end



function self_command(command)
if command == 'stuntarg' then
stuntarg = target.name
elseif command == 'stunmode' then
windower.add_to_chat(100,'Stun Mode')
if sets.aftercast_Idle ~= sets.precast_Stun then
stunmode = true
sets.aftercast_Idle = sets.precast_Stun
elseif buffactive['Sublimation: Activated'] then
stunmode = false
sets.aftercast_Idle = sets.aftercast_Idle_Sub
else
stunmode = false
sets.aftercast_Idle = sets.aftercast_Idle_noSub
end
equip(sets.aftercast_Idle)
end
end



-- This function is user defined, but never called by GearSwap itself. It's just a user function that's only called from user functions. I wanted to check the weather and equip a weather-based set for some spells, so it made sense to make a function for it instead of replicating the conditional in multiple places.

function weathercheck(spell_element,set)
if spell_element == world.weather_element or spell_element == world.day_element then
equip(set,sets['Obi_'..spell_element])
else
equip(set)
end
end
 Bismarck.Snprphnx
Offline
Server: Bismarck
Game: FFXI
user: Snprphnx
Posts: 2707
By Bismarck.Snprphnx 2015-06-14 22:09:33
Link | Quote | Reply
 
Please post it to pastebin and post the link. Seeing it like that with no line numbers is confusing.
 Cerberus.Krystela
Offline
Server: Cerberus
Game: FFXI
Posts: 53
By Cerberus.Krystela 2015-06-14 22:12:10
Link | Quote | Reply
 
Bursto said: »
Code
function get_sets()
sets = {}

sets.aftercast_Idle_noSub = {main="Keraunos",sub="Mephitis Grip",ammo="Incantor Stone",
neck="Twilight Torque",ear1="Nourishing earring",ear2="Loquacious Earring",
body="Respite Cloak",hands="Serpentes Cuffs",ring1="Defending Ring",ring2="Patricius ring",
back="Iximulew Cape",waist="Fucho-no-obi",legs="Assiduity Pants",feet="Serpentes Sabots"}

sets.aftercast_Idle_Sub = {main="Keraunos",sub="Mephitis Grip",ammo="Incantor Stone",
neck="Twilight Torque",ear1="Nourishing earring",ear2="Loquacious Earring",
body="Respite Cloak",hands="Serpentes Cuffs",ring1="Defending Ring",ring2="Patricius ring",
back="Iximulew Cape",waist="Fucho-no-obi",legs="Assiduity Pants",feet="Serpentes Sabots"}

sets.aftercast_Idle = sets.aftercast_Idle_noSub

sets.precast_FastCast = {ammo="Incantor Stone",head="Nahtirah Hat",ear2="Loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Orvail Pants",feet="Chelona Boots"}

sets.Resting = {main="Chatoyant Staff",sub="Mephitis Grip",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Hagondes Coat",hands="Nares Cuffs",ring1="Sangoma Ring",ring2="Maquette Ring",
back="Shadow Mantle",waist="Korin Obi",legs="Nares Trews",feet="Chelona Boots"}

sets.midcast_ElementalMagic = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_DarkMagic = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_EnfeeblingMagic = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_Impact = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_Embrava = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_EnhancingMagic = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",
back="Swith Cape",waist="Ninurta's Sash",legs="Orvail Pants",feet="Chelona Boots"}

sets.precast_Stun = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}




sets.midcast_Cure = {main="Keraunos",sub="Mephitis Grip",head="Nahtirah Hat",ear1="Roundel Earring",ear2="Loquacious Earring",
neck="Orunmila's Torque",body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Patricius Ring",ring2="Kunaji Ring",
back="Tempered +1",waist="Witful Belt",legs="Nares Trews",feet="Regal pumps"}

sets.midcast_Helix = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_Stoneskin = {main="Kirin's Pole",neck="Stone Gorget",waist="Siegel Sash",legs="Shedir Seraweels"}

sets.Obi = {}
sets.Obi.Fire = {waist='Karin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Earth = {waist='Dorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Water = {waist='Suirin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Wind = {waist='Furin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Ice = {waist='Hyorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Thunder = {waist='Rairin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Light = {waist='Korin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Dark = {waist='Anrin Obi',back='Twilight Cape',lring='Zodiac Ring'}

sets.staves = {}

sets.staves.damage = {main="Keraunos"}
sets.staves.damage.Thunder = {main="Keraunos"}
sets.staves.damage.Fire = {main="Keraunos"}

sets.staves.accuracy = {main="Keraunos"}
sets.staves.damage.Thunder = {main="Keraunos"}
sets.staves.damage.Ice = {main="Keraunos"}

stuntarg = 'Shantotto'


end

function precast(spell,action)
if spell.english == 'Impact' then
cast_delay(2)
equip(sets['precast_FastCast'],{body="Twilight Cloak"})
if not buffactive['elemental seal'] then
add_to_chat(8,'--------- Elemental Seal is down ---------')
end

elseif spell.skill=='ElementalMagic' and spell.casttime < 3 then
cast_delay(0.1)
equip(sets.midcast_ElementalMagic)
if spell.element == 'Earth' then
equip({neck="Quanpur Necklace"})
end
if spell.element == world.weather_element or spell_element == world.day_element and sets.Obi[spell.element] then
equip(sets.Obi[spell.element])
end
elseif spell.english == 'Stun' then
cast_delay(0.1)
equip(sets['precast_Stun'])
if not buffactive.thunderstorm then
add_to_chat(8,'--------- Thunderstorm is down ---------')
elseif not buffactive.klimaform then
add_to_chat(8,'----------- Klimaform is down -----------')
end
if stuntarg ~= 'Shantotto' then
send_command('@input /t '..stuntarg..' ---- Byrth Stunned!!! ---- ')
end
else
equip(sets['precast_FastCast'])
cast_delay(0.5)
end

if (buffactive.alacrity or buffactive.celerity) and world.weather_element == spell.element then
equip({feet='Argute Loafers +2'})
end
end

function midcast(spell,action)
if string.find(spell.english,'Cur') then
equip(sets.midcast_Cure)
if spell.element == world.weather_element or spell_element == world.day_element then
equip({main="Chatoyant Staff"},sets.Obi[spell.element])
end
if buffactive.rapture then
equip({head="Savant's Bonnet +2"})
end
elseif spell.english == 'Impact' then
local tempset = sets['midcast_Impact']
tempset['body'] = 'Twilight Cloak'
tempset['head'] = empty
equip(tempset)
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.Obi[spell.element])
end
if sets.staves.damage[spell.element] then
equip(sets.staves.damage[spell.element])
end
elseif spell.skill=="ElementalMagic" then
if string.find(spell.english,'helix') then
equip(sets['midcast_Helix'])
else
equip(sets.midcast_ElementalMagic)
if spell.element=='Earth' then
equip({neck="Quanpur Necklace"})
end
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.Obi[spell.element])
end
end
if buffactive.ebullience then
equip({head="Savant's Bonnet +2"})
end
if buffactive.klimform then
equip ({feet="Savant's Loafers +2"})
end

elseif spell.english == 'Stoneskin' then
equip(sets['midcast_Stoneskin'])
elseif spell.skill == 'EnhancingMagic' then
if spell.english == 'Embrava' then
equip(sets['midcast_Embrava'])
if not buffactive.perpetuance then
add_to_chat(8,'--------- Perpetuance is down ---------')
end
if not buffactive.accession then
add_to_chat(8,'--------- Accession is down ---------')
end
if not buffactive.penury then
add_to_chat(8,'--------- Penury is down ---------')
end
end
if buffactive.perpetuance then
equip(sets['midcast_EnhancingMagic'],{hands="Savant's Bracers +2"})
else
equip(sets['midcast_EnhancingMagic'])
end
else
weathercheck(spell.element,sets['midcast_'..spell.skill])
end

if spell.english == 'Sneak' then
send_command('@wait 1.8;cancel 71;')
end
end

function aftercast(spell,action)
equip(sets['aftercast_Idle'])

if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
end
end

function status_change(new,tab)
if new == 'Resting' then
equip(sets['Resting'])
else
equip(sets['aftercast_Idle'])
end
end

function buff_change(status,gain_or_loss)
if status == 'Sublimation: Complete' and gain_or_loss == 'gain' and not 'stunmode' then -- True whether gained or lost
sets.aftercast_Idle = sets.aftercast_Idle_noSub
elseif status == 'Sublimation: Activated' and gain_or_loss == 'gain' and not 'stunmode' then
sets.aftercast_Idle = sets.aftercast_Idle_Sub
end
equip(sets.aftercast_Idle)
end

function pet_midcast(spell,action)
end

function pet_aftercast(spell,action)
end



function self_command(command)
if command == 'stuntarg' then
stuntarg = target.name
elseif command == 'stunmode' then
windower.add_to_chat(100,'Stun Mode')
if sets.aftercast_Idle ~= sets.precast_Stun then
stunmode = true
sets.aftercast_Idle = sets.precast_Stun
elseif buffactive['Sublimation: Activated'] then
stunmode = false
sets.aftercast_Idle = sets.aftercast_Idle_Sub
else
stunmode = false
sets.aftercast_Idle = sets.aftercast_Idle_noSub
end
equip(sets.aftercast_Idle)
end
end



-- This function is user defined, but never called by GearSwap itself. It's just a user function that's only called from user functions. I wanted to check the weather and equip a weather-based set for some spells, so it made sense to make a function for it instead of replicating the conditional in multiple places.

function weathercheck(spell_element,set)
if spell_element == world.weather_element or spell_element == world.day_element then
equip(set,sets['Obi_'..spell_element])
else
equip(set)
end
end

To help wit the no number confusion


Edit: From the look of iit that GS is using "old writings" nil value usually means that there is no base set. Your file is a mess and everything is all over the place, which makes it really hard to find errors.
 Bismarck.Snprphnx
Offline
Server: Bismarck
Game: FFXI
user: Snprphnx
Posts: 2707
By Bismarck.Snprphnx 2015-06-14 22:15:05
Link | Quote | Reply
 
Cerberus.Krystela said: »
Bursto said: »
Code
function get_sets()
sets = {}

sets.aftercast_Idle_noSub = {main="Keraunos",sub="Mephitis Grip",ammo="Incantor Stone",
neck="Twilight Torque",ear1="Nourishing earring",ear2="Loquacious Earring",
body="Respite Cloak",hands="Serpentes Cuffs",ring1="Defending Ring",ring2="Patricius ring",
back="Iximulew Cape",waist="Fucho-no-obi",legs="Assiduity Pants",feet="Serpentes Sabots"}

sets.aftercast_Idle_Sub = {main="Keraunos",sub="Mephitis Grip",ammo="Incantor Stone",
neck="Twilight Torque",ear1="Nourishing earring",ear2="Loquacious Earring",
body="Respite Cloak",hands="Serpentes Cuffs",ring1="Defending Ring",ring2="Patricius ring",
back="Iximulew Cape",waist="Fucho-no-obi",legs="Assiduity Pants",feet="Serpentes Sabots"}

sets.aftercast_Idle = sets.aftercast_Idle_noSub

sets.precast_FastCast = {ammo="Incantor Stone",head="Nahtirah Hat",ear2="Loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Orvail Pants",feet="Chelona Boots"}

sets.Resting = {main="Chatoyant Staff",sub="Mephitis Grip",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Hagondes Coat",hands="Nares Cuffs",ring1="Sangoma Ring",ring2="Maquette Ring",
back="Shadow Mantle",waist="Korin Obi",legs="Nares Trews",feet="Chelona Boots"}

sets.midcast_ElementalMagic = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_DarkMagic = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_EnfeeblingMagic = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_Impact = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_Embrava = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_EnhancingMagic = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",
back="Swith Cape",waist="Ninurta's Sash",legs="Orvail Pants",feet="Chelona Boots"}

sets.precast_Stun = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}




sets.midcast_Cure = {main="Keraunos",sub="Mephitis Grip",head="Nahtirah Hat",ear1="Roundel Earring",ear2="Loquacious Earring",
neck="Orunmila's Torque",body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Patricius Ring",ring2="Kunaji Ring",
back="Tempered +1",waist="Witful Belt",legs="Nares Trews",feet="Regal pumps"}

sets.midcast_Helix = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Hagondes Hat +1",
neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Otomi Gloves",
ring1="Prolix ring",ring2="Acumen ring",
back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
feet="Umbani Boots"}



sets.midcast_Stoneskin = {main="Kirin's Pole",neck="Stone Gorget",waist="Siegel Sash",legs="Shedir Seraweels"}

sets.Obi = {}
sets.Obi.Fire = {waist='Karin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Earth = {waist='Dorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Water = {waist='Suirin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Wind = {waist='Furin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Ice = {waist='Hyorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Thunder = {waist='Rairin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Light = {waist='Korin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Dark = {waist='Anrin Obi',back='Twilight Cape',lring='Zodiac Ring'}

sets.staves = {}

sets.staves.damage = {main="Keraunos"}
sets.staves.damage.Thunder = {main="Keraunos"}
sets.staves.damage.Fire = {main="Keraunos"}

sets.staves.accuracy = {main="Keraunos"}
sets.staves.damage.Thunder = {main="Keraunos"}
sets.staves.damage.Ice = {main="Keraunos"}

stuntarg = 'Shantotto'


end

function precast(spell,action)
if spell.english == 'Impact' then
cast_delay(2)
equip(sets['precast_FastCast'],{body="Twilight Cloak"})
if not buffactive['elemental seal'] then
add_to_chat(8,'--------- Elemental Seal is down ---------')
end

elseif spell.skill=='ElementalMagic' and spell.casttime < 3 then
cast_delay(0.1)
equip(sets.midcast_ElementalMagic)
if spell.element == 'Earth' then
equip({neck="Quanpur Necklace"})
end
if spell.element == world.weather_element or spell_element == world.day_element and sets.Obi[spell.element] then
equip(sets.Obi[spell.element])
end
elseif spell.english == 'Stun' then
cast_delay(0.1)
equip(sets['precast_Stun'])
if not buffactive.thunderstorm then
add_to_chat(8,'--------- Thunderstorm is down ---------')
elseif not buffactive.klimaform then
add_to_chat(8,'----------- Klimaform is down -----------')
end
if stuntarg ~= 'Shantotto' then
send_command('@input /t '..stuntarg..' ---- Byrth Stunned!!! ---- ')
end
else
equip(sets['precast_FastCast'])
cast_delay(0.5)
end

if (buffactive.alacrity or buffactive.celerity) and world.weather_element == spell.element then
equip({feet='Argute Loafers +2'})
end
end

function midcast(spell,action)
if string.find(spell.english,'Cur') then
equip(sets.midcast_Cure)
if spell.element == world.weather_element or spell_element == world.day_element then
equip({main="Chatoyant Staff"},sets.Obi[spell.element])
end
if buffactive.rapture then
equip({head="Savant's Bonnet +2"})
end
elseif spell.english == 'Impact' then
local tempset = sets['midcast_Impact']
tempset['body'] = 'Twilight Cloak'
tempset['head'] = empty
equip(tempset)
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.Obi[spell.element])
end
if sets.staves.damage[spell.element] then
equip(sets.staves.damage[spell.element])
end
elseif spell.skill=="ElementalMagic" then
if string.find(spell.english,'helix') then
equip(sets['midcast_Helix'])
else
equip(sets.midcast_ElementalMagic)
if spell.element=='Earth' then
equip({neck="Quanpur Necklace"})
end
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.Obi[spell.element])
end
end
if buffactive.ebullience then
equip({head="Savant's Bonnet +2"})
end
if buffactive.klimform then
equip ({feet="Savant's Loafers +2"})
end

elseif spell.english == 'Stoneskin' then
equip(sets['midcast_Stoneskin'])
elseif spell.skill == 'EnhancingMagic' then
if spell.english == 'Embrava' then
equip(sets['midcast_Embrava'])
if not buffactive.perpetuance then
add_to_chat(8,'--------- Perpetuance is down ---------')
end
if not buffactive.accession then
add_to_chat(8,'--------- Accession is down ---------')
end
if not buffactive.penury then
add_to_chat(8,'--------- Penury is down ---------')
end
end
if buffactive.perpetuance then
equip(sets['midcast_EnhancingMagic'],{hands="Savant's Bracers +2"})
else
equip(sets['midcast_EnhancingMagic'])
end
else
weathercheck(spell.element,sets['midcast_'..spell.skill])
end

if spell.english == 'Sneak' then
send_command('@wait 1.8;cancel 71;')
end
end

function aftercast(spell,action)
equip(sets['aftercast_Idle'])

if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
end
end

function status_change(new,tab)
if new == 'Resting' then
equip(sets['Resting'])
else
equip(sets['aftercast_Idle'])
end
end

function buff_change(status,gain_or_loss)
if status == 'Sublimation: Complete' and gain_or_loss == 'gain' and not 'stunmode' then -- True whether gained or lost
sets.aftercast_Idle = sets.aftercast_Idle_noSub
elseif status == 'Sublimation: Activated' and gain_or_loss == 'gain' and not 'stunmode' then
sets.aftercast_Idle = sets.aftercast_Idle_Sub
end
equip(sets.aftercast_Idle)
end

function pet_midcast(spell,action)
end

function pet_aftercast(spell,action)
end



function self_command(command)
if command == 'stuntarg' then
stuntarg = target.name
elseif command == 'stunmode' then
windower.add_to_chat(100,'Stun Mode')
if sets.aftercast_Idle ~= sets.precast_Stun then
stunmode = true
sets.aftercast_Idle = sets.precast_Stun
elseif buffactive['Sublimation: Activated'] then
stunmode = false
sets.aftercast_Idle = sets.aftercast_Idle_Sub
else
stunmode = false
sets.aftercast_Idle = sets.aftercast_Idle_noSub
end
equip(sets.aftercast_Idle)
end
end



-- This function is user defined, but never called by GearSwap itself. It's just a user function that's only called from user functions. I wanted to check the weather and equip a weather-based set for some spells, so it made sense to make a function for it instead of replicating the conditional in multiple places.

function weathercheck(spell_element,set)
if spell_element == world.weather_element or spell_element == world.day_element then
equip(set,sets['Obi_'..spell_element])
else
equip(set)
end
end

To help wit the no number confusion
yea, but doing that, line 229 is just an 'else', and me copy/paste to pastebin, i get it looking for a weathercheck. that's why I asked him to do it, so there was no confusion
 Cerberus.Krystela
Offline
Server: Cerberus
Game: FFXI
Posts: 53
By Cerberus.Krystela 2015-06-14 22:21:13
Link | Quote | Reply
 
Bismarck.Snprphnx said: »
yea, but doing that, line 229 is just an 'else', and me copy/paste to pastebin, i get it looking for a weathercheck. that's why I asked him to do it, so there was no confusion

Yeah, realised after changing it to a code
 Cerberus.Krystela
Offline
Server: Cerberus
Game: FFXI
Posts: 53
By Cerberus.Krystela 2015-06-14 22:42:31
Link | Quote | Reply
 
Bursto, it's weathercheck(spell.element,sets['midcast_'..spell.skill])
that doesn't work, I guess it tries to equip a skill set for sublimation/stratageme, which doesn't work because they aren't a "type of skill" like enhancing or enfeebling.

So it will give you an error everytime.
Offline
Posts: 43
By Bursto 2015-06-15 19:42:30
Link | Quote | Reply
 
http://pastebin.com/CBW7n2uN
Offline
Posts: 43
By Bursto 2015-06-15 21:19:37
Link | Quote | Reply
 
Removed the weathercheck line for now and everything works fine. Thanks for the help.
[+]
necroskull Necro Bump Detected! [188 days between previous and next post]
Offline
Posts: 5
By hyeirkhris 2015-12-20 09:59:23
Link | Quote | Reply
 
anyone have a sch lua they wouldnt mind sharing?
Offline
Posts: 8
By shawkky 2015-12-27 12:39:37
Link | Quote | Reply
 
No seriously. Does anyone mind posting an up to date SCH lua? The one posted to this forum is severely outdated my current gear sets get red scribble and not swapping in. Hachirin-no-obi, ghastly tathlum +1 etc etc not even swapping. Myself and others interested in doing some serious Scholaring would be grateful, thanks.
 Bismarck.Speedyjim
Offline
Server: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2016-01-18 01:37:14
Link | Quote | Reply
 
The main stickied thread had some. Here: https://drive.google.com/open?id=0ByGS22kY0-SpLUZBZmRmZjl4UWc
[+]
 Odin.Niteanjel
Offline
Server: Odin
Game: FFXI
user: NiteAnjel
Posts: 18
By Odin.Niteanjel 2016-01-22 05:22:43
Link | Quote | Reply
 
Dude you are amazeballs i wanted ot update my SCH Lua and you are a genius :) quick question do you use the Hachirin no Obi or Twilight Cape for weather nukes?
 Carbuncle.Silverio
Offline
Server: Carbuncle
Game: FFXI
user: silverio
Posts: 8
By Carbuncle.Silverio 2016-02-16 17:29:58
Link | Quote | Reply
 
scholar.lua

https://mega.nz/#!sldkiICQ
 Sylph.Wingedangel
Offline
Server: Sylph
Game: FFXI
Posts: 2
By Sylph.Wingedangel 2016-03-10 16:11:05
Link | Quote | Reply
 
Bismarck.Speedyjim said: »
The main stickied thread had some. Here: https://drive.google.com/open?id=0ByGS22kY0-SpLUZBZmRmZjl4UWc

So I've been using this one and adding my own gear in and making minor changes that I wanted.

However the stratagems counter seems to be off, constantly going from 4 to 2 and cancelling when I try to use strats with one left saying I don't have any.

I'm very new to luas and this is way over my head. I can just about handle treating it like it's spellcast with the pre/mid/aftercast commands.
Code
function handle_strategems(cmdParams)
    -- cmdParams[1] == 'scholar'
    -- cmdParams[2] == strategem to use
	if not cmdParams[2] then
		add_to_chat(123,'Error: No strategem command given.')
		return
	end

	local currentStrats = get_current_strategem_count()
	local newStratCount = currentStrats - 1
	local strategem = cmdParams[2]:lower()
	
	if currentStrats > 0 and strategem ~= 'light' and strategem ~= 'dark' then
		add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
	elseif currentStrats == 0 then
		add_to_chat(122, '***Out of strategems! Canceling...***')
		return
	end

	if strategem == 'light' then
		if buffactive['light arts'] then
			send_command('input /ja "Addendum: White" <me>')
			add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
		elseif buffactive['addendum: white'] then
			add_to_chat(122,'Error: Addendum: White is already active.')
		elseif buffactive['dark arts']  or buffactive['addendum: black'] then
			send_command('input /ja "Light Arts" <me>')
			add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
		else
			send_command('input /ja "Light Arts" <me>')
		end
	elseif strategem == 'dark' then
		if buffactive['dark arts'] then
			send_command('input /ja "Addendum: Black" <me>')
			add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
        elseif buffactive['addendum: black'] then
			add_to_chat(122,'Error: Addendum: Black is already active.')
		elseif buffactive['light arts'] or buffactive['addendum: white'] then
			send_command('input /ja "Dark Arts" <me>')
			add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
		else
			send_command('input /ja "Dark Arts" <me>')
		end
	elseif buffactive['light arts'] or buffactive['addendum: white'] then
		if strategem == 'cost' then
			send_command('@input /ja Penury <me>')
		elseif strategem == 'speed' then
			send_command('@input /ja Celerity <me>')
		elseif strategem == 'aoe' then
			send_command('@input /ja Accession <me>')
		elseif strategem == 'power' then
			send_command('@input /ja Rapture <me>')
		elseif strategem == 'duration' then
			send_command('@input /ja Perpetuance <me>')
		elseif strategem == 'accuracy' then
			send_command('@input /ja Altruism <me>')
		elseif strategem == 'enmity' then
			send_command('@input /ja Tranquility <me>')
		elseif strategem == 'skillchain' then
			add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
		elseif strategem == 'addendum' then
			send_command('@input /ja "Addendum: White" <me>')
		else
			add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
		end
	elseif buffactive['dark arts']  or buffactive['addendum: black'] then
		if strategem == 'cost' then
			send_command('@input /ja Parsimony <me>')
		elseif strategem == 'speed' then
			send_command('@input /ja Alacrity <me>')
		elseif strategem == 'aoe' then
			send_command('@input /ja Manifestation <me>')
		elseif strategem == 'power' then
			send_command('@input /ja Ebullience <me>')
		elseif strategem == 'duration' then
			add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
		elseif strategem == 'accuracy' then
			send_command('@input /ja Focalization <me>')
		elseif strategem == 'enmity' then
			send_command('@input /ja Equanimity <me>')
		elseif strategem == 'skillchain' then
			send_command('@input /ja Immanence <me>')
		elseif strategem == 'addendum' then
			send_command('@input /ja "Addendum: Black" <me>')
		else
			add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
		end
	else
		add_to_chat(123,'No arts have been activated yet.')
	end
end
function get_current_strategem_count()
	local allRecasts = windower.ffxi.get_ability_recasts()
	local stratsRecast = allRecasts[231]

	local maxStrategems = math.floor(player.main_job_level + 10) / 20

	local fullRechargeTime = 5*33

	local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
	
	return currentCharges
end


Above is (what I think is) the relevant code.

Thanks in advance!
necroskull Necro Bump Detected! [45 days between previous and next post]
 Asura.Ramsy
Offline
Server: Asura
Game: FFXI
user: Ramsy
Posts: 281
By Asura.Ramsy 2016-04-24 12:11:59
Link | Quote | Reply
 
Anyone have an up to date lua they wouldn't mind sharing with me?
 Bismarck.Speedyjim
Offline
Server: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2016-04-24 13:18:56
Link | Quote | Reply
 
Asura.Ramsy said: »
Anyone have an up to date lua they wouldn't mind sharing with me?
https://drive.google.com/open?id=0ByGS22kY0-SpLUZBZmRmZjl4UWc
 Bismarck.Speedyjim
Offline
Server: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2016-04-24 13:20:31
Link | Quote | Reply
 
Sylph.Wingedangel said: »
Bismarck.Speedyjim said: »
The main stickied thread had some. Here: https://drive.google.com/open?id=0ByGS22kY0-SpLUZBZmRmZjl4UWc

So I've been using this one and adding my own gear in and making minor changes that I wanted.

However the stratagems counter seems to be off, constantly going from 4 to 2 and cancelling when I try to use strats with one left saying I don't have any.

I'm very new to luas and this is way over my head. I can just about handle treating it like it's spellcast with the pre/mid/aftercast commands.
Code
function handle_strategems(cmdParams)
    -- cmdParams[1] == 'scholar'
    -- cmdParams[2] == strategem to use
	if not cmdParams[2] then
		add_to_chat(123,'Error: No strategem command given.')
		return
	end

	local currentStrats = get_current_strategem_count()
	local newStratCount = currentStrats - 1
	local strategem = cmdParams[2]:lower()
	
	if currentStrats > 0 and strategem ~= 'light' and strategem ~= 'dark' then
		add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
	elseif currentStrats == 0 then
		add_to_chat(122, '***Out of strategems! Canceling...***')
		return
	end

	if strategem == 'light' then
		if buffactive['light arts'] then
			send_command('input /ja "Addendum: White" <me>')
			add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
		elseif buffactive['addendum: white'] then
			add_to_chat(122,'Error: Addendum: White is already active.')
		elseif buffactive['dark arts']  or buffactive['addendum: black'] then
			send_command('input /ja "Light Arts" <me>')
			add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
		else
			send_command('input /ja "Light Arts" <me>')
		end
	elseif strategem == 'dark' then
		if buffactive['dark arts'] then
			send_command('input /ja "Addendum: Black" <me>')
			add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
        elseif buffactive['addendum: black'] then
			add_to_chat(122,'Error: Addendum: Black is already active.')
		elseif buffactive['light arts'] or buffactive['addendum: white'] then
			send_command('input /ja "Dark Arts" <me>')
			add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
		else
			send_command('input /ja "Dark Arts" <me>')
		end
	elseif buffactive['light arts'] or buffactive['addendum: white'] then
		if strategem == 'cost' then
			send_command('@input /ja Penury <me>')
		elseif strategem == 'speed' then
			send_command('@input /ja Celerity <me>')
		elseif strategem == 'aoe' then
			send_command('@input /ja Accession <me>')
		elseif strategem == 'power' then
			send_command('@input /ja Rapture <me>')
		elseif strategem == 'duration' then
			send_command('@input /ja Perpetuance <me>')
		elseif strategem == 'accuracy' then
			send_command('@input /ja Altruism <me>')
		elseif strategem == 'enmity' then
			send_command('@input /ja Tranquility <me>')
		elseif strategem == 'skillchain' then
			add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
		elseif strategem == 'addendum' then
			send_command('@input /ja "Addendum: White" <me>')
		else
			add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
		end
	elseif buffactive['dark arts']  or buffactive['addendum: black'] then
		if strategem == 'cost' then
			send_command('@input /ja Parsimony <me>')
		elseif strategem == 'speed' then
			send_command('@input /ja Alacrity <me>')
		elseif strategem == 'aoe' then
			send_command('@input /ja Manifestation <me>')
		elseif strategem == 'power' then
			send_command('@input /ja Ebullience <me>')
		elseif strategem == 'duration' then
			add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
		elseif strategem == 'accuracy' then
			send_command('@input /ja Focalization <me>')
		elseif strategem == 'enmity' then
			send_command('@input /ja Equanimity <me>')
		elseif strategem == 'skillchain' then
			send_command('@input /ja Immanence <me>')
		elseif strategem == 'addendum' then
			send_command('@input /ja "Addendum: Black" <me>')
		else
			add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
		end
	else
		add_to_chat(123,'No arts have been activated yet.')
	end
end
function get_current_strategem_count()
	local allRecasts = windower.ffxi.get_ability_recasts()
	local stratsRecast = allRecasts[231]

	local maxStrategems = math.floor(player.main_job_level + 10) / 20

	local fullRechargeTime = 5*33

	local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
	
	return currentCharges
end


Above is (what I think is) the relevant code.

Thanks in advance!
If you don't have the 550 JP gift, change local fullRechargeTime = 5*33 to local fullRechargeTime = 5*48
 Asura.Ramsy
Offline
Server: Asura
Game: FFXI
user: Ramsy
Posts: 281
By Asura.Ramsy 2016-04-24 23:32:43
Link | Quote | Reply
 
Bismarck.Snprphnx said: »
1. Copy/Edit the file and save it as a .lua file, as charactername.lua
2. save it into the \addons\Gearswap\data folder.
3. Load Gearswap in ffxi

From there, the file should be auto loaded and run.
Is there any other steps besides this? I'm trying to load the lua posted above, but I keep getting no file name provided?
necroskull Necro Bump Detected! [42 days between previous and next post]
 Bahamut.Neb
Offline
Server: Bahamut
Game: FFXI
user: Neb
Posts: 189
By Bahamut.Neb 2016-06-05 19:24:54
Link | Quote | Reply
 
My Ped feet are not equipping for Storms and I have the same sets as above anyone else having this issue?
 Odin.Speedyjim
Offline
Server: Odin
Game: FFXI
user: speedyjim
Posts: 177
By Odin.Speedyjim 2016-06-05 19:28:33
Link | Quote | Reply
 
Bahamut.Neb said: »
My Ped feet are not equipping for Storms and I have the same sets as above anyone else having this issue?
Please post your LUA as nobody can effectively help without seeing it. Do us all a favour and use the code tags when pasting it, unlike the previous poster.