|
Gearswap Support Thread
By drakefs 2023-06-20 17:40:27
Try using a local variable, see if that gets rid of the error:
Code
function midcast(spell)
local targetName = player.target.name
if spell.name == "Burn" then
equip(sets.midcast.enfeeble)
add_to_chat(207,' '..spell.name..' Enfeebling Set')
elseif ((player.target.name == "Abject Acuex") or
(player.target.name == "Esurient Botulus") or
(player.target.name == "Ghatjot") or
(player.target.name == "Dhartok") or
(player.target.name == "Leshonn") or
(player.target.name == "Gartell") or
(player.target.name == "Locus Dire Bat") or
(targetName:contains("Elemental")) and (spell.type == 'BlackMagic')) then
equip(sets.midcast.burst)
add_to_chat(207,' '..player.target.name..' Burst Set')
end
end
Bismarck.Demetor
Serveur: Bismarck
Game: FFXI
Posts: 33
By Bismarck.Demetor 2023-06-20 17:41:25
:contains is for tables, you want to use :find
[+]
Phoenix.Evolved
Serveur: Phoenix
Game: FFXI
Posts: 67
By Phoenix.Evolved 2023-06-21 01:06:27
TY both!!
It actually worked with just switching out :contains to :find, and actually not having a local variable. It threw an error if I did not have something targeted and I applied Sublimation again.
Actually it didn't work. When I apply sublimation without a target, it throws the error saying name is not defined.
Phoenix.Evolved
Serveur: Phoenix
Game: FFXI
Posts: 67
By Phoenix.Evolved 2023-06-21 01:44:10
I think I see what the problem is.
If I use /ja "Sublimation" <me>, since I don't have a target it will throw the error.
I've even tried to put in:
Code (player.target.name:find("Elemental")) and (spell.type == 'BlackMagic') and not (spell.type == 'JobAbility')) then
it still throws the error if I do not have a target and use sublimation.
By drakefs 2023-06-21 17:14:48
That is a logic flow issue. Check for spell.type and then nest the if statements for target under said check.
Code
function midcast(spell)
if spell.type == 'BlackMagic' then
if spell.name == "Burn" then
equip(sets.midcast.enfeeble)
add_to_chat(207,' '..spell.name..' Enfeebling Set')
elseif ((player.target.name == "Abject Acuex") or
(player.target.name == "Esurient Botulus") or
(player.target.name == "Ghatjot") or
(player.target.name == "Dhartok") or
(player.target.name == "Leshonn") or
(player.target.name == "Gartell") or
(player.target.name == "Locus Dire Bat") or
(targetName:find("Elemental"))) then
equip(sets.midcast.burst)
add_to_chat(207,' '..player.target.name..' Burst Set')
end
end
end
Now only blackmagic will trigger the target check.
Phoenix.Evolved
Serveur: Phoenix
Game: FFXI
Posts: 67
By Phoenix.Evolved 2023-06-30 08:38:15
TY I love this. I think I like programming lua more than playing the game LOL.
Nah, actually BLM is pretty fun.
By drakefs 2023-07-02 15:41:33
@Asura.Kurdtray
I hope you got it fixed but if not, the issue is that you are declaring sets.precast ={}, which overwrites motes precast sets and breaks your precast. You will also need to update your JA sets from sets.precast.Boost to sets.precast.JA.Boost
The issue "fixed":
Code sets.precast.FC = {}
--sets.precast = {}
sets.precast.Chakra = {
ammo="Staunch Tathlum +1",
head="Genmei Kabuto",
body="Anchorite's Cyclas +1",
hands="Hesychast's Gloves",
legs="Tatenashi Haidate +1",
feet="Tatenashi Sune-ate +1",
neck="Unmoving Collar +1",
waist="Moonbow Belt",
--waist="Latria Sash",
ear1="Sherida Earring",
--ear1="Handler's Earring +1",
ear2="Tuisto Earring",
ring1="Regal Ring",
ring2="Niqmaddu Ring",
back=gear.MNK_TP_Cape,
}
By drakefs 2023-07-02 15:44:14
TY I love this. I think I like programming lua more than playing the game LOL.
Sometimes I feel like I keep my FFXI subscription to feed my LUA addiction...
Ragnarok.Boq
Serveur: Ragnarok
Game: FFXI
Posts: 31
By Ragnarok.Boq 2023-07-04 21:05:52
Hello. I've gotten back into the game and noticed the RDM lua I was using (based on Arislan's) seems to be incorrectly categorizing certain spell types. For example, if I cast elemental magic Thunder V, my enhancing magic duration set gets equipped during the midcast segment. I can't understand why it is doing so. I wonder if perhaps I'm using outdated versions of certain libraries?
Here is the lua code I have. Note, it is probably somewhat messy in the sense that I've done manual alterations to it over time, and I'm not the most savvy when it comes to such coding.
https://pastebin.com/nuqHPBHR
Bismarck.Radec
Serveur: Bismarck
Game: FFXI
Posts: 142
By Bismarck.Radec 2023-07-04 21:25:31
Broad strokes, you can't do this:
Code player.sub_job == 'NIN' or 'DNC'
that checks (player.sub_job == 'NIN') OR ('DNC'), and since 'DNC' isn't 0 or nil, it counts as true.
Replace that with something that checks both, like this
Code (player.sub_job == 'NIN' or player.sub_job == 'DNC')
By drakefs 2023-07-04 22:14:54
So you have some logic errors.
line 1259: Code if spell.skill == 'Enhancing Magic' and player.sub_job == 'NIN' or 'DNC' then
-if classes.NoSkillSpells:contains(spell.english) or classes.NoSkillSpells:contains(spellMap) then
equip(sets.midcast.EnhancingDuration)
end
the is always true and therefore this code always runs.
You need to change it to Code if spell.skill == 'Enhancing Magic' and (player.sub_job == 'NIN' or player.sub_job == 'DNC') then
--if classes.NoSkillSpells:contains(spell.english) or classes.NoSkillSpells:contains(spellMap) then
equip(sets.midcast.EnhancingDuration)
end
so that it checks the logic as you would expect.
This is trure for all the midcast checks using this logic. It is constantly trying to equip Daybreak and Maxentius as well, even though I am not able dual wield.
[+]
Ragnarok.Boq
Serveur: Ragnarok
Game: FFXI
Posts: 31
By Ragnarok.Boq 2023-07-05 17:02:34
Code player.sub_job == 'NIN' or 'DNC'
Replace that with something that checks both, like this
Code (player.sub_job == 'NIN' or player.sub_job == 'DNC') So you have some logic errors.
You need to change it to Code if spell.skill == 'Enhancing Magic' and (player.sub_job == 'NIN' or player.sub_job == 'DNC') then
--if classes.NoSkillSpells:contains(spell.english) or classes.NoSkillSpells:contains(spellMap) then
equip(sets.midcast.EnhancingDuration)
end
so that it checks the logic as you would expect.
This is trure for all the midcast checks using this logic. It is constantly trying to equip Daybreak and Maxentius as well, even though I am not able dual wield.
Thank you both for pointing out that coding logic error! I've adjusted and now things are working correctly again.
[+]
Serveur: Asura
Game: FFXI
Posts: 22
By Asura.Kurdtray 2023-07-08 12:02:04
I need help with an idea. I'm wanting to have a state that has multiple elements in it which is simple enough to do. for example my quickdraw looks like this
Code state.Mainqd = M{['description']='Primary Shot', 'Fire Shot', 'Ice Shot', 'Wind Shot', 'Earth Shot', 'Thunder Shot', 'Water Shot'}
But what i want to be able to do is instead of cycling through them like normal I want to be able to load a specific one at a moment. For example lets say i'm on fire shot and I want to load earth shot, instead of cycling through them I want to hit a macro to move straight to that one. I hope I'm explaining it properly, but if someone knows what code I would have to put in a macro to load the specific element in here I'd appreciate. Also if it can't be done some alternative ideas would be appreciated. Thanks.
By drakefs 2023-07-08 13:12:31
Are you using a mote based LUA? If so this macro will do what you want:
Code //gs c set Mainqd Fire Shot
Serveur: Asura
Game: FFXI
Posts: 22
By Asura.Kurdtray 2023-07-08 13:30:41
This example didn't work because apparently if it's two words it only reads the first, but the code is exactly what i was looking for and works on all my 1 word applications. Now to figure out how to make it work for more than 1 word. Thanks for this btw
By drakefs 2023-07-08 18:49:19
I tested it with my COR.lua and it worked with Fighter's Roll, Samurai Roll and Puppet Roll.
You can try using quotes but that gave an error for me: Code //gs c set Mainqd "Fire Shot"
//gs c set Mainqd 'Fire Shot'
I also initialized my states differently, no clue if that may affect using the set command:
Code -- Initialize roll tracking states
state.roll1 = M{['description'] = 'Roll 1'}
state.roll2 = M{['description'] = 'Roll 2'}
-- Add Rolls to roll tracking state
state.roll1:options("Corsair's Roll", "Ninja Roll", "Hunter's Roll", "Chaos Roll", "Magus's Roll", "Healer's Roll", "Puppet Roll",
"Choral Roll", "Monk's Roll", "Beast Roll", "Samurai Roll", "Evoker's Roll", "Rogue's Roll", "Warlock's Roll", "Fighter's Roll",
"Drachen Roll", "Gallant's Roll", "Wizard's Roll", "Dancer's Roll", "Scholar's Roll", "Bolter's Roll", "Caster's Roll",
"Courser's Roll" ,"Blitzer's Roll", "Tactician's Roll", "Allies's Roll", "Miser's Roll", "Companion's Roll", "Avenger's Roll")
state.roll2:options("Corsair's Roll", "Ninja Roll", "Hunter's Roll", "Chaos Roll", "Magus's Roll", "Healer's Roll", "Puppet Roll",
"Choral Roll", "Monk's Roll", "Beast Roll", "Samurai Roll", "Evoker's Roll", "Rogue's Roll", "Warlock's Roll", "Fighter's Roll",
"Drachen Roll", "Gallant's Roll", "Wizard's Roll", "Dancer's Roll", "Scholar's Roll", "Bolter's Roll", "Caster's Roll",
"Courser's Roll" ,"Blitzer's Roll", "Tactician's Roll", "Allies's Roll", "Miser's Roll", "Companion's Roll", "Avenger's Roll")
I initialized with just the description and then used the :options() function to add the actual rolls. I did the same thing for my QD elements.
My COR.lua if you want to compare. Note, I created a self command and function to do the exact same thing that the "gs c set" command because I didn't realize said command existed.
If you upload or post your LUA, I can test it to see if I get the issue as well.
Quetzalcoatl.Balthor
Serveur: Quetzalcoatl
Game: FFXI
Posts: 19
By Quetzalcoatl.Balthor 2023-07-08 20:30:07
I'm having trouble getting my WHM lua to switch into my melee gear automatically when I'm in an EP party and I don't have to worry about keeping my distance. It switches gear for casting with no issues. I don't know what code to put in so that I don't constantly have to hit the toggle to get my melee gear on. If someone could assist, I'd be grateful. Thank you.
Edit: I copied a lua, and just added my gear in each section.
Code -- IdleMode determines the set used after casting. You change it with "/console gs c <IdleMode>"
-- The modes are:
-- Auto: Uses "Refresh" below 50%, "DT" at 50-70%, and "MEva" above 70%.
-- I have it this way because MEva is my preferred set but it has lower refresh than the DT one.
-- Refresh: Uses the most refresh available.
-- MEva: Uses magic evasion build.
-- DT: Uses PDT and DT.
-- TP: TP build for meleeing.
-- KC: Seperate TP build used for Kraken Club (less double attack)
-- Additional Commands:
-- "/console gs c AccMode" will toggle high-accuracy mode for melee.
-- "/console gs c Gamb" will toggle Gambanteinn for Cursna
-- "/console gs c CureObjective" will force "midcast.CureObjective" and "aftercast.CureObjective" sets to be used for Omen 500HP objective.
-- Additional Bindings:
-- F9 - Toggles between a subset of IdleModes (Refresh > MEva > DT)
-- F10 - Toggles WeaponLock (When enabled, changes idle mode to TP and disables weapon slots from swapping)
function file_unload()
send_command('unbind f9')
send_command('unbind f10')
send_command('unbind f11')
send_command('unbind f12')
send_command('unbind ^f9')
send_command('unbind ^f10')
send_command('unbind ^f11')
enable("main","sub","range","ammo","head","neck","ear1","ear2","body","hands","ring1","ring2","back","waist","legs","feet")
end
function get_sets()
send_command('bind f9 gs c CycleIdle')
send_command('bind f10 gs c CureDT')
send_command('bind f11 gs c BanishPot') -- Use to toggle Banish Potency gear for weakening undead targets
-- send_command('bind f12 gs c Gamb') -- Gambanteinn toggle for Cursna, don't use if you don't have AG Gambanteinn
send_command('bind ^f9 gs c WeaponLock')
send_command('bind ^f10 gs c TH') -- Treasure Hunter toggle. Only equips for spells in the "THSpells" list below.
send_command('bind ^f11 gs c CureObjective') -- Use to toggle high-HP cure build to complete 500HP cure objectives in Omen
StartLockStyle = '19'
IdleMode = 'Auto'
WeaponLock = false
AccMode = false
Gambanteinn = false
BanishPotency = true
CureObjective = false
TreasureHunter = false
CureDT = false -- Capped DT in your Cure Midcast for fights like V20/V25 where you may get hit in midcast
THSpells = S{"Dia","Dia II","Diaga","Dispelga"} -- If you want Treasure Hunter gear to swap for a spell/ability, add it here.
IdleModeCommands = S{'Refresh','DT','MEva','TP','DualWield'}
-- Set initial macro set & lockstyle
send_command('input /macro book 4;wait .1;input /macro set 6;wait 3;input /lockstyleset '..StartLockStyle)
-- sets.WakeUp = { main="Prime Maul", sub="Genmei Shield" } -- Add an item here to wake yourself up if you're slept without Sublimation active. --
-- sets.Movement = { feet="Herald's Gaiters" } -- Movement item equipped automatically when Sneak/Invis/Bolters are up
-- ===================================================================================================================
-- Sets
-- ===================================================================================================================
sets.precast = {}
sets.TP = {}
-- Main fast cast set
sets.precast.FC = {
ammo="Incantor Stone",
head="Nahtirah Hat",
body="Anhur Robe",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -1%','"Cure" spellcasting time -4%',}},
legs={ name="Artsieq Hose", augments={'"Mag.Atk.Bns."+22','Mag. Evasion+9','Phys. dmg. taken -4',}},
feet="Regal Pumps +1",
neck="Orunmila's Torque",
waist="Witful Belt",
left_ear="Loquac. Earring",
right_ear="Malignance Earring",
left_ring="Defending Ring",
right_ring="Prolix Ring",
back="Swith Cape",
}
sets.precast.FC_Enhancing = set_combine(sets.precast.FC, {
waist="Siegel Sash",
})
sets.precast.FC_Cure = {
ammo="Incantor Stone",
head={ name="Piety Cap +3", augments={'Enhances "Devotion" effect',}},
body="Heka's Kalasiris",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -1%','"Cure" spellcasting time -4%',}},
legs="Ebers Pant. +3",
feet={ name="Vanya Clogs", augments={'"Cure" potency +5%','"Cure" spellcasting time -15%','"Conserve MP"+6',}},
neck="Orunmila's Torque",
waist="Witful Belt",
left_ear="Nourish. Earring",
right_ear="Malignance Earring",
left_ring="Kishar Ring",
right_ring="Prolix Ring",
back="Pahtli Cape",
}
-- Fast cast for ailment spells (Divine Benison works well here)
sets.precast.FC_Ailment = set_combine(sets.precast.FC, {
legs="Ebers Pantaloons +3"
})
sets.precast['Impact'] = set_combine(sets.precast.FC, { -- Make sure to leave the head empty --
head=empty,
body="Crepuscular Cloak"
})
sets.precast["Dispelga"] = set_combine(sets.precast.FC, {
})
-- Yes, I have a blood pact timer set on WHM...
sets.precast.BP = {
head={ name="Helios Band", augments={'Pet: Mag. Acc.+29','"Blood Pact" ability delay -5','Summoning magic skill +8',}},
legs={ name="Helios Spats", augments={'Pet: Mag. Acc.+25','"Blood Pact" ability delay -5','Summoning magic skill +6',}},
feet={ name="Helios Boots", augments={'Pet: Mag. Acc.+29','"Blood Pact" ability delay -5','Summoning magic skill +8',}}
}
sets.midcast = {}
-- Cure potency build. I pretty much just assume Aurorastorm is up.
sets.midcast.Cure = {
ammo="Clarus Stone",
head="Theo. Cap +1",
body="Ebers Bliaut +2",
hands={ name="Bokwus Gloves", augments={'"Mag.Atk.Bns."+13','INT+10','MND+10',}},
legs="Ebers Pant. +3",
feet={ name="Vanya Clogs", augments={'"Cure" potency +5%','"Cure" spellcasting time -15%','"Conserve MP"+6',}},
neck="Phalaina Locket",
waist="Austerity Belt",
left_ear="Roundel Earring",
right_ear="Glorious Earring",
left_ring="Ephedra Ring",
right_ring="Ephedra Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
sets.midcast.Cure.Weather = set_combine(sets.midcast.Cure, {
waist="Hachirin-no-Obi",
})
-- Afflatus Solace doesn't work on Curaga so there are some changes here.
sets.midcast.Curaga = set_combine(sets.midcast.Cure, {
})
sets.midcast.Curaga.Weather = set_combine(sets.midcast.Curaga, {
waist="Hachirin-no-Obi",
})
-- Cure set with capped DT for nasty fights like V20+ Odyssey. "//gs c CureDT" to toggle.
sets.midcast.Cure.CureDT = set_combine(sets.midcast.Cure, {
ammo="Crepuscular Pebble",
ring1="Defending Ring",
})
sets.midcast.Cure.CureDT.Weather = set_combine(sets.midcast.Cure.CureDT, {
waist="Hachirin-no-Obi",
})
-- Curaga set for CureDT
sets.midcast.Curaga.CureDT = set_combine(sets.midcast.Curaga, {
})
sets.midcast.Curaga.CureDT.Weather = set_combine(sets.midcast.Curaga.CureDT, {
waist="Hachirin-no-Obi",
})
-- Cure set used for cure objective in Omen. Make sure it has 500HP more than your "aftercast.CureObjective" set.
sets.midcast.CureObjective = set_combine(sets.midcast.Cure, {
ammo="Plumose Sachet",
head={ name="Piety Cap +3", augments={'Enhances "Devotion" effect',}},
body="Ebers Bliaut +2",
hands={ name="Piety Mitts +3", augments={'Enhances "Martyr" effect',}},
legs={ name="Piety Pantaln. +3", augments={'Enhances "Afflatus Misery" effect',}},
feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
neck="Twilight Torque",
waist="Eschan Stone",
left_ear="Ethereal Earring",
right_ear="Suppanomimi",
left_ring="Kunaji Ring",
right_ring="Gelatinous Ring +1",
back="Oretania's Cape",
})
-- For Raise recast
sets.midcast.HealingRecast = set_combine(sets.precast.FC, {
})
-- Enhancing set with 500 skill
sets.midcast.Enhancing = {
ammo="Clarus Stone",
head="Befouled Crown",
body="Anhur Robe",
hands="Dynasty Mitts",
legs="Ebers Pant. +3",
feet="Ebers Duckbills",
neck="Colossus's Torque",
waist="Embla Sash",
left_ear="Lifestorm Earring",
right_ear="Andoaa Earring",
left_ring="Defending Ring",
right_ring="Stikini Ring",
back="Fi Follet Cape",
}
-- If you have to take out duration gear to hit 500 skill above, add the duration gear here for when skill isn't needed.
sets.midcast.EnhancingDuration = set_combine(sets.midcast.Enhancing, {
})
-- Make sure this set has 500 skill as well.
sets.midcast.BarElement = set_combine(sets.midcast.Enhancing, {
})
sets.midcast.BarAilment = set_combine(sets.midcast.Enhancing, {
})
sets.midcast.Regen = {
ammo="Clarus Stone",
head="Inyanga Tiara +2",
body={ name="Piety Bliaut +3", augments={'Enhances "Benediction" effect',}},
hands="Ebers Mitts +1",
legs="Th. Pantaloons +2",
feet="Regal Pumps +1",
neck="Orunmila's Torque",
waist="Embla Sash",
left_ear="Loquac. Earring",
right_ear="Malignance Earring",
left_ring="Kishar Ring",
right_ring="Prolix Ring",
back="Vita Cape",
}
sets.midcast.Stoneskin = set_combine(sets.midcast.EnhancingDuration, {
waist="Siegel Sash"
})
sets.midcast["Auspice"] = set_combine(sets.midcast.EnhancingDuration, {
feet="Ebers Duckbills"
})
sets.midcast.Aquaveil = set_combine(sets.midcast.EnhancingDuration, {
--legs="Shedir Seraweels"
})
sets.midcast.Enfeebling = {
ammo="Plumose Sachet",
head="Befouled Crown",
body="Ebers Bliaut +2",
hands={ name="Piety Mitts +3", augments={'Enhances "Martyr" effect',}},
legs="Ebers Pant. +3",
feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
neck="Erra Pendant",
waist="Eschan Stone",
left_ear="Lifestorm Earring",
right_ear="Malignance Earring",
left_ring="Kishar Ring",
right_ring="Stikini Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
-- This is a set I just use for Paralyze to maximize MND.
sets.midcast.EnfeeblingMND = set_combine(sets.midcast.Enfeebling, {
})
-- Used by all black magic enfeebs.
sets.midcast.EnfeeblingINT = set_combine(sets.midcast.Enfeebling, {
})
sets.midcast.Divine = set_combine(sets.midcast.Enfeebling, {
legs="Theophany Pantaloons +2",
head="Inyanga Tiara +2",
})
sets.midcast.NaSpell = set_combine(sets.precast.FC, {
ammo="Clarus Stone",
head="Hyksos Khat",
body="Ebers Bliaut +2",
hands="Ebers Mitts +1",
legs="Th. Pantaloons +2",
feet={ name="Vanya Clogs", augments={'"Cure" potency +5%','"Cure" spellcasting time -15%','"Conserve MP"+6',}},
neck="Malison Medallion",
waist="Austerity Belt",
left_ear="Loquac. Earring",
right_ear="Malignance Earring",
left_ring="Ephedra Ring",
right_ring="Menelaus's Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
})
sets.midcast.Erase = set_combine(sets.midcast.NaSpell, {
})
sets.midcast.Esuna = set_combine(sets.midcast.NaSpell, {
})
sets.midcast.Cursna = {
ammo="Clarus Stone",
head="Hyksos Khat",
body="Ebers Bliaut +2",
hands="Theophany Mitts +2",
legs="Th. Pantaloons +2",
feet={ name="Vanya Clogs", augments={'"Cure" potency +5%','"Cure" spellcasting time -15%','"Conserve MP"+6',}},
neck="Malison Medallion",
waist="Austerity Belt",
left_ear="Loquac. Earring",
right_ear="Malignance Earring",
left_ring="Ephedra Ring",
right_ring="Menelaus's Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
sets.midcast.Elemental = {
ammo="Ghastly Tathlum",
head="Bunzi's Hat",
body="Bunzi's Robe",
hands="Bunzi's Gloves",
legs="Nyame Flanchard",
feet="Nyame Sollerets",
neck="Eddy Necklace",
waist="Refoccilation Stone",
left_ear="Friomisi Earring",
right_ear="Malignance Earring",
left_ring="Freke Ring",
right_ring="Stikini Ring",
back="Argocham. Mantle",
}
sets.midcast.Elemental.Weather = set_combine(sets.midcast.Elemental, {
waist="Hachirin-no-Obi"
})
sets.midcast.Helix = {
ammo="Ghastly Tathlum",
head="Bunzi's Hat",
body="Bunzi's Robe",
hands="Bunzi's Gloves",
legs="Nyame Flanchard",
feet="Nyame Sollerets",
neck="Eddy Necklace",
waist="Refoccilation Stone",
left_ear="Friomisi Earring",
right_ear="Malignance Earring",
left_ring="Freke Ring",
right_ring="Stikini Ring",
back="Argocham. Mantle",
}
-- Banish Potency against Undead ~ I think the cap for Banishga II is about +42%
sets.midcast.BanishPotency = set_combine(sets.midcast.Elemental.Weather, {
})
sets.midcast['Impact'] = set_combine(sets.midcast.Elemental, { -- Make sure to leave the head empty --
head=empty,
body="Twilight Cloak",
neck="Erra Pendant",
})
sets.midcast["Benediction"] = { body="Piety Bliaut +3" }
sets.midcast["Protectra V"] = set_combine(sets.midcast.EnhancingDuration, {
})
sets.midcast["Shellra V"] = set_combine(sets.midcast.EnhancingDuration, {
})
sets.midcast["Dispelga"] = set_combine(sets.midcast.EnfeeblingINT, {
main="Daybreak",
})
sets.midcast["Divine Caress"] = {
hands="Ebers Mitts +3",
}
-- Base weaponskill set, use WSD for this since most stuff is single or double hit.
sets.midcast.Weaponskill = {
ammo="Oshasha's Treatise",
head={ name="Piety Cap +3", augments={'Enhances "Devotion" effect',}},
body={ name="Piety Bliaut +3", augments={'Enhances "Benediction" effect',}},
hands={ name="Piety Mitts +3", augments={'Enhances "Martyr" effect',}},
legs={ name="Piety Pantaln. +3", augments={'Enhances "Afflatus Misery" effect',}},
feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
neck="Rep. Plat. Medal",
waist="Fotia Belt",
left_ear="Steelflash Earring",
right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
left_ring="Rajas Ring",
right_ring="Mars's Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
sets.midcast.Weaponskill.MAB = {
ammo="Oshasha's Treatise",
head={ name="Piety Cap +3", augments={'Enhances "Devotion" effect',}},
body={ name="Piety Bliaut +3", augments={'Enhances "Benediction" effect',}},
hands={ name="Piety Mitts +3", augments={'Enhances "Martyr" effect',}},
legs={ name="Piety Pantaln. +3", augments={'Enhances "Afflatus Misery" effect',}},
feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
neck="Eddy Necklace",
waist="Fotia Belt",
left_ear="Friomisi Earring",
right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
left_ring="Freke Ring",
right_ring="Fenrir Ring +1",
back="Argocham. Mantle",
}
-- 7 hits, no crit, fTP carries
sets.midcast["Realmrazer"] = set_combine(sets.midcast.Weaponskill, {
})
-- 6 hits, crit WS, fTP carries
sets.midcast["Hexa Strike"] = set_combine(sets.midcast.Weaponskill, {
})
sets.midcast["Flash Nova"] = set_combine(sets.midcast.Weaponskill.MAB, {
})
sets.midcast["Seraph Strike"] = set_combine(sets.midcast.Weaponskill.MAB, {
})
-- Treasure Hunter set. Don't put anything in here except TH+ gear.
-- It overwrites slots in other sets when TH toggle is on (Ctrl+F10).
sets.midcast.TH = {
head="White Rarab Cap +1",
waist="Chaac Belt",
ammo="Perfect Lucky Egg",
}
sets.aftercast = {}
-- Idle set used when IdleMode is "Refresh"
sets.aftercast.Refresh = {
ammo="Homiliary",
head="Befouled Crown",
body="Ebers Bliaut +2",
hands="Serpentes Cuffs",
legs="Nares Trews",
feet="Serpentes Sabots",
neck="Twilight Torque",
waist="Embla Sash",
left_ear="Ethereal Earring",
right_ear="Suppanomimi",
left_ring="Defending Ring",
right_ring="Woltaris Ring +1",
back="Cheviot Cape",
}
sets.aftercast.Refresh.LowMP = set_combine(sets.aftercast.Refresh, {
waist="Fucho-no-obi",
})
sets.aftercast.Avatar = set_combine(sets.aftercast.Refresh, {
})
-- Used when IdleMode is "DT"
-- As much refresh as I can get while still having capped DT.
sets.aftercast.DT = {
ammo="Homiliary",
head="Befouled Crown",
body="Ebers Bliaut +2",
hands="Bunzi's Gloves",
legs="Ebers Pant. +3",
feet="Nyame Sollerets",
neck="Twilight Torque",
waist="Embla Sash",
left_ear="Merman's Earring",
right_ear="Merman's Earring",
left_ring="Defending Ring",
right_ring="Woltaris Ring +1",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
-- Used when IdleMode is "MEva" and also the main idle set when IdleMode is "Auto"
-- This is my favored idle set with capped DT and tons of magic evasion, but not much refresh.
sets.aftercast.MEva = {
ammo="Homiliary",
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Nyame Sollerets",
neck="Twilight Torque",
waist="Embla Sash",
left_ear="Merman's Earring",
right_ear="Merman's Earring",
left_ring="Inyanga Ring",
right_ring="Woltaris Ring +1",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
-- Used for CureObjective mode. If you plan to use that mode, ensure this set has 500HP less than "midcast.CureObjective".
sets.aftercast.CureObjective = set_combine(sets.aftercast.Refresh, {
})
-- Used when IdleMode is "TP"
sets.aftercast.TP = {
ammo="Oshasha's Treatise",
head={ name="Piety Cap +3", augments={'Enhances "Devotion" effect',}},
body={ name="Piety Bliaut +3", augments={'Enhances "Benediction" effect',}},
hands={ name="Piety Mitts +3", augments={'Enhances "Martyr" effect',}},
legs="Ebers Pant. +3",
feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
neck="Asperity Necklace",
waist="Cetl Belt",
left_ear="Steelflash Earring",
right_ear="Bladeborn Earring",
left_ring="Cacoethic Ring +1",
right_ring="Patricius Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
sets.TP.Engaged = {
ammo="Oshasha's Treatise",
head={ name="Piety Cap +3", augments={'Enhances "Devotion" effect',}},
body={ name="Piety Bliaut +3", augments={'Enhances "Benediction" effect',}},
hands={ name="Piety Mitts +3", augments={'Enhances "Martyr" effect',}},
legs="Ebers Pant. +3",
feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
neck="Asperity Necklace",
waist="Cetl Belt",
left_ear="Steelflash Earring",
right_ear="Bladeborn Earring",
left_ring="Cacoethic Ring +1",
right_ring="Patricius Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
sets.aftercast.DualWield = set_combine(sets.aftercast.TP, {
ear2="Suppanomimi",
ear1="Brutal Earring",
})
--[[ sets.aftercast.Hybrid = set_combine(sets.aftercast.TP, {
ammo="Staunch Tathlum +1",
head="Nyame Helm",
legs="Nyame Flanchard",
feet="Nyame Sollerets"
})
sets.aftercast.HybridDW = set_combine(sets.aftercast.DT, {})
sets.aftercast.HybridDW.Engaged = set_combine(sets.aftercast.Hybrid, {
ear2="Suppanomimi",
feet={ name="Chironic Slippers", augments={'"Dual Wield"+4','Rng.Acc.+21 Rng.Atk.+21','Quadruple Attack +3','Accuracy+17 Attack+17',}}
})
-- Used when IdleMode is "KC". I try to eliminate double attack here since it's bad with Kraken Club.
sets.aftercast.KC = set_combine(sets.aftercast.TP, {
neck="Combatant's Torque",
ear2="Suppanomimi",
body="Ebers Bliaut +3",
hands="Gazu Bracelets +1",
waist="Goading Belt",
})
]]
-- ===================================================================================================================
-- End of Sets
-- ===================================================================================================================
NaSpells = S{"Blindna","Erase","Paralyna","Poisona","Silena","Stona","Viruna"}
BarElement = S{"Barfira","Barstonra","Barwatera","Baraera","Barblizzara","Barthundra","Barfire","Barstone","Barwater","Baraero","Barblizzard","Barthunder","Barsleepra","Barsilencera","Barpetra","Barblindra","Barparalyzra","Barpoisonra"}
EnhancingSpells = S{"Boost-STR","Boost-DEX","Boost-VIT","Boost-AGI","Boost-INT","Boost-MND","Boost-CHR","Refresh","Aquaveil","Hailstorm","Sandstorm","Rainstorm","Windstorm","Firestorm","Thunderstorm","Voidstorm","Aurorastorm"}
EnfeeblingMND = S{"Paralyze","Bind"}
end
function precast(spell)
--if midaction() then
--cancel_spell()
--return
--end
if spell.type=="Item" then
return
end
-- Spell fast cast
if spell.action_type=="Magic" then
if sets.precast[spell.english] then
equip(sets.precast[spell.english])
elseif spell.skill=="Enhancing Magic" then
equip(sets.precast.FC_Enhancing)
elseif string.find(spell.name,"Cure") or string.find(spell.name,"Curaga") then
equip(sets.precast.FC_Cure)
elseif NaSpells:contains(spell.name) or spell.name=="Cursna" then
equip(sets.precast.FC_Ailment)
else
equip(sets.precast.FC)
end
end
end
function midcast(spell)
if spell.type=="Item" then
return
end
-- Check for a specific set
if sets.midcast[spell.english] then
equip(sets.midcast[spell.english])
if spell.name=="Cursna" and Gambanteinn then
equip({main="Gambanteinn"})
end
-- Specific Spells
elseif string.find(spell.name,"Cure") then
equipSet = sets.midcast.Cure
if CureObjective then
equipSet = sets.midcast.CureObjective
end
if CureDT and equipSet["CureDT"] then
equipSet = equipSet["CureDT"]
end
if (spell.element==world.weather_element or buffactive["Aurorastorm"]) and equipSet["Weather"] then
equipSet = equipSet["Weather"]
end
equip(equipSet)
elseif string.find(spell.name,"Cura") then
equipSet = sets.midcast.Curaga
if CureDT and equipSet["CureDT"] then
equipSet = equipSet["CureDT"]
end
if (spell.element==world.weather_element or buffactive["Aurorastorm"]) and equipSet["Weather"] then
equipSet = equipSet["Weather"]
end
equip(equipSet)
elseif NaSpells:contains(spell.name) then
equip(sets.midcast.NaSpell)
elseif string.find(spell.name,"Regen") then
equip(sets.midcast.Regen)
elseif string.sub(spell.name,1,3)=="Bar" then
if BarElement:contains(spell.name) then
equip(sets.midcast.BarElement)
else
equip(sets.midcast.BarAilment)
end
-- Spells by Type/Skill
elseif spell.skill=="Enfeebling Magic" then
equipSet = sets.midcast.Enfeebling
if EnfeeblingMND:contains(spell.name) then
equipSet = sets.midcast.EnfeeblingMND
elseif spell.type=="BlackMagic" then
equipSet = sets.midcast.EnfeeblingINT
end
if CureDT and equipSet["CureDT"] then
equipSet = equipSet["CureDT"]
end
equip(equipSet)
elseif spell.skill=="Enhancing Magic" then
equipSet = sets.midcast.EnhancingDuration
if EnhancingSpells:contains(spell.name) then
equipSet = sets.midcast.Enhancing
end
if CureDT and equipSet["CureDT"] then
equipSet = equipSet["CureDT"]
end
equip(equipSet)
elseif spell.skill=="Divine Magic" then
if spell.name=="Repose" then
equip(sets.midcast.Divine)
else
if BanishPotency and string.sub(spell.name,1,6)=="Banish" then
equip(sets.midcast.BanishPotency)
else
equipSet = sets.midcast.Elemental
if spell.element == world.weather_element or spell.element == world.day_element and equipSet["Weather"] then
equipSet = equipSet["Weather"]
end
equip(equipSet)
end
end
elseif spell.skill=="Healing Magic" then
equip(sets.midcast.HealingRecast)
elseif spell.type=="WeaponSkill" then
equip(sets.midcast.Weaponskill)
elseif spell.type=="BloodPactWard" or spell.type=="BloodPactRage" then
equip(sets.precast.BP)
else
idle()
end
-- Treasure Hunter
if TreasureHunter and THSpells:contains(spell.name) then
equip(sets.midcast.TH)
end
-- Auto-cancel existing buffs
if spell.name=="Stoneskin" and buffactive["Stoneskin"] then
windower.send_command('cancel 37;')
elseif spell.name=="Sneak" and buffactive["Sneak"] and spell.target.type=="SELF" then
windower.send_command('cancel 71;')
elseif spell.name=="Utsusemi: Ichi" and buffactive["Copy Image"] then
windower.send_command('wait 1;cancel 66;')
end
end
function aftercast(spell)
if spell.type=="Item" then
return
end
idle()
end
function aftercast(spell)
if player.status == 'Engaged' then
equip(sets.TP)
else
equip(sets.aftercast)
end
if spell.action_type == 'Weaponskill' then
add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
end
end
function status_change(new,old)
idle()
end
function buff_change(name,gain)
-- Auto-wakeup
if name=="sleep" and gain then
if not buffactive["Sublimation: Activated"] then
equip(sets.WakeUp)
end
if buffactive["Stoneskin"] then
windower.send_command('cancel 37;')
end
end
end
function self_command(command)
is_valid = command:lower()=="idle"
if IdleModeCommands:contains(command) then
IdleMode = command
is_valid = true
send_command('console_echo "Idle Mode: '..IdleMode..'"')
elseif command:lower()=="cycleidle" then
if IdleMode=="Auto" then
IdleMode = "DT"
elseif IdleMode=="DT" then
IdleMode = "Refresh"
elseif IdleMode=="Refresh" then
IdleMode = "MEva"
elseif IdleMode=="MEva" then
IdleMode = "TP"
elseif IdleMode== "TP" then
IdleMode = "DualWield"
else
IdleMode = "Auto"
end
is_valid = true
send_command('console_echo "Idle Mode: '..IdleMode..'"')
elseif command:lower()=="weaponlock" then
if WeaponLock then
enable("main","sub","range")
IdleMode = "Auto"
WeaponLock = false
else
disable("main","sub","range")
IdleMode = "Hybrid"
WeaponLock = true
end
is_valid = true
send_command('console_echo "Idle Mode: '..IdleMode..'"')
send_command('console_echo "Weapon Lock: '..tostring(WeaponLock)..'"')
elseif command:lower()=="accmode" then
AccMode = AccMode==false
send_command('console_echo "Acc Mode: '..tostring(AccMode)..'"')
is_valid = true
elseif command:lower()=="banishpot" then
BanishPotency = BanishPotency==false
send_command('console_echo "Banish Potency Mode: '..tostring(BanishPotency)..'"')
is_valid = true
elseif command:lower()=="gamb" then
Gambanteinn = Gambanteinn==false
send_command('console_echo "Gambanteinn Cursna Mode: '..tostring(Gambanteinn)..'"')
is_valid = true
elseif command:lower()=="th" then
TreasureHunter = TreasureHunter==false
is_valid = true
send_command('console_echo "Treasure Hunter Mode: '..tostring(TreasureHunter)..'"')
elseif command:lower()=="cureobjective" then
CureObjective = CureObjective==false
send_command('console_echo "Cure Objective Mode: '..tostring(CureObjective)..'"')
is_valid = true
elseif command:lower()=="curedt" then
CureDT = CureDT==false
send_command('console_echo "Cure DT Mode: '..tostring(CureDT)..'"')
is_valid = true
end
if is_valid then
if (not midaction() and not pet_midaction()) or command:lower()=="idle" then
idle()
end
else
sanitized = command:gsub("\"", "")
send_command('console_echo "Invalid self_command: '..sanitized..'"')
end
end
function idle()
if IdleMode=='Auto' then
if player.mpp < 50 then
equip(sets.aftercast.Refresh.LowMP)
elseif player.mpp < 70 then
equip(sets.aftercast.DT)
else
equip(sets.aftercast.MEva)
end
else
equipSet = sets.aftercast
if equipSet[IdleMode] then
equipSet = equipSet[IdleMode]
end
if equipSet[player.status] then
equipSet = equipSet[player.status]
end
if player.mpp < 50 and equipSet["LowMP"] then
equipSet = equipSet["LowMP"]
end
equip(equipSet)
end
if (buffactive["Sneak"] or buffactive["Invisible"] or buffactive["Bolter's Roll"]) and IdleMode~='DT' then
equip(sets.Movement)
end
-- Balrahn's Ring
--if Salvage:contains(world.area) then
-- equip({ring2="Balrahn's Ring"})
--end
-- Maquette Ring
--if world.area=='Maquette Abdhaljs-Legion' and not IdleMode=='DT' then
-- equip({ring2="Maquette Ring"})
--end
-- CureObjective Mode takes precedence over everything else
if CureObjective then
equip(sets.aftercast.CureObjective)
end
-- Wake up if slept
--[[ if buffactive["Sleep"] then
if not buffactive["Sublimation: Activated"] then
equip(sets.WakeUp)
end
end ]]
end
By drakefs 2023-07-08 22:04:10
You have 2 aftercast functions. The second one (line 699) I commented out as that one looks wrong (it is not calling any sets you have defined).
Code -- IdleMode determines the set used after casting. You change it with "/console gs c <IdleMode>"
-- The modes are:
-- Auto: Uses "Refresh" below 50%, "DT" at 50-70%, and "MEva" above 70%.
-- I have it this way because MEva is my preferred set but it has lower refresh than the DT one.
-- Refresh: Uses the most refresh available.
-- MEva: Uses magic evasion build.
-- DT: Uses PDT and DT.
-- TP: TP build for meleeing.
-- KC: Seperate TP build used for Kraken Club (less double attack)
-- Additional Commands:
-- "/console gs c AccMode" will toggle high-accuracy mode for melee.
-- "/console gs c Gamb" will toggle Gambanteinn for Cursna
-- "/console gs c CureObjective" will force "midcast.CureObjective" and "aftercast.CureObjective" sets to be used for Omen 500HP objective.
-- Additional Bindings:
-- F9 - Toggles between a subset of IdleModes (Refresh > MEva > DT)
-- F10 - Toggles WeaponLock (When enabled, changes idle mode to TP and disables weapon slots from swapping)
function file_unload()
send_command('unbind f9')
send_command('unbind f10')
send_command('unbind f11')
send_command('unbind f12')
send_command('unbind ^f9')
send_command('unbind ^f10')
send_command('unbind ^f11')
enable("main","sub","range","ammo","head","neck","ear1","ear2","body","hands","ring1","ring2","back","waist","legs","feet")
end
function get_sets()
send_command('bind f9 gs c CycleIdle')
send_command('bind f10 gs c CureDT')
send_command('bind f11 gs c BanishPot') -- Use to toggle Banish Potency gear for weakening undead targets
-- send_command('bind f12 gs c Gamb') -- Gambanteinn toggle for Cursna, don't use if you don't have AG Gambanteinn
send_command('bind ^f9 gs c WeaponLock')
send_command('bind ^f10 gs c TH') -- Treasure Hunter toggle. Only equips for spells in the "THSpells" list below.
send_command('bind ^f11 gs c CureObjective') -- Use to toggle high-HP cure build to complete 500HP cure objectives in Omen
StartLockStyle = '19'
IdleMode = 'Auto'
WeaponLock = false
AccMode = false
Gambanteinn = false
BanishPotency = true
CureObjective = false
TreasureHunter = false
CureDT = false -- Capped DT in your Cure Midcast for fights like V20/V25 where you may get hit in midcast
THSpells = S{"Dia","Dia II","Diaga","Dispelga"} -- If you want Treasure Hunter gear to swap for a spell/ability, add it here.
IdleModeCommands = S{'Refresh','DT','MEva','TP','DualWield'}
-- Set initial macro set & lockstyle
send_command('input /macro book 4;wait .1;input /macro set 6;wait 3;input /lockstyleset '..StartLockStyle)
-- sets.WakeUp = { main="Prime Maul", sub="Genmei Shield" } -- Add an item here to wake yourself up if you're slept without Sublimation active. --
-- sets.Movement = { feet="Herald's Gaiters" } -- Movement item equipped automatically when Sneak/Invis/Bolters are up
-- ===================================================================================================================
-- Sets
-- ===================================================================================================================
sets.precast = {}
sets.TP = {}
-- Main fast cast set
sets.precast.FC = {
ammo="Incantor Stone",
head="Nahtirah Hat",
body="Anhur Robe",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -1%','"Cure" spellcasting time -4%',}},
legs={ name="Artsieq Hose", augments={'"Mag.Atk.Bns."+22','Mag. Evasion+9','Phys. dmg. taken -4',}},
feet="Regal Pumps +1",
neck="Orunmila's Torque",
waist="Witful Belt",
left_ear="Loquac. Earring",
right_ear="Malignance Earring",
left_ring="Defending Ring",
right_ring="Prolix Ring",
back="Swith Cape",
}
sets.precast.FC_Enhancing = set_combine(sets.precast.FC, {
waist="Siegel Sash",
})
sets.precast.FC_Cure = {
ammo="Incantor Stone",
head={ name="Piety Cap +3", augments={'Enhances "Devotion" effect',}},
body="Heka's Kalasiris",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -1%','"Cure" spellcasting time -4%',}},
legs="Ebers Pant. +3",
feet={ name="Vanya Clogs", augments={'"Cure" potency +5%','"Cure" spellcasting time -15%','"Conserve MP"+6',}},
neck="Orunmila's Torque",
waist="Witful Belt",
left_ear="Nourish. Earring",
right_ear="Malignance Earring",
left_ring="Kishar Ring",
right_ring="Prolix Ring",
back="Pahtli Cape",
}
-- Fast cast for ailment spells (Divine Benison works well here)
sets.precast.FC_Ailment = set_combine(sets.precast.FC, {
legs="Ebers Pantaloons +3"
})
sets.precast['Impact'] = set_combine(sets.precast.FC, { -- Make sure to leave the head empty --
head=empty,
body="Crepuscular Cloak"
})
sets.precast["Dispelga"] = set_combine(sets.precast.FC, {
})
-- Yes, I have a blood pact timer set on WHM...
sets.precast.BP = {
head={ name="Helios Band", augments={'Pet: Mag. Acc.+29','"Blood Pact" ability delay -5','Summoning magic skill +8',}},
legs={ name="Helios Spats", augments={'Pet: Mag. Acc.+25','"Blood Pact" ability delay -5','Summoning magic skill +6',}},
feet={ name="Helios Boots", augments={'Pet: Mag. Acc.+29','"Blood Pact" ability delay -5','Summoning magic skill +8',}}
}
sets.midcast = {}
-- Cure potency build. I pretty much just assume Aurorastorm is up.
sets.midcast.Cure = {
ammo="Clarus Stone",
head="Theo. Cap +1",
body="Ebers Bliaut +2",
hands={ name="Bokwus Gloves", augments={'"Mag.Atk.Bns."+13','INT+10','MND+10',}},
legs="Ebers Pant. +3",
feet={ name="Vanya Clogs", augments={'"Cure" potency +5%','"Cure" spellcasting time -15%','"Conserve MP"+6',}},
neck="Phalaina Locket",
waist="Austerity Belt",
left_ear="Roundel Earring",
right_ear="Glorious Earring",
left_ring="Ephedra Ring",
right_ring="Ephedra Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
sets.midcast.Cure.Weather = set_combine(sets.midcast.Cure, {
waist="Hachirin-no-Obi",
})
-- Afflatus Solace doesn't work on Curaga so there are some changes here.
sets.midcast.Curaga = set_combine(sets.midcast.Cure, {
})
sets.midcast.Curaga.Weather = set_combine(sets.midcast.Curaga, {
waist="Hachirin-no-Obi",
})
-- Cure set with capped DT for nasty fights like V20+ Odyssey. "//gs c CureDT" to toggle.
sets.midcast.Cure.CureDT = set_combine(sets.midcast.Cure, {
ammo="Crepuscular Pebble",
ring1="Defending Ring",
})
sets.midcast.Cure.CureDT.Weather = set_combine(sets.midcast.Cure.CureDT, {
waist="Hachirin-no-Obi",
})
-- Curaga set for CureDT
sets.midcast.Curaga.CureDT = set_combine(sets.midcast.Curaga, {
})
sets.midcast.Curaga.CureDT.Weather = set_combine(sets.midcast.Curaga.CureDT, {
waist="Hachirin-no-Obi",
})
-- Cure set used for cure objective in Omen. Make sure it has 500HP more than your "aftercast.CureObjective" set.
sets.midcast.CureObjective = set_combine(sets.midcast.Cure, {
ammo="Plumose Sachet",
head={ name="Piety Cap +3", augments={'Enhances "Devotion" effect',}},
body="Ebers Bliaut +2",
hands={ name="Piety Mitts +3", augments={'Enhances "Martyr" effect',}},
legs={ name="Piety Pantaln. +3", augments={'Enhances "Afflatus Misery" effect',}},
feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
neck="Twilight Torque",
waist="Eschan Stone",
left_ear="Ethereal Earring",
right_ear="Suppanomimi",
left_ring="Kunaji Ring",
right_ring="Gelatinous Ring +1",
back="Oretania's Cape",
})
-- For Raise recast
sets.midcast.HealingRecast = set_combine(sets.precast.FC, {
})
-- Enhancing set with 500 skill
sets.midcast.Enhancing = {
ammo="Clarus Stone",
head="Befouled Crown",
body="Anhur Robe",
hands="Dynasty Mitts",
legs="Ebers Pant. +3",
feet="Ebers Duckbills",
neck="Colossus's Torque",
waist="Embla Sash",
left_ear="Lifestorm Earring",
right_ear="Andoaa Earring",
left_ring="Defending Ring",
right_ring="Stikini Ring",
back="Fi Follet Cape",
}
-- If you have to take out duration gear to hit 500 skill above, add the duration gear here for when skill isn't needed.
sets.midcast.EnhancingDuration = set_combine(sets.midcast.Enhancing, {
})
-- Make sure this set has 500 skill as well.
sets.midcast.BarElement = set_combine(sets.midcast.Enhancing, {
})
sets.midcast.BarAilment = set_combine(sets.midcast.Enhancing, {
})
sets.midcast.Regen = {
ammo="Clarus Stone",
head="Inyanga Tiara +2",
body={ name="Piety Bliaut +3", augments={'Enhances "Benediction" effect',}},
hands="Ebers Mitts +1",
legs="Th. Pantaloons +2",
feet="Regal Pumps +1",
neck="Orunmila's Torque",
waist="Embla Sash",
left_ear="Loquac. Earring",
right_ear="Malignance Earring",
left_ring="Kishar Ring",
right_ring="Prolix Ring",
back="Vita Cape",
}
sets.midcast.Stoneskin = set_combine(sets.midcast.EnhancingDuration, {
waist="Siegel Sash"
})
sets.midcast["Auspice"] = set_combine(sets.midcast.EnhancingDuration, {
feet="Ebers Duckbills"
})
sets.midcast.Aquaveil = set_combine(sets.midcast.EnhancingDuration, {
--legs="Shedir Seraweels"
})
sets.midcast.Enfeebling = {
ammo="Plumose Sachet",
head="Befouled Crown",
body="Ebers Bliaut +2",
hands={ name="Piety Mitts +3", augments={'Enhances "Martyr" effect',}},
legs="Ebers Pant. +3",
feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
neck="Erra Pendant",
waist="Eschan Stone",
left_ear="Lifestorm Earring",
right_ear="Malignance Earring",
left_ring="Kishar Ring",
right_ring="Stikini Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
-- This is a set I just use for Paralyze to maximize MND.
sets.midcast.EnfeeblingMND = set_combine(sets.midcast.Enfeebling, {
})
-- Used by all black magic enfeebs.
sets.midcast.EnfeeblingINT = set_combine(sets.midcast.Enfeebling, {
})
sets.midcast.Divine = set_combine(sets.midcast.Enfeebling, {
legs="Theophany Pantaloons +2",
head="Inyanga Tiara +2",
})
sets.midcast.NaSpell = set_combine(sets.precast.FC, {
ammo="Clarus Stone",
head="Hyksos Khat",
body="Ebers Bliaut +2",
hands="Ebers Mitts +1",
legs="Th. Pantaloons +2",
feet={ name="Vanya Clogs", augments={'"Cure" potency +5%','"Cure" spellcasting time -15%','"Conserve MP"+6',}},
neck="Malison Medallion",
waist="Austerity Belt",
left_ear="Loquac. Earring",
right_ear="Malignance Earring",
left_ring="Ephedra Ring",
right_ring="Menelaus's Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
})
sets.midcast.Erase = set_combine(sets.midcast.NaSpell, {
})
sets.midcast.Esuna = set_combine(sets.midcast.NaSpell, {
})
sets.midcast.Cursna = {
ammo="Clarus Stone",
head="Hyksos Khat",
body="Ebers Bliaut +2",
hands="Theophany Mitts +2",
legs="Th. Pantaloons +2",
feet={ name="Vanya Clogs", augments={'"Cure" potency +5%','"Cure" spellcasting time -15%','"Conserve MP"+6',}},
neck="Malison Medallion",
waist="Austerity Belt",
left_ear="Loquac. Earring",
right_ear="Malignance Earring",
left_ring="Ephedra Ring",
right_ring="Menelaus's Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
sets.midcast.Elemental = {
ammo="Ghastly Tathlum",
head="Bunzi's Hat",
body="Bunzi's Robe",
hands="Bunzi's Gloves",
legs="Nyame Flanchard",
feet="Nyame Sollerets",
neck="Eddy Necklace",
waist="Refoccilation Stone",
left_ear="Friomisi Earring",
right_ear="Malignance Earring",
left_ring="Freke Ring",
right_ring="Stikini Ring",
back="Argocham. Mantle",
}
sets.midcast.Elemental.Weather = set_combine(sets.midcast.Elemental, {
waist="Hachirin-no-Obi"
})
sets.midcast.Helix = {
ammo="Ghastly Tathlum",
head="Bunzi's Hat",
body="Bunzi's Robe",
hands="Bunzi's Gloves",
legs="Nyame Flanchard",
feet="Nyame Sollerets",
neck="Eddy Necklace",
waist="Refoccilation Stone",
left_ear="Friomisi Earring",
right_ear="Malignance Earring",
left_ring="Freke Ring",
right_ring="Stikini Ring",
back="Argocham. Mantle",
}
-- Banish Potency against Undead ~ I think the cap for Banishga II is about +42%
sets.midcast.BanishPotency = set_combine(sets.midcast.Elemental.Weather, {
})
sets.midcast['Impact'] = set_combine(sets.midcast.Elemental, { -- Make sure to leave the head empty --
head=empty,
body="Twilight Cloak",
neck="Erra Pendant",
})
sets.midcast["Benediction"] = { body="Piety Bliaut +3" }
sets.midcast["Protectra V"] = set_combine(sets.midcast.EnhancingDuration, {
})
sets.midcast["Shellra V"] = set_combine(sets.midcast.EnhancingDuration, {
})
sets.midcast["Dispelga"] = set_combine(sets.midcast.EnfeeblingINT, {
main="Daybreak",
})
sets.midcast["Divine Caress"] = {
hands="Ebers Mitts +3",
}
-- Base weaponskill set, use WSD for this since most stuff is single or double hit.
sets.midcast.Weaponskill = {
ammo="Oshasha's Treatise",
head={ name="Piety Cap +3", augments={'Enhances "Devotion" effect',}},
body={ name="Piety Bliaut +3", augments={'Enhances "Benediction" effect',}},
hands={ name="Piety Mitts +3", augments={'Enhances "Martyr" effect',}},
legs={ name="Piety Pantaln. +3", augments={'Enhances "Afflatus Misery" effect',}},
feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
neck="Rep. Plat. Medal",
waist="Fotia Belt",
left_ear="Steelflash Earring",
right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
left_ring="Rajas Ring",
right_ring="Mars's Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
sets.midcast.Weaponskill.MAB = {
ammo="Oshasha's Treatise",
head={ name="Piety Cap +3", augments={'Enhances "Devotion" effect',}},
body={ name="Piety Bliaut +3", augments={'Enhances "Benediction" effect',}},
hands={ name="Piety Mitts +3", augments={'Enhances "Martyr" effect',}},
legs={ name="Piety Pantaln. +3", augments={'Enhances "Afflatus Misery" effect',}},
feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
neck="Eddy Necklace",
waist="Fotia Belt",
left_ear="Friomisi Earring",
right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
left_ring="Freke Ring",
right_ring="Fenrir Ring +1",
back="Argocham. Mantle",
}
-- 7 hits, no crit, fTP carries
sets.midcast["Realmrazer"] = set_combine(sets.midcast.Weaponskill, {
})
-- 6 hits, crit WS, fTP carries
sets.midcast["Hexa Strike"] = set_combine(sets.midcast.Weaponskill, {
})
sets.midcast["Flash Nova"] = set_combine(sets.midcast.Weaponskill.MAB, {
})
sets.midcast["Seraph Strike"] = set_combine(sets.midcast.Weaponskill.MAB, {
})
-- Treasure Hunter set. Don't put anything in here except TH+ gear.
-- It overwrites slots in other sets when TH toggle is on (Ctrl+F10).
sets.midcast.TH = {
head="White Rarab Cap +1",
waist="Chaac Belt",
ammo="Perfect Lucky Egg",
}
sets.aftercast = {}
-- Idle set used when IdleMode is "Refresh"
sets.aftercast.Refresh = {
ammo="Homiliary",
head="Befouled Crown",
body="Ebers Bliaut +2",
hands="Serpentes Cuffs",
legs="Nares Trews",
feet="Serpentes Sabots",
neck="Twilight Torque",
waist="Embla Sash",
left_ear="Ethereal Earring",
right_ear="Suppanomimi",
left_ring="Defending Ring",
right_ring="Woltaris Ring +1",
back="Cheviot Cape",
}
sets.aftercast.Refresh.LowMP = set_combine(sets.aftercast.Refresh, {
waist="Fucho-no-obi",
})
sets.aftercast.Avatar = set_combine(sets.aftercast.Refresh, {
})
-- Used when IdleMode is "DT"
-- As much refresh as I can get while still having capped DT.
sets.aftercast.DT = {
ammo="Homiliary",
head="Befouled Crown",
body="Ebers Bliaut +2",
hands="Bunzi's Gloves",
legs="Ebers Pant. +3",
feet="Nyame Sollerets",
neck="Twilight Torque",
waist="Embla Sash",
left_ear="Merman's Earring",
right_ear="Merman's Earring",
left_ring="Defending Ring",
right_ring="Woltaris Ring +1",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
-- Used when IdleMode is "MEva" and also the main idle set when IdleMode is "Auto"
-- This is my favored idle set with capped DT and tons of magic evasion, but not much refresh.
sets.aftercast.MEva = {
ammo="Homiliary",
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Nyame Sollerets",
neck="Twilight Torque",
waist="Embla Sash",
left_ear="Merman's Earring",
right_ear="Merman's Earring",
left_ring="Inyanga Ring",
right_ring="Woltaris Ring +1",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
-- Used for CureObjective mode. If you plan to use that mode, ensure this set has 500HP less than "midcast.CureObjective".
sets.aftercast.CureObjective = set_combine(sets.aftercast.Refresh, {
})
-- Used when IdleMode is "TP"
sets.aftercast.TP = {
ammo="Oshasha's Treatise",
head={ name="Piety Cap +3", augments={'Enhances "Devotion" effect',}},
body={ name="Piety Bliaut +3", augments={'Enhances "Benediction" effect',}},
hands={ name="Piety Mitts +3", augments={'Enhances "Martyr" effect',}},
legs="Ebers Pant. +3",
feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
neck="Asperity Necklace",
waist="Cetl Belt",
left_ear="Steelflash Earring",
right_ear="Bladeborn Earring",
left_ring="Cacoethic Ring +1",
right_ring="Patricius Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
sets.TP.Engaged = {
ammo="Oshasha's Treatise",
head={ name="Piety Cap +3", augments={'Enhances "Devotion" effect',}},
body={ name="Piety Bliaut +3", augments={'Enhances "Benediction" effect',}},
hands={ name="Piety Mitts +3", augments={'Enhances "Martyr" effect',}},
legs="Ebers Pant. +3",
feet={ name="Piety Duckbills +3", augments={'Enhances "Afflatus Solace" effect',}},
neck="Asperity Necklace",
waist="Cetl Belt",
left_ear="Steelflash Earring",
right_ear="Bladeborn Earring",
left_ring="Cacoethic Ring +1",
right_ring="Patricius Ring",
back={ name="Alaunus's Cape", augments={'MND+20','Accuracy+20 Attack+20','Attack+1','"Cure" potency +10%','Damage taken-1%',}},
}
sets.aftercast.DualWield = set_combine(sets.aftercast.TP, {
ear2="Suppanomimi",
ear1="Brutal Earring",
})
--[[ sets.aftercast.Hybrid = set_combine(sets.aftercast.TP, {
ammo="Staunch Tathlum +1",
head="Nyame Helm",
legs="Nyame Flanchard",
feet="Nyame Sollerets"
})
sets.aftercast.HybridDW = set_combine(sets.aftercast.DT, {})
sets.aftercast.HybridDW.Engaged = set_combine(sets.aftercast.Hybrid, {
ear2="Suppanomimi",
feet={ name="Chironic Slippers", augments={'"Dual Wield"+4','Rng.Acc.+21 Rng.Atk.+21','Quadruple Attack +3','Accuracy+17 Attack+17',}}
})
-- Used when IdleMode is "KC". I try to eliminate double attack here since it's bad with Kraken Club.
sets.aftercast.KC = set_combine(sets.aftercast.TP, {
neck="Combatant's Torque",
ear2="Suppanomimi",
body="Ebers Bliaut +3",
hands="Gazu Bracelets +1",
waist="Goading Belt",
})
]]
-- ===================================================================================================================
-- End of Sets
-- ===================================================================================================================
NaSpells = S{"Blindna","Erase","Paralyna","Poisona","Silena","Stona","Viruna"}
BarElement = S{"Barfira","Barstonra","Barwatera","Baraera","Barblizzara","Barthundra","Barfire","Barstone","Barwater","Baraero","Barblizzard","Barthunder","Barsleepra","Barsilencera","Barpetra","Barblindra","Barparalyzra","Barpoisonra"}
EnhancingSpells = S{"Boost-STR","Boost-DEX","Boost-VIT","Boost-AGI","Boost-INT","Boost-MND","Boost-CHR","Refresh","Aquaveil","Hailstorm","Sandstorm","Rainstorm","Windstorm","Firestorm","Thunderstorm","Voidstorm","Aurorastorm"}
EnfeeblingMND = S{"Paralyze","Bind"}
end
function precast(spell)
--if midaction() then
--cancel_spell()
--return
--end
if spell.type=="Item" then
return
end
-- Spell fast cast
if spell.action_type=="Magic" then
if sets.precast[spell.english] then
equip(sets.precast[spell.english])
elseif spell.skill=="Enhancing Magic" then
equip(sets.precast.FC_Enhancing)
elseif string.find(spell.name,"Cure") or string.find(spell.name,"Curaga") then
equip(sets.precast.FC_Cure)
elseif NaSpells:contains(spell.name) or spell.name=="Cursna" then
equip(sets.precast.FC_Ailment)
else
equip(sets.precast.FC)
end
end
end
function midcast(spell)
if spell.type=="Item" then
return
end
-- Check for a specific set
if sets.midcast[spell.english] then
equip(sets.midcast[spell.english])
if spell.name=="Cursna" and Gambanteinn then
equip({main="Gambanteinn"})
end
-- Specific Spells
elseif string.find(spell.name,"Cure") then
equipSet = sets.midcast.Cure
if CureObjective then
equipSet = sets.midcast.CureObjective
end
if CureDT and equipSet["CureDT"] then
equipSet = equipSet["CureDT"]
end
if (spell.element==world.weather_element or buffactive["Aurorastorm"]) and equipSet["Weather"] then
equipSet = equipSet["Weather"]
end
equip(equipSet)
elseif string.find(spell.name,"Cura") then
equipSet = sets.midcast.Curaga
if CureDT and equipSet["CureDT"] then
equipSet = equipSet["CureDT"]
end
if (spell.element==world.weather_element or buffactive["Aurorastorm"]) and equipSet["Weather"] then
equipSet = equipSet["Weather"]
end
equip(equipSet)
elseif NaSpells:contains(spell.name) then
equip(sets.midcast.NaSpell)
elseif string.find(spell.name,"Regen") then
equip(sets.midcast.Regen)
elseif string.sub(spell.name,1,3)=="Bar" then
if BarElement:contains(spell.name) then
equip(sets.midcast.BarElement)
else
equip(sets.midcast.BarAilment)
end
-- Spells by Type/Skill
elseif spell.skill=="Enfeebling Magic" then
equipSet = sets.midcast.Enfeebling
if EnfeeblingMND:contains(spell.name) then
equipSet = sets.midcast.EnfeeblingMND
elseif spell.type=="BlackMagic" then
equipSet = sets.midcast.EnfeeblingINT
end
if CureDT and equipSet["CureDT"] then
equipSet = equipSet["CureDT"]
end
equip(equipSet)
elseif spell.skill=="Enhancing Magic" then
equipSet = sets.midcast.EnhancingDuration
if EnhancingSpells:contains(spell.name) then
equipSet = sets.midcast.Enhancing
end
if CureDT and equipSet["CureDT"] then
equipSet = equipSet["CureDT"]
end
equip(equipSet)
elseif spell.skill=="Divine Magic" then
if spell.name=="Repose" then
equip(sets.midcast.Divine)
else
if BanishPotency and string.sub(spell.name,1,6)=="Banish" then
equip(sets.midcast.BanishPotency)
else
equipSet = sets.midcast.Elemental
if spell.element == world.weather_element or spell.element == world.day_element and equipSet["Weather"] then
equipSet = equipSet["Weather"]
end
equip(equipSet)
end
end
elseif spell.skill=="Healing Magic" then
equip(sets.midcast.HealingRecast)
elseif spell.type=="WeaponSkill" then
equip(sets.midcast.Weaponskill)
elseif spell.type=="BloodPactWard" or spell.type=="BloodPactRage" then
equip(sets.precast.BP)
else
idle()
end
-- Treasure Hunter
if TreasureHunter and THSpells:contains(spell.name) then
equip(sets.midcast.TH)
end
-- Auto-cancel existing buffs
if spell.name=="Stoneskin" and buffactive["Stoneskin"] then
windower.send_command('cancel 37;')
elseif spell.name=="Sneak" and buffactive["Sneak"] and spell.target.type=="SELF" then
windower.send_command('cancel 71;')
elseif spell.name=="Utsusemi: Ichi" and buffactive["Copy Image"] then
windower.send_command('wait 1;cancel 66;')
end
end
function aftercast(spell)
if spell.type=="Item" then
return
end
idle()
end
--[[function aftercast(spell)
if player.status == 'Engaged' then
equip(sets.TP)
else
equip(sets.aftercast)
end
if spell.action_type == 'Weaponskill' then
add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
end
end]]
function status_change(new,old)
idle()
end
function buff_change(name,gain)
-- Auto-wakeup
if name=="sleep" and gain then
if not buffactive["Sublimation: Activated"] then
equip(sets.WakeUp)
end
if buffactive["Stoneskin"] then
windower.send_command('cancel 37;')
end
end
end
function self_command(command)
is_valid = command:lower()=="idle"
if IdleModeCommands:contains(command) then
IdleMode = command
is_valid = true
send_command('console_echo "Idle Mode: '..IdleMode..'"')
elseif command:lower()=="cycleidle" then
if IdleMode=="Auto" then
IdleMode = "DT"
elseif IdleMode=="DT" then
IdleMode = "Refresh"
elseif IdleMode=="Refresh" then
IdleMode = "MEva"
elseif IdleMode=="MEva" then
IdleMode = "TP"
elseif IdleMode== "TP" then
IdleMode = "DualWield"
else
IdleMode = "Auto"
end
is_valid = true
send_command('console_echo "Idle Mode: '..IdleMode..'"')
elseif command:lower()=="weaponlock" then
if WeaponLock then
enable("main","sub","range")
IdleMode = "Auto"
WeaponLock = false
else
disable("main","sub","range")
IdleMode = "Hybrid"
WeaponLock = true
end
is_valid = true
send_command('console_echo "Idle Mode: '..IdleMode..'"')
send_command('console_echo "Weapon Lock: '..tostring(WeaponLock)..'"')
elseif command:lower()=="accmode" then
AccMode = AccMode==false
send_command('console_echo "Acc Mode: '..tostring(AccMode)..'"')
is_valid = true
elseif command:lower()=="banishpot" then
BanishPotency = BanishPotency==false
send_command('console_echo "Banish Potency Mode: '..tostring(BanishPotency)..'"')
is_valid = true
elseif command:lower()=="gamb" then
Gambanteinn = Gambanteinn==false
send_command('console_echo "Gambanteinn Cursna Mode: '..tostring(Gambanteinn)..'"')
is_valid = true
elseif command:lower()=="th" then
TreasureHunter = TreasureHunter==false
is_valid = true
send_command('console_echo "Treasure Hunter Mode: '..tostring(TreasureHunter)..'"')
elseif command:lower()=="cureobjective" then
CureObjective = CureObjective==false
send_command('console_echo "Cure Objective Mode: '..tostring(CureObjective)..'"')
is_valid = true
elseif command:lower()=="curedt" then
CureDT = CureDT==false
send_command('console_echo "Cure DT Mode: '..tostring(CureDT)..'"')
is_valid = true
end
if is_valid then
if (not midaction() and not pet_midaction()) or command:lower()=="idle" then
idle()
end
else
sanitized = command:gsub("\"", "")
send_command('console_echo "Invalid self_command: '..sanitized..'"')
end
end
function idle()
if IdleMode=='Auto' then
if player.mpp < 50 then
equip(sets.aftercast.Refresh.LowMP)
elseif player.mpp < 70 then
equip(sets.aftercast.DT)
else
equip(sets.aftercast.MEva)
end
else
equipSet = sets.aftercast
if equipSet[IdleMode] then
equipSet = equipSet[IdleMode]
end
if equipSet[player.status] then
equipSet = equipSet[player.status]
end
if player.mpp < 50 and equipSet["LowMP"] then
equipSet = equipSet["LowMP"]
end
equip(equipSet)
end
if (buffactive["Sneak"] or buffactive["Invisible"] or buffactive["Bolter's Roll"]) and IdleMode~='DT' then
equip(sets.Movement)
end
-- Balrahn's Ring
--if Salvage:contains(world.area) then
-- equip({ring2="Balrahn's Ring"})
--end
-- Maquette Ring
--if world.area=='Maquette Abdhaljs-Legion' and not IdleMode=='DT' then
-- equip({ring2="Maquette Ring"})
--end
-- CureObjective Mode takes precedence over everything else
if CureObjective then
equip(sets.aftercast.CureObjective)
end
-- Wake up if slept
--[[ if buffactive["Sleep"] then
if not buffactive["Sublimation: Activated"] then
equip(sets.WakeUp)
end
end ]]
end
Phoenix.Evolved
Serveur: Phoenix
Game: FFXI
Posts: 67
By Phoenix.Evolved 2023-07-09 07:29:42
Gah! I cannot figure out the logic for this one.
I had a normal status_change function working fine. But I wanted to add some functionality to check if I was in Ambuscade, Odyssey, Sortie, or Dynamis Divergence, it would equip my hybrid DT set when engaging a mob, and if I was in any other area in the game, it would equip my glass cannon TP set (melee.normal).
For some reason, the following code ALWAYS executes (when in buburimu peninsula or Valkurm Dunes for testing) engaging my melee hybrid DT set. No matter if I put it first in the function or second. Also, when disengaging, going back to my idle set works fine. Can you guys see anything I'm missing in the logic flow?
(When in Buburimu or Valkurm it should equip my sets.melee.normal)
Code function status_change(new,old)
if (new == 'Engaged') and not (world.area == "Outer Ra'Kaznar [U2]" or world.area == "Outer Ra'Kaznar [U3]" or world.area:find("Abdhaljs") or world.area:find("[D]") or world.area:find("[P2]")) then
equip(sets.melee.normal)
add_to_chat(158,' >>>>> ('..world.area..') Status Change Engaged Melee Set <<<<< ')
lockon()
elseif new == 'Engaged' and (world.area == "Outer Ra'Kaznar [U2]" or world.area == "Outer Ra'Kaznar [U3]" or world.area:find("Abdhaljs") or world.area:find("[D]") or world.area:find("[P2]")) then
equip(sets.melee.hybridDT)
add_to_chat(158,' >>>>> ('..world.area..') Status Change Engaged Hybrid DT Set <<<<< ')
lockon()
else
equip(sets.idle.normal)
add_to_chat(158,' >>>>> Idle Set <<<<< ')
end
end
Phoenix.Evolved
Serveur: Phoenix
Game: FFXI
Posts: 67
By Phoenix.Evolved 2023-07-09 07:56:33
How interesting.
the problem is with:
Maybe I'll have to add all 4 divergence zones in? The name of the zone is just "Dynamis - Jeuno [D]"
Phoenix.Evolved
Serveur: Phoenix
Game: FFXI
Posts: 67
By Phoenix.Evolved 2023-07-09 08:07:46
Sorry for the spam, got it working.
I put in all 4 dynamis divergence zones, and changed things up a little. If there is a way I can change the code to make it more efficient and easier to read, I'm all ears, however once again, this is working now.
Code function status_change(new,old)
if new ~= 'Engaged' then
equip(sets.idle.normal)
add_to_chat(158,' >>>>> Idle Set <<<<< ')
elseif new == 'Engaged' and (world.area == "Outer Ra'Kaznar [U2]" or
world.area == "Outer Ra'Kaznar [U3]" or
world.area == "Dynamis - Bastok [D]" or
world.area == "Dynamis - Windurst [D]" or
world.area == "Dynamis - San D'Oria [D]" or
world.area == "Dynamis - Jeuno [D]" or
world.area:find("Abdhaljs") or
world.area:find("[P2]")) then
equip(sets.melee.hybridDT)
add_to_chat(158,' >>>>> ('..world.area..') DT Set <<<<< ')
lockon()
elseif new == 'Engaged' then
equip(sets.melee.normal)
add_to_chat(158,' >>>>> ('..world.area..') Melee Set <<<<< ')
lockon()
end
end
I don't however quite understand why it was qualifying the: "or world.area:find("[D]"" in Buburimu Peninsula because there are none of the letter D in that zone. Did it have something to do with the bracket(s)?
Bismarck.Radec
Serveur: Bismarck
Game: FFXI
Posts: 142
By Bismarck.Radec 2023-07-09 10:10:00
my_string:find("[asdf]") will return a value if any character in my_string is in "asdf"
Valkurm Dunes > matches world.area:find("[D]")
Buburimu Peninsula > matches P or 2 from world.area:find("[P2]")
This is a wonderful case for :contains, though
Code
Hybrid_set_zones = T{"Walk of Echoes [P2]","Outer Ra'Kaznar [U3]","Dynamis - Bastok [D]",...}
<complete this with full names of all hybrid zones>
...
function status_change(new,old)
if new ~= 'Engaged' then
equip(sets.idle.normal)
add_to_chat(158,' >>>>> Idle Set <<<<< ')
elseif new == 'Engaged' and Hybrid_set_zones:contains(world.area) then
equip(sets.melee.hybridDT)
add_to_chat(158,' >>>>> ('..world.area..') DT Set <<<<< ')
lockon()
elseif new == 'Engaged' then
equip(sets.melee.normal)
add_to_chat(158,' >>>>> ('..world.area..') Melee Set <<<<< ')
lockon()
end
end
Phoenix.Evolved
Serveur: Phoenix
Game: FFXI
Posts: 67
By Phoenix.Evolved 2023-07-09 11:20:18
Love it! Learned something new. Took the info from Drakefs before, and now going to add that.
What is that called, in lines 1 and 2? The lua programming term?
Edit:
I think I understand.
It's a table created with the variable Hybrid_set_zones. So you check the variable in the table against what world.area you are in, and boom. Very nice.
Serveur: Asura
Game: FFXI
Posts: 3
By Asura.Shakyamuni 2023-08-03 04:48:46
Did something happen to the bar at the bottom of the screen that tells you what modes your in? like Offensive, Defensive and etc?
By drakefs 2023-08-03 10:01:56
That is lua specific custom function that is not apart of GS by default.
Quetzalcoatl.Balthor
Serveur: Quetzalcoatl
Game: FFXI
Posts: 19
By Quetzalcoatl.Balthor 2023-08-06 20:43:37
I recently inherited a friend's characters because he's taking a break, probably for good. I was wondering if there's a way to separate different GSs so that when I use several characters on same computer, I wouldn't have to tell GS to load a certain character's file. Say, I am running a character named Twister as well as a character named Shnookums. They both have RDM. When I job change Twister to RDM, GS automatically loads Shnookums's RDM file.
With old Spellcast, you could save files into Folders with the character's names and it would load the character's SC file. Can you do the same in GS?
Shiva.Mewtwo
Serveur: Shiva
Game: FFXI
Posts: 52
By Shiva.Mewtwo 2023-08-07 06:01:38
Yes you can do the same. I have multiple different folders with different character names and then inside each those folders just the job name.
Which is a lot easier and more organised for me than doing it like Kuroki mentioned.
[+]
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.
|
|