|
Gearswap Support Thread
Server: Cerberus
Game: FFXI
Posts: 1817
By Cerberus.Shadowmeld 2017-08-22 09:13:00
Code
sets.SanSpell = set_combine( sets.YourFCSet, {feet = "Mochizuki Kyahan"})
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2017-08-22 10:23:36
Cerberus.Shadowmeld said: »Code
sets.SanSpell = set_combine( sets.YourFCSet, {feet = "Mochizuki Kyahan"}) Is SanSpell something built into gearswap? I previously tried to create a spell list of san spells but that didn't seem to work.
Server: Asura
Game: FFXI
Posts: 160
By Asura.Kuroganashi 2017-08-22 10:48:14
Cerberus.Shadowmeld said: »Code
sets.SanSpell = set_combine( sets.YourFCSet, {feet = "Mochizuki Kyahan"}) Is SanSpell something built into gearswap? I previously tried to create a spell list of san spells but that didn't seem to work. you need to add it to Mote-Mappings
Then it will recognize it as a legit spell.
Edit: just noticed he put SanSpell XD
Its not something you wanna do
you wanna let gearswap know when -san is casted equip this.
the way you do that is :
on Mote-Mappings you will find this: Note that I added ['Utsusemi: San']='Utsusemi',
Code
['Utsusemi: Ichi']='Utsusemi',['Utsusemi: Ni']='Utsusemi',['Utsusemi: San']='Utsusemi',
['Katon: Ichi'] = 'ElementalNinjutsu',['Suiton: Ichi'] = 'ElementalNinjutsu',['Raiton: Ichi'] = 'ElementalNinjutsu',
['Doton: Ichi'] = 'ElementalNinjutsu',['Huton: Ichi'] = 'ElementalNinjutsu',['Hyoton: Ichi'] = 'ElementalNinjutsu',
['Katon: Ni'] = 'ElementalNinjutsu',['Suiton: Ni'] = 'ElementalNinjutsu',['Raiton: Ni'] = 'ElementalNinjutsu',
['Doton: Ni'] = 'ElementalNinjutsu',['Huton: Ni'] = 'ElementalNinjutsu',['Hyoton: Ni'] = 'ElementalNinjutsu',
['Katon: San'] = 'ElementalNinjutsu',['Suiton: San'] = 'ElementalNinjutsu',['Raiton: San'] = 'ElementalNinjutsu',
['Doton: San'] = 'ElementalNinjutsu',['Huton: San'] = 'ElementalNinjutsu',['Hyoton: San'] = 'ElementalNinjutsu',
You get the idea right ?
So when Gearswap recognizes you are doing a ninjutsu: san it will check those and see if it falls on what category.
therefore you can manipulate it.
Hope this helped :)
Shiva.Spynx
Server: Shiva
Game: FFXI
Posts: 371
By Shiva.Spynx 2017-08-22 10:50:35
It is not, Shadowmeld must have some custom mapping in his file if that's working. You can create the same logics with the following code(assumes you are using Mote libraries):
Code
-- Create custom maps
function job_setup()
ninjutsu_spells = {}
ninjutsu_spells.SAN = S{
'Katon: San'
'Suiton: San'
'Raiton: San'
'Doton: San'
'Huton: San'
'Hyoton: San'
}
end
-- Override job_get_spell_map to use custom maps (if not default to standard function)
function job_get_spell_map(spell, default_spell_map)
if spell.skill == 'Ninjutsu' then
return for category,spell_list in pairs(ninjutsu_spells) do
if spell_list:contains(spell.english) then
return category
end
end
end
end
-- Define custom sets
function init_gear_sets()
sets.midcast['Ninjutsu'].SAN = set_combine( sets.YourFCSet, {feet = "Mochizuki Kyahan"})
end
It can be done in a simpler way but this will allow you to define new mapping easily (e.g. ninjutsu_spells.NI -> sets.midcast['Ninjutsu'].NI ).
[+]
Server: Cerberus
Game: FFXI
Posts: 1817
By Cerberus.Shadowmeld 2017-08-22 10:58:04
I'm sorry, I didn't realize you were actually looking for rules too.
The function to combine sets is set_combine. It will implement sets from left to right.
SanSpell was just something I made up although it is very similar to the syntax that the mote files use when mapping.
Are you using the mote files for your luas?
Server: Asura
Game: FFXI
Posts: 160
By Asura.Kuroganashi 2017-08-22 10:59:12
It is not, Shadowmeld must have some custom mapping in his file if that's working. You can create the same logics with the following code(assumes you are using Mote libraries):
Code
-- Create custom maps
function job_setup()
ninjutsu_spells = {}
ninjutsu_spells.SAN = S{
'Katon: San'
'Suiton: San'
'Raiton: San'
'Doton: San'
'Huton: San'
'Hyoton: San'
}
end
-- Override job_get_spell_map to use custom maps (if not default to standard function)
function job_get_spell_map(spell, default_spell_map)
if spell.skill == 'Ninjutsu' then
return for category,spell_list in pairs(ninjutsu_spells) do
if spell_list:contains(spell.english) then
return category
end
end
end
end
-- Define custom sets
function init_gear_sets()
sets.midcast['Ninjutsu'].SAN = set_combine( sets.YourFCSet, {feet = "Mochizuki Kyahan"})
end
It can be done in a simpler way but this will allow you to define new mapping easily (e.g. ninjutsu_spells.NI -> sets.midcast['Ninjutsu'].NI ).
This is easier too, and works XD
took too much time typing the reply :P
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2017-08-22 14:03:04
I'm using Mote's, I tried Spynx's solution but I keep getting an error about an attempt to call a string value and the line it references is where the san spells are mapped.
I'm sorry to keep pestering but I am useless when it comes to this.
EDIT: I'll include my lua since it will probably make things easier:
Code -------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- Haste II has the same buff ID [33], so we have to use a toggle.
-- gs c toggle hastemode -- Toggles whether or not you're getting Haste II
-- for Rune Fencer sub, you need to create two macros. One cycles runes, and gives you descrptive text in the log.
-- The other macro will use the actual rune you cycled to.
-- Macro #1 //console gs c cycle Runes
-- Macro #2 //console gs c toggle UseRune
function get_sets()
mote_include_version = 2
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent.
function job_setup()
state.Buff.Migawari = buffactive.migawari or false
state.Buff.Sange = buffactive.sange or false
state.Buff.Innin = buffactive.innin or false
include('Mote-TreasureHunter')
state.TreasureMode:set('Tag')
state.Runes = M{['description']='Runes', "Ignis", "Gelus", "Flabra", "Tellus", "Sulpor", "Unda", "Lux", "Tenebrae"}
state.UseRune = M(false, 'Use Rune')
state.UseWarp = M(false, 'Use Warp')
state.Adoulin = M(false, 'Adoulin')
state.Moving = M(false, "moving")
state.HasteMode = M{['description']='Haste Mode', 'Haste I', 'Haste II'}
state.MarchMode = M{['description']='March Mode', 'Trusts', '3', '7', 'Honor'}
run_sj = player.sub_job == 'RUN' or false
select_ammo()
LugraWSList = S{'Blade: Shun', 'Blade: Ku', 'Blade: Jin'}
state.CapacityMode = M(false, 'Capacity Point Mantle')
gear.RegularAmmo = 'Happo Shuriken'
gear.SangeAmmo = 'Happo Shuriken'
wsList = S{'Blade: Hi', 'Blade: Kamu', 'Blade: Ten'}
ninjutsu_spells = {}
ninjutsu_spells.SAN = S{
'Katon: San'
'Suiton: San'
'Raiton: San'
'Doton: San'
'Huton: San'
'Hyoton: San'
'Utsusemi: San'
}
update_combat_form()
state.warned = M(false)
options.ammo_warning_limit = 25
-- For th_action_check():
-- JA IDs for actions that always have TH: Provoke, Animated Flourish
info.default_ja_ids = S{35, 204}
-- Unblinkable JA IDs for actions that always have TH: Quick/Box/Stutter Step, Desperate/Violent Flourish
info.default_u_ja_ids = S{201, 202, 203, 205, 207}
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
state.OffenseMode:options('Normal', 'Low', 'Mid', 'Acc')
state.HybridMode:options('Normal', 'PDT')
state.RangedMode:options('Normal', 'Acc')
state.WeaponskillMode:options('Normal', 'Low', 'Mid', 'Acc')
state.PhysicalDefenseMode:options('PDT')
state.MagicalDefenseMode:options('MDT')
select_default_macro_book()
send_command('bind ^= gs c cycle treasuremode')
send_command('bind ^[ gs c toggle UseWarp')
send_command('bind ![ input /lockstyle off')
send_command('bind != gs c toggle CapacityMode')
send_command('bind @f9 gs c cycle HasteMode')
send_command('bind !` gs c cycle MarchMode')
send_command('bind @[ gs c cycle Runes')
send_command('bind ^] gs c toggle UseRune')
end
function file_unload()
send_command('unbind ^[')
send_command('unbind ![')
send_command('unbind ^=')
send_command('unbind !=')
send_command('unbind @f9')
send_command('unbind @[')
send_command('unbind !`')
send_command('unbind ^]')
end
-- Define sets and vars used by this job file.
-- visualized at http://www.ffxiah.com/node/194 (not currently up to date 10/29/2015)
-- Happo
-- Hachiya
-- sets.engaged[state.CombatForm][state.CombatWeapon][state.OffenseMode][state.HybridMode][classes.CustomMeleeGroups (any number)
-- Ninjutsu tips
-- To stick Slow (Hojo) lower earth resist with Raiton: Ni
-- To stick poison (Dokumori) or Attack down (Aisha) lower resist with Katon: Ni
-- To stick paralyze (Jubaku) lower resistence with Huton: Ni
function init_gear_sets()
--------------------------------------
-- Augments
--------------------------------------
TP_Feet={ name="Herculean Boots", augments={'Accuracy+21','"Triple Atk."+3','Attack+12',}}
WS_Feet={ name="Herculean Boots", augments={'Accuracy+21','"Triple Atk."+3','Attack+12',}}
AGI_WS_Feet={ name="Herculean Boots", augments={'CHR+8','Mag. Acc.+25','Weapon skill damage +6%','Mag. Acc.+13 "Mag.Atk.Bns."+13',}}
WS_Head = { name="Herculean Helm", augments={'CHR+10','Weapon skill damage +2%','Accuracy+20 Attack+20','Mag. Acc.+18 "Mag.Atk.Bns."+18',}}
MAB_Head = { name="Herculean Helm", augments={'CHR+10','Weapon skill damage +2%','Accuracy+20 Attack+20','Mag. Acc.+18 "Mag.Atk.Bns."+18',}}
--------------------------------------
-- Job Abilties
--------------------------------------
sets.precast.JA['Mijin Gakure'] = { legs="Mochizuki Hakama" }
sets.precast.JA['Futae'] = { hands="Hattori Tekko +1" }
sets.precast.JA['Provoke'] = {}
sets.precast.JA.Sange = { ammo=gear.SangeAmmo, body="Mochizuki Chainmail +1" }
-- Waltz (chr and vit)
sets.precast.Waltz = {}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Set for acc on steps, since Yonin drops acc a fair bit
sets.precast.Step = {
body="Hattori Ningi",
neck="Defiant Collar",
}
sets.midcast.Trust = {
feet="Hachiya Kyahan +1"
}
sets.Warp = { ring1="Warp Ring" }
sets.Organizer = {
main="Raimitsukane",
sub="Kannakiri +2",
ammo="Shihei",
head="Inoshishinofuda",
body="Shikanofuda",
hands="Chonofuda"
}
--------------------------------------
-- Utility Sets for rules below
--------------------------------------
sets.TreasureHunter = { waist="Chaac Belt" }
sets.CapacityMantle = { back="Aptitude Mantle +1" }
sets.BrutalLugra = { ear1="Brutal Earring", ear2="Lugra Earring +1" }
sets.BrutalTrux = { ear1="Brutal Earring", ear2="Trux Earring" }
sets.BrutalMoon = { ear1="Brutal Earring", ear2="Moonshade Earring" }
sets.Rajas = { ring1="Petrov Ring" }
sets.RegularAmmo = { ammo=gear.RegularAmmo }
sets.SangeAmmo = { ammo=gear.SangeAmmo }
sets.NightAccAmmo = { ammo="Ginsen" }
sets.DayAccAmmo = { ammo="Ginsen" }
--------------------------------------
-- Ranged
--------------------------------------
sets.precast.RA = {
head="Aurore Beret +1",
legs="Nahtirah Trousers",
}
sets.midcast.RA = {
neck="Iqabi Necklace",
hands="Hachiya Tekko +1",
ring1="Hajduk Ring",
ring2="Hajduk Ring",
back="Yokaze Mantle",
legs="Hachiya Hakama +1",
}
sets.midcast.RA.Acc = set_combine(sets.midcast.RA, {
body="Mochizuki Chainmail +1"
})
sets.midcast.RA.TH = set_combine(sets.midcast.RA, set.TreasureHunter)
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FC = {
head="Herculean Helm",
ammo="Impatiens",
ear1="Loquacious Earring",
ear2="Etiolation Earring",
ring1="Prolix Ring",
hands="Leyline Gloves",
}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, { neck="Magoraga Beads", body="Mochizuki Chainmail" })
sets.precast['Ninjutsu'].SAN = set_combine( sets.precast.FC, {feet = "Mochizuki Kyahan"})
-- Midcast Sets
sets.midcast.FastRecast = {
--ammo="Impatiens",
head="Herculean Helm",
hands="Leyline Gloves",
ear1="Loquacious Earring",
ear2="Etiolation Earring",
ring1="Prolix Ring",
}
-- skill ++
sets.midcast.Ninjutsu = {
head="Hachiya Hatsuburi +1",
neck="Sanctity Necklace",
ear1="Lifestorm Earring",
ear2="Psystorm Earring",
body="Samnuha Coat",
hands="Leyline Gloves",
ring1="Sangoma Ring",
--ring2="Haverton Ring",
back="Yokaze Mantle",
}
-- any ninjutsu cast on self
sets.midcast.SelfNinjutsu = sets.midcast.Ninjutsu
sets.midcast.Utsusemi = set_combine(sets.midcast.Ninjutsu, {
feet="Hattori Kyahan +1"
})
sets.midcast.Migawari = set_combine(sets.midcast.Ninjutsu, {})
-- Nuking Ninjutsu (skill & magic attack)
sets.midcast.ElementalNinjutsu = {
head="Mochizuki Hatsuburi +1",neck="Sanctity Necklace",ear1="Friomisi Earring",ear2="Novio Earring",
body="Samnuha Coat",hands="Leyline Gloves",ring1="Acumen Ring",
back="Toro Cape",waist="Salire Belt",legs="Shneddick Tights +1",feet="Hachiya Kyahan +1"}
-- Effusions
sets.precast.Effusion = {}
sets.precast.Effusion.Lunge = sets.midcast.ElementalNinjutsu
sets.precast.Effusion.Swipe = sets.midcast.ElementalNinjutsu
sets.idle = {ammo="Staunch Tathlum",
head="Hachiya Hatsuburi +1",neck="Loricate Torque",ear1="Suppanomimi",ear2="Brutal Earring",
body="Hachiya Chainmail +1",hands="Hachiya Tekko +1",ring1="Defending Ring",ring2="Vocane Ring +1",
back="Moonbeam Cape",waist="Flume Belt",legs="Hachiya Hakama +1",feet="Hachiya Kyahan +1"}
sets.idle.Regen = set_combine(sets.idle, {})
sets.Adoulin = {
body="Councilor's Garb",
}
sets.idle.Town = set_combine(sets.idle, {})
sets.idle.Town.Adoulin = set_combine(sets.idle.Town, {
body="Councilor's Garb"
})
sets.idle.Weak = sets.idle
-- Defense sets
sets.defense.PDT = {ammo="Staunch Tathlum",
head="Blistering Sallet +1",neck="Loricate Torque",
body="Emet Harness +1",hands="Umuthi Gloves",ring1="Defending Ring",ring2="Vocane Ring +1",
back="Moonbeam Cape",waist="Flume Belt",legs="Herculean Trousers"}
sets.defense.MDT = set_combine(sets.defense.PDT, {})
sets.DayMovement = {feet="Danzo sune-ate"}
sets.NightMovement = {feet="Hachiya Kyahan +1"}
-- Normal melee group without buffs
sets.engaged = {
ammo=gear.RegularAmmo,
head="Adhemar Bonnet",
neck="Moonbeam Nodowa",
ear1="Brutal Earring",
ear2="Suppanomimi",
body="Hachiya Chainmail +1",
hands="Floral Gauntlets",
ring1="Petrov Ring",
ring2="Epona's Ring",
back="Yokaze Mantle",
waist="Patentia Sash",
legs="Mochizuki Hakama",
feet="Taeon Boots"
}
-- assumptions made about target
sets.engaged.Low = set_combine(sets.engaged, {})
sets.engaged.Mid = set_combine(sets.engaged.Low, {})
sets.engaged.Acc = set_combine(sets.engaged.Mid, {})
-- set for fooling around without dual wield
sets.NoDW = set_combine(sets.engaged.MaxHaste, {})
sets.engaged.Innin = set_combine(sets.engaged, {})
sets.engaged.Innin.Low = sets.engaged.Low
sets.engaged.Innin.Mid = sets.engaged.Mid
sets.engaged.Innin.Acc = sets.engaged.Acc
-- Defenseive sets
sets.NormalPDT = {ammo="Staunch Tathlum",
head="Blistering Sallet +1",neck="Loricate Torque",
body="Emet Harness +1",hands="Umuthi Gloves",ring1="Defending Ring",ring2="Vocane Ring +1",
back="Moonbeam Cape",waist="Flume Belt",legs="Herculean Trousers"}
sets.AccPDT = {}
sets.engaged.PDT = set_combine(sets.engaged, sets.NormalPDT)
sets.engaged.Low.PDT = set_combine(sets.engaged.Low, sets.NormalPDT)
sets.engaged.Mid.PDT = set_combine(sets.engaged.Mid, sets.NormalPDT)
sets.engaged.Acc.PDT = set_combine(sets.engaged.Acc, sets.AccPDT)
sets.engaged.Innin.PDT = set_combine(sets.engaged.Innin, sets.NormalPDT, {head="Hattori Zukin +1"})
sets.engaged.Innin.Low.PDT = sets.engaged.Low.PDT
sets.engaged.Innin.Mid.PDT = sets.engaged.Mid.PDT
sets.engaged.Innin.Acc.PDT = sets.engaged.Acc.PDT
sets.engaged.HastePDT = {}
-- Delay Cap from spell + songs alone
sets.engaged.MaxHaste = set_combine(sets.engaged, {hands="Adhemar Wristbands",body="Adhemar Jacket",legs="Samnuha Tights",waist="Windbuffet Belt +1",feet=TP_Feet,ear2="Trux Earring"})
-- Base set for hard content
sets.engaged.Low.MaxHaste = set_combine(sets.engaged.MaxHaste, {})
sets.engaged.Mid.MaxHaste = set_combine(sets.engaged.Low.MaxHaste, {})
sets.engaged.Acc.MaxHaste = set_combine(sets.engaged.Mid.MaxHaste, {})
sets.engaged.Innin.MaxHaste = set_combine(sets.engaged.MaxHaste, {})
sets.engaged.Innin.Low.MaxHaste = sets.engaged.Low.MaxHaste
sets.engaged.Innin.Mid.MaxHaste = sets.engaged.Mid.MaxHaste
sets.engaged.Innin.Acc.MaxHaste = sets.engaged.Acc.MaxHaste
-- Defensive sets
sets.engaged.PDT.MaxHaste = set_combine(sets.engaged.MaxHaste, sets.engaged.HastePDT)
sets.engaged.Low.PDT.MaxHaste = set_combine(sets.engaged.Low.MaxHaste, sets.engaged.HastePDT)
sets.engaged.Mid.PDT.MaxHaste = set_combine(sets.engaged.Mid.MaxHaste, sets.engaged.HastePDT)
sets.engaged.Acc.PDT.MaxHaste = set_combine(sets.engaged.Acc.MaxHaste, sets.AccPDT)
sets.engaged.Innin.PDT.MaxHaste = set_combine(sets.engaged.Innin.MaxHaste, sets.NormalPDT)
sets.engaged.Innin.Low.PDT.MaxHaste = sets.engaged.Low.PDT.MaxHaste
sets.engaged.Innin.Mid.PDT.MaxHaste = sets.engaged.Mid.PDT.MaxHaste
sets.engaged.Innin.Acc.PDT.MaxHaste = sets.engaged.Acc.PDT.MaxHaste
-- 35% Haste
sets.engaged.Haste_35 = set_combine(sets.engaged.MaxHaste, {
ear2="Suppanomimi",
waist="Patentia Sash"
})
sets.engaged.Low.Haste_35 = set_combine(sets.engaged.Low.MaxHaste, {})
sets.engaged.Mid.Haste_35 = set_combine(sets.engaged.Mid.MaxHaste, {})
sets.engaged.Acc.Haste_35 = set_combine(sets.engaged.Acc.MaxHaste, {})
sets.engaged.Innin.Haste_35 = set_combine(sets.engaged.Haste_35, {})
sets.engaged.Innin.Low.Haste_35 = sets.engaged.Low.Haste_35
sets.engaged.Innin.Mid.Haste_35 = sets.engaged.Mid.Haste_35
sets.engaged.Innin.Acc.Haste_35 = sets.engaged.Acc.Haste_35
sets.engaged.PDT.Haste_35 = set_combine(sets.engaged.Haste_35, sets.engaged.HastePDT)
sets.engaged.Low.PDT.Haste_35 = set_combine(sets.engaged.Low.Haste_35, sets.engaged.HastePDT)
sets.engaged.Mid.PDT.Haste_35 = set_combine(sets.engaged.Mid.Haste_35, sets.engaged.HastePDT)
sets.engaged.Acc.PDT.Haste_35 = set_combine(sets.engaged.Acc.Haste_35, sets.engaged.AccPDT)
sets.engaged.Innin.PDT.Haste_35 = set_combine(sets.engaged.Innin.Haste_35, sets.engaged.HastePDT)
sets.engaged.Innin.Low.PDT.Haste_35 = sets.engaged.Low.PDT.Haste_35
sets.engaged.Innin.Mid.PDT.Haste_35 = sets.engaged.Mid.PDT.Haste_35
sets.engaged.Innin.Acc.PDT.Haste_35 = sets.engaged.Acc.PDT.Haste_35
-- 30% Haste 1626 / 798
sets.engaged.Haste_30 = set_combine(sets.engaged.Haste_35, {hands="Floral Gauntlets"})
-- This can alternatively be used for high-def targets.
sets.engaged.Low.Haste_30 = set_combine(sets.engaged.Haste_30, {})
sets.engaged.Mid.Haste_30 = set_combine(sets.engaged.Low.Haste_30, {})
sets.engaged.Acc.Haste_30 = set_combine(sets.engaged.Mid.Haste_30, {})
sets.engaged.Innin.Haste_30 = set_combine(sets.engaged.Haste_30, {})
sets.engaged.Innin.Low.Haste_30 = sets.engaged.Low.Haste_30
sets.engaged.Innin.Mid.Haste_30 = sets.engaged.Mid.Haste_30
sets.engaged.Innin.Acc.Haste_30 = sets.engaged.Acc.Haste_30
sets.engaged.PDT.Haste_30 = set_combine(sets.engaged.Haste_30, sets.engaged.HastePDT)
sets.engaged.Low.PDT.Haste_30 = set_combine(sets.engaged.Low.Haste_30, sets.engaged.HastePDT)
sets.engaged.Mid.PDT.Haste_30 = set_combine(sets.engaged.Mid.Haste_30, sets.engaged.HastePDT)
sets.engaged.Acc.PDT.Haste_30 = set_combine(sets.engaged.Acc.Haste_30, sets.engaged.AccPDT)
sets.engaged.Innin.PDT.Haste_30 = set_combine(sets.engaged.Innin.Haste_30, sets.engaged.HastePDT)
sets.engaged.Innin.Low.PDT.Haste_30 = sets.engaged.Low.PDT.Haste_30
sets.engaged.Innin.Mid.PDT.Haste_30 = sets.engaged.Mid.PDT.Haste_30
sets.engaged.Innin.Acc.PDT.Haste_30 = sets.engaged.Acc.PDT.Haste_30
-- haste spell - 139 dex | 275 acc | 1150 total acc (with shigi R15)
sets.engaged.Haste_15 = set_combine(sets.engaged.Haste_30, {legs="Hachiya Hakama +1",feet="Taeon Boots"})
sets.engaged.Low.Haste_15 = set_combine(sets.engaged.Haste_15, {})
sets.engaged.Mid.Haste_15 = set_combine(sets.engaged.Low.Haste_15, {})
sets.engaged.Acc.Haste_15 = set_combine(sets.engaged.Acc.Haste_30, {})
sets.engaged.Innin.Haste_15 = set_combine(sets.engaged.Haste_15, {})
sets.engaged.Innin.Low.Haste_15 = sets.engaged.Low.Haste_15
sets.engaged.Innin.Mid.Haste_15 = sets.engaged.Mid.Haste_15
sets.engaged.Innin.Acc.Haste_15 = sets.engaged.Acc.Haste_15
sets.engaged.PDT.Haste_15 = set_combine(sets.engaged.Haste_15, sets.engaged.HastePDT)
sets.engaged.Low.PDT.Haste_15 = set_combine(sets.engaged.Low.Haste_15, sets.engaged.HastePDT)
sets.engaged.Mid.PDT.Haste_15 = set_combine(sets.engaged.Mid.Haste_15, sets.engaged.HastePDT)
sets.engaged.Acc.PDT.Haste_15 = set_combine(sets.engaged.Acc.Haste_15, sets.engaged.AccPDT)
sets.engaged.Innin.PDT.Haste_15 = set_combine(sets.engaged.Innin.Haste_15, sets.engaged.HastePDT)
sets.engaged.Innin.Low.PDT.Haste_15 = sets.engaged.Low.PDT.Haste_15
sets.engaged.Innin.Mid.PDT.Haste_15 = sets.engaged.Mid.PDT.Haste_15
sets.engaged.Innin.Acc.PDT.Haste_15 = sets.engaged.Acc.PDT.Haste_15
sets.buff.Migawari = {body="Hattori Ningi +1"}
-- Weaponskills
sets.precast.WS = {ammo="Ginsen",
head="Adhemar Bonnet",neck="Asperity Necklace",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Abnoba Kaftan",hands="Herculean Gloves",ring1="Ifrit Ring",ring2="Ifrit Ring",
back="Yokaze Mantle",waist="Fotia Belt",legs="Ta'lab Trousers",feet=WS_Feet}
sets.precast.WS.Mid = set_combine(sets.precast.WS, {})
sets.precast.WS.Low = sets.precast.WS.Mid
sets.precast.WS.Acc = set_combine(sets.precast.WS.Mid, {})
sets.Kamu = {}
sets.precast.WS['Blade: Kamu'] = set_combine(sets.precast.WS, sets.Kamu)
sets.precast.WS['Blade: Kamu'].Low = set_combine(sets.precast.WS.Low, sets.Kamu)
sets.precast.WS['Blade: Kamu'].Mid = set_combine(sets.precast.WS.Mid, sets.Kamu)
sets.precast.WS['Blade: Kamu'].Acc = set_combine(sets.precast.WS.Acc, sets.Kamu, {})
-- BLADE: JIN
sets.Jin = {neck="Breeze Gorget"}
sets.precast.WS['Blade: Jin'] = set_combine(sets.precast.WS, sets.Jin)
sets.precast.WS['Blade: Jin'].Low = set_combine(sets.precast.WS['Blade: Jin'], {})
sets.precast.WS['Blade: Jin'].Mid = set_combine(sets.precast.WS['Blade: Jin'].Low, {
})
sets.precast.WS['Blade: Jin'].Acc = set_combine(sets.precast.WS['Blade: Jin'].Mid, {})
-- BLADE: HI
sets.precast.WS['Blade: Hi'] = set_combine(sets.precast.WS, {ammo="Yetshila",
head=WS_Head,neck="Snow Gorget",
ring1="Garuda Ring",ring2="Garuda Ring",
legs="Herculean Trousers",feet=AGI_WS_Feet})
sets.precast.WS['Blade: Hi'].Low = set_combine(sets.precast.WS['Blade: Hi'], {})
sets.precast.WS['Blade: Hi'].Mid = set_combine(sets.precast.WS['Blade: Hi'], {})
sets.precast.WS['Blade: Hi'].Acc = set_combine(sets.precast.WS['Blade: Hi'].Mid, {})
-- BLADE: SHUN
sets.Shun = {}
sets.precast.WS['Blade: Shun'] = set_combine(sets.precast.WS, sets.Shun)
sets.precast.WS['Blade: Shun'].Low = set_combine(sets.precast.WS.Low, sets.Shun)
sets.precast.WS['Blade: Shun'].Mid = set_combine(sets.precast.WS.Mid, sets.Shun)
sets.precast.WS['Blade: Shun'].Acc = set_combine(sets.precast.WS.Acc, sets.Shun)
-- BLADE: Rin
sets.Rin = {}
sets.precast.WS['Blade: Rin'] = set_combine(sets.precast.WS, sets.Rin)
sets.precast.WS['Blade: Rin'].Low = set_combine(sets.precast.WS.Low, sets.Rin)
sets.precast.WS['Blade: Rin'].Mid = set_combine(sets.precast.WS.Mid, sets.Rin)
sets.precast.WS['Blade: Rin'].Acc = set_combine(sets.precast.WS.Acc, sets.Rin, {})
-- BLADE: KU
sets.Ku = {}
sets.precast.WS['Blade: Ku'] = set_combine(sets.precast.WS, sets.Ku)
sets.precast.WS['Blade: Ku'].Low = set_combine(sets.precast.WS['Blade: Ku'], {})
sets.precast.WS['Blade: Ku'].Mid = sets.precast.WS['Blade: Ku'].Low
sets.precast.WS['Blade: Ku'].Acc = set_combine(sets.precast.WS['Blade: Ku'].Mid, {})
sets.Ten = {}
sets.precast.WS['Blade: Ten'] = set_combine(sets.precast.WS, sets.Ten)
sets.precast.WS['Blade: Ten'].Low = set_combine(sets.precast.WS['Blade: Ten'], {})
sets.precast.WS['Blade: Ten'].Mid = set_combine(sets.precast.WS['Blade: Ten'].Low, {})
sets.precast.WS['Blade: Ten'].Acc = set_combine(sets.precast.WS['Blade: Ten'].Mid, {})
sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS, {})
sets.precast.WS['Blade: Chi'] = set_combine(sets.precast.WS['Aeolian Edge'], {})
sets.precast.WS['Blade: To'] = sets.precast.WS['Blade: Chi']
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
function job_pretarget(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = true
end
if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then
cancel_spell()
send_command('input /item "Echo Drops" <me>')
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if spell.skill == "Ninjutsu" and spell.target.type:lower() == 'self' and spellMap ~= "Utsusemi" then
if spell.english == "Migawari" then
classes.CustomClass = "Migawari"
else
classes.CustomClass = "SelfNinjutsu"
end
end
if spell.name == 'Spectral Jig' and buffactive.sneak then
-- If sneak is active when using, cancel before completion
send_command('cancel 71')
end
if string.find(spell.english, 'Utsusemi') then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
cancel_spell()
eventArgs.cancel = true
return
end
end
end
function job_post_precast(spell, action, spellMap, eventArgs)
-- Ranged Attacks
if spell.action_type == 'Ranged Attack' and state.OffenseMode ~= 'Acc' then
equip( sets.SangeAmmo )
end
-- protection for lag
if spell.name == 'Sange' and player.equipment.ammo == gear.RegularAmmo then
state.Buff.Sange = false
eventArgs.cancel = true
end
if spell.type == 'WeaponSkill' then
if spell.english == 'Aeolian Edge' and state.TreasureMode.value ~= 'None' then
equip(sets.TreasureHunter)
end
-- Mecistopins Mantle rule (if you kill with ws)
if state.CapacityMode.value then
equip(sets.CapacityMantle)
end
-- Swap in special ammo for WS in high Acc mode
if state.OffenseMode.value == 'Acc' then
equip(select_ws_ammo())
end
-- Lugra Earring for some WS
if LugraWSList:contains(spell.english) then
if world.time >= (17*60) or world.time <= (7*60) then
equip(sets.BrutalLugra)
else
equip(sets.BrutalTrux)
end
elseif spell.english == 'Blade: Hi' or spell.english == 'Blade: Ten' then
if world.time >= (17*60) or world.time <= (7*60) then
equip(sets.BrutalLugra)
else
equip(sets.BrutalMoon)
end
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
if spell.english == "Monomi: Ichi" then
if buffactive['Sneak'] then
send_command('@wait 1.7;cancel sneak')
end
end
end
-- Run after the general midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
--if state.TreasureMode.value ~= 'None' and spell.action_type == 'Ranged Attack' then
-- equip(sets.TreasureHunter)
--end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if midaction() then
return
end
-- Aftermath timer creation
aw_custom_aftermath_timers_aftercast(spell)
--if spell.type == 'WeaponSkill' then
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-- Called before the Include starts constructing melee/idle/resting sets.
-- Can customize state or custom melee class values at this point.
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_handle_equipping_gear(status, eventArgs)
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.hpp < 80 then
idleSet = set_combine(idleSet, sets.idle.Regen)
end
if state.HybridMode.value == 'PDT' then
if state.Buff.Migawari then
idleSet = set_combine(idleSet, sets.buff.Migawari)
else
idleSet = set_combine(idleSet, sets.defense.PDT)
end
else
idleSet = set_combine(idleSet, select_movement())
end
local res = require('resources')
local info = windower.ffxi.get_info()
local zone = res.zones[info.zone].name
if zone:match('Adoulin') then
idleSet = set_combine(idleSet, sets.Adoulin)
end
return idleSet
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if state.TreasureMode.value == 'Fulltime' then
meleeSet = set_combine(meleeSet, sets.TreasureHunter)
end
if state.CapacityMode.value then
meleeSet = set_combine(meleeSet, sets.CapacityMantle)
end
if state.Buff.Migawari and state.HybridMode.value == 'PDT' then
meleeSet = set_combine(meleeSet, sets.buff.Migawari)
end
if player.equipment.sub == 'empty' then
meleeSet = set_combine(meleeSet, sets.NoDW)
end
if player.mp < 100 and state.OffenseMode.value ~= 'Acc' then
-- use Rajas instead of Oneiros for normal + mid
meleeSet = set_combine(meleeSet, sets.Rajas)
end
meleeSet = set_combine(meleeSet, select_ammo())
return meleeSet
end
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other 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 state.Buff[buff] ~= nil then
if not midaction() then
handle_equipping_gear(player.status)
end
end
if (buff == 'Innin' and gain or buffactive['Innin']) then
state.CombatForm:set('Innin')
if not midaction() then
handle_equipping_gear(player.status)
end
else
state.CombatForm:reset()
if not midaction() then
handle_equipping_gear(player.status)
end
end
-- If we gain or lose any haste buffs, adjust which gear set we target.
if S{'haste', 'march', 'mighty guard', 'embrava', 'haste samba', 'geo-haste', 'indi-haste'}:contains(buff:lower()) then
determine_haste_group()
if not midaction() then
handle_equipping_gear(player.status)
end
end
end
function job_status_change(newStatus, oldStatus, eventArgs)
if newStatus == 'Engaged' then
update_combat_form()
end
end
--mov = {counter=0}
--if player and player.index and windower.ffxi.get_mob_by_index(player.index) then
-- mov.x = windower.ffxi.get_mob_by_index(player.index).x
-- mov.y = windower.ffxi.get_mob_by_index(player.index).y
-- mov.z = windower.ffxi.get_mob_by_index(player.index).z
--end
--moving = false
--windower.raw_register_event('prerender',function()
-- mov.counter = mov.counter + 1;
-- if mov.counter>15 then
-- local pl = windower.ffxi.get_mob_by_index(player.index)
-- if pl and pl.x and mov.x then
-- dist = math.sqrt( (pl.x-mov.x)^2 + (pl.y-mov.y)^2 + (pl.z-mov.z)^2 )
-- if dist > 1 and not moving then
-- state.Moving.value = true
-- send_command('gs c update')
-- moving = true
-- elseif dist < 1 and moving then
-- state.Moving.value = false
-- --send_command('gs c update')
-- moving = false
-- end
-- end
-- if pl and pl.x then
-- mov.x = pl.x
-- mov.y = pl.y
-- mov.z = pl.z
-- end
-- mov.counter = 0
-- end
--end)
-- Called by the default 'update' self-command.
function job_update(cmdParams, eventArgs)
-- local res = require('resources')
-- local info = windower.ffxi.get_info()
-- local zone = res.zones[info.zone].name
-- if state.Moving.value == true then
-- if zone:match('Adoulin') then
-- equip(sets.Adoulin)
-- end
-- equip(select_movement())
-- end
select_ammo()
--determine_haste_group()
update_combat_form()
run_sj = player.sub_job == 'RUN' or false
--select_movement()
th_update(cmdParams, eventArgs)
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- State buff checks that will equip buff gear and mark the event as handled.
function check_buff(buff_name, eventArgs)
if state.Buff[buff_name] then
equip(sets.buff[buff_name] or {})
if state.TreasureMode.value == 'SATA' or state.TreasureMode.value == 'Fulltime' then
equip(sets.TreasureHunter)
end
eventArgs.handled = true
end
end
-- Check for various actions that we've specified in user code as being used with TH gear.
-- This will only ever be called if TreasureMode is not 'None'.
-- Category and Param are as specified in the action event packet.
function th_action_check(category, param)
if category == 2 or -- any ranged attack
--category == 4 or -- any magic action
(category == 3 and param == 30) or -- Aeolian Edge
(category == 6 and info.default_ja_ids:contains(param)) or -- Provoke, Animated Flourish
(category == 14 and info.default_u_ja_ids:contains(param)) -- Quick/Box/Stutter Step, Desperate/Violent Flourish
then
return true
end
end
function select_movement()
-- world.time is given in minutes into each day
-- 7:00 AM would be 420 minutes
-- 17:00 PM would be 1020 minutes
if world.time >= (17*60) or world.time <= (7*60) then
return sets.NightMovement
else
return sets.DayMovement
end
end
function determine_haste_group()
classes.CustomMeleeGroups:clear()
h = 0
-- Spell Haste 15/30
if buffactive[33] then
if state.HasteMode.value == 'Haste I' then
h = h + 15
elseif state.HasteMode.value == 'Haste II' then
h = h + 30
end
end
-- Geo Haste 30
if buffactive[580] then
h = h + 30
end
-- Mighty Guard 15
if buffactive[604] then
h = h + 15
end
-- Embrava (f(enhancing) ~20+)
if buffactive.embrava then
h = h + 20
end
-- March(es)
if buffactive.march then
if state.MarchMode.value == 'Honor' then
if buffactive.march == 2 then
h = h + 27 + 16
elseif buffactive.march == 1 then
h = h + 16
elseif buffactive.march == 3 then
h = h + 27 + 17 + 16
end
elseif state.MarchMode.value == 'Trusts' then
if buffactive.march == 2 then
h = h + 26
elseif buffactive.march == 1 then
h = h + 16
elseif buffactive.march == 3 then
h = h + 27 + 17 + 16
end
elseif state.MarchMode.value == '7' then
if buffactive.march == 2 then
h = h + 27 + 17
elseif buffactive.march == 1 then
h = h + 27
elseif buffactive.march == 3 then
h = h + 27 + 17 + 16
end
elseif state.MarchMode.value == '3' then
if buffactive.march == 2 then
h = h + 13.5 + 20.6
elseif buffactive.march == 1 then
h = h + 20.6
elseif buffactive.march == 3 then
h = h + 27 + 17 + 16
end
end
end
-- Determine CustomMeleeGroups
if h >= 15 and h < 30 then
classes.CustomMeleeGroups:append('Haste_15')
add_to_chat('Haste Group: 15% -- From Haste Total: '..h)
elseif h >= 30 and h < 35 then
classes.CustomMeleeGroups:append('Haste_30')
add_to_chat('Haste Group: 30% -- From Haste Total: '..h)
elseif h >= 35 and h < 40 then
classes.CustomMeleeGroups:append('Haste_35')
add_to_chat('Haste Group: 35% -- From Haste Total: '..h)
elseif h >= 40 then
classes.CustomMeleeGroups:append('MaxHaste')
add_to_chat('Haste Group: Max -- From Haste Total: '..h)
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Capacity Point Mantle' then
gear.Back = newValue
elseif stateField == 'Runes' then
local msg = ''
if newValue == 'Ignis' then
msg = msg .. 'Increasing resistence against ICE and deals FIRE damage.'
elseif newValue == 'Gelus' then
msg = msg .. 'Increasing resistence against WIND and deals ICE damage.'
elseif newValue == 'Flabra' then
msg = msg .. 'Increasing resistence against EARTH and deals WIND damage.'
elseif newValue == 'Tellus' then
msg = msg .. 'Increasing resistence against LIGHTNING and deals EARTH damage.'
elseif newValue == 'Sulpor' then
msg = msg .. 'Increasing resistence against WATER and deals LIGHTNING damage.'
elseif newValue == 'Unda' then
msg = msg .. 'Increasing resistence against FIRE and deals WATER damage.'
elseif newValue == 'Lux' then
msg = msg .. 'Increasing resistence against DARK and deals LIGHT damage.'
elseif newValue == 'Tenebrae' then
msg = msg .. 'Increasing resistence against LIGHT and deals DARK damage.'
end
add_to_chat(123, msg)
-- elseif stateField == 'moving' then
-- if state.Moving.value then
-- local res = require('resources')
-- local info = windower.ffxi.get_info()
-- local zone = res.zones[info.zone].name
-- if zone:match('Adoulin') then
-- equip(sets.Adoulin)
-- end
-- equip(select_movement())
-- end
elseif stateField == 'Use Rune' then
send_command('@input /ja '..state.Runes.value..' <me>')
elseif stateField == 'Use Warp' then
add_to_chat(8, '------------WARPING-----------')
--equip({ring1="Warp Ring"})
send_command('input //gs equip sets.Warp;@wait 10.0;input /item "Warp Ring" <me>;')
end
end
--- Custom spell mapping.
--function job_get_spell_map(spell, default_spell_map)
-- if spell.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
-- return 'HighTierNuke'
-- end
--end
-- Creating a custom spellMap, since Mote capitalized absorbs incorrectly
function job_get_spell_map(spell, default_spell_map)
if spell.type == 'Trust' then
return 'Trust'
end
if spell.skill == 'Ninjutsu' then
for category,spell_list in pairs(ninjutsu_spells) do
if spell_list:contains(spell.english) then
return category
end
end
end
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
local msg = ''
msg = msg .. 'Offense: '..state.OffenseMode.current
msg = msg .. ', Hybrid: '..state.HybridMode.current
if state.DefenseMode.value ~= 'None' then
local defMode = state[state.DefenseMode.value ..'DefenseMode'].current
msg = msg .. ', Defense: '..state.DefenseMode.value..' '..defMode
end
if state.HasteMode.value ~= 'Normal' then
msg = msg .. ', Haste: '..state.HasteMode.current
end
if state.RangedMode.value ~= 'Normal' then
msg = msg .. ', Rng: '..state.RangedMode.current
end
if state.Kiting.value then
msg = msg .. ', Kiting'
end
if state.PCTargetMode.value ~= 'default' then
msg = msg .. ', Target PC: '..state.PCTargetMode.value
end
if state.SelectNPCTargets.value then
msg = msg .. ', Target NPCs'
end
add_to_chat(123, msg)
eventArgs.handled = true
end
-- Call from job_precast() to setup aftermath information for custom timers.
function aw_custom_aftermath_timers_precast(spell)
if spell.type == 'WeaponSkill' then
info.aftermath = {}
local empy_ws = "Blade: Hi"
info.aftermath.weaponskill = empy_ws
info.aftermath.duration = 0
info.aftermath.level = math.floor(player.tp / 1000)
if info.aftermath.level == 0 then
info.aftermath.level = 1
end
if spell.english == empy_ws and player.equipment.main == 'Kannagi' then
-- nothing can overwrite lvl 3
if buffactive['Aftermath: Lv.3'] then
return
end
-- only lvl 3 can overwrite lvl 2
if info.aftermath.level ~= 3 and buffactive['Aftermath: Lv.2'] then
return
end
-- duration is based on aftermath level
info.aftermath.duration = 30 * info.aftermath.level
end
end
end
-- Call from job_aftercast() to create the custom aftermath timer.
function aw_custom_aftermath_timers_aftercast(spell)
-- prevent gear being locked when it's currently impossible to cast
if not spell.interrupted and spell.type == 'WeaponSkill' and
info.aftermath and info.aftermath.weaponskill == spell.english and info.aftermath.duration > 0 then
local aftermath_name = 'Aftermath: Lv.'..tostring(info.aftermath.level)
send_command('timers d "Aftermath: Lv.1"')
send_command('timers d "Aftermath: Lv.2"')
send_command('timers d "Aftermath: Lv.3"')
send_command('timers c "'..aftermath_name..'" '..tostring(info.aftermath.duration)..' down abilities/aftermath'..tostring(info.aftermath.level)..'.png')
info.aftermath = {}
end
end
function select_ammo()
if state.Buff.Sange then
return sets.SangeAmmo
else
return sets.RegularAmmo
end
end
function select_ws_ammo()
if world.time >= (18*60) or world.time <= (6*60) then
return sets.NightAccAmmo
else
return sets.DayAccAmmo
end
end
function update_combat_form()
if state.Buff.Innin then
state.CombatForm:set('Innin')
else
state.CombatForm:reset()
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'DNC' then
set_macro_page(1, 4)
elseif player.sub_job == 'WAR' then
set_macro_page(1, 4)
elseif player.sub_job == 'RUN' then
set_macro_page(1, 4)
else
set_macro_page(1, 4)
end
end
Shiva.Spynx
Server: Shiva
Game: FFXI
Posts: 371
By Shiva.Spynx 2017-08-22 14:15:14
Forgot commas in the spell mapping, add them and hopefully it should work:
Code ninjutsu_spells.SAN = S{
'Katon: San',
'Suiton: San',
'Raiton: San',
'Doton: San',
'Huton: San',
'Hyoton: San',
'Utsusemi: San'
}
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2017-08-22 14:21:50
line 207: attempt to index field 'Ninjutsu' (a nil value)
Shiva.Spynx
Server: Shiva
Game: FFXI
Posts: 371
By Shiva.Spynx 2017-08-22 14:25:52
Try with sets.precast.FC['Ninjutsu'].SAN
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2017-08-22 14:27:54
same error unfortunately.
Shiva.Spynx
Server: Shiva
Game: FFXI
Posts: 371
By Shiva.Spynx 2017-08-22 14:32:12
Ok, last attempt then I'll try later when I get home with game running. Make sure you have all sets in the path defined so:
Code
sets.precast.FC = {
head="Herculean Helm",
ammo="Impatiens",
ear1="Loquacious Earring",
ear2="Etiolation Earring",
ring1="Prolix Ring",
hands="Leyline Gloves",
}
sets.precast.FC['Ninjutsu'] = sets.precast.FC
sets.precast.FC['Ninjutsu'].SAN = set_combine( sets.precast.FC, {feet = "Mochizuki Kyahan"})
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2017-08-22 14:36:14
You were right about it not being defined, I changed it to this:
Code
sets.precast['Ninjutsu'] = {}
sets.precast['Ninjutsu'].SAN = set_combine( sets.precast.FC, {feet = "Mochizuki Kyahan"})
Now it has loaded, I'm gonna go make sure it is equipping the feet, thanks for all the help.
EDIT: It's not equipping the feet, I'm bad at this.
Server: Asura
Game: FFXI
Posts: 160
By Asura.Kuroganashi 2017-08-22 14:59:00
You were right about it not being defined, I changed it to this:
Code
sets.precast['Ninjutsu'] = {}
sets.precast['Ninjutsu'].SAN = set_combine( sets.precast.FC, {feet = "Mochizuki Kyahan"})
Now it has loaded, I'm gonna go make sure it is equipping the feet, thanks for all the help.
EDIT: It's not equipping the feet, I'm bad at this.
sets.precast['Utsesumi: San'] = set_combine(sets.precast.FC, {feet="Mochizuki Kyahan"})
if you are trying to do elemental san spells, I told ya up there how to properly do it or you can also do:
sets.precast['Katon: San'] = set_combine(sets.precast.FC, {feet="Mochizuki Kyahan"})
sets.precast['Hyoton: San'] = set_combine(sets.precast.FC, {feet="Mochizuki Kyahan"})
sets.precast['Huton: San'] = set_combine(sets.precast.FC, {feet="Mochizuki Kyahan"})
ETC....
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2017-08-22 15:11:26
Asura.Kuroganashi said: »You were right about it not being defined, I changed it to this:
Code
sets.precast['Ninjutsu'] = {}
sets.precast['Ninjutsu'].SAN = set_combine( sets.precast.FC, {feet = "Mochizuki Kyahan"})
Now it has loaded, I'm gonna go make sure it is equipping the feet, thanks for all the help.
EDIT: It's not equipping the feet, I'm bad at this.
sets.precast['Utsesumi: San'] = set_combine(sets.precast.FC, {feet="Mochizuki Kyahan"})
if you are trying to do elemental san spells, I told ya up there how to properly do it or you can also do:
sets.precast['Katon: San'] = set_combine(sets.precast.FC, {feet="Mochizuki Kyahan"})
sets.precast['Hyoton: San'] = set_combine(sets.precast.FC, {feet="Mochizuki Kyahan"})
sets.precast['Huton: San'] = set_combine(sets.precast.FC, {feet="Mochizuki Kyahan"})
ETC.... That isn't working for me for some reason.
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2017-08-22 16:17:33
Ahhhhh it's finally working, it was basically Spynx's original suggestion but where I had put:
Code sets.precast['Ninjutsu'].SAN = set_combine( sets.precast.FC, {feet = "Mochizuki Kyahan"})
It had to be:
Code sets.precast.FC.SAN = set_combine( sets.precast.FC, {feet = "Mochizuki Kyahan"})
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2017-08-22 18:00:54
Damn it, now it's casting my San elemental spells in my magic accuracy set rather than my magic damage set but ichi and ni spells are working fine.
BRB bashing head against a brick wall.
EDIT: It's something to do with the previous fix for precasting as when I comment that out, it equips the right set.
EDIT2: OK I think I understand this, anyway I got it working by doing
Code sets.midcast['Hyoton: San'] = set_combine(sets.midcast.ElementalNinjutsu, {head='Mochizuki Hatsuburi'})
sets.midcast['Raiton: San'] = set_combine(sets.midcast.ElementalNinjutsu, {head='Mochizuki Hatsuburi'})
Bahamut.Ayasha
Server: Bahamut
Game: FFXI
Posts: 96
By Bahamut.Ayasha 2017-08-22 19:59:19
You could just implement something like the following in to your midcast or post_midcast function.
Code
if string.lower(spell.english):endswith(": san") and not string.lower(spell.english):startswith("utsusemi") then
equip(your San spell set)
end
Will check if it's a San spell and NOT Utsusemi, then equip whatever set you choose. Explicitly defining a gear set for all San type spells will still work the same, though.
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2017-08-24 20:58:26
I apologise everyone but I'm back :(
I'm now trying to get my BLU gearswap to equip TH gear when I take an initial action on a mob, I tried copying from the THF gearswap and I can get it working fine for tagging with a normal attack but I have no idea how to get it to work on anything else, most notably, AoE magic.
This is all using mote's files btw.
Cerberus.Rafisback
Server: Cerberus
Game: FFXI
Posts: 33
By Cerberus.Rafisback 2017-08-28 17:47:49
Hello all,
I have errors in my BLU lua. I keep getting the (unexpected symbol near "=") on line 398, and even after removing the reported line, I have same error on next lines. If someone could help me find where I failed, it'd be very appreciated.
Code -------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file
function user_setup()
state.OffenseMode:options('Normal', 'Acc', 'Reraise', 'Amb')
state.HybridMode:options ('Normal')
state.WeaponskillMode:options('Normal')
state.PhysicalDefenseMode:options('PDT', 'Acc', 'Reraise')
state.MagicalDefenseMode:options('MDT')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
sets.reive = {neck="Ygnas's Resolve +1"}
--- sets JA --
--------------
-- Fast cast sets for spells --
------------------------------
sets.precast.FC = {
ammo="Staunch Tathlum",
neck="Jeweled Collar",
ear1="Loquac. Earring",
ear2="Merman's Earring",
ring1="Prolix Ring",
ring2="Defending Ring",
head="Herculean Helm",
body="Mirke Wardecors",
hands="Magavan Mitts",
back="Swith Cape",
waist="Witful Belt",
legs="Orvail Pants",
feet="Chelona Boots"
}
sets.midcast.ErraticFlutter = {
ammo="Mavi Tathlum",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back="Cornflower Cape",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Hurch'Lan Sash"
}
sets.midcast.MightyGuard = {
ammo="Mavi Tathlum",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back="Cornflower Cape",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Hurch'Lan Sash"
}
sets.midcast.MagicFruit = {
ammo="Mavi Tathlum",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back="Cornflower Cape",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Hurch'Lan Sash"
}
sets.midcast.Cocon = {
ammo="Mavi Tathlum",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back="Cornflower Cape",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Hurch'Lan Sash"
}
sets.midcast.Nat.Meditation = {
ammo="Mavi Tathlum",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back="Cornflower Cape",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Hurch'Lan Sash"
}
sets.midcast.AbsoluteTerror = {
ammo="Mavi Tathlum",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back="Cornflower Cape",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Hurch'Lan Sash"
}
sets.midcast.SalineCoat = {
ammo="Mavi Tathlum",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back="Cornflower Cape",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Hurch'Lan Sash"
}
sets.midcast.BarrierTusk = {
ammo="Mavi Tathlum",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back="Cornflower Cape",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Hurch'Lan Sash"
}
sets.midcast.Diamondhide = {
ammo="Mavi Tathlum",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back="Cornflower Cape",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Hurch'Lan Sash"
}
sets.midcast.BatteryCharge = {
ammo="Mavi Tathlum",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back="Cornflower Cape",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Hurch'Lan Sash"
}
sets.midcast.Occultation = {
ammo="Mavi Tathlum",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back="Cornflower Cape",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Hurch'Lan Sash"
}
sets.midcast.Entomb = {
head="Jhakri Coronet +1",
neck="Eddy Necklace",
ear1="Friomisi Earring",
ear2="Hecate's Earring",
ring2="Strendu Ring",
ring1="Acumen Ring",
hands="Jhakri Cuffs +1",
body="Jhakri Robe",
back="Cornflower Cape",
waist="Aswang Sash",
legs="Hagondes Pants",
feet="Jhakri Pigaches +1",
ammo="Mavi Tathlum",}
sets.midcast.TenebralCrush = {
head="Jhakri Coronet +1",
neck="Eddy Necklace",
ear1="Friomisi Earring",
ear2="Hecate's Earring",
ring2="Strendu Ring",
ring1="Acumen Ring",
hands="Jhakri Cuffs +1",
body="Jhakri Robe",
back="Cornflower Cape",
waist="Aswang Sash",
legs="Hagondes Pants",
feet="Jhakri Pigaches +1",
ammo="Mavi Tathlum",}
sets.midcast.Subduction = {
head="Jhakri Coronet +1",
neck="Eddy Necklace",
ear1="Friomisi Earring",
ear2="Hecate's Earring",
ring2="Strendu Ring",
ring1="Acumen Ring",
hands="Jhakri Cuffs +1",
body="Jhakri Robe",
back="Cornflower Cape",
waist="Aswang Sash",
legs="Hagondes Pants",
feet="Jhakri Pigaches +1",
ammo="Mavi Tathlum",}
sets.midcast.SpectralFloe = {
head="Jhakri Coronet +1",
neck="Eddy Necklace",
ear1="Friomisi Earring",
ear2="Hecate's Earring",
ring2="Strendu Ring",
ring1="Acumen Ring",
hands="Jhakri Cuffs +1",
body="Jhakri Robe",
back="Cornflower Cape",
waist="Aswang Sash",
legs="Hagondes Pants",
feet="Jhakri Pigaches +1",
ammo="Mavi Tathlum",}
sets.midcast.DreamFlower = {
head="Jhakri Coronet +1",
neck="Eddy Necklace",
ear1="Lifestorm Earring",
ear2="Psystorm Earring",
ring2="Perception Ring",
ring1="Sangoma Ring",
hands="Jhakri Cuffs +1",
body="Jhakri Robe",
back="Cornflower Cape",
waist="Ovate Rope",
legs="Jhakri Slops",
feet="Jhakri Pigaches +1",
ammo="Mavi Tathlum",}
sets.midcast.SheepSong = {
head="Jhakri Coronet +1",
neck="Eddy Necklace",
ear1="Lifestorm Earring",
ear2="Psystorm Earring",
ring2="Perception Ring",
ring1="Sangoma Ring",
hands="Jhakri Cuffs +1",
body="Jhakri Robe",
back="Cornflower Cape",
waist="Ovate Rope",
legs="Jhakri Slops",
feet="Jhakri Pigaches +1",
ammo="Mavi Tathlum",}
sets.midcast.SuddenLunge = {
head="Jhakri Coronet +1",
neck="Eddy Necklace",
ear1="Lifestorm Earring",
ear2="Psystorm Earring",
ring2="Perception Ring",
ring1="Sangoma Ring",
hands="Jhakri Cuffs +1",
body="Jhakri Robe",
back="Cornflower Cape",
waist="Ovate Rope",
legs="Jhakri Slops",
feet="Jhakri Pigaches +1",
ammo="Mavi Tathlum",}
-- Weaponskill sets--
-- Default set for any weaponskill that isn't any more specifically defined--
-----------------------------------------------------------------------------
sets.precast.WS = {
ammo="Jukukik Feather",
head="Adhemar Bonnet",
neck="Fotia Gorget",
ear1="Brutal Earring",
ear2="Moonshade Earring",
body="Adhemar Jacket",
hands="Jhakri Cuffs +1",
ring1="Rajas Ring",
ring2="Thundersoul Ring",
waist="Fotia Belt",
legs="Herculean Trousers",
feet="Adhemar Gamashes",}
sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {back={ name="Rosmerta's Cape", augments={'Accuracy+2 Attack+2','Crit.hit rate+10',}}}),
sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {back={ name="Rosmerta's Cape", augments={'Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
ring2="Pyrosoul Ring",
feet="Herculean Boots",})
sets.precast.WS['Sanguine Blade'] = set_combine(sets.precast.WS, {head="Jhakri Coronet +1",
neck="Eddy Necklace",
ear1="Friomisi Earring",
ear2="Hecate's Earring",
ring2="Strendu Ring",
ring1="Acumen Ring",
hands="Jhakri Cuffs +1",
ammo="Ombre Tathlum +1",
body="Jhakri Robe",
back="Cornflower Cape",
waist="Aswang Sash",
legs="Hagondes Pants",
feet="Jhakri Pigaches +1"}),
-- Idle sets--
---------------
sets.idle.Weak = {
ammo="Staunch Tathlum",
head="Wivre Hairpin",
neck="Twilight Torque",
ear1="Merman's Earring",
ear2="Merman's Earring",
body="Jhakri Robe",
hands="Serpentes Cuffs",
ring1="Dark Ring",
ring2="Defending Ring",
back="Solemnity Cape",
legs="Carmine Cuisses +1",
feet="Serpentes Sabots",
waist="Fucho-no-obi"
}
sets.idle.Town = {
ammo="Staunch Tathlum",
head="Wivre Hairpin",
neck="Twilight Torque",
ear1="Merman's Earring",
ear2="Merman's Earring",
body="Jhakri Robe",
hands="Serpentes Cuffs",
ring1="Dark Ring",
ring2="Defending Ring",
back="Solemnity Cape",
legs="Carmine Cuisses +1",
feet="Serpentes Sabots",
waist="Fucho-no-obi"
}
sets.idle.Field = {
ammo="Staunch Tathlum",
head="Wivre Hairpin",
neck="Twilight Torque",
ear1="Merman's Earring",
ear2="Merman's Earring",
body="Jhakri Robe",
hands="Serpentes Cuffs",
ring1="Dark Ring",
ring2="Defending Ring",
back="Solemnity Cape",
legs="Carmine Cuisses +1",
feet="Serpentes Sabots",
waist="Fucho-no-obi"
}
-- Defense sets --
------------------
sets.defense.PDT = {
ammo="Staunch Tathlum",
head="Uk'Uxkaj Cap",
neck="Twilight Torque",
ear1="Merman's Earring",
ear2="Merman's Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Dark Ring",
ring2="Defending Ring",
back="Repulse Mantle",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Flume Belt"
}
sets.defense.MDT = {
ammo="Staunch Tathlum",
head="Uk'Uxkaj Cap",
neck="Twilight Torque",
ear1="Merman's Earring",
ear2="Merman's Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Merman's Ring",
ring2="Defending Ring",
back="Engulfer Cape +1",
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Flume Belt"
}
-- sets engaged normal --
-------------------------
sets.engaged.Normal = {
ammo="Ginsen",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back={ name="Rosmerta's Cape", augments={'Accuracy+20','Attack+20','"Dbl. Atk."+10'}},
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Windbuffet Belt"
}
sets.engaged.Amb = {
ammo="Ginsen",
head="Adhemar Bonnet",
neck="Clotharius Torque",
ear1="Suppanomimi",
ear2="Brutal Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Epona's Ring",
back={ name="Rosmerta's Cape", augments={'Accuracy+20','Attack+20','"Dbl. Atk."+10'}},
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Windbuffet Belt"
}
sets.engaged.Acc = {
ammo="Honed Tathlum",
head="Herculean Helm",
neck="Ej Necklace",
ear1="Suppanomimi",
ear2="Steelflash Earring",
body="Adhemar Jacket",
hands="Herculean Gloves",
ring1="Rajas Ring",
ring2="Enlivened Ring",
back={ name="Rosmerta's Cape", augments={'Accuracy+20','Attack+20','"Dbl. Atk."+10'}},
legs="Herculean Trousers",
feet="Herculean Boots",
waist="Hurch'lan Sash"
}
send_command('input /macro book 9;wait .1;input /macro set 9')
end
---------------------------------------------------------------------------------------------------------
function job_pretarget(spell)
if spell.english == "Spirit Jump" then
if not pet.isvalid then
cancel_spell()
send_command('Jump')
end
elseif spell.english == "Soul Jump" then
if not pet.isvalid then
cancel_action()
send_command("High Jump")
end
end
end
function display_current_job_state(eventArgs)
end
function update_custom_groups()
classes.CustomIdleGroups:clear()
if pet.isvalid then
classes.CustomIdleGroups:append(state.PetMode.value)
end
end
function job_status_change(newStatus, oldStatus, eventArgs, cmdParams)
end
function job_precast(spell, action, spellMap, eventArgs)
end
function job_post_pet_precast(spell,action,spellMap,eventArgs)
end
function job_post_pet_midcast(spell,action,spellMap,eventArgs)
end
function job_aftercast(spell, action, spellMap, eventArgs)
end
function job_get_spell_map(spell, action, spellMap, eventArgs)
end
function job_pet_change(pet, petparam, gain)
end
function customize_melee_set(meleeSet)
return meleeSet
end
function job_pet_status_change(newStatus, oldStatus, eventArgs)
if pet.isvalid and not midaction() and not pet_midaction() and (newStatus == 'Engaged' or oldStatus == 'Engaged') then
handle_equipping_gear(player.status, newStatus)
end
end
function customize_idle_set(idleSet)
return idleSet
end
function job_update(cmdParams, eventArgs)
end
Bismarck.Radec
Server: Bismarck
Game: FFXI
Posts: 150
By Bismarck.Radec 2017-08-28 18:10:07
Line 395 ends in a comma, remove that should do it.
Cerberus.Rafisback
Server: Cerberus
Game: FFXI
Posts: 33
By Cerberus.Rafisback 2017-08-29 02:55:04
Thank you very much, I knew that it'd be something stupid like this but couldn't find ;o
Cerberus.Rafisback
Server: Cerberus
Game: FFXI
Posts: 33
By Cerberus.Rafisback 2017-09-01 04:02:01
Hello again !
I'm working on a smn lua but, even if with ShowSwaps, I can see the precast gear change, the recast of my BP are still 50s+.
I'm not master, I don't have the best gear at all but I should be at 40s with my actual precast gear set.
Is there a way to make GS wait a little longer for precast gear sets? It seems that the game "don't have the time" to calculate the BP delay - gear.
Here is my lua:
Code
-- Initialization function for this job file--
----------------------------------------------
function get_sets()
mote_include_version = 2
-- Load and initialize the include file
include('Mote-Include.lua')
include('organizer-lib')
end
-------------------------------------------------------------------------------------------------------------------
function user_setup()
state.OffenseMode:options('Normal', 'Acc')
state.CastingMode:options('Normal')
state.IdleMode:options('Normal')
end
function job_setup()
bp_physical=S{ 'Punch','Rock Throw','Barracuda Dive','Claw','Axe Kick','Shock Strike','Camisado','Regal Scratch','Poison Nails',
'Moonlit Charge','Crescent Fang','Rock Buster','Tail Whip','Double Punch','Megalith Throw','Double Slap','Eclipse Bite',
'Mountain Buster','Spinning Dive','Predator Claws','Rush','Chaotic Strike','Crag Throw','Volt Strike'}
bp_hybrid=S{ 'Burning Strike','Flaming Crush'}
bp_magical=S{ 'Inferno','Earthen Fury','Tidal Wave','Aerial Blast','Diamond Dust','Judgment Bolt','Searing Light','Howling Moon',
'Ruinous Omen','Fire II','Stone II','Water II','Aero II','Blizzard II','Thunder II','Thunderspark','Somnolence',
'Meteorite','Fire IV','Stone IV','Water IV','Aero IV','Blizzard IV','Thunder IV','Nether Blast','Meteor Strike',
'Geocrush','Grand Fall','Wind Blade','Heavenly Strike','Thunderstorm','Level ? Holy','Holy Mist','Lunar Bay',
'Night Terror','Conflagration Strike', 'Zantetsuken'}
bp_debuff=S{ 'Lunar Cry','Mewing Lullaby','Nightmare','Lunar Roar','Slowga','Ultimate Terror','Sleepga','Eerie Eye','Tidal Roar',
'Diamond Storm','Shock Squall','Pavor Nocturnus'}
bp_buff=S{ 'Shining Ruby','Frost Armor','Rolling Thunder','Crimson Howl','Lightning Armor','Ecliptic Growl','Hastega','Noctoshield',
'Ecliptic Howl','Dream Shroud','Earthen Armor','Fleet Wind','Inferno Howl','Soothing Ruby','Heavenward Howl',
'Soothing Current','Hastega II','Crystal Blessing'}
bp_other=S{ 'Healing Ruby','Raise II','Aerial Armor','Reraise II','Whispering Wind','Glittering Ruby','Earthen Ward','Spring Water','Healing Ruby II'}
spirits = S{"LightSpirit", "DarkSpirit", "FireSpirit", "EarthSpirit", "WaterSpirit", "AirSpirit", "IceSpirit", "ThunderSpirit"}
avatars = S{"Carbuncle", "Fenrir", "Diabolos", "Ifrit", "Titan", "Leviathan", "Garuda", "Shiva", "Ramuh", "Odin", "Alexander", "Cait Sith"}
end
function init_gear_sets()
--------------------------------------
-- Precast Sets
--------------------------------------
sets.avatar = {}
sets.precast.JA["Avatar's Favor"] = {
main="Gridarvor",
sub="Elan Strap",
ammo="Seraphicaller",
head="Caller's Horn +2",
neck="Caller's Pendant",
ear1="Loquacious Earring",
ear2="Gifted Earring",
body="Caller's Doublet +2",
hands="Regimen Mittens",
ring1="Evoker's Ring",
ring2="Fervor Ring",
waist="Fucho-no-Obi",
legs="Assiduity Pants +1",
feet="Caller's Pigaches +2",
back="Conveyance Cape"}
sets.precast.JA['Elemental Siphon'] = {
main="Gridarvor",
sub="Elan Strap",
ammo="Seraphicaller",
head="Caller's Horn +2",
neck="Caller's Pendant",
ear1="Loquacious Earring",
ear2="Gifted Earring",
body="Caller's Doublet +2",
hands="Regimen Mittens",
ring1="Evoker's Ring",
ring2="Fervor Ring",
waist="Fucho-no-Obi",
legs="Assiduity Pants +1",
feet="Caller's Pigaches +2",
back="Conveyance Cape"}
sets.precast.JA['Mana Cede'] = {hands="Beck. Bracers +1"}
sets.precast.FC = {
ammo="Seraphicaller",
head="Kaabnax Hat",
neck="Jeweled Collar",
ear1="Gifted Earring",
ear2="Loquac. Earring",
body="Caller's Doublet +2",
hands="Magavan Mitts",
ring1="Defending Ring",
ring2="Prolix Ring",
legs="Orvail Pants",
feet="Chelona Boots",
waist="Witful Belt",
back="Swith Cape"}
-- Fast cast sets for spells--
sets.precast.FC['Enhancing Magic'] = {
main="Exemplar",
sub="Elan Strap",
ammo="Seraphicaller",
body="Telchine Chas.",
head="Befouled Crown",
ear1="Andoaa Earring",
neck="Colossu's Torque",
waist="Siegel Sash",
hands="Inyan. Dastanas +1",
ring1="Prolix Ring",
ring2="Perception Ring",
waist="Siegel Sash",
legs="Sifahir Slacks",
feet="Inyan. Crackows +1"}
-- Weaponskill sets--
-----------------------------------------------------------------------------
sets.precast.WS = {
head="Sukeroku Hachi.",
neck="Fotia Gorget",
ear1="Cessance Earring",
ear2="Zennaroi Earring",
body="Tali'ah Manteel",
hands="Tali'ah Gages +1",
ring1="Varar Ring",
ring2="Varar Ring",
waist="Fotia Belt",
legs="Tali'ah Seraweels",
feet="Tali'ah Crackows +1",
back="Tiresias's Cape"}
-- precast sets ------------------------
----------------------------------------
sets.precast.bp = {
main="Gridarvor",
sub="Elan Strap",
ammo="Seraphicaller",
head="Summoner's Horn",
neck="Caller's Pendant",
ear1="Loquacious Earring",
ear2="Gifted Earring",
body="Summoner's Doublet",
hands="Glyphic Bracers",
ring1="Fervor Ring",
ring2="Evoker's Ring",
waist="Fucho-no-Obi",
legs="Summoner's Spats",
feet="Summoner's Pigaches",
back="Samanisi Cape"}
--------------------------------------
-- Midcast sets
--------------------------------------
sets.midcast['Carbuncle'] = {hands="Asteria Mitts +1"}
sets.midcast['Cait Sith'] = {hands="Lamassu Mitts +1"}
sets.midcast.Stoneskin = {head="Befouled Crown", waist="Siegel Sash"}
sets.midcast.Refresh = {waist="Gishdubar Sash"}
sets.midcast.Cure = {
ammo="Impatiens",
head="Inyanga Tiara +1",
ear1="Mendi. Earring",
ear2="Loquacious Earring",
neck="Phalaina Locket",
body="Inyanga Jubbah +1",
hands="Bokwus Gloves",
ring1="Prolix Ring",
ring2="Perception Ring",
waist="Witful Belt",
legs="Sifahir Slacks",
feet="Inyan. Crackows +1",
back="Solemnity Cape"}
-- Avatar pact sets. All pacts are Ability type.--
---------------------------------------------------
sets.midcast.atk = {
main="Gridarvor",
sub="Elan Strap",
ammo="Seraphicaller",
head="Apogee Crown +1",
ear1="Loquacious Earring",
ear2="Gifted Earring",
neck="Caller's Pendant",
body="Caller's Doublet +2",
hands="Merlinic Dastanas",
ring2="Evoker's Ring",
ring1="Fervor Ring",
waist="Fucho-no-Obi",
legs="Caller's Spats +2",
feet="Inyanga Crackows +1",
back="Conveyance Cape"}
sets.midcast.hybrid = {
main="Gridarvor",
sub="Elan Strap",
ammo="Seraphicaller",
head="Apogee Crown +1",
ear1="Loquacious Earring",
ear2="Gifted Earring",
neck="Caller's Pendant",
body="Caller's Doublet +2",
hands="Merlinic Dastanas",
ring2="Evoker's Ring",
ring1="Fervor Ring",
waist="Fucho-no-Obi",
legs="Caller's Spats +2",
feet="Inyanga Crackows +1",
back="Conveyance Cape"}
sets.midcast.mab = {
main="Eminent Pole",
sub="Elan Strap",
ammo="Seraphicaller",
head="Apogee Crown +1",
ear1="Loquacious Earring",
ear2="Gifted Earring",
neck="Caller's Pendant",
body="Caller's Doublet +2",
hands="Merlinic Dastanas",
ring2="Evoker's Ring",
ring1="Fervor Ring",
waist="Fucho-no-Obi",
legs="Caller's Spats +2",
feet="Inyanga Crackows +1",
back="Conveyance Cape"}
sets.midcast.macc = {
main="Eminent Pole",
sub="Elan Strap",
ammo="Seraphicaller",
head="Apogee Crown +1",
ear1="Loquacious Earring",
ear2="Gifted Earring",
neck="Caller's Pendant",
body="Caller's Doublet +2",
hands="Merlinic Dastanas",
ring2="Evoker's Ring",
ring1="Fervor Ring",
waist="Fucho-no-Obi",
legs="Caller's Spats +2",
feet="Inyanga Crackows +1",
back="Conveyance Cape"}
sets.midcast.buff = {
main="Gridarvor",
sub="Elan Strap",
ammo="Seraphicaller",
head="Apogee Crown +1",
ear1="Loquacious Earring",
ear2="Gifted Earring",
neck="Caller's Pendant",
body="Caller's Doublet +2",
hands="Inyanga Dastanas +1",
ring2="Evoker's Ring",
ring1="Fervor Ring",
waist="Fucho-no-Obi",
legs="Caller's Spats +2",
feet="Inyanga Crackows +1",
back="Conveyance Cape"}
sets.midcast.other = {
main="Gridarvor",
sub="Elan Strap",
ammo="Seraphicaller",
head="Apogee Crown +1",
ear1="Loquacious Earring",
ear2="Gifted Earring",
neck="Caller's Pendant",
body="Caller's Doublet +2",
hands="Inyanga Dastanas +1",
ring2="Evoker's Ring",
ring1="Fervor Ring",
waist="Fucho-no-Obi",
legs="Caller's Spats +2",
feet="Inyanga Crackows +1",
back="Conveyance Cape"}
-- Resting sets--
-----------------
sets.resting = {
head="Convoker's Horn +2",
ear1="Gelos Earring",
ear2="Andoaa Earring",
neck="Caller's Pendant",
body="Shomonjijoe +1",
hands="Asteria Mitts +1",
ring1="Evoker's Ring",
ring2="Shneddick Ring",
waist="Fucho-no-Obi",
legs="Assid. Pants +1",
feet="Beck. Pigaches +1",
back="Conveyance Cape"}
-- Idle sets--
--------------
sets.idle.Town = {
sub="Elan Strap",
ammo="Seraphicaller",
head="Caller's Horn +2",
ear1="Loquacious Earring",
ear2="Gifted Earring",
neck="Caller's Pendant",
body="Caller's Doublet +2",
hands="Regimen Mittens",
ring1="Evoker's Ring",
ring2="Fervor Ring",
waist="Fucho-no-Obi",
legs="Assiduity Pants +1",
feet="Caller's Pigaches +2",
back="Conveyance Cape"}
sets.idle.Rest = {
sub="Elan Strap",
ammo="Sancus Sachet",
head="Convoker's Horn +2",
ear1="Gelos Earring",
ear2="Andoaa Earring",
neck="Caller's Pendant",
body="Shomonjijoe +1",
hands="Lamassu Mitts +1",
ring1="Evoker's Ring",
ring2="Shneddick Ring",
waist="Fucho-no-Obi",
legs="Assid. Pants +1",
feet="Conv. Pigaches +2",
back="Campestres's Cape"}
sets.idle.Field = {
sub="Elan Strap",
ammo="Seraphicaller",
head="Apogee Crown +1",
ear1="Loquacious Earring",
ear2="Gifted Earring",
neck="Caller's Pendant",
body="Caller's Doublet +2",
hands="Regimen Mittens",
ring1="Evoker's Ring",
ring2="Fervor Ring",
waist="Fucho-no-Obi",
legs="Assiduity Pants +1",
feet="Caller's Pigaches +2",
back="Conveyance Cape"}
sets.idle.Field.avatarMelee = {
main="Gridarvor",
sub="Elan Strap",
ammo="Seraphicaller",
head="Apogee Crown +1",
ear1="Loquacious Earring",
ear2="Gifted Earring",
neck="Caller's Pendant",
body="Caller's Doublet +2",
hands="Regimen Mittens",
ring1="Evoker's Ring",
ring2="Fervor Ring",
waist="Fucho-no-Obi",
legs="Assiduity Pants +1",
feet="Caller's Pigaches +2",
back="Conveyance Cape"}
sets.idle.Weak = {
main="Gridarvor",
sub="Elan Strap",
ammo="Sancus Sachet",
head="Beckoner's Horn +1",
ear1="Gelos Earring",
ear2="Andoaa Earring",
neck="Caller's Pendant",
body="Shomonjijoe +1",
hands="Convo. Bracers +2",
ring1="Evoker's Ring",
ring2="Shneddick Ring",
waist="Fucho-no-Obi",
legs="Assid. Pants +1",
feet="Beck. Pigaches +1",
back="Conveyance Cape"}
--------------------------------------
-- Engaged sets
--------------------------------------
-- Normal melee group--
sets.engaged.Normal = {
ammo="Seraphicaller",
ear1="Steelflash Earring",
ear2="Bladeborn Earring +1",
neck="Clotharius Torque",
ring1="Rajas Ring",
ring2="Enlivened Ring",
waist="Fucho-no-Obi",
head="Apogee Crown +1",
body="Caller's Doublet +2",
hands="Regimen Mittens",
legs="Assiduity Pants +1",
feet="Caller's Pigaches +2",
back="Conveyance Cape"}
sets.engaged.Acc = {
ammo="Seraphicaller",
ear1="Steelflash Earring",
ear2="Bladeborn Earring +1",
neck="Clotharius Torque",
ring1="Rajas Ring",
ring2="Enlivened Ring",
waist="Fucho-no-Obi",
head="Apogee Crown +1",
body="Caller's Doublet +2",
hands="Regimen Mittens",
legs="Assiduity Pants +1",
feet="Caller's Pigaches +2",
back="Conveyance Cape"}
--Sets Reive--
--------------
sets.reive = {neck="Ygnas's Resolve +1", back="Mecisto. Mantle"}
send_command('input /macro book 6;wait .1;input /macro set 4')
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function display_current_job_state(eventArgs)
end
function update_custom_groups()
classes.CustomIdleGroups:clear()
if pet.isvalid then
classes.CustomIdleGroups:append(state.PetMode.value)
end
end
function job_status_change(newStatus, oldStatus, eventArgs, cmdParams)
end
function job_precast(spell, action, spellMap, eventArgs)
end
function job_post_pet_precast(spell,action,spellMap,eventArgs)
end
function job_aftercast(spell, action, spellMap, eventArgs)
end
function job_get_spell_map(spell, action, spellMap, eventArgs)
end
function job_pet_change(pet, petparam, gain)
end
function customize_melee_set(meleeSet)
return meleeSet
end
function job_pet_status_change(newStatus, oldStatus, eventArgs)
if pet.isvalid and not midaction() and not pet_midaction() and (newStatus == 'Engaged' or oldStatus == 'Engaged') then
handle_equipping_gear(player.status, newStatus)
end
end
function job_update(cmdParams, eventArgs)
end
function job_precast(spell, action, eventArgs)
-- Don't swap if we're in the middle of something or our pet's doing something
-- Stops macro spam from interfering with an action GS is already handling
if midaction() or pet_midaction() then
return
end
if buffactive['Astral Conduit'] then
return
end
-- If we're doing a blood pact, equip our delay set IF Apogee or Astral Conduit are not active
if (spell.type == 'BloodPactRage' or spell.type == 'BloodPactWard') and not spell.interrupted then
equip(sets.precast.bp)
end
end
function job_midcast(spell, action, spellMap, eventArgs)
if (spell.type == 'BloodPactRage' or spell.type == 'BloodPactWard') and not spell.interrupted then
if bp_physical:contains(spell.name) then
equip(sets.midcast.atk)
elseif bp_hybrid:contains(spell.name) then
equip(sets.midcast.hybrid)
elseif bp_magical:contains(spell.name) then
equip(sets.midcast.mab)
if pet.name == 'Ifrit' then
equip({ring1="Fervor Ring"})
end
elseif bp_debuff:contains(spell.name) then
equip(sets.midcast.macc)
elseif bp_buff:contains(spell.name) then
equip(sets.midcast.buff)
elseif bp_other:contains(spell.name) then
equip(sets.midcast.other)
end
end
end
function customize_idle_set(idleSet)
if pet.status == 'Engaged' then
idleSet = set_combine(idleSet, sets.idle.Field.avatarMelee)
end
return idleSet
end
By Boshi 2017-09-01 11:43:44
edit: nvm figured it out just needed some sleep
By Azurea 2017-09-03 15:33:24
How would I go about adding a specific gearset for just tier 1 nukes? Same would go for a specific gearset for tier 1 nuke precast/FC. Thanks!
Server: Shiva
Game: FFXI
Posts: 1052
By Shiva.Arislan 2017-09-03 17:37:46
First, you need some way for GS to know which spells you consider to be "tier 1 nukes"... to do that, build a table under job_setup() containing all the desired spells:
Code function job_setup()
tier_one_nukes = S{'Fire','Blizzard','Aero','Stone','Thunder','Water'}
end
Second, you need some code in midcast to check the current spell being cast against that table, and then equip the appropriate set or append the appropriate class:
Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' and tier_one_nukes:contains(spell.english) then
equip(_____________________)
end
end
or
Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' and tier_one_nukes:contains(spell.english) then
classes.CastingMode:append('Tier1')
end
end
[+]
By Boshi 2017-09-14 18:41:27
Is there anyway for gearswap to recognize is a target mob has a certain buff active?
(was trying to make a condition for my haste rule to detect of mob has haste daze on)
By Sabishii 2017-09-14 21:02:57
Is there anyway for gearswap to recognize is a target mob has a certain buff active?
(was trying to make a condition for my haste rule to detect of mob has haste daze on)
I don't think you can, but it can check if YOU have a samba buff up.
By Aerix 2017-09-19 06:42:21
Would be great if someone could help me with this. Based on Mote's gear toggles, I created a toggle that will apply a PetTP gearset over my regular gear while my Automaton is engaged (while I'm standing at range). This works fine, however I would like to create a rule that would, as long as the toggle remains true, automatically swap in my PetWS gearset as soon as my maton hits 1000% TP or more and then switch back to the PetTP gear after the WS goes off.
Unfortunately, it doesn't seem like pet.tp works for this, as it always shows a value of "0" even when my maton has 1-3000 TP (Mote's PUP.lua prints the value to chat whenever a maton is engaged).
From mote-include.lua Code function apply_PetTP(baseSet)
if state.PetTP.value then
if sets.PetWS and (pet.tp >= 1000) then
baseSet = set_combine(baseSet, sets.PetWS)
elseif sets.PetTP and (pet.tp < 1000) then
baseSet = set_combine(baseSet, sets.PetTP)
end
end
return baseSet
end
I'm pretty sure the above code is incomplete even if pet.tp were working, but I'm not sure how to make it automatically check pet.tp whenever its value changes.
I'd really appreciate it if someone could help me out. I currently swap in WS gear manually, but with multiattack, unpredictable maton behavior and possible lag, it's easy to switch into WS gear a moment too late after it hits 1000% TP
Edit:
Oh, one other thing: //gs disable back for the CP cape doesn't seem to work with Mote's luas at all (however, the console confirms that back is disabled. showswaps prints "--- function: 4E941560 ---" separate of the "--- status change ---" print and then swaps in my usual capes as normal, instead of keeping the CP cape equipped.
Is there any way to fix this?
Server: Asura
Game: FFXI
Posts: 88
By Asura.Selindrile 2017-09-19 15:17:40
Aerix, you may want to take a look at my gearswaps, I end up posting them from time to time, they are based on mote's but highly modified, have a "capacity mode" as well as you can have specific tp sets depending on the specific puppet you have out, even.
My Dropbox
My Discord
Feel free to ask for support on the discord in the Allchat channel or by sending direct messages to Kalesandrancor.
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.
|
|