|
Gearswap Support Thread
Valefor.Omnys
Server: Valefor
Game: FFXI
Posts: 1759
By Valefor.Omnys 2016-09-29 10:43:16
Ragnarok.Flippant said: »Don't believe copying to clipboard is something available in the API.
I thought it did, but google to make sure: http://dev.windower.net/doku.php?id=lua:api:functions:start&s[]=clipboard#windowercopy_to_clipboard_str
Server: Asura
Game: FFXI
Posts: 1326
By Asura.Azagarth 2016-09-29 11:44:21
Ragnarok.Flippant said: »Because of what you describe, it'd be easier to just do it the other way around (put those in the sets and equip Moonshade when <2950 or whatever you want the threshold to be. Assuming you intend this for a Mote-based file.
Code
1
2
3
4
5
6
7
8
9
moonshade_WS = S{"Blade: Ten"}
function job_post_precast(spell,action,spellMap,eventArgs)
if spell.type=="WeaponSkill" then
if moonshade_WS:contains(spell.english) and player.tp<2950 then
equip({ear1="Moonshade Earring"})
end
end
end
Be mindful if you already have a job_post_precast function in your file and place the contents inside that one.
As always you rock!!! That logic makes much better sense, and allows me to place it after lugra rule, so that moonshade will override it yes? aka lugra+1/lugra at night, then it removes the 2nd lugra since moonshade rule would then trigger? thus ending ws in Lugra+1/moonshade at night?
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-09-29 13:51:54
Yes.
For whatever reason, I only expected functions in the subtables, so didn't check that page x:
Replace your export.lua file: Code --Copyright (c) 2013~2016, Byrthnoth
--All rights reserved.
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are met:
-- * Redistributions of source code must retain the above copyright
-- notice, this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * Neither the name of <addon name> nor the
-- names of its contributors may be used to endorse or promote products
-- derived from this software without specific prior written permission.
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
--ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
--WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
--DISCLAIMED. IN NO EVENT SHALL <your name> BE LIABLE FOR ANY
--DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
--(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
--LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
--ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
--(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
function export_set(options)
local item_list = T{}
local targinv,all_items,xml,all_sets,use_job_in_filename,use_subjob_in_filename,overwrite_existing,export_slot,export_slot_name
if #options > 0 then
for _,v in ipairs(options) do
if S{'inventory','inv','i'}:contains(v:lower()) then
targinv = true
elseif v:lower() == 'all' then
all_items = true
elseif S{'xml'}:contains(v:lower()) then
xml = true
elseif S{'sets','set','s'}:contains(v:lower()) then
all_sets = true
if not user_env or not user_env.sets then
msg.addon_msg(123,'Cannot export the sets table of the current file because there is no file loaded.')
return
end
elseif v:lower() == 'mainjob' then
use_job_in_filename = true
elseif v:lower() == 'mainsubjob' then
use_subjob_in_filename = true
elseif v:lower() == 'overwrite' then
overwrite_existing = true
elseif slot_map[v:lower()] then
export_slot = slot_map[v:lower()]
export_slot_name = v:lower()
end
end
end
local buildmsg = 'Exporting '
if all_items then
buildmsg = buildmsg..'your all items'
elseif targinv then
buildmsg = buildmsg..'your current inventory'
elseif all_sets then
buildmsg = buildmsg..'your current sets table'
elseif export_slot then
buildmsg = buildmsg..'your '..export_slot_name..' to clipboard.'
else
buildmsg = buildmsg..'your currently equipped gear'
end
if xml then
buildmsg = buildmsg..' as an xml file.'
elseif not export_slot then
buildmsg = buildmsg..' as a lua file.'
end
if use_job_in_filename then
buildmsg = buildmsg..' (Naming format: Character_JOB)'
elseif use_subjob_in_filename then
buildmsg = buildmsg..' (Naming format: Character_JOB_SUB)'
end
if overwrite_existing then
buildmsg = buildmsg..' Will overwrite existing files with same name.'
end
msg.addon_msg(123,buildmsg)
if not windower.dir_exists(windower.addon_path..'data/export') then
windower.create_dir(windower.addon_path..'data/export')
end
if all_items then
for i = 0, #res.bags do
item_list:extend(get_item_list(items[res.bags[i].english:gsub(' ', ''):lower()]))
end
elseif targinv then
item_list:extend(get_item_list(items.inventory))
elseif all_sets then
-- Iterate through user_env.sets and find all the gear.
item_list,exported = unpack_names({},'L1',user_env.sets,{},{empty=true})
else
-- Default to loading the currently worn gear.
for i = 1,16 do -- ipairs will be used on item_list
if not item_list[i] then
item_list[i] = {}
item_list[i].name = empty
item_list[i].slot = toslotname(i-1)
end
end
for slot_name,gs_item_tab in pairs(table.reassign({},items.equipment)) do -- Not sure why I have to reassign it here
if gs_item_tab.slot ~= empty then
local item_tab
local bag_name = to_windower_bag_api(res.bags[gs_item_tab.bag_id].en)
if res.items[items[bag_name][gs_item_tab.slot].id] then
item_tab = items[bag_name][gs_item_tab.slot]
item_list[slot_map[slot_name]+1] = {
name = res.items[item_tab.id][language],
slot = slot_name
}
if not xml then
local augments = extdata.decode(item_tab).augments or {}
local aug_str = ''
for aug_ind,augment in pairs(augments) do
if augment ~= 'none' then aug_str = aug_str.."'"..augment:gsub("'","\\'").."'," end
end
if string.len(aug_str) > 0 then
item_list[slot_map[slot_name]+1].augments = aug_str
end
end
else
msg.addon_msg(123,'You are wearing an item that is not in the resources yet.')
end
end
end
end
if #item_list == 0 then
msg.addon_msg(123,'There is nothing to export.')
return
else
local not_empty
for i,v in pairs(item_list) do
if v.name ~= empty then
not_empty = true
break
end
end
if not not_empty then
msg.addon_msg(123,'There is nothing to export.')
return
end
end
if not windower.dir_exists(windower.addon_path..'data/export') then
windower.create_dir(windower.addon_path..'data/export')
end
local path = windower.addon_path..'data/export/'..player.name
if use_job_in_filename then
path = path..'_'..windower.ffxi.get_player().main_job
elseif use_subjob_in_filename then
path = path..'_'..windower.ffxi.get_player().main_job..'_'..windower.ffxi.get_player().sub_job
else
path = path..os.date(' %H %M %S%p %y-%d-%m')
end
if xml then
-- Export in .xml
if (not overwrite_existing) and windower.file_exists(path..'.xml') then
path = path..' '..os.clock()
end
local f = io.open(path..'.xml','w+')
f:write('<spellcast>\n <sets>\n <group name="exported">\n <set name="exported">\n')
for i,v in ipairs(item_list) do
if v.name ~= empty then
local slot = xmlify(tostring(v.slot))
local name = xmlify(tostring(v.name))
f:write(' <'..slot..'>'..name..'</'..slot..'>\n')
end
end
f:write(' </set>\n </group>\n </sets>\n</spellcast>')
f:close()
elseif export_slot then
for i,v in ipairs(item_list) do
if i-1==export_slot then
if v.augments then
--Advanced set table
windower.copy_to_clipboard(v.slot..'={name="'..v.name..'", augments={'..v.augments..'}},')
else
windower.copy_to_clipboard(v.slot..'="'..v.name..'"')
end
return
end
end
else
-- Default to exporting in .lua
if (not overwrite_existing) and windower.file_exists(path..'.lua') then
path = path..' '..os.clock()
end
local f = io.open(path..'.lua','w+')
f:write('sets.exported={\n')
for i,v in ipairs(item_list) do
if not export_slot and v.name ~= empty then
if v.augments then
--Advanced set table
f:write(' '..v.slot..'={ name="'..v.name..'", augments={'..v.augments..'}},\n')
else
f:write(' '..v.slot..'="'..v.name..'",\n')
end
end
end
f:write('}')
f:close()
end
end
function unpack_names(ret_tab,up,tab_level,unpacked_table,exported)
for i,v in pairs(tab_level) do
local flag,alt
if type(v)=='table' and i ~= 'augments' and not ret_tab[tostring(tab_level[i])] then
ret_tab[tostring(tab_level[i])] = true
unpacked_table,exported = unpack_names(ret_tab,i,v,unpacked_table,exported)
elseif i=='name' and type(v) == 'string' then
alt = up
flag = true
elseif type(v) == 'string' and v~='augment' and v~= 'augments' and v~= 'priority' then
alt = i
flag = true
end
if flag then
if not exported[v:lower()] then
unpacked_table[#unpacked_table+1] = {}
local tempname,tempslot = unlogify_unpacked_name(v)
unpacked_table[#unpacked_table].name = tempname
unpacked_table[#unpacked_table].slot = tempslot or alt
if tab_level.augments then
local aug_str = ''
for aug_ind,augment in pairs(tab_level.augments) do
if augment ~= 'none' then aug_str = aug_str.."'"..augment:gsub("'","\\'").."'," end
end
if aug_str ~= '' then unpacked_table[#unpacked_table].augments = aug_str end
end
if tab_level.augment then
local aug_str = unpacked_table[#unpacked_table].augments or ''
if tab_level.augment ~= 'none' then aug_str = aug_str.."'"..augment:gsub("'","\\'").."'," end
if aug_str ~= '' then unpacked_table[#unpacked_table].augments = aug_str end
end
exported[tempname:lower()] = true
exported[v:lower()] = true
end
end
end
return unpacked_table,exported
end
function unlogify_unpacked_name(name)
local slot
name = name:lower()
for i,v in pairs(res.items) do
if type(v) == 'table' then
if v[language..'_log']:lower() == name then
name = v[language]
local potslots = v.slots
if potslots then potslots = to_windower_api(res.slots[potslots:it()()].english) end
slot = potslots or 'item'
break
elseif v[language]:lower() == name then
name = v[language]
local potslots = v.slots
if potslots then potslots = to_windower_api(res.slots[potslots:it()()].english) end
slot = potslots or 'item'
break
end
end
end
return name,slot
end
function xmlify(phrase)
if tonumber(phrase:sub(1,1)) then phrase = 'NUM'..phrase end
return phrase --:gsub('"','"'):gsub("'","'"):gsub('<','<'):gsub('>','>'):gsub('&&','&')
end
function get_item_list(bag)
local items_in_bag = {}
-- Load the entire inventory
for _,v in pairs(bag) do
if type(v) == 'table' and v.id ~= 0 then
if res.items[v.id] then
items_in_bag[#items_in_bag+1] = {}
items_in_bag[#items_in_bag].name = res.items[v.id][language]
local potslots,slot = copy_entry(res.items[v.id].slots)
if potslots then
slot = res.slots[potslots:it()()].english:gsub(' ','_'):lower() -- Multi-lingual support requires that we add more languages to slots.lua
end
items_in_bag[#items_in_bag].slot = slot or 'item'
if not xml then
local augments = extdata.decode(v).augments or {}
local aug_str = ''
for aug_ind,augment in pairs(augments) do
if augment ~= 'none' then aug_str = aug_str.."'"..augment:gsub("'","\\'").."'," end
end
if string.len(aug_str) > 0 then
items_in_bag[#items_in_bag].augments = aug_str
end
end
else
msg.addon_msg(123,'You possess an item that is not in the resources yet.')
end
end
end
return items_in_bag
end
and use //gs export back (will accept any slot name that GS accepts).
[+]
Valefor.Omnys
Server: Valefor
Game: FFXI
Posts: 1759
By Valefor.Omnys 2016-09-29 14:15:49
You'd get all my +'s if clicking it multiple times didn't just take it away and put it back, etc.
Thanks!
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-09-29 14:25:35
No problem, thank you for suggesting such a useful function o: I will definitely be using it myself.
Bismarck.Mitchel
Server: Bismarck
Game: FFXI
Posts: 153
By Bismarck.Mitchel 2016-10-02 04:59:35
Having some trouble switching back to my idle set when I have weapon drawn, any suggestions?
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:64
Shorthand versions for each strategem type that uses the version appropriate for
the current Arts.
In-game macro: /console gs c scholar xxx
Light Arts Dark Arts
gs c scholar light Light Arts/Addendum
gs c scholar dark Dark Arts/Addendum
gs c scholar cost Penury Parsimony
gs c scholar speed Celerity Alacrity
gs c scholar aoe Accession Manifestation
gs c scholar power Rapture Ebullience
gs c scholar duration Perpetuance
gs c scholar accuracy Altruism Focalization
gs c scholar enmity Tranquility Equanimity
gs c scholar skillchain Immanence
gs c scholar addendum Addendum: White Addendum: Black
--]]
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('Mote-Globals.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
info.addendumNukes = S{"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
update_active_strategems()
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')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT')
state.MagicBurst = M(false, 'Magic Burst')
info.low_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder",
"Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II",
"Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
info.mid_nukes = S{}
info.high_nukes = S{}
send_command('bind ` input /ma Stun <t>; wait 0.5; input /p Casting STUN on <t>.')
send_command('bind ^` gs c toggle MagicBurst')
send_command('bind !` gs c scholar skillchain')
send_command('bind ^- gs c scholar light')
send_command('bind ^= gs c scholar dark')
send_command('bind delete gs c scholar speed')
send_command('bind Home gs c scholar duration')
send_command('bind End gs c scholar aoe')
select_default_macro_book()
end
function user_unload()
send_command('unbind `')
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind ^-')
send_command('unbind ^=')
send_command('unbind delete')
send_command('unbind end')
send_command('unbind home')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Augments
--------------------------------------
-- Merlinic
Merl_FC_Head = { name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','"Fast Cast"+3','CHR+3','Mag. Acc.+10','"Mag.Atk.Bns."+13',}}
Merl_MAB_Legs = { name="Merlinic Shalwar", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','"Mag.Atk.Bns."+8',}}
Merl_FC_Feet = { name="Merlinic Crackows", augments={'Mag. Acc.+7','"Fast Cast"+5',}}
Merl_MAB_Feet = { name="Merlinic Crackows", augments={'"Mag.Atk.Bns."+24','Magic burst mdg.+10%','MND+6','Mag. Acc.+9',}}
Merl_Drain_Feet = { name="Merlinic Crackows", augments={'Mag. Acc.+30','"Drain" and "Aspir" potency +9','VIT+7','"Mag.Atk.Bns."+14',}}
-- Chironic
Chir_MAB_Hands = { name="Chironic Gloves", augments={'Magic dmg. taken -2%','"Fast Cast"+1','"Treasure Hunter"+1','Accuracy+15 Attack+15','Mag. Acc.+14 "Mag.Atk.Bns."+14',}}
Chir_Cure_Hands = { name="Chironic Gloves", augments={'"Mag.Atk.Bns."+1','"Cure" potency +10%',}}
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Tabula Rasa'] = {legs="Argute Pants +2"}
sets.precast.JA['Dark Arts'] = {"Scholar's Gown"}
sets.precast.JA['Light Arts'] = {"Academic's Pants +1"}
organizer_items = {}
-- Fast cast sets for spells
-- FC +55%
sets.precast.FC = {main="Akademos",ammo="Incantor Stone",
head="Merl_FC_Head",neck="",ear1="",ear2="Loquacious Earring",
body="Anhur Robe",hands="Gende. Gages +1",ring1="",ring2="Prolix Ring",
back="Swith Cape",waist="Witful Belt",legs="Psycloth Lappas",feet=Merl_FC_Feet}
sets.precast.FC.Cure = set_combine(sets.precast.FC, {back="Pahtli Cape",feet="Vanya Clogs"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {ear1="Barkarole Earring",neck="Stoicheion Medal"})
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 = {}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
--
sets.precast.WS['Myrkr'] = {main="Akademos",sub="Niobid Strap",ammo="Ghastly Tathlum +1",
head="Kaabnax Hat",neck="Sanctity Necklace",ear1="Moonshade Earring",ear2="Etiolation Earring",
body="Amalric Doublet",hands="Otomi Gloves",ring1="Mephitas's Ring +1",ring2="Mephitas's Ring",
back="Pahtli Cape",waist="Luminary Sash",legs="Amalric Slops",feet="Medium's Sabots"}
-- Midcast Sets
sets.midcast.FastRecast = {ammo="Incantor Stone"}
-- Cure Sets
-- Potency: +50%, Healing Skill: 615 total inc. Light Arts bonus, Enmity: -15, MND: +146, VIT: +135
sets.midcast.Cure = {main="",sub="", ammo="Hydrocera",
head="Vanya Hood",neck="Fylgja Torque +1",ear1="Novia Earring",ear2="Mendi. Earring",
body="Peda. Gown",hands=Chir_Cure_Hands,ring1="Sirona's Ring",ring2="Ephedra Ring",
back="Solemnity Cape",waist="Porous Rope",legs="Gyve Trousers",feet="Vanya Clogs"}
-- Potency: +50%, Healing Skill: 567 total inc. Light Arts Bonus, MND: +152, VIT+ 131
sets.midcast.CureWithLightWeather = set_combine(sets.midcast.Cure, {main="Chatoyant staff",legs="Acad. Pants +1",back="Twilight Cape",waist="Hachirin-no-Obi"})
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Regen = {ammo="Savant's Treatise",
head="Arbatel Bonnet",neck="Melic Torque",body="Telchine Chasuble",hands="Arbatel Bracers",
back="Bookworm's Cape",waist="Olympus sash",legs="Telchine Braconi",feet="Telchine Pigaches"}
-- Enhancing Magic Sets
sets.midcast['Enhancing Magic'] = {main="",sub="",ammo="Savant's Treatise",
head="Arbatel Bonnet",body="Telchine Chasuble",hands="Amalric Gages",legs="Academic's Pants +1",feet="Rubeus boots",
neck="Enhancing Torque",ear1="Andoaa Earring",waist="Olympus sash",back="Merciful Cape"}
sets.midcast.Cursna = {feet="Vanya Clogs",ring2="Ephedra Ring"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})
sets.midcast.Protect = set_combine(sets.midcast['Enhancing Magic'], {ring1="Sheltered Ring"})
sets.midcast.Shell = set_combine(sets.midcast['Enhancing Magic'], {ring1="Sheltered Ring"})
sets.midcast.Haste = set_combine(sets.midcast.FastRecast, {head="Telchine Cap",body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi"})
sets.midcast.Storm = sets.midcast.Haste
sets.midcast.Erase = sets.midcast.FastRecast
sets.midcast.Raise = sets.midcast.FastRecast
sets.midcast.Reraise = sets.midcast.FastRecast
-- Custom spell classes
sets.midcast.MndEnfeebles = {main="Akademos",sub="Willpower Grip",ammo="Savant's Treatise",
head=Merl_FC_Head,neck="Melic Torque",ear1="Barakole Earring",ear2="Gwati Earring",
body="Jhakri robe",hands="Amalric Gages",ring1="Etana ring",ring2="Perception Ring",
back="Lugh's cape",waist="Eschan Stone",legs=Merl_MAB_Legs,feet=Merl_Drain_Feet}
sets.midcast.IntEnfeebles = sets.midcast.MndEnfeebles
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast.Kaustra = set_combine(sets.midcast['Elemental Magic'], {head="Pixie Hairpin +1"})
sets.midcast['Dark Magic'] = {main="Akademos",sub="Willpower grip",ammo="Savant's Treatise",
head="Pixie Hairpin +1",neck="Deceiver's Torque",ear1="Barakole Earring",ear2="Gwati Earring",
body="Psycloth vest",hands="Amalric Gages",ring1="Archon Ring",ring1="Etana Ring",
back="Bookworm's Cape",waist="Porous rope",legs="Pedagogy Pants",feet=Merl_Drain_Feet}
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ammo="Incantor Stone",body="Helios Jacket",waist="Fucho-no-obi",feet=Merl_Drain_Feet})
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Akademos",sub="Arbuda Grip",ammo="Incantor Stone",
head=Merl_FC_Head,ear2="Loquac. Earring",
body="Helios Jacket",hands="Amalric Gages",ring2="Prolix Ring",
back="Swith Cape +1",waist="Witful Belt",legs="Psycloth Lappas",feet=Merl_FC_Feet}
sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {})
-- Elemental Magic sets are default for handling all-tier nukes.
sets.midcast['Elemental Magic'] = {main="Akademos",sub="Willpower grip",ammo="Witchstone",
head=Merl_FC_Head,neck="Sanctity necklace",ear1="Barkarole Earring",ear2="Friomisi Earring",
Body="Jhakri robe",hands="Amalric Gages",ring1="Shiva Ring",ring2="Strendu Ring",
back="Lugh's Cape",waist="Eschan Stone",legs=Merl_MAB_Legs,feet=Merl_MAB_Feet}
sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {ear2="Gwati Earring",ring2="Etana Ring",feet=Merl_Drain_Feet})
-- Custom refinements for certain nuke tiers (No longer used as of Jan/2016).
sets.midcast['Elemental Magic'].HighTierNuke = sets.midcast['Elemental Magic']
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = sets.midcast['Elemental Magic'].Resistant
sets.midcast.Helix = set_combine(sets.midcast['Elemental Magic'], {neck="Mizukage-no-Kubikazari",back="Bookworm's Cape"})
sets.midcast.Noctohelix = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"})
sets.midcast.Luminohelix = set_combine(sets.midcast.Helix, {ring1="Weatherspoon Ring"})
sets.midcast.Impact = {main="Akademos",sub="Willpower grip",ammo="Witchstone",
head="",neck="Sanctity necklace",ear1="Barkarole Earring",ear2="Friomisi Earring",
Body="Twilight Cloak",hands="Amalric Gages",ring1="Shiva Ring",ring2="Strendu Ring",
back="Lugh's Cape",waist="Eschan Stone",legs=Merl_MAB_Legs,feet=Merl_MAB_Feet}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="",sub="Genbu's Shield",
neck="Sanctity necklace",body="Hagondes Coat +1",hands="Serpentes Cuffs",ear1="Infused earring",
ring1="Sheltered Ring",ring2="Paguroidea Ring",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle.Town = {main="Akademos",sub="Willpower Grip",ammo="Homiliary",
head=Merl_FC_Head,neck="Sanctity necklace",ear1="Barkarole Earring",ear2="Infused Earring",
body="Hagondes Coat +1",hands="Serpentes cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Solemnity Cape",waist="Fucho-no-obi",legs="Assiduity Pants +1",feet="Herald's Gaiters"}
sets.idle.Field = {main="Akademos",sub="Willpower Grip",ammo="Homiliary",
head=Merl_FC_Head,neck="Sanctity necklace",ear1="Barkarole Earring",ear2="Infused Earring",
body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Solemnity Cape",waist="Fucho-no-obi",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
sets.idle.PDT = {main="Terra's Staff",sub="Willpower Grip",ammo="Homiliary",
head="Vanya Hood",neck="Twilight Torque",ear1="Darkness Earring",ear2="Darkness Earring",
body="Hagondes Coat +1",hands=Chir_MAB_Hands,ring1="Gelatinous ring +1",ring2="Dark Ring",
back="Solemnity Cape",waist="Fucho-no-obi",legs="Gyve Trousers",feet="Battlecast gaiters"}
sets.idle.Weak = sets.idle.Field
-- Defense sets
sets.defense.PDT = {main="Terra's Staff",sub="Willpower grip",ammo="Incantor Stone",
neck="Twilight Torque",ear1="Darkness Earring",ear2="Darkness Earring",
body="Hagondes Coat +1",ring1="Gelatinous Ring +1",ring2="Jelly Ring",
back="Solemnity Cape",feet="Battlecast gaiters"}
sets.defense.MDT = {neck="Twilight Torque",
head="Vanya Hood",neck="Twilight Torque",ear1="Merman's Earring",ear2="Merman's Earring",
body="Hagondes Coat +1",ring1="Minerva's Ring",ring2="Dark Ring",
back="Solemnity Cape",waist="Fucho-no-obi",legs="Gyve Trousers"}
sets.Kiting = {feet="Herald's Gaiters"}
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 = {}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Ebullience'] = {head="Arbatel Bonnet"}
sets.buff['Rapture'] = {head="Arbatel Bonnet"}
sets.buff['Perpetuance'] = {hands="Arbatel Bracers"}
sets.buff['Immanence'] = {hands="Arbatel Bracers"}
sets.buff['Penury'] = {legs="Savant's Pants +2"}
sets.buff['Parsimony'] = {legs="Savant's Pants +2"}
sets.buff['Celerity'] = {feet="Pedagogy Loafers"}
sets.buff['Alacrity'] = {feet="Pedagogy Loafers"}
sets.buff['Stormsurge'] = {feet="Pedagogy Loafers"}
sets.buff['Klimaform'] = {feet="Arbatel Loafers"}
sets.buff.FullSublimation = {Sub="",head="Academic's Mortarboard +1",ear1="Savant's Earring",body="Pedagogy Gown",neck="Sanctity Necklace",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
sets.buff.PDTSublimation = {head="Academic's Mortarboard +1",ear1="Savant's Earring",body="Pedagogy Gown"}
sets.magic_burst = {main="Akademos",sub="Willpower grip",ammo="Witchstone",
head=Merl_FC_Head,neck="Mizukage-no-Kubikazari",ear1="Barkarole Earring",ear2="Static Earring",
Body="Jhakri Robe",hands="Amalric Gages",ring1="Mujin Band",ring2="Locus Ring",
back="Lugh's cape",waist="Eschan Stone",legs=Merl_MAB_Legs,feet=Merl_MAB_Feet}
-- Cap: 40%
-- Akademos: 10%, Mizukage: 10%, Static: 5%, Locus: 5%, Merl Feet: 10 = 40%
-- Mujin: 5% II, Almaric: 5% II = 50%
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function refine_various_spells(spell, action, spellMap, eventArgs)
aspirs = S{'Aspir','Aspir II'}
sleeps = S{'Sleep','Sleep II'}
sleepgas = S{'Sleepga'}
if not sleepgas:contains(spell.english) and not sleeps:contains(spell.english) and not aspirs:contains(spell.english) then
return
end
local newSpell = spell.english
local spell_recasts = windower.ffxi.get_spell_recasts()
local cancelling = 'All '..spell.english..' spells are on cooldown. Cancelling spell casting.'
if spell_recasts[spell.recast_id] > 0 then
if aspirs:contains(spell.english) then
if spell.english == 'Aspir' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Aspir II' then
newSpell = 'Aspir'
end
elseif sleeps:contains(spell.english) then
if spell.english == 'Sleep' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Sleep II' then
newSpell = 'Sleep'
end
elseif sleepgas:contains(spell.english) then
if spell.english == 'Sleepga' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
end
end
end
if newSpell ~= spell.english then
send_command('@input /ma "'..newSpell..'" '..tostring(spell.target.raw))
eventArgs.cancel = true
return
end
end
function job_precast(spell, action, spellMap, eventArgs)
refine_various_spells(spell, action, spellMap, eventArgs)
if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") then
if buffactive.Silence then
cancel_spell()
send_command('input /item "Echo Drops" <me>')
end
end
end
-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
end
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
if spell.element == world.day_element or spell.element == world.weather_element then
equip ({waist="Hachirin-no-Obi"})
end
end
end
function job_aftercast(spell)
if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
end
end
-------------------------------------------------------------------------------------------------------------------
-- 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 buff == "Sublimation: Activated" then
handle_equipping_gear(player.status)
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light' then
return 'CureWithLightWeather'
end
elseif spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
elseif spell.skill == 'Elemental Magic' then
if info.low_nukes:contains(spell.english) then
return 'LowTierNuke'
elseif info.mid_nukes:contains(spell.english) then
return 'MidTierNuke'
elseif info.high_nukes:contains(spell.english) then
return 'HighTierNuke'
end
end
end
end
function customize_idle_set(idleSet)
if state.Buff['Sublimation: Activated'] then
if state.IdleMode.value == 'Normal' then
idleSet = set_combine(idleSet, sets.buff.FullSublimation)
elseif state.IdleMode.value == 'PDT' then
idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
end
end
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)
if cmdParams[1] == 'user' and not (buffactive['light arts'] or buffactive['dark arts'] or
buffactive['addendum: white'] or buffactive['addendum: black']) then
if state.IdleMode.value == 'Stun' then
send_command('@input /ja "Dark Arts" <me>')
else
send_command('@input /ja "Light Arts" <me>')
end
end
update_active_strategems()
update_sublimation()
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for direct player commands.
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'scholar' then
handle_strategems(cmdParams)
eventArgs.handled = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Reset the state vars tracking strategems.
function update_active_strategems()
state.Buff['Ebullience'] = buffactive['Ebullience'] or false
state.Buff['Rapture'] = buffactive['Rapture'] or false
state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
state.Buff['Immanence'] = buffactive['Immanence'] or false
state.Buff['Penury'] = buffactive['Penury'] or false
state.Buff['Parsimony'] = buffactive['Parsimony'] or false
state.Buff['Celerity'] = buffactive['Celerity'] or false
state.Buff['Alacrity'] = buffactive['Alacrity'] or false
state.Buff['Klimaform'] = buffactive['Klimaform'] or false
end
function update_sublimation()
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
end
-- Equip sets appropriate to the active buffs, relative to the spell being cast.
function apply_grimoire_bonuses(spell, action, spellMap)
if state.Buff.Perpetuance and spell.type =='WhiteMagic' and spell.skill == 'Enhancing Magic' then
equip(sets.buff['Perpetuance'])
end
if state.Buff.Rapture and (spellMap == 'Cure' or spellMap == 'Curaga') then
equip(sets.buff['Rapture'])
end
if spell.skill == 'Elemental Magic' then --or spellMap ~= 'ElementalEnfeeble'
if state.Buff.Ebullience and spell.english ~= 'Impact' then
equip(sets.buff['Ebullience'])
end
if state.Buff.Immanence then
equip(sets.buff['Immanence'])
end
if state.Buff.Klimaform and spell.element == world.weather_element then
equip(sets.buff['Klimaform'])
end
end
if state.Buff.Penury then equip(sets.buff['Penury']) end
if state.Buff.Parsimony then equip(sets.buff['Parsimony']) end
if state.Buff.Celerity then equip(sets.buff['Celerity']) end
if state.Buff.Alacrity then equip(sets.buff['Alacrity']) end
end
function display_current_caster_state()
local msg = ''
if state.OffenseMode.value ~= 'None' then
msg = msg .. 'Melee'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ', '
end
msg = msg .. 'Idle ['..state.IdleMode.value..'], Casting ['..state.CastingMode.value..']'
add_to_chat(122, msg)
local currentStrats = get_current_strategem_count()
local arts
if buffactive['Light Arts'] or buffactive['Addendum: White'] then
arts = 'Light Arts'
elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
arts = 'Dark Arts'
else
arts = 'No Arts Activated'
end
add_to_chat(122, 'Current Available Strategems: ['..currentStrats..'], '..arts..'')
end
-- General handling of strategems in an Arts-agnostic way.
-- Format: gs c scholar <strategem>
function handle_strategems(cmdParams)
-- cmdParams[1] == 'scholar'
-- cmdParams[2] == strategem to use
if not cmdParams[2] then
add_to_chat(123,'Error: No strategem command given.')
return
end
local currentStrats = get_current_strategem_count()
local newStratCount = currentStrats - 1
local strategem = cmdParams[2]:lower()
if currentStrats > 0 and strategem ~= 'light' and strategem ~= 'dark' then
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif currentStrats == 0 then
add_to_chat(122, '***Out of strategems! Canceling...***')
return
end
if strategem == 'light' then
if buffactive['light arts'] then
send_command('input /ja "Addendum: White" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: white'] then
add_to_chat(122,'Error: Addendum: White is already active.')
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
send_command('input /ja "Light Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
else
send_command('input /ja "Light Arts" <me>')
end
elseif strategem == 'dark' then
if buffactive['dark arts'] then
send_command('input /ja "Addendum: Black" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: black'] then
add_to_chat(122,'Error: Addendum: Black is already active.')
elseif buffactive['light arts'] or buffactive['addendum: white'] then
send_command('input /ja "Dark Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
else
send_command('input /ja "Dark Arts" <me>')
end
elseif buffactive['light arts'] or buffactive['addendum: white'] then
if strategem == 'cost' then
send_command('@input /ja Penury <me>')
elseif strategem == 'speed' then
send_command('@input /ja Celerity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Accession <me>')
elseif strategem == 'power' then
send_command('@input /ja Rapture <me>')
elseif strategem == 'duration' then
send_command('@input /ja Perpetuance <me>')
elseif strategem == 'accuracy' then
send_command('@input /ja Altruism <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Tranquility <me>')
elseif strategem == 'skillchain' then
add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: White" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
if strategem == 'cost' then
send_command('@input /ja Parsimony <me>')
elseif strategem == 'speed' then
send_command('@input /ja Alacrity <me>')
elseif strategem == 'aoe' then
send_command('@input /ja Manifestation <me>')
elseif strategem == 'power' then
send_command('@input /ja Ebullience <me>')
elseif strategem == 'duration' then
add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
elseif strategem == 'accuracy' then
send_command('@input /ja Focalization <me>')
elseif strategem == 'enmity' then
send_command('@input /ja Equanimity <me>')
elseif strategem == 'skillchain' then
send_command('@input /ja Immanence <me>')
elseif strategem == 'addendum' then
send_command('@input /ja "Addendum: Black" <me>')
else
add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
end
else
add_to_chat(123,'No arts has been activated yet.')
end
end
function get_current_strategem_count()
local allRecasts = windower.ffxi.get_ability_recasts()
local stratsRecast = allRecasts[231]
local maxStrategems = math.floor(player.main_job_level + 10) / 20
local fullRechargeTime = 5*33
local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
return currentCharges
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
if player.sub_job == 'RDM' then
set_macro_page(1, 4)
elseif player.sub_job == 'BLM' then
set_macro_page(1, 8)
elseif player.sub_job == 'WHM' then
set_macro_page(2, 8)
end
end
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-10-02 10:17:03
This is best thing I could think of.
Code function job_handle_equipping_gear(playerStatus, eventArgs)
if playerStatus=='Engaged' and state.OffenseMode.value=='None' then
equip(get_idle_set())
eventArgs.handled = true
end
end
[+]
Server: Asura
Game: FFXI
Posts: 1326
By Asura.Azagarth 2016-10-04 01:56:35
I am having issue, my metsu set is not loading the left ramuh ring. I am not seeing why, it loads the set up until that ring. Please if anyone can debugg the why for me, it would greatly help.
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-- Want to Add ************************************************
-- Cure potency recieved+ auto activate when cure spell cast on me
-- holy water gear change when item is used
-- March from trust cycle/toggle for haste values (currently all march are considered to be ghrn)
-- cp mantle lock when manually put on (not a toggle)
-- Auto user set to equip when slept/terro/stunned/etc
-- ammo toggle disable for parties
-- That cool cor roll chat thing I see so many using
-- echo chat for elemental ninjitsu resist rates down
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- This is my file to add in my augmented gear
include('Include/AugmentedGear.lua')
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.Buff.Migawari = buffactive.migawari or false
state.Buff.Doom = buffactive.doom or false
state.Buff.Yonin = buffactive.Yonin or false
state.Buff.Innin = buffactive.Innin or false
state.Buff.Futae = buffactive.Futae or false
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.HasteMode = M{['description']='Haste Mode', 'Normal', 'Hi'}
state.OffenseMode:options('Normal', 'Acc', 'HighAcc')
state.HybridMode:options('Normal', 'Evasion', 'PDT')
state.WeaponskillMode:options('Normal', 'Acc')
state.CastingMode:options( 'MAB', 'Normal')
state.PhysicalDefenseMode:options('PDT', 'MDT')
gear.MovementFeet = {name="Hachiya Kyahan +1"}
gear.DayFeet = "Rao sune-ate"
gear.NightFeet = "Hachiya Kyahan +1"
determine_haste_group()
select_movement_feet()
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Precast sets
--------------------------------------
Andartia={}
Andartia.MAB={ name="Andartia's Mantle", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','"Mag.Atk.Bns."+10',}}
Andartia.DA= { name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}}
Andartia.WSD={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%',}}
Andartia.FC= { name="Andartia's Mantle", augments={'"Fast Cast"+10',}}
-- add here to the ws list those you want moonshade on when less than 3000tp
moonshade_WS = S{"Blade: Ten", "Blade: Hi"}
-- Precast sets to enhance JAs
sets.precast.JA['Mijin Gakure'] = {legs="Mochizuki Hakama"}
sets.precast.JA['Futae'] = {Hands="Hattori Tekko +1"}
sets.precast.JA['Sange'] = {legs="Mochizuki Chainmail +1"}
-- Waltz set (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 = {neck="Yarak Torque"}
sets.precast.Flourish1 = {hands=HercHands.TH,waist="Chaac Belt"}
-- Fast cast sets for spells
sets.precast.FC = {
ammo="Staunch Tathlum",
head=HercHead.TA,
body="Foppish Tunica",
hands="Leyline Gloves",
legs=HercLegs.FC,
feet=HercFeet.FC,
neck="Willpower Torque",
waist="Druid's Rope",
left_ear="Halasz Earring",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back=Andartia.FC,}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {
neck="Magoraga Beads",
body="Mochi. Chainmail +1",})
-- Snapshot for ranged
sets.precast.RA = {}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
ammo="Seething bomblet",
head=HercHead.TA,
body=HercBody.WSD,
hands=HercHands.WSD,
legs="Hiza. Hizayoroi +1",
feet=HercFeet.WSD,
neck="Fotia Gorget",
waist="Windbuffet Belt +1",
left_ear="Brutal Earring",
right_ear="Cessance Earring",
left_ring="Epona's Ring",
right_ring="Apate Ring",
back=Andartia.WSD}
sets.precast.WS.Acc = set_combine(sets.precast.WS, {
ammo="Seething bomblet",
head=HercHead.ACC,
body=HercBody.WSD,
hands=HercHands.ACC,
legs="Hiza. Hizayoroi +1",
feet=HercFeet.DW,
neck="Fotia Gorget",
waist="Grunfeld Belt",
left_ear="Telos Earring",
right_ear="Cessance Earring",
left_ring="Epona's Ring",
right_ring="Apate Ring",
back=Andartia.WSD})
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Blade: Ten'] = set_combine(sets.precast.WS,{
ammo="Seething bomblet",
head="Lilitu headpiece",
neck="Caro necklace",
hands=HercHands.WSD,
waist="Grunfeld rope",
body=HercBody.WSD,
legs="Hiza. Hizayoroi +1",
feet=HercFeet.WSD,
left_ear="Mache Earring",
left_ring="Ifrit Ring +1",
right_ring="Ifrit Ring +1"})
sets.precast.WS['Blade: Shun'] = set_combine(sets.precast.WS, {
head="Lilitu headpiece",
body="Adhemar Jacket",
hands=HercHands.ACC,
legs="Samnuha tights",
feet=HercFeet.DW,
waist="Thunder belt",
back=Andartia.DA,
right_ring="Ramuh Ring"})
sets.precast.WS['Blade: Metsu'] = set_combine(sets.precast.WS, {
ammo="Jukukik feather",
head="Lilitu headpiece",
neck="Caro necklace",
body=HercBody.WSD,
hands=HercHands.WSD,
legs="Samnuha tights",
left_ear="Telos Earring",
right_ear="Mache Earring",
feet=HercFeet.WSD,
waist="Grunfeld rope",
right_ring="Ramuh Ring",
left_ring="Ramuh Ring",})
sets.precast.WS['Blade: Hi'] = set_combine(sets.precast.WS, {
ammo="Yetshila",
head="Adhemar Bonnet",
body="Abnoba Kaftan",
hands="Ryuo Tekko",
legs=HercLegs.CRIT,
feet=HercFeet.CRIT,
waist="Windbuffet Belt +1",
left_ear="Brutal Earring",
right_ear="Cessance Earring",
left_ring="Epona's Ring",
right_ring="Begrudging Ring",
back=Andartia.WSD})
--------------------------------------
-- Midcast sets
--------------------------------------
sets.midcast.SelfNinjutsu = {
ammo="Staunch Tathlum",
head="Hachiya hatsuburi +1",
body="Foppish Tunica",
hands="Rawhide Gloves",
legs=HercLegs.FC,
feet="Mochi. Kyahan +1",
neck="Willpower Torque",
waist="Druid's Rope",
left_ear="Stealth Earring",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Evanescence Ring",
back=Andartia.FC,}
-- w/0 shigi ichi 52, ni 58, san 62
-- w/ shigi ichi 36, ni 48, san 56
sets.midcast.Utsusemi = set_combine(sets.midcast.SelfNinjutsu, {
ammo="Staunch Tathlum",
head=HercHead.TA,
body="Foppish Tunica",
hands="Leyline Gloves",
legs=HercLegs.FC,
neck="Willpower Torque",
waist="Druid's Rope",
left_ear="Halasz Earring",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
feet="Hattori Kyahan",
back=Andartia.FC})
sets.midcast.ElementalNinjutsu = {
ammo="Pemphredo Tathlum",
head=HercHead.MAB,
body="Samnuha coat",
Hands="Leyline gloves",
legs="Gyve Trousers",
feet=HercFeet.MAB,
neck="Sanctity necklace",
waist="Eschan Stone",
left_ear="Friomisi Earring", right_ear="Hecate's Earring",
left_ring="Stikini Ring", right_ring="Stikini Ring",
back=Andartia.MAB,}
-- MBD caps at 40% , unknown as of what cap on MABII is
sets.midcast.ElementalNinjutsu.MAB = set_combine(sets.midcast.ElementalNinjutsu, {
legs=HercLegs.MAB,
feet=HercFeet.MBD,
right_ear="Static Earring",
left_ring="Locus Ring",
right_ring="Mujin Band",})
sets.midcast.NinjutsuDebuff = {
ammo="Pemphredo Tathlum",
head="Hachi. Hatsu. +1",
body="Samnuha coat",
hands=HercHands.MACC,
legs=HercLegs.MAB,
feet=HercFeet.MAB,
neck="Sanctity Necklace",
waist="Eschan Stone",
left_ear="Stealth Earring", right_ear="Ninjutsu Earring",
left_ring="Stikini Ring", right_ring="Stikini Ring",
back=Andartia.MAB,}
sets.midcast.NinjutsuBuff = {
ammo="Staunch Tathlum",
head="Hachiya hatsuburi +1",
body="Foppish Tunica",
hands="Rawhide Gloves",
legs="Wukong's Haka. +1",
feet="Mochi. Kyahan +1",
neck="Ninjutsu Torque",
waist="Cimmerian Rope",
left_ear="Stealth Earring",
right_ear="Ninjutsu Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",
back=Andartia.FC,}
sets.midcast.RA = {}
--------------------------------------
-- Idle/resting/defense/etc sets
--------------------------------------
-- Resting sets
sets.resting = {
ammo="Staunch Tathlum",
head="Rao kabuto",
body="Hizamaru haramaki +1",
hands="Rao kote",
legs="Rao Haidate",
feet=gear.MovementFeet,
neck="Sanctity necklace",
waist="Flume Belt",
left_ear="Infused Earring", right_ear="Genmei Earring",
left_ring="Shneddick Ring",
right_ring="Defending Ring",
back="Shadow mantle"}
-- Idle sets
sets.idle = {
ammo="Staunch Tathlum",
head="Rao kabuto",
body="Hizamaru haramaki +1",
hands="Rao kote",
legs="Rao Haidate",
feet=gear.MovementFeet,
neck="Sanctity necklace",
waist="Flume Belt",
left_ear="Infused Earring", right_ear="Genmei Earring",
left_ring="Shneddick Ring",
right_ring="Defending Ring",
back="Shadow mantle"}
sets.idle.Town = {
ammo="Pemphredo Tathlum",
head="Skormoth mask",
body="Hizamaru haramaki +1",
hands="Ryuo Tekko",
legs="Gyve Trousers",
feet=gear.MovementFeet,
neck="Sanctity necklace",
waist="Gishdubar sash",
left_ear="Telos Earring", right_ear="Genmei Earring",
left_ring="Shneddick Ring",
right_ring="Defending Ring",
back="Solemnity cape"}
sets.idle.Weak = {
ammo="Staunch Tathlum",
head="Genmei kabuto",
body="Hizamaru haramaki +1",
hands="Rao kote",
legs="Hiza. Hizayoroi +1",
feet=gear.MovementFeet,
neck="Sanctity necklace",
waist="Eschan Stone",
left_ear="Infused Earring", right_ear="Eabani Earring",
left_ring="Meridian Ring",
right_ring="Defending Ring",
back="Agema Cape"}
-- Defense sets
sets.defense.Evasion = {neck="Yarak Torque", back="Yokaze Mantle"}
sets.defense.PDT = {
ammo="Staunch Tathlum",
head="Genmei kabuto",
body="Emet Harness +1",
hands=HercHands.DT,
legs=HercLegs.DT,
feet=HercFeet.DT,
neck="Loricate Torque",
waist="Flume Belt",
left_ear="Genmei Earring",
right_ear="Eabani Earring",
left_ring="Shadow Ring",
right_ring="Defending Ring",
back="Shadow mantle",}
sets.defense.MDT = {
ammo="Togakushi Shuriken",
head="Dampening Tam",
body="Hiza. Haramaki +1",
hands="Floral Gauntlets",
legs=HercLegs.DT,
feet=HercFeet.DT,
neck="Loricate Torque",
waist="Flume Belt",
left_ear="Brutal Earring",
right_ear="Static Earring",
left_ring="Shadow Ring",
right_ring="Defending Ring",
back="Solemnity Cape",}
sets.Kiting = {left_ring="Shneddick Ring",feet=gear.MovementFeet}
---------------------------------------------------------------------------------
-- Engaged sets (Shigi) Normal acc high acc
-- 37-39 DW no haste 1151 1172 1201
-- 31 dw 15% 1163 1180 1217
-- 19 dw 30% 1172 1181 1249
-- 13 dw 35% ? ? ?
-- 0 DW max 1165 1184 1264
--My goal is to have 1165~ base acc (no buffs) on each haste lv for normal
--this allows me to eat bream sushi and be at around 1245 acc 1265 sublime
--which is good enough for almost all events and allows kanaria
--to be used for superior dps and maintaining 1200/1220 acc with my current augs
--this will cap your hit rate at Apex, and most mobs up to 130.
--the acc set is aimed more at when I am using red curry OR when I am messing
--around and dont want to use food OR when im /rdm on apex to nuke and use
--macc/mab food instead (with ionis your at 1200).
--high acc take into acccout my playtyle. Normally I will be maxed haste for 2 reasons
-- 1st is I am solo with ulima+koru and using red curry or another non-acc food
--so 1260 is the highest I could ever imagine needing, and will normally be at normal.
--2nd is that I am in a zerg with LS on very high end mobs 145+ at which point
--the goal is to be at 1450 pre party buffs which I hit with sublime+vorseals+innin
----------------------------------------------------------------------------------------
-- Normal melee group 39DW
sets.engaged = {
ammo="Seki Shuriken",
head="Ryuo somen",
body="Adhemar Jacket",
hands="Floral gauntlets",
legs="Samnuha tights",
feet="Hiza. Sune-Ate +1",
neck="Erudition necklace",
waist="Patentia sash",
left_ear="Eabani Earring", right_ear="Suppanomimi",
left_ring="Epona's Ring", right_ring="Petrov Ring",
back=Andartia.DA}
sets.engaged.Acc = set_combine(sets.engaged, {
ammo="Togakushi Shuriken",
neck="Yarak Torque",
right_ring="Cacoethic Ring",})
sets.engaged.HighAcc = set_combine(sets.engaged.ACC, {
legs=HercLegs.DW,
left_ear="Telos Earring",
left_ring="Etana Ring",})
-- I dont use
sets.engaged.Evasion = {}
sets.engaged.Acc.Evasion = {}
sets.engaged.PDT = {}
sets.engaged.Acc.PDT = {}
-- 15% melee group 31 DW
sets.engaged.Haste_15 = {
ammo="Seki Shuriken",
head="Ryuo somen",
body="Adhemar Jacket",
hands="Floral gauntlets",
legs="Samnuha tights",
feet="Hiza. Sune-Ate +1",
neck="Erudition necklace",
waist="Windbuffet Belt +1",
left_ear="Brutal Earring", right_ear="Suppanomimi",
left_ring="Epona's Ring", right_ring="Petrov Ring",
back=Andartia.DA}
sets.engaged.Acc.Haste_15 = set_combine(sets.engaged.Haste_15, {
ammo="Togakushi Shuriken",
waist="Patentia sash",
left_ear="Cessance Earring",
neck="Yarak Torque",
right_ear="Telos Earring",})
sets.engaged.HighAcc.Haste_15 = set_combine(sets.engaged.Acc.Haste_15,{
legs=HercLegs.ACC,
right_ring="Cacoethic Ring",
left_ring="Etana Ring",})
-- I dont use
sets.engaged.Evasion.Haste_15 = {}
sets.engaged.Acc.Evasion.Haste_15 = {}
sets.engaged.PDT.Haste_15 = {}
sets.engaged.Acc.PDT.Haste_15 = {}
-- Custom melee group: 30% Haste (~20% DW) ~ 19
sets.engaged.Haste_30 = {
ammo="Seki Shuriken",
head="Ryuo somen",
body="Adhemar Jacket",
hands=HercHands.TA,
legs="Samnuha tights",
feet=HercFeet.TA,
neck="Erudition necklace",
waist="Windbuffet Belt +1",
left_ear="Brutal Earring", right_ear="Suppanomimi",
left_ring="Epona's Ring", right_ring="Petrov Ring",
back=Andartia.DA}
sets.engaged.Acc.Haste_30 = set_combine(sets.engaged.Haste_30,{
ammo="Togakushi Shuriken",
neck="Yarak Torque",
left_ear="Cessance Earring",})
sets.engaged.HighAcc.Haste_30 = set_combine(sets.engaged.Acc.Haste_30,{
hands=HercHands.ACC,
legs=HercLegs.ACC,
waist="Kentarch belt +1",
left_ear="Telos Earring",
right_ring="Cacoethic Ring",
left_ring="Etana Ring",})
-- I dont use
sets.engaged.Evasion.Haste_30 = {}
sets.engaged.Acc.Evasion.Haste_30 = {}
sets.engaged.PDT.Haste_30 = {}
sets.engaged.Acc.PDT.Haste_30 = {}
-- Custom melee group 35%: 13 DW Rarely used set if ever
sets.engaged.Haste_35 = {
ammo="Seki Shuriken",
head="Ryuo somen",
body="Adhemar Jacket",
hands=HercHands.TA,
legs="Samnuha tights",
feet=HercFeet.TA,
neck="Erudition necklace",
waist="Windbuffet Belt +1",
left_ear="Brutal Earring", right_ear="Cessance Earring",
left_ring="Epona's Ring", right_ring="Petrov Ring",
back=Andartia.DA}
sets.engaged.HighAcc.Haste_35 = set_combine(sets.engaged.Haste_35,{
ammo="Togakushi Shuriken",
neck="Yarak Torque",
right_ear="Telos Earring",})
sets.engaged.Acc.Haste_35= set_combine(sets.engaged.Acc.Haste_35,{
hands=HercHands.ACC,
legs=HercLegs.ACC,
waist="Kentarch belt +1",
right_ring="Cacoethic Ring",})
-- I dont use
sets.engaged.Evasion.Haste_35 = {}
sets.engaged.Acc.Evasion.Haste_35 = {}
sets.engaged.PDT.Haste_35 = {}
sets.engaged.Acc.PDT.Haste_35 = {}
-- Custom melee group: Max Haste (0% DW)
sets.engaged.MaxHaste = {
ammo="Seki Shuriken",
head="Adhemar bonnet",
body=HercBody.CRIT,
hands=HercHands.TA,
legs="Samnuha tights",
feet=HercFeet.TA,
neck="Erudition necklace",
waist="Windbuffet Belt +1",
left_ear="Telos Earring", right_ear="Cessance earring",
left_ring="Epona's Ring", right_ring="Petrov Ring",
back=Andartia.DA}
sets.engaged.Acc.MaxHaste = set_combine(sets.engaged.MaxHaste,{
ammo="Togakushi Shuriken",
head=HercHead.TA,})
sets.engaged.HighAcc.MaxHaste = set_combine(sets.engaged.Acc.MaxHaste,{
head=HercHead.ACC,
hands=HercHands.ACC,
legs=HercLegs.ACC,
feet=HercFeet.TA,
neck="Yarak Torque",
waist="Kentarch Belt +1",
right_ring="Cacoethic Ring",
left_ring="Etana Ring",})
-- I dont use
sets.engaged.Evasion.MaxHaste = {}
sets.engaged.Acc.Evasion.MaxHaste = {}
sets.engaged.PDT.MaxHaste = {}
sets.engaged.Acc.PDT.MaxHaste = {}
--------------------------------------
-- Custom buff sets
--------------------------------------
sets.buff.Migawari = {} -- add your emp body if you want the extra % (I dont like it)
sets.buff.Doom = {waist="Gishdubar sash",ring1="Saida Ring",ring2="Saida Ring"}
sets.buff.Yonin = {}
sets.buff.Innin = {}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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 not spell.interrupted and spell.english == "Migawari: Ichi" then
state.Buff.Migawari = true
end
end
ninjaTools = {
Utsusemi = S{"Shihei",},--"Shikanofuda"
Hojo = S{"Kaginawa",},--"Chonofuda"
Migawari = S{"Mokujin",},
Kakka = S{"Ryuno",},
Tonko = S{"Shinobi-tabi",},
Kurayami = S{"Sairui",},
Raiton = S{"Hiraishin",},
Hyoton = S{"Tsurara",},
Monomi = S{"Sanjaku",},
}
function job_precast(spell, action, spellMap, eventArgs)
if spell.type=="Ninjutsu" then check_tools(spell) end
end
function check_tools(spell)
for prefix,tools in pairs(ninjaTools) do
if spell.english:startswith(prefix) then
for tool in tools:it() do
if not player.inventory[tool] then
add_to_chat(100,'WARNING: You are out of '..tool..'.')
elseif player.inventory[tool].count < 10 then
add_to_chat(100,'WARNING: You are low on '..tool..'. '..player.inventory[tool].count..' remaining.')
end
end
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
function job_buff_change(buff, gain)
if S{'haste', 'march', 'mighty guard', 'embrava', 'haste samba', 'geo-haste', 'indi-haste'}:contains(buff:lower()) then
determine_haste_group()
handle_equipping_gear(player.status)
elseif state.Buff[buff] ~= nil then
handle_equipping_gear(player.status)
end
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 buff:lower()=='Reive Mark' then
if gain then
equip({neck="Adoulin's Refuge +1"}) disable('neck')
else
enable('neck')
end
end
end
function job_status_change(new_status, old_status)
if new_status == 'Idle' then
select_movement_feet()
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Get custom spell maps
function job_get_spell_map(spell, default_spell_map)
if spell.skill == "Ninjutsu" then
if not default_spell_map then
if spell.target.type == 'SELF' then
return 'NinjutsuBuff'
else
return 'NinjutsuDebuff'
end
end
end
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if state.Buff.Migawari then
idleSet = set_combine(idleSet, sets.buff.Migawari)
end
if state.Buff.Doom then
idleSet = set_combine(idleSet, sets.buff.Doom)
end
if S{"Eastern Adoulin","Western Adoulin"}:contains(world.area) then
idleSet = set_combine(idleSet,{body="Councilor's Garb"})
end
return idleSet
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if state.Buff.Migawari then
meleeSet = set_combine(meleeSet, sets.buff.Migawari)
end
if state.Buff.Doom then
meleeSet = set_combine(meleeSet, sets.buff.Doom)
end
return meleeSet
end
-- Called by the default 'update' self-command.
function job_update(cmdParams, eventArgs)
select_movement_feet()
determine_haste_group()
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function determine_haste_group()
classes.CustomMeleeGroups:clear()
-- assuming +4 for marches (ghorn has +5)
-- Haste (white magic) 15%
-- Haste Samba (Sub) 5%
-- Haste (Merited DNC) 10% (never account for this)
-- Victory March +0/+3/+4/+5 9.4/14%/15.6%/17.1% +0
-- Advancing March +0/+3/+4/+5 6.3/10.9%/12.5%/14% +0
-- Embrava 30% with 500 enhancing skill
-- Mighty Guard - 15%
-- buffactive[580] = geo haste
-- buffactive[33] = regular haste
-- buffactive[604] = mighty guard
-- state.HasteMode = toggle for when you know Haste II is being cast on you
-- Hi = Haste II is being cast. This is clunky to use when both haste II and haste I are being cast
if state.HasteMode.value == 'Hi' then
if ( ( (buffactive[33] or buffactive[580] or buffactive.embrava) and (buffactive.march or buffactive[604]) ) or
( buffactive[33] and (buffactive[580] or buffactive.embrava) ) or
( buffactive.march == 2 and buffactive[604] ) ) then
add_to_chat(8, '-------------Max-Haste Mode Enabled--------------')
classes.CustomMeleeGroups:append('MaxHaste')
elseif ( (buffactive[33] or buffactive.march == 2 or buffactive[580]) and buffactive['haste samba'] ) then
add_to_chat(8, '-------------Haste 35%-------------')
classes.CustomMeleeGroups:append('Haste_35')
elseif ( ( buffactive[580] or buffactive[33] or buffactive.march == 2 ) or
( buffactive.march == 1 and buffactive[604] ) ) then
add_to_chat(8, '-------------Haste 30%-------------')
classes.CustomMeleeGroups:append('Haste_30')
elseif ( buffactive.march == 1 or buffactive[604] ) then
add_to_chat(8, '-------------Haste 15%-------------')
classes.CustomMeleeGroups:append('Haste_15')
end
else
if ( buffactive[580] and ( buffactive.march or buffactive[33] or buffactive.embrava or buffactive[604]) ) or -- geo haste + anything
( buffactive.embrava and (buffactive.march or buffactive[33] or buffactive[604]) ) or -- embrava + anything
( buffactive.march == 2 and (buffactive[33] or buffactive[604]) ) or -- two marches + anything
( buffactive[33] and buffactive[604] and buffactive.march ) then -- haste + mighty guard + any marches
add_to_chat(8, '-------------Max Haste Mode Enabled--------------')
classes.CustomMeleeGroups:append('MaxHaste')
elseif ( (buffactive[604] or buffactive[33]) and buffactive['haste samba'] and buffactive.march == 1) or -- MG or haste + samba with 1 march
( buffactive.march == 2 and buffactive['haste samba'] ) or
( buffactive[580] and buffactive['haste samba'] ) then
add_to_chat(8, '-------------Haste 35%-------------')
classes.CustomMeleeGroups:append('Haste_35')
elseif ( buffactive.march == 2 ) or -- two marches from ghorn
( (buffactive[33] or buffactive[604]) and buffactive.march == 1 ) or -- MG or haste + 1 march
( buffactive[580] ) or -- geo haste
( buffactive[33] and buffactive[604] ) then -- haste with MG
add_to_chat(8, '-------------Haste 30%-------------')
classes.CustomMeleeGroups:append('Haste_30')
elseif buffactive[33] or buffactive[604] or buffactive.march == 1 then
add_to_chat(8, '-------------Haste 15%-------------')
classes.CustomMeleeGroups:append('Haste_15')
end
end
end
function select_movement_feet()
if world.time >= 17*60 or world.time < 7*60 then
gear.MovementFeet.name = gear.NightFeet
else
gear.MovementFeet.name = gear.DayFeet
end
end
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.type == 'WeaponSkill' then
if world.time >= 17*60 or world.time < 7*60 then
equip({ear1="Lugra Earring +1", ear2="Lugra Earring"})
end
end
if spell.type=='WeaponSkill' then
if moonshade_WS:contains(spell.english) and player.tp<2850 then
equip({ear2="Moonshade Earring"})
end
end
if spell.action_type=="Magic" and buffactive.Silence then
eventArgs.cancel = true
send_command('input /item "Echo Drops" <me>')
end
if spellMap == 'ElementalNinjutsu' then
if spell.english:contains(': San') then
equip({feet="Mochi. Kyahan +1"})
end
end
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spellMap == 'ElementalNinjutsu' then
if spell.english:contains(': San') then
equip({head="Mochi. Hatsuburi +1"})
end
if spell.element == world.day_element or spell.element == world.weather_element then
equip({waist="Hachirin-no-Obi"})
end
if state.Buff.Futae then
equip(sets.precast.JA['Futae'])
end
if state.Buff.Doom then
equip(sets.buff.Doom)
end
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(2, 4)
elseif player.sub_job == 'RUN' then
set_macro_page(3, 4)
elseif player.sub_job == 'RDM' then
set_macro_page(4, 4)
else
set_macro_page(1, 4)
end
end
Server: Asura
Game: FFXI
Posts: 127
By Asura.Brennski 2016-10-04 02:18:04
I think GearSwap sometimes has trouble if you have two of the same named item next to each other, try putting right_ring at top of the set and left_ring at the bottom for example.
Server: Asura
Game: FFXI
Posts: 1326
By Asura.Azagarth 2016-10-04 02:19:56
Going to give that a try, if you dont hear from me you know it worked!
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-10-04 03:25:33
I can't reproduce the issue using your GS, but maybe if you can add some specifics.
The only issue I know with rings is if you're already wearing one of the rings, Gearswap will cancel equipping both rings. I could've sworn I reported this to Byrth years ago, but I can't find it so I must've not submitted after all... I looked just now and the issue appears to be when it gets rid of "redundancies," canceling gear if it determines that same piece is currently equipped; this is because it's selecting the same exact item (by ID) for both rings, which is the real problem. I'll take another look tomorrow and see if I can think of something to fix that.
But that doesn't seem to be your problem since I don't see Ramuh Ring in any other sets, so I assume you don't already have it equipped?
Note that the order that you put elements in a table has no effect on anything, specifically because of the way tables work. But you could try assigning different priorities. i.e. ring1={name="Ramuh's ring",priority=16}; items with higher priority are equipped first. I assume this won't fix it.
Server: Odin
Game: FFXI
Posts: 42
By Odin.Psycooo 2016-10-07 21:00:35
Is there a way to toggle enmity gear for cure sets kinda like magic burst sets? I have been trying to get it set up but it seems my standard cure sets overrides my enmity set
Edit: neither of my toggles are working on one lua, but work fine on the other
I have
Code state.MagicBurst = M(false, 'Magic Burst')
state.CureHate = M(false, 'Cure Hate')
send_command('bind !` gs c toggle MagicBurst')
send_command('bind ^` gs c toggle CureHate')
sets.magic_burst = {}
sets.cure_hate = {}
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
end
if spell.skill == 'Elemental Magic' and spell.element == world.day_element or spell.element == world.weather_element then
equip ({waist="Hachirin-no-Obi"})
end
end
I also tried various forms of Code
if spell.skill == 'Healing Magic' then
if state.CureHate.value then
equip(sets.magic_burst)
end
end
Also tried swapping 'Healing Magic" for 'Cure' Cure Curaga etc
It says it will toggle, but the gear is not using the correct gearsets, but for some reason the magic burst rule is identical in my sch lua and works fine.
Here is a bare version of my lua 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()
state.Buff.Saboteur = buffactive.saboteur or false
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('Normal' , 'HasteCap' , 'SingleWield' , 'MidAcc', 'HiAcc')
state.HybridMode:options('Normal', 'PhysicalDef', 'MagicalDef')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT', 'MDT')
select_default_macro_book()
gear.CureStaff = {name=""}
gear.CureFeet = {name=""}
state.MagicBurst = M(false, 'Magic Burst')
state.CureHate = M(false, 'Cure Hate')
send_command('bind !` gs c toggle MagicBurst')
send_command('bind ^` gs c toggle CureHate')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Chainspell'] = {body=""}
-- Waltz set (chr and vit)
sets.precast.Waltz = {}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Fast cast sets for spells
-- 80% Fast Cast (including trait) for all spells, plus 5% quick cast
-- No other FC sets necessary.
sets.precast.FC = {}
sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty,body=""})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {}
sets.precast.WS['Circle Blade'] = {}
sets.precast.WS['Sanguine Blade'] = {}
sets.precast.WS['Requiescat'] = {}
sets.precast.WS['Aeolian Edge'] = {}
sets.precast.WS['Savage Blade'] = {}
sets.precast.WS['Chant du Cygne'] = {}
sets.precast.WS['True Strike'] = {}
sets.precast.WS['Exenterator'] = {}
sets.precast.WS['Evisceration'] = {}
sets.precast.WS['Death Blossom'] = {}
-- Midcast Sets
sets.midcast.Cure = {}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.CureWeather = {}
sets.midcast.CureSelf = {}
sets.midcast.CureMelee = {}
sets.midcast['Enhancing Magic'] = {}
sets.midcast['Enhancing Magic'].Temper = {}
sets.midcast['Enhancing Magic'].RegenSelf = {}
sets.midcast['Enhancing Magic'].RefreshSelf = {}
sets.midcast['Enhancing Magic'].HasteSelf = {}
sets.midcast['Enhancing Magic'].EnSpells = set_combine(sets.midcast['Enhancing Magic'],{)
sets.midcast['Enhancing Magic'].GainSpells = set_combine(sets.midcast['Enhancing Magic'],{)
sets.midcast['Enhancing Magic'].BarSpells = set_combine(sets.midcast['Enhancing Magic'],{)
sets.buff.ComposureOther = {}
sets.midcast.Protect = {}
sets.midcast.Shell = sets.midcast.Protect
sets.midcast['Enhancing Magic'].Phalanx = {}
sets.midcast.Cursna = {}
sets.midcast.Stoneskin = {}
sets.midcast['Enfeebling Magic'] = {}
sets.midcast.MndEnfeebles = {}
sets.midcast.IntEnfeebles = {}
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast.Distract = {}
sets.midcast.Frazzle = {}
sets.midcast['Distract II'] = sets.midcast.Distract
sets.midcast['Distract III'] = sets.midcast.Distract
sets.midcast['Frazzle II'] = {}
sets.midcast['Frazzle III'] = sets.midcast.Frazzle
sets.midcast['Dia III'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau +1"})
sets.midcast['Slow II'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau +1"})
sets.midcast['Elemental Magic'] ={}
sets.midcast['Elemental Magic']['Low'] = {}
sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
sets.midcast['Stun'] = {}
sets.midcast.Drain = {}
sets.midcast.Aspir = sets.midcast.Drain
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {}
-- Idle sets
sets.idle = {}
sets.idle.Town = {}
sets.idle.Weak = {}
-- Defense sets
sets.defense.PDT = {}
sets.defense.MDT = {}
sets.Kiting = {legs=""}
sets.latent_refresh = {waist=""}
-- 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 = {}
sets.engaged.HasteCap = {}
sets.engaged.SingleWield = {}
sets.engaged.MidAcc = {}
sets.engaged.HiAcc = {}
sets.magic_burst = {}
sets.cure_hate = {}
-- Sets for special buff conditions on spells.
sets.buff.Saboteur = {hands="Lethargy Gantherots +1"}
end
LowNukes = S{'Stone' , 'Aero' , 'Blizzard' , 'Fire' , 'Water' , 'Thunder' ,
'Stone II' , 'Aero II' , 'Blizzard II' , 'Fire II' , 'Water II' , 'Thunder II',
'Stonega' , 'Aeroga' , 'Blizzaga' , 'Firaga' , 'Waterga' , 'Thundaga',
'Stonega II' , 'Aeroga II' , 'Blizzaga II' , 'Firaga II' , 'Waterga II' , 'Thundaga II'}
MndEnfeebles = S{'Slow' , 'Silence' , 'Paralyze' , 'Addle' , 'Slow II' , 'Paralyze II' , 'Addle II'}
IntEnfeebles = S{'Bind' , 'Blind', 'Break' , 'Gravity' , 'Poison' , 'Sleep' , 'Gravity II' , 'Poison II' , 'Sleep II'}
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_precast(spell, action, spellMap, eventArgs)
if spell.skill == 'Healing Magic' and spellMap ~= 'StatusRemoval' then
gear.CureFeet.name = ""
if player.status == 'Engaged' then
gear.default.obi_back = ""
if spell.target.type == 'SELF' then
gear.CureFeet.name = ""
else
gear.CureFeet.name = ""
end
else
gear.default.obi_back = ""
end
if spell.target.type == 'SELF' then
gear.default.obi_waist = ""
else
gear.default.obi_waist = ""
end
if world.weather_element == 'Light' then
gear.CureStaff.name = ""
else
gear.CureStaff.name = ""
end
else
gear.default.obi_waist = ""
gear.default.obi_back = ""
end
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
end
if spell.skill == 'Elemental Magic' and spell.element == world.day_element or spell.element == world.weather_element then
equip ({waist=""})
end
end
-- Run after the default 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 spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
equip(sets.buff.Saboteur)
elseif spell.skill == 'Enhancing Magic' and not spell.english == 'Stoneskin' then
equip(sets.midcast.EnhancingDuration)
if buffactive.composure and spell.target.type == 'PLAYER' then
equip(sets.buff.ComposureOther)
end
elseif spellMap == 'Cure' then
if spell.target.type == 'SELF' then
equip(sets.midcast.CureSelf)
end
if world.weather_element == 'Light' then
equip(sets.midcast.CureWeather)
end
end
if spell.skill == "Ninjutsu" then
equip(sets.midcast.Recast)
if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' then
if buffactive['Copy Image'] then
windower.ffxi.cancel_buff(66)
elseif buffactive['Copy Image (2)'] then
windower.ffxi.cancel_buff(444)
elseif buffactive['Copy Image (3)'] then
windower.ffxi.cancel_buff(445)
elseif buffactive['Copy Image (4+)'] then
windower.ffxi.cancel_buff(446)
end
elseif spell.name == 'Monomi: Ichi' and buffactive.Sneak and spell.target.type == 'SELF' then
windower.ffxi.cancel_buff(71)
end
end
end
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if spell.skill == 'Enhancing Magic' then
if spell.english:startswith('En') then
return 'EnSpells'
elseif spell.english:startswith('Gain') then
return 'GainSpells'
elseif spell.english:startswith('Phalanx') then
return 'Phalanx'
elseif spell.english:startswith('Bar') then
return 'Bar'
elseif spell.english:startswith('Temper') then
return 'Temper'
elseif spell.english:startswith('Haste') then
if spell.target.type == 'SELF' then
return 'HasteSelf'
end
elseif spell.english:startswith('Refresh') then
if spell.target.type == 'SELF' then
return 'RefreshSelf'
end
end
elseif default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if player.status == 'Engaged' then
return "CureMelee"
end
end
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 == 'Elemental Magic' then
if LowNukes:contains(spell.name) then
return 'Low'
else
return
end
end
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'None' then
enable('main','sub','range')
else
disable('main','sub','range')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
function customize_melee_set(meleeSet)
if player.sub_job == 'DNC' or player.sub_job == 'NIN' then
meleeSet = set_combine(meleeSet, sets.engaged.DW)
end
return meleeSet
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- 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(2, 4)
elseif player.sub_job == 'WHM' then
set_macro_page(3, 4)
elseif player.sub_job == 'NIN' then
set_macro_page(10, 4)
elseif player.sub_job == 'THF' then
set_macro_page(4, 4)
elseif player.sub_job == 'BLM' then
set_macro_page(5, 4)
else
set_macro_page(1, 4)
end
end
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-10-07 22:20:42
You can only have one function of the same name, and you have two job_post_midcasts (one after another). You should incorporate the rules within the elseif spellMap=='Cure' then section and place it depending on the hierarchy you want. For example, if you want CureWeather to take precedence, then you should place the rules for your hate set before that.
Server: Odin
Game: FFXI
Posts: 42
By Odin.Psycooo 2016-10-08 00:55:42
K, so I tried this, and it still isn't equipping either set the magic burst or the cure hate set. It still says the toggle is there, but the gear isn't using the correct sets.
Feel so utterly confused here.
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()
state.Buff.Saboteur = buffactive.saboteur or false
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('Normal' , 'HasteCap' , 'SingleWield' , 'MidAcc', 'HiAcc')
state.HybridMode:options('Normal', 'PhysicalDef', 'MagicalDef')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT', 'MDT')
select_default_macro_book()
gear.CureStaff = {name=""}
gear.CureFeet = {name=""}
state.MagicBurst = M(false, 'Magic Burst')
state.CureHate = M(false, 'Cure Hate')
send_command('bind !` gs c toggle MagicBurst')
send_command('bind ^` gs c toggle CureHate')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Chainspell'] = {body=""}
-- Waltz set (chr and vit)
sets.precast.Waltz = {}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Fast cast sets for spells
-- 80% Fast Cast (including trait) for all spells, plus 5% quick cast
-- No other FC sets necessary.
sets.precast.FC = {}
sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty,body=""})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {}
sets.precast.WS['Circle Blade'] = {}
sets.precast.WS['Sanguine Blade'] = {}
sets.precast.WS['Requiescat'] = {}
sets.precast.WS['Aeolian Edge'] = {}
sets.precast.WS['Savage Blade'] = {}
sets.precast.WS['Chant du Cygne'] = {}
sets.precast.WS['True Strike'] = {}
sets.precast.WS['Exenterator'] = {}
sets.precast.WS['Evisceration'] = {}
sets.precast.WS['Death Blossom'] = {}
-- Midcast Sets
sets.midcast.Cure = {}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.CureWeather = {}
sets.midcast.CureSelf = {}
sets.midcast.CureMelee = {}
sets.midcast['Enhancing Magic'] = {}
sets.midcast['Enhancing Magic'].Temper = {}
sets.midcast['Enhancing Magic'].RegenSelf = {}
sets.midcast['Enhancing Magic'].RefreshSelf = {}
sets.midcast['Enhancing Magic'].HasteSelf = {}
sets.midcast['Enhancing Magic'].EnSpells = set_combine(sets.midcast['Enhancing Magic'],{)
sets.midcast['Enhancing Magic'].GainSpells = set_combine(sets.midcast['Enhancing Magic'],{)
sets.midcast['Enhancing Magic'].BarSpells = set_combine(sets.midcast['Enhancing Magic'],{)
sets.buff.ComposureOther = {}
sets.midcast.Protect = {}
sets.midcast.Shell = sets.midcast.Protect
sets.midcast['Enhancing Magic'].Phalanx = {}
sets.midcast.Cursna = {}
sets.midcast.Stoneskin = {}
sets.midcast['Enfeebling Magic'] = {}
sets.midcast.MndEnfeebles = {}
sets.midcast.IntEnfeebles = {}
sets.midcast.Blind = {}
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast.Distract = {}
sets.midcast.Frazzle = {}
sets.midcast['Distract II'] = sets.midcast.Distract
sets.midcast['Distract III'] = sets.midcast.Distract
sets.midcast['Frazzle II'] = {}
sets.midcast['Frazzle III'] = sets.midcast.Frazzle
sets.midcast['Dia III'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau +1"})
sets.midcast['Slow II'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau +1"})
sets.midcast['Elemental Magic'] ={}
sets.midcast['Elemental Magic']['Low'] = {}
sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
sets.midcast['Stun'] = {}
sets.midcast.Drain = {}
sets.midcast.Aspir = sets.midcast.Drain
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {}
-- Idle sets
sets.idle = {}
sets.idle.Town = {}
sets.idle.Weak = {}
-- Defense sets
sets.defense.PDT = {}
sets.defense.MDT = {}
sets.Kiting = {legs=""}
sets.latent_refresh = {waist=""}
-- 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 = {}
sets.engaged.HasteCap = {}
sets.engaged.SingleWield = {}
sets.engaged.MidAcc = {}
sets.engaged.HiAcc = {}
sets.magic_burst = {}
sets.cure_hate = {}
-- Sets for special buff conditions on spells.
sets.buff.Saboteur = {hands="Lethargy Gantherots +1"}
end
LowNukes = S{'Stone' , 'Aero' , 'Blizzard' , 'Fire' , 'Water' , 'Thunder' ,
'Stone II' , 'Aero II' , 'Blizzard II' , 'Fire II' , 'Water II' , 'Thunder II',
'Stonega' , 'Aeroga' , 'Blizzaga' , 'Firaga' , 'Waterga' , 'Thundaga',
'Stonega II' , 'Aeroga II' , 'Blizzaga II' , 'Firaga II' , 'Waterga II' , 'Thundaga II'}
MndEnfeebles = S{'Slow' , 'Silence' , 'Paralyze' , 'Addle' , 'Slow II' , 'Paralyze II' , 'Addle II'}
IntEnfeebles = S{'Bind' , 'Break' , 'Gravity' , 'Poison' , 'Sleep' , 'Gravity II' , 'Poison II' , 'Sleep II'}
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_precast(spell, action, spellMap, eventArgs)
if spell.skill == 'Healing Magic' and spellMap ~= 'StatusRemoval' then
gear.CureFeet.name = ""
if player.status == 'Engaged' then
gear.default.obi_back = ""
if spell.target.type == 'SELF' then
gear.CureFeet.name = ""
else
gear.CureFeet.name = ""
end
else
gear.default.obi_back = ""
end
if spell.target.type == 'SELF' then
gear.default.obi_waist = ""
else
gear.default.obi_waist = ""
end
if world.weather_element == 'Light' then
gear.CureStaff.name = ""
else
gear.CureStaff.name = ""
end
else
gear.default.obi_waist = ""
gear.default.obi_back = ""
end
end
-- Run after the default 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 spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
equip(sets.buff.Saboteur)
elseif spell.skill == 'Enhancing Magic' and not spell.english == 'Stoneskin' then
equip(sets.midcast.EnhancingDuration)
if buffactive.composure and spell.target.type == 'PLAYER' then
equip(sets.buff.ComposureOther)
end
elseif spellMap == 'Cure' then
if spell.skill == 'Healing Magic' then
if state.CureHate.value then
equip(sets.cure_hate)
end
end
if spell.target.type == 'SELF' then
equip(sets.midcast.CureSelf)
end
if world.weather_element == 'Light' then
equip(sets.midcast.CureWeather)
end
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
end
if spell.skill == 'Elemental Magic' and spell.element == world.day_element or spell.element == world.weather_element then
equip ({waist="Hachirin-no-Obi"})
end
end
if spell.skill == "Ninjutsu" then
equip(sets.midcast.Recast)
if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' then
if buffactive['Copy Image'] then
windower.ffxi.cancel_buff(66)
elseif buffactive['Copy Image (2)'] then
windower.ffxi.cancel_buff(444)
elseif buffactive['Copy Image (3)'] then
windower.ffxi.cancel_buff(445)
elseif buffactive['Copy Image (4+)'] then
windower.ffxi.cancel_buff(446)
end
elseif spell.name == 'Monomi: Ichi' and buffactive.Sneak and spell.target.type == 'SELF' then
windower.ffxi.cancel_buff(71)
end
end
end
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if spell.skill == 'Enhancing Magic' then
if spell.english:startswith('En') then
return 'EnSpells'
elseif spell.english:startswith('Gain') then
return 'GainSpells'
elseif spell.english:startswith('Phalanx') then
return 'Phalanx'
elseif spell.english:startswith('Bar') then
return 'Bar'
elseif spell.english:startswith('Temper') then
return 'Temper'
elseif spell.english:startswith('Haste') then
if spell.target.type == 'SELF' then
return 'HasteSelf'
end
elseif spell.english:startswith('Refresh') then
if spell.target.type == 'SELF' then
return 'RefreshSelf'
end
end
elseif default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if player.status == 'Engaged' then
return "CureMelee"
end
end
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 == 'Elemental Magic' then
if LowNukes:contains(spell.name) then
return 'Low'
else
return
end
end
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'None' then
enable('main','sub','range')
else
disable('main','sub','range')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
function customize_melee_set(meleeSet)
if player.sub_job == 'DNC' or player.sub_job == 'NIN' then
meleeSet = set_combine(meleeSet, sets.engaged.DW)
end
return meleeSet
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- 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(2, 4)
elseif player.sub_job == 'WHM' then
set_macro_page(3, 4)
elseif player.sub_job == 'NIN' then
set_macro_page(10, 4)
elseif player.sub_job == 'THF' then
set_macro_page(4, 4)
elseif player.sub_job == 'BLM' then
set_macro_page(5, 4)
else
set_macro_page(1, 4)
end
end
Someone want to translate this down to idiot for me?
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-10-08 01:30:46
Sorry, I thought you were only talking about getting the cure to work and you were just using the MB as a reference. You wouldn't want to put the MB rules within the spellMap=='Cure' since nukes would never be a cure (unless you're really bored on Vinipata!).
Try this. Note I put the cure hate rule after the self-target rule just in case that was what was throwing you off (so if they are both true, you'll end up in cure hate last). Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
equip(sets.buff.Saboteur)
elseif spell.skill == 'Enhancing Magic' and not spell.english == 'Stoneskin' then
equip(sets.midcast.EnhancingDuration)
if buffactive.composure and spell.target.type == 'PLAYER' then
equip(sets.buff.ComposureOther)
end
elseif spellMap == 'Cure' then
if spell.target.type == 'SELF' then
equip(sets.midcast.CureSelf)
end
if state.CureHate.value then
equip(sets.cure_hate)
end
if world.weather_element == 'Light' then
equip(sets.midcast.CureWeather)
end
elseif spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
if spell.element == world.day_element or spell.element == world.weather_element then
equip({waist="Hachirin-no-Obi"})
end
elseif spell.skill == "Ninjutsu" then
equip(sets.midcast.Recast)
if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' then
if buffactive['Copy Image'] then
windower.ffxi.cancel_buff(66)
elseif buffactive['Copy Image (2)'] then
windower.ffxi.cancel_buff(444)
elseif buffactive['Copy Image (3)'] then
windower.ffxi.cancel_buff(445)
elseif buffactive['Copy Image (4+)'] then
windower.ffxi.cancel_buff(446)
end
elseif spell.name == 'Monomi: Ichi' and buffactive.Sneak and spell.target.type == 'SELF' then
windower.ffxi.cancel_buff(71)
end
end
end
Server: Odin
Game: FFXI
Posts: 42
By Odin.Psycooo 2016-10-08 01:38:38
k, both sets work thank you.
Asura.Clack
Server: Asura
Game: FFXI
Posts: 9
By Asura.Clack 2016-10-10 05:03:20
So this has been frustrating me for a while and I can't seem to figure it out. Whenever I have aurorastorm up and I try to cast a -na spell or erase, it equips my cure weather set instead of my statusremoval/fast cast set. I've tried to clean up this gearswap as much as I can, but with limited knowledge I just can't seem to get it to work right. Any help is much 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-Mappings.lua')
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent.
function job_setup()
state.Buff['Afflatus Solace'] = buffactive['Afflatus Solace'] or false
state.Buff['Afflatus Misery'] = buffactive['Afflatus Misery'] or false
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
options.OffenseModes = {'None', 'Normal'}
options.DefenseModes = {'Normal'}
options.WeaponskillModes = {'Normal'}
options.CastingModes = {'Normal', 'Resistant', 'Dire'}
options.IdleModes = {'Normal', 'PDT'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
state.OffenseMode = 'None'
select_default_macro_book()
Cures = S{'Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'}
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FC = {
ammo="Incantor stone",
head="Nahtirah Hat",
body="Anhur Robe",
hands="Fanatic Gloves",
legs="Lengo pants",
feet="Regal Pumps +1",
neck="Orunmila's torque",
waist="Witful Belt",
left_ear="Enchntr. Earring +1",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back="Swith Cape +1",
}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'], {head="Umuthi Hat"})
sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {legs="Ebers Pantaloons +1"})
sets.precast.FC.StatusRemoval = sets.precast.FC['Healing Magic']
sets.precast.FC.Cure = set_combine(sets.precast.FC['Healing Magic'], {
main="Queller Rod",
sub="Sors Shield",
ammo="impatiens",
head="Piety Cap",
body="Anhur Robe",
hands="Fanatic Gloves",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'System: 2 ID: 124 Val: 4','System: 2 ID: 123 Val: 14','System: 2 ID: 177 Val: 5',}},
neck="Orunmila's Torque",
waist="Witful Belt",
left_ear="Nourish. Earring +1",
right_ear="Nourish. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back="Ogapepo Cape",
})
sets.precast.FC.Curaga = sets.precast.FC.Cure
-- Precast sets to enhance JAs
sets.precast.JA.Benediction = {body="Piety Briault"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Nahtirah Hat",ear1="Roundel Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",
back="Refraction Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
gear.default.weaponskill_neck = "Asperity Necklace"
gear.default.weaponskill_waist = ""
sets.precast.WS = {
head="Nahtirah Hat",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Refraction Cape",waist=gear.ElementalBelt,legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.precast.WS['Flash Nova'] = {
head="Nahtirah Hat",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="Strendu Ring",}
-- Midcast Sets
sets.midcast.FastRecast = {
ammo="Incantor stone",
head="Nahtirah Hat",
body="Anhur Robe",
hands="Fanatic Gloves",
legs="Lengo pants",
feet="Regal Pumps +1",
neck="Orunmila's torque",
waist="Witful Belt",
left_ear="Enchntr. Earring +1",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back="Swith Cape +1",
}
-- Cure sets
gear.default.obi_waist = "hachirin-no-obi"
gear.default.obi_back = "Twilight Cape"
sets.midcast.CureSolace = {
main={ name="Queller Rod", augments={'Healing magic skill +15','"Cure" potency +10%','"Cure" spellcasting time -7%',}},
sub="Sors Shield",
ammo="Leisure Musk +1",
head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
body="Ebers Bliaud +1",
hands="Theo. Mitts +1",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
neck="Lasaia Pendant",
waist="Austerity Belt",
left_ear="Nourish. Earring +1",
right_ear="Novia Earring",
left_ring="Kuchekula Ring",
right_ring="Haoma's Ring",
back={ name="Mending Cape", augments={'Healing magic skill +4','Enha.mag. skill +1','Mag. Acc.+5','"Cure" potency +4%',}},
}
sets.midcast.CureWeather = {
main="Chatoyant Staff",
sub="Achaq Grip",
ammo="Leisure Musk +1",
head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
body="Ebers Bliaud +1",
hands="Theo. Mitts +1",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
neck="Lasaia Pendant",
waist="Hachirin-no-Obi",
left_ear="Nourish. Earring +1",
right_ear="Novia Earring",
left_ring="Sirona's Ring",
right_ring="Kuchekula Ring",
back={ name="Mending Cape", augments={'Healing magic skill +4','Enha.mag. skill +1','Mag. Acc.+5','"Cure" potency +4%',}},
}
sets.midcast.Cure = {
main={ name="Queller Rod", augments={'Healing magic skill +15','"Cure" potency +10%','"Cure" spellcasting time -7%',}},
sub="Sors Shield",
ammo="Leisure Musk +1",
head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
body="Ebers Bliaud +1",
hands="Theo. Mitts +1",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
neck="Lasaia Pendant",
waist="Austerity Belt",
left_ear="Nourish. Earring +1",
right_ear="Novia Earring",
left_ring="Kuchekula Ring",
right_ring="Haoma's Ring",
back={ name="Mending Cape", augments={'Healing magic skill +4','Enha.mag. skill +1','Mag. Acc.+5','"Cure" potency +4%',}},
}
sets.midcast.Curaga = {
main={ name="Queller Rod", augments={'Healing magic skill +15','System: 2 ID: 124 Val: 9','System: 2 ID: 123 Val: 6',}},
sub="Sors Shield",
ammo="Oreiad's Tathlum",
head={ name="Gende. Caubeen +1", augments={'Phys. dmg. taken -1%','"Cure" potency +6%',}},
body="Ebers bliaud +1",
hands="Theo. Mitts +1",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'System: 2 ID: 124 Val: 4','System: 2 ID: 123 Val: 14','System: 2 ID: 177 Val: 5',}},
neck="Colossus's Torque",
waist="Bishop's Sash",
left_ear="Nourish. Earring +1",
right_ear="Beatific Earring",
left_ring="Sirona's Ring",
right_ring="Haoma's Ring",
back="Tempered cape +1",
}
sets.midcast.CureMelee = {main="Tamaxchi",sub="sors Shield",ammo="kalboron stone",
head="Gendewitha Caubeen",neck="nuna gorget +1",ear1="novia Earring",ear2="beatific Earring",
body="Orison Bliaud +2",hands="yaoyotl gloves",ring1="sirona's Ring",ring2="haoma's Ring",
back="pahtli Cape",waist=gear.ElementalObi,legs="Orison Pantaloons +2",feet="Piety Duckbills +1"}
sets.midcast.Cursna = {
main="Yagrush",
sub="Sors Shield",
ammo="Incantor Stone",
head="Nahtirah Hat",
body="Ebers Bliaud +1",
hands={ name="Fanatic Gloves", augments={'MP+50','Healing magic skill +10','"Conserve MP"+7','"Fast Cast"+7',}},
legs="Ebers Pant. +1",
feet={ name="Gende. Galosh. +1", augments={'Phys. dmg. taken -1%','"Cure" spellcasting time -4%',}},
neck="Malison Medallion",
waist="Bishop's Sash",
left_ear="Healing Earring",
right_ear="Beatific Earring",
left_ring="Haoma's Ring",
right_ring="Haoma's Ring",
back={ name="Mending Cape", augments={'Healing magic skill +6','Enha.mag. skill +6','Mag. Acc.+9','"Cure" potency +2%',}},
}
sets.midcast.StatusRemoval = {
main="Yagrush",
sub="Sors Shield",
ammo="Incantor Stone",
head="Nahtirah Hat",
body="Anhur Robe",
hands={ name="Fanatic Gloves", augments={'MP+50','Healing magic skill +10','"Conserve MP"+7','"Fast Cast"+7',}},
legs="Ebers Pant. +1",
feet="Regal Pumps +1",
neck="Orunmila's Torque",
waist="Witful Belt",
left_ear="Enchntr. Earring +1",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back="Swith Cape +1",
}
-- 110 total Enhancing Magic Skill; caps even without Light Arts
sets.midcast['Enhancing Magic'] = {
main="Beneficus",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Vanir Battery",
head="Umuthi Hat",
body="Anhur Robe",
hands="Dynasty Mitts",
legs={ name="Piety Pantaln. +1", augments={'Enhances "Shellra V" effect',}},
feet="Orsn. Duckbills +2",
neck="Colossus's Torque",
waist="Olympus Sash",
left_ear="Andoaa Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Prolix Ring",
right_ring="defending Ring",
back="Merciful Cape",
}
sets.midcast.Stoneskin = {
head="Nahtirah Hat",neck="Orison Locket",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Dynasty Mitts",
back="Swith Cape +1",waist="Siegel Sash",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.midcast.Auspice = {hands="Dynasty Mitts",feet="Orison Duckbills +2"}
sets.midcast.BarElement = {
main="Beneficus",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Vanir Battery",
head="Orison Cap +2",
body="ebers bliaud +1",
hands="Orison Mitts +2",
legs={ name="Piety Pantaln. +1", augments={'Enhances "Shellra V" effect',}},
feet="Orsn. Duckbills +2",
neck="Colossus's Torque",
waist="Olympus Sash",
left_ear="Andoaa Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Prolix Ring",
right_ring="Weather. Ring",
back="Merciful Cape",
}
sets.midcast.Regen = {main="Bolelabunga",sub="Genbu's Shield",
body="Piety Briault +1",hands="Orison Mitts +2",
legs="Theophany Pantaloons"}
sets.midcast.Protectra = {ring1="Sheltered Ring",feet="Piety Duckbills +1"}
sets.midcast.Shellra = {ring1="Sheltered Ring",legs="Piety Pantaloons +1"}
sets.midcast['Divine Magic'] = {
main="Marin Staff +1",
sub="Elder's Grip +1",
ammo="Ghastly Tathlum",
head={ name="Helios Band", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Occult Acumen"+10','INT+10',}},
body={ name="Witching Robe", augments={'MP+45','Mag. Acc.+14','"Mag.Atk.Bns."+14',}},
hands={ name="Helios Gloves", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','"Occult Acumen"+3','INT+9',}},
legs={ name="Lengo Pants", augments={'INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+13',}},
feet={ name="Helios Boots", augments={'"Mag.Atk.Bns."+25','"Fast Cast"+5','INT+4 MND+4',}},
neck="Eddy Necklace",
waist="Othila Sash",
left_ear="Friomisi Earring",
right_ear="Hecate's Earring",
left_ring="Fenrir Ring +1",
right_ring="Fenrir Ring +1",
back="Toro Cape",
}
sets.midcast['Dark Magic'] = {main="ngqoqwanb", sub="mephitis grip",
head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Piety Duckbills +1"}
-- Custom spell classes
sets.midcast.MndEnfeebles = {
main={ name="Twebuliij", augments={'MP+60','Mag. Acc.+15','MND+12',}},
sub="Mephitis Grip",
ammo="Pemphredo Tathlum",
body="Respite Cloak",
hands="Lurid Mitts",
legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
feet={ name="Medium's Sabots", augments={'MP+40','MND+6','"Conserve MP"+5','"Cure" potency +3%',}},
neck="Imbodla Necklace",
waist="Ovate Rope",
left_ear="Enchntr. Earring +1",
right_ear="Gwati Earring",
left_ring="Levia. Ring +1",
right_ring="Levia. Ring +1",
back="Ogapepo Cape",
}
sets.midcast.IntEnfeebles = {
main={ name="Twebuliij", augments={'MP+60','Mag. Acc.+15','MND+12',}},
sub="Benthos Grip",
ammo="Oreiad's Tathlum",
head={ name="Artsieq Hat", augments={'MP+30','Mag. Acc.+20','MND+7',}},
body="Vanir Cotehardie",
hands="Lurid Mitts",
legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
feet={ name="Piety Duckbills +1", augments={'Enhances "Protectra V" effect',}},
neck="Imbodla Necklace",
waist="Ovate Rope",
left_ear="Lifestorm Earring",
right_ear="Psystorm Earring",
left_ring="Levia. Ring +1",
right_ring="Levia. Ring +1",
back="Merciful Cape",
}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main=gear.Staff.HMP,
body="Gendewitha Bliaut",hands="Serpentes Cuffs",
waist="Austerity Belt",legs="Nares Trews",feet="Chelona Boots +1"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {
main="Bolelabunga",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Homiliary",
body="Respite Cloak",
hands={ name="Chironic Gloves", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Haste+1','CHR+3','"Mag.Atk.Bns."+13',}},
legs="Assid. Pants +1",
feet={ name="Piety Duckbills +1", augments={'Enhances "Protectra V" effect',}},
neck="Bathy Choker",
waist="Slipor Sash",
left_ear="Infused Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Paguroidea Ring",
right_ring="Sheltered Ring",
back="Kumbira Cape",
}
sets.idle.PDT = {main="owleyes", sub="Genbu's Shield",ammo="sihirik",
head="wivre hairpin",neck="twilight torque",ear1="ethereal Earring",ear2="Loquacious Earring",
body="gendewitha bliaut",hands="Serpentes Cuffs",ring1="dark Ring",ring2="dark Ring",
back="shadow mantle",waist="slipor sash",legs="Nares Trews",feet="serpentes sabots"}
sets.idle.Town = {
main="Bolelabunga",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Homiliary",
body="Respite Cloak",
hands={ name="Chironic Gloves", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Haste+1','CHR+3','"Mag.Atk.Bns."+13',}},
legs="Assid. Pants +1",
feet={ name="Piety Duckbills +1", augments={'Enhances "Protectra V" effect',}},
neck="Bathy Choker",
waist="Slipor Sash",
left_ear="Infused Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Paguroidea Ring",
right_ring="Sheltered Ring",
back="Kumbira Cape",
}
sets.idle.Weak = {
main="Bolelabunga",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Homiliary",
body="Respite Cloak",
hands={ name="Chironic Gloves", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Haste+1','CHR+3','"Mag.Atk.Bns."+13',}},
legs="Assid. Pants +1",
feet={ name="Piety Duckbills +1", augments={'Enhances "Protectra V" effect',}},
neck="Bathy Choker",
waist="Slipor Sash",
left_ear="Infused Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Paguroidea Ring",
right_ring="Sheltered Ring",
back="Kumbira Cape",
}
-- Defense sets
sets.defense.PDT = {main=gear.Staff.PDT,sub="Achaq Grip",
head="Gendewitha Caubeen",neck="Twilight Torque",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Umbra Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.defense.MDT = {main=gear.Staff.PDT,sub="Achaq Grip",
head="Nahtirah Hat",neck="Twilight Torque",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Tuilha Cape",legs="Bokwus Slops",feet="Gendewitha Galoshes"}
sets.Kiting = {feet="Herald's Gaiters"}
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
-- Basic set for if no TP weapon is defined.
sets.engaged = {
head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Vanir Cotehardie",hands="Dynasty Mitts",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Umbra Cape",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Divine Caress'] = {hands="Orison Mitts +2",back="Mending Cape"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
-- 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)
local map = spell_maps[spell.en]
if map == 'Cure' and player.sub_job == "SCH" and not buffactive.Aurorastorm then
add_to_chat(123,'Aurorastorm not active.')
windower.play_sound('C:\\Program Files (x86)\\Windower4\\addons\\GearSwap\\data\\wav\\Chime.wav')
end
if map == 'Curaga' and player.sub_job == "SCH" and not buffactive.Aurorastorm then
add_to_chat(123,'Aurorastorm not active.')
windower.play_sound('C:\\Program Files (x86)\\Windower4\\addons\\GearSwap\\data\\wav\\Chime.wav')
end
if spell.english == "Paralyna" and buffactive.Paralyzed then
eventArgs.handled = true
end
if spell.skill == 'Healing Magic' then
gear.default.obi_back = "Mending Cape"
else
gear.default.obi_back = "toro caoe"
end
end
--[[function job_precast(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = true
end
end]]
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Apply Divine Caress boosting items as highest priority over other gear, if applicable.
if spellMap == 'StatusRemoval' and buffactive['Divine Caress'] then
equip(sets.buff['Divine Caress'])
end
if spell.prefix == 'Cure' or 'Curaga' then
if spell.element == world.weather_element or spell.element==world.day_element then
equip(sets.midcast.CureWeather)
end
end
end
-- Return true if we handled the aftercast work. Otherwise it will fall back
-- to the general aftercast() code in Mote-Include.
function job_aftercast(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
end
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
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
state.Buff[buff] = gain
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
if cmdParams[1] == 'user' and not areas.Cities:contains(world.area) then
local needsArts =
player.sub_job:lower() == 'sch' and
not buffactive['Light Arts'] and
not buffactive['Addendum: White'] and
not buffactive['Dark Arts'] and
not buffactive['Addendum: Black']
if not buffactive['Afflatus Solace'] and not buffactive['Afflatus Misery'] then
if needsArts then
send_command('@input /ja "Afflatus Solace" <me>;wait 1.2;input /ja "Light Arts" <me>')
else
send_command('@input /ja "Afflatus Solace" <me>')
end
end
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'OffenseMode' then
if newValue == 'Normal' then
disable('main','sub')
else
enable('main','sub')
end
elseif stateField == 'Reset' then
if state.OffenseMode == 'None' then
enable('main','sub')
end
end
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
local defenseString = ''
if state.Defense.Active then
local defMode = state.Defense.PhysicalMode
if state.Defense.Type == 'Magical' then
defMode = state.Defense.MagicalMode
end
defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
end
local meleeString = ''
if state.OffenseMode == 'Normal' then
meleeString = 'Melee: Weapons locked, '
end
add_to_chat(122,'Casting ['..state.CastingMode..'], '..meleeString..'Idle ['..state.IdleMode..'], '..defenseString..
'Kiting: '..on_off_names[state.Kiting])
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
set_macro_page(4, 14)
end
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-10-10 13:16:37
Line 514 does not actually make sense. Code if spell.prefix == 'Cure' or 'Curaga' then
First, spell.prefix is the in-game command prefix ('/magic' for spells, '/jobability' for JAs, etc.), so "spell.prefix == 'Cure'" will never be true.
Secondly, your second condition is actually just asking if 'Curaga' is not nil or false (which it inherently could never be because it's a string/word). So this condition will always be true.
The easiest thing to do is to use the spellMaps that Mote provides for his framework: Code if spellMap=='Cure' or spellMap=='Curaga' then
Alternatively, you can use the string library that Windower provides to check if a string starts with another string: Code if spell.english:startswith('Cure') or spell.english:startswith('Curaga') then
Also not sure if this is on purpose, but you're canceling your precast gear when you're Paralyzed and trying to Paralyna.
Odin.Lygre
Server: Odin
Game: FFXI
Posts: 89
By Odin.Lygre 2016-10-10 13:20:10
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-Mappings.lua')
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent.
function job_setup()
state.Buff['Afflatus Solace'] = buffactive['Afflatus Solace'] or false
state.Buff['Afflatus Misery'] = buffactive['Afflatus Misery'] or false
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
options.OffenseModes = {'None', 'Normal'}
options.DefenseModes = {'Normal'}
options.WeaponskillModes = {'Normal'}
options.CastingModes = {'Normal', 'Resistant', 'Dire'}
options.IdleModes = {'Normal', 'PDT'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
state.OffenseMode = 'None'
select_default_macro_book()
Cures = S{'Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'}
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FC = {
ammo="Incantor stone",
head="Nahtirah Hat",
body="Anhur Robe",
hands="Fanatic Gloves",
legs="Lengo pants",
feet="Regal Pumps +1",
neck="Orunmila's torque",
waist="Witful Belt",
left_ear="Enchntr. Earring +1",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back="Swith Cape +1",
}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'], {head="Umuthi Hat"})
sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {legs="Ebers Pantaloons +1"})
sets.precast.FC.StatusRemoval = sets.precast.FC['Healing Magic']
sets.precast.FC.Cure = set_combine(sets.precast.FC['Healing Magic'], {
main="Queller Rod",
sub="Sors Shield",
ammo="impatiens",
head="Piety Cap",
body="Anhur Robe",
hands="Fanatic Gloves",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'System: 2 ID: 124 Val: 4','System: 2 ID: 123 Val: 14','System: 2 ID: 177 Val: 5',}},
neck="Orunmila's Torque",
waist="Witful Belt",
left_ear="Nourish. Earring +1",
right_ear="Nourish. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back="Ogapepo Cape",
})
sets.precast.FC.Curaga = sets.precast.FC.Cure
-- Precast sets to enhance JAs
sets.precast.JA.Benediction = {body="Piety Briault"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Nahtirah Hat",ear1="Roundel Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",
back="Refraction Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
gear.default.weaponskill_neck = "Asperity Necklace"
gear.default.weaponskill_waist = ""
sets.precast.WS = {
head="Nahtirah Hat",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Refraction Cape",waist=gear.ElementalBelt,legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.precast.WS['Flash Nova'] = {
head="Nahtirah Hat",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="Strendu Ring",}
-- Midcast Sets
sets.midcast.FastRecast = {
ammo="Incantor stone",
head="Nahtirah Hat",
body="Anhur Robe",
hands="Fanatic Gloves",
legs="Lengo pants",
feet="Regal Pumps +1",
neck="Orunmila's torque",
waist="Witful Belt",
left_ear="Enchntr. Earring +1",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back="Swith Cape +1",
}
-- Cure sets
gear.default.obi_waist = "hachirin-no-obi"
gear.default.obi_back = "Twilight Cape"
sets.midcast.CureSolace = {
main={ name="Queller Rod", augments={'Healing magic skill +15','"Cure" potency +10%','"Cure" spellcasting time -7%',}},
sub="Sors Shield",
ammo="Leisure Musk +1",
head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
body="Ebers Bliaud +1",
hands="Theo. Mitts +1",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
neck="Lasaia Pendant",
waist="Austerity Belt",
left_ear="Nourish. Earring +1",
right_ear="Novia Earring",
left_ring="Kuchekula Ring",
right_ring="Haoma's Ring",
back={ name="Mending Cape", augments={'Healing magic skill +4','Enha.mag. skill +1','Mag. Acc.+5','"Cure" potency +4%',}},
}
sets.midcast.CureWeather = {
main="Chatoyant Staff",
sub="Achaq Grip",
ammo="Leisure Musk +1",
head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
body="Ebers Bliaud +1",
hands="Theo. Mitts +1",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
neck="Lasaia Pendant",
waist="Hachirin-no-Obi",
left_ear="Nourish. Earring +1",
right_ear="Novia Earring",
left_ring="Sirona's Ring",
right_ring="Kuchekula Ring",
back={ name="Mending Cape", augments={'Healing magic skill +4','Enha.mag. skill +1','Mag. Acc.+5','"Cure" potency +4%',}},
}
sets.midcast.Cure = {
main={ name="Queller Rod", augments={'Healing magic skill +15','"Cure" potency +10%','"Cure" spellcasting time -7%',}},
sub="Sors Shield",
ammo="Leisure Musk +1",
head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
body="Ebers Bliaud +1",
hands="Theo. Mitts +1",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
neck="Lasaia Pendant",
waist="Austerity Belt",
left_ear="Nourish. Earring +1",
right_ear="Novia Earring",
left_ring="Kuchekula Ring",
right_ring="Haoma's Ring",
back={ name="Mending Cape", augments={'Healing magic skill +4','Enha.mag. skill +1','Mag. Acc.+5','"Cure" potency +4%',}},
}
sets.midcast.Curaga = {
main={ name="Queller Rod", augments={'Healing magic skill +15','System: 2 ID: 124 Val: 9','System: 2 ID: 123 Val: 6',}},
sub="Sors Shield",
ammo="Oreiad's Tathlum",
head={ name="Gende. Caubeen +1", augments={'Phys. dmg. taken -1%','"Cure" potency +6%',}},
body="Ebers bliaud +1",
hands="Theo. Mitts +1",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'System: 2 ID: 124 Val: 4','System: 2 ID: 123 Val: 14','System: 2 ID: 177 Val: 5',}},
neck="Colossus's Torque",
waist="Bishop's Sash",
left_ear="Nourish. Earring +1",
right_ear="Beatific Earring",
left_ring="Sirona's Ring",
right_ring="Haoma's Ring",
back="Tempered cape +1",
}
sets.midcast.CureMelee = {main="Tamaxchi",sub="sors Shield",ammo="kalboron stone",
head="Gendewitha Caubeen",neck="nuna gorget +1",ear1="novia Earring",ear2="beatific Earring",
body="Orison Bliaud +2",hands="yaoyotl gloves",ring1="sirona's Ring",ring2="haoma's Ring",
back="pahtli Cape",waist=gear.ElementalObi,legs="Orison Pantaloons +2",feet="Piety Duckbills +1"}
sets.midcast.Cursna = {
main="Yagrush",
sub="Sors Shield",
ammo="Incantor Stone",
head="Nahtirah Hat",
body="Ebers Bliaud +1",
hands={ name="Fanatic Gloves", augments={'MP+50','Healing magic skill +10','"Conserve MP"+7','"Fast Cast"+7',}},
legs="Ebers Pant. +1",
feet={ name="Gende. Galosh. +1", augments={'Phys. dmg. taken -1%','"Cure" spellcasting time -4%',}},
neck="Malison Medallion",
waist="Bishop's Sash",
left_ear="Healing Earring",
right_ear="Beatific Earring",
left_ring="Haoma's Ring",
right_ring="Haoma's Ring",
back={ name="Mending Cape", augments={'Healing magic skill +6','Enha.mag. skill +6','Mag. Acc.+9','"Cure" potency +2%',}},
}
sets.midcast.StatusRemoval = {
main="Yagrush",
sub="Sors Shield",
ammo="Incantor Stone",
head="Nahtirah Hat",
body="Anhur Robe",
hands={ name="Fanatic Gloves", augments={'MP+50','Healing magic skill +10','"Conserve MP"+7','"Fast Cast"+7',}},
legs="Ebers Pant. +1",
feet="Regal Pumps +1",
neck="Orunmila's Torque",
waist="Witful Belt",
left_ear="Enchntr. Earring +1",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back="Swith Cape +1",
}
-- 110 total Enhancing Magic Skill; caps even without Light Arts
sets.midcast['Enhancing Magic'] = {
main="Beneficus",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Vanir Battery",
head="Umuthi Hat",
body="Anhur Robe",
hands="Dynasty Mitts",
legs={ name="Piety Pantaln. +1", augments={'Enhances "Shellra V" effect',}},
feet="Orsn. Duckbills +2",
neck="Colossus's Torque",
waist="Olympus Sash",
left_ear="Andoaa Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Prolix Ring",
right_ring="defending Ring",
back="Merciful Cape",
}
sets.midcast.Stoneskin = {
head="Nahtirah Hat",neck="Orison Locket",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Dynasty Mitts",
back="Swith Cape +1",waist="Siegel Sash",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.midcast.Auspice = {hands="Dynasty Mitts",feet="Orison Duckbills +2"}
sets.midcast.BarElement = {
main="Beneficus",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Vanir Battery",
head="Orison Cap +2",
body="ebers bliaud +1",
hands="Orison Mitts +2",
legs={ name="Piety Pantaln. +1", augments={'Enhances "Shellra V" effect',}},
feet="Orsn. Duckbills +2",
neck="Colossus's Torque",
waist="Olympus Sash",
left_ear="Andoaa Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Prolix Ring",
right_ring="Weather. Ring",
back="Merciful Cape",
}
sets.midcast.Regen = {main="Bolelabunga",sub="Genbu's Shield",
body="Piety Briault +1",hands="Orison Mitts +2",
legs="Theophany Pantaloons"}
sets.midcast.Protectra = {ring1="Sheltered Ring",feet="Piety Duckbills +1"}
sets.midcast.Shellra = {ring1="Sheltered Ring",legs="Piety Pantaloons +1"}
sets.midcast['Divine Magic'] = {
main="Marin Staff +1",
sub="Elder's Grip +1",
ammo="Ghastly Tathlum",
head={ name="Helios Band", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Occult Acumen"+10','INT+10',}},
body={ name="Witching Robe", augments={'MP+45','Mag. Acc.+14','"Mag.Atk.Bns."+14',}},
hands={ name="Helios Gloves", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','"Occult Acumen"+3','INT+9',}},
legs={ name="Lengo Pants", augments={'INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+13',}},
feet={ name="Helios Boots", augments={'"Mag.Atk.Bns."+25','"Fast Cast"+5','INT+4 MND+4',}},
neck="Eddy Necklace",
waist="Othila Sash",
left_ear="Friomisi Earring",
right_ear="Hecate's Earring",
left_ring="Fenrir Ring +1",
right_ring="Fenrir Ring +1",
back="Toro Cape",
}
sets.midcast['Dark Magic'] = {main="ngqoqwanb", sub="mephitis grip",
head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Piety Duckbills +1"}
-- Custom spell classes
sets.midcast.MndEnfeebles = {
main={ name="Twebuliij", augments={'MP+60','Mag. Acc.+15','MND+12',}},
sub="Mephitis Grip",
ammo="Pemphredo Tathlum",
body="Respite Cloak",
hands="Lurid Mitts",
legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
feet={ name="Medium's Sabots", augments={'MP+40','MND+6','"Conserve MP"+5','"Cure" potency +3%',}},
neck="Imbodla Necklace",
waist="Ovate Rope",
left_ear="Enchntr. Earring +1",
right_ear="Gwati Earring",
left_ring="Levia. Ring +1",
right_ring="Levia. Ring +1",
back="Ogapepo Cape",
}
sets.midcast.IntEnfeebles = {
main={ name="Twebuliij", augments={'MP+60','Mag. Acc.+15','MND+12',}},
sub="Benthos Grip",
ammo="Oreiad's Tathlum",
head={ name="Artsieq Hat", augments={'MP+30','Mag. Acc.+20','MND+7',}},
body="Vanir Cotehardie",
hands="Lurid Mitts",
legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
feet={ name="Piety Duckbills +1", augments={'Enhances "Protectra V" effect',}},
neck="Imbodla Necklace",
waist="Ovate Rope",
left_ear="Lifestorm Earring",
right_ear="Psystorm Earring",
left_ring="Levia. Ring +1",
right_ring="Levia. Ring +1",
back="Merciful Cape",
}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main=gear.Staff.HMP,
body="Gendewitha Bliaut",hands="Serpentes Cuffs",
waist="Austerity Belt",legs="Nares Trews",feet="Chelona Boots +1"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {
main="Bolelabunga",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Homiliary",
body="Respite Cloak",
hands={ name="Chironic Gloves", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Haste+1','CHR+3','"Mag.Atk.Bns."+13',}},
legs="Assid. Pants +1",
feet={ name="Piety Duckbills +1", augments={'Enhances "Protectra V" effect',}},
neck="Bathy Choker",
waist="Slipor Sash",
left_ear="Infused Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Paguroidea Ring",
right_ring="Sheltered Ring",
back="Kumbira Cape",
}
sets.idle.PDT = {main="owleyes", sub="Genbu's Shield",ammo="sihirik",
head="wivre hairpin",neck="twilight torque",ear1="ethereal Earring",ear2="Loquacious Earring",
body="gendewitha bliaut",hands="Serpentes Cuffs",ring1="dark Ring",ring2="dark Ring",
back="shadow mantle",waist="slipor sash",legs="Nares Trews",feet="serpentes sabots"}
sets.idle.Town = {
main="Bolelabunga",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Homiliary",
body="Respite Cloak",
hands={ name="Chironic Gloves", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Haste+1','CHR+3','"Mag.Atk.Bns."+13',}},
legs="Assid. Pants +1",
feet={ name="Piety Duckbills +1", augments={'Enhances "Protectra V" effect',}},
neck="Bathy Choker",
waist="Slipor Sash",
left_ear="Infused Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Paguroidea Ring",
right_ring="Sheltered Ring",
back="Kumbira Cape",
}
sets.idle.Weak = {
main="Bolelabunga",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Homiliary",
body="Respite Cloak",
hands={ name="Chironic Gloves", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Haste+1','CHR+3','"Mag.Atk.Bns."+13',}},
legs="Assid. Pants +1",
feet={ name="Piety Duckbills +1", augments={'Enhances "Protectra V" effect',}},
neck="Bathy Choker",
waist="Slipor Sash",
left_ear="Infused Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Paguroidea Ring",
right_ring="Sheltered Ring",
back="Kumbira Cape",
}
-- Defense sets
sets.defense.PDT = {main=gear.Staff.PDT,sub="Achaq Grip",
head="Gendewitha Caubeen",neck="Twilight Torque",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Umbra Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.defense.MDT = {main=gear.Staff.PDT,sub="Achaq Grip",
head="Nahtirah Hat",neck="Twilight Torque",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Tuilha Cape",legs="Bokwus Slops",feet="Gendewitha Galoshes"}
sets.Kiting = {feet="Herald's Gaiters"}
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
-- Basic set for if no TP weapon is defined.
sets.engaged = {
head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Vanir Cotehardie",hands="Dynasty Mitts",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Umbra Cape",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Divine Caress'] = {hands="Orison Mitts +2",back="Mending Cape"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
-- 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)
local map = spell_maps[spell.en]
if map == 'Cure' and player.sub_job == "SCH" and not buffactive.Aurorastorm then
add_to_chat(123,'Aurorastorm not active.')
windower.play_sound('C:\\Program Files (x86)\\Windower4\\addons\\GearSwap\\data\\wav\\Chime.wav')
end
if map == 'Curaga' and player.sub_job == "SCH" and not buffactive.Aurorastorm then
add_to_chat(123,'Aurorastorm not active.')
windower.play_sound('C:\\Program Files (x86)\\Windower4\\addons\\GearSwap\\data\\wav\\Chime.wav')
end
if spell.english == "Paralyna" and buffactive.Paralyzed then
eventArgs.handled = true
end
if spell.skill == 'Healing Magic' then
gear.default.obi_back = "Mending Cape"
else
gear.default.obi_back = "toro caoe"
end
end
--[[function job_precast(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = true
end
end]]
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Apply Divine Caress boosting items as highest priority over other gear, if applicable.
if spellMap == 'StatusRemoval' and buffactive['Divine Caress'] then
equip(sets.buff['Divine Caress'])
end
if spellMap == 'Cure' or spellMap == 'Curaga' then
if spell.element == world.weather_element or spell.element==world.day_element then
equip(sets.midcast.CureWeather)
end
end
end
-- Return true if we handled the aftercast work. Otherwise it will fall back
-- to the general aftercast() code in Mote-Include.
function job_aftercast(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
end
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
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
state.Buff[buff] = gain
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
if cmdParams[1] == 'user' and not areas.Cities:contains(world.area) then
local needsArts =
player.sub_job:lower() == 'sch' and
not buffactive['Light Arts'] and
not buffactive['Addendum: White'] and
not buffactive['Dark Arts'] and
not buffactive['Addendum: Black']
if not buffactive['Afflatus Solace'] and not buffactive['Afflatus Misery'] then
if needsArts then
send_command('@input /ja "Afflatus Solace" <me>;wait 1.2;input /ja "Light Arts" <me>')
else
send_command('@input /ja "Afflatus Solace" <me>')
end
end
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'OffenseMode' then
if newValue == 'Normal' then
disable('main','sub')
else
enable('main','sub')
end
elseif stateField == 'Reset' then
if state.OffenseMode == 'None' then
enable('main','sub')
end
end
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
local defenseString = ''
if state.Defense.Active then
local defMode = state.Defense.PhysicalMode
if state.Defense.Type == 'Magical' then
defMode = state.Defense.MagicalMode
end
defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
end
local meleeString = ''
if state.OffenseMode == 'Normal' then
meleeString = 'Melee: Weapons locked, '
end
add_to_chat(122,'Casting ['..state.CastingMode..'], '..meleeString..'Idle ['..state.IdleMode..'], '..defenseString..
'Kiting: '..on_off_names[state.Kiting])
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
set_macro_page(4, 14)
end
Try this.
***What flippant said
Asura.Clack
Server: Asura
Game: FFXI
Posts: 9
By Asura.Clack 2016-10-10 17:56:06
Ragnarok.Flippant said: »Line 514 does not actually make sense. Code if spell.prefix == 'Cure' or 'Curaga' then
First, spell.prefix is the in-game command prefix ('/magic' for spells, '/jobability' for JAs, etc.), so "spell.prefix == 'Cure'" will never be true.
Secondly, your second condition is actually just asking if 'Curaga' is not nil or false (which it inherently could never be because it's a string/word). So this condition will always be true.
The easiest thing to do is to use the spellMaps that Mote provides for his framework: Code if spellMap=='Cure' or spellMap=='Curaga' then
Alternatively, you can use the string library that Windower provides to check if a string starts with another string: Code if spell.english:startswith('Cure') or spell.english:startswith('Curaga') then
Also not sure if this is on purpose, but you're canceling your precast gear when you're Paralyzed and trying to Paralyna.
Thanks for this! I'll be the first to admit I'm somewhat dumb when it comes to gearswap :P.
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-Mappings.lua')
include('Mote-Include.lua')
include('organizer-lib')
end
-- Setup vars that are user-independent.
function job_setup()
state.Buff['Afflatus Solace'] = buffactive['Afflatus Solace'] or false
state.Buff['Afflatus Misery'] = buffactive['Afflatus Misery'] or false
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
options.OffenseModes = {'None', 'Normal'}
options.DefenseModes = {'Normal'}
options.WeaponskillModes = {'Normal'}
options.CastingModes = {'Normal', 'Resistant', 'Dire'}
options.IdleModes = {'Normal', 'PDT'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
state.OffenseMode = 'None'
select_default_macro_book()
Cures = S{'Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'}
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FC = {
ammo="Incantor stone",
head="Nahtirah Hat",
body="Anhur Robe",
hands="Fanatic Gloves",
legs="Lengo pants",
feet="Regal Pumps +1",
neck="Orunmila's torque",
waist="Witful Belt",
left_ear="Enchntr. Earring +1",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back="Swith Cape +1",
}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'], {head="Umuthi Hat"})
sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {legs="Ebers Pantaloons +1"})
sets.precast.FC.StatusRemoval = sets.precast.FC['Healing Magic']
sets.precast.FC.Cure = set_combine(sets.precast.FC['Healing Magic'], {
main="Queller Rod",
sub="Sors Shield",
ammo="impatiens",
head="Piety Cap",
body="Anhur Robe",
hands="Fanatic Gloves",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'System: 2 ID: 124 Val: 4','System: 2 ID: 123 Val: 14','System: 2 ID: 177 Val: 5',}},
neck="Orunmila's Torque",
waist="Witful Belt",
left_ear="Nourish. Earring +1",
right_ear="Nourish. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back="Ogapepo Cape",
})
sets.precast.FC.Curaga = sets.precast.FC.Cure
-- Precast sets to enhance JAs
sets.precast.JA.Benediction = {body="Piety Briault"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Nahtirah Hat",ear1="Roundel Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",
back="Refraction Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
gear.default.weaponskill_neck = "Asperity Necklace"
gear.default.weaponskill_waist = ""
sets.precast.WS = {
head="Nahtirah Hat",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Refraction Cape",waist=gear.ElementalBelt,legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.precast.WS['Flash Nova'] = {
head="Nahtirah Hat",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="Strendu Ring",}
-- Midcast Sets
sets.midcast.FastRecast = {
ammo="Incantor stone",
head="Nahtirah Hat",
body="Anhur Robe",
hands="Fanatic Gloves",
legs="Lengo pants",
feet="Regal Pumps +1",
neck="Orunmila's torque",
waist="Witful Belt",
left_ear="Enchntr. Earring +1",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back="Swith Cape +1",
}
-- Cure sets
gear.default.obi_waist = "hachirin-no-obi"
gear.default.obi_back = "Twilight Cape"
sets.midcast.CureSolace = {
main={ name="Queller Rod", augments={'Healing magic skill +15','"Cure" potency +10%','"Cure" spellcasting time -7%',}},
sub="Sors Shield",
ammo="Leisure Musk +1",
head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
body="Ebers Bliaud +1",
hands="Theo. Mitts +1",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
neck="Lasaia Pendant",
waist="Austerity Belt",
left_ear="Nourish. Earring +1",
right_ear="Novia Earring",
left_ring="Kuchekula Ring",
right_ring="Haoma's Ring",
back={ name="Mending Cape", augments={'Healing magic skill +4','Enha.mag. skill +1','Mag. Acc.+5','"Cure" potency +4%',}},
}
sets.midcast.CureWeather = {
main="Chatoyant Staff",
sub="Achaq Grip",
ammo="Leisure Musk +1",
head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
body="Ebers Bliaud +1",
hands="Theo. Mitts +1",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
neck="Lasaia Pendant",
waist="Hachirin-no-Obi",
left_ear="Nourish. Earring +1",
right_ear="Novia Earring",
left_ring="Sirona's Ring",
right_ring="Kuchekula Ring",
back={ name="Mending Cape", augments={'Healing magic skill +4','Enha.mag. skill +1','Mag. Acc.+5','"Cure" potency +4%',}},
}
sets.midcast.Cure = {
main={ name="Queller Rod", augments={'Healing magic skill +15','"Cure" potency +10%','"Cure" spellcasting time -7%',}},
sub="Sors Shield",
ammo="Leisure Musk +1",
head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
body="Ebers Bliaud +1",
hands="Theo. Mitts +1",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
neck="Lasaia Pendant",
waist="Austerity Belt",
left_ear="Nourish. Earring +1",
right_ear="Novia Earring",
left_ring="Kuchekula Ring",
right_ring="Haoma's Ring",
back={ name="Mending Cape", augments={'Healing magic skill +4','Enha.mag. skill +1','Mag. Acc.+5','"Cure" potency +4%',}},
}
sets.midcast.Curaga = {
main={ name="Queller Rod", augments={'Healing magic skill +15','System: 2 ID: 124 Val: 9','System: 2 ID: 123 Val: 6',}},
sub="Sors Shield",
ammo="Oreiad's Tathlum",
head={ name="Gende. Caubeen +1", augments={'Phys. dmg. taken -1%','"Cure" potency +6%',}},
body="Ebers bliaud +1",
hands="Theo. Mitts +1",
legs="Ebers Pant. +1",
feet={ name="Vanya Clogs", augments={'System: 2 ID: 124 Val: 4','System: 2 ID: 123 Val: 14','System: 2 ID: 177 Val: 5',}},
neck="Colossus's Torque",
waist="Bishop's Sash",
left_ear="Nourish. Earring +1",
right_ear="Beatific Earring",
left_ring="Sirona's Ring",
right_ring="Haoma's Ring",
back="Tempered cape +1",
}
sets.midcast.CureMelee = {main="Tamaxchi",sub="sors Shield",ammo="kalboron stone",
head="Gendewitha Caubeen",neck="nuna gorget +1",ear1="novia Earring",ear2="beatific Earring",
body="Orison Bliaud +2",hands="yaoyotl gloves",ring1="sirona's Ring",ring2="haoma's Ring",
back="pahtli Cape",waist=gear.ElementalObi,legs="Orison Pantaloons +2",feet="Piety Duckbills +1"}
sets.midcast.Cursna = {
main="Yagrush",
sub="Sors Shield",
ammo="Incantor Stone",
head="Nahtirah Hat",
body="Ebers Bliaud +1",
hands={ name="Fanatic Gloves", augments={'MP+50','Healing magic skill +10','"Conserve MP"+7','"Fast Cast"+7',}},
legs="Ebers Pant. +1",
feet={ name="Gende. Galosh. +1", augments={'Phys. dmg. taken -1%','"Cure" spellcasting time -4%',}},
neck="Malison Medallion",
waist="Bishop's Sash",
left_ear="Healing Earring",
right_ear="Beatific Earring",
left_ring="Haoma's Ring",
right_ring="Haoma's Ring",
back={ name="Mending Cape", augments={'Healing magic skill +6','Enha.mag. skill +6','Mag. Acc.+9','"Cure" potency +2%',}},
}
sets.midcast.StatusRemoval = {
main="Yagrush",
sub="Sors Shield",
ammo="Incantor Stone",
head="Nahtirah Hat",
body="Anhur Robe",
hands={ name="Fanatic Gloves", augments={'MP+50','Healing magic skill +10','"Conserve MP"+7','"Fast Cast"+7',}},
legs="Ebers Pant. +1",
feet="Regal Pumps +1",
neck="Orunmila's Torque",
waist="Witful Belt",
left_ear="Enchntr. Earring +1",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Defending Ring",
back="Swith Cape +1",
}
-- 110 total Enhancing Magic Skill; caps even without Light Arts
sets.midcast['Enhancing Magic'] = {
main="Beneficus",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Vanir Battery",
head="Umuthi Hat",
body="Anhur Robe",
hands="Dynasty Mitts",
legs={ name="Piety Pantaln. +1", augments={'Enhances "Shellra V" effect',}},
feet="Orsn. Duckbills +2",
neck="Colossus's Torque",
waist="Olympus Sash",
left_ear="Andoaa Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Prolix Ring",
right_ring="defending Ring",
back="Merciful Cape",
}
sets.midcast.Stoneskin = {
head="Nahtirah Hat",neck="Orison Locket",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Dynasty Mitts",
back="Swith Cape +1",waist="Siegel Sash",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.midcast.Auspice = {hands="Dynasty Mitts",feet="Orison Duckbills +2"}
sets.midcast.BarElement = {
main="Beneficus",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Vanir Battery",
head="Orison Cap +2",
body="ebers bliaud +1",
hands="Orison Mitts +2",
legs={ name="Piety Pantaln. +1", augments={'Enhances "Shellra V" effect',}},
feet="Orsn. Duckbills +2",
neck="Colossus's Torque",
waist="Olympus Sash",
left_ear="Andoaa Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Prolix Ring",
right_ring="Weather. Ring",
back="Merciful Cape",
}
sets.midcast.Regen = {main="Bolelabunga",sub="Genbu's Shield",
body="Piety Briault +1",hands="Orison Mitts +2",
legs="Theophany Pantaloons"}
sets.midcast.Protectra = {ring1="Sheltered Ring",feet="Piety Duckbills +1"}
sets.midcast.Shellra = {ring1="Sheltered Ring",legs="Piety Pantaloons +1"}
sets.midcast['Divine Magic'] = {
main="Marin Staff +1",
sub="Elder's Grip +1",
ammo="Ghastly Tathlum",
head={ name="Helios Band", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Occult Acumen"+10','INT+10',}},
body={ name="Witching Robe", augments={'MP+45','Mag. Acc.+14','"Mag.Atk.Bns."+14',}},
hands={ name="Helios Gloves", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','"Occult Acumen"+3','INT+9',}},
legs={ name="Lengo Pants", augments={'INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+13',}},
feet={ name="Helios Boots", augments={'"Mag.Atk.Bns."+25','"Fast Cast"+5','INT+4 MND+4',}},
neck="Eddy Necklace",
waist="Othila Sash",
left_ear="Friomisi Earring",
right_ear="Hecate's Earring",
left_ring="Fenrir Ring +1",
right_ring="Fenrir Ring +1",
back="Toro Cape",
}
sets.midcast['Dark Magic'] = {main="ngqoqwanb", sub="mephitis grip",
head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Piety Duckbills +1"}
-- Custom spell classes
sets.midcast.MndEnfeebles = {
main={ name="Twebuliij", augments={'MP+60','Mag. Acc.+15','MND+12',}},
sub="Mephitis Grip",
ammo="Pemphredo Tathlum",
body="Respite Cloak",
hands="Lurid Mitts",
legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
feet={ name="Medium's Sabots", augments={'MP+40','MND+6','"Conserve MP"+5','"Cure" potency +3%',}},
neck="Imbodla Necklace",
waist="Ovate Rope",
left_ear="Enchntr. Earring +1",
right_ear="Gwati Earring",
left_ring="Levia. Ring +1",
right_ring="Levia. Ring +1",
back="Ogapepo Cape",
}
sets.midcast.IntEnfeebles = {
main={ name="Twebuliij", augments={'MP+60','Mag. Acc.+15','MND+12',}},
sub="Benthos Grip",
ammo="Oreiad's Tathlum",
head={ name="Artsieq Hat", augments={'MP+30','Mag. Acc.+20','MND+7',}},
body="Vanir Cotehardie",
hands="Lurid Mitts",
legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
feet={ name="Piety Duckbills +1", augments={'Enhances "Protectra V" effect',}},
neck="Imbodla Necklace",
waist="Ovate Rope",
left_ear="Lifestorm Earring",
right_ear="Psystorm Earring",
left_ring="Levia. Ring +1",
right_ring="Levia. Ring +1",
back="Merciful Cape",
}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main=gear.Staff.HMP,
body="Gendewitha Bliaut",hands="Serpentes Cuffs",
waist="Austerity Belt",legs="Nares Trews",feet="Chelona Boots +1"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {
main="Bolelabunga",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Homiliary",
body="Respite Cloak",
hands={ name="Chironic Gloves", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Haste+1','CHR+3','"Mag.Atk.Bns."+13',}},
legs="Assid. Pants +1",
feet={ name="Piety Duckbills +1", augments={'Enhances "Protectra V" effect',}},
neck="Bathy Choker",
waist="Slipor Sash",
left_ear="Infused Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Paguroidea Ring",
right_ring="Sheltered Ring",
back="Kumbira Cape",
}
sets.idle.PDT = {main="owleyes", sub="Genbu's Shield",ammo="sihirik",
head="wivre hairpin",neck="twilight torque",ear1="ethereal Earring",ear2="Loquacious Earring",
body="gendewitha bliaut",hands="Serpentes Cuffs",ring1="dark Ring",ring2="dark Ring",
back="shadow mantle",waist="slipor sash",legs="Nares Trews",feet="serpentes sabots"}
sets.idle.Town = {
main="Bolelabunga",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Homiliary",
body="Respite Cloak",
hands={ name="Chironic Gloves", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Haste+1','CHR+3','"Mag.Atk.Bns."+13',}},
legs="Assid. Pants +1",
feet={ name="Piety Duckbills +1", augments={'Enhances "Protectra V" effect',}},
neck="Bathy Choker",
waist="Slipor Sash",
left_ear="Infused Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Paguroidea Ring",
right_ring="Sheltered Ring",
back="Kumbira Cape",
}
sets.idle.Weak = {
main="Bolelabunga",
sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','Wind resistance+9',}},
ammo="Homiliary",
body="Respite Cloak",
hands={ name="Chironic Gloves", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Haste+1','CHR+3','"Mag.Atk.Bns."+13',}},
legs="Assid. Pants +1",
feet={ name="Piety Duckbills +1", augments={'Enhances "Protectra V" effect',}},
neck="Bathy Choker",
waist="Slipor Sash",
left_ear="Infused Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Paguroidea Ring",
right_ring="Sheltered Ring",
back="Kumbira Cape",
}
-- Defense sets
sets.defense.PDT = {main=gear.Staff.PDT,sub="Achaq Grip",
head="Gendewitha Caubeen",neck="Twilight Torque",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Umbra Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.defense.MDT = {main=gear.Staff.PDT,sub="Achaq Grip",
head="Nahtirah Hat",neck="Twilight Torque",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Tuilha Cape",legs="Bokwus Slops",feet="Gendewitha Galoshes"}
sets.Kiting = {feet="Herald's Gaiters"}
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
-- Basic set for if no TP weapon is defined.
sets.engaged = {
head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Vanir Cotehardie",hands="Dynasty Mitts",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Umbra Cape",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Divine Caress'] = {hands="Orison Mitts +2",back="Mending Cape"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
-- 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)
local map = spell_maps[spell.en]
if map == 'Cure' and player.sub_job == "SCH" and not buffactive.Aurorastorm then
add_to_chat(123,'Aurorastorm not active.')
windower.play_sound('C:\\Program Files (x86)\\Windower4\\addons\\GearSwap\\data\\wav\\Chime.wav')
end
if map == 'Curaga' and player.sub_job == "SCH" and not buffactive.Aurorastorm then
add_to_chat(123,'Aurorastorm not active.')
windower.play_sound('C:\\Program Files (x86)\\Windower4\\addons\\GearSwap\\data\\wav\\Chime.wav')
end
if spell.english == "Paralyna" and buffactive.Paralyzed then
eventArgs.handled = true
end
if spell.skill == 'Healing Magic' then
gear.default.obi_back = "Mending Cape"
else
gear.default.obi_back = "toro caoe"
end
end
--[[function job_precast(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = true
end
end]]
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Apply Divine Caress boosting items as highest priority over other gear, if applicable.
if spellMap == 'StatusRemoval' and buffactive['Divine Caress'] then
equip(sets.buff['Divine Caress'])
end
if spellMap == 'Cure' or spellMap == 'Curaga' then
if spell.element == world.weather_element or spell.element==world.day_element then
equip(sets.midcast.CureWeather)
end
end
end
-- Return true if we handled the aftercast work. Otherwise it will fall back
-- to the general aftercast() code in Mote-Include.
function job_aftercast(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
end
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
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
state.Buff[buff] = gain
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
if cmdParams[1] == 'user' and not areas.Cities:contains(world.area) then
local needsArts =
player.sub_job:lower() == 'sch' and
not buffactive['Light Arts'] and
not buffactive['Addendum: White'] and
not buffactive['Dark Arts'] and
not buffactive['Addendum: Black']
if not buffactive['Afflatus Solace'] and not buffactive['Afflatus Misery'] then
if needsArts then
send_command('@input /ja "Afflatus Solace" <me>;wait 1.2;input /ja "Light Arts" <me>')
else
send_command('@input /ja "Afflatus Solace" <me>')
end
end
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'OffenseMode' then
if newValue == 'Normal' then
disable('main','sub')
else
enable('main','sub')
end
elseif stateField == 'Reset' then
if state.OffenseMode == 'None' then
enable('main','sub')
end
end
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
local defenseString = ''
if state.Defense.Active then
local defMode = state.Defense.PhysicalMode
if state.Defense.Type == 'Magical' then
defMode = state.Defense.MagicalMode
end
defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
end
local meleeString = ''
if state.OffenseMode == 'Normal' then
meleeString = 'Melee: Weapons locked, '
end
add_to_chat(122,'Casting ['..state.CastingMode..'], '..meleeString..'Idle ['..state.IdleMode..'], '..defenseString..
'Kiting: '..on_off_names[state.Kiting])
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
set_macro_page(4, 14)
end
Try this.
***What flippant said
Thanks, you and Flippant solved it for me!
By Calinari 2016-10-10 19:46:03
Can someone link an up to date blm lua so I can see how to add all the things I need to add.
One preferably as uncomplicated as possible. as long as it has a burst mode, free nuke mode, death mode, and obi rules + reive adoulin neck rule
Phoenix.Habar
Server: Phoenix
Game: FFXI
Posts: 19
By Phoenix.Habar 2016-10-15 12:59:04
Hello~
Getting this error whenever equip new ambuscade gear, anyone have the same issue?
Lua runtime error: gearswap/equip_proccesing.lua:268: attempt to index field '?' (a nil value)
Valefor.Sehachan
Server: Valefor
Game: FFXI
Posts: 24219
By Valefor.Sehachan 2016-10-15 14:08:07
Hellow~
I'm making a gs file for my nin and have a question:
I'm doing the rules for ninjutsu, is there a way to include them all instead of writing them one at a time?
Phoenix.Habar
Server: Phoenix
Game: FFXI
Posts: 19
By Phoenix.Habar 2016-10-15 16:06:55
Hello~
Getting this error whenever equip new ambuscade gear, anyone have the same issue?
Lua runtime error: gearswap/equip_proccesing.lua:268: attempt to index field '?' (a nil value)
If anyone has the same issue or similar, seems that some people don't get they're windower resources automatically updated.
You can download them in the links below:
https://github.com/Windower/Resources/tree/master/lua
http://resources.windower.net/live/lua/
Server: Valefor
Game: FFXI
Posts: 19647
By Valefor.Prothescar 2016-10-15 18:45:37
Hellow~
I'm making a gs file for my nin and have a question:
I'm doing the rules for ninjutsu, is there a way to include them all instead of writing them one at a time?
if spell.skill == 'Ninjutsu' then
equip(setnamehere)
end
Server: Asura
Game: FFXI
Posts: 84
By Asura.Bloodlusty 2016-10-16 07:16:28
Can anyone let me know the command to see in the chat log when you change gears. I.e
Fastcast Cure
Midcast Cure
Idle
Do I need to write it into the file or its it a simple command that needs to be toggled?
Server: Asura
Game: FFXI
Posts: 3
By Asura.Mirlikovir 2016-10-16 07:20:02
//gs showswaps
Same command to remove it.
Server: Asura
Game: FFXI
Posts: 84
By Asura.Bloodlusty 2016-10-16 07:32:02
Ok that's works but its a bit much. Still shows the correct gear is changing, so thank you :P
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.
|
|