DRK Modes

言語: JP EN DE FR
2010-06-21
New Items
users online
フォーラム » Windower » Support » DRK Modes
DRK Modes
Offline
Posts: 281
By Galkapryme 2019-05-23 09:21:46  
I'm not good at coding or writing lua files, and generally, just modify existing ones. That said, I am surprised that for all the DRK lua files I've seen, none of them offers a mode for Double Attack. I have a high Acc/High Attack as my primary but wanted to try a Double Attack set that I could easily switch to using an F-key. I think I've used the same DRK template that most have, so any help would be appreciated. I assume I create a "sets.engaged.DA" but I am not sure how to create a toggle to it.
Offline
Posts: 215
By zigzagzig 2019-05-23 10:06:57  
state.OffenseMode:options('DA')

sets.engaged.DA = { your set }
Offline
Posts: 37
By elliondrk 2019-05-23 12:19:22  
That's a start as it needs to be defined, but I think he's looking for a way to toggle through modes.

I have it set up in mine, but I'm at work, so I don't have access to my lua at the moment. I can send the toggle code to you when I get home if no one beats me to it. I can't remember what it is off the top of my head.

Edit: Nevermind, found it.
send_command('bind FKeyHere gs c cycle OffenseMode')

Just replace FKeyHere with your desired F-Key (format is f1, f2, etc...). That *should* do it.

Pulled from here:
https://www.reddit.com/r/ffxi/comments/7ttx3g/gearswap_bindingsstates_question/
 Asura.Chaostaru
Offline
サーバ: Asura
Game: FFXI
Posts: 695
By Asura.Chaostaru 2019-05-23 12:25:09  
If he just adds 'DA' to existing Offense modes Example:
Code
state.OffenseMode:options('Normal', 'HighAcc', 'DamageTaken', 'DA')

then creates a
Code
sets.engaged.DA = {
all
your
gear
} 

where all his other engaged sets are, he'll be able to cycle to it with F9 assuming he's using a mote 2 lua.
[+]
Offline
Posts: 3311
By Taint 2019-05-23 15:54:28  
Asura.Chaostaru said: »
If he just adds 'DA' to existing Offense modes Example:
Code
state.OffenseMode:options('Normal', 'HighAcc', 'DamageTaken', 'DA')

then creates a
Code
sets.engaged.DA = {
all
your
gear
} 

where all his other engaged sets are, he'll be able to cycle to it with F9 assuming he's using a mote 2 lua.


That’s how i set mine up.

