|
Gearswap Support Thread
Server: Siren
Game: FFXI
Posts: 26
By Siren.Firedevil 2017-10-07 09:37:33
I'm working on a GEO Lua and I keep getting the following error:
Gearswap: LUA runtime error: GearSwap/refresh.lua:174: GearsSwap: File failed to load:
>...dower4/addons/GearSwap/data/XXX/XXX_GEO.lua:50 attempt to index field 'precast' (a nil value)
The referenced line in my lua is below:
sets.precast.JA['Bolster'] = {body="Bagua Tunic +1"}
I have the Mote files included in the libs folder, so I'm not sure what is wrong with this.
Please help with these errors. It's driving me crazy having to use regular macros for my GEO! Thanks!
Edited for better clarity! :)
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2017-10-10 18:01:55
I'm working on a GEO Lua and I keep getting the following error:
Gearswap: LUA runtime error: Gearswap/refresh.lua:174: Gearswap: file failed to load.
This is a file that downloads with Gearswap and I have never messed with it, so I'm certainly not sure what this is about. The referenced line from refresh.lua is as follows:
174 error('GearSwap: File failed to load: \n'..plugin)
After this error, I get another one that says: attempt to index field 'precast' (a nil value).
The referenced line in my lua is below:
sets.precast.JA['Bolster'] = {body="Bagua Tunic +1"}
I have the Mote files included in the libs folder, so I'm not sure what is wrong with this.
Please help with these errors. It's driving me crazy having to use regular macros for my GEO! Thanks!
Sounds like something wrong with your set up of Mote's includes. Can you post your file? You can use the code tags on here or use a site like Pastebin.
[+]
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2017-10-10 18:07:31
This has been discussed before, but I couldn´t find a definite solution for it just with topic search, so...
About 95% of my unbridled/diffusion casts unequip empy feet too fast for them to add diffusion duration to it, being experienced mostly on mighty guard of course. I can´t tell yet if the other 5% happen during higher or lower latency than usual tho.
Not using motenten, but a custom one I snatched somewhere:
Code
sets.JA.Diffusion = {feet="Mirage Charuqs +2",}
[...]
function midcast(spell,act)
if spell.english == 'Mighty Guard' then
if buffactive['Diffusion'] then
equip(sets.JA.Diffusion)
add_to_chat(158,'if you can read this then charuqs should actually be equipped now kthx')
end
end
As a workaround, I fiddled in /equip feet, gs disable feet, gs enable feet after cast into a macro, but it´s kinda bad to have to wait for the gs enable midfight.
Any ideas? Thx in advance.
My solution was generally to equip them during midcast/end of aftercast and then call my equip change function through the buff change function, when buff is gained. This involves creating an independent function that handles equipping your aftercast gear, which you would separately call from the aftercast function.
Server: Siren
Game: FFXI
Posts: 26
By Siren.Firedevil 2017-10-11 11:24:12
Thanks for your response! Before my response here, I just uninstalled Gearswap, deleting all files and re-downloaded it in case I did something to corrupt a file. I am still having the same errors. My full code is below: Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
indi_timer = ''
indi_duration = 255
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('None', 'Normal','Accuracy','Dual')
state.CastingMode:options('Normal','Accuracy')
state.IdleMode:options('Normal', 'PDT', 'MDT')
gear.default.obi_waist = "Refoccilation stone"
gear.default.obi_back = "Seshaw Cape"
gear.default.obi_ring = "Shiva Ring"
select_default_macro_book()
end
lowtier = S{"Fire", "Fire II", "Stone", "Stone II", "Blizzard", "Blizzard II", "Aero", "Aero II", "Water", "Water II", "Thunder", "Thunder II", "Fira", "Blizzara", "Aerora", "Stonera", "Thundara", "Watera"}
hightier = S{"Fire III", "Fire IV", "Stone IV", "Stone III", "Blizzard IV", "Blizzard III", "Aero IV", "Aero III", "Water IV", "Water III", "Thunder IV", "Thunder III", "Fira II", "Blizzara II", "Aerora II", "Stonera II", "Thundara II", "Watera II"}
-- Define sets and vars used by this job file.
function init_gear_sets()
end
--------------------------------------
-- Precast sets
--------------------------------------
-- Precast sets to enhance JAs
sets.precast.JA['Bolster'] = {body="Bagua Tunic +1"}
sets.precast.JA['Life cycle'] = {body="Geomancy Tunic +1",
head="Azimuth hood"
}
sets.precast.JA['Curative Recantation'] = {hands="Bagua Mitaines +1"}
sets.precast.JA['Mending Halation'] = {legs="Bagua Pants +1"}
sets.precast.JA['Radial Arcana'] = {feet="Bagua Sandals +1"}
sets.precast.JA['Primal Zeal'] = {head="Bagua galero +1"}
sets.precast.JA['Cardinal Chant'] = {head="geomancy galero +1"}
-- Fast cast sets for spells
sets.precast.FC = {
head="Merlinic Hood",
body="Merlinic Jubbah",
hands="Merlinic Dastanas",
legs="Geo. Pants +1",
feet="Merlinic Crackows",
waist="Witful Belt",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
back="Lifestream Cape",
}
sets.precast.FC.Cure = set_combine(sets.precast.FC, {
legs="Gyve Trousers",
back="Pahtli Cape",
})
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {
waist="Siegel Sash",
})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {
main="Nibiru Cudgel",
hands="Bagua Mitaines +1",
neck="Mizukage-no-Kubikazar",
ear1="Barkarole earring"
})
sets.precast.FC.Impact = set_combine(sets.precast.FC['Elemental Magic'], {head=empty,body="Twilight Cloak"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
ammo="Hasty Pinion +1",
head="telchine cap",
body="helios jacket",
hands="telchine Gloves",
legs="telchine braconi",
feet="telchine pigaches",
neck="fotia Gorget",
waist="fotia Belt",
left_ear="Moonshade Earring",
right_ear="Brutal Earring",
left_ring="levia. Ring",
right_ring="levia. Ring",
back="Refraction Cape",
}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Flash Nova'] = set_combine(sets.precast.WS,{
ammo="Ghastly Tathlum +1",
head="Helios Bandt",
body="Merlinic Jubbah",
hands="Hagondes Cuffs +1",
legs="Hagondes Pants +1",
feet="helios Boots",
neck="Eddy Necklace",
waist="yamabuki-no-obi",
left_ear="Friomisi Earring",
right_ear="Barkarole Earring",
left_ring="Shiva Ring",
right_ring="Shiva Ring",
back="Nantosuelta's Cape",})
sets.precast.WS['Black Halo'] = sets.precast.WS['Flash Nova']
sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS['Flash Nova'],{back="Kaikias' cape",})
sets.precast.WS['Gust Slash'] =sets.precast.WS['Flash Nova']
sets.precast.WS['Starlight'] = sets.precast.WS['Flash Nova']
sets.precast.WS['Moonlight'] = sets.precast.WS['Flash Nova']
--------------------------------------
-- Midcast sets
--------------------------------------
-- Base fast recast for spells
sets.midcast.FastRecast =set_combine(sets.midcast.fastcast)
sets.midcast.Regen = set_combine(sets.midcast.fastcast, {
main="Nibiru Cudgel",
body="Merlinic Jubbah"})
sets.midcast['Enhancing Magic']={
main="Nibiru Cudgel",
sub="Avalon Shield",
head="Umuthi Hat",
hands="bagua mitaines +1",
body={ name="Telchine Chas.", augments={'Mag. Acc.+12 "Mag.Atk.Bns."+12','"Conserve MP"+4','Enh. Mag. eff. dur. +4',}},
legs="bagua Pants +1",
feet="helios Boots",
neck="Colossus's Torque",
waist="Cascade Belt",
left_ear="Andoaa Earring",
}
sets.midcast.Refresh = set_combine(sets.midcast['Enhancing Magic'], {
back="grapevine cape"})
sets.midcast.Aquaveil = set_combine(sets.midcast['Enhancing Magic'], {
waist="Emphatikos rope"})
sets.midcast.Geomancy ={
main="Nibiru Cudgel",
sub="Avalon Shield",
range="Dunna",
head="Azimuth hood",
body="Bagua Tunic +1",
hands="Geo. Mitaines +1",
legs="azimuth tights",
feet="azimuth gaiters",
waist="Austerity Belt +1",
left_ear="Barkarole Earring",
right_ear="Gifted Earring",
right_ring="Renaye Ring",
back="Lifestream Cape",
}
sets.midcast.Geomancy.Indi =set_combine(sets.midcast.Geomancy, {legs="bagua pants +1"})
sets.midcast.Cure = {
main="Nibiru Cudgel",
sub="Avalon Shield",
head="Geomancy galero +1",
legs="Gyve Trousers",
feet="Regal Pumps +1",
left_ear="Gifted Earring",
left_ring="Sirona's Ring",
}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {
waist="siegel sash",
})
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Protectra = {ring1="Sheltered Ring"}
sets.midcast.Shellra = {ring1="Sheltered Ring"}
-- Custom Spell Classes
sets.midcast['Enfeebling Magic'] = {
main="Nibiru Cudgel",
sub="Avalon Shield",
ammo="Memoria sachet",
head="Artsieq Hat",
body="Ischemia Chasu.",
hands="azimuth gloves",
legs="Mes'yohi slacks",
feet="bagua sandals +1",
neck="imbodla necklace",
waist="yamabuki-no-obi",
left_ear="Gwati Earring",
right_ear="Enchntr. Earring +1",
left_ring="Shiva Ring",
right_ring="Shiva Ring",
back="lifestream Cape",
}
sets.midcast.IntEnfeebles = set_combine(sets.midcast['Enfeebling Magic'], {
})
sets.midcast.ElementalEnfeeble = sets.midcast['Enfeebling Magic']
sets.midcast['Dark Magic'] = {
main="Nibiru Cudgel",
sub="Avalon Shield",
ammo="Ghastly Tathlum +1",
head="Merlinic Hood",
body="Geo. Tunic +1",
hands="azimuth gloves",
legs="Azimuth Tights",
feet="Merlinic Crackows",
neck="Aesir Torque",
waist="Yamabuki-no-Obi",
left_ear="Barkarole Earring",
right_ear="Gwati Earring",
left_ring="shiva Ring",
right_ring="sangoma Ring",
back="Nantosuelta's Cape",
}
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {
waist="Austerity Belt +1",
left_ear="Abyssal Earring",
right_ear="Hirudinea Earring",
})
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = sets.precast.FC
sets.midcast.Bolster = {body="Bagua Tunic +1"}
sets.midcast['Life Cycle'] = {body="Geo. Tunic +1",
head="Azimuth hood"}
sets.midcast['Mending Halation'] = {legs="Bagua Pants +1"}
sets.midcast['Radial Arcana'] = {feet="Bagua Sandals +1"}
sets.midcast.Bolster.Pet = {body="Bagua Tunic +1"}
sets.midcast['Life Cycle'].Pet = {body="Geo. Tunic +1",
head="Azimuth hood"}
sets.midcast['Mending Halation'].Pet = {legs="Bagua Pants +1"} sets.midcast.Bolster.Pet.Indi = {body="Bagua Tunic +1"}
sets.midcast['Life Cycle'].Pet.Indi = {body="Geo. Tunic +1",
head="Azimuth hood"}
sets.midcast['Mending Halation'].Pet.Indi = {legs="Bagua Pants +1"}
-- Elemental Magic sets
sets.midcast['Elemental Magic']= {
main="Nibiru Cudgel",
sub="Avalon Shield",
ammo="ghastly tathlum +1",
head="Merlinic Hood",
body="Merlinic Jubbah",
hands="Almaric Gages",
legs="Merlinic Shalwar",
feet="Merlinic Crackows",
neck="Mizukage-no-Kubikazar",
waist="Refoccilation Stone",
left_ear="Friomisi Earring",
right_ear="Barkarole Earring",
left_ring="shiva Ring",
right_ring="shiva Ring",
back="Nantosuelta's Cape",
}
sets.midcast['Elemental Magic']['Accuracy']=set_combine(sets.midcast['Elemental Magic'], {
waist=gear.ElementalObi,
})
sets.midcast.Impact = {
main="Nibiru Cudgel",
sub="Avalon Shield",
ammo="Ghastly Tathlum +1",
head=empty,
body="Twilight Cloak",
hands="azimuth gloves",
legs="Azimuth Tights",
feet="Helios Boots",
neck="Eddy Necklace",
waist=gear.ElementalObi,
left_ear="Gwati Earring",
right_ear="Barkarole Earring",
left_ring="Shiva Ring",
right_ring="Shiva Ring",
back="Nantosuelta's Cape",
}
--------------------------------------
-- Idle/resting/defense/etc sets
--------------------------------------
-- Resting sets
sets.resting = {
main="Nibiru Cudgel",
sub="Avalon Shield",
range="Dunna",
body="Respite Cloak",
hands="Bagua Mitaines +1",
legs="Assid. Pants",
feet="Geo. Sandals +1",
neck="Twilight Torque",
waist="Fucho-no-Obi",
left_ear="Merman's Earring",
right_ear="Merman's Earring",
left_ring="Sheltered Ring",
right_ring="Renaye Ring",
back="Kumbira Cape",
}
-- Idle sets
sets.idle = sets.resting
sets.idle.PDT = {
main="Nibiru cudgel",
sub="Avalon Shield",
head="Hagondes Hat +1",
neck="Twilight Torque",
ear1="Merman's Earring",
ear2="Merman's Earring",
body="Hagondes Coat +1",
hands="hagondes cuffs +1",
ring1="shadow Ring",
ring2="dark Ring",
back="shadow mantle",
waist="Flax Sash",
legs="hagondes Pants +1",
feet="hagondes sabots +1"}
sets.idle.MDT = set_combine(sets.idle.PDT, {
main="Nibiru Cudgel",
sub="Avalon Shield",})
-- .Pet sets are for when Luopan is present.
sets.idle.Pet = set_combine(sets.resting, {main="Nibiru Cudgel",
sub="Avalon Shield",
head="Azimuth hood",
body={ name="Telchine Chas.", augments={'Pet: Accuracy+18 Pet: Rng. Acc.+18','Pet: "Regen"+2',}},
legs="helios spats",
hands={ name="Helios Gloves", augments={'Pet: Accuracy+19 Pet: Rng. Acc.+19','Pet: "Regen"+3',}},
feet="Bagua Sandals +1",
waist="Isa Belt",
back="Lifestream Cape",
ear1="Handler's Earring +1",
ear2="Handler's Earring",
})
sets.idle.PDT.Pet = set_combine(sets.idle.PDT, {main="Nibiru Cudgel",
sub="Avalon Shield",
head="Azimuth hood",
body={ name="Telchine Chas.", augments={'Pet: Accuracy+18 Pet: Rng. Acc.+18','Pet: "Regen"+2',}},
hands={ name="Helios Gloves", augments={'Pet: Accuracy+19 Pet: Rng. Acc.+19','Pet: "Regen"+3',}},
legs="helios spats",
feet="Bagua Sandals +1",
waist="Isa Belt",
back="Lifestream Cape",
ear1="Handler's Earring +1",
ear2="Handler's Earring",
})
sets.idle.MDT.Pet = set_combine(sets.idle.MDT, {main="Nibiru Cudgel",
sub="Avalon Shield",
head="Azimuth hood +1",
body={ name="Telchine Chas.", augments={'Pet: Accuracy+18 Pet: Rng. Acc.+18','Pet: "Regen"+2',}},
hands={ name="Helios Gloves", augments={'Pet: Accuracy+19 Pet: Rng. Acc.+19','Pet: "Regen"+3',}},
legs="helios spats",
feet="Bagua Sandals +1",
waist="Isa Belt",
back="Lifestream Cape",
ear1="Handler's Earring +1",
ear2="Handler's Earring",
})
-- .Indi sets are for when an Indi-spell is active.
sets.idle.Indi = sets.resting
sets.idle.PDT.Indi = sets.idle.PDT
sets.idle.MDT.Indi = sets.idle.MDT
sets.idle.PDT.Pet.Indi = sets.idle.PDT.Pet
sets.idle.MDT.Pet.Indi = sets.idle.MDT.Pet
sets.idle.Town = {
main="Nibiru Cudgel",
sub="Avalon Shield",
range="Dunna",
head="Azimuth Hood",
body="Azimuth Coat",
hands="Azimuth Gloves",
legs="Azimuth Tights",
feet="Azimuth Gaiters",
neck="Twilight Torque",
waist="Fucho-no-Obi",
left_ear="Merman's Earring",
right_ear="Merman's Earring",
left_ring="Sheltered Ring",
right_ring="Renaye Ring",
back="Lifestream Cape",
}
sets.idle.Weak = sets.resting
-- Defense sets
sets.defense.PDT = sets.idle.PDT
sets.defense.MDT = sets.idle.MDT
sets.Kiting = {feet="Geo. Sandals +1"}
sets.latent_refresh = {waist="Fucho-no-obi"}
--------------------------------------
-- Engaged sets
--------------------------------------
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Normal melee group
sets.engaged = {
main="Nibiru Cudgel",
sub="Avalon Shield",
ammo="Hasty Pinion +1",
head="telchine cap",
body="helios jacket",
hands="telchine gloves",
legs="telchine braconi",
feet="telchine pigaches",
neck="Asperity Necklace",
waist="cetl Belt",
left_ear="Steelflash Earring",
right_ear="Bladeborn Earring",
left_ring="rajas Ring",
right_ring="k'ayres ring",
back="Kayapa Cape",
}
sets.engaged.Accuracy = set_combine(sets.engaged,{
neck="Iqabi Necklace",
right_ear="Zennaroi Earring",
waist="Olseni Belt",
left_ring="supershear EarRing",
right_ring="beeline ring",
} )
sets.engaged.Dual = set_combine(sets.engaged,{
sub="Nibiru Cudgel",
left_ear="Heartseeker Earring",
right_ear="Dudgeon Earring",
waist="shetal stone",
} )
--------------------------------------
-- Custom buff sets
--------------------------------------
poison = 0
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted then
if spell.english:startswith('Indi') then
if not classes.CustomIdleGroups:contains('Indi') then
classes.CustomIdleGroups:append('Indi')
end
send_command('@timers d "'..indi_timer..'"')
indi_timer = spell.english
send_command('@timers c "'..indi_timer..'" '..indi_duration..' down spells/00136.png')
elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 60 down spells/00220.png')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 90 down spells/00220.png')
end
elseif not player.indi then
classes.CustomIdleGroups:clear()
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
if player.indi and not classes.CustomIdleGroups:contains('Indi')then
classes.CustomIdleGroups:append('Indi')
handle_equipping_gear(player.status)
elseif classes.CustomIdleGroups:contains('Indi') and not player.indi then
classes.CustomIdleGroups:clear()
handle_equipping_gear(player.status)
end
if buff == "poison" then
if gain then
poison = 1
add_to_chat(255, '*-*-*-*-*-*-*-*-* [ Poisoned ] *-*-*-*-*-*-*-*-*')
else
poison = 0
add_to_chat(255, '*-*-*-*-*-*-*-*-* [ Poison OFF ] *-*-*-*-*-*-*-*-*')
end
end
end
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'Dual' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
end
-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
-- this if for low tier
if lowtier:contains(spell.name) then
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Low TIER ] *-*-*-*-*-*-*-*-*')
if buffactive.Poison then
equip(sets.midcast['Elemental Magic'], {main="Nibiru Cudgel"})
elseif spell.element == 'Earth' then
equip(sets.midcast['Elemental Magic'], {neck="Quanpur Necklace"})
elseif spell.element == 'Ice' then
equip(sets.midcast['Elemental Magic'], {main="Nibiru Cudgel"})
elseif spell.element == 'Wind' then
equip(sets.midcast['Elemental Magic'], {Main="Nibiru Cudgel"})
end
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
end
else
-- high tier
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ High TIER ] *-*-*-*-*-*-*-*-*')
if buffactive.Poison then
equip(sets.midcast['Elemental Magic']['Accuracy'], {main="Nibiru Cudgel"})
elseif spell.element == 'Earth' then
equip(sets.midcast['Elemental Magic']['Accuracy'], {neck="Quanpur Necklace"})
elseif spell.element == 'Ice' then
equip(sets.midcast['Elemental Magic']['Accuracy'], {main="Nibiru Cudgel"})
elseif spell.element == 'Wind' then
equip(sets.midcast['Elemental Magic'], {Main="Nibiru Cudgel"})
end
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
end
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
elseif spell.skill == 'Geomancy' then
if spell.english:startswith('Indi') then
return 'Indi'
end
elseif spell.skill == 'Elemental Magic' then
end
end
end
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
classes.CustomIdleGroups:clear()
if player.indi then
classes.CustomIdleGroups:append('Indi')
end
end
-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-- MAKE A MACRO : /tell <me> check
function open_coffer()
CofferType = "Velkk Coffer"
if player.inventory[CofferType] then
NCoffer = player.inventory[CofferType].count
bag = windower.ffxi.get_bag_info(0).count
max = windower.ffxi.get_bag_info(0).max
spots = max-bag
if spots > 0 then
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..NCoffer..'x '..CofferType..' to open - Inventory('..bag..'/'..max..') ] *-*-*-*-*-*-*-*-*')
local nextcommand = ""
for i=1, spots do
nextcommand = nextcommand .. 'input /item "'..CofferType..'" <me>; wait 2;'
end
nextcommand = nextcommand .. 'input /tell '..player.name..' check'
send_command(nextcommand)
else
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Inventory('..bag..'/'..max..') ] *-*-*-*-*-*-*-*-*')
end
else
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ No '..CofferType..' in inventory ] *-*-*-*-*-*-*-*-*')
end
end
windower.register_event('chat message', function(original, sender, mode, gm)
local match
if sender == player.name then
if original == "check" then
open_coffer()
end
end
return sender, mode, gm
end)
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(1, 1)
end
By harpy 2017-10-11 11:41:34
anyone having an issue with organizer?
Server: Leviathan
Game: FFXI
Posts: 3753
By Leviathan.Celebrindal 2017-10-14 17:33:56
not sure what's going on with my Ranger Lua. No alterations made for over a month, yet ever since the update my Weapon Skill sets no longer equip. Preshot, Midshot, and all /ja related sets equip fine, but whether I'm engaged or not, no changing of gear on weaponskills. Again, I haven't made any changes recently, and this format of language was working fine for me for well over 8 months. Here is my current lua. Weapon skill sets start in line 372.
Edit- solved- found a missing line in my precast arguments. I often keep multiple files open in Notepad++ at once, and I clearly had the RNG lua on top instead of what I meant to be working on and deleted a necessary line in my WS rules.
Carbuncle.Calout
Server: Carbuncle
Game: FFXI
Posts: 14
By Carbuncle.Calout 2017-10-22 17:19:08
Looking for some help to add Mote's Treasure Hunter to Flippants Blu GS. I'm not sure what to do so any help would be grateful. Code -- *** Credit goes to Flippant for helping me with Gearswap *** --
-- ** I Use Some of Motenten's Functions ** --
function get_sets()
AccIndex = 1
AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. Default ACC Set Is LowACC. The First TP Set Of Your Main Weapon Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
IdleIndex = 1
IdleArray = {"Refresh","Movement","Regen","PDT"} -- Default Idle Set Is Movement --
Lurnblu = 0
CapRingLock = 0 -- Capacity Ring Lock On/Off --
CapBackLock = 0
Armor = 'None'
target_distance = 5 -- Set Default Distance Here --
Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
select_default_macro_book() -- Change Default Macro Book At The End --
include('organizer-lib.lua')
send_command('bind f12 input //gs c C11')
-- Physical Type BlueMagic --
Physical_BlueMagic = S{
'Asuran Claws','Bludgeon','Body Slam','Feather Storm','Mandibular Bite',
'Queasyshroom','Power Attack','Ram Charge','Screwdriver','Sickle Slash',
'Smite of Rage','Spinal Cleave','Spiral Spin','Sweeping Gouge','Terror Touch'}
-- Physical Type BlueMagic: STR Modifier --
Physical_BlueMagic_STR = S{
'Battle Dance','Bloodrake','Death Scissors','Dimensional Death','Empty Thrash',
'Heavy Strike','Quadrastrike','Uppercut','Tourbillion','Vertical Cleave',
'Whirl of Rage','Diffusion Ray'}
-- Physical Type BlueMagic: STR + DEX Modifiers --
Physical_BlueMagic_DEX = S{
'Amorphic Spikes','Barbed Crescent','Claw Cyclone','Disseverment','Foot Kick',
'Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad','Seedspray',
'Vanity Dive','Sinker Drill','Thrashing Assault'}
-- Physical Type BlueMagic: STR + AGI Modifiers --
Physical_BlueMagic_VIT = S{
'Cannonball','Delta Thrust','Grand Slam','Quad. Continuum',
'Sprout Smack','Glutinous Dart','Saurian Slide'}
Physical_BlueMagic_AGI = S{
'Benthic Typhoon','Helldive','Hydro Shot','Jet Stream','Pinecone Bomb',
'Wild Oats','Tempest Upheaval'}
-- Magical Type BlueMagic --
Magical_BlueMagic = S{
'Acrid Stream','Dark Orb','Droning Whirlwind','Embalming Earth','Evryone. Grudge',
'Firespit','Foul Waters','Gates of Hades','Leafstorm','Magic Hammer',
'Regurgitation','Rending Deluge','Tem. Upheaval','Thermal Pulse','Water Bomb','Subduction',
'Retinal Glare','Rail Cannon','Searing Tempest','Spectral Floe','Scouring Spate',
'Anvil Lightning','Entomb','Tenebral Crush','Palling Salvo'}
-- Low Accuracy Type BlueMagic --
BlueMagic_Accuracy = S{
'1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
'Cimicine Discharge','Cold Wave','Digest','Corrosive Ooze','Demoralizing Roar',
'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance','Lowing',
'Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind','Sandspin',
'Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas','Sub-zero Smash',
'Triumphant Roar','Venom Shell','Voracious Trunk','Yawn','Blinding Fulgor','Silent Storm'}
-- Breath Type BlueMagic --
BlueMagic_Breath = S{
'Bad Breath','Diffusion Ray','Flying Hip Press','Final Sting','Frost Breath',
'Heat Breath','Magnetite Cloud','Poison Breath','Radiant Breath','Thunder Breath',
'Vapor Spray','Wind Breath'}
-- Buff Type BlueMagic --
BlueMagic_Buff = S{
'Barrier Tusk','Carcharian Verve','Diamondhide','Metallic Body','Magic Barrier',
"Occultation",'Orcish Counterstance','Nature\'s Meditation','Plasma Charge',
'Pyric Bulwark','Reactor Cool'}
-- Diffusion Compatible Type BlueMagic --
BlueMagic_Diffusion = S{
'Amplification','Cocoon','Erratic Flutter','Exuviation','Feather Barrier',
'Harden Shell','Memento Mori','Metallic Body','Plasma Charge','Reactor Cool',
'Refueling','Saline Coat','Warm-Up','Zephyr Mantle'}
-- Healing Type BlueMagic --
BlueMagic_Healing = S{
'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
'Wild Carrot'}
-- Stun Type BlueMagic --
BlueMagic_Stun = S{
'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
'Thunderbolt','Whirl of Rage'}
-- Unbridled Learning Type BlueMagic --
BlueMagic_Unbridled = S{
'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Polar Roar',
'Pyric Bulwark','Thunderbolt','Tourbillion','Uproot','Mighty Guard'}
sets.Idle = {}
-- Idle/Town Sets --
sets.Idle.Regen = {
ammo="Ginsen",
head="Magnifying Specs.",
body="Tanner's Smock",
hands="Tanner's Gloves",
legs="Carmine Cuisses +1",
feet={ name="Herculean Boots", augments={'DEX+4','"Counter"+2','"Refresh"+2','Accuracy+6 Attack+6','Mag. Acc.+1 "Mag.Atk.Bns."+1',}},
neck="Tanner's Torque",
waist="Chaac Belt",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Orvail Ring",
right_ring="Craftmaster's Ring",
back="Shaper's Shawl"}
sets.Idle.Movement = set_combine(sets.Idle.Regen,{
ammo="Ginsen",
head={ name="Herculean Helm", augments={'Pet: Mag. Acc.+10 Pet: "Mag.Atk.Bns."+10','"Conserve MP"+4','"Refresh"+2',}},
body="Jhakri Robe +2",
hands="Serpentes Cuffs",
legs="Carmine Cuisses +1",
feet={ name="Herculean Boots", augments={'DEX+4','"Counter"+2','"Refresh"+2','Accuracy+6 Attack+6','Mag. Acc.+1 "Mag.Atk.Bns."+1',}},
neck="Bathy Choker",
waist="Flume Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Sheltered Ring",
right_ring="Paguroidea Ring",
back="Solemnity Cape"})
sets.Idle.Refresh = set_combine(sets.Idle.Regen,{
ammo="Ginsen",
head={ name="Herculean Helm", augments={'Pet: Mag. Acc.+10 Pet: "Mag.Atk.Bns."+10','"Conserve MP"+4','"Refresh"+2',}},
body="Jhakri Robe +2",
hands="Serpentes Cuffs",
legs="Carmine Cuisses +1",
feet={ name="Herculean Boots", augments={'DEX+4','"Counter"+2','"Refresh"+2','Accuracy+6 Attack+6','Mag. Acc.+1 "Mag.Atk.Bns."+1',}},
neck="Bathy Choker",
waist="Flume Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Sheltered Ring",
right_ring="Paguroidea Ring",
back="Solemnity Cape"})
sets.Idle.PDT = set_combine(sets.Idle.Regen,{
ammo="Ginsen",
head="Lithelimb Cap",
body="Emet Harness +1",
hands={ name="Herculean Gloves", augments={'Accuracy+30','"Triple Atk."+3','DEX+8','Attack+1',}},
legs="Carmine Cuisses +1",
feet={ name="Herculean Boots", augments={'Mag. Acc.+2','"Triple Atk."+3','Accuracy+18 Attack+18',}},
neck="Twilight Torque",
waist="Flume Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Defending Ring",
right_ring="Patricius Ring",
back="Solemnity Cape"})
sets.Resting = set_combine(sets.Idle.Refresh,{
legs="Lengo Pants"})
sets.Lurnblu ={
ammo="Ginsen",
head={ name="Herculean Helm", augments={'Accuracy+20 Attack+20','"Triple Atk."+4','AGI+10','Attack+8',}},
body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
hands="Assim. Bazu. +1",
legs={ name="Samnuha Tights", augments={'STR+8','DEX+9','"Dbl.Atk."+3','"Triple Atk."+2',}},
feet={ name="Herculean Boots", augments={'Mag. Acc.+2','"Triple Atk."+3','Accuracy+18 Attack+18',}},
neck="Lissome Necklace",
waist="Windbuffet Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Petrov Ring",
right_ring="Epona's Ring",
back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}}
sets.CapRingLock ={
ring1="Capacity Ring",
ring2="Trizek Ring"}
sets.CapBackLock ={
back="Mecisto. Mantle"}
-- Normal TP Sets --
sets.TP = {
ammo="Ginsen",
head={ name="Herculean Helm", augments={'Accuracy+20 Attack+20','"Triple Atk."+4','AGI+10','Attack+8',}},
body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
hands={ name="Herculean Gloves", augments={'Accuracy+30','"Triple Atk."+3','DEX+8','Attack+1',}},
legs={ name="Samnuha Tights", augments={'STR+8','DEX+9','"Dbl.Atk."+3','"Triple Atk."+2',}},
feet={ name="Herculean Boots", augments={'Mag. Acc.+2','"Triple Atk."+3','Accuracy+18 Attack+18',}},
neck="Asperity Necklace",
waist="Windbuffet Belt +1",
left_ear="Dudgeon Earring",
right_ear="Heartseeker Earring",
left_ring="Petrov Ring",
right_ring="Epona's Ring",
back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}}
sets.TP.MidACC = set_combine(sets.TP,{
ammo="Honed Tathlum",
neck="Lissome Necklace",
waist="Kentarch Belt +1"})
sets.TP.HighACC = set_combine(sets.TP.MidACC,{
head="Dampening Tam",
neck="Sanctity Necklace",
ear1="Cessance Earring",
ear2="Steelflash earring",
ring1="Patricius Ring",
ring2="Epona's Ring",
waist="Olseni Belt",})
-- March x2 + Haste --
-- Embrava + (March or Haste) --
-- Geo Haste + (March or Haste or Embrava) --
sets.TP.HighHaste = set_combine(sets.TP,{
ear1="Cessance Earring",
ear2="Brutal Earring",
waist="Windbuffet Belt +1",})
sets.TP.MidACC.HighHaste = set_combine(sets.TP.HighHaste,{
ammo="Honed Tathlum",
waist="Kentarch Belt +1"})
sets.TP.HighACC.HighHaste = set_combine(sets.TP.MidACC.HighHaste,{
neck="Sanctity Necklace",
ear2="Cessance Earring",
ring1="Patricius Ring",
ring2="Epona's Ring",
waist="Olseni Belt"})
-- PDT/MDT Sets --
sets.PDT = {
head="Lithelimb Cap",
neck="Twilight Torque",
body="Emet Harness +1",
hands="Adhemar Wristbands",
ring1="Patricius Ring",
ring2="Defending Ring",
back="Solemnity Cape",
legs={ name="Herculean Trousers", augments={'Attack+23','"Triple Atk."+2','STR+10','Accuracy+15',}},
feet={ name="Herculean Boots", augments={'Mag. Acc.+2','"Triple Atk."+3','Accuracy+18 Attack+18',}}}
sets.MDT = set_combine(sets.PDT,{
head="Dampening Tam",
ring1="Shadow Ring",
back="Solemnity Cape"})
-- Hybrid Sets --
sets.TP.Hybrid = set_combine(sets.PDT,{})
sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid.LowACC,{})
sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
-- WS Base Set --
sets.WS = {}
-- WS Sets --
sets.WS["Chant du Cygne"] = {
ammo="Falcon Eye",
head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
hands={ name="Adhemar Wristbands", augments={'DEX+10','AGI+10','Accuracy+15',}},
legs={ name="Samnuha Tights", augments={'STR+8','DEX+9','"Dbl.Atk."+3','"Triple Atk."+2',}},
feet="Thereoid Greaves",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Begrudging Ring",
right_ring="Epona's Ring",
back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}}}
sets.WS["Chant du Cygne"].MidACC = set_combine(sets.WS["Chant du Cygne"],{})
sets.WS["Chant du Cygne"].HighACC = set_combine(sets.WS["Chant du Cygne"].MidACC,{
ammo="Honed Tathlum",})
sets.WS.Requiescat = {
ammo="Honed Tathlum",
head="Jhakri Coronal +1",
body="Jhakri Robe +2",
hands="Jhakri Cuffs +1",
legs="Jhakri Slops +1",
feet="Jhakri Pigaches +1",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Vertigo Ring",
right_ring="Epona's Ring",
back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}}
sets.WS.Requiescat.MidACC = set_combine(sets.WS.Requiescat,{
ammo="Honed Tathlum",
head="Whirlpool Mask"})
sets.WS.Requiescat.HighACC = set_combine(sets.WS.Requiescat.MidACC,{
back="Letalis Mantle"})
sets.WS["Savage Blade"] = {
ammo="Mantoptera Eye",
head={ name="Lilitu Headpiece", augments={'STR+10','DEX+10','Attack+15','Weapon skill damage +3%',}},
body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
hands={ name="Herculean Gloves", augments={'Mag. Acc.+13 "Mag.Atk.Bns."+13','Weapon skill damage +4%','STR+11','Mag. Acc.+5','"Mag.Atk.Bns."+3',}},
legs={ name="Samnuha Tights", augments={'STR+8','DEX+9','"Dbl.Atk."+3','"Triple Atk."+2',}},
feet={ name="Herculean Boots", augments={'Mag. Acc.+2','"Triple Atk."+3','Accuracy+18 Attack+18',}},
neck="Tjukurrpa Medal",
waist="Prosilio Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Ifrit Ring",
right_ring="Apate Ring",
back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}}
sets.WS["Savage Blade"].MidACC = set_combine(sets.WS["Savage Blade"],{})
sets.WS["Savage Blade"].HighACC = set_combine(sets.WS["Savage Blade"].MidACC,{})
sets.WS.Expiacion = {
ammo="Mantoptera Eye",
head={ name="Lilitu Headpiece", augments={'STR+10','DEX+10','Attack+15','Weapon skill damage +3%',}},
body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
hands={ name="Herculean Gloves", augments={'Mag. Acc.+13 "Mag.Atk.Bns."+13','Weapon skill damage +4%','STR+11','Mag. Acc.+5','"Mag.Atk.Bns."+3',}},
legs={ name="Samnuha Tights", augments={'STR+8','DEX+9','"Dbl.Atk."+3','"Triple Atk."+2',}},
feet={ name="Herculean Boots", augments={'Mag. Acc.+2','"Triple Atk."+3','Accuracy+18 Attack+18',}},
neck="Tjukurrpa Medal",
waist="Prosilio Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Ifrit Ring",
right_ring="Apate Ring",
back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}}}
sets.WS.Expiacion.MidACC = set_combine(sets.WS.Expiacion,{})
sets.WS.Expiacion.HighACC = set_combine(sets.WS.Expiacion.MidACC,{})
sets.JA = {}
-- JA Sets --
sets.JA['Azure Lore'] = {hands="Luh. Bazubands +1"}
sets.JA['Chain Affinity'] = {body="Hashishin Kavuk"}
sets.JA['Efflux'] = {legs="Hashishin Tayt"}
sets.JA['Burst Affinity'] = {feet="Hashi. Basmak +1"}
sets.JA['Convergence'] = {head="Luh. Keffiyeh +1"}
sets.JA['Diffusion'] = {feet="Luhlaza Charuqs"}
-- Waltz Set --
sets.Waltz = {}
sets.Precast = {}
-- Fastcast Set --
sets.Precast.FastCast = {
head="Amalric Coif",
body="Luhlaza Jubbah +1",
neck="Voltsurge Torque",
ear1="Loquac. Earring",
ear2="Enchntr. Earring +1",
hands="Leyline Gloves",
ring1="Prolix Ring",
ring2="Lebeche Ring",
back="Swith Cape",
waist="Witful Belt",
legs="Psycloth Lappas",
feet="Amalric Nails"}
sets.Precast.BlueCast = set_combine(sets.Precast.FastCast,{
body="Hashishin Mintan",feet="Luhlaza Charuqs"})
-- Precast Enhancing Magic --
sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash"})
-- Midcast Base Set --
sets.Midcast = {}
-- Magic Haste Set --
sets.Midcast.Haste = set_combine(sets.Precast.FastCast,{})
-- Enhancing Magic Base Set --
sets.Midcast['Enhancing Magic'] = {ammo="Impatiens",
head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +9',}},
body={ name="Telchine Chas.", augments={'Mag. Evasion+8','"Cure" potency +6%','Enh. Mag. eff. dur. +10',}},
hands={ name="Telchine Gloves", augments={'"Fast Cast"+3','Enh. Mag. eff. dur. +9',}},
legs={ name="Telchine Braconi", augments={'"Fast Cast"+3','Enh. Mag. eff. dur. +8',}},
feet={ name="Telchine Pigaches", augments={'"Fast Cast"+3','Enh. Mag. eff. dur. +8',}},
neck="Incanter's Torque",
waist="Witful Belt",
left_ear="Loquac. Earring",
right_ear="Mendi. Earring",
left_ring="Prolix Ring",
right_ring="Lebeche Ring",
back="Swith Cape"}
-- Stoneskin Set --
sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{})
-- Cure/Curaga Spells & Healing Type BlueMagic --
sets.Midcast.Cure = {
ammo="Impatiens",
head={ name="Herculean Helm", augments={'Accuracy+20 Attack+20','"Triple Atk."+4','AGI+10','Attack+8',}},
body={ name="Telchine Chas.", augments={'Mag. Evasion+8','"Cure" potency +6%','Enh. Mag. eff. dur. +10',}},
hands={ name="Telchine Gloves", augments={'"Fast Cast"+3','Enh. Mag. eff. dur. +9',}},
legs={ name="Psycloth Lappas", augments={'MP+80','Mag. Acc.+15','"Fast Cast"+7',}},
feet={ name="Medium's Sabots", augments={'MP+10','MND+4','"Conserve MP"+1',}},
neck="Phalaina Locket",
waist="Witful Belt",
left_ear="Loquac. Earring",
right_ear="Mendi. Earring",
left_ring="Prolix Ring",
right_ring="Lebeche Ring",
back="Solemnity Cape"}
-- Physical Type BlueMagic --
sets.Midcast.Physical_BlueMagic = {
ammo="Mantoptera Eye",
head={ name="Adhemar Bonnet", augments={'STR+10','DEX+10','Attack+15',}},
body="Jhakri Robe +2",
hands="Jhakri Cuffs +1",
legs={ name="Herculean Trousers", augments={'Attack+23','"Triple Atk."+2','STR+10','Accuracy+15',}},
feet="Thereoid Greaves",
neck="Tjukurrpa Medal",
waist="Prosilio Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Ifrit Ring",
right_ring="Apate Ring",
back="Buquwik Cape"}
-- Physical Type BlueMagic: STR Modifier --
sets.Midcast.Physical_BlueMagic_STR = set_combine(sets.Midcast.Physical_BlueMagic,{})
-- Physical Type BlueMagic: STR/DEX Modifiers --
sets.Midcast.Physical_BlueMagic_DEX = set_combine(sets.Midcast.Physical_BlueMagic,{})
-- Physical Type BlueMagic: STR/VIT Modifiers --
sets.Midcast.Physical_BlueMagic_VIT = set_combine(sets.Midcast.Physical_BlueMagic,{})
-- Physical Type BlueMagic: STR/AGI Modifiers --
sets.Midcast.Physical_BlueMagic_AGI = set_combine(sets.Midcast.Physical_BlueMagic,{})
sets.Midcast['Elemental Magic'] ={
ammo="Pemphredo Tathlum",
head="Amalric Coif",
neck="Stoicheion Medal",
ear1="Hermetic Earring",
ear2="Friomisi Earring",
body="Amalric Doublet",
hands="Jhakri Cuffs +1",
ring1="Acumen Ring",
ring2="Vertigo Ring",
back="Izdubar Mantle",
waist="Yamabuki-no-Obi",
legs="Jhakri Slops +1",
feet="Jhakri Pigaches +1"}
-- Magical Type BlueMagic --
sets.Midcast.Magical_BlueMagic = {
ammo="Pemphredo Tathlum",
head="Amalric Coif",
neck="Stoicheion Medal",
ear1="Hermetic Earring",
ear2="Friomisi Earring",
body="Amalric Doublet",
hands="Jhakri Cuffs +1",
ring1="Acumen Ring",
ring2="Vertigo Ring",
back="Cornflower Cape",
waist="Yamabuki-no-Obi",
legs="Jhakri Slops +1",
feet="Jhakri Pigaches +1"}
-- Low Accuracy Type BlueMagic --
sets.Midcast.BlueMagic_Accuracy = {
ammo="Pemphredo Tathlum",
head="Amalric Coif",
neck="Sancity Necklace",
ear1="Lifestorm Earring",
ear2="Psystorm Earring",
body="Amalric Doublet",
hands="Jhakri Cuffs +1",
ring2="Strendu Ring",
ring2="Angha Ring",
back="Cornflower Cape",
waist="Porous Rope",
legs="Jhakri Slops +1",
feet="Jhakri Pigaches +1"}
-- Stun Type BlueMagic --
sets.Midcast.BlueMagic_Stun = set_combine(sets.Midcast.BlueMagic_Accuracy,{})
-- Buff Type BlueMagic --
sets.Midcast.BlueMagic_Buff = {feet="Luhlaza Charuqs"}
-- Breath Type BlueMagic --
sets.Midcast.BlueMagic_Breath = {}
-- BlueMagic Base Set For Any Non Listed BlueMagic --
sets.Midcast['Blue Magic'] = {}
-- Charged Whisker --
sets.Midcast['Charged Whisker'] = set_combine(sets.Midcast.Magical_BlueMagic,{})
sets.Misc ={
main="Tanmogayi +1",
sub="Vampirism",
head="Hashishin Kavuk +1",
neck="Gabaxorea",
hands="Remedy",
ring1="Gabaxorea",
waist="Chaac Belt",
ring2="Nibiru Blade"}
end
function pretarget(spell,action)
if spell.action_type == 'Magic' and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
cancel_spell()
send_command('input /item "Echo Drops" <me>')
elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
cancel_spell()
send_command('Aggressor')
elseif BlueMagic_Unbridled:contains(spell.english) and not buffactive['Unbridled Learning'] then
if windower.ffxi.get_ability_recasts()[81] < 1 and not buffactive.amnesia and not buffactive.charm then -- Auto Use Unbridled Learning When You Cast One of The Unbridled Spells.
cancel_spell()
send_command('input /ja "Unbridled Learning" <me>;wait 1.5;input /ma "'..spell.english..'" '..spell.target.name)
end
elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
degrade_spell(spell,Cure_Spells)
elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
degrade_spell(spell,Curaga_Spells)
elseif spell.type == "WeaponSkill" and spell.target.distance > target_distance and player.status == 'Engaged' then -- Cancel WS If You Are Out Of Range --
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
end
end
function precast(spell,action)
if spell.type == "WeaponSkill" then
if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
cancel_spell()
add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
return
else
equipSet = sets.WS
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
end
if spell.english == "Chant du Cygne" and player.tp > 2990 then
equipSet = set_combine(equipSet,{ear1="Jupiter's Pearl"})
end
equip(equipSet)
end
elseif spell.type == "JobAbility" then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
elseif spell.action_type == 'Magic' then
if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
return
else
if spell.english:startswith('Utsusemi') then
if spell.english == 'Utsusemi: Ni' then
if buffactive['Copy Image (3)'] then
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
return
else
equip(sets.Precast.Utsusemi)
end
else
equip(sets.Precast.Utsusemi)
end
elseif sets.Precast[spell.skill] then
equip(sets.Precast[spell.skill])
elseif spell.skill=="Blue Magic" then
equip(sets.Precast.BlueCast)
else
equip(sets.Precast.FastCast)
end
end
elseif spell.type == "Waltz" then
refine_waltz(spell,action)
equip(sets.Waltz)
elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
cast_delay(0.2)
send_command('cancel Sneak')
end
end
function midcast(spell,action)
equipSet = {}
if spell.action_type == 'Magic' then
equipSet = sets.Midcast
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
elseif (spell.english:startswith('Cur') or BlueMagic_Healing:contains(spell.english)) and spell.english ~= "Cursna" then
if spell.english:startswith('Cure') or BlueMagic_Healing:contains(spell.english) then
equipSet = equipSet.Cure
elseif spell.english:startswith('Cura') then
equipSet = equipSet.Curaga
end
if world.day_element == spell.element or world.weather_element == spell.element then
equipSet = set_combine(equipSet,{back="Twilight Cape",waist='Hachirin-no-Obi'})
end
elseif Physical_BlueMagic:contains(spell.english) or Physical_BlueMagic_STR:contains(spell.english) or Physical_BlueMagic_DEX:contains(spell.english) or Physical_BlueMagic_VIT:contains(spell.english) or Physical_BlueMagic_AGI:contains(spell.english) then
if Physical_BlueMagic_STR:contains(spell.english) then
equipSet = equipSet.Physical_BlueMagic_STR
elseif Physical_BlueMagic_DEX:contains(spell.english) then
equipSet = equipSet.Physical_BlueMagic_DEX
elseif Physical_BlueMagic_VIT:contains(spell.english) then
equipSet = equipSet.Physical_BlueMagic_VIT
elseif Physical_BlueMagic_AGI:contains(spell.english) then
equipSet = equipSet.Physical_BlueMagic_AGI
elseif Physical_BlueMagic:contains(spell.english) then
equipSet = equipSet.Physical_BlueMagic
end
if buffactive['Chain Affinity'] then
equipSet = set_combine(equipSet,sets['Chain Affinity'])
end
if buffactive.Efflux then
equipSet = set_combine(equipSet,sets.Efflux)
end
elseif Magical_BlueMagic:contains(spell.english) or spell.english == "Charged Whisker" then
if Magical_BlueMagic:contains(spell.english) then
equipSet = equipSet.Magical_BlueMagic
elseif spell.english == "Charged Whisker" then
equipSet = equipSet[spell.name]
end
if buffactive['Burst Affinity'] then
equipSet = set_combine(equipSet,sets['Burst Affinity'])
end
if buffactive.Convergence then
equipSet = set_combine(equipSet,sets.Convergence)
end
elseif BlueMagic_Accuracy:contains(spell.english) then
equipSet = equipSet.BlueMagic_Accuracy
elseif BlueMagic_Stun:contains(spell.english) then
equipSet = equipSet.BlueMagic_Stun
elseif BlueMagic_Buff:contains(spell.english) then
equipSet = equipSet.BlueMagic_Buff
elseif BlueMagic_Diffusion:contains(spell.english) and buffactive.Diffusion then
equipSet = set_combine(equipSet,sets.Diffusion)
elseif BlueMagic_Breath:contains(spell.english) then
equipSet = equipSet.BlueMagic_Breath
elseif spell.english == "Stoneskin" then
if buffactive.Stoneskin then
send_command('@wait 2.8;cancel stoneskin')
end
equipSet = equipSet.Stoneskin
elseif spell.english == "Sneak" then
if spell.target.name == player.name and buffactive['Sneak'] then
send_command('cancel sneak')
end
equipSet = equipSet.Haste
elseif spell.english:startswith('Utsusemi') then
if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then
send_command('@wait 1.7;cancel Copy Image*')
end
equipSet = equipSet.Haste
elseif spell.english == 'Monomi: Ichi' then
if buffactive['Sneak'] then
send_command('@wait 1.7;cancel sneak')
end
equipSet = equipSet.Haste
elseif equipSet[spell.skill] then
equipSet = equipSet[spell.skill]
end
elseif equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
equip(equipSet)
end
function aftercast(spell,action)
if spell.type == "WeaponSkill" and not spell.interrupted then
send_command('wait 0.2;gs c TP')
end
status_change(player.status)
end
function status_change(new,old)
if CapRingLock == 1 then
equip(sets.CapRingLock)
end
if CapRingLock == 1 then -- Capacity Ring Lock On/Off--
disable('ring1','ring2')
else
enable('ring1','ring2')
end
if Lurnblu == 1 then
equip(sets.Lurnblu)
end
if Lurnblu == 1 then ---Lurning Blu Magic Lock---
disable('body','hands','feet','back')
else
enable('body','hands','feet','back')
end
if CapBackLock == 1 then
equip(sets.CapBackLock)
end
if CapBackLock == 1 then -- CapBackLock Lock On/Off--
disable('back')
else
enable('back')
end
if Armor == 'PDT' then
equip(sets.PDT)
elseif Armor == 'MDT' then
equip(sets.MDT)
elseif new == 'Engaged' then
equipSet = sets.TP
if Armor == 'Hybrid' and equipSet["Hybrid"] then
equipSet = equipSet["Hybrid"]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if buffactive.March == 2 or buffactive.March == 1 or buffactive[580] or buffactive['Mighty Guard'] and (buffactive.Embrava or buffactive.Haste) and equipSet["HighHaste"] then
equipSet = equipSet["HighHaste"]
end
equip(equipSet)
elseif new == 'Idle' then
equipSet = sets.Idle
if equipSet[IdleArray[IdleIndex]] then
equipSet = equipSet[IdleArray[IdleIndex]]
end
if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
end
equip(equipSet)
elseif new == 'Resting' then
equip(sets.Resting)
end
end
function buff_change(buff,gain)
buff = string.lower(buff)
if buff == "aftermath: lv.3" then -- AM3 Timer/Countdown --
if gain then
send_command('timers create "Aftermath: Lv.3" 180 down;wait 150;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 15;input /echo Aftermath: Lv.3 [WEARING OFF IN 15 SEC.];wait 5;input /echo Aftermath: Lv.3 [WEARING OFF IN 10 SEC.]')
else
send_command('timers delete "Aftermath: Lv.3"')
add_to_chat(123,'AM3: [OFF]')
end
elseif buff == 'weakness' then -- Weakness Timer --
if gain then
send_command('timers create "Weakness" 300 up')
else
send_command('timers delete "Weakness"')
end
end
if not midaction() then
status_change(player.status)
end
end
-- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
function self_command(command)
if command == 'C1' then -- Accuracy Level Toggle --
AccIndex = (AccIndex % #AccArray) + 1
add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
status_change(player.status)
elseif command == 'C5' then -- Auto Update Gear Toggle --
status_change(player.status)
add_to_chat(158,'Auto Update Gear')
elseif command == 'C2' then -- Hybrid Toggle --
if Armor == 'Hybrid' then
Armor = 'None'
add_to_chat(123,'Hybrid Set: [Unlocked]')
else
Armor = 'Hybrid'
add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
end
status_change(player.status)
elseif command == 'C7' then -- PDT Toggle --
if Armor == 'PDT' then
Armor = 'None'
add_to_chat(123,'PDT Set: [Unlocked]')
else
Armor = 'PDT'
add_to_chat(158,'PDT Set: [Locked]')
end
status_change(player.status)
elseif command == 'CP' then -- Lock Capacity Cape On/Off --
if CapBackLock == 1 then
CapBackLock = 0
add_to_chat(123,'Capacity Back Unlocked: [Unlocked]')
else
CapBackLock = 1
add_to_chat(158,'Capacity Back Locked: [locked]')
end
status_change(player.status)
elseif command == 'C15' then -- MDT Toggle --
if Armor == 'MDT' then
Armor = 'None'
add_to_chat(123,'MDT Set: [Unlocked]')
else
Armor = 'MDT'
add_to_chat(158,'MDT Set: [Locked]')
end
status_change(player.status)
elseif command == 'C17' then -- Lock Capacity Ring On/Off --
if CapRingLock == 1 then
CapRingLock = 0
add_to_chat(123,'Capacity Ring Unlocked: [Unlocked]')
else
CapRingLock = 1
add_to_chat(158,'Capacity Ring Locked: [locked]')
end
status_change(player.status)
elseif command == 'C11' then -- Lock Blu Gear On For Lurning Spells --
if Lurnblu == 1 then
Lurnblu = 0
add_to_chat(123,'Lurning Blu Gear: [Unlocked]')
else
Lurnblu = 1
add_to_chat(158,'Lurning Blu Gear: [locked]')
end
status_change(player.status)
elseif command == 'C8' then -- Distance Toggle --
if player.target.distance then
target_distance = math.floor(player.target.distance*10)/10
add_to_chat(158,'Distance: '..target_distance)
else
add_to_chat(123,'No Target Selected')
end
elseif command == 'C6' then -- Idle Toggle --
IdleIndex = (IdleIndex % #IdleArray) + 1
add_to_chat(158,'Idle Set: ' .. IdleArray[IdleIndex])
status_change(player.status)
elseif command == 'TP' then
add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
elseif command:match('^SC%d$') then
send_command('//' .. sc_map[command])
end
end
function actualCost(originalCost)
if buffactive["Penury"] then
return originalCost*.5
elseif buffactive["Light Arts"] then
return originalCost*.9
else
return originalCost
end
end
function degrade_spell(spell,degrade_array)
spell_index = table.find(degrade_array,spell.name)
if spell_index > 1 then
new_spell = degrade_array[spell_index - 1]
change_spell(new_spell,spell.target.raw)
add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
end
end
function change_spell(spell_name,target)
cancel_spell()
send_command('//'..spell_name..' '..target)
end
function refine_waltz(spell,action)
if spell.type ~= 'Waltz' then
return
end
if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" or spell.name == "Divine Waltz II" then
return
end
local newWaltz = spell.english
local waltzID
local missingHP
if spell.target.type == "SELF" then
missingHP = player.max_hp - player.hp
elseif spell.target.isallymember then
local target = find_player_in_alliance(spell.target.name)
local est_max_hp = target.hp / (target.hpp/100)
missingHP = math.floor(est_max_hp - target.hp)
end
if missingHP ~= nil then
if player.sub_job == 'DNC' then
if missingHP < 40 and spell.target.name == player.name then
add_to_chat(123,'Full HP!')
cancel_spell()
return
elseif missingHP < 150 then
newWaltz = 'Curing Waltz'
waltzID = 190
elseif missingHP < 300 then
newWaltz = 'Curing Waltz II'
waltzID = 191
else
newWaltz = 'Curing Waltz III'
waltzID = 192
end
else
return
end
end
local waltzTPCost = {['Curing Waltz'] = 20, ['Curing Waltz II'] = 35, ['Curing Waltz III'] = 50}
local tpCost = waltzTPCost[newWaltz]
local downgrade
if player.tp < tpCost and not buffactive.trance then
if player.tp < 20 then
add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
cancel_spell()
return
elseif player.tp < 35 then
newWaltz = 'Curing Waltz'
elseif player.tp < 50 then
newWaltz = 'Curing Waltz II'
end
downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
end
if newWaltz ~= spell.english then
send_command('@input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
if downgrade then
add_to_chat(158, downgrade)
end
cancel_spell()
return
end
if missingHP > 0 then
add_to_chat(158,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
end
end
function find_player_in_alliance(name)
for i,v in ipairs(alliance) do
for k,p in ipairs(v) do
if p.name == name then
return p
end
end
end
end
function sub_job_change(newSubjob, oldSubjob)
select_default_macro_book()
end
function set_macro_page(set,book)
if not tonumber(set) then
add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
return
end
if set < 1 or set > 10 then
add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
return
end
if book then
if not tonumber(book) then
add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
return
end
if book < 1 or book > 20 then
add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
return
end
send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
else
send_command('@input /macro set '..tostring(set))
end
end
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'WAR' then
set_macro_page(1, 13)
elseif player.sub_job == 'RDM' then
set_macro_page(2, 13)
elseif player.sub_job == 'WHM' then
set_macro_page(1, 13)
elseif player.sub_job == 'NIN' then
set_macro_page(1, 13)
elseif player.sub_job == 'DNC' then
set_macro_page(1, 13)
elseif player.sub_job == 'BLM' then
set_macro_page(10, 13)
else
set_macro_page(1, 13)
end
end
Server: Siren
Game: FFXI
Posts: 26
By Siren.Firedevil 2017-10-24 13:15:08
Ok, I posted my LUA a while back and got no response. Based on Flippant's comments I went looking for info on Mote's Include to see if mine was missing something. I've done a ton of reading the past few days and feel educated now. I'm a LUA newbie and have just been copying other files and editing in my gear.
Here's the thing: I was under the impression that the sets don't have to be redefined in the individual job file as long as you have Mote-Include. For example, sets.precast.JA = {}. Am I wrong? Do I still have to put sets.precast = {} and sets.precast.JA = {} in my LUA before I set up the gear? I've seen tons of LUAs for GEO out there and none of them seem to do that. Can anyone confirm for me, and I'll leave you guys alone? :) Thanks!
Server: Phoenix
Game: FFXI
Posts: 1245
By Phoenix.Gaiarorshack 2017-10-29 13:51:46
Is spellinteruption gear in precast or midcast or both ?
By Havok16 2017-10-31 03:20:15
Hello Guys
I'm struggling with an error in my bst.lua and only with bst.lua.
the error says
>Gearswap: Lua runtime error: Gearswap/flow.lua:102:
>User event error: ...6)Windower4/Addons/Gearswap/libs/organizer-lib.lua:101: atempt to get lenght of field '?'(a nil value)
My bst lua was working well, then i modified some gear like usualy with every other lua, but i get this error randomly. i cancelled lua and did a new one again. worked fine, modified again and got the error.
Lakshmi.Elidyr
Server: Lakshmi
Game: FFXI
Posts: 912
By Lakshmi.Elidyr 2017-10-31 09:03:41
Hello Guys
I'm struggling with an error in my bst.lua and only with bst.lua.
the error says
>Gearswap: Lua runtime error: Gearswap/flow.lua:102:
>User event error: ...6)Windower4/Addons/Gearswap/libs/organizer-lib.lua:101: atempt to get lenght of field '?'(a nil value)
My bst lua was working well, then i modified some gear like usualy with every other lua, but i get this error randomly. i cancelled lua and did a new one again. worked fine, modified again and got the error.
I don't know anything about organizer really. Might help to actually see what you modified.
By Havok16 2017-10-31 10:55:15
The fle is very long. how can i link it to here?
Server: Siren
Game: FFXI
Posts: 26
By Siren.Firedevil 2017-10-31 12:07:05
When you paste it in, use the code tag in the tool bar at the top right of the Reply section. The icon looks like a scroll. It re-formats the file to fit in a window with a scroll bar on the side for ease of viewing. Put your file text between the [ code][/code].
Asura.Arico
Server: Asura
Game: FFXI
Posts: 535
By Asura.Arico 2017-11-03 15:50:06
I know a lot of people have this, so it exists, but how do I make a separate file for all of my augs that percolates to all of my other gearswaps?
Server: Sylph
Game: FFXI
Posts: 259
By Sylph.Dasanuffadat 2017-11-11 16:28:41
Is it possible to code for Cardinal Chant directions?
The way my gear is currently, my best nuking head when a mob is to the east of me is the Geomancy Galeo (and by a fair margin). I'd like to be able to use that as much as possible.
I see target entity "spell.target", and target keys "x (east/west)" and "y (north/south)" are things but I don't know how to make them work.
Bahamut.Ayasha
Server: Bahamut
Game: FFXI
Posts: 95
By Bahamut.Ayasha 2017-11-14 18:25:51
Install the TParty addon.
By Tarage 2017-11-14 18:37:05
Install the TParty addon.
I posted in the wrong thread, but thanks.
Lakshmi.Elidyr
Server: Lakshmi
Game: FFXI
Posts: 912
By Lakshmi.Elidyr 2017-11-14 19:16:37
Sylph.Dasanuffadat said: »Is it possible to code for Cardinal Chant directions?
The way my gear is currently, my best nuking head when a mob is to the east of me is the Geomancy Galeo (and by a fair margin). I'd like to be able to use that as much as possible.
I see target entity "spell.target", and target keys "x (east/west)" and "y (north/south)" are things but I don't know how to make them work.
It is possible, if it doesn't exist already. I think they use a float to detect directions? Someone can correct me if I am wrong. Just have to measure out the directions and such from there, and build your logic off of that. Also I'm not sure I even understand how the cardinal works 100%. Based of your direction vs. mob or just direction in general?
Asura.Arico
Server: Asura
Game: FFXI
Posts: 535
By Asura.Arico 2017-11-16 20:06:18
Hello all
https://pastebin.com/1HyVnxZL
My gearswap for smn isn't swapping back the lucidity sash. I can't figure out for the life of me why. It's spelled right, but just not working.
By DaneBlood 2017-11-16 23:06:56
How do i make one set automatic have empty slots equip with what is in another set ?
Server: Siren
Game: FFXI
Posts: 26
By Siren.Firedevil 2017-11-17 07:33:42
Quote: Hello all
https://pastebin.com/1HyVnxZL
My gearswap for smn isn't swapping back the lucidity sash. I can't figure out for the life of me why. It's spelled right, but just not working.
Is Lucidity Sash in your Inventory or Wardrobes? If not, that's your problem. I just looked quickly and nothing stood out with a quick check of your code. In game, have you tried using //gs showswaps and //gs debug_mode together to see what's happening? I found several of my swapping problems that way.
[+]
Server: Asura
Game: FFXI
Posts: 1326
By Asura.Azagarth 2017-11-25 22:43:16
Not my lua, just grabbed one and added the macro part, anyone got an idea why it wont change to the right book etc?
Code -- Get Sets: Everything in this section is run as soon as you change jobs.
include('Include/AugmentedGear.lua')
function user_setup()
select_default_macro_book()
end
function get_sets()
BrigDEXSTP = { name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}}
BrigSTRDA = { name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}}
-- Regular Sets --
sets.Idle = { ammo="Staunch Tathlum",
head="Sulevia's Mask +2",neck="Loricate Torque +1",ear1="Genmei Earring",ear2="Odnowa Earring +1",
body="Pteroslaver Mail",hands="Sulevia's Gauntlets +2",ring1="Chirich Ring",ring2="Defending Ring",
back="Moonbeam Cape",waist="Flume Belt",legs="Carmine Cuisses +1",feet="Sulevia's Leggings +2"}
sets.TP = {}
sets.TP.index = {'Standard', 'Accuracy', 'Physical DT'}
--1=Standard, 2=TPAcc, 3=PDT
TP_ind = 1 -- Standard set is the Default
sets.TP['Standard'] = { ammo="Ginsen",
head="Flam. Zucchetto +2",neck="Anu Torque",ear1="Brutal Earring",ear2="Sherida Earring",
body=ValoBody.STP_7,hands="Acro Gauntlets",ring1="Petrov Ring",ring2="Niqmaddu Ring",
back=BrigDEXSTP,waist="Ioskeha belt +1",legs="Sulevia's Cuisses +2",feet=ValoFeet.STP_7}
sets.TP['Accuracy'] = { ammo="Ginsen",
head="Carmine Mask +1",neck="Lissome Necklace",ear1="Telos Earring",ear2="Sherida Earring",
body=ValoBody.DA,hands="Emicho Gauntlets +1",ring1="Petrov Ring",ring2="Niqmaddu Ring",
back=BrigDEXSTP,waist="Ioskeha belt +1",legs="Carmine Cuisses +1",feet="Flamma Gambieras +2"}
sets.TP['Physical DT'] = {ammo="Staunch Tathlum",
head="Sulevia's Mask +2",neck="Loricate Torque +1",ear1="Telos Earring",ear2="Sherida Earring",
body="Sulevia's Platemail +2",hands="Sulevia's Gauntlets +2",ring1="Moonbeam Ring",ring2="Defending Ring",
back=BrigDEXSTP,waist="Ioskeha belt +1",legs="Sulevia's Cuisses +2",feet=ValoFeet.STP_7}
sets.WS = {}
-- Can add a set for each WS by making a new set: sets.WS["Raiden Thrust"] or sets.WS["Geirskogul"] for example
sets.WS["Default"] = {ammo="Knobkierrie",
head="Valorous Mask",neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Ishvara Earring",
body="Sulevia's Platemail +2",hands="Valorous Mitts",ring1="Regal Ring",ring2="Niqmaddu Ring",
back=BrigSTRDA,waist="Fotia Belt",legs="Sulevia's Cuisses +2",feet="Sulevia's Leggings +2"}
sets.WS["Leg Sweep"] = {ammo="Ginsen",
head="Flam. Zucchetto +2",neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Dignitary's Earring",
body="Flamma Korazin +2",hands="Flamma Manopolas +2",ring1="Regal Ring",ring2="Flamma Ring",
back=BrigDEXSTP,waist="Fotia Belt",legs="Flamma Dirs +1",feet="Flamma Gambieras +2"}
sets.WS["Drakesbane"] = {ammo="Knobkierrie",
head="Valorous Mask",neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Sherida Earring",
body="Sulevia's Platemail +2",hands="Valorous Mitts",ring1="Regalt Ring",ring2="Begrudging Ring",
back=BrigSTRDA,waist="Fotia Belt",legs="Pelt. Cuissots +1",feet="Flamma Gambieras +2"}
sets.WS["Stardiver"] = {ammo="Knobkierrie",
head="Flamma Zucchetto +2",neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Sherida Earring",
body="Flamma Korazin +2",hands="Sulevia's Gauntlets +2",ring1="Regal Ring",ring2="Niqmaddu Ring",
back=BrigSTRDA,waist="Fotia Belt",legs="Sulevia's Cuisses +2",feet="Flamma Gambieras +2"}
sets.WS["Camlann's Torment"] = {ammo="Knobkierrie",
head="Sulevia's Mask +2",neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Sherida Earring",
body=ValoBody.WSD,hands="Sulevia's Gauntlets +2",ring1="Regal Ring",ring2="Niqmaddu Ring",
back=BrigSTRDA,waist="Fotia Belt",legs="Vishap Brais +3",feet="Sulevia's Leggings +2"}
sets.WS["Sonic Thrust"] = {ammo="Knobkierrie",
head="Sulevia's Mask +2",neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Sherida Earring",
body=ValoBody.WSD,hands="Flamma Manopolas +2",ring1="Flamma Ring",ring2="Niqmaddu Ring",
back=BrigSTRDA,waist="Fotia Belt",legs="Vishap Brais +3",feet="Sulevia's Leggings +2"}
sets.WS["Impulse Drive"] = sets.WS["Camlann's Torment"]
sets.WS["Accuracy"] = {ammo="Knobkierrie",
head="Carmine Mask +1",neck="Fotia Gorget",ear1="Telos Earring",ear2="Cessance Earring",
body="Sulevia's Platemail +2",hands="Emi. Gauntlets +1",ring1="Apate Ring",ring2="Niqmaddu Ring",
back=BrigSTRDA,waist="Fotia Belt",legs="Carmine Cuisses +1", feet="Emi. Gambieras +1"}
sets.WS["Sanguine Blade"] = {ammo="Ghastly Tathlum",
head="Jumalik Helm",neck="Fotia Gorget",ear1="Friomisi Earring",ear2="Ishvara Earring",
body="Found. Breastplate",hands="Founder's Gauntlets",ring1="Archon Ring",ring2="Weather. Ring",
back=BrigSTRDA,waist="Fotia Belt",legs="Founder's Hose",feet="Founder's Greaves"}
-- Job Ability Sets --
sets.JA = {}
sets.JA["Jump"] = { ammo="Ginsen",
head="Sulevia's Mask +2",neck="Anu Torque",ear1="Telos Earring",ear2="Sherida Earring",
body=ValoBody.DA,hands="Emicho Gauntlets +1",ring1="Flamma Ring",ring2="Niqmaddu Ring",
back=BrigDEXSTP,waist="Ioskeha belt +1",legs="Sulevia's Cuisses +2",feet="Flamma Gambieras +2"}
sets.JA["Jump Accuracy"] = sets.JA["Jump"]
sets.JA["Angon"] = {ammo="Angon",ear1="Dragoon's Earring",hands="Ptero. Fin. G. +1"}
-- Angon, Relic Hands, and that dumb earring in Mamook if you feel like it
sets.JA["Ancient Circle"] = {legs="Vishap Brais +3"}
-- Ancient Circle normally: 3 minute duration, Damage+15% DT-15% DragonKiller+15% against Dragons (10% vs. NMs)
-- Ancient Circle with AF1: 4.5 minute duration, Damage+17% DT-17% DragonKiller+17% against Dragons (11% vs. NMs)
sets.JA["Spirit Link"] = {head="Vishap Armet",ear1="Pratik Earring",hands="Pel. Vambraces +1",feet="Pteroslaver Greaves"}
-- Spirit Link/Empathy gear go here; note that Relic Feet will cause a 100% Wyvern to still drain HP (unless leveling up
sets.JA["Spirit Surge"] = {neck="Chanoix's Gorget",ear1="Anastasi Earring",ear2="Lancer's Earring",
body="Pteroslaver Mail",hands="Despair Fin. Gaunt.",
back="Updraft Mantle",legs="Vishap Brais +3",feet="Pteroslaver Greaves"}
-- Augmented Relic Body affects duration; Wyvern Max HP affects Spirit Surge's Max HP effect on you
sets.JA["Steady Wing"] = {neck="Chanoix's Gorget",ear1="Anastasi Earring",ear2="Lancer's Earring",
body="Emicho Haubert",hands="Despair Fin. Gaunt.",
back="Updraft Mantle",legs="Vishap Brais +3",feet="Pteroslaver Greaves"}
-- Wyvern Max HP strongly affects Steady Wing's Stoneskin effect
-- Casting Sets --
sets.FastCast = {ammo="Sapience Orb",
head="Carmine Mask +1",neck="Voltsurge Torque",ear1="Enchanter Earring +1",ear2="Loquac. Earring",
body=Taeon.BODYFC,hands="Leyline Gloves", ring1="Rahab Ring",ring2="Weatherspoon Ring",
feet="Carmine Greaves +1"}
-- Can add more FC and Quick Magic here for spells; AF1 Head recommended in case of GearSwap error, at least for faster spells
sets.Midcast = {ammo="Egoist's Tathlum",
head="Vishap Armet",neck="Sanctity Necklace",ear1="Odnowa Earring",ear2="Odnowa Earring +1",
body="Arke Corazza",hands="Arke Manopolas",ring1="Eihwaz Ring",ring2="Moonbeam Ring",
back="Moonbeam Cape",waist="Glassblower's Belt",legs="Arke Cosciales",feet="Arke Gambieras"}
-- AF1 Head strongly advised for Healing Breath trigger
-- HP or defensive stuff for Healing Breath; can use Fast Cast or Magic Acc. or whatever if you want too
sets.HealingBreath = {ammo="Staunch Tathlum",
head="Pteroslaver Armet",neck="Lancer's Torque",ear1="Anastasi Earring",ear2="Lancer's Earring",
body="Emicho Haubert",hands="Despair Fin. Gaunt.",
back="Updraft Mantle",waist="Glassblower's Belt",legs="Vishap Brais +3",feet="Pteroslaver Greaves"}
sets.ElementalBreath = sets.HealingBreath
Breath = sets.HealingBreath
-- Healing Breath is modified by Wyvern Max HP and Wyvern: Breath+
-- Elemental Breaths are modified by Wyvern Current HP, Wyvern: Breath+, and Pet: Magic Accuracy
-- Remove Status Breaths are presumably affected by nothing
sets.Reive = {neck="Adoulin's Refuge +1"}
sets.Doom = {legs="Shabti Cuisses +1", ring1="Eshmun's Ring", ring2="Eshmun's Ring", waist="Gishdubar Sash"} -- could use holy water rings also
end
-- Precast: JA and WS should be defined here, Fast Cast and such for magic.
function precast(spell)
if spell.type == "WeaponSkill" then
if TP_ind == 2 then -- If using your Accuracy set, use the Accuracy WS set
equip(sets.WS['Accuracy'])
elseif sets.WS[spell.name] then -- If you made a set for a WS and then use it,
equip(sets.WS[spell.name]) -- it'll equip that set for that WS only
else
equip(sets.WS["Default"]) -- otherwise, it'll use this set instead
end
elseif spell.action_type == 'Magic' then
equip(sets.FastCast)
elseif spell.name == 'Dismiss' and pet.hpp < 100 then
cancel_spell() -- Dismiss resets the Call Wyvern recast IF your Wyvern is at 100% HP; largely pointless otherwise
windower.add_to_chat(50,' '..pet.name..' is below full HP (<pethpp>), cancelling Dismiss!')
elseif spell.name == 'Call Wyvern' then
if pet.isvalid then
cancel_spell() -- Uses Spirit Link instead when your Wyvern is already present
send_command('input /ja "Spirit Link" <me>')
else
equip(sets.JA["Spirit Surge"]) -- Relic Body goes here; can just use Spirit Surge set if you have it augmented
end
elseif spell.name == 'Spirit Link' then
if pet.isvalid then
equip(sets.JA["Spirit Link"])
else
cancel_spell() -- Uses Call Wyvern instead when your Wyvern isn't present
send_command('input /ja "Call Wyvern" <me>')
end
elseif string.find(spell.name,"Jump") then -- Any spell or ability with the word Jump in it
if not pet.isvalid then -- If you don't have a pet
if spell.name == "Spirit Jump" then -- Forces Spirit Jump into regular Jump when Wyvern is dead
cancel_spell()
send_command('input /ja "Jump" <t>')
return
elseif spell.name == "Soul Jump" then -- Forces Soul Jump into High Jump when Wyvern is dead
cancel_spell()
send_command('input /ja "High Jump" <t>')
return
end
end
if TP_ind == 2 then -- If using your Accuracy set
equip(sets.JA['Jump Accuracy'])
else
equip(sets.JA['Jump'])
end
elseif sets.JA[spell.name] then
equip(sets.JA[spell.name])
end
end
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.type == 'WeaponSkill' and buffactive['Ancient Circle'] then
equip({body="Founder's Breastplate"})
end
if spell.action_type=="Magic" and buffactive.Silence then
eventArgs.cancel = true
send_command('input /item "Echo Drops" <me>')
end
if spell.type=='WeaponSkill' then
if moonshade_WS:contains(spell.english) and player.tp<2900 then
equip({ear1="Moonshade Earring"})
end
end
--[[ Lock weaponskill if you are to far from the mob as to not lose TP ]]
if spell.type == 'WeaponSkill' then
if spell.target.distance > 5 then
cancel_spell()
add_to_chat(8, 'Target to far away. Move closer')
return
end
end
end
-- Midcast: For magic, this section affects your spell's potency, accuracy, etc. Unnecessary for JA/WS.
function midcast(spell)
if spell.action_type == 'Magic' then
equip(sets.Midcast)
end
end
-- Pet Change: Occurs when your Pet is summoned or killed.
function pet_change(pet,gain)
if gain == false and pet.name then
-- General announcement for when your Wyvern is killed, Dimissed, or eaten by Spirit Surge
windower.add_to_chat(50,' *** '..string.upper(pet.name)..' IS DEAD YO ***')
end
end
-- Pet Midcast: If GearSwap sees your pet readying a WS, this occurs
function pet_midcast(spell)
if string.find(spell.name,' Breath') then
if string.find(spell.name,'Healing') then
Breath = sets.HealingBreath
else
Breath = sets.ElementalBreath
end
petcast = true
equip_current()
windower.send_command('wait 1.2;gs c petcast')
-- Wyvern Breath Delay: 1.25s http://forum.square-enix.com/ffxi/threads/47481
-- Remove Status should still be 1s: http://forum.square-enix.com/ffxi/threads/44090
-- pet_aftercast won't run if your Wyvern's WS is interrupted (disengaging, stunned, Amnesia, etc.), so I recommend this
end
end
-- Aftercast: Occurs following the use of any WS, JA, Spell, Item, or Ranged Attack
function aftercast(spell)
equip_current()
end
-- Status Change: When Engaging, Disengaging, Resting, Standing Up, etc.
function status_change()
equip_current()
end
-- Pet Status Change
function pet_status_change(new,old)
if new ~= "Engaged" then
petcast = false
end
end
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
if buff:lower()=='terror' or buff:lower()=='petrification' or buff:lower()=='sleep' or buff:lower()=='stun' then
if gain then
equip(sets.defense.PDT)
elseif not gain then
handle_equipping_gear(player.status)
end
end
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
end
if buff:lower()=='sleep' then
if gain and player.hp > 120 and player.status == "Engaged" then -- Equip Berserker's Torque / frenzy When You Are Asleep
-- equip({head="Frenzy Sallet"})
equip({neck="Vim Torque +1"})
elseif not gain then -- Take Berserker's off
handle_equipping_gear(player.status)
end
end
if buffactive['Reive Mark'] then
equip(sets.Reive)
disable('neck')
else
enable('neck')
end
if buff == "doom" then
if gain then
equip(sets.Doom)
send_command('@input /p Doomed please cursna.')
send_command('@input /item "Holy Water" <me>')
disable('ring1','ring2','waist')
else
enable('ring1','ring2','waist')
handle_equipping_gear(player.status)
end
end
end
-- A custom function that equips a set based on whether you're engaged or not.
function equip_current()
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
else
equip(sets.Idle)
end
if petcast == true then
equip(Breath) -- This will equip your Breath gear on top of whichever other set you're currently wearing.
end
end
function customize_melee_set(meleeSet)
if state.Buff.Sleep and player.hp > 120 and player.status == "Engaged" then -- Equip Berserker's Torque When You Are Asleep
meleeSet = set_combine(meleeSet,{neck="Vim Torque +1"})
end
if state.Buff.Doom then
meleeSet = set_combine(meleeSet, sets.buff.Doom)
end
if buffactive['Ancient Circle'] then
meleeSet = set_combine(meleeSet, {body="Founder's Breastplate"})
end
return meleeSet
end
function customize_idle_set(idleSet)
if state.Buff.Doom then
idleSet = set_combine(idleSet, sets.Doom)
end
return idleSet
end
-- Manual commands sent in-game with //gs c <command>
function self_command(command)
if command == 'toggle TP set' then
TP_ind = TP_ind +1
if TP_ind > #sets.TP.index then TP_ind = 1 end
windower.add_to_chat(1,'<----- TP Set changed to '..sets.TP.index[TP_ind]..' ----->')
equip_current()
elseif command == 'reverse TP set' then
TP_ind = TP_ind -1
if TP_ind == 0 then TP_ind = #sets.TP.index end
windower.add_to_chat(1,'<----- TP Set changed to '..sets.TP.index[TP_ind]..' ----->')
equip_current()
elseif command == 'petcast' and petcast then -- This command reverts to your regular gear 1.2 seconds after a Breath by default
petcast = false
equip_current()
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book: (set, book)
if player.sub_job == 'SAM' then
set_macro_page(1, 12)
elseif player.sub_job == 'DRK' then
set_macro_page(2, 12)
elseif player.sub_job == 'WAR' then
set_macro_page(3, 12)
else
set_macro_page(4, 12)
end
end
Ragnarok.Tira
Server: Ragnarok
Game: FFXI
Posts: 84
By Ragnarok.Tira 2017-11-26 12:46:43
So, I've been able to get my lua to equip the Hachirin-no-Obi successfully during weaponskills that match the weather or day, but is there a way to tell my lua to not equip the obi if the weather and day oppose each other? This is what I'm currently working with: obi gearswap
Ragnarok.Trixi
Server: Ragnarok
Game: FFXI
Posts: 120
By Ragnarok.Trixi 2017-12-03 10:35:29
Having issues getting my second duplicate ring to equip.
I later then changed where the rings are in the order of the midcast, but that didnt work. I then tried putting them in different bags, and that didnt work, and then BG suggested trying priorities, but that didnt work either.
The midcast rring will equip about 20% or less of the time, the rest of the time weatherspoon stays equipped.
Ive been testing with Prolix ring in storage, so midcast lring equips 100% of the time
Code
sets.precast.FastCast.Default = {main="Lathi",sub="Vivid Strap",ranged="",ammo="Impatiens",
head="Nahtirah Hat",neck="Stoicheion Medal",ear1="Loquacious Earring",ear2="Barkarole Earring",
body="Royal Redingote",hands="Magavan Mitts",lring="Prolix Ring",rring="Weatherspoon Ring",
back="Bane Cape",waist="Witful Belt",legs="Orvail Pants +1",feet="Merlinic Crackows"}
sets.precast.FastCast['Elemental Magic'] = set_combine(sets.precast.FastCast.Default,{head="Wicce Petasos +1"})
sets.midcast['Elemental Magic'] = {lring={name="Shiva Ring +1",bag="Inventory",priority=1},main="Lathi",sub="Niobid Strap",ranged="",ammo="Pemphredo Tathlum",
head="Merlinic Hood",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Count's Garb",hands="Amalric Gages",rring={name="Shiva Ring +1",bag="Inventory",priority=12},
back="Toro Cape",waist="Yamabuki-no-Obi",legs="Merlinic Shalwar",feet="Merlinic Crackows"}
Asura.Eiryl
By Asura.Eiryl 2017-12-04 19:17:24
I'm bad at gearswap rules
Can you give me the context to use HP/MP % rule?
IE: If hp <50% Equip sets.dt or mp <50% equip sets.refresh
Just looking for someone to explain this addon a bit for me. It looks like it is an alternative to Spellcast.
Is it going to be replacing Spellcast? In which ways is it better or worse. I don't know any programming but I've slowly learned more and more about spellcast and the 'language' used in gearswap is confusing to me.
It says it uses packets so it potentially could be more detectable? but does that also eliminate any lag that spellcast may encounter?
I plan on redoing my PUP xml to include pet casting sets thanks to the new addon petschool. I'm just not sure if it's worth it to just wait until gearswap gets more popular or to go ahead and do it in spellcast.
If anyone could give me more info I'd greatly appreciate it.
|
|