|
Gearswap Support Thread
VIP
サーバ: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-05-18 16:28:29
Quote: Phoenix.Jiluun said: »
Precast Gear to work properly.
Define "work properly", and please explain what you feel is not working properly now.
The precast gear that spellcast showing isn't correct and the songs are going off after my idle set is back on. Here is a photo showing what it is saying my precast/midcast/ gear is.
Photo
This is what it should be but the photo isn't showing it. Code <set name="FastCast-Singing-*">
<head>Aoidos' Calot +2</head>
<neck>Aoidos' Matinee</neck>
<lear>Aoidos' Earring</lear>
<rear>Loquacious Earring</rear>
<body>Sha'ir Manteel</body>
<hands>Marduk's Dastanas +1</hands>
<lring>Prolix Ring</lring>
<back>Swith Cape</back>
<waist>Aoidos' Belt</waist>
<legs>Gendewitha Spats</legs>
<feet>Bihu Slippers +1</feet>
</set>
Finally realized what the problem is. You're asking about Spellcast. This is the GearSwap thread. I'd assumed you were referring to the Spellcast code as what you used to do, and were trying to get the same gear working in GearSwap.
The code you're referring to in Spellcast was dependent on you properly defining how much fast cast gear you had for various spell types, up in the <variables> section. It sounds like you didn't adjust that correctly. Also, all that code was a bit of a hack to get around Spellcast's limitations regarding aftercast timing; that isn't necessary at all in GearSwap.
However, since Spellcast is now deprecated, I'm not providing any notable support for those files anymore. I expect people to be making the move to GearSwap.
サーバ: Ragnarok
Game: FFXI
Posts: 209
By Ragnarok.Legendarycloud 2014-05-18 16:39:39
Thanks so much Motenten! I understand it now :D
サーバ: Phoenix
Game: FFXI
Posts: 57
By Phoenix.Craptaculous 2014-05-18 18:11:55
I use a MAB set for Sanguine Blade, I have no MAB on my TP set or Normalk WS sets.
Sanguine deals Stupid amounts of damage with my MAB, without GS on it deals 400.
GS works perfectly fine with my shitty internet, it's something in your lua itself! Post we can help with it :)
So I did a bit more extensive testing, and I think the issue is more or less my being weird about old habits:
So, I'll start out with my script, which is ridiculously simple: Code function get_sets()
sets.WS = {head = "Whirlpool Mask", neck = "Asperity Necklace", body = "Manibozho Jerkin", hands = "Hesychast's Gloves +1", left_ring = "Flame Ring",
right_ring = "Rajas Ring", back = "Anchoret's Mantle", waist = "Wanion Belt", legs = "Manibozho Brais" }
sets.PDT = {left_ring = "Dark Ring", head = "Qaaxo Mask", neck = "Twilight Torque", body = "Hesychast's Cyclas +1", hands = "Otronif Gloves +1", right_ring = "Dark Ring",
back = "Repulse Mantle", waist = "Black Belt", legs = "Otronif Brais +1" }
sets.MultiAtk = {head = "Whirlpool Mask", neck = "Asperity Necklace", body = "Qaaxo Harness", hands = "Qaaxo Mitaines", left_ring = "K'ayres Ring", right_ring = "Rajas Ring",
back = "Atheling Mantle", waist = "Windbuffet Belt", legs = "Otronif Brais +1"}
sets.HighAcc = {head = "Whirlpool Mask", neck = "Iqabi Necklace", body = "Qaaxo Harness", hands = "Hesychast's Gloves +1", left_ring = "K'ayres Ring", right_ring = "Rajas Ring",
back = "Anchoret's Mantle", waist = "Anquinus Belt", legs = "Manibozho Brais"}
end
function precast(spell)
if spell.type=="WeaponSkill" then
equip(sets.WS)
end
end
VS'd 15x on random stuff in morimar. I manually swap back to one of the three of my 'IDLE' sets depending on the situation. In this case, "/console gs equip sets.MultiAtk" since ACC is not an issue w/ Tinhaspa's to TP in for Morimar trash.
1st set with GS, simply just selecting VS from the menu, gear swapped as it is supposed to, WSAVG reported as 4.5k.
Ok, cool.
2nd set: I removed the Function precast portion, I swapped manually to sets.WS via "/console gs equip sets.WS", hit VS via game menu, then swapped back to "/console gs equip sets.MultiAtk" did it 15x for this set, too.
WSAVG: 4.5k
They were slight off but by like 10-50 dmg or so.....
>.>
So I guess it's working as intended, but one thing that I guess is making me look at it odd, is that with the GS If-statement, my character WS's, then Blinks into the gear, whereas with SC, it would Blink into gear then WS. And since it's doing that, it's me being overly nit-picky about dmg#'s. When in fact, it probably was just a bad day for ACC or some other random thing, or SB not catching all packets correctly in high lag situations like Delve.
it's just soo much faster than what I am used to I guess (_._)
サーバ: Phoenix
Game: FFXI
Posts: 1285
By Phoenix.Dramatica 2014-05-18 18:14:56
Is it impossible to get delve2 gear augments in gearswap working currently? Can't seem to get them to work.
Cerberus.Conagh
サーバ: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-05-18 19:08:12
Phoenix.Craptaculous said: »I use a MAB set for Sanguine Blade, I have no MAB on my TP set or Normalk WS sets.
Sanguine deals Stupid amounts of damage with my MAB, without GS on it deals 400.
GS works perfectly fine with my shitty internet, it's something in your lua itself! Post we can help with it :)
So I did a bit more extensive testing, and I think the issue is more or less my being weird about old habits:
So, I'll start out with my script, which is ridiculously simple: Code function get_sets()
sets.WS = {head = "Whirlpool Mask", neck = "Asperity Necklace", body = "Manibozho Jerkin", hands = "Hesychast's Gloves +1", left_ring = "Flame Ring",
right_ring = "Rajas Ring", back = "Anchoret's Mantle", waist = "Wanion Belt", legs = "Manibozho Brais" }
sets.PDT = {left_ring = "Dark Ring", head = "Qaaxo Mask", neck = "Twilight Torque", body = "Hesychast's Cyclas +1", hands = "Otronif Gloves +1", right_ring = "Dark Ring",
back = "Repulse Mantle", waist = "Black Belt", legs = "Otronif Brais +1" }
sets.MultiAtk = {head = "Whirlpool Mask", neck = "Asperity Necklace", body = "Qaaxo Harness", hands = "Qaaxo Mitaines", left_ring = "K'ayres Ring", right_ring = "Rajas Ring",
back = "Atheling Mantle", waist = "Windbuffet Belt", legs = "Otronif Brais +1"}
sets.HighAcc = {head = "Whirlpool Mask", neck = "Iqabi Necklace", body = "Qaaxo Harness", hands = "Hesychast's Gloves +1", left_ring = "K'ayres Ring", right_ring = "Rajas Ring",
back = "Anchoret's Mantle", waist = "Anquinus Belt", legs = "Manibozho Brais"}
end
function precast(spell)
if spell.type=="WeaponSkill" then
equip(sets.WS)
end
end
VS'd 15x on random stuff in morimar. I manually swap back to one of the three of my 'IDLE' sets depending on the situation. In this case, "/console gs equip sets.MultiAtk" since ACC is not an issue w/ Tinhaspa's to TP in for Morimar trash.
1st set with GS, simply just selecting VS from the menu, gear swapped as it is supposed to, WSAVG reported as 4.5k.
Ok, cool.
2nd set: I removed the Function precast portion, I swapped manually to sets.WS via "/console gs equip sets.WS", hit VS via game menu, then swapped back to "/console gs equip sets.MultiAtk" did it 15x for this set, too.
WSAVG: 4.5k
They were slight off but by like 10-50 dmg or so.....
>.>
So I guess it's working as intended, but one thing that I guess is making me look at it odd, is that with the GS If-statement, my character WS's, then Blinks into the gear, whereas with SC, it would Blink into gear then WS. And since it's doing that, it's me being overly nit-picky about dmg#'s. When in fact, it probably was just a bad day for ACC or some other random thing, or SB not catching all packets correctly in high lag situations like Delve.
it's just soo much faster than what I am used to I guess (_._)
No Offence but I could occasionally pop off 5 ja's and Not blink even using Spellcast but the durations on spells(IE SCH) would still procs, its just the game Visual Delay, packets would still be being sent correctly, and that's been known for years.... Could have anticipated that easily enough. Glad it's fixed though
Leviathan.Frotaut
サーバ: Leviathan
Game: FFXI
Posts: 281
By Leviathan.Frotaut 2014-05-18 19:13:52
how would i go about writing a rule for last resort. i would like it to auto equip multistrike set when last resort is up then swap back to normal tp set when buff wears.
Lakshmi.Byrth
VIP
サーバ: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2014-05-18 22:28:58
Phoenix.Dramatica said: »Is it impossible to get delve2 gear augments in gearswap working currently? Can't seem to get them to work.
I just merged -dev live. Rerun the launcher to pull down the latest gearswap version, and then use //gs export while wearing the gear that you're interested in. This should create an advanced set table for you. If you copy that table into your gearswap file, it might work. If the table is obviously messed up in some way ("???" augments, etc.) then tell me and I'll try to fix it.
The current augment system is fragile and I dislike it. I'm writing an extdata library (but it's not done yet) that should reinforce it substantially and make it consistent across addons. I'll probably finish it next weekend, but it might require some augment tables be re-made. I want to take GearSwap out of beta by June, so I'm pushing to get it done.
サーバ: Fenrir
Game: FFXI
Posts: 15
By Fenrir.Tesahade 2014-05-18 22:54:42
is it possible to cast a variable spell using gearswap? such as in spellcast i coded a storm check for sch if the spell element doesnt match weather i changespell to $%spellelementstorm. is there anyway to make a similar code in gearswap or should i simply write out each type of spell element like
Code if spell.element == world.weather_element then
equip(sets.Obi[spell.element])
else
if spell.element == Fire then
cancel_spell()
send_command('@input /ma Firestorm <me>')
elseif spell.element == Earth then
cancel_spell()
send_command('@input /ma Sandstorm <me>')
elseif spell.element == Water then
cancel_spell()
send_command('@input /ma Rainstorm <me>')
elseif spell.element == Wind then
cancel_spell()
send_command('@input /ma Windstorm <me>')
elseif spell.element == Ice then
cancel_spell()
send_command('@input /ma Hailstorm <me>')
elseif spell.element == Lighting then
cancel_spell()
send_command('@input /ma Thunderstorm <me>')
elseif spell.element == Light then
cancel_spell()
send_command('@input /ma Aurorastorm <me>')
elseif spell.element == Dark then
cancel_spell()
send_command('@input /ma Voidstorm <me>')
end
end
only reason i dont want to do this is <.< i did this for alot of spells but if i have to i have to :) ty for any info
edit: heres the spellcast code too, just incase it helps. Code
<if notWeatherElement = "%SpellElement" advanced= '"$StormCheck"= 1' > <!-- Storm Check-->
<action type= "Command">wait 5; input /ma "%Spell" <t></action>
<actlion type="changetarget" target="<me>" />
<action type="changespell" spell= $%SpellElementStorm />
</if>
Cerberus.Conagh
サーバ: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-05-18 23:27:18
Code sets.Obi = {}
sets.Obi.Fire = {waist='Karin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Earth = {waist='Dorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Water = {waist='Suirin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Wind = {waist='Furin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Ice = {waist='Hyorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Thunder = {waist='Rairin Obi',back='Twilight Cape',lring='Zodiac Ring'}
sets.Obi.Light = {waist='Korin Obi',back='Twilight Cape',lring='Zodiac Ring',main="Chatoyant Staff"}
sets.Obi.Dark = {waist='Anrin Obi',back='Twilight Cape',lring='Zodiac Ring'}
Code function midcast(spell,action)
if string.find(spell.english,'Cur') then
equip(sets.midcast_Cure)
if spell.element == world.weather_element or spell_element == world.day_element then
equip({main="Chatoyant Staff"},sets.Obi[spell.element])
end
if buffactive.rapture then
equip({head="Savant's Bonnet +2"})
end
That's the closest I can find to what you're asking, but I can't find anything that can change your spell from say one element to the relevant Helix.
Your first option would work fine, although I'm not sure I would want to cancel any nuke i'm casting to put a weather effect up first (IE I'm Stunning in thunderstorm but need to use an Ice nuke for example) but each to his own.
サーバ: Fenrir
Game: FFXI
Posts: 15
By Fenrir.Tesahade 2014-05-19 00:08:00
hence the StormCheck variable in the spellcast code just forgot to throw it in to the gearswap one i typed up there. and yeah that code is just right out of the Snprphnx_SCH.lua which aside from a basic overview of how to write a gearswap doesn't offer much in terms of expandin the capability of your code. not that its a bad code just everything is used as it was intended.
VIP
サーバ: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-05-19 00:28:48
is it possible to cast a variable spell using gearswap? such as in spellcast i coded a storm check for sch if the spell element doesnt match weather i changespell to $%spellelementstorm. is there anyway to make a similar code in gearswap
Very simple way of handling it:
Code
elements = {}
elements.storm_of = {['Light']="Aurorastorm", ['Dark']="Voidstorm", ['Fire']="Firestorm", ['Earth']="Sandstorm",
['Water']="Rainstorm", ['Wind']="Windstorm", ['Ice']="Hailstorm", ['Lightning']="Thunderstorm"}
force_storm = true
function precast(spell)
if spell.skill == 'Elemental Magic' and force_storm == true and spell.element ~= world.weather_element then
cancel_spell()
send_command('input /ma "'..elements.storm_of[spell.element]..'" <me>')
send_command('wait 4.5;input /ma "'..spell.name..'" '..spell.target.raw)
end
end
Note: this only gives the bare essentials. It doesn't try to figure out how to integrate this with your file. You need to do that yourself.
Cerberus.Shashu
サーバ: Cerberus
Game: FFXI
Posts: 26
By Cerberus.Shashu 2014-05-19 00:56:23
Curious could Gearswap distinguish between Refresh, Indi-Refresh, book-Refresh, and Refresh-aura?
I am using a spellcast skill-up .xml and it seems to think the Refresh Aura from Fablinix is Refresh from /rdm or Geo-Refresh. But if I unload I could have all the refresh that isn't being maintained by the script for an extra 6tic or so.
Lakshmi.Byrth
VIP
サーバ: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2014-05-19 05:59:50
Honestly I forget whether buffactive also has entries for buff IDs, but if it does not that would be trivial to add.
サーバ: Fenrir
Game: FFXI
Posts: 15
By Fenrir.Tesahade 2014-05-19 08:25:32
Very simple way of handling it:
Code
elements = {}
elements.storm_of = {['Light']="Aurorastorm", ['Dark']="Voidstorm", ['Fire']="Firestorm", ['Earth']="Sandstorm",
['Water']="Rainstorm", ['Wind']="Windstorm", ['Ice']="Hailstorm", ['Lightning']="Thunderstorm"}
force_storm = true
function precast(spell)
if spell.skill == 'Elemental Magic' and force_storm == true and spell.element ~= world.weather_element then
cancel_spell()
send_command('input /ma "'..elements.storm_of[spell.element]..'" <me>')
send_command('wait 4.5;input /ma "'..spell.name..'" '..spell.target.raw)
end
end
Note: this only gives the bare essentials. It doesn't try to figure out how to integrate this with your file. You need to do that yourself. :D this is perfect just what i was looking for thank you very much! ^^ so the '..blah..' is how u enter a gearswap variable ingame :) very useful information. where did u find the info to do that? i didn't see it anyway in the variables explanation file.
Quetzalcoatl.Orestes
サーバ: Quetzalcoatl
Game: FFXI
Posts: 430
By Quetzalcoatl.Orestes 2014-05-19 08:39:38
Very simple way of handling it:
Code
elements = {}
elements.storm_of = {['Light']="Aurorastorm", ['Dark']="Voidstorm", ['Fire']="Firestorm", ['Earth']="Sandstorm",
['Water']="Rainstorm", ['Wind']="Windstorm", ['Ice']="Hailstorm", ['Lightning']="Thunderstorm"}
force_storm = true
function precast(spell)
if spell.skill == 'Elemental Magic' and force_storm == true and spell.element ~= world.weather_element then
cancel_spell()
send_command('input /ma "'..elements.storm_of[spell.element]..'" <me>')
send_command('wait 4.5;input /ma "'..spell.name..'" '..spell.target.raw)
end
end
Note: this only gives the bare essentials. It doesn't try to figure out how to integrate this with your file. You need to do that yourself. :D this is perfect just what i was looking for thank you very much! ^^ so the '..blah..' is how u enter a gearswap variable ingame :) very useful information. where did u find the info to do that? i didn't see it anyway in the variables explanation file.
The syntax you're curious about '..spell.name..' is how you concatenate strings in lua. (add two strings together)
For example.
Code
value1 = 'Hello'
value2 = 'World'
value3 = value1 .. " " .. value2
print( value3 )
This will output: Hello World
サーバ: Phoenix
Game: FFXI
Posts: 1285
By Phoenix.Dramatica 2014-05-19 17:27:58
Phoenix.Dramatica said: »Is it impossible to get delve2 gear augments in gearswap working currently? Can't seem to get them to work.
I just merged -dev live. Rerun the launcher to pull down the latest gearswap version, and then use //gs export while wearing the gear that you're interested in. This should create an advanced set table for you. If you copy that table into your gearswap file, it might work. If the table is obviously messed up in some way ("???" augments, etc.) then tell me and I'll try to fix it.
The current augment system is fragile and I dislike it. I'm writing an extdata library (but it's not done yet) that should reinforce it substantially and make it consistent across addons. I'll probably finish it next weekend, but it might require some augment tables be re-made. I want to take GearSwap out of beta by June, so I'm pushing to get it done. Thanks! glad to hear, would anyone mind posting an example of a functional use of augments? I think I'm doing it wrong, feeling awfully stupid right now. lol
By Aoushi 2014-05-19 22:38:18
I'm new to this gearswap stuff but I am learning it bit by bit, I've been looking at a few examples and I don't fully understand what this means
send_command('bind f9 gs c cycle RangedMode')
send_command('bind ^f9 gs c cycle OffenseMode')
send_command('bind !f9 gs c cycle WeaponskillMode')
I do know those are keybinds and they're meant to cycle modes, but what does !f9 and ^f9 mean? thanks in advance for answering
サーバ: Sylph
Game: FFXI
Posts: 11
By Sylph.Marvolous 2014-05-19 22:57:17
I'm new to this gearswap stuff but I am learning it bit by bit, I've been looking at a few examples and I don't fully understand what this means
send_command('bind f9 gs c cycle RangedMode')
send_command('bind ^f9 gs c cycle OffenseMode')
send_command('bind !f9 gs c cycle WeaponskillMode')
I do know those are keybinds and they're meant to cycle modes, but what does !f9 and ^f9 mean? thanks in advance for answering
ctrlF9 and altF9
Cerberus.Shashu
サーバ: Cerberus
Game: FFXI
Posts: 26
By Cerberus.Shashu 2014-05-19 23:55:57
Honestly I forget whether buffactive also has entries for buff IDs, but if it does not that would be trivial to add.
Just was skimming through and old .xml and saw lines that had a rule for something like: "If casting Stoneskin/Utsusemi/Sneak and the current buff was already active, it would cancel it so you avoid the "no effect" message."
Cerberus.Conagh
サーバ: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-05-20 00:34:38
IN the resources library for Lua the Buff Id's are there..
43 for Refresh (RDM and BLU types) and 541 for Geo-refresh (Although its labled refresh).
have you tried making the
if buffactive['41']
cancel_spell()
for Gearswap to see if it works?
Lakshmi.Byrth
VIP
サーバ: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2014-05-20 00:49:04
It would be buffactive[41], but I just checked the code and it wouldn't work. I made it work on -dev, though.
Cerberus.Shashu
サーバ: Cerberus
Game: FFXI
Posts: 26
By Cerberus.Shashu 2014-05-20 00:52:52
Honestly, this is for a skill-up .xml for GEO. I would have no clue how to write a skill-up .lua (if possible) ...the extent of my knowledge of LUA files is changing other peoples sets to my own. lol
I found the buffIDs, wrote them in .xml and now all I am doing is casting the one spell over and over vs. the actual spells to skill-up.
Cerberus.Conagh
サーバ: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-05-20 02:12:21
Code function aftercast(spell,action)
Idle()
end
function status_change(new,action)
if new=='Idle' then
if Armor == '119' then
equip(sets.aftercast_Idle119)
else
Idle()
end
elseif new=='Resting' then
equip(sets.Resting)
end
end
function buff_change(buff,gain_or_loss)
if buff == "Sandstorm" then
Idle()
end
end
function Idle()
if buffactive['Sandstorm'] then
equip(sets.aftercast_Move)
elseif world.time >= 18.00 or world.time < 6.00 then -- night time
equip(sets.aftercast_IdleNight)
else
equip(sets.aftercast_IdleDay)
end
end
The 119 Armor part works fine, and this rules seems to equip IdleNight set fine, but it doesn't equip the day one, I've also tried it with the day times defined as well and that provided no success either..
Ragnarok.Tronian
サーバ: Ragnarok
Game: FFXI
Posts: 3
By Ragnarok.Tronian 2014-05-20 02:22:58
hi all,
I am new with gearswap and need some help with it.
I used to use changespell for my whm with below
<if Spell="Paralyze*"> <!-- Check conditions and change if needed when casting Paralyze II -->
<if SpellTargetType="Self|Player"> <!-- If target is player or self change to paralyna -->
<action type="DefaultTarget" target="<t>" />
<!-- <action type=ChangeTarget Target="<st>" /> -->
<changespell spell="Paralyna" />
I tried the below but it is not working
if spell.english == 'Paralze' and spell.target.raw == 'PLAYER' then
cancel_spell()
send_command('input /ma "Paralyna" 'PLAYER')
else
send_command('input /ma "Paralyze" <t>)
end
Thanks.
VIP
サーバ: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-05-20 02:24:11
Code function select_movement()
-- world.time is given in minutes into each day
-- 7:00 AM would be 420 minutes
-- 17:00 PM would be 1020 minutes
if world.time >= (17*60) or world.time <= (7*60) then
return sets.NightMovement
else
return sets.DayMovement
end
end
Cerberus.Conagh
サーバ: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-05-20 02:25:06
Code function select_movement()
-- world.time is given in minutes into each day
-- 7:00 AM would be 420 minutes
-- 17:00 PM would be 1020 minutes
if world.time >= (17*60) or world.time <= (7*60) then
return sets.NightMovement
else
return sets.DayMovement
end
end
Appreciated, I must had read the wrong Lua events lib that said it was hours.minutes :o
VIP
サーバ: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-05-20 02:28:38
spell.target.raw == 'PLAYER'
'PLAYER' is not a valid value for spell.target.raw. You want to check spell.target.type.
send_command('input /ma "Paralyna" 'PLAYER')
If you were to type:
/ma "Paralyna" 'PLAYER'
in the command line, what do you think would happen?
You should be casting on spell.target.name. You also would need to learn how to concatenate strings. The command you want is:
Code
send_command('input /ma "Paralyna" '..spell.target.name)
Ragnarok.Tronian
サーバ: Ragnarok
Game: FFXI
Posts: 3
By Ragnarok.Tronian 2014-05-20 04:00:57
Thanks for the tip, will check it out when I go home.
By Aoushi 2014-05-20 17:14:59
Hello, could someone correct me if I'm wrong on my following assumption. The example at the bottom is from Byrth's thf lua and I would like to know if the command, toggle tp set or toggle idle set is entered will that cycle through the tp sets within the gearswap?
function self_command(command)
if command == 'toggle TP set' then
TP_Index = TP_Index +1
if TP_Index > #TP_Set_Names then TP_Index = 1 end
send_command('@input /echo ----- TP Set changed to '..TP_Set_Names[TP_Index]..' -----')
equip(sets.TP[TP_Set_Names[TP_Index]])
elseif command == 'toggle Idle set' then
Idle_Index = Idle_Index +1
if Idle_Index > #Idle_Set_Names then Idle_Index = 1 end
send_command('@input /echo ----- Idle Set changed to '..Idle_Set_Names[Idle_Index]..' -----')
equip(sets.Idle[Idle_Set_Names[Idle_Index]])
end
end
Asura.Astaro
サーバ: Asura
Game: FFXI
Posts: 9
By Asura.Astaro 2014-05-20 17:31:20
Can anyone help me with this please?
I was given a link to this GS file for SMN, but it isn't switching into the magical Rage BP gear correctly when using BP's. I've tested using show_swaps :-/ Any ideas?
-------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and it's supplementary files) to go with this.
-- Also, you'll need the Shortcuts addon to handle the auto-targetting of the custom pact commands.
--[[
Custom commands:
gs c petweather
Automatically casts the storm appropriate for the current avatar, if possible.
gs c siphon
Automatically run the process to: dismiss the current avatar; cast appropriate
weather; summon the appropriate spirit; Elemental Siphon; release the spirit;
and re-summon the avatar.
Will not cast weather you do not have access to.
Will not re-summon the avatar if one was not out in the first place.
Will not release the spirit if it was out before the command was issued.
gs c pact [PactType]
Attempts to use the indicated pact type for the current avatar.
PactType can be one of:
cure
curaga
buffOffense
buffDefense
buffSpecial
debuff1
debuff2
sleep
nuke2
nuke4
bp70
bp75 (merits and lvl 75-80 pacts)
astralflow
--]]
-- Initialization function for this job file.
function get_sets()
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent.
function job_setup()
state.Buff["Avatar's Favor"] = buffactive["Avatar's Favor"] or false
spirits = S{"LightSpirit", "DarkSpirit", "FireSpirit", "EarthSpirit", "WaterSpirit", "AirSpirit", "IceSpirit", "ThunderSpirit"}
avatars = S{"Carbuncle", "Fenrir", "Diabolos", "Ifrit", "Titan", "Leviathan", "Garuda", "Shiva", "Ramuh", "Odin", "Alexander", "Cait Sith"}
magicalRagePacts = S{
'Inferno','Earthen Fury','Tidal Wave','Aerial Blast','Diamond Dust','Judgement Bolt','Searing Light','Howling Moon','Ruinous Omen',
'Fire II','Stone II','Water II','Aero II','Blizzard II','Thunder II',
'Fire IV','Stone IV','Water IV','Aero IV','Blizzard IV','Thunder IV',
'Thunderspark','Burning Strike','Meteorite','Nether Blast','Flaming Crush',
'Meteor Strike','Heavenly Strike','Wind Blade','Geocrush','Grand Fall','Thunderstorm',
'Holy Mist','Lunar Bay','Night Terror','Level ? Holy'}
pacts = {}
pacts.cure = {['Carbuncle']='Healing Ruby'}
pacts.curaga = {['Carbuncle']='Healing Ruby II', ['Garuda']='Whispering Wind', ['Leviathan']='Spring Water'}
pacts.buffoffense = {['Carbuncle']='Glittering Ruby', ['Ifrit']='Crimson Howl', ['Garuda']='Hastega', ['Ramuh']='Rolling Thunder',
['Fenrir']='Ecliptic Growl'}
pacts.buffdefense = {['Carbuncle']='Shining Ruby', ['Shiva']='Frost Armor', ['Garuda']='Aerial Armor', ['Titan']='Earthen Ward',
['Ramuh']='Lightning Armor', ['Fenrir']='Ecliptic Howl', ['Diabolos']='Noctoshield', ['Cait Sith']='Reraise II'}
pacts.buffspecial = {['Ifrit']='Inferno Howl', ['Garuda']='Fleet Wind', ['Titan']='Earthen Armor', ['Diabolos']='Dream Shroud',
['Carbuncle']='Soothing Ruby', ['Fenrir']='Heavenward Howl', ['Cait Sith']='Raise II'}
pacts.debuff1 = {['Shiva']='Diamond Storm', ['Ramuh']='Shock Squall', ['Leviathan']='Tidal Roar', ['Fenrir']='Lunar Cry',
['Diabolos']='Pavor Nocturnus', ['Cait Sith']='Eerie Eye'}
pacts.debuff2 = {['Shiva']='Sleepga', ['Leviathan']='Slowga', ['Fenrir']='Lunar Roar', ['Diabolos']='Somnolence'}
pacts.sleep = {['Shiva']='Sleepga', ['Diabolos']='Nightmare', ['Cait Sith']='Mewing Lullaby'}
pacts.nuke2 = {['Ifrit']='Fire II', ['Shiva']='Blizzard II', ['Garuda']='Aero II', ['Titan']='Stone II',
['Ramuh']='Thunder II', ['Leviathan']='Water II'}
pacts.nuke4 = {['Ifrit']='Fire IV', ['Shiva']='Blizzard IV', ['Garuda']='Aero IV', ['Titan']='Stone IV',
['Ramuh']='Thunder IV', ['Leviathan']='Water IV'}
pacts.bp70 = {['Ifrit']='Flaming Crush', ['Shiva']='Rush', ['Garuda']='Predator Claws', ['Titan']='Mountain Buster',
['Ramuh']='Chaotic Strike', ['Leviathan']='Spinning Dive', ['Carbuncle']='Meteorite', ['Fenrir']='Eclipse Bite',
['Diabolos']='Nether Blast'}
pacts.bp75 = {['Ifrit']='Meteor Strike', ['Shiva']='Heavenly Strike', ['Garuda']='Wind Blade', ['Titan']='Geocrush',
['Ramuh']='Thunderstorm', ['Leviathan']='Grand Fall', ['Carbuncle']='Holy Mist', ['Fenrir']='Lunar Bay',
['Diabolos']='Night Terror', ['Cait Sith']='Level ? Holy'}
pacts.astralflow = {['Ifrit']='Inferno', ['Shiva']='Diamond Dust', ['Garuda']='Aerial Blast', ['Titan']='Earthen Fury',
['Ramuh']='Judgment Bolt', ['Leviathan']='Tidal Wave', ['Carbuncle']='Searing Light', ['Fenrir']='Howling Moon',
['Diabolos']='Ruinous Omen', ['Cait Sith']="Altana's Favor"}
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
options.OffenseModes = {'Normal'}
options.DefenseModes = {'Normal'}
options.WeaponskillModes = {'Normal'}
options.CastingModes = {'Normal'}
options.IdleModes = {'Normal'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
state.Defense.PhysicalMode = 'PDT'
-- Durations for wards we want to create custom timers for.
durations = {}
durations['Earthen Armor'] = 232
durations['Shining Ruby'] = 340
durations['Dream Shroud'] = 352
durations['Noctoshield'] = 352
durations['Inferno Howl'] = 232
durations['Hastega'] = 352
-- Icons to use for the timers (from plugins/icons directory)
timer_icons = {}
-- 00054 for stoneskin, or 00299 for Titan
timer_icons['Earthen Armor'] = 'spells/00299.png'
-- 00043 for protect, or 00296 for Carby
timer_icons['Shining Ruby'] = 'spells/00043.png'
-- 00304 for Diabolos
timer_icons['Dream Shroud'] = 'spells/00304.png'
-- 00106 for phalanx, or 00304 for Diabolos
timer_icons['Noctoshield'] = 'spells/00106.png'
-- 00100 for enfire, or 00298 for Ifrit
timer_icons['Inferno Howl'] = 'spells/00298.png'
-- 00358 for hastega, or 00301 for Garuda
timer_icons['Hastega'] = 'spells/00358.png'
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function file_unload()
if binds_on_unload then
binds_on_unload()
end
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['Astral Flow'] = {head="Glyphic Horn"}
sets.precast.JA['Elemental Siphon'] = {feet="Caller's Pigaches +2"} -- back="Conveyance Cape"
sets.precast.JA['Mana Cede'] = {hands="Caller's Bracers +2"}
-- Pact delay reduction gear
sets.precast.BloodPactWard = {ammo="Seraphicaller",head="Evoker's Horn",body="Convoker's Doublet",hands="Glyphic Bracers"}
sets.precast.BloodPactRage = sets.precast.BloodPactWard
-- Fast cast sets for spells
sets.precast.FC = {
head="Nahtirah Hat",ear2="Loquacious Earring",
body="Hedera Cotehardie",ring1="Prolix Ring",
back="Swith Cape +1",waist="Witful Belt",legs="Artsieq Hose",feet="Chelona Boots"}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
head="Nahtirah Hat",
body="Hagondes Coat +1",hands="Yaoyotl Gloves",
back="Pahtli Cape",waist="Cascade 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['Myrkr'] = {
head="Nahtirah Hat",ear1="Gifted Earring",ear2="Loquacious Earring",
body="Convoker's Doublet",hands="Caller's Bracers +2",ring1="Evoker's Ring",ring2="Sangoma Ring",
back="Pahtli Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Chelona Boots"}
-- Midcast Sets
sets.midcast.FastRecast = {
head="Nahtirah Hat",ear2="Loquacious Earring",
body="Hedera Cotehardie",hands="Bokwus Gloves",ring1="Prolix Ring",
back="Swith Cape +1",waist="Witful Belt",legs="Artsieq Hose",feet="Chelona Boots"}
sets.midcast.Cure = {main="Tamaxchi",sub="Genbu's Shield",
head="Nahtirah Hat",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Prolix Ring",ring2="Sirona's Ring",
back="Swith Cape +1",waist="Witful Belt",legs="Nares Trews",feet="Hagondes Sabots"}
sets.midcast.Stoneskin = {waist="Siegel Sash"}
sets.midcast.Pet.BloodPactWard = {main="Soulscourge",sub="Vox Grip",ammo="Seraphicaller",
head="Evoker's Horn",neck="Caller's Pendant",
body="Caller's Doublet +2",hands="Glyphic Bracers",ring1="Evoker's Ring",ring2="Fervor Ring",
waist="Jaq'ij Sash",legs="Caller's Spats +2"}
sets.midcast.Pet.PhysicalBloodPactRage = {main="Soulscourge",sub="Vox Grip",ammo="Seraphicaller",
head="Evoker's Horn",neck="Caller's Pendant",
body="Convoker's Doublet",hands="Caller's Bracers +2",ring1="Evoker's Ring",ring2="Fervor Ring",
waist="Jaq'ij Sash",legs="Summoner's Spats",feet="Convoker's Pigaches"}
sets.midcast.Pet.MagicalBloodPactRage = {main="Eminent Pole",sub="Vox Grip",ammo="Seraphicaller",
head="Evoker's Horn",neck="Caller's Pendant",
body="Convoker's Doublet",hands="Glyphic Bracers",ring1="Evoker's Ring",ring2="Fervor Ring",
back="Tiresias' Cape",waist="Jaq'ij Sash",legs="Caller's Spats +2",feet="Hagondes Sabots"}
sets.midcast.Pet.Spirit = set_combine(sets.midcast.Pet.BloodPactRage, {legs="Summoner's Spats"})
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Chatoyant Staff",sub="Oneiros Grip",ammo="Seraphicaller",
head="Convoker's Horn",neck="Wiglen Gorget",ear1="Gifted Earring",ear2="Loquacious Earring",
body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Pahtli Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Chelona Boots"}
-- Idle sets
sets.idle = {main="Bolelabunga",sub="Genbu's Shield",ammo="Seraphicaller",
head="Caller's Horn +2",neck="Wiglen Gorget",ear1="Gifted Earring",ear2="Loquacious Earring",
body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Kumbira Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}
sets.idle.PDT = {main="Terra's Staff",sub="Oneiros Grip",ammo="Seraphicaller",
head="Convoker's Horn",neck="Twilight Torque",ear1="Merman's Earring",ear2="Merman's Earring",
body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Sangoma Ring",
back="Repulse Mantle",waist="Hierarch Belt",legs="Hagondes Pants",feet="Serpentes Sabots"}
-- perp costs:
-- spirits: 7
-- carby: 11 (5 with mitts)
-- fenrir: 13
-- others: 15
-- avatar's favor: -4/tick
-- -perp gear:
-- Patriarch Cane: -3
-- Glyphic Horn: -4
-- Caller's Doublet +2: -4
-- Evoker's Ring: -1
-- Convoker's Pigaches: -4
-- total: -16
sets.idle.Avatar = {main="Patriarch Cane",sub="Genbu's Shield",ammo="Seraphicaller",
head="Glyphic Horn",neck="Caller's Pendant",ear1="Gifted Earring",ear2="Loquacious Earring",
body="Caller's Doublet +2",hands="Serpentes Cuffs",ring1="Evoker's Ring",ring2="Sangoma Ring",
back="Kumbira Cape",waist="Hierarch Belt",legs="Ngen Seraweels",feet="Convoker's Pigaches"}
sets.idle.Spirit = {main="Patriarch Cane",sub="Genbu's Shield",ammo="Seraphicaller",
head="Convoker's Horn",neck="Caller's Pendant",ear1="Gifted Earring",ear2="Loquacious Earring",
body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Evoker's Ring",ring2="Sangoma Ring",
back="Tiresias' Cape",waist="Hierarch Belt",legs="Summoner's Spats",feet="Convoker's Pigaches"}
sets.idle.Town = {main="Bolelabunga",sub="Genbu's Shield",ammo="Seraphicaller",
head="Convoker's Horn",neck="Wiglen Gorget",ear1="Gifted Earring",ear2="Loquacious Earring",
body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Sangoma Ring",
back="Kumbira Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}
-- Favor can trade the -4 perp of Glyphic Horn for +2 refresh of Caller's Horn (plus enhance favor).
sets.idle.Avatar.Favor = {head="Caller's Horn +2"}
sets.idle.Avatar.Melee = {hands="Regimen Mittens",waist="Kuku Stone",legs="Convoker's Spats"}
sets.perp = {}
sets.perp.Day = {hands="Caller's Bracers +2"}
sets.perp.Weather = {neck="Caller's Pendant",hands="Caller's Bracers +2"}
-- Carby: Mitts+Conv.feet+Ev.Ring = 0/tick perp. Everything else should be +refresh
sets.perp.Carbuncle = {main="Bolelabunga",sub="Genbu's Shield",
head="Convoker's Horn",body="Hagondes Coat +1",hands="Carbuncle Mitts",legs="Nares Trews",feet="Convoker's Pigaches"}
-- Fenrir: doesn't need full -perp set; trade body for +refresh
sets.perp.Fenrir = {body="Hagondes Coat +1"}
sets.perp.Diabolos = {waist="Jaq'ij Sash"}
sets.perp.Alexander = sets.midcast.Pet.BloodPactWard
-- Defense sets
sets.defense.PDT = {main=gear.Staff.PDT,
head="Hagondes Hat",neck="Wiglen Gorget",ear1="Gifted Earring",ear2="Loquacious Earring",
body="Hagondes Coat +1",hands="Yaoyotl Gloves",ring1="Dark Ring",ring2="Dark Ring",
back="Repulse Mantle",waist="Hierarch Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
sets.defense.MDT = {
head="Hagondes Hat",neck="Twilight Torque",ear1="Gifted Earring",ear2="Loquacious Earring",
body="Hedera Cotehardie",hands="Yaoyotl Gloves",ring1="Dark Ring",ring2="Dark Ring",
back="Kumbira Cape",waist="Hierarch Belt",legs="Artsieq Hose",feet="Hagondes Sabots"}
sets.Kiting = {}
-- 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 = {ammo="Seraphicaller",
head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Hedera Cotehardie",hands="Bokwus Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Kumbira Cape",waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
equip(sets.midcast.FastRecast)
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted then
if state.Buff[spell.name] ~= nil then
state.Buff[spell.name] = true
end
end
end
-- Runs when a pet initiates an action.
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_pet_midcast(spell, action, spellMap, eventArgs)
if spirits:contains(pet.name) then
classes.CustomClass = 'Spirit'
end
end
-- Runs when pet completes an action.
function job_pet_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted then
create_pact_timer(spell)
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if pet.isvalid then
if pet.element == world.day_element then
idleSet = set_combine(idleSet, sets.perp.Day)
end
if pet.element == world.weather_element then
idleSet = set_combine(idleSet, sets.perp.Weather)
end
if sets.perp[pet.name] then
idleSet = set_combine(idleSet, sets.perp[pet.name])
end
if state.Buff["Avatar's Favor"] and avatars:contains(pet.name) then
idleSet = set_combine(idleSet, sets.idle.Avatar.Favor)
end
if pet.status == 'Engaged' then
idleSet = set_combine(idleSet, sets.idle.Avatar.Melee)
end
end
return idleSet
end
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
handle_equipping_gear(player.status)
elseif storms:contains(buff) then
handle_equipping_gear(player.status)
end
end
-- Called when the player's pet's status changes.
-- This is also called after pet_change after a pet is released. Check for pet validity.
function job_pet_status_change(newStatus, oldStatus, eventArgs)
if pet.isvalid and not midaction() and not pet_midaction() and (newStatus == 'Engaged' or oldStatus == 'Engaged') then
handle_equipping_gear(player.status, newStatus)
end
end
-- Called when a player gains or loses a pet.
-- pet == pet structure
-- gain == true if the pet was gained, false if it was lost.
function job_pet_change(petparam, gain)
classes.CustomIdleGroups:clear()
if gain then
if avatars:contains(pet.name) then
classes.CustomIdleGroups:append('Avatar')
elseif spirits:contains(pet.name) then
classes.CustomIdleGroups:append('Spirit')
end
else
select_default_macro_book()
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for custom player commands.
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'petweather' then
handle_petweather()
eventArgs.handled = true
elseif cmdParams[1]:lower() == 'siphon' then
handle_siphoning()
eventArgs.handled = true
elseif cmdParams[1]:lower() == 'pact' then
handle_pacts(cmdParams)
eventArgs.handled = true
end
end
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)
classes.CustomIdleGroups:clear()
if pet.isvalid then
if avatars:contains(pet.name) then
classes.CustomIdleGroups:append('Avatar')
elseif spirits:contains(pet.name) then
classes.CustomIdleGroups:append('Spirit')
end
end
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell)
if spell.type == 'BloodPactRage' then
if magicalRagePacts:contains(spell.english) then
return 'MagicalBloodPactRage'
else
return 'PhysicalBloodPactRage'
end
end
end
-- Cast the appopriate storm for the currently summoned avatar, if possible.
function handle_petweather()
if player.sub_job ~= 'SCH' then
add_to_chat(122, "You can not cast storm spells")
return
end
if not pet.isvalid then
add_to_chat(122, "You do not have an active avatar.")
return
end
local element = pet.element
if element == 'Thunder' then
element = 'Lightning'
end
if S{'Light','Dark','Lightning'}:contains(element) then
add_to_chat(122, 'You do not have access to '..elements.storm_of[element]..'.')
return
end
local storm = elements.storm_of[element]
if storm then
send_command('@input /ma "'..elements.storm_of[element]..'" <me>')
else
add_to_chat(123, 'Error: Unknown element ('..tostring(element)..')')
end
end
-- Custom uber-handling of Elemental Siphon
function handle_siphoning()
if areas.Cities:contains(world.area) then
add_to_chat(122, 'Cannot use Elemental Siphon in a city area.')
return
end
local siphonElement
local stormElementToUse
local releasedAvatar
local dontRelease
-- If we already have a spirit out, just use that.
if pet.isvalid and spirits:contains(pet.name) then
siphonElement = pet.element
dontRelease = true
-- If current weather doesn't match the spirit, but the spirit matches the day, try to cast the storm.
if player.sub_job == 'SCH' and pet.element == world.day_element and pet.element ~= world.weather_element then
if not S{'Light','Dark','Lightning'}:contains(pet.element) then
stormElementToUse = pet.element
end
end
-- If we're subbing /sch, there are some conditions where we want to make sure specific weather is up.
-- If current (single) weather is opposed by the current day, we want to change the weather to match
-- the current day, if possible.
elseif player.sub_job == 'SCH' and world.weather_element ~= 'None' then
local intense = get_weather_intensity()
-- We can override single-intensity weather; leave double weather alone, since even if
-- it's partially countered by the day, it's not worth changing.
if intense == 1 then
-- If current weather is weak to the current day, it cancels the benefits for
-- siphon. Change it to the day's weather if possible (+0 to +20%), or any non-weak
-- weather if not.
-- If the current weather matches the current avatar's element (being used to reduce
-- perpetuation), don't change it; just accept the penalty on Siphon.
if world.weather_element == elements.weak_to[world.day_element] and
(not pet.isvalid or world.weather_element ~= pet.element) then
-- We can't cast lightning/dark/light weather, so use a neutral element
if S{'Light','Dark','Lightning'}:contains(world.day_element) then
stormElementToUse = 'Wind'
else
stormElementToUse = world.day_element
end
end
end
end
-- If we decided to use a storm, set that as the spirit element to cast.
if stormElementToUse then
siphonElement = stormElementToUse
elseif world.weather_element ~= 'None' and world.weather_element ~= elements.weak_to[world.day_element] then
siphonElement = world.weather_element
else
siphonElement = world.day_element
end
local command = ''
local releaseWait = 0
if pet.isvalid and avatars:contains(pet.name) then
command = command..'input /pet "Release" <me>;wait 1.1;'
releasedAvatar = pet.name
releaseWait = 10
end
if stormElementToUse then
command = command..'input /ma "'..elements.storm_of[stormElementToUse]..'" <me>;wait 4;'
releaseWait = releaseWait - 4
end
if not (pet.isvalid and spirits:contains(pet.name)) then
command = command..'input /ma "'..elements.spirit_of[siphonElement]..'" <me>;wait 4;'
releaseWait = releaseWait - 4
end
command = command..'input /ja "Elemental Siphon" <me>;'
releaseWait = releaseWait - 1
releaseWait = releaseWait + 0.1
if not dontRelease then
if releaseWait > 0 then
command = command..'wait '..tostring(releaseWait)..';'
else
command = command..'wait 1.1;'
end
command = command..'input /pet "Release" <me>;'
end
if releasedAvatar then
command = command..'wait 1.1;input /ma "'..releasedAvatar..'" <me>'
end
send_command(command)
end
-- Handles executing blood pacts in a generic, avatar-agnostic way.
-- cmdParams is the split of the self-command.
-- gs c [pact] [pacttype]
function handle_pacts(cmdParams)
if areas.Cities:contains(world.area) then
add_to_chat(122, 'You cannot use pacts in town.')
return
end
if not pet.isvalid then
add_to_chat(122,'No avatar currently available. Returning to macro set 4.')
set_macro_page(1)
return
end
if spirits:contains(pet.name) then
add_to_chat(122,'Cannot use pacts with spirits.')
return
end
if not cmdParams[2] then
add_to_chat(123,'No pact type given.')
return
end
local pact = cmdParams[2]:lower()
if not pacts[pact] then
add_to_chat(123,'Unknown pact type: '..tostring(pact))
return
end
if pacts[pact][pet.name] then
if pact == 'astralflow' and not buffactive['astral flow'] then
add_to_chat(122,'Cannot use Astral Flow pacts without 2hr active.')
return
end
-- Leave out target; let Shortcuts auto-determine it.
send_command('@input /pet "'..pacts[pact][pet.name]..'"')
else
add_to_chat(122,pet.name..' does not have a pact of type ['..pact..'].')
end
end
function create_pact_timer(spell)
-- Create custom timers for ward pacts.
if durations and durations[spell.english] then
local timer_cmd = 'timers c "'..spell.english..'" '..tostring(durations[spell.english])..' down'
if timer_icons[spell.english] then
timer_cmd = timer_cmd..' '..timer_icons[spell.english]
end
send_command(timer_cmd)
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
set_macro_page(1, 4)
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.
|
|