|
Gearswap Support Thread
Bahamut.Ayasha
Serveur: Bahamut
Game: FFXI
Posts: 89
By Bahamut.Ayasha 2018-01-04 05:40:19
I believe the problem stems from line 262 in your lua: Code elseif spell.skill == 'Enhancing Magic' then
This does a check after the initial midcast function is done handling gear changes to see if the type of the spell cast is Enhancing (see the POST in post_midcast). Stoneskin and Refresh both fall under that category. Since that conditional will equip your set (sets.midcast.EnhancingDuration) for ANY enhancing magic cast, this will overwrite any specific gear you have defined for those spells applied during your midcast function with the gear defined in your Enhancing Duration set. If you examine that set, you will see that it combines your complete Enhancing Magic set with duration gear. This explains why deleting your Enhancing magic set worked; it simply had no set to equip over the set that your midcast function automatically handled.
Here is what is happening in plain English.
1.) Notice that you are about to cast a spell.
2.) Precast function: Handle relevant precast equipment based on the spell-type or other specified instructions. In this case, your fast cast gear.
3.) Midcast function: Handle relevant midcast equipment based on the spell-type or other specified instructions. In your case, it sees Stoneskin, for example. Equip sets.midcast.Stoneskin set.
4.) Post_Midcast function: Apply different gearsets based on conditionals. In your case: Is this spell Enfeebling magic? No. Ok, is this spell Enhancing magic? Yes. Equip sets.midcast.EnhancingDuration set. Is spell target myself? Yes. Ok, cool. Equip sets.buff.EnhancingDuration. Oh, that doesn't exist. Throw error to console.
...
And so forth.
You will notice that in section 4, it doesn't care what the spell being cast is, so long as it's designated as enhancing magic.
A kinda hack-y fix you could do would be to change it to:
Code elseif spell.skill == 'Enhancing Magic' and not (spell.english == "Stoneskin" or spell.english:startswith('Refresh') or spell.english:startswith('En')) then
This will cause the function to skip handling any gear changes if those spells are cast. I haven't tested this, but your post midcast function is almost certainly the reason this is happening.
This is just a bandaid, though. Any time you want spells to be excluded, you will need to add it to that list, or make a list containing spells to be excluded at the top of your lua, and just have the function check if the spell is contained in that list.
Serveur: Asura
Game: FFXI
Posts: 1397
By Asura.Toralin 2018-01-04 07:15:02
Carbuncle.Kigensuro said: »-- Diffusion --
BlueMagic_Diffusion = S{
'Amplification','Cocoon','Exuviation','Feather Barrier','Harden*','Memento Mori','Metallic Body',
'Mighty Guard','Plasma Charge','Reactor Cool','Refueling','Saline Coat','Warm-Up','Zephyr Mantle'}
-- Unbridled --
BlueMagic_Unbridled = S{
'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
'Droning Whirlwind','Gates of Hades','Harden*','Mighty Guard','Pyric Bulwark',
'Thunderbolt','Tourbillion'} on my BLU I have a list of spells that are defined as diffusion spells (including mighty guard and harden shell) MG works and the midcast equips my boots but harden shell does not
I don't believe :contains will parse * as a wildcard like most your xml files do, but I do think there's a helper function for it in the strings library. I'd just spell out Harden Shell. as Toralin said you cant use wildcards in lua like this
-lua uses regEx along with such like string.gmatch
however sence i have these alredy built these lists ill give you my full lists for them Code -- Diffusion --
BlueMagic_Diffusion = S{"Metallic Body","Cocoon","Refueling","Feather Barrier","Memento Mori","Zephyr Mantle","Warm-Up","Amplification",
"Triumphant Roar","Saline Coat","Reactor Cool","Exuviation","Plasma Charge","Regeneration","Battery Charge","Animating Wail","Magic Barrier",
"Fantod","Occultation","Mighty Guard"}
-- Unbridled --
BlueMagic_Unbridled = S{"Harden Shell","Thunderbolt","Absolute Terror","Gates of Hades","Tourbillion","Pyric Bulwark","Bilgestorm","Bloodrake","Droning Whirlwind",
"Carcharian Verve","Blistering Roar","Mighty Guard","Cruel Joke","Cesspool","Tearing Gust"}
Ugg sorry about that, I put the wildcard in there as a testing effect it was spelled otu Harden Shell and didnt seem to pick it up. I will try your list with the " instead of ' also i added Harden Shell to the list
Serveur: Ragnarok
Game: FFXI
Posts: 1
By Ragnarok.Skyinvader 2018-01-08 11:27:36
Is it possible to make a function line to make it if the target hp is less then 10% it would change the gear set or atleast the back to a capacity back?
By Darkvlade 2018-01-16 10:39:38
Hello ladies & gents, Im new to gearswap and have a few questions that I will appreciate if I can be lead in the right direction.
For example is there a function on GS that tells me which set Im whenever I use magic or JA, WS etc in the chatlog also if any gear didnt log will GS tell me if such piece is missing (like I left that piece in mog sack).
Does GS recognize the gear stored in the mog wardrobes 1-4 or is specific to any specific bag only?
Also for my PLD lua (Mote’s based) theres not a precast/midcast set for Phalanx, can anyone that has it please share it and let me know if I just insert it on the precast set or anything else I need to add.
Thanks in advance.
Shiva.Hiep
Serveur: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2018-01-16 10:54:15
Quote: For example is there a function on GS that tells me which set Im whenever I use magic or JA, WS etc in the chatlog also if any gear didnt log will GS tell me if such piece is missing (like I left that piece in mog sack). If you're using a mote's based lua, hitting f12 should tell you what mode you're currently in. If you wanted to see if your gear is swapping for every action (JA, WS, etc.), type in //gs showswaps and then do the action you want to test. To check if you're missing a piece of gear, type in //gs validate.
Quote: Does GS recognize the gear stored in the mog wardrobes 1-4 or is specific to any specific bag only? Yes
Quote: Also for my PLD lua (Mote’s based) theres not a precast/midcast set for Phalanx, can anyone that has it please share it and let me know if I just insert it on the precast set or anything else I need to add. Mote's luas classifies phalanx as an enhancing magic, so it would precast in your "sets.precast.FC['Enhancing Magic']" set and end in "sets.midcast['Enhancing Magic']". If you want to specify what gear you'd like phalanx to precast in, you'd do precast.FC.Phalanx. As for midcast, you'd type in sets.midcast.Phalanx
By Darkvlade 2018-01-16 11:52:11
Thanks so much Hiep still a learning process. also forgot to ask if there’s a function that puts me back automatically in PDT gear after casting JA/MA etc I have noticed that when casting magic or JA the lua leaves me in that midcast set instead of taking me back to PDT, thanks again.
Ps. added my phalanx gear to midcast.enhancing thanks for pointing that out.
Shiva.Hiep
Serveur: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2018-01-16 12:29:38
Have you tried pressing F10? It'll change your defense mode to PDT and put you back to PDT gear after each action, assuming you only have 1 idle set. You should practice learning the key binds of Mote's luas. F9 is offense mode, F10 PDT, F11 MDT. There are also binds using CTRL or ALT + F9-12. If you want to remove PDT or MDT mode, just hit ALT F12.
By Darkvlade 2018-01-16 17:28:26
Hola again, after done with updating gear when I relaunched GS getting this err message which I dont know how to copy other than manually, does gearswap keeps like a log for errors that I can copy/paste here?
Shiva.Hiep
Serveur: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2018-01-16 17:54:11
If you hit the insert key, it should tell you the error's location in the lua. Two ways that you could share your whole lua that I know of are: (1) Send it to me on discord (if you use it), my username is Hiepy#3918, (2) Go on pastebin.com, copy/paste your lua into the space under the New Paste section, click the Create New Paste near the bottom, then copy the new URL and paste it on the forums for people to look at it.
By Darkvlade 2018-01-16 18:29:46
Your text to link here...Hello hope i did it right
the errors Im getting are
gearswap/libs/mote-utility.lua:567: and
windower4/addons/gearswap/data/darkvlade/gear/darkvlade_pld.lua:185:unexpected
thanks in advance
Shiva.Hiep
Serveur: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2018-01-17 00:21:26
Sorry for the late response, I had class all day. Code sets.precast.WS['Savage Blade'] = {ammo="Jukukik feather",
head="Sulevia's Mask +2",neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Flamma Korazin +2",hands="Valorous Mitts",ring1="Rajas Ring",ring2="Ifrit Ring",
back="Buquwik Cape",waist="Fotia Belt",legs={ name="Odyssean Cuisses", augments={'Accuracy+21 Attack+21','Weapon skill damage +4%','Accuracy+15','Attack+11',}},feet="Sulevia's Leggings +2"}, Remove the , after the Sulevia's Leggings +2.
Code sets.midcast['Enhancing Magic'] = {sub="Priwen",ammo="Staunch Tathlum",
head="Yorium Barbuta",body="Shabti Cuirass",hands="Souv. Handsch. +1",legs="Yorium Cuisses",
feet="Souveran Schuhs +1",neck="Enhancing Torque",waist="Olympus Sash",ear1="Andoaa Earring",
ear2="Etiolation Earring",ring1="Defending Ring",ring2="Vocane Ring",back="Weard Mantle"}
} Remove the extra } after the Weard Mantle.
Code sets.idle = {ammo="Staunch Tathlum",
head="Sulevia's Mask +2",neck="Coatl gorget +1",ear1="Infused Earring",ear2="Hearty Earring",
body="Reverence Surcoat +2",hands="Sulevia's Gauntlets +2",ring1="Vocane Ring",ring2="Defending Ring",
back="Rudiano's mantle"="Flume Belt",legs="Carmine Cuisses +1",feet="Sulevia's Leggings +2"} It should be back="Rudiano's mantle",waist="Flume Belt",
By Darkvlade 2018-01-17 11:02:33
Thanks so much Hiep that fixed that issue, is working now and no worries about the delayed response much apreciating the fact that you are so willng to help.
Also have a couple more questions if thats ok on the precast set that will be like the fast cast gear before casting, the midcast set gear will be the gear needed to receive the JA/Spell’s benefits? Asking because I used the //gs showswaps command and noticed that when casting phalanx the precast set gear is correct but the midcast set shows my HP Set instead of the phalanx enhancing gear.
Imgur link midcast set...
Also if you can take a look at my WAR lua this one doesnt even load there’s no error message so not sure what to look for.
War lua pastebin...
Shiva.Hiep
Serveur: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2018-01-17 12:38:56
Quote: Also have a couple more questions if thats ok on the precast set that will be like the fast cast gear before casting, the midcast set gear will be the gear needed to receive the JA/Spell’s benefits? Asking because I used the //gs showswaps command and noticed that when casting phalanx the precast set gear is correct but the midcast set shows my HP Set instead of the phalanx enhancing gear. Yes that is true. I'm looking over it and not really sure why your lua is not equipping the enhancing midcast. I looked at my PLD lua and it seems I'm using a sets.midcast.Phalanx set instead for phalanx, so try using that for now.
In regards to the WAR lua, there's just a few things. If you're using Notepad ++ to edit these luas, you should be able to see the red or black line (don't know the correct terms, am an accountant .-.) next to the code line. It should extend from "function get_sets()" to the end of your gear sets. If not, you most likely typed or copy/pasted too many brackets or commas. You can also check if you're closing your sets correctly by hovering over the red } of a gear set, and see if the { at the beginning of the set is highlighted red. Code sets.TP.Hybrid = {
ammo="Staunch Tathlum",
head="Sulevia's Mask +1",
body="Emicho Haubert",
hands="Pumm. Mufflers +2",
legs="Pumm. Cuisses +2",
feet="Pumm. Calligae +2",
neck="Loricate Torque +1",
waist="Ioskeha Belt",
left_ear="Telos Earring",
right_ear="Zennaroi Earring",
left_ring="Defending Ring",
right_ring="Vocane Ring",
back="Agema cape"},
} Remove the , and } after Agema Cape Code sets.JA.Blood Rage = {body="Boii Lorica +1"} Any two worded JA, WS etc. has to be in a square bracket and apostrophe to work. So it should be Code sets.JA['Blood Rage'] = {body="Boii Lorica +1"} The same goes for Mighty Strikes and Warrior's Charge. However for Warrior's Charge, you have to use \ instead of the ' in Warrior's Charge. Code sets.JA['Mighty Strikes'] = {hands="Agoge Mufflers +1"}
sets.JA.Retaliation = {hands="Pummeler's Mufflers +2",feet="Boii Calligae +1"}
sets.JA['Warrior\s Charge'] = {legs="Agoge Cuisses +1"}
By Darkvlade 2018-01-17 13:36:26
Thanks again, Nice little guide right there in your answer, those are the little nuances that I need to become more familiarized in gearswap
Shiva.Hiep
Serveur: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2018-01-17 13:58:07
Small correction that Spynx pointed out for me. Warrior's Charge should be Code sets.JA['Warrior\'s Charge'] = {legs="Agoge Cuisses +1"} The \ just tells that the following char is text, not code.
Could also write the JA as this Code sets.JA["Warrior's Charge"] = {legs="Agoge Cuisses +1"} You could use " instead of ' inside the brackets in general to make it less confusing.
By Darkvlade 2018-01-17 14:17:27
Allright made the adjustments mentioned will try when I get home in a couple hours, again thanks for taking the time to explain how to go about using/correcting gearswap, hopefully this will solve the issues I'm currently having, thanks.
By Darkvlade 2018-01-18 08:02:12
Hello again, did the changes and it worked but still got issues see this post i made for subadai detailing some of the issues im still having. Link to lua post....
Anyway the War lua keeps dormant, dead, not a flinch, zip, nada... Hiep would you mind sharing your PLD, BLU and WAR Luas if you have those, with me if its possible here or private message, maybe I need to try a different one, thanks again in advance.
Quetzalcoatl.Windowpane
Serveur: Quetzalcoatl
Game: FFXI
Posts: 12
By Quetzalcoatl.Windowpane 2018-01-18 23:44:56
Can someone please tell me why my Valorous Mask is not equipping? It's typed in correctly, I used //gs export to get the augments and copy/pasted it. I even edited two different head gears into my base WS set and my base Fudo set and neither equipped. I cannot find the code preventing this.
Typing in //gs equip sets.WS equips the head gear, so it seems something somewhere else in the code is stopping it. Head gear seems to work doing all other functions.
Code --------------------------------------------------------------------------------------------------------------------------------------------
-- Masamune sTP #s
--TP/Hit base - 123 sTP, No JP, 4-Hit - 63 sTP, No JP, 3-Hit - 131 sTP, Master, 4-Hit - 48 sTP, Master, 3-Hit - 111
--gs showswaps
--gs export (exports current gear set to export folder in gearswap folder)
--------------------------------------------------------------------------------------------------------------------------------------------
function get_sets()
windower.send_command('@wait 4;input /lockstyleset 4')
windower.send_command('@wait 2;input /ignoretrust on')
AccIndex = 1
AccArray = {"LowACC","MidACC","HighACC","MaxACC"} -- 4 Levels Of Accuracy Sets For TP/WS/Hybrid. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below. Most of These Sets Are Empty So You Need To Edit Them On Your Own. Remember To Check What The Combined Set Is For Each Sets. Can Delete Lentus If You Don't Need It. --
WeaponIndex = 1
WeaponArray = {"Masamune"} -- ,"Tsurumaru","Amanomurakumo","Kogarasumaru"} -- Default TP Set Is Masamune. Can Delete Any Weapons/Sets That You Don't Need Or Replace/Add The New Weapons That You Want To Use. --
IdleIndex = 1
IdleArray = {"Movement","Regen"} -- Default Idle Set Is Movement --
TypeIndex = 1
Armor = 'None'
Twilight = 'None'
warning = false
Attack = 'OFF' -- Set Default WS Attack Set ON or OFF Here --
Seigan = 'ON' -- Set Default Seigan Set ON or OFF Here --
Third_Eye = 'ON' -- Set Default Third Eye Set ON or OFF Here --
Samurai_Roll = 'ON' -- Set Default SAM Roll ON or OFF Here --
ammo_warning_limit = 10 -- Set Ammo Limit Check Here --
target_distance = 5 -- Set Default Distance Here --
select_default_macro_book() -- Change Default Macro Book At The End --
-- Gavialis Helm --
elements = {}
elements.equip = {head=""}
elements["Tachi: Shoha"] = S{"Lightning","Dark","Wind"}
elements["Tachi: Fudo"] = S{"Light","Ice","Water","Wind","Fire","Lightning"}
elements["Tachi: Rana"] = S{"Dark","Earth","Ice"}
elements["Tachi: Ageha"] = S{"Dark","Earth"}
elements["Tachi: Kasha"] = S{"Fire","Light","Dark"}
elements["Tachi: Gekko"] = S{"Water","Ice"}
sc_map = {SC1="TachiFudo", SC2="TachiRana", SC3="NamasArrow"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
sets.Idle = {}
-- Idle/Town Sets --
sets.Idle.Regen = {
head="Wakido Kabuto +2",
neck="Twilight Torque",
ear1="Brutal Earring",
ear2="Genmei Earring",
body="Wakido Domaru +2",
hands="Sakonji Kote +1",
ring1="Chirich Ring +1",
ring2="Sheltered Ring",
back="Shadow Mantle",
waist="Windbuffet Belt +1",
legs="Flamma Dirs",
feet="Danzo Sune-Ate"}
sets.Idle.Regen.Masamune = set_combine(sets.Idle.Regen,{
main="",
sub="",
ammo=""})
sets.Idle.Movement = set_combine(sets.Idle.Regen,{
head="Wakido Kabuto +2",
neck="Twilight Torque",
ear1="Brutal Earring",
ear2="Genmei Earring",
body="Wakido Domaru +2",
hands="Sakonji Kote +1",
ring1="Defending Ring",
ring2="Sheltered Ring",
back="Shadow Mantle",
waist="Windbuffet Belt +1",
legs="Flamma Dirs",
feet="Danzo Sune-Ate"})
sets.Idle.Movement.Masamune = set_combine(sets.Idle.Movement,{
main="",
sub="",
ammo=""})
sets.Twilight = {head="Twilight Helm",body="Twilight Mail"}
-- Preshot Set --
sets.Preshot = {}
-- Midshot Sets --
sets.Midshot = {}
sets.Midshot.MidACC = set_combine(sets.Midshot,{})
sets.Midshot.HighACC = set_combine(sets.Midshot.MidACC,{})
sets.Midshot.MaxACC = set_combine(sets.Midshot.HighACC,{})
-- TP Base Set --
sets.TP = {}
-- Masamune TP Sets --
sets.TP.Masamune = {
main="",
sub="Gracile Grip",
ammo="Ginsen",
head="Wakido Kabuto +2",
neck="Moonlight Nodowa",
ear1="Brutal Earring",
ear2="Cessance Earring",
body="Kendatsuba Samue +1",
hands="Wakido Kote +2",
ring1="Chirich Ring +1",
ring2="Flamma Ring",
back="Smertrios's Mantle",
waist="Windbuffet Belt +1",
legs="Kendatsuba Hakama +1",
feet="Ryuo Sune-Ate +1"}
sets.TP.Masamune.MidACC = set_combine(sets.TP.Masamune,{
head="Wakido Kabuto +2",
neck="Moonlight Nodowa",
ear1="Brutal Earring",
ear2="Cessance Earring",
body="Kendatsuba Samue +1",
hands="Flamma Manopolas +1",
ring1="Chirich Ring +1",
ring2="Flamma Ring",
back="Smertrios's Mantle",
waist="Windbuffet Belt +1",
legs="Kendatsuba Hakama +1",
feet="Flamma Gambieras +1"})
sets.TP.Masamune.HighACC = set_combine(sets.TP.Masamune.MidACC,{
head="Wakido Kabuto +2",
neck="Moonlight Nodowa",
ear1="Brutal Earring",
ear2="Cessance Earring",
body="Kendatsuba Samue +1",
hands="Flamma Manopolas +1",
ring1="Chirich Ring +1",
ring2="Flamma Ring",
back="Smertrios's Mantle",
waist="Windbuffet Belt +1",
legs="Kendatsuba Hakama +1",
feet="Flamma Gambieras +1"})
sets.TP.Masamune.MaxACC = set_combine(sets.TP.Masamune.HighACC,{
head="Wakido Kabuto +2",
neck="Moonlight Nodowa",
ear1="Brutal Earring",
ear2="Cessance Earring",
body="Kendatsuba Samue +1",
hands="Flamma Manopolas +1",
ring1="Chirich Ring +1",
ring2="Flamma Ring",
back="Smertrios's Mantle",
waist="Windbuffet Belt +1",
legs="Kendatsuba Hakama +1",
feet="Flamma Gambieras +1"})
-- Masamune(Ionis) TP Sets --
sets.TP.Masamune.Ionis = set_combine(sets.TP.Masamune,{})
sets.TP.Masamune.MidACC.Ionis = set_combine(sets.TP.Masamune.MidACC,{})
sets.TP.Masamune.HighACC.Ionis = set_combine(sets.TP.Masamune.HighACC,{})
sets.TP.Masamune.MaxACC.Ionis = set_combine(sets.TP.Masamune.MaxACC,{})
-- Masamune(SAM Roll) TP Sets --
sets.TP.Masamune.STP = set_combine(sets.TP.Masamune,{})
sets.TP.Masamune.MidACC.STP = set_combine(sets.TP.Masamune.MidACC,{})
sets.TP.Masamune.HighACC.STP = set_combine(sets.TP.Masamune.HighACC,{})
sets.TP.Masamune.MaxACC.STP = set_combine(sets.TP.Masamune.MaxACC,{})
-- Masamune(Ionis + SAM Roll) TP Sets --
sets.TP.Masamune.Ionis.STP = set_combine(sets.TP.Masamune.Ionis,{})
sets.TP.Masamune.MidACC.Ionis.STP = set_combine(sets.TP.Masamune.MidACC,{})
sets.TP.Masamune.HighACC.Ionis.STP = set_combine(sets.TP.Masamune.HighACC,{})
sets.TP.Masamune.MaxACC.Ionis.STP = set_combine(sets.TP.Masamune.MaxACC,{})
-- Seigan TP Set --
sets.TP.Seigan = {head="Kasuga Kabuto +1"}
-- Third Eye TP Set --
sets.TP['Third Eye'] = {legs="Sakonji Haidate +1"}
-- PDT/MDT Sets --
sets.PDT = {
head="Genmei Kabuto",
neck="Twilight Torque",
ear1="Brutal Earring",
ear2="Genmei Earring",
body="Wakido Domaru +2",
hands="Sakonji Kote +1",
ring1="Defending Ring",
ring2={ name="Dark Ring", augments={'Magic dmg. taken -5%','Phys. dmg. taken -4%'}},
back="Shadow Mantle",
waist="Windbuffet Belt +1",
legs="Flamma Dirs",
feet="Danzo Sune-Ate"}
sets.MDT = set_combine(sets.PDT,{
head="Genmei Kabuto",
neck="Twilight Torque",
ear1="Brutal Earring",
ear2="Genmei Earring",
body="Wakido Domaru +2",
hands="Sakonji Kote +1",
ring1="Defending Ring",
ring2={ name="Dark Ring", augments={'Magic dmg. taken -5%','Phys. dmg. taken -4%'}},
back="Shadow Mantle",
waist="Windbuffet Belt +1",
legs="Flamma Dirs",
feet="Danzo Sune-Ate"})
-- Hybrid Sets --
sets.TP.Hybrid = set_combine(sets.PDT,{})
sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
sets.TP.Hybrid.MaxACC = set_combine(sets.TP.Hybrid.HighACC,{})
-- WS Base Set --
sets.WS = {
ammo="Knobkierrie",
head={ name="Valorous Mask", augments={'Accuracy+26','Weapon skill damage +4%','MND+6','Attack+10',}},
neck="Fotia Gorget",
ear1="",
ear2="",
body="Kendatsuba Samue +1",
hands={ name="Valorous Mitts", augments={'Accuracy+16 Attack+16','Weapon skill damage +4%','CHR+8','Accuracy+10',}},
ring1="Chirich Ring +1",
ring2="",
back="Smertrios's Mantle",
waist="Fotia Belt",
legs="Wakido Haidate +2",
feet="Flamma Gambieras +1"}
-- Tachi: Fudo Sets --
sets.WS["Tachi: Fudo"] = {
ammo="Knobkierrie",
head={ name="Valorous Mask", augments={'Accuracy+26','Weapon skill damage +4%','MND+6','Attack+10',}},
neck="Fotia Gorget",
ear1="",
ear2="",
body="Kendatsuba Samue +1",
hands={ name="Valorous Mitts", augments={'Accuracy+16 Attack+16','Weapon skill damage +4%','CHR+8','Accuracy+10',}},
ring1="",
ring2="",
back="Smertrios's Mantle",
waist="Fotia Belt",
legs="Wakido Haidate +2",
feet="Flamma Gambieras +1"}
sets.WS["Tachi: Fudo"].MidACC = set_combine(sets.WS["Tachi: Fudo"],{
ammo="Knobkierrie",
head={ name="Valorous Mask", augments={'Accuracy+26','Weapon skill damage +4%','MND+6','Attack+10',}},
neck="Fotia Gorget",
ear1="",
ear2="",
body="Kendatsuba Samue +1",
hands={ name="Valorous Mitts", augments={'Accuracy+16 Attack+16','Weapon skill damage +4%','CHR+8','Accuracy+10',}},
ring1="",
ring2="",
back="Smertrios's Mantle",
waist="Fotia Belt",
legs="Wakido Haidate +2",
feet="Flamma Gambieras +1"})
sets.WS["Tachi: Fudo"].HighACC = set_combine(sets.WS["Tachi: Fudo"].MidACC,{
ammo="Knobkierrie",
head={ name="Valorous Mask", augments={'Accuracy+26','Weapon skill damage +4%','MND+6','Attack+10',}},
neck="Fotia Gorget",
ear1="",
ear2="",
body="Kendatsuba Samue +1",
hands={ name="Valorous Mitts", augments={'Accuracy+16 Attack+16','Weapon skill damage +4%','CHR+8','Accuracy+10',}},
ring1="",
ring2="",
back="Smertrios's Mantle",
waist="Fotia Belt",
legs="Wakido Haidate +2",
feet="Flamma Gambieras +1"})
sets.WS["Tachi: Fudo"].MaxACC = set_combine(sets.WS["Tachi: Fudo"].HighACC,{
ammo="Knobkierrie",
head={ name="Valorous Mask", augments={'Accuracy+26','Weapon skill damage +4%','MND+6','Attack+10',}},
neck="Fotia Gorget",
ear1="",
ear2="",
body="Kendatsuba Samue +1",
hands={ name="Valorous Mitts", augments={'Accuracy+16 Attack+16','Weapon skill damage +4%','CHR+8','Accuracy+10',}},
ring1="",
ring2="",
back="Smertrios's Mantle",
waist="Fotia Belt",
legs="Wakido Haidate +2",
feet="Flamma Gambieras +1"})
-- Tachi: Fudo(SAM Roll) Sets --
sets.WS["Tachi: Fudo"].STP = set_combine(sets.WS["Tachi: Fudo"],{})
sets.WS["Tachi: Fudo"].MidACC.STP = set_combine(sets.WS["Tachi: Fudo"].MidACC,{})
sets.WS["Tachi: Fudo"].HighACC.STP = set_combine(sets.WS["Tachi: Fudo"].HighACC,{})
sets.WS["Tachi: Fudo"].MaxACC.STP = set_combine(sets.WS["Tachi: Fudo"].MaxACC,{})
-- Tachi: Fudo(Attack) Set --
sets.WS["Tachi: Fudo"].ATT = set_combine(sets.WS["Tachi: Fudo"],{})
-- Tachi: Shoha Sets --
sets.WS["Tachi: Shoha"] = {
ammo="Knobkierrie",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""}
sets.WS["Tachi: Shoha"].MidACC = set_combine(sets.WS["Tachi: Shoha"],{
ammo="Knobkierrie",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
sets.WS["Tachi: Shoha"].HighACC = set_combine(sets.WS["Tachi: Shoha"].MidACC,{
ammo="Knobkierrie",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
sets.WS["Tachi: Shoha"].MaxACC = set_combine(sets.WS["Tachi: Shoha"].HighACC,{
ammo="Knobkierrie",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
-- Tachi: Shoha(SAM Roll) Sets --
sets.WS["Tachi: Shoha"].STP = set_combine(sets.WS["Tachi: Shoha"],{})
sets.WS["Tachi: Shoha"].MidACC.STP = set_combine(sets.WS["Tachi: Shoha"].MidACC,{})
sets.WS["Tachi: Shoha"].HighACC.STP = set_combine(sets.WS["Tachi: Shoha"].HighACC,{})
sets.WS["Tachi: Shoha"].MaxACC.STP = set_combine(sets.WS["Tachi: Shoha"].MaxACC,{})
-- Tachi: Kaiten Sets --
sets.WS["Tachi: Kaiten"] = {
ammo="Knobkierrie",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""}
sets.WS["Tachi: Kaiten"].MidACC = set_combine(sets.WS["Tachi: Kaiten"],{
ammo="Knobkierrie",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
sets.WS["Tachi: Kaiten"].HighACC = set_combine(sets.WS["Tachi: Kaiten"].MidACC,{
ammo="Knobkierrie",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
sets.WS["Tachi: Kaiten"].MaxACC = set_combine(sets.WS["Tachi: Kaiten"].HighACC,{
ammo="Knobkierrie",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
-- Tachi: Kaiten(SAM Roll) Sets --
sets.WS["Tachi: Kaiten"].STP = set_combine(sets.WS["Tachi: Kaiten"],{})
sets.WS["Tachi: Kaiten"].MidACC.STP = set_combine(sets.WS["Tachi: Kaiten"].MidACC,{})
sets.WS["Tachi: Kaiten"].HighACC.STP = set_combine(sets.WS["Tachi: Kaiten"].HighACC,{})
sets.WS["Tachi: Kaiten"].MaxACC.STP = set_combine(sets.WS["Tachi: Kaiten"].MaxACC,{})
-- Tachi: Kaiten(Attack) Set --
sets.WS["Tachi: Kaiten"].ATT = set_combine(sets.WS["Tachi: Kaiten"],{})
-- Tachi: Rana Sets --
sets.WS["Tachi: Rana"] = {
ammo="Knobkierrie",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""}
sets.WS["Tachi: Rana"].MidACC = set_combine(sets.WS["Tachi: Rana"],{
ammo="Knobkierrie",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
sets.WS["Tachi: Rana"].HighACC = set_combine(sets.WS["Tachi: Rana"].MidACC,{
ammo="Knobkierrie",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
sets.WS["Tachi: Rana"].MaxACC = set_combine(sets.WS["Tachi: Rana"].HighACC,{
ammo="Knobkierrie",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
-- Tachi: Rana(SAM Roll) Sets --
sets.WS["Tachi: Rana"].STP = set_combine(sets.WS["Tachi: Rana"],{})
sets.WS["Tachi: Rana"].MidACC.STP = set_combine(sets.WS["Tachi: Rana"].MidACC,{})
sets.WS["Tachi: Rana"].HighACC.STP = set_combine(sets.WS["Tachi: Rana"].HighACC,{})
sets.WS["Tachi: Rana"].MaxACC.STP = set_combine(sets.WS["Tachi: Rana"].MaxACC,{})
-- Namas Arrow Sets --
sets.WS["Namas Arrow"] = {
ammo="Eminent Arrow",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""}
sets.WS["Namas Arrow"].MidACC = set_combine(sets.WS["Namas Arrow"],{
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
sets.WS["Namas Arrow"].HighACC = set_combine(sets.WS["Namas Arrow"].MidACC,{
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
sets.WS["Namas Arrow"].MaxACC = set_combine(sets.WS["Namas Arrow"].HighACC,{
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
-- Apex Arrow Sets --
sets.WS["Apex Arrow"] = {
ammo="Eminent Arrow",
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""}
sets.WS["Apex Arrow"].MidACC = set_combine(sets.WS["Apex Arrow"],{
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
sets.WS["Apex Arrow"].HighACC = set_combine(sets.WS["Apex Arrow"].MidACC,{
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
sets.WS["Apex Arrow"].MaxACC = set_combine(sets.WS["Apex Arrow"].HighACC,{
head="",
neck="",
ear1="",
ear2="",
body="",
hands="",
ring1="",
ring2="",
back="",
waist="",
legs="",
feet=""})
-- JA Sets --
sets.JA = {}
sets.JA.Meditate = {head="Wakido Kabuto +2",hands="Sakonji Kote +1",back="Smertrios's Mantle"}
sets.JA["Warding Circle"] = {head="Wakido Kabuto +2"}
-- Waltz Set --
sets.Waltz = {}
sets.Precast = {}
-- Fastcast Set --
sets.Precast.FastCast = {
ammo="Impatiens",
head="Sakonji Kabuto +1",
neck="",
ear1="Loquacious Earring",
ear2="Enchanter Earring +1",
body="Sakonji Domaru +1",
hands="Flamma Manopolas +1",
ring1="Lebeche Ring",
ring2="Prolix Ring",
back="",
waist="",
legs="Limbo Trousers",
feet="Sakonji Sune-Ate +1"}
sets.Midcast = {}
-- Magic Haste Set --
sets.Midcast.Haste = {
ammo="Impatiens",
head="Sakonji Kabuto +1",
neck="",
ear1="Loquacious Earring",
ear2="Enchanter Earring +1",
body="Sakonji Domaru +1",
hands="Flamma Manopolas +1",
ring1="Lebeche Ring",
ring2="Prolix Ring",
back="",
waist="",
legs="Limbo Trousers",
feet="Sakonji Sune-Ate +1"}
end
function pretarget(spell,action)
if (spell.action_type == 'Magic' and buffactive.silence and player.sub_job == 'NIN') then -- Auto Use Echo Drops If You Are Silenced --
cancel_spell()
send_command('input /item "Echo Drops" <me>')
elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
cancel_spell()
send_command('Aggressor')
elseif spell.english == "Seigan" and buffactive.Seigan then -- Change Seigan To Third Eye If Seigan Is On --
cancel_spell()
send_command('ThirdEye')
elseif spell.english == "Meditate" and player.tp > 2800 then -- Cancel Meditate If TP Is Above 2800 --
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: ['..player.tp..' TP]')
elseif spell.action_type == 'Ranged Attack' and spell.target.distance > 24.9 then
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
elseif spell.type == 'WeaponSkill' and player.status == 'Engaged' then
if spell.skill == 'Archery' then
if spell.target.distance > 16+target_distance then
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
end
else
if spell.target.distance > target_distance then
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
end
end
end
end
function precast(spell,action)
local check_ammo
local check_ammo_count = 1
if spell.action_type == 'Ranged Attack' then
check_ammo = player.equipment.ammo
if player.equipment.ammo == 'empty' or player.inventory[check_ammo].count <= check_ammo_count then
add_to_chat(123, spell.name..' Canceled: [Out of Ammo]')
cancel_spell()
return
else
equip(sets.Preshot)
if player.inventory[check_ammo].count <= ammo_warning_limit and player.inventory[check_ammo].count > 1 and not warning then
add_to_chat(8, '***** [Low Ammo Warning!] *****')
warning = true
elseif player.inventory[check_ammo].count > ammo_warning_limit and warning then
warning = false
end
end
elseif spell.type == "WeaponSkill" then
if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
cancel_spell()
add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
return
else
equipSet = sets.WS
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if Attack == 'ON' then
equipSet = equipSet["ATT"]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if buffactive["Samurai Roll"] and equipSet["STP"] and Samurai_Roll == 'ON' then
equipSet = equipSet["STP"]
end
if elements[spell.name] and elements[spell.name]:contains(world.day_element) then
equipSet = set_combine(equipSet,elements.equip)
end
if buffactive.Sekkanoki then -- Equip Kasuga Kote +1 When Sekkanoki Is On --
equipSet = set_combine(equipSet,{hands="Kasuga Kote +1"})
end
if buffactive.Sengikori then -- Equip Kas. Sune-Ate +1 When Sengikori Is On --
equipSet = set_combine(equipSet,{feet="Kas. Sune-Ate +1"})
end
if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
end
if TypeIndex == 1 and spell.english == "Tachi: Fudo" then
if player.tp > 2990 or buffactive.Sekkanoki or (player.tp > 1990 and buffactive.Hagakure) then
if world.time <= (7*60) or world.time >= (17*60) then
if buffactive["Aftermath: Lv.3"] then
equipSet = set_combine(equipSet,{ear1="Lugra Earring +1",ear2="Lugra Earring"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Lugra Earring +1 & Lugra Earring During AM3 From Dusk To Dawn --
else
equipSet = set_combine(equipSet,{ear1="Lugra Earring +1"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Lugra Earring +1 From Dusk To Dawn --
end
else
equipSet = set_combine(equipSet,{ear1="Vulcan's Pearl"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Vulcan's Pearl --
end
elseif buffactive["Aftermath: Lv.3"] then
if world.time <= (7*60) or world.time >= (17*60) then
equipSet = set_combine(equipSet,{ear2="Lugra Earring +1"}) -- Equip Lugra Earring +1 Instead of Brutal Earring During AM3 From Dusk To Dawn --
else
equipSet = set_combine(equipSet,{ear2="Vulcan's Pearl"}) -- Equip Vulcan's Pearl Instead of Brutal Earring During AM3 --
end
end
end
if TypeIndex == 1 and (spell.english == "Tachi: Shoha" or spell.english == "Tachi: Kasha") and (player.tp > 2990 or buffactive.Sekkanoki or (player.tp > 1990 and buffactive.Hagakure)) then
if world.time <= (7*60) or world.time >= (17*60) then
equipSet = set_combine(equipSet,{ear1="Lugra Earring +1"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Lugra Earring +1 From Dusk To Dawn --
else
equipSet = set_combine(equipSet,{ear1="Vulcan's Pearl"}) -- 3000 TP or Sekkanoki or Hagakure(2000+ TP) - Equip Vulcan's Pearl --
end
end
if TypeIndex == 1 and spell.english == "Tachi: Rana" and (world.time <= (7*60) or world.time >= (17*60)) then -- Equip Lugra Earring +1 From Dusk To Dawn --
equipSet = set_combine(equipSet,{ear1="Lugra Earring +1"})
end
equip(equipSet)
end
elseif spell.type == "JobAbility" then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
elseif spell.action_type == 'Magic' then
if spell.english == 'Utsusemi: Ni' then
if buffactive['Copy Image (3)'] then
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
return
else
equip(sets.Precast.FastCast)
end
else
equip(sets.Precast.FastCast)
end
elseif spell.type == "Waltz" then
refine_waltz(spell,action)
equip(sets.Waltz)
elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
cast_delay(0.2)
send_command('cancel Sneak')
end
if Twilight == 'Twilight' then
equip(sets.Twilight)
end
end
function midcast(spell,action)
if spell.action_type == 'Ranged Attack' then
equipSet = sets.Midshot
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
equip(equipSet)
elseif spell.action_type == 'Magic' then
if spell.english:startswith('Utsusemi') then
if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then -- Cancel Copy Image 1, 2 & 3 For Utsusemi: Ichi --
send_command('@wait 1.7;cancel Copy Image*')
end
equip(sets.Midcast.Haste)
elseif spell.english == 'Monomi: Ichi' then
if buffactive['Sneak'] then
send_command('@wait 1.7;cancel sneak')
end
equip(sets.Midcast.Haste)
else
equip(sets.Midcast.Haste)
end
end
end
function aftercast(spell,action)
if not spell.interrupted then
if spell.type == "WeaponSkill" then
send_command('wait 0.2;gs c TP')
elseif spell.english == "Warding Circle" then -- Warding Circle Countdown --
send_command('wait 260;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;input /echo '..spell.name..': [OFF]')
end
end
status_change(player.status)
end
function status_change(new,old)
check_equip_lock()
if Armor == 'PDT' then
equip(sets.PDT)
elseif Armor == 'MDT' then
equip(sets.MDT)
elseif new == 'Engaged' then
equipSet = sets.TP
if Armor == 'Hybrid' and equipSet["Hybrid"] then
equipSet = equipSet["Hybrid"]
end
if equipSet[WeaponArray[WeaponIndex]] then
equipSet = equipSet[WeaponArray[WeaponIndex]]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if buffactive["Aftermath: Lv.3"] and equipSet["AM3"] then
equipSet = equipSet["AM3"]
end
if buffactive.Ionis and equipSet["Ionis"] then
equipSet = equipSet["Ionis"]
end
if buffactive["Samurai Roll"] and equipSet["STP"] and Samurai_Roll == 'ON' then
equipSet = equipSet["STP"]
end
if buffactive.Seigan and Seigan == 'ON' then -- Use Seigan Toggle For Seigan TP Set --
equipSet = set_combine(equipSet,sets.TP.Seigan)
end
if buffactive["Third Eye"] and Third_Eye == 'ON' then -- Use Third Eye Toggle For Third Eye TP Set --
equipSet = set_combine(equipSet,sets.TP["Third Eye"])
end
equip(equipSet)
else
equipSet = sets.Idle
if equipSet[IdleArray[IdleIndex]] then
equipSet = equipSet[IdleArray[IdleIndex]]
end
if equipSet[WeaponArray[WeaponIndex]] then
equipSet = equipSet[WeaponArray[WeaponIndex]]
end
if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
end
if world.area:endswith('Adoulin') then
equipSet = set_combine(equipSet,{body="Councilor's Garb"})
end
equip(equipSet)
end
if Twilight == 'Twilight' then
equip(sets.Twilight)
end
end
function buff_change(buff,gain)
buff = string.lower(buff)
if buff == "aftermath: lv.3" then -- AM3 Timer/Countdown --
if gain then
send_command('timers create "Aftermath: Lv.3" 180 down;wait 150;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 15;input /echo Aftermath: Lv.3 [WEARING OFF IN 15 SEC.];wait 5;input /echo Aftermath: Lv.3 [WEARING OFF IN 10 SEC.]')
else
send_command('timers delete "Aftermath: Lv.3"')
add_to_chat(123,'AM3: [OFF]')
end
elseif buff == "perfect defense" then -- PD Timer --
if gain then
send_command('timers create "Perfect Defense" 57 down')
else
send_command('timers delete "Perfect Defense"')
add_to_chat(123,'PD: [OFF]')
end
elseif buff == "yaegasumi" then -- Yaegasumi Timer --
if gain then
send_command('timers create "Yaegasumi" 45 down')
else
send_command('timers delete "Yaegasumi"')
add_to_chat(123,'Yaegasumi: [OFF]')
end
elseif buff == 'weakness' then -- Weakness Timer --
if gain then
send_command('timers create "Weakness" 300 up')
else
send_command('timers delete "Weakness"')
end
end
if buff == "sleep" and gain and player.hp > 200 and player.status == "Engaged" then -- Equip Berserker's Torque When You Are Asleep & Have 200+ HP --
equip({neck="Berserker's Torque"})
else
if not midaction() then
status_change(player.status)
end
end
end
-- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
function self_command(command)
if command == 'C1' then -- Accuracy Toggle --
AccIndex = (AccIndex % #AccArray) + 1
add_to_chat(158,'Accuracy Level: '..AccArray[AccIndex])
status_change(player.status)
elseif command == 'C17' then -- Main Weapon Toggle --
WeaponIndex = (WeaponIndex % #WeaponArray) + 1
add_to_chat(158,'Main Weapon: '..WeaponArray[WeaponIndex])
status_change(player.status)
elseif command == 'C5' then -- Auto Update Gear Toggle --
status_change(player.status)
add_to_chat(158,'Auto Update Gear')
elseif command == 'C2' then -- Hybrid Toggle --
if Armor == 'Hybrid' then
Armor = 'None'
add_to_chat(123,'Hybrid Set: [Unlocked]')
else
Armor = 'Hybrid'
add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
end
status_change(player.status)
elseif command == 'C7' then -- PDT Toggle --
if Armor == 'PDT' then
Armor = 'None'
add_to_chat(123,'PDT Set: [Unlocked]')
else
Armor = 'PDT'
add_to_chat(158,'PDT Set: [Locked]')
end
status_change(player.status)
elseif command == 'C15' then -- MDT Toggle --
if Armor == 'MDT' then
Armor = 'None'
add_to_chat(123,'MDT Set: [Unlocked]')
else
Armor = 'MDT'
add_to_chat(158,'MDT Set: [Locked]')
end
status_change(player.status)
elseif command == 'C16' then -- Seigan Toggle --
if Seigan == 'ON' then
Seigan = 'OFF'
add_to_chat(123,'Seigan Set: [Unlocked]')
else
Seigan = 'ON'
add_to_chat(158,'Seigan Set: [Locked]')
end
status_change(player.status)
elseif command == 'C12' then -- Third Eye Toggle --
if Third_Eye == 'ON' then
Third_Eye = 'OFF'
add_to_chat(123,'Third Eye Set: [Unlocked]')
else
Third_Eye = 'ON'
add_to_chat(158,'Third Eye Set: [Locked]')
end
status_change(player.status)
elseif command == 'C11' then -- SAM Roll Toggle --
if Samurai_Roll == 'ON' then
Samurai_Roll = 'OFF'
add_to_chat(123,'SAM Roll: [OFF]')
else
Samurai_Roll = 'ON'
add_to_chat(158,'SAM Roll: [ON]')
end
status_change(player.status)
elseif command == 'C9' then -- Attack Toggle --
if Attack == 'ON' then
Attack = 'OFF'
add_to_chat(123,'Attack: [OFF]')
else
Attack = 'ON'
add_to_chat(158,'Attack: [ON]')
end
status_change(player.status)
elseif command == 'C3' then -- Twilight Toggle --
if Twilight == 'Twilight' then
Twilight = 'None'
add_to_chat(123,'Twilight Set: [Unlocked]')
else
Twilight = 'Twilight'
add_to_chat(158,'Twilight Set: [locked]')
end
status_change(player.status)
elseif command == 'C8' then -- Distance Toggle --
if player.target.distance then
target_distance = math.floor(player.target.distance*10)/10
add_to_chat(158,'Distance: '..target_distance)
else
add_to_chat(123,'No Target Selected')
end
elseif command == 'C10' then -- Cancel Meikyo Shisui --
send_command('Cancel Meikyo Shisui')
add_to_chat(123,'Meikyo Shisui: [OFF]')
elseif command == 'C6' then -- Idle Toggle --
IdleIndex = (IdleIndex % #IdleArray) + 1
add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
status_change(player.status)
elseif command == 'TP' then
add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
elseif command:match('^SC%d$') then
send_command('//'..sc_map[command])
end
end
function check_equip_lock() -- Lock Equipment Here --
if player.equipment.ring1 == "Warp Ring" or
player.equipment.ring1 == "Capacity Ring" or
player.equipment.ring1 == "Trizek Ring" or
player.equipment.ring1 == "Dim. Ring (Dem)" or
player.equipment.ring1 == "Dim. Ring (Mea)" or
player.equipment.ring1 == "Dim. Ring (Holla)" or
player.equipment.ring1 == "Echad Ring" or
player.equipment.ring1 == "Emperor Band" or
player.equipment.ring1 == "Reraise Ring" or
player.equipment.ring1 == "Tavnazian Ring" or
player.equipment.ring1 == "Caliber Ring" or
player.equipment.ring1 == "Olduum Ring" or
player.equipment.ring1 == "Facility Ring" then
disable('ring1')
else
enable('ring1')
end
if player.equipment.ring2 == "Warp Ring" or
player.equipment.ring2 == "Capacity Ring" or
player.equipment.ring2 == "Trizek Ring" or
player.equipment.ring2 == "Dim. Ring (Dem)" or
player.equipment.ring2 == "Dim. Ring (Mea)" or
player.equipment.ring2 == "Dim. Ring (Holla)" or
player.equipment.ring2 == "Echad Ring" or
player.equipment.ring2 == "Emperor Band" or
player.equipment.ring2 == "Reraise Ring" or
player.equipment.ring2 == "Tavnazian Ring" or
player.equipment.ring2 == "Caliber Ring" or
player.equipment.ring2 == "Olduum Ring" or
player.equipment.ring2 == "Facility Ring" then
disable('ring2')
else
enable('ring2')
end
if player.equipment.back == "Mecisto. Mantle" or
player.equipment.back == "Aptitude Mantle +1" or
player.equipment.back == "Aptitude Mantle" then
disable('back')
else
enable('back')
end
if player.equipment.ear1 == "Terminus Earring" or
player.equipment.ear1 == "Liminus Earring" or
player.equipment.ear1 == "Reraise Earring" then
disable('ear1')
else
enable('ear1')
end
if player.equipment.ear2 == "Terminus Earring" or
player.equipment.ear2 == "Liminus Earring" or
player.equipment.ear2 == "Reraise Earring" then
disable('ear2')
else
enable('ear2')
end
end
function refine_waltz(spell,action)
if spell.type ~= 'Waltz' then
return
end
if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" then
return
end
local newWaltz = spell.english
local waltzID
local missingHP
if spell.target.type == "SELF" then
missingHP = player.max_hp - player.hp
elseif spell.target.isallymember then
local target = find_player_in_alliance(spell.target.name)
local est_max_hp = target.hp / (target.hpp/100)
missingHP = math.floor(est_max_hp - target.hp)
end
if missingHP ~= nil then
if player.sub_job == 'DNC' then
if missingHP < 40 and spell.target.name == player.name then
add_to_chat(123,'Full HP!')
cancel_spell()
return
elseif missingHP < 150 then
newWaltz = 'Curing Waltz'
waltzID = 190
elseif missingHP < 300 then
newWaltz = 'Curing Waltz II'
waltzID = 191
else
newWaltz = 'Curing Waltz III'
waltzID = 192
end
else
return
end
end
local waltzTPCost = {['Curing Waltz'] = 20, ['Curing Waltz II'] = 35, ['Curing Waltz III'] = 50}
local tpCost = waltzTPCost[newWaltz]
local downgrade
if player.tp < tpCost then
if player.tp < 20 then
add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
cancel_spell()
return
elseif player.tp < 35 then
newWaltz = 'Curing Waltz'
elseif player.tp < 50 then
newWaltz = 'Curing Waltz II'
end
downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
end
if newWaltz ~= spell.english then
send_command('@input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
if downgrade then
add_to_chat(8, downgrade)
end
cancel_spell()
return
end
if missingHP > 0 then
add_to_chat(8,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
end
end
function find_player_in_alliance(name)
for i,v in ipairs(alliance) do
for k,p in ipairs(v) do
if p.name == name then
return p
end
end
end
end
function sub_job_change(newSubjob, oldSubjob)
select_default_macro_book()
end
function set_macro_page(set,book)
if not tonumber(set) then
add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
return
end
if set < 1 or set > 10 then
add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
return
end
if book then
if not tonumber(book) then
add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
return
end
if book < 1 or book > 20 then
add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
return
end
send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
else
send_command('@input /macro set '..tostring(set))
end
end
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'WAR' then
set_macro_page(1, 1)
elseif player.sub_job == 'DNC' then
set_macro_page(2, 1)
elseif player.sub_job == 'NIN' then
set_macro_page(3, 1)
elseif player.sub_job == 'DRK' then
set_macro_page(4, 1)
else
set_macro_page(1, 1)
end
end
Serveur: Cerberus
Game: FFXI
Posts: 148
By Cerberus.Flaminglegion 2018-01-19 03:08:46
I think it is trying to equip Gavialis Helm (or {head=""} as you've changed the set to)
You can comment out lines 714-716 to stop it doing this, or you could just put your Valorous Mask into elements.equip = {head=""} (line 33)
[+]
Quetzalcoatl.Windowpane
Serveur: Quetzalcoatl
Game: FFXI
Posts: 12
By Quetzalcoatl.Windowpane 2018-01-19 07:40:33
Cerberus.Flaminglegion said: »I think it is trying to equip Gavialis Helm (or {head=""} as you've changed the set to)
You can comment out lines 714-716 to stop it doing this, or you could just put your Valorous Mask into elements.equip = {head=""} (line 33)
That seems to be the issue. Figured if it was blank it wouldn't try anything. Thanks a lot!
By Archaide 2018-01-26 18:41:28
Can someone help with my smn lua? When I change to smn job its changes my macro book/page but when I call an avatar it wont change the book or page, anyone see anything wrong? It loads fine and all.
Code if pet.isvalid then
if pet.name=='Fenrir' then
send_command('input /macro book 14;wait .1;input /macro set 5;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Ifrit' then
send_command('input /macro book 14;wait .1;input /macro set 2;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Titan' then
send_command('input /macro book 14;wait .1;input /macro set 10;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Leviathan' then
send_command('input /macro book 14;wait .1;input /macro set 10;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Carbuncle' then
send_command('input /macro book 14;wait .1;input /macro set 8;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Garuda' then
send_command('input /macro book 14;wait .1;input /macro set 3;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Shiva' then
send_command('input /macro book 14;wait .1;input /macro set 6;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Ramuh' then
send_command('input /macro book 14;wait .1;input /macro set 4;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Diabolos' then
send_command('input /macro book 14;wait .1;input /macro set 7;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Cait Sith' then
send_command('input /macro book 14;wait .1;input /macro set 9;wait 3;input /lockstyleset '..StartLockStyle)
end
else
send_command('input /macro book 14;wait .1;input /macro set 1;wait 3;input /lockstyleset '..StartLockStyle)
end
-- End macro set / lockstyle section
end
function pet_change(pet,gain)
idle()
end
Lakshmi.Elidyr
Serveur: Lakshmi
Game: FFXI
Posts: 912
By Lakshmi.Elidyr 2018-01-26 18:48:58
I can only assume it was due to the extra "end" in the middle of the conditionals before it actually ended. Posted corrected code.
Code if pet.isvalid then
if pet.name=='Fenrir' then
send_command('input /macro book 14;wait .1;input /macro set 5;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Ifrit' then
send_command('input /macro book 14;wait .1;input /macro set 2;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Titan' then
send_command('input /macro book 14;wait .1;input /macro set 10;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Leviathan' then
send_command('input /macro book 14;wait .1;input /macro set 10;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Carbuncle' then
send_command('input /macro book 14;wait .1;input /macro set 8;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Garuda' then
send_command('input /macro book 14;wait .1;input /macro set 3;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Shiva' then
send_command('input /macro book 14;wait .1;input /macro set 6;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Ramuh' then
send_command('input /macro book 14;wait .1;input /macro set 4;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Diabolos' then
send_command('input /macro book 14;wait .1;input /macro set 7;wait 3;input /lockstyleset '..StartLockStyle)
elseif pet.name=='Cait Sith' then
send_command('input /macro book 14;wait .1;input /macro set 9;wait 3;input /lockstyleset '..StartLockStyle)
else
send_command('input /macro book 14;wait .1;input /macro set 1;wait 3;input /lockstyleset '..StartLockStyle)
end
end
By Squabble 2018-01-28 02:26:20
Is there a way to precast the automatic Wyvern breath after weapon skills with the Vishap Armet +1/2/3? I have the midcast gear triggering but no idea on how to get this going. I tried writing in the function job_aftercast section: if pet.isvalid / if weaponskill / equip but I couldn't get it to equip.
Shiva.Znitch
Serveur: Shiva
Game: FFXI
Posts: 191
By Shiva.Znitch 2018-01-28 16:11:03
Couple quick GS questions, forgive me if they've been covered before:
1) If my TP set includes ring1="Ilabrat Ring" and my WS set includes ring2="Ilabrat Ring" - is GS fast enough to swap the ring over to my WS set and then back to my TP set? Some of my sets have a R/E ring or earring in the left slot and others in the right slot, should I make them all consistent to left or right?
2) Is there a way to include items in gear sets but exclude them from //gs validate? I have some sets I can't be bothered with sometimes (Mage TP/WS generally) but don't want to have to scan a list of 20+ items to make sure the important gear is all there.
Thanks!
Leviathan.Stamos
Serveur: Leviathan
Game: FFXI
Posts: 1239
By Leviathan.Stamos 2018-02-08 10:44:08
Drg
Started working on DRG, but it seems to get stuck often. It doesn't seem to always swap back to either Idle or Tp gear after a ws.
Asura.Arnan
Serveur: Asura
Game: FFXI
Posts: 132
By Asura.Arnan 2018-02-08 11:45:14
Hi I recently found my TP Bonus and Elemental Obi for WS are not working correctly. I found out I was equipping my elemental obi for all WS in dynamis (should only be equipping it for sanguine blade) and then on closer look I discovered my tp bonus was not working correctly (2750+ tp or 2250+ with Aeonic) Instead of equipping the earrings I specify to use at high TP my lua is just using the 2 earrings I use for CdC which is first on the list (for Savage/Requiescat etc I would like different earrings at 3000 total TP)
I'm positive this section of my lua used to work absolutely fine so its probably something simple or something else I recently changed affected it.
This is the section of the lua
Code
function precast(spell,action)
if spell.type == "WeaponSkill" then
if player.status ~= 'Engaged' then
return
else
equipSet = sets.WS
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
end
if spell.english == "Chant du Cygne" and player.tp > 2750 or player.equipment.main == 'Sequence' and player.tp > 2250 then
equipSet = set_combine(equipSet,{ear1="Mache Earring +1",ear2="Mache Earring +1"})
elseif spell.english == "Requiescat" and player.tp > 2750 or player.equipment.main == 'Sequence' and player.tp > 2250 then
equipSet = set_combine(equipSet,{ear1="Lifestorm Earring"})
elseif spell.english == "Expiacion" and player.tp > 2750 or player.equipment.main == 'Sequence' and player.tp > 2250 then
equipSet = set_combine(equipSet,{ear1="Ishvara Earring",ear2="Brutal Earring"})
elseif spell.english == "Savage Blade" and player.tp > 2750 or player.equipment.main == 'Sequence' and player.tp > 2250 then
equipSet = set_combine(equipSet,{ear1="Ishvara Earring",ear2="Brutal Earring"})
elseif spell.english == "Vorpal Blade" and player.tp > 2750 or player.equipment.main == 'Sequence' and player.tp > 2250 then
equipSet = set_combine(equipSet,{ear1="Cessance Earring",ear2="Brutal Earring"})
elseif spell.english == "Sanguine Blade" and world.day == "Darksday" or world.weather_element == "Dark" then
equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
elseif spell.english == "Realmrazer" and player.tp > 2750 then
equipSet = set_combine(equipSet,{ear1="Lifestorm Earring"})
elseif spell.english == "Black Halo" and player.tp > 2750 then
equipSet = set_combine(equipSet,{ear1="Ishvara Earring",ear2="Brutal Earring"})
elseif spell.english == "Flash Nova" and world.day == "Lightsday" or world.weather_element == "Light" then
equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
end
equip(equipSet)
end
elseif spell.type == "JobAbility" or spell.type == "Ward" then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
elseif spell.english == 'Lunge' or spell.english == 'Swipe' then
equip(sets.JA.Lunge)
elseif spell.type == "Rune" then
equip(sets.JA.Enmity)
elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" or spell.type == "Trust" then
if buffactive.silence then -- Cancel Magic or Ninjutsu If You Are Silenced --
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Silenced]')
return
else
if (string.find(spell.english,'Cur') or BlueMagic_Healing:contains(spell.english) or BlueMagic_HPCure:contains(spell.english)) and spell.english ~= "Cursna" then
equip(sets.Precast.Cure)
elseif string.find(spell.english,'Utsusemi') then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
cancel_spell()
add_to_chat(123, spell.english .. ' Canceled: [3+ Images]')
return
else
equip(sets.Precast.FastCast)
end
elseif sets.Precast[spell.skill] then
equip(sets.Precast[spell.skill])
else
equip(sets.Precast.FastCast)
end
end
elseif string.find(spell.type,'Flourish') then
if spell.english == "Animated Flourish" then
equip(sets.Enmity)
else
equip(sets.Flourish)
end
elseif spell.type == "Step" then
equip(sets.Step)
elseif spell.type == "Waltz" then
equip(sets.Waltz)
elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
cast_delay(0.2)
send_command('cancel Sneak')
end
end
and this is the full lua
https://pastebin.com/QMPk4zUB
Thanks for any help
Carbuncle.Kigensuro
Serveur: Carbuncle
Game: FFXI
Posts: 93
By Carbuncle.Kigensuro 2018-02-08 12:15:13
Drg
Started working on DRG, but it seems to get stuck often. It doesn't seem to always swap back to either Idle or Tp gear after a ws. try this as your aftercast instead of what you have Code function aftercast(spell,action)
if not spell.interrupted then
if spell.type == "WeaponSkill" then
send_command('wait 0.2;gs c TP')
elseif spell.english == "Angon" then -- Angon Timer/Countdown --
timer_angon()
send_command('wait 80;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;timers delete "Angon";input /echo '..spell.name..': [OFF]')
elseif spell.english == "Ancient Circle" then -- Ancient Circle Countdown --
send_command('wait 260;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;input /echo '..spell.name..': [OFF]')
end
end
if not spell.type == "PetCommand" then
status_change(player.status)
end
end
Carbuncle.Kigensuro
Serveur: Carbuncle
Game: FFXI
Posts: 93
By Carbuncle.Kigensuro 2018-02-08 12:20:37
Hi I recently found my TP Bonus and Elemental Obi for WS are not working correctly. I found out I was equipping my elemental obi for all WS in dynamis (should only be equipping it for sanguine blade) and then on closer look I discovered my tp bonus was not working correctly (2750+ tp or 2250+ with Aeonic) Instead of equipping the earrings I specify to use at high TP my lua is just using the 2 earrings I use for CdC which is first on the list (for Savage/Requiescat etc I would like different earrings at 3000 total TP)
I'm positive this section of my lua used to work absolutely fine so its probably something simple or something else I recently changed affected it.
This is the section of the lua
...
and this is the full lua
https://pastebin.com/QMPk4zUB
Thanks for any help first make your code post readable
it curently goes if,if,else,if,if,... if it is not readable that i wont even try to help more then this
having said that it does not look like the code you posted has anything to do with your issue however it is vary hard to tell whats going on because your code is so hard to read
Sylph.Talym
VIP
Serveur: Sylph
Game: FFXI
Posts: 70
By Sylph.Talym 2018-02-08 12:21:10
Hi I recently found my TP Bonus and Elemental Obi for WS are not working correctly. I found out I was equipping my elemental obi for all WS in dynamis (should only be equipping it for sanguine blade) and then on closer look I discovered my tp bonus was not working correctly (2750+ tp or 2250+ with Aeonic) Instead of equipping the earrings I specify to use at high TP my lua is just using the 2 earrings I use for CdC which is first on the list (for Savage/Requiescat etc I would like different earrings at 3000 total TP)
I'm positive this section of my lua used to work absolutely fine so its probably something simple or something else I recently changed affected it.
You need more parentheses around your clauses. The statements are read left to right unless you provide guidance.
Code elseif spell.english == "Sanguine Blade" and world.day == "Darksday" or world.weather_element == "Dark" then
This is processed as: Code (spell.english == "Sanguine Blade" and world.day == "Darksday") or world.weather_element == "Dark"
Since the Dynamis weather_element is always dark, this elseif always returns true and thus your obi gets equipped.
What you really want is: Code
spell.english == "Sanguine Blade" and (world.day == "Darksday" or world.weather_element == "Dark")
Similarly for the TP Bonus, you have this: Code if spell.english == "Chant du Cygne" and player.tp > 2750 or player.equipment.main == 'Sequence' and player.tp > 2250 then
When what you need to have is: Code if spell.english == "Chant du Cygne" and (player.tp > 2750 or (player.equipment.main == 'Sequence' and player.tp > 2250)) then
Asura.Arnan
Serveur: Asura
Game: FFXI
Posts: 132
By Asura.Arnan 2018-02-08 17:40:48
This has fixed my problem perfectly thanks
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.
|
|