Special sets Da/TA/stp depending on the job are always after normal. Then ACC sets.
Offline
Posts: 281
By Galkapryme 2019-05-31 17:54:58  
So real quick, what is a "mote 2 lua?" Also, for the send_command one, would I need to type "//gs send_command Fkey"? I never understood how it worked because the language is coding language vice non-technical language (funny, `cause I'm an IT professional with 0 background in coding or programming).
Offline
Posts: 281
By Galkapryme 2019-06-01 07:42:54  
To simplify things, it's easiest to talk in terms of "Type this, then type that" vice trying to explain what lines should appear in a lua file. That information is important too, but knowing that lines need to be there is different than knowing how to execute them, and from within the game, that's what I am primarily looking to do (for those that are not automated).
 Asura.Chaostaru
Offline
サーバ: Asura
Game: FFXI
Posts: 695
By Asura.Chaostaru 2019-06-01 14:50:21  
Galkapryme said: »
So real quick, what is a "mote 2 lua?" Also, for the send_command one, would I need to type "//gs send_command Fkey"? I never understood how it worked because the language is coding language vice non-technical language (funny, `cause I'm an IT professional with 0 background in coding or programming).

most luas run off Motes lua in the Libs section of gearswap. high chance any gearswap lua you use will be using Mote2. easiest way to check is at the top of most gearswap lua's, you'll see this.
Code
function get_sets()
    mote_include_version = 2

    -- Load and initialize the include file.
    include('Mote-Include.lua')
end


send commands in gearswap luas should be formatted in this way for ex:
Code
send_command('bind !w input /equip ring2 "Warp Ring"; /echo Warping; wait 11; input /item "Warp Ring" <me>;')

then in game all you would need to press is the bound key, for that code it would be Alt + W. can change !w to f8 f9 w.e you want then just press that ingame. no need to type out a command.
or another example:
Code
send_command('bind f10 gs c cycle HybridMode')

where f10 when pressed will cycle hybrid sets your have in your lua.
Offline
Posts: 281
By Galkapryme 2019-06-16 23:05:30  
Thank you VERY much for breaking that down for me in the simplest of terms. I think I have a much better understanding of what I'm seeing in the lua files and how they work in game. Will try tonight.

Asura.Chaostaru said: »
Galkapryme said: »
So real quick, what is a "mote 2 lua?" Also, for the send_command one, would I need to type "//gs send_command Fkey"? I never understood how it worked because the language is coding language vice non-technical language (funny, `cause I'm an IT professional with 0 background in coding or programming).

most luas run off Motes lua in the Libs section of gearswap. high chance any gearswap lua you use will be using Mote2. easiest way to check is at the top of most gearswap lua's, you'll see this.
Code
function get_sets()
    mote_include_version = 2

    -- Load and initialize the include file.
    include('Mote-Include.lua')
end


send commands in gearswap luas should be formatted in this way for ex:
Code
send_command('bind !w input /equip ring2 "Warp Ring"; /echo Warping; wait 11; input /item "Warp Ring" <me>;')

then in game all you would need to press is the bound key, for that code it would be Alt + W. can change !w to f8 f9 w.e you want then just press that ingame. no need to type out a command.
or another example:
Code
send_command('bind f10 gs c cycle HybridMode')

where f10 when pressed will cycle hybrid sets your have in your lua.
[+]
Offline
Posts: 281
By Galkapryme 2019-06-18 06:47:07  
Strike that, I don't got it JUST yet. However, I may be able to figure it out.
Offline
Posts: 281
By Galkapryme 2019-07-02 07:16:32  
OK, I'm gonna try this: I'm going to post the FULL DRK .lua file, and then I'm going to post the part of the script that I am trying desperately to understand. I think I kinda get it, but I am still somewhat confused. So here goes...FULL .lua file (some items ignored because I don't have the gear in question...built off someone else's):

--[[
=== Features ===
If you want auto Reive detection for Ygnas Resolve+1, and Gavialis Helm for some of your WS, then you will need my User-Globals.lua
Otherwise, you might be able to get away without it. (not tested)

If you don't use organizer, then remove the include('organizer-lib') in get_sets() and remove sets.Organizer

This lua has a few MODES you can toggle with hotkeys or macros, and there's a few situational RULES that activate without hotkeys

::MODES::

SouleaterMode
Status: OFF by default.
Hotkey: Toggle this with @F9 (window key + F9).
Macro: /console gs c togggle SouleaterMode

Notes: This mode makes it possible to use Souleater in situations where you would normally avoid using it. When SouleaterMode
is ON, Souleater will be canceled automatically after the first Weaponskill used. CAVEAT -. If Bloodweapon
is active, or if Drain's HP Boost buff is active, then Souleater will remain active until the next WS used after
either buff wears off.

CapacityMode
Status: OFF by default.
Hotkey: with ALT + =
Macro: /console cs c toggle CapacityMode

Notes: It will full-time whichever piece of gear you specify in sets.CapacityMantle

Extra Info: You can change the default (true|false) status of any MODE by changing their values in job_setup()

::RULES::

Gavialis helm
Status: enabled
Setting: set use_gavialis = true below in job_setup.

Notes: Gavialis Helm will automatically be used for all weaponskills on their respective days of the week. If you would like to
exclude a weapon skill, you must add it to wsList below. (found in job_setup) You also need my User-Globals.lua for this
to even work.

Ygna's Resolve +1
Status: enabled in Reive
Setting: n/a

Notes: Will automatically be used when you're in a reive. If you have my User-Globals.lua this will work
with all your jobs that use mote's includes. Not just this one!

Moonshade earring
Status: Not used for WS's at 3000 TP.
Setting: n/a

You can hit F12 to display custom MODE status as well as the default stuff.

Single handed weapons are handled in the sets.engaged.SW set. (sword + shield, etc.)

::NOTES::

My sets have a specific order, or they will not function correctly.
sets.engaged.[CombatForm][CombatWeapon][Offense or HybridMode][CustomMeleeGroups or CustomClass]

CombatForm = Haste, DW, SW
CombatWeapon = GreatSword, Scythe, Apocalypse, Ragnarok, Caladbolg, Liberator, Anguta
OffenseMode = Mid, Acc
HybridMode = PDT
CustomMeleeGroups = AM3, AM, Haste
CustomClass = OhShit

CombatForm Haste is used when Last Resort + Hasso AND either Haste, March, Indi-Haste Geo-Haste is on you.

CombatForm DW will activate with /dnc or /nin AND a weapon listed in drk_sub_weapons equipped offhand.
SW is active with an empty sub-slot, or a shield listed in the shields = S{} list.

CombatWeapon GreatSword will activate when you equip a GS listed in gsList in job_setup().
CombatWeapon Scythe will activate when you equip a Scythe listed in scytheList in job_setup().
Weapons that do not fall into these groups, or have sets by weapon name, will use default sets.engaged

most gear sets derrive themselves from sets.engaged, so try to keep it updated. It's much smarter to derrive sets than to
completely re-invent each gear set for every weapon. Let your gear inherit. Less code written means less errors.

CustomMeleeGroups AM3 will activate when Aftermath lvl 3 is up, and CustomMeleeGroups AM will activate when relic Aftermath is up.
There are no empy AM sets for now.

--]]
--
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('organizer-lib')
end


-- Setup vars that are user-independent.
function job_setup()
state.CapacityMode = M(false, 'Capacity Point Mantle')

include('Mote-TreasureHunter')
state.TreasureMode:set('Tag')

state.Buff.Souleater = buffactive.souleater or false
state.Buff['Last Resort'] = buffactive['Last Resort'] or false
-- Set the default to false if you'd rather SE always stay acitve
state.SouleaterMode = M(false, 'Soul Eater Mode')
-- state.LastResortMode = M(false, 'Last Resort Mode')
-- Use Gavialis helm?
use_gavialis = true
-- Weaponskills you do NOT want Gavialis helm used with (only considered if use_gavialis = true)
wsList = S{'Spiral Hell', 'Catastrophe', 'Torcleaver', 'Insurgency', 'Quietus', 'Cross Reaper'}
-- Greatswords you use.
gsList = S{'Malfeasance', 'Macbain', 'Kaquljaan', 'Mekosuchus Blade', 'Ragnarok', 'Raetic Algol', 'Raetic Algol +1', 'Caladbolg', 'Montante +1', 'Albion', 'Eletta Claymore' }
scytheList = S{'Raetic Scythe', 'Deathbane', 'Twilight Scythe', 'Apocalypse' }
shields = S{'Rinda Shield'}
-- Mote has capitalization errors in the default Absorb mappings, so we use our own
absorbs = S{'Absorb-STR', 'Absorb-DEX', 'Absorb-VIT', 'Absorb-AGI', 'Absorb-INT', 'Absorb-MND', 'Absorb-CHR', 'Absorb-Attri', 'Absorb-ACC', 'Absorb-TP'}
-- Offhand weapons used to activate DW mode
swordList = S{"Sangarius", "Sangarius +1", "Usonmunku", "Perun +1", "Tanmogayi"}

get_combat_form()
get_combat_weapon()
update_melee_groups()
end


-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
state.OffenseMode:options('Normal', 'Mid', 'Acc')
state.HybridMode:options('Normal', 'PDT')
state.WeaponskillMode:options('Normal', 'Mid', 'Acc')
state.CastingMode:options('Normal', 'Acc')
state.IdleMode:options('Normal')
state.RestingMode:options('Normal')
state.PhysicalDefenseMode:options('PDT', 'Reraise')
state.MagicalDefenseMode:options('MDT')

war_sj = player.sub_job == 'WAR' or false

-- Additional local binds
send_command('bind ^= gs c cycle treasuremode')
send_command('bind != gs c toggle CapacityMode')
send_command('bind @f9 gs c toggle SouleaterMode')
send_command('bind !- gs equip sets.crafting')
--send_command('bind ^` gs c toggle LastResortMode')

select_default_macro_book()
end

-- Called when this job file is unloaded (eg: job change)
function file_unload()
send_command('unbind ^`')
send_command('unbind !=')
send_command('unbind ^[')
send_command('unbind ![')
send_command('unbind @f9')
end


-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Augmented gear
Niht = {name="Niht Mantle", augments={'Attack+10','Dark magic skill +8','"Drain" and "Aspir" potency +25'}}


Ankou = {}
Ankou.FC = { name="Ankou's Mantle", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+9','"Fast Cast"+10','Spell interruption rate down-4%',}}
Ankou.STP = { name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Store TP"+10','Damage taken-5%',}}
Ankou.DA = { name="Ankou's Mantle", augments={'STR+20','Accuracy+6 Attack+6','"Double Attack" +10%',}}
Ankou.WSD = { name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Damage taken-5%',}}
Ankou.VIT = { name="Ankou's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%',}}
Ankou.INT = { name="Ankou's Mantle", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+9','"Fast Cast"+10','Spell interruption rate down-4%',}}

sets.TreasureHunter = { waist="Chaac Belt" }




sets.Organizer = {}

-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Diabolic Eye'] = {hands="Fallen's Finger Gauntlets +3"}
sets.precast.JA['Nether Void'] = {legs="Heathen's Flanchard +1"}
sets.precast.JA['Dark Seal'] = {head="Fallen's burgeonet +3"}
sets.precast.JA['Souleater'] = {head="Ignominy burgeonet +3"}
sets.precast.JA['Weapon Bash'] = {hands="Ignominy Gauntlets +2",left_ring="Slayer's Ring"}
sets.precast.JA['Blood Weapon'] = {body="Fallen's Cuirass +3"}
sets.precast.JA['Last Resort'] = {feet="Fallen's Sollerets +3"}

sets.CapacityMantle = { back="Mecistopins Mantle" }
sets.WSDayBonus = { head="Gavialis Helm" }
sets.WSBack = Ankou.WSD

-- Earring considerations, given Lugra's day/night stats
sets.BrutalLugra = { ear1="Brutal Earring", ear2="Lugra Earring" }
sets.IshvaraLugra = { ear1="Ishvara Earring", ear2="Lugra Earring" }
sets.Lugra = { ear1="Lugra Earring" }
sets.Brutal = { ear1="Brutal Earring" }
sets.Ishvara = { ear1="Ishvara Earring" }

-- Waltz set (chr and vit)


-- sets.precast.Waltz = {}

-- Fast cast sets for spells
sets.precast.FC = {
ammo="Strobilus",
head={ name="Carmine Mask", augments={'Accuracy+10','DEX+10','MND+15',}},
body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
legs="Arjuna Breeches",
feet={ name="Odyssean Greaves", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','AGI+7','"Mag.Atk.Bns."+3',}},
neck="Sanctity Necklace",
waist="Austerity Belt +1",
left_ear="Friomisi Earring",
right_ear="Loquacious Earring",
left_ring="Prolix Ring",
right_ring="Lebeche Ring",
back=Ankou.FC,
}

sets.precast.FC['Elemental Magic'] = sets.precast.FC
sets.precast.FC['Enfeebling Magic'] = set_combine(sets.precast.FC, {neck="Erra Pendant"})
sets.precast.FC['Dark Magic'] = set_combine(sets.precast.FC, {head={ name="Fall. Burgeonet +3", augments={'Enhances "Dark Seal" effect',}}})

sets.precast.FC.Cure = set_combine(sets.precast.FC, { body="Jumalik Mail", hands="Buremte Gloves"})

-- Midcast Sets
sets.midcast.FastRecast = sets.precast.FC


-- Specific spells
sets.midcast.Utsusemi = {
ammo="Impatiens",
--head="Otomi Helm",
neck="Incanter's Torque",
body="Founder's Breastplate",
hands="Leyline Gloves",
back="Grounded Mantle +1",

}

sets.midcast['Dark Magic'] = {
ammo="Strobilus",
head="Ignominy Bugonet +3",
body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
hands={ name="Fall. Fin. Gaunt. +3", augments={'Enhances "Diabolic Eye" effect',}},
legs={ name="Fall. Flanchard +3", augments={'Enhances "Muted Soul" effect',}},
feet="Ratri Sollerets",
neck="Erra Pendant",
waist="Austerity Belt +1",
left_ear="Friomisi Earring",
right_ear="Crematio Earring",
left_ring="Fenrir Ring +1",
right_ring="Fenrir Ring +1",
back=Ankou.INT,
}
sets.midcast.Endark = sets.midcast['Dark Magic']


sets.midcast['Dark Magic'].Acc = set_combine(sets.midcast['Dark Magic'], {
head="Flamma Zucchetto +2", -- 44 macc
hands="Leyline Gloves"
})

sets.midcast['Enfeebling Magic'] = set_combine(sets.midcast['Dark Magic'], {
ammo="Strobilus",
head={ name="Fall. Burgeonet +3", augments={'Enhances "Dark Seal" effect',}},
neck="Erra Pendant", -- Dark Magic Skill 10 + 17 macc
body="Ignominy Cuirass +2",
hands="Flamma Manopolas +2",
ring1="Stikini Ring +1", -- 11 macc
ring2="Kishar Ring",
waist="Austerity Belt +1",
legs="Fallen's Flanchard +3", -- Dark Magic Skill 18 + 39macc
back=Ankou.INT,
feet="Flamma Gambieras +2"
})

sets.midcast['Elemental Magic'] = {
ammo="Strobilus",
head={ name="Odyssean Helm", augments={'Mag. Acc.+24','Magic dmg. taken -2%','MND+2','"Mag.Atk.Bns."+6',}},
neck="Eddy Necklace", -- macc 5, 11 matk
ear1="Friomisi Earring", -- 10 matk
right_ear="Crematio Earring", -- matk 6, mdmg +6
body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}}, -- macc 40, matk 60
hands={ name="Fall. Fin. Gaunt. +3", augments={'Enhances "Diabolic Eye" effect',}}, -- macc 38, matk 62
ring1="Fenrir Ring +1", -- macc/matk 3, mdmg 5
ring2="Fenrir Ring +1", -- macc/matk 3, mdmg 5
waist="Austerity Belt +1", -- macc/matk 7
legs="Eschite Cuisses", -- matk 25
back=Ankou.INT, -- macc 29, mdmg 20
feet="Heathen's Sollerets +1" -- macc/matk 20, Occult Acumen 30
}

-- Mix of HP boost, -Spell interruption%, and Dark Skill
sets.midcast['Dread Spikes'] = set_combine(sets.midcast['Dark Magic'], {
ammo="Strobilus",
head="Ignominy Burgonet +3", -- 17
left_ear="Friomisi Earring",
right_ear="Crematio Earring",
body="Heathen's Cuirass +1",
hands="Fallen's Finger Gauntlets +3",
back=Ankou.INT,
})
sets.midcast['Dread Spikes'].Acc = set_combine(sets.midcast['Dark Magic'], {
body="Heathen's Cuirass +1",
hands="Fallen's Finger Gauntlets +3"
})

-- Drain spells
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {
body="Lugra Cloak +1",
back=Niht
})
sets.midcast.Aspir = sets.midcast.Drain

sets.midcast.Drain.Acc = set_combine(sets.midcast.Drain, {
hands="Leyline Gloves",
waist="Eschan Stone", -- macc/matk 7
})
sets.midcast.Aspir.Acc = sets.midcast.Drain.Acc

sets.midcast.Drain.OhShit = set_combine(sets.midcast.Drain, {
legs="Carmine Cuisses +1",
feet="Ratri Sollerets"
})

-- Absorbs
sets.midcast.Absorb = set_combine(sets.midcast['Dark Magic'], {
head="Ignominy Burgonet +3", -- Absorb duration 20
feet="Ratri Sollerets",
back=Ankou.INT,
})

sets.midcast['Absorb-TP'] = set_combine(sets.midcast.Absorb, {
hands="Heathen's Gauntlets +1",
ring2="Kishar Ring",
})

sets.midcast['Absorb-TP'].Acc = set_combine(sets.midcast.Absorb.Acc, {
hands="Heathen's Gauntlets +1",
ring2="Kishar Ring",
})
sets.midcast.Absorb.Acc = set_combine(sets.midcast['Dark Magic'].Acc, {
head="Flamma Zucchetto +2", -- 44 macc
back=Ankou.INT,
hands="Flamma Manopolas +2",
ring2="Kishar Ring",
})

-- Ranged for xbow
sets.precast.RA = {
--head="Otomi Helm",
--feet="Ejekamal Boots",
hands="Carmine Finger Gauntlets +1"
}
sets.midcast.RA = {
ear2="Tripudio Earring",
ring1="Cacoethic Ring +1",
waist="Chaac Belt",
}

-- WEAPONSKILL SETS
-- General sets
sets.precast.WS = {
ammo="Knobkierrie",
head={ name="Fall. Burgeonet +3", augments={'Enhances "Dark Seal" effect',}},
body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
hands={ name="Valorous Mitts", augments={'Accuracy+20 Attack+20','Weapon skill damage +3%','Attack+8',}},
legs={ name="Fall. Flanchard +3", augments={'Enhances "Muted Soul" effect',}},
feet="Sulev. Leggings +2",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Steelflash Earring",
right_ear="Ishvara Earring",
left_ring="Chirich Ring",
right_ring="Ifrit Ring +1",
back=Ankou.WSD,
}


-- RESOLUTION
-- 86-100% STR
sets.precast.WS.Resolution = sets.precast.WS
sets.precast.WS.Resolution.Acc = sets.precast.WS

-- TORCLEAVER
-- VIT 80%
sets.precast.WS.Torcleaver = set_combine(sets.precast.WS, {
head="Sulevia's Mask +2",
body="Ignominy Cuirass +2",
neck="Fotia Gorget",
waist="Fotia Belt",
back=Ankou.WSD,
legs="Fallen's Flanchard +3",
})
sets.precast.WS.Torcleaver.Mid = set_combine(sets.precast.WS.Mid, {
neck="Abyssal Bead Necklace +1",
})
sets.precast.WS.Torcleaver.Acc = sets.precast.WS.Torcleaver.Mid

-- INSURGENCY
-- 20% STR / 20% INT
-- Base set only used at 3000TP to put AM3 up
sets.precast.WS.Insurgency = sets.precast.WS


sets.precast.WS.Catastrophe = sets.precast.WS



-- CROSS REAPER
-- 60% STR / 60% MND
sets.precast.WS['Cross Reaper'] = set_combine(sets.precast.WS, {
body="Ignominy Cuirass +2",
})

-- ENTROPY
-- 86-100% INT
sets.precast.WS['Entropy'] = {
ammo="Knobkierrie",
head={ name="Odyssean Helm", augments={'Mag. Acc.+24','Magic dmg. taken -2%','MND+2','"Mag.Atk.Bns."+6',}},
body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
hands={ name="Fall. Fin. Gaunt. +3", augments={'Enhances "Diabolic Eye" effect',}},
legs={ name="Fall. Flanchard +3", augments={'Enhances "Muted Soul" effect',}},
feet="Sulev. Leggings +2",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Friomisi Earring",
right_ear="Ishvara Earring",
left_ring="Fenrir Ring +1",
right_ring="Stikini Ring +1",
back=Ankou.WSD,
}


-- Quietus
-- 60% STR / MND
sets.precast.WS.Quietus = sets.precast.WS

-- SPIRAL HELL
-- 50% STR / 50% INT
sets.precast.WS['Spiral Hell'] = sets.precast.WS

-- SHADOW OF DEATH
-- 40% STR 40% INT - Darkness Elemental
sets.precast.WS['Shadow of Death'] = set_combine(sets.precast.WS['Entropy'], {
head="Pixie Hairpin +1",
neck="Eddy Necklace",
})


-- DARK HARVEST
-- 40% STR 40% INT - Darkness Elemental
sets.precast.WS['Dark Harvest'] = sets.precast.WS['Shadow of Death']
sets.precast.WS['Dark Harvest'].Mid = set_combine(sets.precast.WS['Shadow of Death'], {head="Terminal Helm", feet="Heathen's Sollerets +1"})
sets.precast.WS['Dark Harvest'].Acc = set_combine(sets.precast.WS['Shadow of Death'], {head="Terminal Helm", feet="Heathen's Sollerets +1"})

-- Sword WS's
-- SANGUINE BLADE
-- 50% MND / 50% STR Darkness Elemental
sets.precast.WS['Sanguine Blade'] = set_combine(sets.precast.WS, {
head="Pixie Hairpin +1",
neck="Eddy Necklace",
ear1="Friomisi Earring",
body="Fallen's Cuirass +3",
hands="Founder's Gauntlets",
back=Ankou.WSD,
feet="Heathen's Sollerets +1"
})
sets.precast.WS['Sanguine Blade'].Mid = set_combine(sets.precast.WS['Sanguine Blade'], sets.precast.WS.Mid)
sets.precast.WS['Sanguine Blade'].Acc = set_combine(sets.precast.WS['Sanguine Blade'], sets.precast.WS.Acc)

-- REQUISCAT
-- 73% MND - breath damage
sets.precast.WS.Requiescat = set_combine(sets.precast.WS, {
head="Flamma Zucchetto +2",
neck="Abyssal Bead Necklace +1",
body="Ignominy Cuirass +3",
hands="Odyssean Gauntlets",
waist="Soil Belt",
})
sets.precast.WS.Requiescat.Mid = set_combine(sets.precast.WS.Requiscat, sets.precast.WS.Mid)
sets.precast.WS.Requiescat.Acc = set_combine(sets.precast.WS.Requiscat, sets.precast.WS.Acc)

-- Idle sets
sets.idle.Town = {
neck="Wiglen Gorget",
body="Councilor's Garb",
hands="Sulevia's Gauntlets +2",
ring1="Niqmaddu Ring",
ring2="Defending Ring",
back=Ankou.STP,
waist="Flume Belt +1",
legs="Carmine Cuisses",
feet="Sulevia's Leggings +2"
}

sets.idle.Field = {
head="Sulevia's Mask +2",
body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
hands={ name="Fall. Fin. Gaunt. +3", augments={'Enhances "Diabolic Eye" effect',}},
legs="Carmine Cuisses",
feet={ name="Fall. Sollerets +3", augments={'Enhances "Desperate Blows" effect',}},
neck="Sanctity Necklace",
waist="Flume Belt +1",
left_ear="Steelflash Earring",
right_ear="Bladeborn Earring",
left_ring="Defending Ring",
right_ring="Chirich Ring +1",
back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Store TP"+10','Damage taken-5%',}},
}
sets.idle.Regen = set_combine(sets.idle.Field, {
neck="Sanctity Necklace",
body="Lugra Cloak +1",
ring1="Paguroidea Ring",
ring2="Chirish Ring +1"
})
sets.idle.Refresh = set_combine(sets.idle.Regen, {
left_ring="Stikini Ring +1",
right_ring="Stikini Ring +1"
})

sets.idle.Weak = set_combine(sets.defense.PDT, {
head="Baghere Salade",
neck="Sanctity Necklace",
body="Sulevia's Platemail +2",
hands="Sulevia's Gauntlets +2",
ring1="Paguroidea Ring",
ring2="Defending Ring",
back=Ankou.STP,
waist="Flume Belt +1",
legs="Sulevia's Cuisses +2",
feet="Volte Sollerets"
})

-- Defense sets
sets.defense.PDT = {
ammo="Hasty Pinion +1", -- 2% haste
head="Sulevia's Mask +2", -- 3% haste
neck="Agitator's Collar",
body="Jumalik Mail", -- 3% haste
--body="Sulevia's Platemail +1", -- 1% haste
hands="Sulevia's Gauntlets +2", -- 3% haste
ear1="Etiolation Earring",
ring1="Patricius Ring",
ring2="Defending Ring",
back="Grounded Mantle +1", -- 2% haste
waist="Ioskeha Belt", -- 7% haste
legs="Sulevia's Cuisses +2", -- 2% haste
feet="Volte Sollerets" -- 3% haste
}
sets.defense.Reraise = sets.idle.Weak

sets.defense.MDT = set_combine(sets.defense.PDT, {
neck="Twilight Torque",
body="Lugra Cloak +1",
ear1="Etiolation Earring",
back="Impassive Mantle",
})

sets.Kiting = {
legs="Carmine Cuisses ",
}

sets.Reraise = {head="Twilight Helm",body="Twilight Mail"}

-- sets.HighHaste = {
-- ammo="Ginsen",
-- head="Argosy Celata",
-- }

-- Defensive sets to combine with various weapon-specific sets below
-- These allow hybrid acc/pdt sets for difficult content
sets.Defensive = {
--sub="Gracile grip",
ammo="Hasty Pinion +1",
head="Sulevia's Mask +2", -- 6%
neck="Agitator's Collar", -- 4% pdt
body="Valorous Mail",
hands="Sulevia's Gauntlets +2", -- 5% pdt
ring1="Niqmaddu Ring",
ring2="Defending Ring", -- 10% dt
back=Ankou.STP, -- 5% dt
waist="Ioskeha Belt +1",
legs="Sulevia's Cuisses +2", -- 7% dt
feet="Volte Sollerets" -- 4% pdt | 6% mdt
}
sets.Defensive_Mid = {
ammo="Hasty Pinion +1",
head="Sulevia's Mask +2",
neck="Twilight Torque",
body="Valorous Mail",
hands="Sulevia's Gauntlets +2",
ring1="Patricius Ring",
ring2="Defending Ring",
back=Ankou.STP,
waist="Ioskeha Belt +1",
legs="Sulevia's Cuisses +2",
feet="Volte Sollerets"
}
-- Higher DT, less haste
sets.DefensiveHigh = set_combine(sets.Defensive, {
ammo="Ginsen",
head="Sulevia's Mask +2",
neck="Agitator's Collar",
body="Sulevia's Platemail +2",
hands="Sulevia's Gauntlets +2",
ring1="Niqmaddu Ring",
ring2="Defending Ring",
legs="Sulevia's Cuisses +2",
feet="Volte Sollerets",
back=Ankou.STP,
})
sets.Defensive_Acc = set_combine(sets.Defensive_Mid, sets.DefensiveHigh)

-- Base set (global catch-all set)
sets.engaged = {
-- sub="Bloodrain Strap",
ammo="Ginsen",
head="Sulevia's Mask +2",
body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
hands={ name="Fall. Fin. Gaunt. +3", augments={'Enhances "Diabolic Eye" effect',}},
legs={ name="Fall. Flanchard +3", augments={'Enhances "Muted Soul" effect',}},
feet={ name="Fall. Sollerets +3", augments={'Enhances "Desperate Blows" effect',}},
neck="Abyssal Beads +1",
waist="Ioskeha Belt +1",
left_ear="Steelflash Earring",
right_ear="Bladeborn Earring",
left_ring="Chirich Ring +1",
right_ring="Chirich Ring +1",
back=Ankou.STP,
}

sets.engaged.DA = {
head="Flam. Zucchetto +2",
body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
hands="Sulev. Gauntlets +2",
legs="Sulev. Cuisses +2",
feet="Flam. Gambieras +2",
neck="Abyssal Beads +1",
waist="Ioskeha Belt +1",
left_ear="Steelflash Earring",
right_ear="Bladeborn Earring",
left_ring="Chirich Ring +1",
right_ring="Chirich Ring +1",
back=Ankou.DA,
}

end

function job_pretarget(spell, action, spellMap, eventArgs)
if spell.type:endswith('Magic') and buffactive.silence then
eventArgs.cancel = true
send_command('input /item "Echo Drops" <me>')
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
aw_custom_aftermath_timers_precast(spell)
end


-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
end

-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.english:startswith('Drain') then
if player.status == 'Engaged' and state.CastingMode.current == 'Normal' and player.hpp < 70 then
classes.CustomClass = 'OhShit'
end
end

if (state.HybridMode.current == 'PDT' and state.PhysicalDefenseMode.current == 'Reraise') then
equip(sets.Reraise)
end
end

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
aw_custom_aftermath_timers_aftercast(spell)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
end
end

function job_post_aftercast(spell, action, spellMap, eventArgs)
if spell.type == 'WeaponSkill' then
if state.Buff.Souleater and state.SouleaterMode.value then
send_command('@wait 1.0;cancel souleater')
--enable("head")
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-- Called before the Include starts constructing melee/idle/resting sets.
-- Can customize state or custom melee class values at this point.
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_handle_equipping_gear(status, eventArgs)
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.mpp < 70 then
idleSet = set_combine(idleSet, sets.idle.Refresh)
end
if player.hpp < 70 then
idleSet = set_combine(idleSet, sets.idle.Regen)
end
if state.HybridMode.current == 'PDT' then
idleSet = set_combine(idleSet, sets.defense.PDT)
end
return idleSet
end

-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if state.TreasureMode.value == 'Fulltime' then
meleeSet = set_combine(meleeSet, sets.TreasureHunter)
end
if state.CapacityMode.value then
meleeSet = set_combine(meleeSet, sets.CapacityMantle)
end
if state.Buff['Souleater'] then
meleeSet = set_combine(meleeSet, sets.buff.Souleater)
end
--meleeSet = set_combine(meleeSet, select_earring())
return meleeSet
end

-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------

-- Called when the player's status changes.
function job_status_change(newStatus, oldStatus, eventArgs)
if newStatus == "Engaged" then
--if state.Buff['Last Resort'] then
-- send_command('@wait 1.0;cancel hasso')
--end
-- handle weapon sets
if gsList:contains(player.equipment.main) then
state.CombatWeapon:set("GreatSword")
elseif scytheList:contains(player.equipment.main) then
state.CombatWeapon:set("Scythe")
elseif player.equipment.main == 'Apocalypse' then
state.CombatWeapon:set('Apocalypse')
elseif player.equipment.main == 'Anguta' then
state.CombatWeapon:set('Anguta')
elseif player.equipment.main == 'Ragnarok' then
state.CombatWeapon:set('Ragnarok')
elseif player.equipment.main == 'Caladbolg' then
state.CombatWeapon:set('Caladbolg')
elseif player.equipment.main == 'Liberator' then
state.CombatWeapon:set('Liberator')
else -- use regular set, which caters to Liberator
state.CombatWeapon:reset()
end
--elseif newStatus == 'Idle' then
-- determine_idle_group()
end
end

-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)

if state.Buff[buff] ~= nil then
handle_equipping_gear(player.status)
end

if S{'haste', 'march', 'embrava', 'geo-haste', 'indi-haste', 'last resort'}:contains(buff:lower()) then
if (buffactive['Last Resort']) then
if (buffactive.embrava or buffactive.haste) and buffactive.march then
state.CombatForm:set("Haste")
if not midaction() then
handle_equipping_gear(player.status)
end
end
else
if state.CombatForm.current ~= 'DW' and state.CombatForm.current ~= 'SW' then
state.CombatForm:reset()
end
if not midaction() then
handle_equipping_gear(player.status)
end
end
end
-- Drain II/III HP Boost. Set SE to stay on.
if buff == "Max HP Boost" and state.SouleaterMode.value then
if gain or buffactive['Max HP Boost'] then
state.SouleaterMode:set(false)
else
state.SouleaterMode:set(true)
end
end
-- Make sure SE stays on for BW
if buff == 'Blood Weapon' and state.SouleaterMode.value then
if gain or buffactive['Blood Weapon'] then
state.SouleaterMode:set(false)
else
state.SouleaterMode:set(true)
end
end
-- AM custom groups
if buff:startswith('Aftermath') then
if player.equipment.main == 'Liberator' then
classes.CustomMeleeGroups:clear()

if (buff == "Aftermath: Lv.3" and gain) or buffactive['Aftermath: Lv.3'] then
classes.CustomMeleeGroups:append('AM3')
add_to_chat(8, '-------------Mythic AM3 UP-------------')
-- elseif (buff == "Aftermath: Lv.3" and not gain) then
-- add_to_chat(8, '-------------Mythic AM3 DOWN-------------')
end

if not midaction() then
handle_equipping_gear(player.status)
end
else
classes.CustomMeleeGroups:clear()

if buff == "Aftermath" and gain or buffactive.Aftermath then
classes.CustomMeleeGroups:append('AM')
end

if not midaction() then
handle_equipping_gear(player.status)
end
end
end

-- if buff == "Samurai Roll" then
-- classes.CustomRangedGroups:clear()
-- if (buff == "Samurai Roll" and gain) or buffactive['Samurai Roll'] then
-- classes.CustomRangedGroups:append('SamRoll')
-- end

-- end

--if buff == "Last Resort" then
-- if gain then
-- send_command('@wait 1.0;cancel hasso')
-- else
-- if not midaction() then
-- send_command('@wait 1.0;input /ja "Hasso" <me>')
-- end
-- end
--end
end


-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------

-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)

war_sj = player.sub_job == 'WAR' or false
get_combat_form()
get_combat_weapon()
update_melee_groups()
select_default_macro_book()
end

-- State buff checks that will equip buff gear and mark the event as handled.
function check_buff(buff_name, eventArgs)
if state.Buff[buff_name] then
equip(sets.buff[buff_name] or {})
if state.TreasureMode.value == 'SATA' or state.TreasureMode.value == 'Fulltime' then
equip(sets.TreasureHunter)
end
eventArgs.handled = true
end
end

-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function get_combat_form()

if S{'NIN', 'DNC'}:contains(player.sub_job) and swordList:contains(player.equipment.main) then
state.CombatForm:set("DW")
--elseif player.equipment.sub == '' or shields:contains(player.equipment.sub) then
elseif swordList:contains(player.equipment.main) then
state.CombatForm:set("SW")
elseif buffactive['Last Resort'] then
if (buffactive.embrava or buffactive.haste) and buffactive.march then
add_to_chat(8, '-------------Delay Capped-------------')
state.CombatForm:set("Haste")
else
state.CombatForm:reset()
end
else
state.CombatForm:reset()
end
end

function get_combat_weapon()
state.CombatWeapon:reset()
if player.equipment.main == 'Apocalypse' then
state.CombatWeapon:set('Apocalypse')
elseif player.equipment.main == 'Anguta' then
state.CombatWeapon:set('Anguta')
elseif player.equipment.main == 'Ragnarok' then
state.CombatWeapon:set('Ragnarok')
elseif player.equipment.main == 'Caladbolg' then
state.CombatWeapon:set('Caladbolg')
elseif player.equipment.main == 'Liberator' then
state.CombatWeapon:set('Liberator')
elseif gsList:contains(player.equipment.main) then
state.CombatWeapon:set("GreatSword")
elseif scytheList:contains(player.equipment.main) then
state.CombatWeapon:set("Scythe")
end
end

function aw_custom_aftermath_timers_precast(spell)
if spell.type == 'WeaponSkill' then
info.aftermath = {}

local mythic_ws = "Insurgency"

info.aftermath.weaponskill = mythic_ws
info.aftermath.duration = 0

info.aftermath.level = math.floor(player.tp / 1000)
if info.aftermath.level == 0 then
info.aftermath.level = 1
end

if spell.english == mythic_ws and player.equipment.main == 'Liberator' then
-- nothing can overwrite lvl 3
if buffactive['Aftermath: Lv.3'] then
return
end
-- only lvl 3 can overwrite lvl 2
if info.aftermath.level ~= 3 and buffactive['Aftermath: Lv.2'] then
return
end

if info.aftermath.level == 1 then
info.aftermath.duration = 90
elseif info.aftermath.level == 2 then
info.aftermath.duration = 120
else
info.aftermath.duration = 180
end
end
end
end

-- Call from job_aftercast() to create the custom aftermath timer.
function aw_custom_aftermath_timers_aftercast(spell)
if not spell.interrupted and spell.type == 'WeaponSkill' and
info.aftermath and info.aftermath.weaponskill == spell.english and info.aftermath.duration > 0 then

local aftermath_name = 'Aftermath: Lv.'..tostring(info.aftermath.level)
send_command('timers d "Aftermath: Lv.1"')
send_command('timers d "Aftermath: Lv.2"')
send_command('timers d "Aftermath: Lv.3"')
send_command('timers c "'..aftermath_name..'" '..tostring(info.aftermath.duration)..' down abilities/aftermath'..tostring(info.aftermath.level)..'.png')

info.aftermath = {}
end
end

function display_current_job_state(eventArgs)
local msg = ''
msg = msg .. 'Offense: '..state.OffenseMode.current
msg = msg .. ', Hybrid: '..state.HybridMode.current

if state.DefenseMode.value ~= 'None' then
local defMode = state[state.DefenseMode.value ..'DefenseMode'].current
msg = msg .. ', Defense: '..state.DefenseMode.value..' '..defMode
end
if state.CombatForm.current ~= '' then
msg = msg .. ', Form: ' .. state.CombatForm.current
end
if state.CombatWeapon.current ~= '' then
msg = msg .. ', Weapon: ' .. state.CombatWeapon.current
end
if state.CapacityMode.value then
msg = msg .. ', Capacity: ON, '
end
if state.SouleaterMode.value then
msg = msg .. ', SE Cancel, '
end
-- if state.LastResortMode.value then
-- msg = msg .. ', LR Defense, '
-- end
if state.PCTargetMode.value ~= 'default' then
msg = msg .. ', Target PC: '..state.PCTargetMode.value
end
if state.SelectNPCTargets.value then
msg = msg .. ', Target NPCs'
end

add_to_chat(123, msg)
eventArgs.handled = true
end

-- Set eventArgs.handled to true if we don't want the automatic display to be run.
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
end

-- Creating a custom spellMap, since Mote capitalized absorbs incorrectly
function job_get_spell_map(spell, default_spell_map)
if spell.skill == 'Dark Magic' and absorbs:contains(spell.english) then
return 'Absorb'
end
if spell.type == 'Trust' then
return 'Trust'
end
end

function select_earring()
if world.time >= (17*60) or world.time <= (7*60) then
return sets.Lugra
else
return sets.Brutal
end
end

function update_melee_groups()

classes.CustomMeleeGroups:clear()
-- mythic AM
if player.equipment.main == 'Liberator' then
if buffactive['Aftermath: Lv.3'] then
classes.CustomMeleeGroups:append('AM3')
end
else
-- relic AM
if buffactive['Aftermath'] then
classes.CustomMeleeGroups:append('AM')
end
-- if buffactive['Samurai Roll'] then
-- classes.CustomRangedGroups:append('SamRoll')
-- end
end
end

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(10, 8)
end
Offline
Posts: 281
By Galkapryme 2019-07-02 07:20:58  
And now, the part I am having trouble understanding/setting up. Specifically, I want to know HOW to cycle between Normal, Mid, Acc, PDT, etc., and I want to fully understand the binds. Essentially, what I want to do is to simply be able to click "F1" or "F2" or something like that to quickly and easily "switch modes." Help would include telling me exactly what binds to modify and how (exact syntax).:

-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
state.OffenseMode:options('Normal', 'Mid', 'Acc')
state.HybridMode:options('Normal', 'PDT')
state.WeaponskillMode:options('Normal', 'Mid', 'Acc')
state.CastingMode:options('Normal', 'Acc')
state.IdleMode:options('Normal')
state.RestingMode:options('Normal')
state.PhysicalDefenseMode:options('PDT', 'Reraise')
state.MagicalDefenseMode:options('MDT')

war_sj = player.sub_job == 'WAR' or false

-- Additional local binds
send_command('bind ^= gs c cycle treasuremode')
send_command('bind != gs c toggle CapacityMode')
send_command('bind @f9 gs c toggle SouleaterMode')
send_command('bind !- gs equip sets.crafting')
--send_command('bind ^` gs c toggle LastResortMode')

select_default_macro_book()
end

-- Called when this job file is unloaded (eg: job change)
function file_unload()
send_command('unbind ^`')
send_command('unbind !=')
send_command('unbind ^[')
send_command('unbind ![')
send_command('unbind @f9')
end
Offline
Posts: 281
By Galkapryme 2019-07-02 09:35:45  
Also (and I think "finally"), what EXACTLY do these modes do? Regarding "state.OffenseMode:options('Normal', 'Mid', 'Acc')", are these cycleable options for sets.engaged? Like sets.engaged, sets.engaged.PDT, sets.engaged.Acc, etc.?

-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
state.OffenseMode:options('Normal', 'Mid', 'Acc')
state.HybridMode:options('Normal', 'PDT')
state.WeaponskillMode:options('Normal', 'Mid', 'Acc')
state.CastingMode:options('Normal', 'Acc')
state.IdleMode:options('Normal')
state.RestingMode:options('Normal')
state.PhysicalDefenseMode:options('PDT', 'Reraise')
state.MagicalDefenseMode:options('MDT')
 Asura.Chaostaru
Offline
サーバ: Asura
Game: FFXI
Posts: 695
By Asura.Chaostaru 2019-07-02 09:44:51  
my dude. Put your lua code between [code*] LUA HERE [/code*](delete the *) so we dont have to scroll 52miles down lol
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2019-07-02 10:03:45  
That is based on my lua. It looks outdated though. The updated version is kept here. It has weapon specific sets, and haste modes added earlier this year.

Your questions aren't specific to mine though. Modes and binds function the same way in any lua that uses Mote's library. (to an extent)

You can view the default key bindings for Mote's libs here.

You will find Mote's, and most user luas are "opinionated" on a few key areas. I would suggest just trying to get used to it for the most part, and you'll be much happier in the end. You will have a lua for every job, and you'll want consistency with them. Mote's provide this consistency for us.

OffenseMode is for sets.engaged. It's toggled with the F9 key by default. OffenseMode sets look like sets.engaged, sets.engaged.Mid, and sets.engaged.Acc. you can also place any command you see in a binding into an in-game macro. For example,
Code
gs c cycle OffenseMode

In game, this can be executed in a macro.
Code
/console gs c cycle OffenseMode


HybridMode is for sets.engaged You cycle this with CTRL key + F9. You will equip sets.engaged.PDT. There's a caveat. This set will "combine" with OffenseMode. Example - If you were using the "Acc" offense mode, and toggled into PDT hybrid mode, the set that would be equipped is sets.engaged.Acc.PDT

PhysicalDefenseMode is unique, and works with sets.defense - This is a lesser used set, and it has one unique distinction between HybridModes. When you toggle PhysicalDefenseMode = PDT with F10 key (as seen in link above) your gear will be "locked" into sets.defense.PDT. Casting spells, using JA, WS, etc. will NOT swap gear as they normally do. HybridMode = PDT (sets.engaged.PDT) will still swap gear, so you could easily get 1-shot by an angry mob that catches you WS'ing it.

MagicalDefenseMode is the same, but for sets.defense.MDT and enabled with F11.
One thing that catches people, is they hit F10 or F11 and can't figure out how to exit PDT or MDT mode. For this, you will use CTRL + F12

You can safely ignore idleMode, and WeaponSkillMode for the most part. Mote's libs automatically adjust WeaponskillMode to align with OffenseMode, so you never have to specifically toggle WS modes.

If you want to rebind, you will do it the same way the binds are setup. Take the command examples from the Mote lib I linked above. For example. Binding offense modes to F2.
Code
send_command('bind f2 gs c cycle OffenseMode')


With all of that said, also keep in mind set order is very important. Example - sets.engaged.PDT.Acc is wrong and will not function. sets.engaged.Acc.PDT is correct. If you're constructing sets, use the example sets provided in the lua as strict reference.

HTH. Feel free to DM

Edit: never mind yours does look like the most recent version of my lua
Offline
Posts: 281
By Galkapryme 2019-07-02 13:27:51  
My Dude...THANK you for explaining it all to me. Using premade .luas with my own personal modifications for the gear I have has been GREAT compared to in-game equipsets, but this is the kind of deeper understanding I've been looking for. This should help me create a Double Attack/Triple Attack set I can toggle through. It will mean I need to add a few more sets.engaged lines, but it will be worth it. Thanks for giving me the updated links too.
Offline
Posts: 281
By Galkapryme 2019-07-02 13:29:48  
Asura.Chaostaru said: »
my dude. Put your lua code between [code*] LUA HERE [/code*](delete the *) so we dont have to scroll 52miles down lol

Though I think my question has been answered, I wanna try what you recommended, so here goes:
Code
--[[     
=== Features ===
If you want auto Reive detection for Ygnas Resolve+1, and Gavialis Helm for some of your WS, then you will need my User-Globals.lua
Otherwise, you might be able to get away without it.  (not tested)

If you don't use organizer, then remove the include('organizer-lib') in get_sets() and remove sets.Organizer

This lua has a few MODES you can toggle with hotkeys or macros, and there's a few situational RULES that activate without hotkeys

::MODES::

SouleaterMode 
Status: OFF by default. 
Hotkey: Toggle this with F9 (F9). 
Macro: /console gs c togggle SouleaterMode

Notes: This mode makes it possible to use Souleater in situations where you would normally avoid using it. When SouleaterMode 
is ON, Souleater will be canceled automatically after the first Weaponskill used. CAVEAT -. If Bloodweapon 
is active, or if Drain's HP Boost buff is active, then Souleater will remain active until the next WS used after 
either buff wears off. 

CapacityMode
Status: OFF by default. 
Hotkey: with f1
Macro: /console cs c toggle CapacityMode

Notes: It will full-time whichever piece of gear you specify in sets.CapacityMantle 

Extra Info: You can change the default (true|false) status of any MODE by changing their values in job_setup()

::RULES::

Gavialis helm
Status: enabled
Setting: set use_gavialis = true below in job_setup. 

Notes: Gavialis Helm will automatically be used for all weaponskills on their respective days of the week. If you would like to 
exclude a weapon skill, you must add it to wsList below. (found in job_setup) You also need my User-Globals.lua for this
to even work. 

Ygna's Resolve +1 
Status: enabled in Reive
Setting: n/a

Notes: Will automatically be used when you're in a reive. If you have my User-Globals.lua this will work
with all your jobs that use mote's includes. Not just this one! 

Moonshade earring
Status: Not used for WS's at 3000 TP. 
Setting: n/a

You can hit F12 to display custom MODE status as well as the default stuff. 

Single handed weapons are handled in the sets.engaged.SW set. (sword + shield, etc.)

::NOTES::

My sets have a specific order, or they will not function correctly. 
sets.engaged.[CombatForm][CombatWeapon][Offense or HybridMode][CustomMeleeGroups or CustomClass]

CombatForm = Haste, DW, SW
CombatWeapon = GreatSword, Scythe, Apocalypse, Ragnarok, Caladbolg, Liberator, Anguta
OffenseMode = Mid, Acc
HybridMode = PDT
CustomMeleeGroups = AM3, AM, Haste
CustomClass = OhShit 

CombatForm Haste is used when Last Resort + Hasso AND either Haste, March, Indi-Haste Geo-Haste is on you.

CombatForm DW will activate with /dnc or /nin AND a weapon listed in drk_sub_weapons equipped offhand. 
SW is active with an empty sub-slot, or a shield listed in the shields = S{} list.  

CombatWeapon GreatSword will activate when you equip a GS listed in gsList in job_setup(). 
CombatWeapon Scythe will activate when you equip a Scythe listed in scytheList in job_setup(). 
Weapons that do not fall into these groups, or have sets by weapon name, will use default sets.engaged

most gear sets derrive themselves from sets.engaged, so try to keep it updated. It's much smarter to derrive sets than to 
completely re-invent each gear set for every weapon. Let your gear inherit. Less code written means less errors. 

CustomMeleeGroups AM3 will activate when Aftermath lvl 3 is up, and CustomMeleeGroups AM will activate when relic Aftermath is up.
There are no empy AM sets for now.

--]]
--
-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
    -- Load and initialize the include file.
    include('Mote-Include.lua')
    include('organizer-lib')
end


-- Setup vars that are user-independent.
function job_setup()
    state.CapacityMode = M(false, 'Capacity Point Mantle')

    include('Mote-TreasureHunter')
    state.TreasureMode:set('Tag')

    state.Buff.Souleater = buffactive.souleater or false
    state.Buff['Last Resort'] = buffactive['Last Resort'] or false
    -- Set the default to false if you'd rather SE always stay acitve
    state.SouleaterMode = M(false, 'Soul Eater Mode')
    -- state.LastResortMode = M(false, 'Last Resort Mode')
    -- Use Gavialis helm?
    use_gavialis = true
    -- Weaponskills you do NOT want Gavialis helm used with (only considered if use_gavialis = true)
    wsList = S{'Spiral Hell', 'Catastrophe', 'Torcleaver', 'Insurgency', 'Quietus', 'Cross Reaper'}
    -- Greatswords you use. 
    gsList = S{'Malfeasance', 'Macbain', 'Kaquljaan', 'Mekosuchus Blade', 'Ragnarok', 'Raetic Algol', 'Raetic Algol +1', 'Caladbolg', 'Montante +1', 'Albion', 'Eletta Claymore' }
    scytheList = S{'Raetic Scythe', 'Deathbane', 'Twilight Scythe', 'Apocalypse' }
    shields = S{'Rinda Shield'}
    -- Mote has capitalization errors in the default Absorb mappings, so we use our own
    absorbs = S{'Absorb-STR', 'Absorb-DEX', 'Absorb-VIT', 'Absorb-AGI', 'Absorb-INT', 'Absorb-MND', 'Absorb-CHR', 'Absorb-Attri', 'Absorb-ACC', 'Absorb-TP'}
    -- Offhand weapons used to activate DW mode
    swordList = S{"Sangarius", "Sangarius +1", "Usonmunku", "Perun +1", "Tanmogayi"}

    get_combat_form()
    get_combat_weapon()
    update_melee_groups()
end


-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    -- Options: Override default values
    state.OffenseMode:options('Normal', 'Mid', 'Acc', 'DA')
    state.HybridMode:options('Normal', 'PDT', 'DA')
    state.WeaponskillMode:options('Normal', 'Mid', 'Acc')
    state.CastingMode:options('Normal', 'Acc')
    state.IdleMode:options('Normal')
    state.RestingMode:options('Normal')
    state.PhysicalDefenseMode:options('PDT', 'Reraise')
    state.MagicalDefenseMode:options('MDT')

    war_sj = player.sub_job == 'WAR' or false

    -- Additional local binds
    send_command('bind f2 gs c cycle TreasureMode')
    send_command('bind f1 gs c toggle CapacityMode')
    send_command('bind f9 gs c toggle SouleaterMode')
    send_command('bind f3 gs equip sets.crafting')
	send_command('bind f4 gs c cycle HybridMode')
    --send_command('bind ^` gs c toggle LastResortMode')

    select_default_macro_book()
end

-- Called when this job file is unloaded (eg: job change)
function file_unload()
    send_command('unbind ^`')
    send_command('unbind !=')
    send_command('unbind ^[')
    send_command('unbind ![')
    send_command('unbind @f9')
end


-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
    -- Start defining the sets
    --------------------------------------
    -- Augmented gear
    Niht = {name="Niht Mantle", augments={'Attack+10','Dark magic skill +8','"Drain" and "Aspir" potency +25'}}
    

    Ankou = {}
    Ankou.FC  = { name="Ankou's Mantle", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+9','"Fast Cast"+10','Spell interruption rate down-4%',}}
    Ankou.STP = { name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Store TP"+10','Damage taken-5%',}}
    Ankou.DA  = { name="Ankou's Mantle", augments={'STR+20','Accuracy+6 Attack+6','"Double Attack" +10%',}}
    Ankou.WSD = { name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Damage taken-5%',}}
    Ankou.VIT = { name="Ankou's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%',}}
	Ankou.INT = { name="Ankou's Mantle", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+9','"Fast Cast"+10','Spell interruption rate down-4%',}}

    sets.TreasureHunter = { waist="Chaac Belt" }

    

 
    sets.Organizer = {}

    -- Precast Sets
    -- Precast sets to enhance JAs
    sets.precast.JA['Diabolic Eye'] = {hands="Fallen's Finger Gauntlets +3"}
    sets.precast.JA['Nether Void']  = {legs="Heathen's Flanchard +1"}
    sets.precast.JA['Dark Seal']    = {head="Fallen's burgeonet +3"}
    sets.precast.JA['Souleater']    = {head="Ignominy burgeonet +3"}
    sets.precast.JA['Weapon Bash']   = {hands="Ignominy Gauntlets +2",left_ring="Slayer's Ring"}
    sets.precast.JA['Blood Weapon'] = {body="Fallen's Cuirass +3"}
    sets.precast.JA['Last Resort']  = {feet="Fallen's Sollerets +3"}

    sets.CapacityMantle  = { back="Mecistopins Mantle" }
    sets.WSDayBonus      = { head="Gavialis Helm" }
    sets.WSBack          = Ankou.WSD
    
    -- Earring considerations, given Lugra's day/night stats 
    sets.BrutalLugra     = { ear1="Brutal Earring", ear2="Lugra Earring" }
    sets.IshvaraLugra     = { ear1="Ishvara Earring", ear2="Lugra Earring" }
    sets.Lugra           = { ear1="Lugra Earring" }
    sets.Brutal          = { ear1="Brutal Earring" }
    sets.Ishvara          = { ear1="Ishvara Earring" }

    -- Waltz set (chr and vit) 
	
	
    -- sets.precast.Waltz = {}

    -- Fast cast sets for spells
    sets.precast.FC = {
    ammo="Strobilus",
    head={ name="Carmine Mask", augments={'Accuracy+10','DEX+10','MND+15',}},
    body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
    hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
    legs="Arjuna Breeches",
    feet={ name="Odyssean Greaves", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','AGI+7','"Mag.Atk.Bns."+3',}},
    neck="Sanctity Necklace",
    waist="Austerity Belt +1",
    left_ear="Friomisi Earring",
    right_ear="Loquacious Earring",
    left_ring="Prolix Ring",
    right_ring="Lebeche Ring",
    back=Ankou.FC,
    }

    sets.precast.FC['Elemental Magic'] = sets.precast.FC
    sets.precast.FC['Enfeebling Magic'] = set_combine(sets.precast.FC, {neck="Erra Pendant"})
	sets.precast.FC['Dark Magic'] = set_combine(sets.precast.FC, {head={ name="Fall. Burgeonet +3", augments={'Enhances "Dark Seal" effect',}}})
	
    sets.precast.FC.Cure = set_combine(sets.precast.FC, { body="Jumalik Mail", hands="Buremte Gloves"})

    -- Midcast Sets
    sets.midcast.FastRecast =  sets.precast.FC
    
    
    -- Specific spells
    sets.midcast.Utsusemi = {
        ammo="Impatiens",
        --head="Otomi Helm",
        neck="Incanter's Torque",
        body="Founder's Breastplate",
        hands="Leyline Gloves",
        back="Grounded Mantle +1",
        
    }

    sets.midcast['Dark Magic'] = {
    ammo="Strobilus",
    head="Ignominy Bugonet +3",
    body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
    hands={ name="Fall. Fin. Gaunt. +3", augments={'Enhances "Diabolic Eye" effect',}},
    legs={ name="Fall. Flanchard +3", augments={'Enhances "Muted Soul" effect',}},
    feet="Ratri Sollerets",
    neck="Erra Pendant",
    waist="Austerity Belt +1",
    left_ear="Friomisi Earring",
    right_ear="Crematio Earring",
    left_ring="Fenrir Ring +1",
    right_ring="Fenrir Ring +1",
	back=Ankou.INT,
    }
    sets.midcast.Endark = sets.midcast['Dark Magic']
    

    sets.midcast['Dark Magic'].Acc = set_combine(sets.midcast['Dark Magic'], {
        head="Flamma Zucchetto +2", -- 44 macc
        hands="Leyline Gloves"
        })

    sets.midcast['Enfeebling Magic'] = set_combine(sets.midcast['Dark Magic'], {
        ammo="Strobilus", 
        head={ name="Fall. Burgeonet +3", augments={'Enhances "Dark Seal" effect',}},
        neck="Erra Pendant", -- Dark Magic Skill 10 + 17 macc
        body="Ignominy Cuirass +2",
        hands="Flamma Manopolas +2",
        ring1="Stikini Ring +1", -- 11 macc
        ring2="Kishar Ring",
        waist="Austerity Belt +1",
        legs="Fallen's Flanchard +3",  -- Dark Magic Skill 18 + 39macc
        back=Ankou.INT,
        feet="Flamma Gambieras +2"
    })

    sets.midcast['Elemental Magic'] = {
        ammo="Strobilus", 
        head={ name="Odyssean Helm", augments={'Mag. Acc.+24','Magic dmg. taken -2%','MND+2','"Mag.Atk.Bns."+6',}},
        neck="Eddy Necklace", -- macc 5, 11 matk
        ear1="Friomisi Earring", -- 10 matk
        right_ear="Crematio Earring", -- matk 6, mdmg +6
        body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}}, -- macc 40, matk 60
        hands={ name="Fall. Fin. Gaunt. +3", augments={'Enhances "Diabolic Eye" effect',}}, -- macc 38, matk 62
        ring1="Fenrir Ring +1", -- macc/matk 3, mdmg 5
        ring2="Fenrir Ring +1", -- macc/matk 3, mdmg 5
        waist="Austerity Belt +1", -- macc/matk 7
        legs="Eschite Cuisses", -- matk 25 
        back=Ankou.INT, -- macc 29, mdmg 20
        feet="Heathen's Sollerets +1" -- macc/matk 20, Occult Acumen 30
    }

    -- Mix of HP boost, -Spell interruption%, and Dark Skill
    sets.midcast['Dread Spikes'] = set_combine(sets.midcast['Dark Magic'], {
        ammo="Strobilus",
        head="Ignominy Burgonet +3", -- 17
        left_ear="Friomisi Earring",
    right_ear="Crematio Earring",
        body="Heathen's Cuirass +1",
        hands="Fallen's Finger Gauntlets +3",
        back=Ankou.INT,
    })
    sets.midcast['Dread Spikes'].Acc = set_combine(sets.midcast['Dark Magic'], {
        body="Heathen's Cuirass +1",
        hands="Fallen's Finger Gauntlets +3"
    })

    -- Drain spells 
    sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {
        body="Lugra Cloak +1",
       	back=Niht
    })
    sets.midcast.Aspir = sets.midcast.Drain

    sets.midcast.Drain.Acc = set_combine(sets.midcast.Drain, {
        hands="Leyline Gloves",
        waist="Eschan Stone", -- macc/matk 7
    })
    sets.midcast.Aspir.Acc = sets.midcast.Drain.Acc

    sets.midcast.Drain.OhShit = set_combine(sets.midcast.Drain, {
        legs="Carmine Cuisses +1",
        feet="Ratri Sollerets"
    })

    -- Absorbs
    sets.midcast.Absorb = set_combine(sets.midcast['Dark Magic'], {
        head="Ignominy Burgonet +3", -- Absorb duration 20
		feet="Ratri Sollerets",
        back=Ankou.INT,
        })

    sets.midcast['Absorb-TP'] = set_combine(sets.midcast.Absorb, {
        hands="Heathen's Gauntlets +1",
        ring2="Kishar Ring",
    })

    sets.midcast['Absorb-TP'].Acc = set_combine(sets.midcast.Absorb.Acc, {
        hands="Heathen's Gauntlets +1",
        ring2="Kishar Ring",
    })
    sets.midcast.Absorb.Acc = set_combine(sets.midcast['Dark Magic'].Acc, {
        head="Flamma Zucchetto +2", -- 44 macc
        back=Ankou.INT,
        hands="Flamma Manopolas +2",
        ring2="Kishar Ring",
    })

    -- Ranged for xbow
    sets.precast.RA = {
        --head="Otomi Helm",
        --feet="Ejekamal Boots",
        hands="Carmine Finger Gauntlets +1"
    }
    sets.midcast.RA = {
        ear2="Tripudio Earring",
        ring1="Cacoethic Ring +1",
        waist="Chaac Belt",
    }

    -- WEAPONSKILL SETS
    -- General sets
    sets.precast.WS = {
    ammo="Knobkierrie",
    head={ name="Fall. Burgeonet +3", augments={'Enhances "Dark Seal" effect',}},
    body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
    hands={ name="Valorous Mitts", augments={'Accuracy+20 Attack+20','Weapon skill damage +3%','Attack+8',}},
    legs={ name="Fall. Flanchard +3", augments={'Enhances "Muted Soul" effect',}},
    feet="Sulev. Leggings +2",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Steelflash Earring",
    right_ear="Ishvara Earring",
    left_ring="Chirich Ring",
    right_ring="Ifrit Ring +1",
    back=Ankou.WSD,
    }
    

    -- RESOLUTION
    -- 86-100% STR
    sets.precast.WS.Resolution = sets.precast.WS
    sets.precast.WS.Resolution.Acc = sets.precast.WS

    -- TORCLEAVER 
    -- VIT 80%
    sets.precast.WS.Torcleaver = set_combine(sets.precast.WS, {
        head="Sulevia's Mask +2",
        body="Ignominy Cuirass +2",
        neck="Fotia Gorget",
        waist="Fotia Belt",
        back=Ankou.WSD,
        legs="Fallen's Flanchard +3",
    })
    sets.precast.WS.Torcleaver.Mid = set_combine(sets.precast.WS.Mid, {
        neck="Abyssal Bead Necklace +1",
    })
    sets.precast.WS.Torcleaver.Acc = sets.precast.WS.Torcleaver.Mid

    -- INSURGENCY
    -- 20% STR / 20% INT 
    -- Base set only used at 3000TP to put AM3 up
    sets.precast.WS.Insurgency = sets.precast.WS
   

    sets.precast.WS.Catastrophe = sets.precast.WS
	
    

    -- CROSS REAPER
    -- 60% STR / 60% MND
    sets.precast.WS['Cross Reaper'] = set_combine(sets.precast.WS, {
        body="Ignominy Cuirass +2",
        })
    
    -- ENTROPY
    -- 86-100% INT 
    sets.precast.WS['Entropy'] = {
	ammo="Knobkierrie",
   head={ name="Odyssean Helm", augments={'Mag. Acc.+24','Magic dmg. taken -2%','MND+2','"Mag.Atk.Bns."+6',}},
    body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
    hands={ name="Fall. Fin. Gaunt. +3", augments={'Enhances "Diabolic Eye" effect',}},
    legs={ name="Fall. Flanchard +3", augments={'Enhances "Muted Soul" effect',}},
    feet="Sulev. Leggings +2",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Friomisi Earring",
    right_ear="Ishvara Earring",
    left_ring="Fenrir Ring +1",
    right_ring="Stikini Ring +1",
    back=Ankou.WSD,
    }
    

    -- Quietus
    -- 60% STR / MND 
    sets.precast.WS.Quietus = sets.precast.WS
    
    -- SPIRAL HELL
    -- 50% STR / 50% INT 
    sets.precast.WS['Spiral Hell'] = sets.precast.WS

    -- SHADOW OF DEATH
    -- 40% STR 40% INT - Darkness Elemental
    sets.precast.WS['Shadow of Death'] = set_combine(sets.precast.WS['Entropy'], {
        head="Pixie Hairpin +1",
        neck="Eddy Necklace",
        })

    
    -- DARK HARVEST 
    -- 40% STR 40% INT - Darkness Elemental
    sets.precast.WS['Dark Harvest'] = sets.precast.WS['Shadow of Death']
    sets.precast.WS['Dark Harvest'].Mid = set_combine(sets.precast.WS['Shadow of Death'], {head="Terminal Helm", feet="Heathen's Sollerets +1"})
    sets.precast.WS['Dark Harvest'].Acc = set_combine(sets.precast.WS['Shadow of Death'], {head="Terminal Helm", feet="Heathen's Sollerets +1"})

    -- Sword WS's
    -- SANGUINE BLADE
    -- 50% MND / 50% STR Darkness Elemental
    sets.precast.WS['Sanguine Blade'] = set_combine(sets.precast.WS, {
        head="Pixie Hairpin +1",
        neck="Eddy Necklace",
        ear1="Friomisi Earring",
        body="Fallen's Cuirass +3",
        hands="Founder's Gauntlets",
        back=Ankou.WSD,
        feet="Heathen's Sollerets +1"
    })
    sets.precast.WS['Sanguine Blade'].Mid = set_combine(sets.precast.WS['Sanguine Blade'], sets.precast.WS.Mid)
    sets.precast.WS['Sanguine Blade'].Acc = set_combine(sets.precast.WS['Sanguine Blade'], sets.precast.WS.Acc)

    -- REQUISCAT
    -- 73% MND - breath damage
    sets.precast.WS.Requiescat = set_combine(sets.precast.WS, {
        head="Flamma Zucchetto +2",
        neck="Abyssal Bead Necklace +1",
        body="Ignominy Cuirass +3",
        hands="Odyssean Gauntlets",
        waist="Soil Belt",
    })
    sets.precast.WS.Requiescat.Mid = set_combine(sets.precast.WS.Requiscat, sets.precast.WS.Mid)
    sets.precast.WS.Requiescat.Acc = set_combine(sets.precast.WS.Requiscat, sets.precast.WS.Acc)

    -- Idle sets
    sets.idle.Town = {
        neck="Wiglen Gorget",
        body="Councilor's Garb",
        hands="Sulevia's Gauntlets +2",
        ring1="Niqmaddu Ring",
        ring2="Defending Ring",
        back=Ankou.STP,
        waist="Flume Belt +1",
        legs="Carmine Cuisses",
        feet="Sulevia's Leggings +2"
    }

    sets.idle.Field = {
	head="Sulevia's Mask +2",
    body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
    hands={ name="Fall. Fin. Gaunt. +3", augments={'Enhances "Diabolic Eye" effect',}},
    legs="Carmine Cuisses",
    feet={ name="Fall. Sollerets +3", augments={'Enhances "Desperate Blows" effect',}},
    neck="Sanctity Necklace",
    waist="Flume Belt +1",
    left_ear="Steelflash Earring",
    right_ear="Bladeborn Earring",
    left_ring="Defending Ring",
    right_ring="Chirich Ring +1",
    back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+5','"Store TP"+10','Damage taken-5%',}},
    }
    sets.idle.Regen = set_combine(sets.idle.Field, {
        neck="Sanctity Necklace",
        body="Lugra Cloak +1",
        ring1="Paguroidea Ring",
		ring2="Chirish Ring +1"
    })
    sets.idle.Refresh = set_combine(sets.idle.Regen, {
        left_ring="Stikini Ring +1",
		right_ring="Stikini Ring +1"
    })

    sets.idle.Weak = set_combine(sets.defense.PDT, {
        head="Baghere Salade",
        neck="Sanctity Necklace",
        body="Sulevia's Platemail +2",
        hands="Sulevia's Gauntlets +2",
        ring1="Paguroidea Ring",
        ring2="Defending Ring",
        back=Ankou.STP,
        waist="Flume Belt +1",
        legs="Sulevia's Cuisses +2",
        feet="Volte Sollerets"
    })

    -- Defense sets
    sets.defense.PDT = {
        ammo="Hasty Pinion +1", -- 2% haste
        head="Sulevia's Mask +2", -- 3% haste
        neck="Agitator's Collar",
        body="Jumalik Mail", -- 3% haste
        --body="Sulevia's Platemail +1", -- 1% haste
        hands="Sulevia's Gauntlets +2", -- 3% haste
        ear1="Etiolation Earring",
        ring1="Patricius Ring",
        ring2="Defending Ring",
        back="Grounded Mantle +1", -- 2% haste
        waist="Ioskeha Belt", -- 7% haste
        legs="Sulevia's Cuisses +2", -- 2% haste
        feet="Volte Sollerets" -- 3% haste
    }
    sets.defense.Reraise = sets.idle.Weak

    sets.defense.MDT = set_combine(sets.defense.PDT, {
        neck="Twilight Torque",
        body="Lugra Cloak +1",
        ear1="Etiolation Earring",
        back="Impassive Mantle",
    })

    sets.Kiting = {
        legs="Carmine Cuisses ",
    }

    sets.Reraise = {head="Twilight Helm",body="Twilight Mail"}

    -- sets.HighHaste = {
    --     ammo="Ginsen",
    --     head="Argosy Celata",
    -- }

    -- Defensive sets to combine with various weapon-specific sets below
    -- These allow hybrid acc/pdt sets for difficult content
    sets.Defensive = {
        --sub="Gracile grip",
        ammo="Hasty Pinion +1",
        head="Sulevia's Mask +2", -- 6% 
        neck="Agitator's Collar", -- 4% pdt
        body="Valorous Mail",
        hands="Sulevia's Gauntlets +2", -- 5% pdt
        ring1="Niqmaddu Ring", 
        ring2="Defending Ring", -- 10% dt
        back=Ankou.STP, -- 5% dt
        waist="Ioskeha Belt +1",
        legs="Sulevia's Cuisses +2", -- 7% dt
        feet="Volte Sollerets"  -- 4% pdt | 6% mdt
    }
    sets.Defensive_Mid = {
        ammo="Hasty Pinion +1",
        head="Sulevia's Mask +2",
        neck="Twilight Torque",
        body="Valorous Mail",
        hands="Sulevia's Gauntlets +2",
        ring1="Patricius Ring",
        ring2="Defending Ring",
        back=Ankou.STP,
        waist="Ioskeha Belt +1",
        legs="Sulevia's Cuisses +2",
        feet="Volte Sollerets" 
    }
    -- Higher DT, less haste
    sets.DefensiveHigh = set_combine(sets.Defensive, {
        ammo="Ginsen",
        head="Sulevia's Mask +2",
        neck="Agitator's Collar",
        body="Sulevia's Platemail +2",
        hands="Sulevia's Gauntlets +2",
        ring1="Niqmaddu Ring", 
        ring2="Defending Ring",
        legs="Sulevia's Cuisses +2",
        feet="Volte Sollerets",
        back=Ankou.STP,
    })
    sets.Defensive_Acc = set_combine(sets.Defensive_Mid, sets.DefensiveHigh)

    -- Base set (global catch-all set)
    sets.engaged = {
        -- sub="Bloodrain Strap",
    ammo="Ginsen",
    head="Sulevia's Mask +2",
    body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
    hands={ name="Fall. Fin. Gaunt. +3", augments={'Enhances "Diabolic Eye" effect',}},
    legs={ name="Fall. Flanchard +3", augments={'Enhances "Muted Soul" effect',}},
    feet={ name="Fall. Sollerets +3", augments={'Enhances "Desperate Blows" effect',}},
    neck="Abyssal Beads +1",
    waist="Ioskeha Belt +1",
    left_ear="Steelflash Earring",
    right_ear="Bladeborn Earring",
    left_ring="Chirich Ring +1",
    right_ring="Chirich Ring +1",
    back=Ankou.STP,
    }
    
	sets.engaged.DA = {
	head="Flam. Zucchetto +2",
    body={ name="Fall. Cuirass +3", augments={'Enhances "Blood Weapon" effect',}},
    hands="Sulev. Gauntlets +2",
    legs="Sulev. Cuisses +2",
    feet="Flam. Gambieras +2",
    neck="Abyssal Beads +1",
    waist="Ioskeha Belt +1",
    left_ear="Steelflash Earring",
    right_ear="Bladeborn Earring",
    left_ring="Chirich Ring +1",
    right_ring="Chirich Ring +1",
    back=Ankou.DA,
	}
	          
end

function job_pretarget(spell, action, spellMap, eventArgs)
    if spell.type:endswith('Magic') and buffactive.silence then
        eventArgs.cancel = true
        send_command('input /item "Echo Drops" <me>')
    end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
    aw_custom_aftermath_timers_precast(spell)
end


-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
end

-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.english:startswith('Drain') then
        if player.status == 'Engaged' and state.CastingMode.current == 'Normal' and player.hpp < 70 then
            classes.CustomClass = 'OhShit'
        end
    end

    if (state.HybridMode.current == 'PDT' and state.PhysicalDefenseMode.current == 'Reraise') then
        equip(sets.Reraise)
    end
end

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
    aw_custom_aftermath_timers_aftercast(spell)
    if state.Buff[spell.english] ~= nil then
        state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
    end
end

function job_post_aftercast(spell, action, spellMap, eventArgs)
    if spell.type == 'WeaponSkill' then
        if state.Buff.Souleater and state.SouleaterMode.value then
            send_command('@wait 1.0;cancel souleater')
            --enable("head")
        end
    end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-- Called before the Include starts constructing melee/idle/resting sets.
-- Can customize state or custom melee class values at this point.
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_handle_equipping_gear(status, eventArgs)
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if player.mpp < 70 then
        idleSet = set_combine(idleSet, sets.idle.Refresh)
    end
    if player.hpp < 70 then
        idleSet = set_combine(idleSet, sets.idle.Regen)
    end
    if state.HybridMode.current == 'PDT' then
        idleSet = set_combine(idleSet, sets.defense.PDT)
    end
    return idleSet
end

-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
    if state.TreasureMode.value == 'Fulltime' then
        meleeSet = set_combine(meleeSet, sets.TreasureHunter)
    end
    if state.CapacityMode.value then
        meleeSet = set_combine(meleeSet, sets.CapacityMantle)
    end
    if state.Buff['Souleater'] then
        meleeSet = set_combine(meleeSet, sets.buff.Souleater)
    end
    --meleeSet = set_combine(meleeSet, select_earring())
    return meleeSet
end

-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------

-- Called when the player's status changes.
function job_status_change(newStatus, oldStatus, eventArgs)
    if newStatus == "Engaged" then
        --if state.Buff['Last Resort'] then
        --    send_command('@wait 1.0;cancel hasso')
        --end
        -- handle weapon sets
        if gsList:contains(player.equipment.main) then
            state.CombatWeapon:set("GreatSword")
        elseif scytheList:contains(player.equipment.main) then
            state.CombatWeapon:set("Scythe")
        elseif player.equipment.main == 'Apocalypse' then
            state.CombatWeapon:set('Apocalypse')
        elseif player.equipment.main == 'Anguta' then
            state.CombatWeapon:set('Anguta')
        elseif player.equipment.main == 'Ragnarok' then
            state.CombatWeapon:set('Ragnarok')
        elseif player.equipment.main == 'Caladbolg' then
            state.CombatWeapon:set('Caladbolg')
        elseif player.equipment.main == 'Liberator' then
            state.CombatWeapon:set('Liberator')
        else -- use regular set, which caters to Liberator
            state.CombatWeapon:reset()
        end
        --elseif newStatus == 'Idle' then
        --    determine_idle_group()
    end
end

-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)

    if state.Buff[buff] ~= nil then
        handle_equipping_gear(player.status)
    end

    if S{'haste', 'march', 'embrava', 'geo-haste', 'indi-haste', 'last resort'}:contains(buff:lower()) then
        if (buffactive['Last Resort']) then
            if (buffactive.embrava or buffactive.haste) and buffactive.march then
                state.CombatForm:set("Haste")
                if not midaction() then
                    handle_equipping_gear(player.status)
                end
            end
        else
            if state.CombatForm.current ~= 'DW' and state.CombatForm.current ~= 'SW' then
                state.CombatForm:reset()
            end
            if not midaction() then
                handle_equipping_gear(player.status)
            end
        end
    end
    -- Drain II/III HP Boost. Set SE to stay on.
    if buff == "Max HP Boost" and state.SouleaterMode.value then
        if gain or buffactive['Max HP Boost'] then
            state.SouleaterMode:set(false)
        else
            state.SouleaterMode:set(true)
        end
    end
    -- Make sure SE stays on for BW
    if buff == 'Blood Weapon' and state.SouleaterMode.value then
        if gain or buffactive['Blood Weapon'] then
            state.SouleaterMode:set(false)
        else
            state.SouleaterMode:set(true)
        end
    end
    -- AM custom groups
    if buff:startswith('Aftermath') then
        if player.equipment.main == 'Liberator' then
            classes.CustomMeleeGroups:clear()

            if (buff == "Aftermath: Lv.3" and gain) or buffactive['Aftermath: Lv.3'] then
                classes.CustomMeleeGroups:append('AM3')
                add_to_chat(8, '-------------Mythic AM3 UP-------------')
            -- elseif (buff == "Aftermath: Lv.3" and not gain) then
            --     add_to_chat(8, '-------------Mythic AM3 DOWN-------------')
            end

            if not midaction() then
                handle_equipping_gear(player.status)
            end
        else
            classes.CustomMeleeGroups:clear()

            if buff == "Aftermath" and gain or buffactive.Aftermath then
                classes.CustomMeleeGroups:append('AM')
            end

            if not midaction() then
                handle_equipping_gear(player.status)
            end
        end
    end
    
    -- if  buff == "Samurai Roll" then
    --     classes.CustomRangedGroups:clear()
    --     if (buff == "Samurai Roll" and gain) or buffactive['Samurai Roll'] then
    --         classes.CustomRangedGroups:append('SamRoll')
    --     end
       
    -- end

    --if buff == "Last Resort" then
    --    if gain then
    --        send_command('@wait 1.0;cancel hasso')
    --    else
    --        if not midaction() then
    --            send_command('@wait 1.0;input /ja "Hasso" <me>')
    --        end
    --    end
    --end
end


-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------

-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)

    war_sj = player.sub_job == 'WAR' or false
    get_combat_form()
    get_combat_weapon()
    update_melee_groups()
    select_default_macro_book()
end

-- State buff checks that will equip buff gear and mark the event as handled.
function check_buff(buff_name, eventArgs)
    if state.Buff[buff_name] then
        equip(sets.buff[buff_name] or {})
        if state.TreasureMode.value == 'SATA' or state.TreasureMode.value == 'Fulltime' then
            equip(sets.TreasureHunter)
        end
        eventArgs.handled = true
    end
end

-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function get_combat_form()

    if S{'NIN', 'DNC'}:contains(player.sub_job) and swordList:contains(player.equipment.main) then
        state.CombatForm:set("DW")
    --elseif player.equipment.sub == '' or shields:contains(player.equipment.sub) then
    elseif swordList:contains(player.equipment.main) then
        state.CombatForm:set("SW")
    elseif buffactive['Last Resort'] then
        if (buffactive.embrava or buffactive.haste) and buffactive.march then
            add_to_chat(8, '-------------Delay Capped-------------')
            state.CombatForm:set("Haste")
        else
            state.CombatForm:reset()
        end
    else
        state.CombatForm:reset()
    end
end

function get_combat_weapon()
    state.CombatWeapon:reset()
    if player.equipment.main == 'Apocalypse' then
        state.CombatWeapon:set('Apocalypse')
    elseif player.equipment.main == 'Anguta' then
        state.CombatWeapon:set('Anguta')
    elseif player.equipment.main == 'Ragnarok' then
        state.CombatWeapon:set('Ragnarok')
    elseif player.equipment.main == 'Caladbolg' then
        state.CombatWeapon:set('Caladbolg')
    elseif player.equipment.main == 'Liberator' then
        state.CombatWeapon:set('Liberator')
    elseif gsList:contains(player.equipment.main) then
        state.CombatWeapon:set("GreatSword")
    elseif scytheList:contains(player.equipment.main) then
        state.CombatWeapon:set("Scythe")
    end
end

function aw_custom_aftermath_timers_precast(spell)
    if spell.type == 'WeaponSkill' then
        info.aftermath = {}

        local mythic_ws = "Insurgency"

        info.aftermath.weaponskill = mythic_ws
        info.aftermath.duration = 0

        info.aftermath.level = math.floor(player.tp / 1000)
        if info.aftermath.level == 0 then
            info.aftermath.level = 1
        end

        if spell.english == mythic_ws and player.equipment.main == 'Liberator' then
            -- nothing can overwrite lvl 3
            if buffactive['Aftermath: Lv.3'] then
                return
            end
            -- only lvl 3 can overwrite lvl 2
            if info.aftermath.level ~= 3 and buffactive['Aftermath: Lv.2'] then
                return
            end

            if info.aftermath.level == 1 then
                info.aftermath.duration = 90
            elseif info.aftermath.level == 2 then
                info.aftermath.duration = 120
            else
                info.aftermath.duration = 180
            end
        end
    end
end

-- Call from job_aftercast() to create the custom aftermath timer.
function aw_custom_aftermath_timers_aftercast(spell)
    if not spell.interrupted and spell.type == 'WeaponSkill' and
        info.aftermath and info.aftermath.weaponskill == spell.english and info.aftermath.duration > 0 then

        local aftermath_name = 'Aftermath: Lv.'..tostring(info.aftermath.level)
        send_command('timers d "Aftermath: Lv.1"')
        send_command('timers d "Aftermath: Lv.2"')
        send_command('timers d "Aftermath: Lv.3"')
        send_command('timers c "'..aftermath_name..'" '..tostring(info.aftermath.duration)..' down abilities/aftermath'..tostring(info.aftermath.level)..'.png')

        info.aftermath = {}
    end
end

function display_current_job_state(eventArgs)
    local msg = ''
    msg = msg .. 'Offense: '..state.OffenseMode.current
    msg = msg .. ', Hybrid: '..state.HybridMode.current

    if state.DefenseMode.value ~= 'None' then
        local defMode = state[state.DefenseMode.value ..'DefenseMode'].current
        msg = msg .. ', Defense: '..state.DefenseMode.value..' '..defMode
    end
    if state.CombatForm.current ~= '' then 
        msg = msg .. ', Form: ' .. state.CombatForm.current 
    end
    if state.CombatWeapon.current ~= '' then 
        msg = msg .. ', Weapon: ' .. state.CombatWeapon.current 
    end
    if state.CapacityMode.value then
        msg = msg .. ', Capacity: ON, '
    end
    if state.SouleaterMode.value then
        msg = msg .. ', SE Cancel, '
    end
    -- if state.LastResortMode.value then
    --     msg = msg .. ', LR Defense, '
    -- end
    if state.PCTargetMode.value ~= 'default' then
        msg = msg .. ', Target PC: '..state.PCTargetMode.value
    end
    if state.SelectNPCTargets.value then
        msg = msg .. ', Target NPCs'
    end

    add_to_chat(123, msg)
    eventArgs.handled = true
end

-- Set eventArgs.handled to true if we don't want the automatic display to be run.
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
end

-- Creating a custom spellMap, since Mote capitalized absorbs incorrectly
function job_get_spell_map(spell, default_spell_map)
    if spell.skill == 'Dark Magic' and absorbs:contains(spell.english) then
        return 'Absorb'
    end
    if spell.type == 'Trust' then
        return 'Trust'
    end
end

function select_earring()
    if world.time >= (17*60) or world.time <= (7*60) then
        return sets.Lugra
    else
        return sets.Brutal
    end
end

function update_melee_groups()

    classes.CustomMeleeGroups:clear()
    -- mythic AM	
    if player.equipment.main == 'Liberator' then
        if buffactive['Aftermath: Lv.3'] then
            classes.CustomMeleeGroups:append('AM3')
        end
    else
        -- relic AM
        if buffactive['Aftermath'] then
            classes.CustomMeleeGroups:append('AM')
        end
        -- if buffactive['Samurai Roll'] then
        --     classes.CustomRangedGroups:append('SamRoll')
        -- end
    end
end

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    set_macro_page(10, 8)
end
Offline
Posts: 281
By Galkapryme 2019-07-02 13:30:17  
Ah...I see. Thanks, Asura.Chaostaru.
Offline
Posts: 281
By Galkapryme 2019-07-02 13:50:02  
For the new .lua, what is "sets.Organizer?" That set with weapons in all slots kinda confused me (i.e., main, sub, l.ear, r.ear, l.ring, r.ring all had specific weapons).
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2019-07-02 14:54:37  
Galkapryme said: »
For the new .lua, what is "sets.Organizer?" That set with weapons in all slots kinda confused me (i.e., main, sub, l.ear, r.ear, l.ring, r.ring all had specific weapons).

If you don't use the organizer addon, you can ignore this / delete it. You would also want to remove the line that has "include('organizer-lib')"

Organizer is an addon that will fetch all of the gear in your lua automatically, and store away what you had previously in your inventory back into your safe/case/locker, etc.

Sometimes I want pieces of gear or weapons in my inventory that aren't used in my gear sets. (weapons in particular) sets.Organizer tricks the addon into fetching the pieces. Although, now days I mostly use wardrobe4 for storing weapons, so it's not something I do anymore.
Offline
Posts: 281
By Galkapryme 2019-07-03 04:09:24  
VERY interesting.
Offline
Posts: 281
By Galkapryme 2019-07-03 04:50:53  
AWESOME. I followed your lead on cycling sets. I really only needed it for my DRK right now...toggling between Normal Melee and Double Attack. I'll play with toggling the PDT and MDT at a later point on like PLD or before a heavy long-cast spell or JA from a mob. I think I'll assign them to macros so I don't have to reach for my keyboard every time I need to hit the F-keys. I like to lean back with my gamepad.
Offline
Posts: 281
By Galkapryme 2019-07-14 05:23:07  
Orestes,

You may want to consider adding Great Axe into the DRK weapon cycle and at least Fell Cleave in the WS. Cleaving on DRK can be very useful given the drain spikes, extra damage, and not wanting to switch jobs and gear WAR. I was thinking about doing it myself, but I don't know if I'd just mess it up.

Quetzalcoatl.Orestes said: »
That is based on my lua. It looks outdated though. The updated version is kept here. It has weapon specific sets, and haste modes added earlier this year.

Your questions aren't specific to mine though. Modes and binds function the same way in any lua that uses Mote's library. (to an extent)

You can view the default key bindings for Mote's libs here.

You will find Mote's, and most user luas are "opinionated" on a few key areas. I would suggest just trying to get used to it for the most part, and you'll be much happier in the end. You will have a lua for every job, and you'll want consistency with them. Mote's provide this consistency for us.

OffenseMode is for sets.engaged. It's toggled with the F9 key by default. OffenseMode sets look like sets.engaged, sets.engaged.Mid, and sets.engaged.Acc. you can also place any command you see in a binding into an in-game macro. For example,
Code
gs c cycle OffenseMode

In game, this can be executed in a macro.
Code
/console gs c cycle OffenseMode


HybridMode is for sets.engaged You cycle this with CTRL key + F9. You will equip sets.engaged.PDT. There's a caveat. This set will "combine" with OffenseMode. Example - If you were using the "Acc" offense mode, and toggled into PDT hybrid mode, the set that would be equipped is sets.engaged.Acc.PDT

PhysicalDefenseMode is unique, and works with sets.defense - This is a lesser used set, and it has one unique distinction between HybridModes. When you toggle PhysicalDefenseMode = PDT with F10 key (as seen in link above) your gear will be "locked" into sets.defense.PDT. Casting spells, using JA, WS, etc. will NOT swap gear as they normally do. HybridMode = PDT (sets.engaged.PDT) will still swap gear, so you could easily get 1-shot by an angry mob that catches you WS'ing it.

MagicalDefenseMode is the same, but for sets.defense.MDT and enabled with F11.
One thing that catches people, is they hit F10 or F11 and can't figure out how to exit PDT or MDT mode. For this, you will use CTRL + F12

You can safely ignore idleMode, and WeaponSkillMode for the most part. Mote's libs automatically adjust WeaponskillMode to align with OffenseMode, so you never have to specifically toggle WS modes.

If you want to rebind, you will do it the same way the binds are setup. Take the command examples from the Mote lib I linked above. For example. Binding offense modes to F2.
Code
send_command('bind f2 gs c cycle OffenseMode')


With all of that said, also keep in mind set order is very important. Example - sets.engaged.PDT.Acc is wrong and will not function. sets.engaged.Acc.PDT is correct. If you're constructing sets, use the example sets provided in the lua as strict reference.

HTH. Feel free to DM

Edit: never mind yours does look like the most recent version of my lua
Log in to post.