|
Gearswap Support Thread
By Selindrile 2016-12-15 14:44:09
@Psycooo
@Kvazz
You both may or may not be interested in my updated versions of Mote's files, I remember modifying the way Utsusemi cancels work.
https://www.dropbox.com/sh/8l6m0lfpgw59ycc/AABZn4T7gVphpX77wetsAx45a?dl=0
Psycooo if you specifically just want to get yours working though without changing over, it should be in: Mote-Utility.lua at line 43 if you haven't modified it and you want to see what's up.
Bahamut.Guapa
Serveur: Bahamut
Game: FFXI
Posts: 15
By Bahamut.Guapa 2016-12-16 04:16:38
Hey guy. In most of my Lua between SCH BLM GEO, I have a bunch of binds. I cant figure out but in all of them I also have :
function user_unload()
send_command('unbind ^f1')
send_command('unbind ^f9')
send_command('unbind ^f10')
send_command('unbind ^f11')
end
how ever i am now on thief and all my SCH binds are active. As far as I can tell the unload function isnt working.
By Selindrile 2016-12-16 09:25:26
I actually noticed that I had broken that and fixed it last night, but I haven't uploaded it to dropbox yet, if you wait about 30 minutes from this post and redownload, it should work.
I do make changes every so often, so if anything stops working after an update, feel free to PM me on here with the problem or with a messenger and if I missed something I'm happy to fix it, and if you need help figuring out something that changed happy to help.
Update: Everything should be updated on my dropbox.
Now seperated into:
user_unload() - Put in your character-globals to unbind whatever you want whenever you unload any job/gearswap on that character.
job_unload() - Put in your specific job_gear files to unbind buttons you specifically bound to this job/character.
Bahamut.Guapa
Serveur: Bahamut
Game: FFXI
Posts: 15
By Bahamut.Guapa 2016-12-16 17:53:44
Now seperated into:
user_unload() - Put in your character-globals to unbind whatever you want whenever you unload any job/gearswap on that character.
job_unload() - Put in your specific job_gear files to unbind buttons you specifically bound to this job/character.[/quote]
I only have on character. So i should just make all the swaps with Job_unload? I am not sure i understood you ><
By Selindrile 2016-12-16 18:09:43
You know how there are global binds in your character-globals.lua file? Those are automatically unloaded now, somewhere else, but if you add anything for all your jobs, like for example you add:
bind ^w input /ma "Warp" <me>
That would work on all your jobs on that character.
Put user_unload() into your character-globals.lua
And you would put
unbind ^w
there, and if you unloaded gearswap, that would unbind ^w.
But for example your character_warrior_gear.lua you add
bind @p input /ja "Provoke" <t>
You only want that on warrior in the warrior lua, if you add
job_unload()
unbind @p
That only needs to be unbound whenever you are unloading the warrior job file.
Bahamut.Guapa
Serveur: Bahamut
Game: FFXI
Posts: 15
By Bahamut.Guapa 2016-12-17 00:32:46
You know how there are global binds in your character-globals.lua file? Those are automatically unloaded now, somewhere else, but if you add anything for all your jobs, like for example you add:
bind ^w input /ma "Warp" <me>
That would work on all your jobs on that character.
Put user_unload() into your character-globals.lua
And you would put
unbind ^w
there, and if you unloaded gearswap, that would unbind ^w.
But for example your character_warrior_gear.lua you add
bind @p input /ja "Provoke" <t>
You only want that on warrior in the warrior lua, if you add
job_unload()
unbind @p
That only needs to be unbound whenever you are unloading the warrior job file.
Perfect. I will mess around with this ^^ thanks alot
[+]
Serveur: Odin
Game: FFXI
Posts: 42
By Odin.Psycooo 2016-12-17 01:27:33
@Psycooo
@Kvazz
You both may or may not be interested in my updated versions of Mote's files, I remember modifying the way Utsusemi cancels work.
https://www.dropbox.com/sh/8l6m0lfpgw59ycc/AABZn4T7gVphpX77wetsAx45a?dl=0
Psycooo if you specifically just want to get yours working though without changing over, it should be in: Mote-Utility.lua at line 43 if you haven't modified it and you want to see what's up.
maybe I did something screwed up, but when I tried messing with some of this it didn't work even with only 1 shadow
Odin.Lygre
Serveur: Odin
Game: FFXI
Posts: 89
By Odin.Lygre 2016-12-17 05:42:25
Code res = require('resources')
function job_precast(spell, action, spellMap, eventArgs)
cancel_utsusemi(spell, eventArgs)
end
function cancel_utsusemi(spell, action, spellMap, eventArgs)
if spell.english:contains('Utsusemi') then
local spell_recasts = windower.ffxi.get_spell_recasts()
if spell_recasts[spell.recast_id] > 0 then
add_to_chat(123,'Abort: Spell waiting on recast.')
eventArgs.cancel = true
return
end
end
local buffs = windower.ffxi.get_player().buffs
for _,bid in pairs(buffs) do
local buffname = res.buffs[bid].en
if buffname:contains('Copy Image') then
windower.ffxi.cancel_buff(bid)
break
end
end
end
this works for me. can add a delay if you want
[+]
By Brynach 2016-12-25 03:24:02
I am having trouble figuring out how to have certain gear equip when doom or curse is present.
http://pastebin.com/3MJf3vif
Ive added to the functions for job_setup, job_buff_change, and even customize_idle_set, but the lua doesn't swap in gear sets 'sets.Doom' or 'sets.Curse' whether I am engaged or idle.
Thanks in advance for any assistance
By Selindrile 2016-12-25 19:06:02
For Mote's versions, if you want it to be when you're engaged or have defense modes on as well you also have to add similar changes to customize_melee_set and customize_defense_set, if you need examples you can check the way I did this in my versions (With notepad++ search the files in my libs for the function names.)
Bahamut.Ballzack
Serveur: Bahamut
Game: FFXI
Posts: 54
By Bahamut.Ballzack 2016-12-27 02:37:46
Anyone have a triple shot rule for a mote version cor file?
By Selindrile 2016-12-28 06:05:21
@Ballzack I added that to mine recently.
Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Ranged Attack' and buffactive['Triple Shot'] then
equip(sets.buff['Triple Shot'])
end
end
Bahamut.Ballzack
Serveur: Bahamut
Game: FFXI
Posts: 54
By Bahamut.Ballzack 2016-12-28 23:22:59
@Selindrile Your awesome thanks!
[+]
Serveur: Odin
Game: FFXI
Posts: 42
By Odin.Psycooo 2016-12-29 14:36:17
Code res = require('resources')
function job_precast(spell, action, spellMap, eventArgs)
cancel_utsusemi(spell, eventArgs)
end
function cancel_utsusemi(spell, action, spellMap, eventArgs)
if spell.english:contains('Utsusemi') then
local spell_recasts = windower.ffxi.get_spell_recasts()
if spell_recasts[spell.recast_id] > 0 then
add_to_chat(123,'Abort: Spell waiting on recast.')
eventArgs.cancel = true
return
end
end
local buffs = windower.ffxi.get_player().buffs
for _,bid in pairs(buffs) do
local buffname = res.buffs[bid].en
if buffname:contains('Copy Image') then
windower.ffxi.cancel_buff(bid)
break
end
end
end
this works for me. can add a delay if you want
This worked for me as well thank you.
Side note, how would I add a delay to this without messing it up?
Serveur: Leviathan
Game: FFXI
Posts: 10
By Leviathan.Bigrougabagel 2016-12-29 16:37:26
Hey all. Very new to GS, so I may have screwed up something really basic here, but I am not getting any ring swaps at all in my geo lua.
sets.midcast.Cure = {
main="Tefnut Wand",
sub="Sors Shield",
range={ name="Dunna", augments={'MP+20','Mag. Acc.+10','"Fast Cast"+3',}},
head="Azimuth Hood",
body="Heka's Kalasiris",
hands="Telchine Gloves",
legs="Assiduity Pants",
feet="Geomancy Sandals",
neck="Colossus's Torque",
waist="Witful Belt",
left_ear="Gifted Earring",
right_ear="Loquac. Earring",
left_ring="Sirona's Ring",
right_ring="Aqua Ring",
back="Shadow Mantle",
}
For example, this is my cure set, and no matter where the rings are located (inventory, wardrobe), they do not come in. I have enfeeble and elemental sets that are similar but with different rings. I basically get no ring swaps at all in this lua. Is there some basic function that is required to be able to swap rings that I maybe broke?
Edit: I didnt explicitly state that all the other gear is changing. Only the rings do not change.
By Selindrile 2016-12-29 19:26:20
Are those rings working in other sets? Because this looks okay.
Serveur: Lakshmi
Game: FFXI
Posts: 97
By Lakshmi.Ashtopcat 2016-12-29 19:52:57
how are you checking? showswaps or visually? cos if it's visually then you might be too slow and it will already be back to idle (or they are your idle rings and not showing up if you are using showswaps)
//gs showswaps on (in case you didn't know)
[+]
Serveur: Leviathan
Game: FFXI
Posts: 10
By Leviathan.Bigrougabagel 2016-12-29 20:24:58
It's not changing any rings. If I start with no rings equipped, I can hit every spell that should trigger a swap, and still have no rings on.
By Selindrile 2016-12-29 20:29:52
Sounds like rings are disabled for some reason, I dunno what gearswap you are using, but try //gs enable all, if it swaps then search your GS for what could be disabling them.
Serveur: Leviathan
Game: FFXI
Posts: 10
By Leviathan.Bigrougabagel 2016-12-29 21:10:39
Sounds like rings are disabled for some reason, I dunno what gearswap you are using, but try //gs enable all, if it swaps then search your GS for what could be disabling them.
This worked. I'll have to dig through and find where it's disabled. Thanks for the help.
[+]
By Slurm818 2016-12-30 17:55:16
Can I get some assistance? I am brand new to GS and have no clue what I am doing wrong here...
Error message is GearSwap/Data/Earwig_COR.lua:34: ']' expected near 's'
Here is my pastebin; http://pastebin.com/qz9xafnV
Thanks, I'm at a loss
Asura.Thorva
Serveur: Asura
Game: FFXI
By Asura.Thorva 2016-12-30 18:06:24
Can I get some assistance? I am brand new to GS and have no clue what I am doing wrong here...
Error message is GearSwap/Data/Earwig_COR.lua:34: ']' expected near 's'
Here is my pastebin; http://pastebin.com/qz9xafnV
Thanks, I'm at a loss
Don't quote me, but I think your
['Tactician's Roll']
['Courser's Roll']
['Blitzer's Roll']
should actually have " instead of '
By Selindrile 2016-12-30 21:33:36
@Slurm818 @Thorva
Thorva is right, you can't use the same symbol (' or ") both inside and out without an escape character, you can do it either like:
["Tactician's Roll"]
["Courser's Roll"]
["Blitzer's Roll"]
Or like:
['Tactician\'s Roll']
['Courser\'s Roll']
['Blitzer\'s Roll']
By Slurm818 2016-12-31 05:27:55
@Slurm818 @Thorva
Thorva is right, you can't use the same symbol (' or ") both inside and out without an escape character, you can do it either like:
["Tactician's Roll"]
["Courser's Roll"]
["Blitzer's Roll"]
Or like:
['Tactician\'s Roll']
['Courser\'s Roll']
['Blitzer\'s Roll']
Thank you both so much..I'll fix this as soon as I get home from New Years. Huge help, I really appreciate it!
[+]
Serveur: Asura
Game: FFXI
Posts: 34
By Asura.Taruranto 2017-01-01 13:34:07
Trying to make a separate set for helix, I got
Code sets.precast.Helix = sets.precast.FC
Code sets.midcast.Helix = {
main="Akademos",
sub="Niobid strap",
ammo="ghastly tathlum +1",
head="Merlinic hood",
body="Merlinic Jubbah",
hands="Amalric gages",
legs="Merlinic shalwar",
feet="Merlinic crackows",
neck="Eddy necklace",
waist="Refoccilation stone",
left_ear="Friomisi earring",
right_ear="Barkarole earring",
left_ring="Fenrir ring +1",
right_ring="Weatherspoon Ring",
back="Lugh's cape",
ammo="ghastly tathlum +1",
}
It still casts it the current selected Elemental Nuking set.
I think it's because "Helix" spells are not listed anywhere in my lua so I tried adding
Code if spell.skill=="ElementalMagic" then
if string.find(spell.english,'helix') then
equip(sets['midcast_Helix'])
end
end
But still nothing. I guess the code is wrong or I'm placing it at the wrong place.
Odin.Lygre
Serveur: Odin
Game: FFXI
Posts: 89
By Odin.Lygre 2017-01-01 14:06:17
Code if spell.skill=="ElementalMagic" then
if string.find(spell.english,'helix') then
equip(sets.midcast.Helix)
end
end
but if you're using Mote's include and have Helix II spells added to the mappings file, this piece shouldn't be necessary
Serveur: Asura
Game: FFXI
Posts: 34
By Asura.Taruranto 2017-01-01 17:33:01
Code if spell.skill=="ElementalMagic" then
if string.find(spell.english,'helix') then
equip(sets.midcast.Helix)
end
end
but if you're using Mote's include and have Helix II spells added to the mappings file, this piece shouldn't be necessary
Yeaaaah, all in order now. Thanks!
To be honest, I'd like to have 2 sets for helix, one of normal and one for MB, but I'm not sure how do to that exactly?
Something like it casts it with the normal set but if state.CastingMode:options('MB') then it casts it with the MB set?
I have 3 casting states for elemental magic, state.CastingMode:options('Normal', 'Resistant', 'MB').
Odin.Lygre
Serveur: Odin
Game: FFXI
Posts: 89
By Odin.Lygre 2017-01-02 03:14:32
I use a boolean state variable to trigger a set of rules in post_midcast that process through any magic_burst sets applicable and overlay those on top of the normal set it would use
Code
state.MagicBurst = M(false, 'Magic Burst')
sets.magic_burst = {}
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
if string.find(spell.english,'helix') then
equip(sets.midcast.Helix)
else
equip(sets.Obi)
end
end
if state.MagicBurst.value and sets.magic_burst then
local equipSet = sets.magic_burst
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[spellMap] then
equipSet = equipSet[spellMap]
end
if equipSet[state.CastingMode.value] then
equipSet = equipSet[state.CastingMode.value]
end
equip(equipSet)
end
end
end
end
Serveur: Asura
Game: FFXI
Posts: 34
By Asura.Taruranto 2017-01-02 16:51:42
I use a boolean state variable to trigger a set of rules in post_midcast that process through any magic_burst sets applicable and overlay those on top of the normal set it would use
Code
state.MagicBurst = M(false, 'Magic Burst')
sets.magic_burst = {}
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
if string.find(spell.english,'helix') then
equip(sets.midcast.Helix)
else
equip(sets.Obi)
end
end
if state.MagicBurst.value and sets.magic_burst then
local equipSet = sets.magic_burst
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[spellMap] then
equipSet = equipSet[spellMap]
end
if equipSet[state.CastingMode.value] then
equipSet = equipSet[state.CastingMode.value]
end
equip(equipSet)
end
end
end
end
I remember reading about this, but I'm too used using this setup... I'll have to waste a day figuring it, one of these days.
Is there a way to have a button toggling MB mode on-off?
Trying to insert this in my BLM lua I just modified now:
Code if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast['Elemental Magic']['Resistant']['MB'], {waist="Hachirin-No-Obi"})
end
if state.CastingMode.value == 'Normal' then
if spell.element == world.day_element then
equip(sets.midcast['Elemental Magic'], {right_ring="Zodiac ring"})
end
if spell.element == 'Earth' then
equip(sets.midcast['Elemental Magic'], {neck="Quanpur Necklace"})
end
end
I know it works because I got it here and SCH/GEO lua run this fine.
But the BLM lua just either states the value is nil or doesn't run it at all: 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()
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', 'MB')
state.IdleMode:options('Normal', 'PDT')
lowTierNukes = 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',
'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}
-- Additional local binds
send_command('bind ^` input /ma Stun <t>')
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind @`')
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['Mana Wall'] = {feet="Goetia Sabots +2"}
sets.precast.JA.Manafont = {body="Sorcerer's Coat +2"}
-- equip to maximize HP (for Tarus) and minimize MP loss before using convert
sets.precast.JA.Convert = {}
-- Fast cast sets for spells
sets.precast.FC = {
main="Sucellus",
sub="Chanter's Shield",
head="Nahtirah Hat",
ammo="Incantor stone",
body="Merlinic Jubbah",
legs="Lengo pants",
feet="Amalric nails",
waist="Witful Belt",
left_ear="Loquacicous Earring",
right_ear="Etiolation earring",
left_ring="Prolix Ring",
right_ring="weatherspoon ring",
back="Swith cape",
}
sets.precast.FC['Enhancing Magic'] = sets.precast.FC
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {neck="Stoicheion Medal"})
sets.precast.FC.Cure = set_combine(sets.precast.FC, {
main="Serenity",
sub="Clerisy strap",
back="Pahtli Cape",
})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.Stoneskin = set_combine(sets.precast.FC, {
head="Umuthi Hat",
})
sets.precast.FC.Curaga = sets.precast.FC.Cure
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
head="Hagondes Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="Icesoul Ring",
back="Refraction Cape",waist="Cognition Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Vidohunir'] = {ammo="Dosis Tathlum",
head="Hagondes Hat",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Acumen Ring",
back="Toro Cape",waist="Thunder Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
---- Midcast Sets ----
sets.midcast.FastRecast = sets.precast.FC
sets.midcast.Regen = set_combine(sets.midcast.fastcast, {
main="bolelabunga",
back="Tempered cape +1",
body="Telchine Chas."})
sets.midcast.Cure = {
main="Serenity",
sub="Clerisy strap",
head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
body="Vanya Robe",
hands="Telchine gloves",
legs="Vanya slops",
ammo="Kalboron stone",
feet="Medium's sabots",
neck="Incanter's torque",
left_ear="Lempo earring",
right_ear="Magnetic Earring",
left_ring="Ephedra Ring",
right_ring="Sirona's ring",
back="Tempered cape +1",
}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Refresh = set_combine(sets.midcast['Enhancing Magic'], {
back="Gishdubar ash"})
sets.midcast['Enhancing Magic'] ={
main="Solstice",
sub="Culminus",
head="Befouled crown",
hands="bagua mitaines",
body="Telchine Chas.",
legs="Lengo pants",
feet="Medium's sabots",
neck="Melic torque",
waist="Cascade belt",
back="Perimede Cape",
left_ear="Andoaa Earring",
right_ear="Magnetic Earring",
}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {
head="Befouled crown",
neck="Nodens gorget",
waist="siegel sash",
right_ear="Earthcry Earring",
})
sets.midcast['Enfeebling Magic'] = {
main="Marin staff +1",
sub="Mephitis grip",
head="Befouled crown",
body="Shango robe",
hands="Pedagogy bracers",
legs="Psycloth lappas",
feet="Medium's sabots",
neck="imbodla necklace",
waist="ovate rope",
left_ear="Gwati Earring",
right_ear="Barkaro. Earring",
ammo="Kalboron stone",
left_ring="levia. ring",
right_ring="weather. ring",
back="Lugh's cape",
}
sets.midcast.ElementalEnfeeble = set_combine(sets.midcast['Enfeebling Magic'], {left_ring="Fenrir Ring +1",
})
sets.midcast['Dark Magic'] = {
main="Rubicundity",
sub="Culminus",
ammo="ghastly tathlum +1",
head="Merlinic hood",
body="Psycloth vest",
hands="Merlinic Dastanas",
legs="Merlinic shalwar",
feet="Medium's sabots",
neck="Incanter's torque",
waist="Ovate rope",
left_ear="Abyssal Earring",
right_ear="Barkarole earring",
left_ring="Fenrir ring +1",
right_ring="Evanescence ring",
back="Perimede cape",
}
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {
main="Rubicundity",
sub="Culminus",
body="Psycloth vest",
hands="Merlinic Dastanas",
head="Merlinic Hood",
feet="Merlinic crackows",
waist="Fucho-no-obi",
left_ear="Abyssal Earring",
left_ring="Excelsis Ring",
})
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Sturm's Report",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Witful Belt",legs="Orvail Pants +1",feet="Bokwus Boots"}
sets.midcast.BardSong = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Sturm's Report",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Refraction Cape",legs="Bokwus Slops",feet="Bokwus Boots"}
-- Elemental Magic sets
-- Elemental Magic sets
sets.midcast['Elemental Magic'] = {
main="Lathi",
sub="Niobid strap",
ammo="ghastly tathlum +1",
head="Merlinic hood",
body="Merlinic Jubbah",
hands="Amalric gages",
legs="Merlinic shalwar",
feet="Merlinic crackows",
neck="Eddy necklace",
waist="Refoccilation stone",
left_ear="Friomisi earring",
right_ear="Barkarole earring",
left_ring="Fenrir ring +1",
right_ring="Weatherspoon Ring",
back="Taranus's Cape",
ammo="ghastly tathlum +1",
}
sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {
left_ear="Gwati earring",
sub="Niobid strap",
body="Merlinic Jubbah",
hands="Amalric gages",
left_ring="Resonance ring",
legs="Merlinic shalwar",
neck="Incanter's torque",
ammo="Kalboron stone",
})
sets.midcast['Elemental Magic'].HighTierNuke = sets.midcast['Elemental Magic']
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = sets.midcast['Elemental Magic'].Resistant
sets.midcast['Elemental Magic'].MB = set_combine(sets.midcast['Elemental Magic'], {
body="Merlinic Jubbah",
feet="Merlinic crackows",
hands="Amalric gages",
legs="Merlinic shalwar",
neck="Mizukage-no-Kubikazari",
left_ring="Locus Ring",
right_ring="Mujin band",
})
sets.midcast['Elemental Magic'].HighTierNuke.MB = sets.midcast['Elemental Magic'].MB
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {
main="Bolelabunga",
head="Befouled crown",
sub="Genbu's Shield",
ammo="Homiliary",
body="Jhakri robe +1",
hands="Shrieker's cuffs",
legs="Lengo pants",
feet="Amalric nails",
neck="Twilight Torque",
waist="Fucho-no-Obi",
left_ear="Etiolation Earring",
right_ear="Moonshade earring",
left_ring="Sheltered Ring",
right_ring="Defending ring",
back="Kumbira Cape",
}
-- Idle sets
-- Normal refresh idle set
sets.idle = {
main="Bolelabunga",
head="Befouled crown",
sub="Genbu's Shield",
ammo="Homiliary",
body="Jhakri robe +1",
hands="Shrieker's cuffs",
legs="Lengo pants",
feet="Amalric nails",
neck="Twilight Torque",
waist="Fucho-no-Obi",
left_ear="Etiolation Earring",
right_ear="Moonshade earring",
left_ring="Sheltered Ring",
right_ring="Defending ring",
back="Kumbira Cape",
}
-- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
sets.idle.PDT = {
main="Terra's staff",
sub="Irenic strap",
head="Hagondes Hat +1",
neck="Twilight Torque",
ear1="Etiolation Earring",
ear2="Odnowa Earring +1",
body="Hagondes Coat +1",
hands="Amaric nails",
ring1="Fortified Ring",
ring2="defending ring",
back="Kumbira cape",
waist="slipor sash",
legs="vanya slops",
feet="Amalric nails"}
-- Idle mode scopes:
-- Idle mode when weak.
sets.idle.Weak = {
main="Bolelabunga",
head="Befouled crown",
sub="Genbu's Shield",
ammo="Homiliary",
body="Jhakri robe +1",
hands="Shrieker's cuffs",
legs="Lengo pants",
feet="Amalric nails",
neck="Twilight Torque",
waist="Fucho-no-Obi",
left_ear="Etiolation Earring",
right_ear="Moonshade earring",
left_ring="Sheltered Ring",
right_ring="Defending ring",
back="Kumbira Cape",
}
-- Town gear.
sets.idle.Town = {
main="Bolelabunga",
head="Befouled crown",
sub="Genbu's Shield",
ammo="Homiliary",
body="Jhakri robe +1",
hands="Shrieker's cuffs",
legs="Lengo pants",
feet="Amalric nails",
neck="Twilight Torque",
waist="Fucho-no-Obi",
left_ear="Etiolation Earring",
right_ear="Moonshade earring",
left_ring="Sheltered Ring",
right_ring="Defending ring",
back="Kumbira Cape",
}
-- Defense sets
sets.defense.PDT = {
main="Terra's staff",
sub="Irenic strap",
head="Hagondes Hat +1",
neck="Twilight Torque",
ear1="Etiolation Earring",
ear2="Odnowa Earring +1",
body="Hagondes Coat +1",
hands="Amaric nails",
ring1="Fortified Ring",
ring2="defending ring",
back="Kumbira cape",
waist="slipor sash",
legs="vanya slops",
feet="Amalric nails"}
sets.defense.MDT = set_combine(sets.defense.PDT, {
head="Vanya hood",
body="Vanya robe",
})
sets.Kiting = {feet="Herald's Gaiters"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Mana Wall'] = {feet="Goetia Sabots +2"}
-- 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 = {
head="Zelus Tiara",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Hagondes Coat",hands="Bokwus Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Umbra Cape",waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
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.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if spellMap == 'Cure' or spellMap == 'Curaga' then
gear.default.obi_waist = "Goading Belt"
elseif spell.skill == 'Elemental Magic' then
gear.default.obi_waist = "Hachi-no-Obi"
if state.CastingMode.value == 'Proc' then
classes.CustomClass = 'Proc'
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
end
function job_aftercast(spell, action, spellMap, eventArgs)
-- Lock feet after using Mana Wall.
if not spell.interrupted then
if spell.english == 'Mana Wall' then
enable('feet')
equip(sets.buff['Mana Wall'])
disable('feet')
end
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)
-- Unlock feet when Mana Wall buff is lost.
if buff == "Mana Wall" and not gain then
enable('feet')
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.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
--[[ No real need to differentiate with current gear.
if lowTierNukes:contains(spell.english) then
return 'LowTierNuke'
else
return 'HighTierNuke'
end
--]]
end
end
-- 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 to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(1, 15)
end
Thanks.
I've been trying all afternoon trying to make it work but no avail. ._.
By Sidra 2017-01-02 22:20:52
So - a player named Braden made a nice simple DRG .lua that I have been using. I have never programmed anything in my life, so I liked the idea of a relatively simple lua. However, I have found some things in other luas I liked and tried to add them in but couldn't get anything to work - so I deleted what I added. However, I must have accidentally messed something up - as now After using a WS and the breath gear going in, it doesn't swap back to my TP gear. Can anyone see what I did? (and for special bonus - get the macro page based on Subjo to work)
Code function user_setup()
select_default_macro_book()
end
-- Get Sets: Everything in this section is run as soon as you change jobs.
function get_sets()
sets = {}
petcast = false
-- Regular Sets --
sets.Idle = {sub="Nepenthe Grip +1",
ammo="Ginsen",
head={ name="Valorous Mask", augments={'Accuracy+23 Attack+23','Crit.hit rate+2','VIT+7','Accuracy+15','Attack+8',}},
body={ name="Despair Mail", augments={'Attack+25','Mag. Evasion+20','"Dbl.Atk."+3',}},
hands="Sulev. Gauntlets +1",
legs={ name="Valor. Hose", augments={'Accuracy+29','"Dbl.Atk."+4','VIT+3','Attack+10',}},
feet="Flam. Gambieras +1",
neck="Lissome necklace",
waist="Ioskeha Belt",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Warp Ring",
right_ring="Shneddick Ring",
back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},}
sets.TP = {sub="Nepenthe Grip +1",
ammo="Ginsen",
head="Flam. Zucchetto +1",
body={ name="Despair Mail", augments={'Attack+25','Mag. Evasion+20','"Dbl.Atk."+3',}},
hands="Sulev. Gauntlets +1",
legs={ name="Valor. Hose", augments={'Accuracy+29','"Dbl.Atk."+4','VIT+3','Attack+10',}},
feet="Flam. Gambieras +1",
neck="Lissome Necklace",
waist="Ioskeha Belt",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Chirich Ring",
right_ring="Petrov Ring",
back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},}
-- Can add a set for each WS by making a new set: sets.WS["Stardiver"] or sets.WS["Camlann's Torment"] for example
sets.WS = {}
sets.WS["Default"] = {sub="Nepenthe Grip +1",
ammo="Ginsen",
head="Sulevia's Mask +1",
body="Sulevia's Plate. +1",
hands="Sulev. Gauntlets +1",
legs="Sulevi. Cuisses +1",
feet="Sulev. Leggings +1",
neck="Lissome necklace",
waist="Ioskeha Belt",
left_ear="Bladeborn Earring",
right_ear="Steelflash Earring",
left_ring="Rajas Ring",
right_ring="Petrov Ring",
back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},}
sets.WS["Camlann's Torment"] = {sub="Nepenthe Grip +1",
ammo="Ginsen",
head="Sulevia's Mask +1",
body="Sulevia's Plate. +1",
hands="Sulev. Gauntlets +1",
legs="Sulevi. Cuisses +1",
feet="Sulev. Leggings +1",
neck="Fotia gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
right_ear="Kemas earring",
left_ring="Spiral Ring",
right_ring="Petrov Ring",
back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},}
sets.WS["Stardiver"] = {
ammo="Amar cluster",
head="Flam. Zucchetto +1",
body="Sulevia's Plate. +1",
hands="Sulev. Gauntlets +1",
legs="Sulevi. Cuisses +1",
feet="Flam. Gambieras +1",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Cessance Earring",
right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
left_ring="Apate Ring",
right_ring="Petrov Ring",
back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},}
sets.WS["Drakesbane"] = {sub="Nepenthe Grip +1",
ammo="Ginsen",
head={ name="Valorous Mask", augments={'Accuracy+23 Attack+23','Crit.hit rate+2','VIT+7','Accuracy+15','Attack+8',}},
body="Sulevia's Plate. +1",
hands="Flam. Manopolas +1",
legs="Sulevi. Cuisses +1",
feet="Sulev. Leggings +1",
neck="Fotia gorget",
waist="Fotia Belt",
left_ear="Bladeborn Earring",
right_ear="Steelflash Earring",
left_ring="Rajas Ring",
right_ring="Petrov Ring",
back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},}
sets.WS["Geirskogul"] = {sub="Nepenthe Grip +1",ammo="Ginsen",
head={ name="Valorous Mask", augments={'Attack+21','"Dbl.Atk."+3','DEX+7','Accuracy+10',}},
body="Flamma Korazin +1",
hands="Sulev. Gauntlets +1",
legs="Sulevi. Cuisses +1",
feet="Flam. Gambieras +1",
neck="Fotia gorget",
waist="Fotia Belt",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Apate Ring",
right_ring="Petrov Ring",
back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%',}},}
sets.WS["Shattersoul"] = {ammo="Ginsen",
head="Sulevia's Mask +1",
body="Sulevia's Plate. +1",
hands="Sulev. Gauntlets +1",
legs="Sulevi. Cuisses +1",
feet="Flam. Gambieras +1",
neck="Fotia gorget",
waist="Fotia Belt",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Spiral Ring",
right_ring="Apate Ring",
back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},}
sets.WS["Retribution"] = {ammo="Ginsen",
head="Sulevia's Mask +1",
body="Sulevia's Plate. +1",
hands="Sulev. Gauntlets +1",
legs="Sulevi. Cuisses +1",
feet="Flam. Gambieras +1",
neck="Fotia gorget",
waist="Fotia Belt",
left_ear="Ishvara Earring",
right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +25',}},
left_ring="Rajas Ring",
right_ring="Apate Ring",
back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},}
-- Job Ability Sets --
sets.JA = {}
sets.JA.Jump = {sub="Nepenthe Grip +1",
ammo="Ginsen",
head="Flam. Zucchetto +1",
body={ name="Despair Mail", augments={'Attack+25','Mag. Evasion+20','"Dbl.Atk."+3',}},
hands="Sulev. Gauntlets +1",
legs={ name="Valor. Hose", augments={'Accuracy+29','"Dbl.Atk."+4','VIT+3','Attack+10',}},
feet="Flam. Gambieras +1",
neck="Lissome Necklace",
waist="Ioskeha Belt",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Chirich Ring",
right_ring="Petrov Ring",
back={ name="Brigantia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},}
sets.JA.Angon = {ammo="Angon",hands="Ptero. Fin. Gaunt."}
-- Angon, Relic Hands, and that dumb earring in Mamook if you feel like it
sets.JA.AncientCircle = {legs="Vishap Brais +1"}
-- Ancient Circle normally: 3 minute duration, Damage+15% DT-15% DragonKiller+15% against Dragons (10% vs. NMs)
-- Ancient Circle with AF1: 4.5 minute duration, Damage+17% DT-17% DragonKiller+17% against Dragons (11% vs. NMs)
sets.JA.SpiritLink = {}
-- Spirit Link/Empathy gear go here; note that Relic Feet will cause a 100% Wyvern to still drain HP (unless leveling up
sets.JA.SpiritSurge = {}
-- Augmented Relic Body affects duration; Wyvern Max HP affects Spirit Surge's Max HP effect on you
sets.JA.SteadyWing = {legs="Vishap Brais +1"}
-- Wyvern Max HP strongly affects Steady Wing's Stoneskin effect
-- Casting Sets --
sets.FastCast = {}
-- Can add more FC and Quick Magic here for spells; AF1 Head recommended in case of GearSwap error, at least for faster spells
sets.Midcast = {}
-- AF1 Head strongly advised for Healing Breath trigger
-- HP or defensive stuff for Healing Breath; can use Fast Cast or Magic Acc. or whatever if you want too
sets.Breath = {head={ name="Ptero. Armet +1", augments={'Enhances "Deep Breathing" effect',}},
legs="Vishap Brais +1",
neck="Lancer's Torque",
waist="Glassblower's Belt",
back={ name="Updraft Mantle", augments={'STR+1','Pet: Breath+9','Pet: Damage taken -2%',}},}
-- Healing Breath is modified by Wyvern Max HP and Wyvern: Breath+
-- Elemental Breaths are modified by Wyvern Current HP, Wyvern: Breath+, and Pet: Magic Accuracy
-- Remove Status Breaths are presumably affected by nothing
end
-- Precast: JA and WS should be defined here, Fast Cast and such for magic.
function precast(spell)
if spell.type == "WeaponSkill" then
if sets.WS[spell.name] then -- If you made a set for a WS and then use it,
equip(sets.WS[spell.name]) -- it'll equip that set for that WS only
else
equip(sets.WS["Default"]) -- otherwise, it'll use this set instead
end
elseif spell.action_type == 'Magic' then
equip(sets.FastCast)
elseif spell.name == 'Dismiss' and pet.hpp < 100 then
cancel_spell() -- Dismiss resets the Call Wyvern recast IF your Wyvern is at 100% HP; sorry to anyone who just wanted to kill their wyvern for the fun of it
windower.add_to_chat(50,' '..pet.name..' is below full HP (<pethpp>), cancelling Dismiss!')
elseif spell.name == 'Call Wyvern' then
if pet.isvalid then
cancel_spell() -- Uses Spirit Link instead when your Wyvern is already present
send_command('input /ja "Spirit Link" <me>')
else
equip(sets.JA.SpiritSurge) -- Relic Body goes here; can just use Spirit Surge set if you have it augmented
end
elseif spell.name == 'Spirit Surge' then
equip(sets.JA.SpiritSurge)
elseif spell.name == 'Steady Wing' then
equip(sets.JA.SteadyWing)
elseif spell.name == 'Angon' then
equip(sets.JA.Angon)
elseif spell.name == 'Ancient Circle' then
equip(sets.JA.AncientCircle)
elseif spell.name == 'Spirit Link' then
if pet.isvalid then
equip(sets.JA.SpiritLink)
else
cancel_spell() -- Uses Call Wyvern instead when your Wyvern isn't present
send_command('input /ja "Call Wyvern" <me>')
end
elseif string.find(spell.name,"Jump") then -- Any spell or ability with the word Jump in it
if not pet.isvalid then -- If you don't have a pet
if spell.name == "Spirit Jump" then -- Forces Spirit Jump into regular Jump when Wyvern is dead
cancel_spell()
send_command('input /ja "Jump" <t>')
return
elseif spell.name == "Soul Jump" then -- Forces Soul Jump into High Jump when Wyvern is dead
cancel_spell()
send_command('input /ja "High Jump" <t>')
return
end
end
equip(sets.JA.Jump)
end
end
-- Midcast: For magic, this section affects your spell's potency, accuracy, etc. Unnecessary for JA/WS.
function midcast(spell)
if spell.action_type == 'Magic' then
equip(sets.Midcast)
end
end
-- Pet Change: Occurs when your Pet is summoned or killed.
function pet_change(pet,gain)
if gain == false and pet.name then
-- General announcement for when your Wyvern is killed, Dimissed, or eaten by Spirit Surge
windower.add_to_chat(50,' *** '..string.upper(pet.name)..' IS DEAD YO ***')
end
end
-- Pet Midcast: If GearSwap sees your pet readying a WS, this occurs
function pet_midcast(spell)
if string.find(spell.name,' Breath') then
petcast = true
equip_current()
windower.send_command('wait 1.2;gs c petcast')
-- Wyvern Breath Delay: 1.25s http://forum.square-enix.com/ffxi/threads/47481
-- pet_aftercast won't run if your Wyvern's WS is interrupted (disengaging, stunned, Amnesia, etc.), so I recommend this
end
end
-- Aftercast: Occurs following the use of any WS, JA, Spell, Item, or Ranged Attack
function aftercast(spell)
equip_current()
end
-- Status Change: When Engaging, Disengaging, Resting, Standing Up, etc.
function status_change()
equip_current()
end
-- Pet Status Change
function pet_status_change(new,old)
if new ~= "Engaged" then
petcast = false
end
end
-- A custom function that equips a set based on whether you're engaged or not.
function equip_current()
if player.status == 'Engaged' then
equip(sets.TP)
else
equip(sets.Idle)
end
if petcast == true then
equip(sets.Breath) -- This will equip your Breath gear on top of whichever other set you're currently wearing.
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 == 'WAR' then
set_macro_page(1, 14)
elseif player.sub_job == 'DRK' then
set_macro_page(10, 14)
elseif player.sub_job == 'SAM' then
set_macro_page(10, 14)
else
set_macro_page(10, 14)
end
-- Manual commands sent in-game with //gs c <command>
function self_command(command)
if command == 'petcast' and petcast then -- This command reverts to your regular gear 1.2 seconds after a Breath by default
petcast = false
equip_current()
end
end
end
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.
|
|