|
Gearswap Support Thread
Valefor.Seranos
サーバ: Valefor
Game: FFXI
Posts: 193
By Valefor.Seranos 2015-03-30 13:11:33
I sort of miss SC scripts but gotta move to GS i guess since SC isnt supported. Anyway.. I found this mnk lua file which i used for my in progress mnk but i can't get the add_to_chat to work, maybe anyone here got an idea?
http://pastebin.com/6ZcDwYXH
Did you try windower.add_to_chat? That's how mine is set up, but not sure if that matters.
Edit: Nevermind, that shouldn't be an issue.
Valefor.Caivian
サーバ: Valefor
Game: FFXI
Posts: 21
By Valefor.Caivian 2015-03-30 13:31:33
Test the add_to_chat command with the eval addon. In the console type eval windower.add_to_chat(100, 'test')
If it still doesn't work, change the 100 to a different value. I know that 12 is the same as receiving a tell, as you can actually get the tell "ding" with any add_to_chat lines that use 12. It may be possible that a chat filter is blocking whatever 100 is.
Quetzalcoatl.Caranthir
サーバ: Quetzalcoatl
Game: FFXI
Posts: 10
By Quetzalcoatl.Caranthir 2015-03-30 20:24:02
The following is my WHM precast and midcast section, and (among other things) the problem I'm having with the file is that when I cast any Raise or Reraise spell (including Arise) I'm wearing the Buffs set instead of Haste set at midcast. I would greatly appreciate help with this problem, and the clutter issue too, if possible. Thanks in advance!
Code function precast(spell)
if spell.action_type == 'Magic' then
if spell.skill == 'Healing Magic' then
if string.find(spell.english,'Cur') then equip(sets.precast.FC.Cure)
else equip(sets.precast.FC.Normal) end
elseif spell.skill == 'Enhancing Magic' then
if spell.name == 'Stoneskin' then equip(sets.precast.Stoneskin)
else equip(sets.precast.EnhancingMagic) end
else equip(sets.precast.FC.Normal) end
elseif string.find(spell.english,'Waltz') and spell.english ~= 'Healing Waltz' then equip(sets.precast.Waltz)
elseif spell.prefix == '/weaponskill' then
if sets.precast.WS[spell.name] then equip(sets.precast.WS[spell.name]) else equip(sets.precast.WS.STR) end
else
if sets.precast.JA[spell.english] then equip(sets.precast.JA[spell.english]) end
end
end
function midcast(spell)
if spell.action_type == 'Magic' then
if spell.skill == 'Enfeebling Magic' then equip(sets.midcast.Debuff) end
if spell.skill == 'Elemental Magic' then equip(sets.midcast.Magic) end
if spell.skill == 'Healing Magic' then
if spell.target.type == 'MONSTER' and string.find(spell.english,'Cure' or 'Cura') then equip(sets.midcast.Magic)
else
if string.find(spell.english,'Cure') then equip(sets.midcast.Cure)
elseif string.find(spell.english,'Curaga') then equip(sets.midcast.Cure) end
if spell.name == 'Cursna' then equip(sets.midcast.Cursna)
elseif spell.name == 'Sacrifice' then equip(sets.midcast.Buff)
elseif spell.name == 'Esuna' then equip(sets.midcast.Buff)
elseif spell.name == 'Arise' then equip(sets.midcast.Haste)
elseif string.find(spell.english,'na') and spell.name ~= 'Cursna' or 'Esuna' then equip(sets.midcast.Ailment)
--elseif string.find(spell.english,'Raise') then equip(sets.midcast.Haste)
--elseif string.find(spell.english,'Reraise') then equip(sets.midcast.Haste)
else
equip(sets.midcast.Haste) end
end
end
if spell.skill == 'Divine Magic' and spell.target.type == 'Monster' then equip(sets.Midcast.Magic) end
if spell.skill == 'Enhancing Magic' then
if string.find(spell.english,'Barston') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Barwat') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Baraer') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Barfir') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Barbliz') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Barthun') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Regen') then equip(sets.midcast.Regen)
elseif string.find(spell.english,'Barpetr') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barpois') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barsile') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barviru') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Baramne') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barpara') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barslee') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barblin') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Boost') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Protect') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Shell') then equip(sets.midcast.Buff)
elseif spell.name == 'Phalanx' then equip(sets.midcast.Buff)
elseif spell.name == 'Erase' then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Teleport') then equip(sets.midcast.Haste)
elseif string.find(spell.english,'Recall') then equip(sets.midcast.Haste)
elseif string.find(spell.english,'Warp') then equip(sets.midcast.Haste)
elseif string.find(spell.english,'Spikes') then equip(sets.midcast.Haste)
elseif spell.name == 'Refresh' then equip(sets.midcast.Haste)
elseif spell.name == 'Flurry' then equip(sets.midcast.Haste)
elseif spell.name == 'Haste' then equip(sets.midcast.Haste)
elseif spell.name == 'Blink' then equip(sets.midcast.Haste)
elseif spell.name == 'Sneak' then equip(sets.midcast.Haste)
elseif spell.name == 'Invisible' then equip(sets.midcast.Haste)
elseif spell.name == 'Deodorize' then equip(sets.midcast.Haste)
elseif spell.name == 'Escape' then equip(sets.midcast.Haste)
elseif spell.name == 'Tractor' then equip(sets.midcast.Haste)
elseif spell.name == 'Stoneskin' then equip(sets.midcast.Stoneskin)
elseif spell.name == 'Aquaveil' then equip(sets.midcast.Aquaveil) end
end
end
end
サーバ: Bismarck
Game: FFXI
Posts: 21
By Bismarck.Alkalinescissor 2015-03-30 23:37:23
http://pastebin.com/LEUyfmfw
This is the whole thing. I dont know if that changes anything from previous post. Line 650 is giving me nil value msg.
サーバ: Sylph
Game: FFXI
Posts: 1
By Sylph.Eladamir 2015-03-31 00:57:38
I'm trying to transition from Spellcast to GearSwap and I'm using the beta examples as reference my Idle and Engage sets are working however WS and JA don't seem to be functioning, maybe somebody can point me in the right direction.
http://pastebin.com/SEyLf0Zw
Thanks so much!.
サーバ: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-03-31 05:16:02
Quetzalcoatl.Caranthir said: »The following is my WHM precast and midcast section, and (among other things) the problem I'm having with the file is that when I cast any Raise or Reraise spell (including Arise) I'm wearing the Buffs set instead of Haste set at midcast. I would greatly appreciate help with this problem, and the clutter issue too, if possible. Thanks in advance!
Code function precast(spell)
if spell.action_type == 'Magic' then
if spell.skill == 'Healing Magic' then
if string.find(spell.english,'Cur') then equip(sets.precast.FC.Cure)
else equip(sets.precast.FC.Normal) end
elseif spell.skill == 'Enhancing Magic' then
if spell.name == 'Stoneskin' then equip(sets.precast.Stoneskin)
else equip(sets.precast.EnhancingMagic) end
else equip(sets.precast.FC.Normal) end
elseif string.find(spell.english,'Waltz') and spell.english ~= 'Healing Waltz' then equip(sets.precast.Waltz)
elseif spell.prefix == '/weaponskill' then
if sets.precast.WS[spell.name] then equip(sets.precast.WS[spell.name]) else equip(sets.precast.WS.STR) end
else
if sets.precast.JA[spell.english] then equip(sets.precast.JA[spell.english]) end
end
end
function midcast(spell)
if spell.action_type == 'Magic' then
if spell.skill == 'Enfeebling Magic' then equip(sets.midcast.Debuff) end
if spell.skill == 'Elemental Magic' then equip(sets.midcast.Magic) end
if spell.skill == 'Healing Magic' then
if spell.target.type == 'MONSTER' and string.find(spell.english,'Cure' or 'Cura') then equip(sets.midcast.Magic)
else
if string.find(spell.english,'Cure') then equip(sets.midcast.Cure)
elseif string.find(spell.english,'Curaga') then equip(sets.midcast.Cure) end
if spell.name == 'Cursna' then equip(sets.midcast.Cursna)
elseif spell.name == 'Sacrifice' then equip(sets.midcast.Buff)
elseif spell.name == 'Esuna' then equip(sets.midcast.Buff)
elseif spell.name == 'Arise' then equip(sets.midcast.Haste)
elseif string.find(spell.english,'na') and spell.name ~= 'Cursna' or 'Esuna' then equip(sets.midcast.Ailment)
--elseif string.find(spell.english,'Raise') then equip(sets.midcast.Haste)
--elseif string.find(spell.english,'Reraise') then equip(sets.midcast.Haste)
else
equip(sets.midcast.Haste) end
end
end
if spell.skill == 'Divine Magic' and spell.target.type == 'Monster' then equip(sets.Midcast.Magic) end
if spell.skill == 'Enhancing Magic' then
if string.find(spell.english,'Barston') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Barwat') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Baraer') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Barfir') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Barbliz') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Barthun') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Regen') then equip(sets.midcast.Regen)
elseif string.find(spell.english,'Barpetr') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barpois') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barsile') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barviru') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Baramne') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barpara') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barslee') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barblin') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Boost') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Protect') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Shell') then equip(sets.midcast.Buff)
elseif spell.name == 'Phalanx' then equip(sets.midcast.Buff)
elseif spell.name == 'Erase' then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Teleport') then equip(sets.midcast.Haste)
elseif string.find(spell.english,'Recall') then equip(sets.midcast.Haste)
elseif string.find(spell.english,'Warp') then equip(sets.midcast.Haste)
elseif string.find(spell.english,'Spikes') then equip(sets.midcast.Haste)
elseif spell.name == 'Refresh' then equip(sets.midcast.Haste)
elseif spell.name == 'Flurry' then equip(sets.midcast.Haste)
elseif spell.name == 'Haste' then equip(sets.midcast.Haste)
elseif spell.name == 'Blink' then equip(sets.midcast.Haste)
elseif spell.name == 'Sneak' then equip(sets.midcast.Haste)
elseif spell.name == 'Invisible' then equip(sets.midcast.Haste)
elseif spell.name == 'Deodorize' then equip(sets.midcast.Haste)
elseif spell.name == 'Escape' then equip(sets.midcast.Haste)
elseif spell.name == 'Tractor' then equip(sets.midcast.Haste)
elseif spell.name == 'Stoneskin' then equip(sets.midcast.Stoneskin)
elseif spell.name == 'Aquaveil' then equip(sets.midcast.Aquaveil) end
end
end
end The reason you can't equip Raise or Reraise is because you have the rules commented out.
I cleaned it up for you. It hasn't been thoroughly tested but I'm confident it works. Code
function get_sets()
Define_Barspells()
Define_Buff_Spells()
Define_Haste_Spells()
sets.precast = {}
sets.midcast = {}
end
function precast(spell)
if sets.precast[spell.name] then
equip(sets.precast[spell.name])
elseif sets.precast.JA[spell.english] then
equip(sets.precast.JA[spell.english])
elseif spell.type=="WeaponSkill" then
if sets.precast.WS[spell.name] then
equip(sets.precast.WS[spell.name])
else
equip(sets.precast.WS.STR)
end
elseif string.find(spell.english,'Waltz') and spell.english ~= 'Healing Waltz' then
equip(sets.precast.Waltz)
elseif spell.action_type == 'Magic' then
if spell.skill == 'Healing Magic' then
if T{'Cure*', 'Curaga*'}:any(string.wcmatch+{spell.name}) then
equip(sets.precast.FC.Cure)
else
equip(sets.precast.FC.Normal)
end
elseif spell.skill == 'Enhancing Magic' then
equip(sets.precast.EnhancingMagic)
end
end
end
function midcast(spell)
if sets.midcast[spell.name] then
equip(sets.midcast[spell.name])
elseif buff_spells:contains(spell.name) then
equip(sets.midcast.Buff)
elseif haste_spells:contains(spell.name) then
equip(sets.midcast.Haste)
end
if spell.action_type == 'Magic' then
if spell.skill == 'Enfeebling Magic' then
equip(sets.midcast.Debuff)
elseif spell.skill == 'Elemental Magic' then
equip(sets.midcast.Magic)
elseif spell.skill == 'Healing Magic' then
if spell.name == 'Arise' then
equip(sets.midcast.Haste)
elseif T{'Raise*', 'Reraise*'}:any(string.wcmatch+{spell.name}) then
equip(sets.midcast.Haste)
elseif T{'Cure*', 'Cura*'}:any(string.wcmatch+{spell.name}) then
if spell.target.type == 'MONSTER' then
equip(sets.midcast.Magic)
else
equip(sets.midcast.Cure)
end
elseif spell.name:endswith('na') then
if spell.name == 'Cursna' or spell.name == 'Esuna' then
equip(sets.midcast.Haste)
else
equip(sets.midcast.Ailment)
end
end
elseif spell.skill == 'Divine Magic' and spell.target.type == 'Monster' then
equip(sets.Midcast.Magic)
elseif spell.skill == 'Enhancing Magic' then
if spell.name:startswith('Regen') then
equip(sets.midcast.Regen)
elseif elemental_barspells:contains(spell.name) then
equip(sets.midcast.Barspell)
elseif status_barspells:contains(spell.name) then
equip(sets.midcast.Buff)
elseif T{'Boost*', 'Regen*', 'Protect*', 'Shell*', 'Phalanx*'}:any(string.wcmatch+{spell.name}) then
equip(sets.midcast.Buff)
elseif T{'*Spikes', 'Teleport*', 'Recall*', 'Warp*', 'Refresh*', 'Flurry*', 'Haste*'}:any(string.wcmatch+{spell.name}) then
equip(sets.midcast.Haste)
end
end
end
end
function Define_Barspells()
elemental_barspells = S{'Barstonra', 'Barwatera', 'Baraera', 'Barfira', 'Barblizzara', 'Barthundra'}
status_barspells = S{'Barsleepra', 'Barpoisonra', 'Barparalyzra', 'Barblindra', 'Barsilencera', 'Barvira', 'Barpetra', 'Baramnesra'}
end
function Define_Buff_Spells()
buff_spells = T{'Esuna', 'Sacrifice'}
end
function Define_Haste_Spells()
haste_spells = S{'Blink', 'Sneak', 'Invisible', 'Deodorize', 'Escape', 'Tractor'}
end
サーバ: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-03-31 07:31:27
Bismarck.Alkalinescissor said: »http://pastebin.com/LEUyfmfw
This is the whole thing. I dont know if that changes anything from previous post. Line 650 is giving me nil value msg. Although it's based on his logic for Elemental Gorgets/Belts, 'function is_sc_element_today()' is not a Kinematics component. It was cleverly reworked for the Gavialis Helm.
Copy this code and paste it down at the very bottom of your lua. That should fix it. Code
function is_sc_element_today(spell)
if spell.type ~= 'WeaponSkill' then
return
end
local weaponskill_elements = S{}:
union(skillchain_elements[spell.skillchain_a]):
union(skillchain_elements[spell.skillchain_b]):
union(skillchain_elements[spell.skillchain_c])
if weaponskill_elements:contains(world.day_element) then
return true
else
return false
end
end
Quetzalcoatl.Caranthir
サーバ: Quetzalcoatl
Game: FFXI
Posts: 10
By Quetzalcoatl.Caranthir 2015-03-31 09:55:54
Quetzalcoatl.Caranthir said: »The following is my WHM precast and midcast section, and (among other things) the problem I'm having with the file is that when I cast any Raise or Reraise spell (including Arise) I'm wearing the Buffs set instead of Haste set at midcast. I would greatly appreciate help with this problem, and the clutter issue too, if possible. Thanks in advance!
Code function precast(spell)
if spell.action_type == 'Magic' then
if spell.skill == 'Healing Magic' then
if string.find(spell.english,'Cur') then equip(sets.precast.FC.Cure)
else equip(sets.precast.FC.Normal) end
elseif spell.skill == 'Enhancing Magic' then
if spell.name == 'Stoneskin' then equip(sets.precast.Stoneskin)
else equip(sets.precast.EnhancingMagic) end
else equip(sets.precast.FC.Normal) end
elseif string.find(spell.english,'Waltz') and spell.english ~= 'Healing Waltz' then equip(sets.precast.Waltz)
elseif spell.prefix == '/weaponskill' then
if sets.precast.WS[spell.name] then equip(sets.precast.WS[spell.name]) else equip(sets.precast.WS.STR) end
else
if sets.precast.JA[spell.english] then equip(sets.precast.JA[spell.english]) end
end
end
function midcast(spell)
if spell.action_type == 'Magic' then
if spell.skill == 'Enfeebling Magic' then equip(sets.midcast.Debuff) end
if spell.skill == 'Elemental Magic' then equip(sets.midcast.Magic) end
if spell.skill == 'Healing Magic' then
if spell.target.type == 'MONSTER' and string.find(spell.english,'Cure' or 'Cura') then equip(sets.midcast.Magic)
else
if string.find(spell.english,'Cure') then equip(sets.midcast.Cure)
elseif string.find(spell.english,'Curaga') then equip(sets.midcast.Cure) end
if spell.name == 'Cursna' then equip(sets.midcast.Cursna)
elseif spell.name == 'Sacrifice' then equip(sets.midcast.Buff)
elseif spell.name == 'Esuna' then equip(sets.midcast.Buff)
elseif spell.name == 'Arise' then equip(sets.midcast.Haste)
elseif string.find(spell.english,'na') and spell.name ~= 'Cursna' or 'Esuna' then equip(sets.midcast.Ailment)
--elseif string.find(spell.english,'Raise') then equip(sets.midcast.Haste)
--elseif string.find(spell.english,'Reraise') then equip(sets.midcast.Haste)
else
equip(sets.midcast.Haste) end
end
end
if spell.skill == 'Divine Magic' and spell.target.type == 'Monster' then equip(sets.Midcast.Magic) end
if spell.skill == 'Enhancing Magic' then
if string.find(spell.english,'Barston') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Barwat') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Baraer') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Barfir') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Barbliz') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Barthun') then equip(sets.midcast.Barspell)
elseif string.find(spell.english,'Regen') then equip(sets.midcast.Regen)
elseif string.find(spell.english,'Barpetr') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barpois') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barsile') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barviru') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Baramne') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barpara') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barslee') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Barblin') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Boost') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Protect') then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Shell') then equip(sets.midcast.Buff)
elseif spell.name == 'Phalanx' then equip(sets.midcast.Buff)
elseif spell.name == 'Erase' then equip(sets.midcast.Buff)
elseif string.find(spell.english,'Teleport') then equip(sets.midcast.Haste)
elseif string.find(spell.english,'Recall') then equip(sets.midcast.Haste)
elseif string.find(spell.english,'Warp') then equip(sets.midcast.Haste)
elseif string.find(spell.english,'Spikes') then equip(sets.midcast.Haste)
elseif spell.name == 'Refresh' then equip(sets.midcast.Haste)
elseif spell.name == 'Flurry' then equip(sets.midcast.Haste)
elseif spell.name == 'Haste' then equip(sets.midcast.Haste)
elseif spell.name == 'Blink' then equip(sets.midcast.Haste)
elseif spell.name == 'Sneak' then equip(sets.midcast.Haste)
elseif spell.name == 'Invisible' then equip(sets.midcast.Haste)
elseif spell.name == 'Deodorize' then equip(sets.midcast.Haste)
elseif spell.name == 'Escape' then equip(sets.midcast.Haste)
elseif spell.name == 'Tractor' then equip(sets.midcast.Haste)
elseif spell.name == 'Stoneskin' then equip(sets.midcast.Stoneskin)
elseif spell.name == 'Aquaveil' then equip(sets.midcast.Aquaveil) end
end
end
end The reason you can't equip Raise or Reraise is because you have the rules commented out.
I cleaned it up for you. It hasn't been thoroughly tested but I'm confident it works. Code
function get_sets()
Define_Barspells()
Define_Buff_Spells()
Define_Haste_Spells()
sets.precast = {}
sets.midcast = {}
end
function precast(spell)
if sets.precast[spell.name] then
equip(sets.precast[spell.name])
elseif sets.precast.JA[spell.english] then
equip(sets.precast.JA[spell.english])
elseif spell.type=="WeaponSkill" then
if sets.precast.WS[spell.name] then
equip(sets.precast.WS[spell.name])
else
equip(sets.precast.WS.STR)
end
elseif string.find(spell.english,'Waltz') and spell.english ~= 'Healing Waltz' then
equip(sets.precast.Waltz)
elseif spell.action_type == 'Magic' then
if spell.skill == 'Healing Magic' then
if T{'Cure*', 'Curaga*'}:any(string.wcmatch+{spell.name}) then
equip(sets.precast.FC.Cure)
else
equip(sets.precast.FC.Normal)
end
elseif spell.skill == 'Enhancing Magic' then
equip(sets.precast.EnhancingMagic)
end
end
end
function midcast(spell)
if sets.midcast[spell.name] then
equip(sets.midcast[spell.name])
elseif buff_spells:contains(spell.name) then
equip(sets.midcast.Buff)
elseif haste_spells:contains(spell.name) then
equip(sets.midcast.Haste)
end
if spell.action_type == 'Magic' then
if spell.skill == 'Enfeebling Magic' then
equip(sets.midcast.Debuff)
elseif spell.skill == 'Elemental Magic' then
equip(sets.midcast.Magic)
elseif spell.skill == 'Healing Magic' then
if spell.name == 'Arise' then
equip(sets.midcast.Haste)
elseif T{'Raise*', 'Reraise*'}:any(string.wcmatch+{spell.name}) then
equip(sets.midcast.Haste)
elseif T{'Cure*', 'Cura*'}:any(string.wcmatch+{spell.name}) then
if spell.target.type == 'MONSTER' then
equip(sets.midcast.Magic)
else
equip(sets.midcast.Cure)
end
elseif spell.name:endswith('na') then
if spell.name == 'Cursna' or spell.name == 'Esuna' then
equip(sets.midcast.Haste)
else
equip(sets.midcast.Ailment)
end
end
elseif spell.skill == 'Divine Magic' and spell.target.type == 'Monster' then
equip(sets.Midcast.Magic)
elseif spell.skill == 'Enhancing Magic' then
if spell.name:startswith('Regen') then
equip(sets.midcast.Regen)
elseif elemental_barspells:contains(spell.name) then
equip(sets.midcast.Barspell)
elseif status_barspells:contains(spell.name) then
equip(sets.midcast.Buff)
elseif T{'Boost*', 'Regen*', 'Protect*', 'Shell*', 'Phalanx*'}:any(string.wcmatch+{spell.name}) then
equip(sets.midcast.Buff)
elseif T{'*Spikes', 'Teleport*', 'Recall*', 'Warp*', 'Refresh*', 'Flurry*', 'Haste*'}:any(string.wcmatch+{spell.name}) then
equip(sets.midcast.Haste)
end
end
end
end
function Define_Barspells()
elemental_barspells = S{'Barstonra', 'Barwatera', 'Baraera', 'Barfira', 'Barblizzara', 'Barthundra'}
status_barspells = S{'Barsleepra', 'Barpoisonra', 'Barparalyzra', 'Barblindra', 'Barsilencera', 'Barvira', 'Barpetra', 'Baramnesra'}
end
function Define_Buff_Spells()
buff_spells = T{'Esuna', 'Sacrifice'}
end
function Define_Haste_Spells()
haste_spells = S{'Blink', 'Sneak', 'Invisible', 'Deodorize', 'Escape', 'Tractor'}
end
Thank you very much, Quixacotl! It works like a charm ^_^
サーバ: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-03-31 15:43:26
I'm trying to transition from Spellcast to GearSwap and I'm using the beta examples as reference my Idle and Engage sets are working however WS and JA don't seem to be functioning, maybe somebody can point me in the right direction.
http://pastebin.com/SEyLf0Zw
Thanks so much!. First, any spell checks are case-sensitive. "buffactive['sneak attack']" will always be false.
Overall your precast rules, as written, are backwards.
Line 114 is enclosed so any SATA rules after that line are passed-over anytime you WS.
I reworked it like this; start with a base WS-set and layer SATA sets if SATA/SA/TA are up. Code is untested. Code
sets.WS = {}
sets.WS.SA = {}
sets.WS.TA = {}
sets.WS.SATA = {}
function precast(spell)
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
elseif spell.type=="WeaponSkill" then
local WS_set = ''
WS_set = set_combine(WS_set, sets.WS)
if sets.WS[spell.english] then
WS_set = set_combine(WS_set, sets.WS[spell.english])
end
if buffactive['Sneak Attack'] and buffactive['Trick Attack'] then
if sets.WS.SATA[spell.english] then
WS_set = set_combine(WS_set, sets.WS.SATA[spell.english])
else
WS_set = set_combine(WS_set, sets.WS.SATA)
end
elseif buffactive['Sneak Attack'] and not buffactive['Trick Attack'] then
if sets.WS.SA[spell.english] then
WS_set = set_combine(WS_set, sets.WS.SA[spell.english])
else
WS_set = set_combine(WS_set, sets.WS.SA)
end
elseif not buffactive['Sneak Attack'] and buffactive['Trick Attack'] then
if sets.WS.TA[spell.english] then
WS_set = set_combine(WS_set, sets.WS.TA[spell.english])
else
WS_set = set_combine(WS_set, sets.WS.TA)
end
end
equip(WS_set)
elseif string.find(spell.english,'Waltz') then
equip(sets.JA.Waltz)
end
end
Asura.Crevox
サーバ: Asura
Game: FFXI
Posts: 370
By Asura.Crevox 2015-03-31 17:48:58
Just reinstalled FFXI because of a hard drive failure (whole bunch of dumb issues still need resolving, etc) and Gearswap is erroring whenever I try to cast anything:
http://i.imgur.com/9MO2zGj.png
Any idea on the issue? Don't believe this is a problem with my script due to it referencing equip_processing.lua. I'm just trying to cast Cure. I've tried deleting Gearswap and having it redownload, still same issue.
Lakshmi.Byrth
VIP
サーバ: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2015-03-31 18:20:58
Your libraries are out of date or possibly don't exist. That function is in windower/addons/libs/extdata.lua
Try downloading this, extracting it, and copying the libs folder over:
https://github.com/Windower/Lua/archive/dev.zip
Asura.Crevox
サーバ: Asura
Game: FFXI
Posts: 370
By Asura.Crevox 2015-03-31 18:47:46
Thank you, that worked.
However, it has now introduced an error for Battlemod:
http://i.imgur.com/fVtVHBe.png
Lakshmi.Byrth
VIP
サーバ: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2015-03-31 18:54:17
I have no idea, try replacing the battlemod files with the one in that zip too.
Ragnarok.Allslove
サーバ: Ragnarok
Game: FFXI
Posts: 67
By Ragnarok.Allslove 2015-04-02 16:25:23
Hey guys. I just came back to the game today for fun and cupcakes. I noticed that the old Spellcast is dead and buried and won't even work if I try to load the old data.
I'm trying to figure out GearSwap, but I'm coming close to mass genocide as I try to figure out how it's supposed to work. I've tried following others' templates. Most of them are filled with gear I don't have (which I know I can just rewrite what I have), but there are so many seemingly redundant rules or rules so specific I don't know if I can comment them out or leave them alone.
Is there any kind of bare bones template that I can fill in and will just switch out my gear sets as I do stuff?
Quetzalcoatl.Orestes
サーバ: Quetzalcoatl
Game: FFXI
Posts: 430
By Quetzalcoatl.Orestes 2015-04-02 16:47:14
Mote has a Template.lua that you can rename and build as you like.
https://github.com/Kinematics/GearSwap-Jobs
You'll need to fill in gear for sets.idle, sets.engaged, and sets.precast.WS.
I'd use his other files as reference for set naming convention for specific spells, families of magic, abilities, etc.
[+]
サーバ: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-04-02 20:01:44
Ragnarok.Allslove said: »Hey guys. I just came back to the game today for fun and cupcakes. I noticed that the old Spellcast is dead and buried and won't even work if I try to load the old data.
I'm trying to figure out GearSwap, but I'm coming close to mass genocide as I try to figure out how it's supposed to work. I've tried following others' templates. Most of them are filled with gear I don't have (which I know I can just rewrite what I have), but there are so many seemingly redundant rules or rules so specific I don't know if I can comment them out or leave them alone.
Is there any kind of bare bones template that I can fill in and will just switch out my gear sets as I do stuff? The preloaded examples that came with GS is as barebones are you can get. They're in the \GearSwap\beta_examples_and_information folder. If you're just getting your feet wet with Gearswap then I suggest going this route.
Read over the OP to this thread (page 1). It has some very basic similarities and differences between Spellcast and Gearswap. You can also check out this tutorial.
Gearswap has a high learning curve if you're looking to add your own rules. If you have experience with Spellcast then you have a step up. For starters I suggest you copy an example and use notepad to fill-in your own gear. Once you get it working then try experimenting! Getting your own custom rules to work can be very rewarding.
As far as other examples, people gravitate to either Kinematics (you'll need his library files for them to work) or Bokura's. Each is relatively current and has its' own advantages and disadvantages. Kinematics is the most popular by far because it's designed for ease of user-customization and includes some nice extras, although it takes knowledge of his proprietary mechanics to take full advantage of its' customization.
[+]
Ragnarok.Allslove
サーバ: Ragnarok
Game: FFXI
Posts: 67
By Ragnarok.Allslove 2015-04-03 10:31:40
Thank you both for the help. After sleeping on it and re-reading some stuff, I managed to write a very basic setup for my PUP and get it working.
By Lunareticc 2015-04-07 11:21:31
Hello, Since the shift changes of BP animations, I have a problem on BP (mainly Rage). When I run // gs showswaps, the following sequence of sets:
- pet_precast
- aftercast
- pet_midcast
So BP starts with the set aftercast, and I am on the set midcast upon completion BP?
Have you an idea of the problem?
Lakshmi.Byrth
VIP
サーバ: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2015-04-07 11:22:44
pet_precast doesn't exist
By Lunareticc 2015-04-07 11:41:23
Yeah sorry:
- precast
- aftercast
- pet_midcast
サーバ: Asura
Game: FFXI
Posts: 1363
By Asura.Pergatory 2015-04-07 12:22:04
I've been swapping to BP timer gear in the midcast, and then BP potency gear in pet_midcast. Confirmed to work well with the new BP timings.
[+]
サーバ: Asura
Game: FFXI
Posts: 55
By Asura.Snubber 2015-04-08 06:39:23
Is it possible to rotate after.cast sets based on a check which is executed on the monster when status becomes engaged?
Rather than using the self command function?
サーバ: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-04-08 20:04:21
It's very possible to select aftercast sets based on a condition rather than a command. All you need to do is to look at any thf example to see how SATA is handled, or any pet job when pet is out. If you can turn any argument to true (if x = true then), then you can use that check to select a set in aftercast() or status_change().
サーバ: Asura
Game: FFXI
Posts: 55
By Asura.Snubber 2015-04-08 22:35:41
Do you mind elaborate more on such a condition?
I have been looking at the Byrth_THF.lua file in the given folder from Gearswap addon at the moment. Are the codes below from the lua file what you mean?
function buff_change(buff,gain_or_loss)
if buff=="Sneak Attack" then
soloSA = gain_or_loss
elseif buff=="Trick Attack" then
soloTA = gain_or_loss
end
end
サーバ: Asura
Game: FFXI
Posts: 55
By Asura.Snubber 2015-04-08 22:40:54
Another question, are we allowed to determine the real number of a monster's stat? Instead of Easy prey or Tough? I realise that even with the same mobs in the same area would spawn with a slightly different stat or lvl but all within a set range.
Would gearswap command allow us to analyse that and change to the required acc gear or eva gear needed? Could this be a condition?
サーバ: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-04-09 01:29:05
Do you mind elaborate more on such a condition?
I have been looking at the Byrth_THF.lua file in the given folder from Gearswap addon at the moment. Are the codes below from the lua file what you mean? Unfortunately Byrth's example doesn't have it so you can equip SATA gear when SATA is up. It only equips it when you WS. Not saying it's a bad example, it's a very good no-frills lua if you're starting out in GS and wish to learn the basics without being overwhelmed. It was Byrth's examples that got me started with GS.
Consider Bokura's THF. This is a good example of changing your basic engaged set when a condition changes. When SATA is up, you layer SATA gear over your engaged set and remain there until SATA is down or when you tag a mob. Code is edited to emphasize my point. Code
function status_change(new,old)
if new == 'Engaged' then
equipSet = sets.TP
if SA then
equipSet = set_combine(equipSet,sets.JA["Sneak Attack"])
end
if TA then
equipSet = set_combine(equipSet,sets.JA["Trick Attack"])
end
equip(equipSet)
end
end
Another question, are we allowed to determine the real number of a monster's stat? Instead of Easy prey or Tough? I realise that even with the same mobs in the same area would spawn with a slightly different stat or lvl but all within a set range.
Would gearswap command allow us to analyse that and change to the required acc gear or eva gear needed? Could this be a condition? If any mob conned easy prey or tough then you have the capability within GS to switch from normal to acc modes accordingly.
I cannot say it's not possible for GS to determine any particular mob. But as many have said before, any such check could be subject to abuse. So with respect to the devs and our community I'd have to say no, I can't even hint about it.
サーバ: Asura
Game: FFXI
Posts: 55
By Asura.Snubber 2015-04-09 04:08:40
1. For your code "if SA then", I remember seeing some coding with "if buff.active == SA". Does the code need to be like that or just your "if SA then" is fine?
2. Thank you for answering my 2nd question. I have been reading different codes which most of them all uses self_command or cycle(). I just didn't like the idea one have to type something to get a rotation for different sets. I would have thought there is another method of doing it. I thought about condition could be determine the existing buffs (but not SATA like you said) or using the check monster command. I guess that's why no one except you is answering. For that I thank you again for letting me know.
サーバ: Asura
Game: FFXI
Posts: 55
By Asura.Snubber 2015-04-09 04:19:30
During one of my searching for codes, I came across an excel file (I think it's excel, I couldn't remember it correctly), which contains all the commands for gearswap. When I try to search for it again, I just couldn't find it anymore. Does anyone know how the web address I can download it from?
I just wanna take a look because sometimes from looking at codes, I don't quite understand what a command does and in that "excel file" it explains all the commands and what it does.
Tks!
サーバ: Asura
Game: FFXI
Posts: 55
By Asura.Snubber 2015-04-09 04:34:09
Never mind about that "If SA then" code, I am reading Bokura's THF code now, I just realised what he did. ^.^
By Miang 2015-04-09 05:00:57
The Excel spreadsheet you're talking about comes with gearswap, it's in windower/addons/GearSwap/beta_examples_and_information
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.
|
|