|
Gearswap Support Thread
Ragnarok.Flippant
サーバ: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2014-11-17 14:06:43
I just downloaded the AutoRA addon to take a look at the event this is occurring at, but I do not see that bit of code, only checking if less than 1000. Did you add a section within the same function to WS if you're above 1000?
Cerberus.Conagh
サーバ: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-11-17 15:22:57
Ragnarok.Flippant said: »I just downloaded the AutoRA addon to take a look at the event this is occurring at, but I do not see that bit of code, only checking if less than 1000. Did you add a section within the same function to WS if you're above 1000?
Nope.
Sorry typed rather tha copied, I want it to stop tping if I go above 1k tp with with flurry + coursers roll this does not worked, had it checked and confirmed by 3 other rngs in ls.
Cerberus.Rabies
サーバ: Cerberus
Game: FFXI
Posts: 57
By Cerberus.Rabies 2014-11-18 23:27:59
Just started using Gearswap, and I am overwhelmed to say the least. I have obtained a .lua and replaced my gear into the slots but for some reason I don't think it's working. When I weaponskill I try to open menu real quick to see if I can see the armor change but it doesn't occur. I can unequip everything and go to engage a monster and it will set my TP gear. Do I need autoexec or something rather than just Notepad++ and GS with a .lua?
By gdiShun 2014-11-18 23:30:18
'gs showswaps' in the Windower console to see if it's working.
Cerberus.Rabies
サーバ: Cerberus
Game: FFXI
Posts: 57
By Cerberus.Rabies 2014-11-18 23:35:12
'gs showswaps' in the Windower console to see if it's working.
Thanks, It seems to be working. I tried to google "GS commands" but I couldn't find any lists like I could with SC. Is there a list you know of?
Cerberus.Rabies
サーバ: Cerberus
Game: FFXI
Posts: 57
By Cerberus.Rabies 2014-11-18 23:40:35
I also have a question about this code:
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA.Meditate = {head="Myochin Kabuto",hands="Sakonji Kote"}
sets.precast.JA['Warding Circle'] = {head="Myochin Kabuto"}
sets.precast.JA['Blade Bash'] = {hands="Sakonji Kote"}
I understand what this is saying, and it really isn't a problem just more annoying, When im running around and use Meditate it'll switch to the proper Head+Gloves, but unlike SC it won't switch back to "Idle" set, any way to make it do so?
Maybe if I added
sets.aftercast.JA.Meditate = etc. (with idle head+hands)
Would this work?
サーバ: Sylph
Game: FFXI
Posts: 20
By Sylph.Googlebonker 2014-11-19 20:00:10
Hello! :D I'm new to GearSwap, so excuse me if this question or similar questions has/have been asked 50,000 times.
How do I make GearSwap make an exception?
I'm wanting to use a Devotion macro, but the program is working properly - EVERY time I use Cure V, it goes through the proper equipment sequence, but that means I can't use all of that HP-adding equipment to enhance my Devotion. The only thing I know to do is to unload GearSwap, use my macro, then reload GearSwap. lol
VIP
サーバ: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-11-19 20:13:01
Thanks, It seems to be working. I tried to google "GS commands" but I couldn't find any lists like I could with SC. Is there a list you know of? Check the spreadsheet that gets installed with it, Commands section.
VIP
サーバ: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-11-19 20:14:59
I also have a question about this code:
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA.Meditate = {head="Myochin Kabuto",hands="Sakonji Kote"}
sets.precast.JA['Warding Circle'] = {head="Myochin Kabuto"}
sets.precast.JA['Blade Bash'] = {hands="Sakonji Kote"}
I understand what this is saying, and it really isn't a problem just more annoying, When im running around and use Meditate it'll switch to the proper Head+Gloves, but unlike SC it won't switch back to "Idle" set, any way to make it do so?
Maybe if I added
sets.aftercast.JA.Meditate = etc. (with idle head+hands)
Would this work? Do you have your idle set defined? A skillchain will revert to a TP set after it's used, but if you're not engaged, it will usually look for an idle set. If you have no idle set, then obviously nothing's going to get reset after use.
Can't give a better answer without seeing your lua file.
VIP
サーバ: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-11-19 20:16:29
Sylph.Googlebonker said: »Hello! :D I'm new to GearSwap, so excuse me if this question or similar questions has/have been asked 50,000 times.
How do I make GearSwap make an exception?
I'm wanting to use a Devotion macro, but the program is working properly - EVERY time I use Cure V, it goes through the proper equipment sequence, but that means I can't use all of that HP-adding equipment to enhance my Devotion. The only thing I know to do is to unload GearSwap, use my macro, then reload GearSwap. lol Your question doesn't make sense. Devotion is a JA, not a cure. How is casting cure preventing you from swapping properly on the JA?
Edit: Oh wait. You're wanting to equip high HP gear for the Devotion, cure yourself up (which will normally swap said gear out), and then use Devotion?
I'd do this. In the in-game macro, have: Code
/console gs c equip <your high-HP/Devotion set>
/console gs c disable all
Then cure yourself (either in that macro or separately), then use devotion, then have a macro that re-enables gear (/console gs c enable all).
サーバ: Sylph
Game: FFXI
Posts: 20
By Sylph.Googlebonker 2014-11-19 20:33:27
Sweet! :O Thank you! That fixed it. n_n The commands were actually:
/console gs disable all
/console gs enable all
My Devotion macros work now! :D ty!
サーバ: Asura
Game: FFXI
Posts: 334
By Asura.Krystela 2014-11-20 07:38:31
Hello ._.
So after 4 days of trials and fails, I though maybe I should ask here before I go nuts.
I am trying to make a cycle that is bind on f9 for cures.
I want to be able to circle through 3 sets, normal, enm and conserve mp.
I seem to not even by able to bind f9 to my "cure mode" so far I have done this:
I start with this set up Code function job_setup()
state.CureMode = M{['description']= 'Cure Mode', 'Normal', 'Enmity', 'ConserveMP'}
end
Then I put this in user set up Code function user_setup()
send_command('bind f9 gs c cycle CureMode')
end <-- press f9 and nothing happens
Then in job state Code function job_state_change(spellMap, stateField, newValue, oldValue)
if string.find(spell.english, 'Cure') then
if state.CureMode.value == 'Enmity' then
equip(sets.midcast_Cure.Enmity)
end
if state.CureMode.value == 'ConserveMP' then
equip(sets.midcast_Cure.ConserveMP)
else
equip(sets.midcast_Cure)
end
end
end
I have looked and re-looked on google and cant find any solution anywhere.
Heeeeeeelllppp
*From a very desperate Whm ._.*
サーバ: Sylph
Game: FFXI
Posts: 24
By Sylph.Avebian 2014-11-20 11:06:35
Does gearswap not have support for level capped areas? I couldn't get it to work in 60 cap BCNM.
VIP
サーバ: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-11-20 16:06:38
Does gearswap not have support for level capped areas? I couldn't get it to work in 60 cap BCNM. Define what you mean by 'support'. You can check your job level and make corrections to what gear to wear based on that.
Lakshmi.Byrth
VIP
サーバ: Lakshmi
Game: FFXI
Posts: 6200
By Lakshmi.Byrth 2014-11-20 16:13:15
Well, I do not know how it handles level sync, actually. It may fail to equip gear based on the level filter. Need to check when I get home.
Cerberus.Conagh
サーバ: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-11-20 16:15:58
Ragnarok.Flippant said: »I just downloaded the AutoRA addon to take a look at the event this is occurring at, but I do not see that bit of code, only checking if less than 1000. Did you add a section within the same function to WS if you're above 1000?
Nope.
Sorry typed rather than copied, I want it to stop tping if I go above 1k tp with with flurry + coursers roll this does not worked, had it checked and confirmed by 3 other rngs in ls.
Anyone know how to fix this?
If it's something that can't be fixed, then it might be better to not bother using it if I can't guarantee to stop tping at 1k tp.
VIP
サーバ: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-11-20 16:25:28
@Krystela:
Test the F9 binding with something trivial, like:
send_command('bind f9 input /echo F9 bind')
That will test whether it's the bind that's failing, or something in the code to be executed that's failing. Most likely it's the code failing because of the state change function you used.
For your state change function: Code
function job_state_change(spellMap, stateField, newValue, oldValue)
if string.find(spell.english, 'Cure') then
if state.CureMode.value == 'Enmity' then
equip(sets.midcast_Cure.Enmity)
end
if state.CureMode.value == 'ConserveMP' then
equip(sets.midcast_Cure.ConserveMP)
else
equip(sets.midcast_Cure)
end
end
end
This will never, under any circumstances, work.
First, you inserted a new parameters in the function parameter list. spellMap will not be passed in just because you added a parameter with that name there. Instead, spellMap will be assigned the value that would have gone to stateField, stateField will be assigned the value that would have gone to newValue, and newValue will be assigned the value that would have gone to oldValue. oldValue will be nil.
Second, you check for spell.english as your first condition. This will fail because the variable 'spell' does not exist in this context (it's not passed in as a parameter), and also because it will -never- exist in this context (there is no spell data possible when this function is called).
job_state_change is only ever called when you change the value of a state variable. Changing a state variable is completely separate from actually casting a spell. You will never cast a spell just because you changed a state variable.
The way to fix this depends on what you actually intend for this to do. I can't imagine you want the F9 bind to actually cast a spell, though, since you can't specify which spell to cast, nor whom to cast on. Thus I'll presume that you just want to be able to specify which gear to use when casting cures based on the configuration of the CureMode state variable.
As such, I'd remove your entire job_state_change function. Allow the default handler to function as it should.
After that, modify post_midcast so that you can modify the gear set to be equipped for cures.
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
if spellMap == 'Cure' then
if state.CureMode.value ~= 'Normal' then
equip(sets.midcast.Cure[state.CureMode.value])
end
end
end
Also, assuming you're using a lua based on my libraries, sets.midcast_Cure is bad naming form. It should be sets.midcast.Cure, or the default handling won't be able to find the correct set.
サーバ: Asura
Game: FFXI
Posts: 334
By Asura.Krystela 2014-11-20 23:05:10
@Krystela:
Test the F9 binding with something trivial, like:
send_command('bind f9 input /echo F9 bind')
That will test whether it's the bind that's failing, or something in the code to be executed that's failing. Most likely it's the code failing because of the state change function you used.
For your state change function: Code
function job_state_change(spellMap, stateField, newValue, oldValue)
if string.find(spell.english, 'Cure') then
if state.CureMode.value == 'Enmity' then
equip(sets.midcast_Cure.Enmity)
end
if state.CureMode.value == 'ConserveMP' then
equip(sets.midcast_Cure.ConserveMP)
else
equip(sets.midcast_Cure)
end
end
end
This will never, under any circumstances, work.
First, you inserted a new parameters in the function parameter list. spellMap will not be passed in just because you added a parameter with that name there. Instead, spellMap will be assigned the value that would have gone to stateField, stateField will be assigned the value that would have gone to newValue, and newValue will be assigned the value that would have gone to oldValue. oldValue will be nil.
Second, you check for spell.english as your first condition. This will fail because the variable 'spell' does not exist in this context (it's not passed in as a parameter), and also because it will -never- exist in this context (there is no spell data possible when this function is called).
job_state_change is only ever called when you change the value of a state variable. Changing a state variable is completely separate from actually casting a spell. You will never cast a spell just because you changed a state variable.
The way to fix this depends on what you actually intend for this to do. I can't imagine you want the F9 bind to actually cast a spell, though, since you can't specify which spell to cast, nor whom to cast on. Thus I'll presume that you just want to be able to specify which gear to use when casting cures based on the configuration of the CureMode state variable.
As such, I'd remove your entire job_state_change function. Allow the default handler to function as it should.
After that, modify post_midcast so that you can modify the gear set to be equipped for cures.
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
if spellMap == 'Cure' then
if state.CureMode.value ~= 'Normal' then
equip(sets.midcast.Cure[state.CureMode.value])
end
end
end
Also, assuming you're using a lua based on my libraries, sets.midcast_Cure is bad naming form. It should be sets.midcast.Cure, or the default handling won't be able to find the correct set. I tried midcast.cure and it would always give me a nil midcast error :( midcast_Cure seems to be the only form working for me.
Trying to make my own file because I was rather unsatisfied with other premade files :(
Thank you
サーバ: Sylph
Game: FFXI
Posts: 24
By Sylph.Avebian 2014-11-21 01:56:21
Define what you mean by 'support'. You can check your job level and make corrections to what gear to wear based on that.
I mean that it doesn't seem to support gears changes while under level cap
Lakshmi.Raerie
サーバ: Lakshmi
Game: FFXI
Posts: 98
By Lakshmi.Raerie 2014-11-21 16:12:10
I don't know if this is just me, but GearSwap has stopped working for me entirely. It was working fine a few days ago while I was on WHM and when I switched back yesterday, it wouldn't work at all. I haven't adjusted my lua file and I did not turn it off in Windower.
If need be, I'll post my file but like I said, it just suddenly stopped working.
Fenrir.Bricent
サーバ: Fenrir
Game: FFXI
Posts: 64
By Fenrir.Bricent 2014-11-21 22:37:58
I am sure this has been answered before what code do I use to set a specific idle set for Adoulin?
Leviathan.Arcon
VIP
サーバ: Leviathan
Game: FFXI
Posts: 666
By Leviathan.Arcon 2014-11-22 00:58:35
That code looks like it should work, although it has a few redundant parts. You don't need to check if "Copy Image" or "Copy Image (2)" are up, the cancel addon itself does that, so you can just cancel those always, i.e.: Code function user_precast(spell, action, spellMap, eventArgs)
if spellMap == 'Utsusemi' then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
cancel_spell()
add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
eventArgs.handled = true
end
send_command('cancel Copy Image|Copy Image (2)')
end
end
I don't know why this would cancel 3 or more shadows as well, just a minor code hint for this.
Are you sure you're not canceling shadows somewhere else too, and there you messed it up somehow? Or maybe Mote's libraries do that by default? I'm unfamiliar with those (and GS in general), but this Lua code, as it is here, should not cause 3 or more shadows to be canceled.
サーバ: Bahamut
Game: FFXI
Posts: 62
By Bahamut.Phidruran 2014-11-22 20:17:50
What would be the coding to include in my drk lua to use a different magic set for the absorb spells than the normal dark magic spells?
Leviathan.Arcon
VIP
サーバ: Leviathan
Game: FFXI
Posts: 666
By Leviathan.Arcon 2014-11-23 00:57:10
Code midcast = function(spell)
if spell.skill == 'Dark Magic' then
equip(sets.DarkMagic)
if spell.english:startswith('Absorb') then
equip(sets.Absorb)
end
end
end
This equips the regular Dark Magic set and if it's an absorb spell it equips absorb-specific items on top of that.
Cerberus.Rabies
サーバ: Cerberus
Game: FFXI
Posts: 57
By Cerberus.Rabies 2014-11-23 01:20:50
I'm still new to GS, and have been playing around with it. I have gotten many jobs setup but I am having a problem with SCH.lua when casting Impact. If someone could eyeball it I would appreciate it greatly. The problem is when I go to cast it puts on Vanir body instead of Twilight Cloak causing it to not finish casting.
Code function get_sets()
--- PRECAST SETS ---
sets.precast = {}
sets.precast.JA = {}
sets.precast.JA.Enlightenment = {head="Argute Gown +2"}
sets.precast.JA['Tabula Rasa'] = {head="Argute Pants +2"}
sets.precast.FastCast = {main="Keraunos",range=empty,ammo="Incantor stone",head="Nahtirah Hat",neck="Orunmila's Torque",
ear1="Loquacious Earring",body="Anhur Robe",hands="Gendewitha Gages +1",lring="Prolix Ring",rring="Veneficium Ring",
back="Swith Cape +1",waist="Witful Belt",legs="Artsieq Hose",feet="Pedagogy Loafers"}
sets.precast.EnhancingMagic = set_combine(sets.precast.FastCast,{waist="Siegel Sash"})
sets.precast.FC_Weather = {feet="Pedagogy Loafers"}
sets.precast.Cure = set_combine(sets.precast.FastCast,{body="Heka's Kalasiris",back="Pahtli Cape"})
sets.precast.Impact = {main="Keraunos",sub="Mephitis Grip",range="Aureole",ammo=empty,
neck="Nefarious collar +1",ear1="Psystorm Earring",ear2="Lifestorm Earring",
hands="Hagondes Cuffs",ring1="Sangoma Ring",ring2="Omega Ring",
back="Bookworm's Cape",waist="Wanion Belt",legs="Artsieq Hose",feet="Uk'uxkaj Boots",head=empty,body="Twilight Cloak"}
--- MIDCAST SETS ---
sets.midcast = {}
sets.midcast.Impact = {main="Keraunos",sub="Mephitis Grip",range="Aureole",ammo=empty,
neck="Nefarious collar +1",ear1="Psystorm Earring",ear2="Lifestorm Earring",
hands="Hagondes Cuffs",ring1="Sangoma Ring",ring2="Omega Ring",
back="Bookworm's Cape",waist="Wanion Belt",legs="Artsieq Hose",feet="Uk'uxkaj Boots",head=empty,body="Twilight Cloak"}
sets.midcast['Elemental Magic'] = {main="Keraunos",sub="Mephitis Grip",range="Aureole",ammo=empty,
head="Nahtirah Hat",neck="Nefarious collar +1",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Hagondes Cuffs",ring1="Sangoma Ring",ring2="Omega Ring",
back="Bookworm's Cape",waist="Wanion Belt",legs="Artsieq Hose",feet="Uk'uxkaj Boots"}
sets.midcast.Helix = {main="Keraunos",sub="Mephitis Grip",range="Aureole",ammo=empty,
head="Nahtirah Hat",neck="Nefarious collar +1",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Hagondes Cuffs",ring1="Sangoma Ring",ring2="Omega Ring",
back="Refraction Cape",waist="Wanion Belt",legs="Artsieq Hose",feet="Uk'uxkaj Boots"}
sets.midcast.Stun = {main="Keraunos",sub="Vivid strap +1",range="Aureole",ammo=empty,
head="Nahtirah Hat",neck="Orunmila's Torque",ear2="Gwati Earring",ear1="Loquacious Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages +1",lring="Prolix Ring",rring="Icesoul Ring",
back="Swith Cape +1",waist="Ninurta's sash",legs="Artsieq hose",feet="Pedagogy Loafers"}
sets.midcast['Dark Magic'] = {main="Keraunos",sub="Mephitis Grip",range="Aureole",ammo=empty,
head="Nahtirah Hat",neck="Nefarious collar +1",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Hagondes Cuffs",ring1="Sangoma Ring",ring2="Omega Ring",
back="Refraction Cape",waist="Wanion Belt",legs="Artsieq Hose",feet="Uk'uxkaj Boots"}
sets.midcast['Enfeebling Magic'] = {main="Keraunos",sub="Mephitis Grip",range="Aureole",ammo=empty,
head="Nahtirah Hat",neck="Nefarious collar +1",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Hagondes Cuffs",ring1="Sangoma Ring",ring2="Omega Ring",
back="Refraction Cape",waist="Wanion Belt",legs="Artsieq Hose",feet="Uk'uxkaj Boots"}
sets.midcast['Healing Magic'] = {}
sets.midcast.Embrava = {main="Kirin's Pole",sub="Fulcio Grip",range=empty,ammo="Savant's Treatise",
head="Svnt. Bonnet +2",neck="Colossus's Torque",
body="Anhur Robe",
back="Merciful Cape",waist="Olympus Sash",legs="Shedir Seraweels",feet="Rubeus Boots"}
sets.midcast['Enhancing Magic'] = {main="Kirin's Pole",sub="Fulcio Grip",range=empty,ammo="Savant's Treatise",
head="Svnt. Bonnet +2",neck="Colossus's Torque",
body="Anhur Robe",
back="Merciful Cape",waist="Olympus Sash",legs="Shedir Seraweels",feet="Rubeus Boots"}
sets.midcast.Regen = {head="Savant's Bonnet +2"}
sets.midcast.Cure = {main="Tamaxchi",neck="Phalaina Locket",body="Heka's Kalasiris",hands="Bokwus Gloves",legs="Nares Trews",back="Tempered cape +1"}
sets.midcast.Stoneskin = {neck="Stone Gorget",waist="Siegel Sash",legs="Shedir Seraweels"}
--- AFTERCAST SETS ---
sets.Idle = {}
sets.idle = {main="Owleyes", sub="Genbu's Shield",ammo="Incantor Stone",
head="Nefer khat +1",neck="Orunmila's Torque",ear2="Graiai Earring",ear1="Loquacious Earring",
body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Swith Cape +1",waist="Fucho-no-obi",legs="Nares Trews",feet="Serpentes sabots"}
sets.Idle.Sub = {main="Owleyes", sub="Genbu's Shield",ammo="Incantor Stone",
head="Nefer khat +1",neck="Orunmila's Torque",ear2="Graiai Earring",ear1="Loquacious Earring",
body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Swith Cape +1",waist="Fucho-no-obi",legs="Nares Trews",feet="Serpentes sabots"}
sets.Idle.Current = {main="Owleyes", sub="Genbu's Shield",ammo="Incantor Stone",
head="Nefer khat +1",neck="Orunmila's Torque",ear2="Graiai Earring",ear1="Loquacious Earring",
body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Swith Cape +1",waist="Fucho-no-obi",legs="Nares Trews",feet="Serpentes sabots"}
sets.Idle.noSub = {main="Owleyes", sub="Genbu's Shield",ammo="Incantor Stone",
head="Nefer khat +1",neck="Orunmila's Torque",ear2="Graiai Earring",ear1="Loquacious Earring",
body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Swith Cape +1",waist="Fucho-no-obi",legs="Nares Trews",feet="Serpentes sabots"}
sets.Resting = {main="Owleyes", sub="Genbu's Shield",ammo="Incantor Stone",
head="Nefer khat +1",neck="Orunmila's Torque",ear2="Graiai Earring",ear1="Loquacious Earring",
body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Swith Cape +1",waist="Fucho-no-obi",legs="Nares Trews",feet="Serpentes sabots"}
--- OTHER SETS ---
-- Relevant Obis. Add the ones you have.
sets.obi = {}
sets.obi.Wind = {waist='Furin Obi'}
sets.obi.Ice = {waist='Hyorin Obi'}
sets.obi.Lightning = {waist='Rairin Obi'}
sets.obi.Light = {waist='Korin Obi'}
sets.obi.Dark = {waist='Anrin Obi'}
sets.obi.Water = {waist='Suirin Obi'}
sets.obi.Earth = {waist='Dorin Obi'}
sets.obi.Fire = {waist='Karin Obi'}
-- Generic gear for day/weather
sets.weather = {back='Twilight Cape'}
sets.day = {lring='Zodiac Ring'}
-- If you have nuking gear that only affects one element, you can put it here
-- For example, Earth Magic Attack Bonus +9
sets.ele = {}
-- sets.ele.Stone = {neck="Quanpur Necklace"}
sets.staves = {}
-- Magic damage staves, which are used for reducing casting time
sets.staves.damage = {}
sets.staves.damage.Lightning = {main="Apamajas I"}
sets.staves.damage.Fire = {main="Atar I"}
-- Various pieces that enhance specific JAs/spells/etc.
sets.enh = {}
sets.enh.Rapture = {head="Savant's Bonnet +2"}
sets.enh.Ebullience = {head="Savant's Bonnet +2"}
-- sets.enh['Addendum: Black'] = {body="Savant's Gown +2"}
-- sets.enh['Addendum: White'] = {body="Savant's Gown +2"}
sets.enh.Perpetuance = {hands="Savant's Bracers +2"}
-- sets.enh.Penury = {legs="Savant's Pants +2"}
-- sets.enh.Parsimony = {legs="Savant's Pants +2"} -- I never really want to sacrifice offensive leg stats for an additional -25% MP cost on a half-price spell.
sets.enh.Klimaform = {feet="Savant's Loafers +2"}
-- sets.enh.Altruism = {head="Argute Mortarboard +2"}
-- sets.enh.Focalization = {head="Argute Mortarboard +2"}
-- sets.enh.Tranquility = {hands="Argute Bracers +2"}
-- sets.enh.Equanimity = {hands="Argute Bracers +2"}
-- sets.enh.Storm = {feet="Pedagogy Loafers"}
sets.HELM = {body="Trench Tunic",hands="Field Gloves",legs="Dredger Hose",feet="Field Boots"}
stuntarg = 'Shantotto'
end
function precast(spell)
if spell.name == 'Celerity' then
equip({head="Nahtirah Hat"})
end
if string.find(spell.name:lower(),'hatchet') or string.find(spell.name:lower(),'pickaxe') or string.find(spell.name:lower(),'sickle') then
if buffactive.invisible then windower.send_command('cancel invisible') end
equip(sets.HELM)
elseif sets.precast.JA[spell.name] then
equip(sets.precast.JA[spell.name])
elseif string.find(spell.name,'Cur') and spell.name ~= 'Cursna' then
equip(sets.precast.Cure)
elseif spell.skill == 'EnhancingMagic' then
equip(sets.precast.EnhancingMagic)
elseif spell.action_type == 'Magic' then
equip(sets.precast.FastCast)
end
if (buffactive.alacrity or buffactive.celerity) and world.weather_element == spell.element and not (spell.skill == 'ElementalMagic' and spell.casttime <3 and buffactive.Klimaform) then
equip(sets.precast.FC_Weather)
end
if spell.name == 'Impact' then
if not buffactive['Elemental Seal'] then
add_to_chat(8,'--------- Elemental Seal is down ---------')
end
equip({head=empty,body="Twilight Cloak"})
elseif spell.name == 'Stun' then
if not buffactive.thunderstorm then
add_to_chat(8,'--------- Thunderstorm is down ---------')
end
if stuntarg ~= 'Shantotto' then
send_command('@input /t '..stuntarg..' ---- Byrth Stunned!!! ---- ')
end
end
end
function midcast(spell)
if string.find(spell.english,'Cur') then
equip(sets.midcast.Cure)
weathercheck(spell.element)
if buffactive.rapture then equip(sets.enh.Rapture) end
elseif spell.skill=="Elemental Magic" or spell.name == "Kaustra" then
if string.find(spell.english,'helix') or spell.name == 'Kaustra' then
equip(sets.midcast.Helix)
if sets.ele[spell.element] then equip(sets.ele[spell.element]) end
if spell.element == world.weather_element then
equip(sets.weather)
end
if spell.element == world.day_element then
equip(sets.day)
end
else
equip(sets.midcast['Elemental Magic'])
if sets.ele[spell.element] then equip(sets.ele[spell.element]) end
weathercheck(spell.element)
end
if buffactive.ebullience then equip(sets.enh.Ebullience) end
if buffactive.klimform then equip(sets.enh.Klimaform) end
elseif spell.english == 'Impact' then
equip(sets.precast.Impact,{head=empty,body="Twilight Cloak"})
equip(sets.midcast.Impact,{head=empty,body="Twilight Cloak"})
weathercheck(spell.element)
elseif spell.english == 'Stoneskin' then
equip(sets.midcast.Stoneskin)
elseif spell.skill == 'Enhancing Magic' then
equip(sets.midcast.EnhancingMagic)
if spell.english == 'Embrava' then
equip(sets.midcast.Embrava)
if not buffactive.perpetuance then
add_to_chat(8,'--------- Perpetuance is down ---------')
end
if not buffactive.accession then
add_to_chat(8,'--------- Accession is down ---------')
end
if not buffactive.penury then
add_to_chat(8,'--------- Penury is down ---------')
end
else
if string.find(spell.english,'Regen') then
equip(sets.midcast.Regen)
end
if buffactive.penury then equip(sets.enh.Penury) end
end
if buffactive.perpetuance then equip(sets.enh.Perpetuance) end
elseif spell.skill == 'Enfeebling Magic' then
equip(sets.midcast['Enfeebling Magic'])
if spell.type == 'WhiteMagic' and buffactive.altruism then equip(sets.enh.Altruism) end
if spell.type == 'BlackMagic' and buffactive.focalization then equip(sets.enh.Focalization) end
else
equip(sets.midcast[spell.skill])
weathercheck(spell.element)
end
if spell.english == 'Sneak' and buffactive.sneak then
send_command('@wait 1;cancel 71;')
end
end
function aftercast(spell)
equip(sets.Idle.Current)
if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
end
end
function status_change(new,tab)
if new == 'Resting' then
equip(sets.Resting)
else
equip(sets.Idle.Current)
end
end
function buff_change(status,gain_or_loss)
if status == 'Sublimation: Complete' then -- True whether gained or lost
sets.Idle.Current = sets.Idle.noSub
elseif status == 'Sublimation: Activated' then
sets.Idle.Current = sets.Idle.Sub
end
equip(sets.Idle.Current)
end
function self_command(command)
if command == 'stuntarg' then
stuntarg = target.name
end
end
-- This function is user defined, but never called by GearSwap itself. It's just a user function that's only called from user functions. I wanted to check the weather and equip a weather-based set for some spells, so it made sense to make a function for it instead of replicating the conditional in multiple places.
function weathercheck(spell_element)
if spell_element == world.weather_element then
equip(sets.weather)
if sets.obi[spell_element] then
equip(sets.obi[spell_element])
end
end
if spell_element == world.day_element then
equip(sets.day)
if sets.obi[spell_element] then
equip(sets.obi[spell_element])
end
end
end
Leviathan.Arcon
VIP
サーバ: Leviathan
Game: FFXI
Posts: 666
By Leviathan.Arcon 2014-11-23 03:12:39
Impact is Elemental Magic (dark damage), so the elemental rule applies first. Either move the Impact check inside the Elemental Magic check, or before it (I'd recommend inside, because other Elemental Magic rules still apply, except for requiring the Twilight Cloak).
First I'd adjust your sets, sets.precast.Impact should only have the items that differ from sets.precast['Elemental Magic'], same for midcast. Then I'd adjust the Elemental Magic rule like this: Code elseif spell.skill == 'Elemental Magic' or spell.name == 'Kaustra' then
if spell.english:endswith('helix') or spell.name == 'Kaustra' then
equip(sets.midcast.Helix)
if sets.ele[spell.element] then
equip(sets.ele[spell.element])
end
if spell.element == world.weather_element then
equip(sets.weather)
end
if spell.element == world.day_element then
equip(sets.day)
end
else
equip(sets.midcast['Elemental Magic'])
if sets.ele[spell.element] then
equip(sets.ele[spell.element])
end
if spell.english == 'Impact' then
equip(sets.midcast.Impact)
end
weathercheck(spell.element)
end
if buffactive.ebullience then
equip(sets.enh.Ebullience)
end
if buffactive.klimform then
equip(sets.enh.Klimaform)
end
And just another observation, you don't need to manually equip({head = empty, body = 'Twilight Cloak'}), since you already have the sets for Impact defined. You also need to check if a buff is up before canceling it (if buffactive.invisible then windower.send_command('cancel invisible') end), the cancel addon itself will perform the check and just not send a packet if the buff isn't up.
Cerberus.Rabies
サーバ: Cerberus
Game: FFXI
Posts: 57
By Cerberus.Rabies 2014-11-23 03:35:38
Quote: First I'd adjust your sets, sets.precast.Impact should only have the items that differ from sets.precast['Elemental Magic'], same for midcast.
Yes, These sets were not in the original .lua but I made them when I couldn't get Impact to work.
Quote: And just another observation, you don't need to manually equip({head = empty, body = 'Twilight Cloak'}), since you already have the sets for Impact defined.
Yes I see, These were just here before I made the actual sets in hopes of fixing the problem.
Quote: Then I'd adjust the Elemental Magic rule like this:
Works great, Thanks a lot! Still trying to figure all the rules out ^^
Quote: You also need to check if a buff is up before canceling it (if buffactive.invisible then windower.send_command('cancel invisible') end), the cancel addon itself will perform the check and just not send a packet if the buff isn't up.
I don't understand this, what exactly does this do? If I make a "If buffactive.elementalseal etc etc" then it will cancel my ElementalSeal or what?
サーバ: Asura
Game: FFXI
Posts: 334
By Asura.Krystela 2014-11-23 03:44:24
I don't understand this, what exactly does this do? If I make a "If buffactive.elementalseal etc etc" then it will cancel my ElementalSeal or what?
yes, it sends a comand to check if a buff is still active and cancels it before the refreshed buff finish casting.
People used to do that alot with stoneskin or sneak/invisible. Avoid casting the spell and get a "no effect" message.
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.
|
|