|
Gearswap Support Thread
Bismarck.Chasuro
Server: Bismarck
Game: FFXI
Posts: 1921
By Bismarck.Chasuro 2018-09-21 11:33:58
I've seen scripts that evaluate what you're doing all the time and changes your gear when you move or stop moving, but I didn't like it.
Set a bind key or macro so you can equip the set you want, whenever you want.
//gs equip sets.engaged.engagedset
Bahamut.Malothar
Server: Bahamut
Game: FFXI
Posts: 396
By Bahamut.Malothar 2018-09-26 12:55:23
Is there something I can put in my lua to make sure I'm always in the right set? Like, when I lag in dyna I end up being stuck in wrong sets a lot till I do something again. For example, I cast flash, it puts me in my enmity set, but then my animation and stuff never even says I finished my flash, so just sit in my enmity set instead of aftercast going and putting me back in my current engaged/idle set.
It's not a fix all, as you may still find yourself in the wrong set for a midcast, but most LUAs based on Mote's have F12 bound as an update/report current state key. Hammering this anytime you get stuck like that will update your sets to whatever you're currently doing.
Along the same lines as this question, I remember reading about a way to insure the correct gear is equipped before a spell will go off. For Geo I used to just give in and full time Dunna to remove the possibility of casting without it. Since coming back to the game though, I've wanted to include Staunch Tathlum +1 in my idle sets. Is there a way to insure that Dunna and Idris are equipped for precast before the spell will even cast? I forget the syntax I read, but I remember it cancelling the spell if the gear wasn't equipped after so long or something. They stay in thru midcast so if I get lagged out for a second, it's not that big of a deal.
Server: Odin
Game: FFXI
Posts: 124
By Odin.Archaide 2018-09-26 21:49:18
Can any have a look at my War lua? When I weapon swap it will only change to Montante +1 but not change to any of the other 3? I cant figure out why.
Code -- Initialization function for this job file.
function get_sets()
mote_include_version = 2
include('Mote-Include.lua')
StartLockStyle = '37'
if pet.isvalid then
else
send_command('wait 3;input /lockstyleset '..StartLockStyle)
end
end
-- //gs debugmode
-- //gs showswaps
function binds_on_load()
send_command('bind F9 gs c mainweapon')
send_command('bind F10 gs c cycle HybridMode')
send_command('bind F11 gs c cycle OffenseMode')
send_command('bind F12 gs c update user')
send_command('bind !F12 gs c cycle IdleMode')
end
function job_setup()
state.mainweapon = M{['description'] = 'Main Weapon'}
--state.mainweapon:options('Chango','Ragnarok','Blurred', 'Montante')
state.mainweapon:options('Chango','Ragnarok','Blurred', 'Montante')
end
function user_setup()
-- Options: Override default values
state.OffenseMode:options('Normal', 'LowAcc', 'MidAcc', 'HighAcc')
state.WeaponskillMode:options('Normal', 'Acc')
state.HybridMode:options('Normal', 'PDT')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal','PDT')
state.PhysicalDefenseMode:options('PDT', 'MDT')
Chango_weapons = S{'Chango'}
Rag_weapons = S{'Ragnarok'}
Shield_weapons = S{'Blurred Shield +1'}
Montante_weapons = S{'Montante +1'}
update_combat_form()
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function file_unload()
if binds_on_unload then
binds_on_unload()
end
end
sets.mainweapon = {}
sets.mainweapon.Chango = {
main="Chango",
sub="Utu Grip",
}
sets.mainweapon.Blurred = {
main="Reikiko",
sub="Blurred Shield +1",
}
sets.mainweapon = {}
sets.mainweapon.Ragnarok = {
main="Ragnarok",
sub="Utu Grip",
}
sets.mainweapon = {}
sets.mainweapon.Montante = {
main="Montante +1",
sub="Utu Grip",
}
DELETED OUT GEARSETS
-- Job-specific hooks for standard casting events.
function job_midcast(spell, action, spellMap, eventArgs)
end
-- Called when the player's status changes.
function job_state_change(field, new_value, old_value)
end
function display_current_job_state(eventArgs)
local msg = 'Melee'
if state.HybridMode.value ~= 'Normal' then
msg = msg .. '/' .. state.HybridMode.value
end
end
function update_combat_form()
-- Check Weapontype
if Chango_weapons:contains(player.equipment.main) then
state.CombatForm:set('Chango')
elseif
Rag_weapons:contains(player.equipment.main) then
state.CombatForm:set('Ragnarok')
elseif
Shield_weapons:contains(player.equipment.sub) then
state.CombatForm:set('Blurred')
elseif
Montante_weapons:contains(player.equipment.main) then
state.CombatForm:set('Montante')
else
state.CombatForm:reset()
end
end
function job_self_command(cmdParams, eventArgs)
command = cmdParams[1]:lower()
if command=='mainweapon' then
enable('main','sub')
mainswap=1
send_command('gs c cycle mainweapon')
end
end
function job_update(cmdParams, eventArgs)
update_combat_form()
end
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)
update_combat_form()
end
-- eventArgs is the same one used in job_precast, in case information needs to be persisted.
moonshade_WS = S{"Resolution", "Upheaval", "Savage Blade", "Ukkos Fury", "Ground Strike", "Scourge", "Steel Cyclone", "Full Break",
"Armor Break", "Kings Justice", "Mistral Axe", "Cloudsplitter", "Shockwave", "Stardiver", "Black Halo", "Judgment", "Hexa Strike"}
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.type == 'WeaponSkill' then
if world.time >= (17*60) or world.time <= (7*60) then
equip({ear2="Lugra Earring +1"})
end
if moonshade_WS:contains(spell.english) and player.tp<2250 then
equip({ear1="Moonshade Earring"})
end
if buffactive['Mighty Strikes'] then
if sets.precast.WS[spell] then
equipSet = sets.precast.WS[spell]
equipSet = set_combine(equipSet,sets.MS_WS)
equip(equipSet)
else
equipSet = sets.precast.WS
equipSet = set_combine(equipSet,sets.MS_WS)
equip(equipSet)
end
end
end
end
function customize_idle_set(idleSet)
if mainswap then
mainswap=1
enable('main','sub')
equip(sets.mainweapon[state.mainweapon.value])
disable('main','sub')
end
if player.mpp < 51 then
return set_combine(idleSet, sets.latent_refresh)
end
if state.Buff.Doom or state.Buff.Curse then
return set_combine(idleSet, sets.Doom)
else
return idleSet
end
end
function customize_melee_set(meleeSet)
if mainswap then
mainswap=1
enable('main','sub')
equip(sets.mainweapon[state.mainweapon.value])
disable('main','sub')
end
if state.Buff.Aftermath then
return set_combine(meleeSet, sets.Aftermath)
end
if state.Buff.Doom then
return set_combine(meleeSet, sets.Doom)
end
if state.Buff.Curse then
return set_combine(meleeSet, sets.Curse)
else
return meleeSet
end
end
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'SAM' then
set_macro_page(1, 4)
elseif player.sub_job == 'NIN' then
set_macro_page(1, 4)
elseif player.sub_job == 'RDM' then
set_macro_page(1, 4)
elseif player.sub_job == 'THF' then
set_macro_page(1, 4)
else
set_macro_page(1, 4)
end
end
By Dsuza 2018-09-26 22:46:21
Hey guys, I just got started on editing a LUA for my WAR. Only done with a few Great Sword OffensiveMode, Weapon Skill, Idle, Hybrid, Physicaldefense mode sets so far.
I was starting to type this huge detailed post out of my problems.
But I'm just going to make it short and sweet. Maybe it's a easy fix:
To make a long story short, I can't switch between OffensiveMode, WeaponskillMode, PhysicaldefenseMode, and HybridMode sets while engaged.Also, the same problem trying to switch between them as well. Like if I'm in 'Normal' Offensive mode and try to switch to 'Mid' while engaged, nothing happens, Or of I am in any offensive mode and try to switch a diff ws mode and WS, it'll WS in the WS mode i was in when I engaged. Also if i am in offensive mode and try to switch to hybrid mode while engaged, nothing happens, etc. When I cycle/toggle while engaged, they do not change. However, If I cycle to a different offensive, weaponskill, hybrid, mode etc set when I'm not engaged, than I engage, it will be in the correct set. I would like it to change while I am also engaged when I cycle between them please.
Code ----------------------------------------------
-- Initialization function required for --
-- this to work properly --
----------------------------------------------
function get_sets()
mote_include_version = 2
include('Mote-Include.lua')
end
--------------------------
-- Job Setup Section --
--------------------------
function job_setup()
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')
state.CapacityMode = M(false, 'Capacity Point Mantle')
--[[ Correction to the errors in the Mote libs]]
absorbs = S{ 'Absorb-STR', 'Absorb-DEX', 'Absorb-VIT', 'Absorb-AGI',
'Absorb-INT', 'Absorb-MND', 'Absorb-CHR', 'Absorb-Attri',
'Absorb-ACC', 'Absorb-TP'
}
--[[ Define the Weapon Skills that benefit from Moonshade Earring ]]
moonshade_WS = S{"Tachi: Fudo", "Tachi: Jinpu", "Cross Reaper", "Quietus",
"Entropy", "Insurgency", "Savage Blade", "Vorpal Blade",
"Requiescat", "Sanguine Blade", "Chant du Cygne","Resolution"}
get_combat_form()
get_combat_weapon()
update_melee_groups()
define_rune_info()
end
--------------------------
-- User Setup Section --
--------------------------
function user_setup()
state.OffenseMode:options('Normal', 'Mid', 'Acc')
state.HybridMode:options ('Normal', 'PDT')
state.WeaponskillMode:options('Normal', 'Mid', 'Acc')
state.CastingMode:options('Normal', 'Resistant', 'Enmity')
state.PhysicalDefenseMode:options('PDT')
state.IdleMode:options('Normal','PDT')
-- state.WeaponMode = M{ 'Amanomurakumo', 'Masamune'}
--[[ Overriding default hotkeys ]]
send_command('bind !f9 gs c cycle WeaponskillMode') --F11
send_command('bind f9 gs c cycle OffenseMode')
-- send_command('bind f5 gs c cycle WeaponMode')
--[[ Additional User Defined Settings ]]
select_default_macro_book()
--[[ set_lockstyle()--]]
--[[ Section for Rune Fencer sub job to diplay which rune ]]
state.Runes = M{['description']='Rune',
"Ignis",
"Gelus",
"Flabra",
"Tellus",
"Sulpor",
"Unda",
"Lux",
"Tenebrae"
}
state.Rune = M{['description']='which',
"Fire Dmg | Ice Resist: Paralyze, Bind, Frost",
"Ice Dmg | Wind Resist: Choke, Gravity, Silence",
"Wind dmg | Earth Resist: Slow, Petrify, Rasp",
"Earth dmg | Lightning Resist: Stun, Shock",
"Lightning Dmg | Water Resist: Poison, Drown",
"Water dmg | Fire Resist: Addle, Burn, Plague, Amnesia",
"Light Dmg | Dark Resist's: Blind, Bio, Sleep",
"Dark Dmg | Light Resist's: Repose, Dia, Charm"
}
send_command('bind ^` input //gs c rune')
send_command('bind ^- gs c cycleback Runes')
send_command('bind ^= gs c cycle Runes')
end
--------------------------------------
-- Elements for skillchain names --
--------------------------------------
skillchain_elements = {}
skillchain_elements.Light = S{'Light','Fire','Wind','Lightning'}
skillchain_elements.Darkness = S{'Dark','Ice','Earth','Water'}
skillchain_elements.Fusion = S{'Light','Fire'}
skillchain_elements.Fragmentation = S{'Wind','Lightning'}
skillchain_elements.Distortion = S{'Ice','Water'}
skillchain_elements.Gravitation = S{'Dark','Earth'}
skillchain_elements.Transfixion = S{'Light'}
skillchain_elements.Compression = S{'Dark'}
skillchain_elements.Liquification = S{'Fire'}
skillchain_elements.Induration = S{'Ice'}
skillchain_elements.Detonation = S{'Wind'}
skillchain_elements.Scission = S{'Earth'}
skillchain_elements.Impaction = S{'Lightning'}
skillchain_elements.Reverberation = S{'Water'}
--------------------------------------------------
-- This section is called when you change jobs --
--------------------------------------------------
function file_unload()
send_command('unbind ^`')
send_command('unbind !=')
send_command('unbind ^[')
send_command('unbind ![')
send_command('unbind @f9')
end
----------------------------------------------
-- This tells Gearswap what sets to fetch --
-- Reccomend creating a Car file. --
----------------------------------------------
function init_gear_sets()
----------------------
-- Field/Town Idle --
----------------------
sets.idle = {ammo="Staunch Tathlum +1",
head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
body="Arke Corazza",
hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
legs="Arke Cosciales",
feet="Hermes' Sandals",
neck="Sanctity Necklace",
waist="Flume Belt",
left_ear="Odnowa Earring",
right_ear="Odnowa Earring +1",
left_ring="Moonbeam Ring",
right_ring="Defending Ring",
back="MoonLight Cape",
}
--[[ sets.idle.Town = set_combine(sets.idle, {
ring1="Dark Ring"
})--]]
sets.idle.PDT = { ammo="Staunch Tathlum +1",
head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
body="Arke Corazza",
hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
legs="Arke Cosciales",
feet={ name="Souveran Schuhs +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Odnowa Earring",
right_ear="Odnowa Earring +1",
left_ring="Moonbeam Ring",
right_ring="Defending Ring",
back="MoonLight Cape",
}
----------------------------------
-- Job Ability sets --
----------------------------------
--[[ sets.precast.JA['Diabolic Eye'] = {
hands="Abyss gauntlets +2"
}
sets.precast.JA['Diabolic Eye'] = {
hands="Fallen's Finger Gauntlets"
}--]]
sets.precast.JA['Berserk'] = {feet="Agoge Calligae +3",body="Pummeler's Lorica +3",back="Cichol's Mantle"}
sets.precast.JA['Warcry'] = {head="Agoge Mask +1"}
sets.precast.JA['Aggressor'] = {body="Agoge Lorica +2",head="Pummeler's Mask +2"}
sets.precast.JA['Blood Rage'] = {body="Boii Lorica"}
sets.precast.JA['Retaliation'] = {feet="Boii Calligae",hands="Pummeler's Mufflers +1"}
sets.precast.JA['Restraint'] = {hands="Boii Mufflers"}
sets.precast.JA['Mighty Strikes'] = {hands="Agoge Mufflers"}
sets.precast.JA["Warrior's Charge"] = {legs="Agoge Cuisses"}
sets.precast.JA['Tomahawk'] = {ammo="Throwing Tomahawk"}
--------------------------------------
-- Casting Gear sets --
--------------------------------------
sets.precast.FC = {ammo="Sapience Orb",
head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
body="Arke Corazza",
hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
legs="Arke Cosciales",
feet={ name="Odyssean Greaves", augments={'Accuracy+23 Attack+23','"Fast Cast"+3','AGI+2',}},
neck={ name="Jeweled Collar", augments={'"Fast Cast"+3','MP recovered while healing +2','INT+4',}},
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Lebeche Ring",
back="Moonlight Cape",
}
sets.midcast.FastRecast = {ammo="Sapience Orb",
head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
body="Arke Corazza",
hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
legs="Arke Cosciales",
feet={ name="Odyssean Greaves", augments={'Accuracy+23 Attack+23','"Fast Cast"+3','AGI+2',}},
neck={ name="Jeweled Collar", augments={'"Fast Cast"+3','MP recovered while healing +2','INT+4',}},
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Lebeche Ring",
back="MoonLight Cape",
}
------------------------------
-- Enmity Section --
------------------------------
sets.Enmity = { ammo="Sapience Orb",
head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
body="Emet Harness +1",
hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
legs="Pumm. Cuisses +3",
feet="Hermes' Sandals",
neck="Warder's Charm",
waist="Flume Belt",
left_ear="Friomisi Earring",
right_ear="Cryptic Earring",
left_ring="Moonbeam Ring",
right_ring="Petrov Ring",
back="MoonLight Cape",
}
-- Scythe Engaged sets --
--------------------------------------
--[[ Non-REMA GA Set]]
--
sets.engaged.Ragnarok = {
main="Ragnarok",
sub="Utu Grip",
ammo="Yetshila +1",
head="Flam. Zucchetto +2",
body={ name="Valorous Mail", augments={'"Counter"+3','Crit.hit rate+3','Quadruple Attack +3',}},
hands={ name="Valorous Mitts", augments={'Accuracy+23 Attack+23','Crit.hit rate+4','DEX+14',}},
legs={ name="Odyssean Cuisses", augments={'Accuracy+30','"Store TP"+8','DEX+10',}},
feet={ name="Valorous Greaves", augments={'Pet: Haste+2','Quadruple Attack +3','Mag. Acc.+7 "Mag.Atk.Bns."+7',}},
neck="Ainia Collar",
waist="Ioskeha Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Flamma Ring",
right_ring="Niqmaddu Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
}
sets.engaged.Ragnarok.Mid = {
main="Ragnarok",
sub="Utu Grip",
ammo="Yetshila +1",
head="Flam. Zucchetto +2",
body={ name="Valorous Mail", augments={'Accuracy+20','"Store TP"+4','Accuracy+11 Attack+11',}},
hands="Sulev. Gauntlets +2",
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Ainia Collar",
waist="Ioskeha Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Niqmaddu Ring",
right_ring="Flamma Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
}
sets.engaged.Ragnarok.Acc = {
main="Ragnarok",
sub="Utu Grip",
ammo="Ginsen",
head="Flam. Zucchetto +2",
body={ name="Emicho Haubert +1", augments={'HP+65','DEX+12','Accuracy+20',}},
hands={ name="Emi. Gauntlets +1", augments={'HP+65','DEX+12','Accuracy+20',}},
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Combatant's Torque",
waist="Ioskeha Belt +1",
left_ear="Telos Earring",
right_ear="Mache Earring +1",
left_ring="Regal Ring",
right_ring="Flamma Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
}
sets.engaged.Montante = {
main="Montante +1",
sub="Utu Grip",
ammo="Ginsen",
head="Flam. Zucchetto +2",
body={ name="Valorous Mail", augments={'"Counter"+3','Crit.hit rate+3','Quadruple Attack +3',}},
hands={ name="Valorous Mitts", augments={'Accuracy+23 Attack+23','Crit.hit rate+4','DEX+14',}},
legs={ name="Odyssean Cuisses", augments={'Accuracy+30','"Store TP"+8','DEX+10',}},
feet={ name="Valorous Greaves", augments={'Pet: Haste+2','Quadruple Attack +3','Mag. Acc.+7 "Mag.Atk.Bns."+7',}},
neck="Ainia Collar",
waist="Ioskeha Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Niqmaddu Ring",
right_ring="Flamma Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
}
sets.engaged.Montante.Mid = {
main="Montante +1",
sub="Utu Grip",
ammo="Ginsen",
head="Flam. Zucchetto +2",
body={ name="Valorous Mail", augments={'Accuracy+20','"Store TP"+4','Accuracy+11 Attack+11',}},
hands="Sulev. Gauntlets +2",
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Ainia Collar",
waist="Ioskeha Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Niqmaddu Ring",
right_ring="Flamma Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
}
sets.engaged.Montante.Acc = {
main="Montante +1",
sub="Utu Grip",
ammo="Ginsen",
head="Flam. Zucchetto +2",
body={ name="Emicho Haubert +1", augments={'HP+65','DEX+12','Accuracy+20',}},
hands={ name="Emi. Gauntlets +1", augments={'HP+65','DEX+12','Accuracy+20',}},
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Combatant's Torque",
waist="Ioskeha Belt +1",
left_ear="Telos Earring",
right_ear="Mache Earring +1",
left_ring="Regal Ring",
right_ring="Flamma Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
}
sets.engaged.PDT = set_combine(sets.idle, { ammo="Staunch Tathlum +1",
head="Sulevia's Mask +2",
body="Arke Corazza",
hands="Sulev. Gauntlets +2",
-- legs="Pumm. Cuisses +3",
legs={ name="Odyssean Cuisses", augments={'Accuracy+22','"Store TP"+7','MND+4',}},
feet="Pumm. Calligae +3",
neck="Lissome Necklace",
waist="Ioskeha Belt",
left_ear="Telos Earring",
right_ear="Cessance Earring",
left_ring="Moonbeam Ring",
right_ring="Defending Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
})
----------------------------------------------
-- Weaponskill Gearsets --
----------------------------------------------
sets.precast.WS = { ammo="Knobkierrie",
head="Flam. Zucchetto +2",
body={ name="Argosy Hauberk +1", augments={'STR+12','Attack+20','"Store TP"+6',}},
hands={ name="Argosy Mufflers +1", augments={'STR+20','"Dbl.Atk."+3','Haste+3%',}},
legs={ name="Argosy Breeches +1", augments={'STR+12','DEX+12','Attack+20',}},
feet="Pumm. Calligae +3",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Telos Earring",
right_ear="Cessance Earring",
left_ring="Niqmaddu Ring",
right_ring="Flamma Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
}
sets.precast.WS['Scourge'] = set_combine(sets.precast.WS, { ammo="Knobkierrie",
head={ name="Valorous Mask", augments={'Accuracy+24','Weapon skill damage +3%','STR+5',}},
body={ name="Valorous Mail", augments={'Accuracy+27','Weapon skill damage +4%',}},
hands={ name="Valorous Mitts", augments={'Accuracy+28','Weapon skill damage +3%','STR+13',}},
legs={ name="Valor. Hose", augments={'Accuracy+16 Attack+16','Weapon skill damage +3%','DEX+10','Accuracy+15','Attack+5',}},
feet="Sulev. Leggings +2",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
right_ear="Ishvara Earring",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},
})
sets.precast.WS['Fell Cleave'] = set_combine(sets.precast.WS['Scourge'])
sets.precast.WS['Resolution'] = set_combine(sets.precast.WS, { ammo="Knobkierrie",
head={ name="Valorous Mask", augments={'Accuracy+24','Weapon skill damage +3%','STR+5',}},
body="Pumm. Lorica +3",
hands={ name="Odyssean Gauntlets", augments={'Accuracy+22 Attack+22','Weapon skill damage +4%','VIT+1','Attack+2',}},
legs={ name="Odyssean Cuisses", augments={'Accuracy+18','Weapon skill damage +5%','VIT+2',}},
feet="Sulev. Leggings +2",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
right_ear="Ishvara Earring",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},
})
sets.precast.WS['Upheaval'] = { ammo="Knobkierrie",
head={ name="Odyssean Helm", augments={'Accuracy+18 Attack+18','Weapon skill damage +2%','AGI+3','Accuracy+12','Attack+7',}},
body="Pumm. Lorica +3",
hands={ name="Odyssean Gauntlets", augments={'Accuracy+22 Attack+22','Weapon skill damage +4%','VIT+1','Attack+2',}},
legs={ name="Odyssean Cuisses", augments={'Accuracy+18','Weapon skill damage +5%','VIT+2',}},
feet="Sulev. Leggings +2",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Ishvara Earring",
right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','Accuracy+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},
}
sets.precast.WS['Full Break'] = set_combine(sets.precast.WS, { ammo="Pemphredo Tathlum",
head="Flam. Zucchetto +2",
body={ name="Jumalik Mail", augments={'HP+15','"Refresh"+1',}},
hands="Flam. Manopolas +2",
legs={ name="Founder's Hose", augments={'MND+7','Mag. Acc.+10','Attack+10',}},
feet="Flam. Gambieras +2",
neck="Sanctity Necklace",
waist="Eschan Stone",
left_ear={ name="Moonshade Earring"},
right_ear="Telos Earring",
left_ring="Stikini Ring",
right_ring="stikini Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},
})
sets.precast.WS['Ukkos Fury'] = set_combine(sets.precast.WS, { ammo="Yetshila",
head="Valorous mask",
body="Argosy Hauberk +1",
hands="Flamma Manopolas +2",
legs="Pumm. Cuisses +3",
feet="Pummeler's Calligae +3",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Brutal Earring",
right_ear={ name="Moonshade Earring"},
left_ring="Niqmaddu Ring",
right_ring="Petrov Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
})
-- [[ sets.precast.WS['Resolution'].Mid = set_combine(sets.precast.WS['Resolution'], {
-- right_ring="Ramuh Ring +1",
-- })
sets.precast.WS['Upheaval'].Mid = { ammo="Knobkierrie",
head={ name="Odyssean Helm", augments={'Accuracy+18 Attack+18','Weapon skill damage +2%','AGI+3','Accuracy+12','Attack+7',}},
body="Pumm. Lorica +3",
hands={ name="Odyssean Gauntlets", augments={'Accuracy+22 Attack+22','Weapon skill damage +4%','VIT+1','Attack+2',}},
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
right_ear="Ishvara Earring",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','Accuracy+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},
}
sets.precast.WS['Resolution'].Acc = set_combine(sets.precast.WS['Resolution'].Mid, { ammo="Seeth. Bomblet +1",
head="Flam. Zucchetto +2",
body="Pumm. Lorica +3",
hands="Sulev. Gauntlets +2",
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
right_ear="Telos Earring",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
})
sets.precast.WS['Upheaval'].Acc = set_combine(sets.precast.WS['Upheaval'].Mid, { ammo="Knobkierrie",
head="Pummeler's Mask +2",
body="Pumm. Lorica +3",
hands={ name="Odyssean Gauntlets", augments={'Accuracy+22 Attack+22','Weapon skill damage +4%','VIT+1','Attack+2',}},
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
right_ear="Ishvara Earring",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','Accuracy+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},
})
-- }) --]]
-- Savage Blade
-- Fragmentation/Scission
sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, { ammo="Knobkierrie",
head={ name="Valorous Mask", augments={'Accuracy+24','Weapon skill damage +3%','STR+5',}},
body={ name="Valorous Mail", augments={'Accuracy+27','Weapon skill damage +4%',}},
hands={ name="Valorous Mitts", augments={'Accuracy+28','Weapon skill damage +3%','STR+13',}},
legs={ name="Valor. Hose", augments={'Accuracy+16 Attack+16','Weapon skill damage +3%','DEX+10','Accuracy+15','Attack+5',}},
feet="Sulev. Leggings +2",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Brutal Earring",
right_ear={ name="Moonshade Earring"},
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},
})
sets.precast.WS['Savage Blade'].Mid = set_combine(sets.precast.WS['Savage Blade'], {
right_ring={ name="Ramuh Ring +1", bag="wardrobe2"},
})
sets.precast.WS['Savage Blade'].Acc = set_combine(sets.precast.WS['Savage Blade'].Mid, {
left_ring={ name="Ramuh Ring +1", bag="wardrobe"},
})
----------------------
-- Misc. Gearsets --
----------------------
sets.Reive = {
neck="Adoulin's Refuge +1"
}
sets.buff.Doom = {
ring2="Purity Ring"
}
sets.Reraise = {
head="Twilight helm",
body="Twilight mail"
}
sets.regen = {
head="Twilight helm",
body="Twilight mail",
neck="Sanctity Necklace",
ring1="Paguroidea Ring",
}
sets.PDT = set_combine(sets.idle, { ammo="Staunch Tathlum +1",
head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
body="Arke Corazza",
hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
legs="Arke Cosciales",
feet={ name="Souveran Schuhs +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Odnowa Earring",
right_ear="Odnowa Earring +1",
left_ring="Moonbeam Ring",
right_ring="Defending Ring",
back="MoonLight Cape",
})
sets.defense.PDT = set_combine(sets.idle, { ammo="Staunch Tathlum +1",
head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
body="Arke Corazza",
hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
legs="Arke Cosciales",
feet={ name="Souveran Schuhs +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Odnowa Earring",
right_ear="Odnowa Earring +1",
left_ring="Moonbeam Ring",
right_ring="Defending Ring",
back="MoonLight Cape",
})
end
--------------------------
-- Custom Idle Gearset --
--------------------------
function customize_idle_set(idleSet)
--[[ if player.mpp < 50 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
if player.mpp < 80 then
idleSet = set_combine(idleSet, sets.refresh)
end
if player.hpp < 80 then
idleSet = set_combine(idleSet, sets.regen)
end --]]
if state.Buff.Doom then
idleSet = set_combine(idleSet, sets.buff.Doom)
end
--[[ if buffactive['Weakness'] then
equip({head="Twilight helm", body="Twilight mail"})
disable('head', 'body')
else
enable('head', 'body')
end --]]
if state.CapacityMode.value then
idleSet = set_combine(idleSet, sets.CapacityMantle)
end
if S{"Eastern Adoulin","Western Adoulin"}:contains(world.area) then
idleSet = set_combine(idleSet,{body="Councilor's Garb", head="Jumalik helm"})
end
return idleSet
end
------------------------------
-- Custom melee Gearset --
------------------------------
function customize_melee_set(meleeSet)
if state.Buff.Sleep and player.hp > 120 and player.status == "Engaged" then
-- Equip Berserker's Torque When You Are Asleep
meleeSet = set_combine(meleeSet,{neck="Berserker's Torque"})
end
if player.hp < 800 then
meleeSet = set_combine(meleeSet, sets.defense.PDT)
add_to_chat(8, 'Low HP" Switching to PDT set')
end
--[[ if player.hp < 800 then
meleeSet = set_combine(meleeSet, sets.Reraise)
add_to_chat(8, 'Low HP" Switching to PDT set')
end--]]
if state.Buff.Doom then
meleeSet = set_combine(meleeSet, sets.buff.Doom)
end
if state.Buff['Souleater'] then
meleeSet = set_combine(meleeSet, sets.buff.Souleater)
end
--[[ if spell.type=='WeaponSkill' and state.Buff['Souleater'] then
if moonshade_WS:contains(spell.english) and player.tp < 2900 then
equip({left_ear="Moonshade Earring"})
end
end--]]
--[[ if buffactive['Weakness'] then
equip({head="Twilight helm", body="Twilight mail"})
add_to_chat(8, '--ReRaise Set Engaged--')
else
enable('head', 'body')
end--]]
if state.CapacityMode.value then
meleeSet = set_combine(meleeSet, sets.CapacityMantle)
end
--[[ if buffactive['Arcane Circle'] then
meleeSet = set_combine(meleeSet, {body="Founder's Breastplate"})
end--]]
return meleeSet
end
----------------------------------------------
-- General hooks for setting combat state --
----------------------------------------------
------------------------------------------------------------------
-- 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_status_change(newStatus, oldStatus, eventArgs)
if newStatus == "Engaged" then
-- handle weapon sets
if player.equipment.main == 'Ragnarok' then
state.CombatWeapon:set('Ragnarok')
elseif gsList:contains(player.equipment.main) then
state.CombatWeapon:set("GreatSword")
elseif player.equipment.main == 'Montante +1' then
state.CombatWeapon:set('Montante')
elseif player.equipment.main == 'Dojikiri Yasutsuna' then
state.CombatWeapon:set('Dojikiri Yasutsuna')
end
end
end
function job_update(cmdParams, eventArgs)
war_sj = player.sub_job == 'WAR' or false
get_combat_form()
get_combat_weapon()
update_melee_groups()
end
function get_combat_form()
-- if buffactive['Last Resort'] and buffactive.haste then
-- add_to_chat(8, '---Weapon Delay Capped---')
-- elseif (buffactive.haste and buffactive.hasso and buffactive.march == 2) then
-- add_to_chat(8, '---Weapon Delay is not Capped---')
-- end
------------------------------------------------------
-- Can add in more here this is just a placeholder --
------------------------------------------------------
end
function get_combat_weapon()
state.CombatWeapon:reset()
end
function job_state_change(stateField, newValue, oldValue)
--nothing added in here
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
elseif buffactive['Aftermath'] then
classes.CustomMeleeGroups:append('AM')
end
if buffactive['Samurai Roll'] then
classes.CustomRangedGroups:append('SamRoll')
end
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
end
----------------------
-- Precast section --
----------------------
function job_post_precast(spell, action, spellMap, eventArgs)
--[[ if spell.type == 'WeaponSkill' then
if world.time >= 17*60 or world.time < 7*60 then -- Dusk to Dawn time.
equip({ear1="Lugra Earring +1", ear2="Lugra Earring"})
end
end--]]
if spell.action_type=="Magic" and buffactive.Silence then
eventArgs.cancel = true
send_command('input /item "Echo Drops" <me>')
end
if spell.type=='WeaponSkill' then
if moonshade_WS:contains(spell.english) and player.tp < 2900 then
equip({left_ear="Moonshade Earring"})
end
end
if spell.type == 'WeaponSkill' then
if state.Buff['Souleater'] then
equip(sets.buff.Souleater)
end
end
--[[ Lock weaponskill if you are to far from the mob as to not lose TP ]]
if spell.type == 'WeaponSkill' then
if spell.target.distance > 8 then
cancel_spell()
add_to_chat(8, 'Target to far away. Move closer')
return
end
end
end
----------------------
-- Midcast Section --
----------------------
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast['Elemental Magic'], {waist="Hachirin-no-Obi"})
end
end
--[[ if S{"Tachi: Jinpu","Tachi: Fudo","Catastrophe","Scourge","Cross Reaper"}:contains(spell.english) and (spell.element==world.day_element or spell.element==world.weather_element) then
equip({head="Gavialis Helm"})
end--]]
if S{"Drain","Drain II","Drain III", "Aspir", "Aspir II", "Aspir III"}:contains(spell.english) and (spell.element==world.day_element or spell.element==world.weather_element) then
equip({waist="Hachirin-no-obi"})
end
--[[ equip(sets.MAXDrain)
add_to_chat(100,'WARNING: Misanthropy is now equiped ** Manually Swap weapons ***')
end--]]
if buffactive['Dark Seal'] and S{"Drain III"}:contains(spell.english)then
equip({head="Fallen's Burgeonet +1"})
end
if buffactive['Dark Seal'] and S{"Absorb-STR"}:contains(spell.english)then
equip({head="Fallen's Burgeonet +1"})
end
if buffactive['Dark Seal'] and S{"Absorb-VIT"}:contains(spell.english)then
equip({head="Fallen's Burgeonet +1"})
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
state.Buff[buff] = gain
handle_equipping_gear(player.status)
end
if buff:lower()=='terror' or buff:lower()=='petrification' or buff:lower()=='sleep' or buff:lower()=='stun' then
if gain then
equip(sets.defense.PDT)
add_to_chat(8, 'PDT set is equiped')
elseif not gain then
handle_equipping_gear(player.status)
end
end
if buff:lower()=='sleep' then
if gain and player.hp > 120 and player.status == "Engaged" then -- Equip Berserker's Torque / frenzy When You Are Asleep
equip({neck="Berserker's Torque"})
elseif not gain then -- Take Berserker's off
handle_equipping_gear(player.status)
end
end
if buffactive['Reive Mark'] then
equip(sets.Reive)
disable('neck')
else
enable('neck')
end
if buffactive['Souleater'] then
equip({head="Ig. Burgonet +3"})
disable('Head')
add_to_chat(100,'WARNING: Souleater set equiped.')
else
enable('Head')
end
if buffactive['Blood Weapon'] and buffactive['Souleater'] and player.hp > 8000 then
equip({main="Dacnomania", head="Ig. Burgonet +3"})
disable('Head')
--add_to_chat(100,'WARNING: SOUL EATER HEAD ON AND &&&& Dacnomania.')
else
enable('Head')
end
if buff == "doom" then
if gain then
equip(sets.buff.Doom)
--send_command('@input /p Doomed please cursna.')
send_command('@input /item "Holy Water" <me>')
disable('ring1','ring2','waist')
else
enable('ring1','ring2','waist')
handle_equipping_gear(player.status)
end
end
--[[ Checks if Last resort is active if so cancels Hasso, will put
hasso back on after Last Resort falls off. ]]
if buff == "Last Resort" and player.status == 'Engaged' then
if gain then
send_command('@wait 1.0;cancel hasso')
elseif not midaction() then
send_command('@wait 1.0;input /ja "Hasso" <me>')
end
end
--[[ Drain II 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, '-------------AM3 UP-------------')
end
if not midaction() then
handle_equipping_gear(player.status)
end
else
classes.CustomMeleeGroups:clear()
if player.equipment.main == "Masamune" then
if buff == "Aftermath" and gain or buffactive.Aftermath then
classes.CustomMeleeGroups:append('AM')
add_to_chat(8, '--Masamune haste is active. Switching to AM set--')
end
end
if player.equipment.main == 'Amanomurakumo' then
if buff == 'Aftermath' and gain then
add_to_chat(8, '---Amanomurakumo AM active providing Crit---')
end
end
if not midaction() then
handle_equipping_gear(player.status)
end
end
end--]]
end
----------------------------------
-- Sub job section for Ninja --
----------------------------------
ninjaTools = {
Utsusemi = S{"Shihei",},--"Shikanofuda"
Hojo = S{"Kaginawa",},--"Chonofuda"
Migawari = S{"Mokujin",},
Kakka = S{"Ryuno",},
Tonko = S{"Shinobi-tabi",},
Kurayami = S{"Sairui-Ran",},
Raiton = S{"Hiraishin",},
Hyoton = S{"Tsurara",},
Monomi = S{"Sanjaku-Tenugui",},
}
function job_precast(spell, action, spellMap, eventArgs)
if spell.type=="Ninjutsu" then check_tools(spell) end
end
function check_tools(spell)
for prefix,tools in pairs(ninjaTools) do
if spell.english:startswith(prefix) then
for tool in tools:it() do
if not player.inventory[tool] then
add_to_chat(100,'WARNING: You are out of '..tool..'.')
elseif player.inventory[tool].count < 10 then
add_to_chat(100,'WARNING: You are low on '..tool..'. '..player.inventory[tool].count..' remaining.')
end
end
end
end
end
--------------------------------------------------------------
-- Rune Fencer Sub Job section for displaying rune info --
--------------------------------------------------------------
function define_rune_info()
rune_info = {
["Ignis"] = {damage="Fire", resistance="Ice"},
["Gelus"] = {damage="Ice", resistance="Wind"},
["Flabra"] = {damage="Wind", resistance="Earth"},
["Tellus"] = {damage="Earth", resistance="Lightning"},
["Sulpor"] = {damage="Lightning", resistance="Water"},
["Unda"] = {damage="Water", resistance="Fire"},
["Lux"] = {damage="Light", resistance="Darkness"},
["Tenebrae"]= {damage="Darkness", resistance="Light"},
}
end
function display_rune_info(spell)
runeinfo = rune_info[spell.english]
if runeinfo then
add_to_chat(122, '*'..spell.english..' is '..runeinfo.damage..'-based dmg. and '..runeinfo.resistance..' resistance*')
end
end
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'rune' then
send_command('@input /ja '..state.Runes.value..' <me>')
end
end
------------------------------------------------------------------
-- Selecting and Setting the default Macro book and Lock style --
------------------------------------------------------------------
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'DRK' then
set_macro_page(10, 12)
elseif player.sub_job == 'SAM' then
set_macro_page(1, 10)
elseif player.sub_job == 'RUN' --[[and player.equipment.main == '['Dojikiri Yasutsuna']'--]] then
set_macro_page(2, 12)
elseif player.sub_job == 'THF' then
set_macro_page(3, 12)
else
set_macro_page(1, 12)
end
end
--[[function set_lockstyle()
send_command('wait 4; input /lockstyleset 1')
end--]]
Bismarck.Ringoko
Server: Bismarck
Game: FFXI
By Bismarck.Ringoko 2018-09-27 02:40:58
Does anybody know the proper 'buff' name for paralysis?
Can't get the party announcement to function. Code function job_buff_change(buff,gain)
if buff == 'Saber Dance' or buff == 'Climactic Flourish' or buff == 'Fan Dance' or buff == 'Striking Flourish' then
handle_equipping_gear(player.status)
end
if buff == "doom" then
if gain then
equip(sets.buff.Doom)
send_command('@input /p Doomed.')
disable('ring1','ring2','waist')
else
enable('ring1','ring2','waist')
handle_equipping_gear(player.status)
end
end
if buff =="sleep" then
if gain then
send_command('@input /p zZZzZZzZzz')
end
end
if buff =="paralysis" then
if gain then
send_command('@input /p Paralyzed...')
end
end
if buff =="slow" then
if gain then
send_command('@input /p Slowed')
end
end
if buff =="blindness" then
if gain then
send_command('@input /p Blind')
end
end
end
By Wotasu 2018-09-27 04:42:57
Hi, I have a small problem with my Cor Lua where it announce in say,
my rolls Lucky and Unlucky numbers every Roll/DoubleUp.
I cant seem to find a solution and I think this is where the problem is somewhere..
I could remove the line but I would like to keep the info in echo.
function display_roll_info(spell)
rollinfo = rolls[spell.english]
local rollsize = (state.LuzafRing.value and 'Large') or 'Small'
if rollinfo then
add_to_chat (55, '[ Lucky: '..tostring(rollinfo.lucky)..' / Unlucky: '..tostring(rollinfo.unlucky)..' ] '..spell.english..': '..rollinfo.bonus..' ('..rollsize..') ')
end
By Sammeh 2018-09-27 06:29:15
add_to_chat isn't putting things in say - the '55' there may be the same color/font as say, but it's echo'd to screen not actually '/say'
You can change that '55' to be other colors - just experiment. If you use battlemod then can do //battlemod colortest to see all the colors.
By Wotasu 2018-09-27 07:21:12
Oh I know about the color part, but it is still putting it in /say I have checked with friends.
Can there be something else in the lua that decides where to put the information?
So w/o doing any changes it now works oddly enough..
By orphenPUP 2018-09-28 02:35:43
Im having some challenges with my global file.
I have moved my augmented gear into it, and updated my job lua to reflect the changes.
Reloading gearswap.
All other equipment changes but none of the augmented equipment.
Moving the entries from the global file into the job file lua. The swaps work.
I have the gearswap folder, then a folder for each of my characters. I place the global file and the job files in that folder.
My Global file
https://pastebin.com/NqydZtvP
My Lua
https://pastebin.com/cE9rU2E3
Server: Cerberus
Game: FFXI
Posts: 1809
By Cerberus.Shadowmeld 2018-09-28 09:00:31
In your Mote-Include.lua file find this section
Code
include('Mote-Globals')
optional_include({'user-globals.lua'})
optional_include({player.name..'-globals.lua'})
add this line Code
optional_include({'Global.lua'})
Server: Sylph
Game: FFXI
Posts: 184
By Sylph.Subadai 2018-09-28 15:18:06
Hey guys, I just got started on editing a LUA for my WAR. Only done with a few Great Sword OffensiveMode, Weapon Skill, Idle, Hybrid, Physicaldefense mode sets so far.
I was starting to type this huge detailed post out of my problems.
But I'm just going to make it short and sweet. Maybe it's a easy fix:
To make a long story short, I can't switch between OffensiveMode, WeaponskillMode, PhysicaldefenseMode, and HybridMode sets while engaged.Also, the same problem trying to switch between them as well. Like if I'm in 'Normal' Offensive mode and try to switch to 'Mid' while engaged, nothing happens, Or of I am in any offensive mode and try to switch a diff ws mode and WS, it'll WS in the WS mode i was in when I engaged. Also if i am in offensive mode and try to switch to hybrid mode while engaged, nothing happens, etc. When I cycle/toggle while engaged, they do not change. However, If I cycle to a different offensive, weaponskill, hybrid, mode etc set when I'm not engaged, than I engage, it will be in the correct set. I would like it to change while I am also engaged when I cycle between them please.
I'm no expert on Mote-libs, but the first thing I notice is that you only have logic for checking which weapon you're using in job_status_change(), which means that the right equipment sets will be chosen only when you change status from idle->engaged, engaged->idle, etc. So that might explain a few things. Typically you want to have that logic in a custom function which you call from several places like job_setup(), job_status_change(), and job_update(). I would move the CombatWeapon logic into get_combat_weapon() and call it from the three above-mentioned places (it already is from a couple of them). I don't know if job_update() is called when you change modes via hotkey. But if you had to, you could just append 'gs c update' to your binds. You also might want to define some plain sets.engaged, sets.engaged.Mid, and sets.engaged.Acc if things still don't work, or in case you find yourself equipping a new/different weapon.
Code function get_combat_weapon()
if newStatus == "Engaged" then
-- handle weapon sets
if player.equipment.main == 'Ragnarok' then
state.CombatWeapon:set('Ragnarok')
elseif player.equipment.main == 'Montante +1' then
state.CombatWeapon:set('Montante')
else
--Neither Rag nor Montante equipped, use sets.engaged
state.CombatWeapon:reset()
end
end
end
Code function job_status_change(newStatus, oldStatus, eventArgs)
get_combat_weapon()
end
By Dsuza 2018-09-29 14:41:19
Hey guys, I still haven't been able to solve the problem I've been having.
Subadai spent a lot of time trying to help, but no luck.
So I think a easier way is just to try to find a WAR LUA that already works, and then edit it with my gear, instead of going through all of this trouble.
Could someone please PM me or Post a Mote WAR LUA here that when you cycle between Offensive mode, WeaponSkillMode, and HybridMode, while engaged, it will change to that set right then, while still engaged?
Also, I like to use different Offensive Mode sets for the same type of weapon, depending what kind of weapon is it. For example, Great Sword, I like to have different TP sets for Rag and Montante,
I would really appreciate if someone could post or PM me something I could use as a base to edit with my stuff. I would really appreciate it
Thank you very much in advance
Ragnarok.Lockfort
Server: Ragnarok
Game: FFXI
Posts: 252
By Ragnarok.Lockfort 2018-09-29 15:49:45
resource might not be updated. Check for agoge mask +3 in items.lua in res folder located in windowers.
EDIT: in case anyone wondered why this post exist, someone asked why their agoge mask +3 wouldn't swap in, prompting this response. The shmuck then deleted his post.
By Dsuza 2018-09-29 20:26:35
Okay, am able to cycle between OffensiveModes and WeaponSkillModes while engaged now, but now I can't use HybridMode at all now while engaged.
Anyone have any idea why I can't switch into and out of Hybrid mode while engaged? Has to be some command at the bottom?
Thanks guys
Code
--[[ DARK KNIGHT V2.0
Created by: Enurihel of Asura
Based off AlanWarren's GearSwap file
This lua will automatically do the following based off triggers
while asleep equips Berserker's Torque
While weakened Equips Twilight Helm and Mail
Will auto cancel Souleater based off defined rules
Auto-cancel Hasso when Last Resort is active
This lua will also auto detect whether you have Great Sword or Scythe
equiped and equip the defined gearset based off that
Current Auto-detect weapons:
[*]Amanomurakumo: Uses engaged.Amanomurakumo
[*]['Dojikiri Yasutsuna']: Uses engaged.['Dojikiri Yasutsuna']
[*]Masamune: Uses engaged.Masamune
[*]gsList: Uses the defined Greatsword list of weapons
Additional files needed
Mote-Include
CharName_drk_gear (this will house your gearsets)
Additionally you can choose to house your augments
at the top of your gear file or create another file
to house your augments for all your jobs.
User Defined Modes
Melee Offense Mode
[*]Normal
[*]Mid
[*]Accuracy
Weaponskill Mode
[*]Normal
[*]Mid
[*]Acc
Hybrid Modes
[*]Damage Taken (PDT)
[*]Re-raise
Casting modes
[*]Normal
[*]resistant
[*]enmity
Job ability Defined Modes
[*]Souleater mode (will toggle Souleater off after 1 WS)
[*]Last Resort (will toggle Hasso off when active)
Other aspects of this file
[*]Capactiy Mode - equip your CP mantle when engaged and Idle
[*]Equips Ygna's Resolve +1 while reive status is active
[*]If you are wekened will keep Reraise set on
Rune Fencer as a Sub Job and Rune rules
When you are /run you will have the option to create
and in game macro to cycle through the runes and display
specific rune information
[*]/console gs c rune
[*]/console gs c cycle runes
[*]/console gs c cycle rayke
[*]/console gs c cycle rune
if you want to create another macro to move backwards use
the same as above just edit cycle to cycleback
Custom Aftermath gear and gearsets
Currently this is only setup for Liberator and Masamune
and in the car file this will only work with Masamune
but in the end that you so choose to create a new gearset
follow this structure for constructing it
sets.engaged.Weapon.AM --For Liberator it will be AM3
sets.engaged.Weapon.Mid.AM --For Liberator it will be AM3
sets.engaged.Weapon.Mid.AM --For Liberator it will be AM3
]]
----------------------------------------------
-- Initialization function required for --
-- this to work properly --
----------------------------------------------
function get_sets()
mote_include_version = 2
include('Mote-Include.lua')
end
--------------------------
-- Job Setup Section --
--------------------------
function job_setup()
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')
state.CapacityMode = M(false, 'Capacity Point Mantle')
--[[ Correction to the errors in the Mote libs]]
absorbs = S{ 'Absorb-STR', 'Absorb-DEX', 'Absorb-VIT', 'Absorb-AGI',
'Absorb-INT', 'Absorb-MND', 'Absorb-CHR', 'Absorb-Attri',
'Absorb-ACC', 'Absorb-TP'
}
--[[ Define the Weapon Skills that benefit from Moonshade Earring ]]
moonshade_WS = S{"Tachi: Fudo", "Tachi: Jinpu", "Cross Reaper", "Quietus",
"Entropy", "Insurgency", "Savage Blade", "Vorpal Blade",
"Requiescat", "Sanguine Blade", "Chant du Cygne","Resolution"}
get_combat_form()
get_combat_weapon()
update_melee_groups()
define_rune_info()
end
--------------------------
-- User Setup Section --
--------------------------
function user_setup()
state.OffenseMode:options('Normal', 'Mid', 'Acc')
state.HybridMode:options ('Normal', 'PDT')
state.WeaponskillMode:options('Normal', 'Mid', 'Acc')
state.CastingMode:options('Normal', 'Resistant', 'Enmity')
state.PhysicalDefenseMode:options('PDT')
state.IdleMode:options('Normal','PDT')
-- state.WeaponMode = M{ 'Amanomurakumo', 'Masamune'}
--[[ Overriding default hotkeys ]]
send_command('bind !f9 gs c cycle WeaponskillMode') --F11
send_command('bind f9 gs c cycle OffenseMode')
-- send_command('bind f5 gs c cycle WeaponMode')
--[[ Additional User Defined Settings ]]
select_default_macro_book()
--[[ set_lockstyle()--]]
--[[ Section for Rune Fencer sub job to diplay which rune ]]
state.Runes = M{['description']='Rune',
"Ignis",
"Gelus",
"Flabra",
"Tellus",
"Sulpor",
"Unda",
"Lux",
"Tenebrae"
}
state.Rune = M{['description']='which',
"Fire Dmg | Ice Resist: Paralyze, Bind, Frost",
"Ice Dmg | Wind Resist: Choke, Gravity, Silence",
"Wind dmg | Earth Resist: Slow, Petrify, Rasp",
"Earth dmg | Lightning Resist: Stun, Shock",
"Lightning Dmg | Water Resist: Poison, Drown",
"Water dmg | Fire Resist: Addle, Burn, Plague, Amnesia",
"Light Dmg | Dark Resist's: Blind, Bio, Sleep",
"Dark Dmg | Light Resist's: Repose, Dia, Charm"
}
send_command('bind ^` input //gs c rune')
send_command('bind ^- gs c cycleback Runes')
send_command('bind ^= gs c cycle Runes')
end
--------------------------------------
-- Elements for skillchain names --
--------------------------------------
skillchain_elements = {}
skillchain_elements.Light = S{'Light','Fire','Wind','Lightning'}
skillchain_elements.Darkness = S{'Dark','Ice','Earth','Water'}
skillchain_elements.Fusion = S{'Light','Fire'}
skillchain_elements.Fragmentation = S{'Wind','Lightning'}
skillchain_elements.Distortion = S{'Ice','Water'}
skillchain_elements.Gravitation = S{'Dark','Earth'}
skillchain_elements.Transfixion = S{'Light'}
skillchain_elements.Compression = S{'Dark'}
skillchain_elements.Liquification = S{'Fire'}
skillchain_elements.Induration = S{'Ice'}
skillchain_elements.Detonation = S{'Wind'}
skillchain_elements.Scission = S{'Earth'}
skillchain_elements.Impaction = S{'Lightning'}
skillchain_elements.Reverberation = S{'Water'}
--------------------------------------------------
-- This section is called when you change jobs --
--------------------------------------------------
function file_unload()
send_command('unbind ^`')
send_command('unbind !=')
send_command('unbind ^[')
send_command('unbind ![')
send_command('unbind @f9')
end
----------------------------------------------
-- This tells Gearswap what sets to fetch --
-- Reccomend creating a Car file. --
----------------------------------------------
function init_gear_sets()
----------------------
-- Field/Town Idle --
----------------------
sets.idle = {ammo="Staunch Tathlum +1",
head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
body="Arke Corazza",
hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
legs="Arke Cosciales",
feet="Hermes' Sandals",
neck="Sanctity Necklace",
waist="Flume Belt",
left_ear="Odnowa Earring",
right_ear="Odnowa Earring +1",
left_ring="Moonbeam Ring",
right_ring="Defending Ring",
back="MoonLight Cape",
}
--[[ sets.idle.Town = set_combine(sets.idle, {
ring1="Dark Ring"
})--]]
sets.idle.PDT = { ammo="Staunch Tathlum +1",
head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
body="Arke Corazza",
hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
legs="Arke Cosciales",
feet={ name="Souveran Schuhs +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Odnowa Earring",
right_ear="Odnowa Earring +1",
left_ring="Moonbeam Ring",
right_ring="Defending Ring",
back="MoonLight Cape",
}
----------------------------------
-- Job Ability sets --
----------------------------------
--[[ sets.precast.JA['Diabolic Eye'] = {
hands="Abyss gauntlets +2"
}
sets.precast.JA['Diabolic Eye'] = {
hands="Fallen's Finger Gauntlets"
}--]]
sets.precast.JA['Berserk'] = {feet="Agoge Calligae +3",body="Pummeler's Lorica +3",back="Cichol's Mantle"}
sets.precast.JA['Warcry'] = {head="Agoge Mask +1"}
sets.precast.JA['Aggressor'] = {body="Agoge Lorica +2",head="Pummeler's Mask +2"}
sets.precast.JA['Blood Rage'] = {body="Boii Lorica"}
sets.precast.JA['Retaliation'] = {feet="Boii Calligae",hands="Pummeler's Mufflers +1"}
sets.precast.JA['Restraint'] = {hands="Boii Mufflers"}
sets.precast.JA['Mighty Strikes'] = {hands="Agoge Mufflers"}
sets.precast.JA["Warrior's Charge"] = {legs="Agoge Cuisses"}
sets.precast.JA['Tomahawk'] = {ammo="Throwing Tomahawk"}
--------------------------------------
-- Casting Gear sets --
--------------------------------------
sets.precast.FC = {ammo="Sapience Orb",
head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
body="Arke Corazza",
hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
legs="Arke Cosciales",
feet={ name="Odyssean Greaves", augments={'Accuracy+23 Attack+23','"Fast Cast"+3','AGI+2',}},
neck={ name="Jeweled Collar", augments={'"Fast Cast"+3','MP recovered while healing +2','INT+4',}},
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Lebeche Ring",
back="Moonlight Cape",
}
sets.midcast.FastRecast = {ammo="Sapience Orb",
head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
body="Arke Corazza",
hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
legs="Arke Cosciales",
feet={ name="Odyssean Greaves", augments={'Accuracy+23 Attack+23','"Fast Cast"+3','AGI+2',}},
neck={ name="Jeweled Collar", augments={'"Fast Cast"+3','MP recovered while healing +2','INT+4',}},
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Lebeche Ring",
back="MoonLight Cape",
}
------------------------------
-- Enmity Section --
------------------------------
sets.Enmity = { ammo="Sapience Orb",
head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
body="Emet Harness +1",
hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
legs="Pumm. Cuisses +3",
feet="Hermes' Sandals",
neck="Warder's Charm",
waist="Flume Belt",
left_ear="Friomisi Earring",
right_ear="Cryptic Earring",
left_ring="Moonbeam Ring",
right_ring="Petrov Ring",
back="MoonLight Cape",
}
sets.engaged.Ragnarok = {
ammo="Yetshila +1",
head="Flam. Zucchetto +2",
body={ name="Valorous Mail", augments={'"Counter"+3','Crit.hit rate+3','Quadruple Attack +3',}},
hands={ name="Valorous Mitts", augments={'Accuracy+23 Attack+23','Crit.hit rate+4','DEX+14',}},
legs={ name="Odyssean Cuisses", augments={'Accuracy+30','"Store TP"+8','DEX+10',}},
feet={ name="Valorous Greaves", augments={'Pet: Haste+2','Quadruple Attack +3','Mag. Acc.+7 "Mag.Atk.Bns."+7',}},
neck="Ainia Collar",
waist="Ioskeha Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Flamma Ring",
right_ring="Niqmaddu Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
}
sets.engaged.Ragnarok.Mid = {
ammo="Yetshila +1",
head="Flam. Zucchetto +2",
body={ name="Valorous Mail", augments={'Accuracy+20','"Store TP"+4','Accuracy+11 Attack+11',}},
hands="Sulev. Gauntlets +2",
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Ainia Collar",
waist="Ioskeha Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Niqmaddu Ring",
right_ring="Flamma Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
}
sets.engaged.Ragnarok.Acc = {
ammo="Ginsen",
head="Flam. Zucchetto +2",
body={ name="Emicho Haubert +1", augments={'HP+65','DEX+12','Accuracy+20',}},
hands={ name="Emi. Gauntlets +1", augments={'HP+65','DEX+12','Accuracy+20',}},
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Combatant's Torque",
waist="Ioskeha Belt +1",
left_ear="Telos Earring",
right_ear="Mache Earring +1",
left_ring="Regal Ring",
right_ring="Flamma Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
}
sets.engaged.Montante = {
ammo="Ginsen",
head="Flam. Zucchetto +2",
body={ name="Valorous Mail", augments={'"Counter"+3','Crit.hit rate+3','Quadruple Attack +3',}},
hands={ name="Valorous Mitts", augments={'Accuracy+23 Attack+23','Crit.hit rate+4','DEX+14',}},
legs={ name="Odyssean Cuisses", augments={'Accuracy+30','"Store TP"+8','DEX+10',}},
feet={ name="Valorous Greaves", augments={'Pet: Haste+2','Quadruple Attack +3','Mag. Acc.+7 "Mag.Atk.Bns."+7',}},
neck="Ainia Collar",
waist="Ioskeha Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Niqmaddu Ring",
right_ring="Flamma Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
}
sets.engaged.Montante.Mid = {
ammo="Ginsen",
head="Flam. Zucchetto +2",
body={ name="Valorous Mail", augments={'Accuracy+20','"Store TP"+4','Accuracy+11 Attack+11',}},
hands="Sulev. Gauntlets +2",
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Ainia Collar",
waist="Ioskeha Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Niqmaddu Ring",
right_ring="Flamma Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
}
sets.engaged.Montante.Acc = {
ammo="Ginsen",
head="Flam. Zucchetto +2",
body={ name="Emicho Haubert +1", augments={'HP+65','DEX+12','Accuracy+20',}},
hands={ name="Emi. Gauntlets +1", augments={'HP+65','DEX+12','Accuracy+20',}},
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Combatant's Torque",
waist="Ioskeha Belt +1",
left_ear="Telos Earring",
right_ear="Mache Earring +1",
left_ring="Flamma Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
}
sets.engaged.PDT = {
ammo="Seeth. Bomblet +1",
head="Arke Zuchetto +1",
body="Arke Corazza +1",
hands="Souv. Handsch. +1",
legs="Arke Cosc. +1",
feet="Souveran Schuhs +1",
neck="Combatant's Torque",
waist="Ioskeha Belt +1",
left_ear="Odnowa Earring",
right_ear="Odnowa Earring +1",
left_ring="Moonlight Ring",
right_ring="Moonlight Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
}
----------------------------------------------
-- Weaponskill Gearsets --
----------------------------------------------
sets.precast.WS['Scourge'] = {
sub="Utu Grip",
ammo="Knobkierrie",
head="Flam. Zucchetto +2",
body="Pumm. Lorica +3",
hands={ name="Odyssean Gauntlets", augments={'DEX+5','Pet: STR+2','Weapon skill damage +10%','Accuracy+13 Attack+13','Mag. Acc.+6 "Mag.Atk.Bns."+6',}},
legs={ name="Odyssean Cuisses", augments={'Accuracy+25 Attack+25','Weapon skill damage +3%','DEX+10','Attack+5',}},
feet="Sulev. Leggings +2",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
right_ear="Brutal Earring",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},
}
sets.precast.WS['Fell Cleave'] = set_combine(sets.precast.WS['Scourge'])
sets.precast.WS['Resolution'] = {
sub="Utu Grip",
ammo="Knobkierrie",
head="Flam. Zucchetto +2",
body="Pumm. Lorica +3",
hands={ name="Odyssean Gauntlets", augments={'DEX+5','Pet: STR+2','Weapon skill damage +10%','Accuracy+13 Attack+13','Mag. Acc.+6 "Mag.Atk.Bns."+6',}},
legs={ name="Odyssean Cuisses", augments={'Accuracy+25 Attack+25','Weapon skill damage +3%','DEX+10','Attack+5',}},
feet="Sulev. Leggings +2",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
right_ear="Brutal Earring",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},
}
sets.precast.WS['Resolution'].Mid = {
ammo="Knobkierrie",
head="Flam. Zucchetto +2",
body="Pumm. Lorica +3",
hands={ name="Odyssean Gauntlets", augments={'DEX+5','Pet: STR+2','Weapon skill damage +10%','Accuracy+13 Attack+13','Mag. Acc.+6 "Mag.Atk.Bns."+6',}},
legs="Pumm. Cuisses +3",
feet="Sulev. Leggings +2",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
right_ear="Cessance Earring",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},
}
sets.precast.WS['Resolution'].Acc = {
ammo="Seeth. Bomblet +1",
head="Pummeler's Mask +3",
body="Pumm. Lorica +3",
hands={ name="Odyssean Gauntlets", augments={'DEX+5','Pet: STR+2','Weapon skill damage +10%','Accuracy+13 Attack+13','Mag. Acc.+6 "Mag.Atk.Bns."+6',}},
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
right_ear="Cessance Earring",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},
}
sets.precast.WS['Upheaval'] = { ammo="Knobkierrie",
head={ name="Odyssean Helm", augments={'Accuracy+18 Attack+18','Weapon skill damage +2%','AGI+3','Accuracy+12','Attack+7',}},
body="Pumm. Lorica +3",
hands={ name="Odyssean Gauntlets", augments={'Accuracy+22 Attack+22','Weapon skill damage +4%','VIT+1','Attack+2',}},
legs={ name="Odyssean Cuisses", augments={'Accuracy+18','Weapon skill damage +5%','VIT+2',}},
feet="Sulev. Leggings +2",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Ishvara Earring",
right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','Accuracy+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},
}
sets.precast.WS['Full Break'] = set_combine(sets.precast.WS, { ammo="Pemphredo Tathlum",
head="Flam. Zucchetto +2",
body={ name="Jumalik Mail", augments={'HP+15','"Refresh"+1',}},
hands="Flam. Manopolas +2",
legs={ name="Founder's Hose", augments={'MND+7','Mag. Acc.+10','Attack+10',}},
feet="Flam. Gambieras +2",
neck="Sanctity Necklace",
waist="Eschan Stone",
left_ear={ name="Moonshade Earring"},
right_ear="Telos Earring",
left_ring="Stikini Ring",
right_ring="stikini Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},
})
sets.precast.WS['Ukkos Fury'] = set_combine(sets.precast.WS, { ammo="Yetshila",
head="Valorous mask",
body="Argosy Hauberk +1",
hands="Flamma Manopolas +2",
legs="Pumm. Cuisses +3",
feet="Pummeler's Calligae +3",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Brutal Earring",
right_ear={ name="Moonshade Earring"},
left_ring="Niqmaddu Ring",
right_ring="Petrov Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
})
-- [[ sets.precast.WS['Resolution'].Mid = set_combine(sets.precast.WS['Resolution'], {
-- right_ring="Ramuh Ring +1",
-- })
sets.precast.WS['Upheaval'].Mid = { ammo="Knobkierrie",
head={ name="Odyssean Helm", augments={'Accuracy+18 Attack+18','Weapon skill damage +2%','AGI+3','Accuracy+12','Attack+7',}},
body="Pumm. Lorica +3",
hands={ name="Odyssean Gauntlets", augments={'Accuracy+22 Attack+22','Weapon skill damage +4%','VIT+1','Attack+2',}},
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
right_ear="Ishvara Earring",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','Accuracy+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},
}
sets.precast.WS['Upheaval'].Acc = set_combine(sets.precast.WS['Upheaval'].Mid, { ammo="Knobkierrie",
head="Pummeler's Mask +2",
body="Pumm. Lorica +3",
hands={ name="Odyssean Gauntlets", augments={'Accuracy+22 Attack+22','Weapon skill damage +4%','VIT+1','Attack+2',}},
legs="Pumm. Cuisses +3",
feet="Pumm. Calligae +3",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
right_ear="Ishvara Earring",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','Accuracy+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},
})
-- }) --]]
-- Savage Blade
-- Fragmentation/Scission
sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, { ammo="Knobkierrie",
head={ name="Valorous Mask", augments={'Accuracy+24','Weapon skill damage +3%','STR+5',}},
body={ name="Valorous Mail", augments={'Accuracy+27','Weapon skill damage +4%',}},
hands={ name="Valorous Mitts", augments={'Accuracy+28','Weapon skill damage +3%','STR+13',}},
legs={ name="Valor. Hose", augments={'Accuracy+16 Attack+16','Weapon skill damage +3%','DEX+10','Accuracy+15','Attack+5',}},
feet="Sulev. Leggings +2",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Brutal Earring",
right_ear={ name="Moonshade Earring"},
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
back={ name="Cichol's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},
})
sets.precast.WS['Savage Blade'].Mid = set_combine(sets.precast.WS['Savage Blade'], {
right_ring={ name="Ramuh Ring +1", bag="wardrobe2"},
})
sets.precast.WS['Savage Blade'].Acc = set_combine(sets.precast.WS['Savage Blade'].Mid, {
left_ring={ name="Ramuh Ring +1", bag="wardrobe"},
})
----------------------
-- Misc. Gearsets --
----------------------
sets.Reive = {
neck="Adoulin's Refuge +1"
}
sets.buff.Doom = {
ring2="Purity Ring"
}
sets.Reraise = {
head="Twilight helm",
body="Twilight mail"
}
sets.regen = {
head="Twilight helm",
body="Twilight mail",
neck="Sanctity Necklace",
ring1="Paguroidea Ring",
}
sets.PDT = {
ammo="Seeth. Bomblet +1",
head="Arke Zuchetto +1",
body="Arke Corazza +1",
hands="Souv. Handsch. +1",
legs="Arke Cosc. +1",
feet="Souveran Schuhs +1",
neck="Combatant's Torque",
waist="Ioskeha Belt +1",
left_ear="Odnowa Earring",
right_ear="Odnowa Earring +1",
left_ring="Moonlight Ring",
right_ring="Moonlight Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
}
sets.defense.PDT = {
ammo="Seeth. Bomblet +1",
head="Arke Zuchetto +1",
body="Arke Corazza +1",
hands="Souv. Handsch. +1",
legs="Arke Cosc. +1",
feet="Souveran Schuhs +1",
neck="Combatant's Torque",
waist="Ioskeha Belt +1",
left_ear="Odnowa Earring",
right_ear="Odnowa Earring +1",
left_ring="Moonlight Ring",
right_ring="Moonlight Ring",
back={ name="Cichol's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
}
end
--------------------------
-- Custom Idle Gearset --
--------------------------
function customize_idle_set(idleSet)
--[[ if player.mpp < 50 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
if player.mpp < 80 then
idleSet = set_combine(idleSet, sets.refresh)
end
if player.hpp < 80 then
idleSet = set_combine(idleSet, sets.regen)
end --]]
if state.Buff.Doom then
idleSet = set_combine(idleSet, sets.buff.Doom)
end
--[[ if buffactive['Weakness'] then
equip({head="Twilight helm", body="Twilight mail"})
disable('head', 'body')
else
enable('head', 'body')
end --]]
if state.CapacityMode.value then
idleSet = set_combine(idleSet, sets.CapacityMantle)
end
if S{"Eastern Adoulin","Western Adoulin"}:contains(world.area) then
idleSet = set_combine(idleSet,{body="Councilor's Garb", head="Jumalik helm"})
end
return idleSet
end
------------------------------
-- Custom melee Gearset --
------------------------------
function customize_melee_set(meleeSet)
if state.Buff.Sleep and player.hp > 120 and player.status == "Engaged" then
-- Equip Berserker's Torque When You Are Asleep
meleeSet = set_combine(meleeSet,{neck="Berserker's Torque"})
end
if player.hp < 800 then
meleeSet = set_combine(meleeSet, sets.defense.PDT)
add_to_chat(8, 'Low HP" Switching to PDT set')
end
--[[ if player.hp < 800 then
meleeSet = set_combine(meleeSet, sets.Reraise)
add_to_chat(8, 'Low HP" Switching to PDT set')
end--]]
if state.Buff.Doom then
meleeSet = set_combine(meleeSet, sets.buff.Doom)
end
if state.Buff['Souleater'] then
meleeSet = set_combine(meleeSet, sets.buff.Souleater)
end
--[[ if spell.type=='WeaponSkill' and state.Buff['Souleater'] then
if moonshade_WS:contains(spell.english) and player.tp < 2900 then
equip({left_ear="Moonshade Earring"})
end
end--]]
--[[ if buffactive['Weakness'] then
equip({head="Twilight helm", body="Twilight mail"})
add_to_chat(8, '--ReRaise Set Engaged--')
else
enable('head', 'body')
end--]]
if state.CapacityMode.value then
meleeSet = set_combine(meleeSet, sets.CapacityMantle)
end
--[[ if buffactive['Arcane Circle'] then
meleeSet = set_combine(meleeSet, {body="Founder's Breastplate"})
end--]]
return meleeSet
end
----------------------------------------------
-- General hooks for setting combat state --
----------------------------------------------
------------------------------------------------------------------
-- 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_status_change(newStatus, oldStatus, eventArgs)
if newStatus == "Engaged" then
end
end
function job_update(cmdParams, eventArgs)
war_sj = player.sub_job == 'WAR' or false
get_combat_form()
get_combat_weapon()
update_melee_groups()
end
function get_combat_form()
-- if buffactive['Last Resort'] and buffactive.haste then
-- add_to_chat(8, '---Weapon Delay Capped---')
-- elseif (buffactive.haste and buffactive.hasso and buffactive.march == 2) then
-- add_to_chat(8, '---Weapon Delay is not Capped---')
-- end
------------------------------------------------------
-- Can add in more here this is just a placeholder --
------------------------------------------------------
end
function get_combat_weapon()
-- handle weapon sets
if player.equipment.main == 'Ragnarok' then
state.CombatWeapon:set('Ragnarok')
elseif player.equipment.main == 'Montante +1' then
state.CombatWeapon:set('Montante')
end
if player.equipment.main == 'Ragnarok' then
state.CombatWeapon:set('Ragnarok')
end
if player.equipment.main == 'Montante +1' then
state.CombatWeapon:set('Montante')
else
state.CombatForm:reset()
end
end
function job_state_change(stateField, newValue, oldValue)
--nothing added in here
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
elseif buffactive['Aftermath'] then
classes.CustomMeleeGroups:append('AM')
end
if buffactive['Samurai Roll'] then
classes.CustomRangedGroups:append('SamRoll')
end
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
end
----------------------
-- Precast section --
----------------------
function job_post_precast(spell, action, spellMap, eventArgs)
--[[ if spell.type == 'WeaponSkill' then
if world.time >= 17*60 or world.time < 7*60 then -- Dusk to Dawn time.
equip({ear1="Lugra Earring +1", ear2="Lugra Earring"})
end
end--]]
if spell.action_type=="Magic" and buffactive.Silence then
eventArgs.cancel = true
send_command('input /item "Echo Drops" <me>')
end
if spell.type=='WeaponSkill' then
if moonshade_WS:contains(spell.english) and player.tp < 2900 then
equip({left_ear="Moonshade Earring"})
end
end
if spell.type == 'WeaponSkill' then
if state.Buff['Souleater'] then
equip(sets.buff.Souleater)
end
end
--[[ Lock weaponskill if you are to far from the mob as to not lose TP ]]
if spell.type == 'WeaponSkill' then
if spell.target.distance > 8 then
cancel_spell()
add_to_chat(8, 'Target to far away. Move closer')
return
end
end
end
----------------------
-- Midcast Section --
----------------------
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast['Elemental Magic'], {waist="Hachirin-no-Obi"})
end
end
--[[ if S{"Tachi: Jinpu","Tachi: Fudo","Catastrophe","Scourge","Cross Reaper"}:contains(spell.english) and (spell.element==world.day_element or spell.element==world.weather_element) then
equip({head="Gavialis Helm"})
end--]]
if S{"Drain","Drain II","Drain III", "Aspir", "Aspir II", "Aspir III"}:contains(spell.english) and (spell.element==world.day_element or spell.element==world.weather_element) then
equip({waist="Hachirin-no-obi"})
end
--[[ equip(sets.MAXDrain)
add_to_chat(100,'WARNING: Misanthropy is now equiped ** Manually Swap weapons ***')
end--]]
if buffactive['Dark Seal'] and S{"Drain III"}:contains(spell.english)then
equip({head="Fallen's Burgeonet +1"})
end
if buffactive['Dark Seal'] and S{"Absorb-STR"}:contains(spell.english)then
equip({head="Fallen's Burgeonet +1"})
end
if buffactive['Dark Seal'] and S{"Absorb-VIT"}:contains(spell.english)then
equip({head="Fallen's Burgeonet +1"})
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
state.Buff[buff] = gain
handle_equipping_gear(player.status)
end
if buff:lower()=='terror' or buff:lower()=='petrification' or buff:lower()=='sleep' or buff:lower()=='stun' then
if gain then
equip(sets.defense.PDT)
add_to_chat(8, 'PDT set is equiped')
elseif not gain then
handle_equipping_gear(player.status)
end
end
if buff:lower()=='sleep' then
if gain and player.hp > 120 and player.status == "Engaged" then -- Equip Berserker's Torque / frenzy When You Are Asleep
equip({neck="Berserker's Torque"})
elseif not gain then -- Take Berserker's off
handle_equipping_gear(player.status)
end
end
if buffactive['Reive Mark'] then
equip(sets.Reive)
disable('neck')
else
enable('neck')
end
if buffactive['Souleater'] then
equip({head="Ig. Burgonet +3"})
disable('Head')
add_to_chat(100,'WARNING: Souleater set equiped.')
else
enable('Head')
end
if buffactive['Blood Weapon'] and buffactive['Souleater'] and player.hp > 8000 then
equip({main="Dacnomania", head="Ig. Burgonet +3"})
disable('Head')
--add_to_chat(100,'WARNING: SOUL EATER HEAD ON AND &&&& Dacnomania.')
else
enable('Head')
end
if buff == "doom" then
if gain then
equip(sets.buff.Doom)
--send_command('@input /p Doomed please cursna.')
send_command('@input /item "Holy Water" <me>')
disable('ring1','ring2','waist')
else
enable('ring1','ring2','waist')
handle_equipping_gear(player.status)
end
end
--[[ Checks if Last resort is active if so cancels Hasso, will put
hasso back on after Last Resort falls off. ]]
if buff == "Last Resort" and player.status == 'Engaged' then
if gain then
send_command('@wait 1.0;cancel hasso')
elseif not midaction() then
send_command('@wait 1.0;input /ja "Hasso" <me>')
end
end
--[[ Drain II 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, '-------------AM3 UP-------------')
end
if not midaction() then
handle_equipping_gear(player.status)
end
else
classes.CustomMeleeGroups:clear()
if player.equipment.main == "Masamune" then
if buff == "Aftermath" and gain or buffactive.Aftermath then
classes.CustomMeleeGroups:append('AM')
add_to_chat(8, '--Masamune haste is active. Switching to AM set--')
end
end
if player.equipment.main == 'Amanomurakumo' then
if buff == 'Aftermath' and gain then
add_to_chat(8, '---Amanomurakumo AM active providing Crit---')
end
end
if not midaction() then
handle_equipping_gear(player.status)
end
end
end--]]
end
----------------------------------
-- Sub job section for Ninja --
----------------------------------
ninjaTools = {
Utsusemi = S{"Shihei",},--"Shikanofuda"
Hojo = S{"Kaginawa",},--"Chonofuda"
Migawari = S{"Mokujin",},
Kakka = S{"Ryuno",},
Tonko = S{"Shinobi-tabi",},
Kurayami = S{"Sairui-Ran",},
Raiton = S{"Hiraishin",},
Hyoton = S{"Tsurara",},
Monomi = S{"Sanjaku-Tenugui",},
}
function job_precast(spell, action, spellMap, eventArgs)
if spell.type=="Ninjutsu" then check_tools(spell) end
end
function check_tools(spell)
for prefix,tools in pairs(ninjaTools) do
if spell.english:startswith(prefix) then
for tool in tools:it() do
if not player.inventory[tool] then
add_to_chat(100,'WARNING: You are out of '..tool..'.')
elseif player.inventory[tool].count < 10 then
add_to_chat(100,'WARNING: You are low on '..tool..'. '..player.inventory[tool].count..' remaining.')
end
end
end
end
end
--------------------------------------------------------------
-- Rune Fencer Sub Job section for displaying rune info --
--------------------------------------------------------------
function define_rune_info()
rune_info = {
["Ignis"] = {damage="Fire", resistance="Ice"},
["Gelus"] = {damage="Ice", resistance="Wind"},
["Flabra"] = {damage="Wind", resistance="Earth"},
["Tellus"] = {damage="Earth", resistance="Lightning"},
["Sulpor"] = {damage="Lightning", resistance="Water"},
["Unda"] = {damage="Water", resistance="Fire"},
["Lux"] = {damage="Light", resistance="Darkness"},
["Tenebrae"]= {damage="Darkness", resistance="Light"},
}
end
function display_rune_info(spell)
runeinfo = rune_info[spell.english]
if runeinfo then
add_to_chat(122, '*'..spell.english..' is '..runeinfo.damage..'-based dmg. and '..runeinfo.resistance..' resistance*')
end
end
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'rune' then
send_command('@input /ja '..state.Runes.value..' <me>')
end
end
------------------------------------------------------------------
-- Selecting and Setting the default Macro book and Lock style --
------------------------------------------------------------------
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'DRK' then
set_macro_page(10, 12)
elseif player.sub_job == 'SAM' then
set_macro_page(1, 2)
elseif player.sub_job == 'RUN' --[[and player.equipment.main == '['Dojikiri Yasutsuna']'--]] then
set_macro_page(2, 12)
elseif player.sub_job == 'THF' then
set_macro_page(3, 12)
else
set_macro_page(1, 12)
end
end
--[[function set_lockstyle()
send_command('wait 4; input /lockstyleset 1')
end--]]
By Dsuza 2018-09-30 16:16:15
Got this all sorted out. Thank you everyone that helped :D
By arthursaga 2018-10-02 03:33:10
Hey all,
Nice to meet you. Need some help.
Initially, I had to cycle through nine different sets of gear, which I found difficult, so I decided to divide up the sets between an offense set (F9) and a defensive set (F10).
When I "Engage", my set either ends up staying on my Idle set, or it doesn't stay on the set I previously ended the battle with.
Is there anyone that can help identify why it's doing that? I screwed around with some of it, and I believe it mainly has to do with EngagedState but I cannot for the life of my figure out the code.
Really appreciate the help.
Code
------------------------------------------
-- Console Commands --
------------------------------------------
function self_command(command)
if command == 'togglelock' then
if SetLocked == false then
SetLocked = true
msg("Equipment Set LOCKED!")
else
SetLocked = false
msg("Equipment Set UNLOCKED!")
end
elseif command == 'lockgearindex' then
if LockGearIndex == false then
LockGearIndex = true
LockGearSet = {
ammo = player.equipment.ammo,
head = player.equipment.head,
neck = player.equipment.neck,
ear1 = player.equipment.left_ear,
ear2 = player.equipment.right_ear,
body = player.equipment.body,
hands = player.equipment.hands,
ring1 = player.equipment.left_ring,
ring2 = player.equipment.right_ring,
back = player.equipment.back,
waist = player.equipment.waist,
legs = player.equipment.legs,
feet = player.equipment.feet
}
msg("Gear Index Locked")
else
LockGearIndex = false
msg("Gear Index Unlocked")
if player.status == 'Engaged' then
if sets.TP.index == 'DREAMTP11' then
ChangeGear(sets.TP.DreamTP11)
elseif sets.TP.index == 'DREAMTP31' then
ChangeGear(sets.TP.DreamTP31)
elseif sets.TP.index == 'DREAMATT' then
ChangeGear(sets.TP.DreamATT)
elseif sets.TP.index == 'DREAMACC' then
ChangeGear(sets.TP.DreamACC)
elseif sets.DT.index == 'DTHybridDW' then
ChangeGear(sets.DT.DTHybridDW)
elseif sets.DT.index == 'DTRefresh' then
ChangeGear(sets.DT.DTRefresh)
elseif sets.DT.index == 'ANNULDMG' then
ChangeGear(sets.DT.ANNULDMG)
elseif sets.DT.index == 'MEVA' then
ChangeGear(sets.DT.MEVA)
elseif sets.TH.index == 'TreasureHunter' then
ChangeGear(sets.TH.TreasureHunter)
end
end
end
end
if command == 'toggle TP set' then
TP_ind = TP_ind + 1
if TP_ind > #sets.TP.index then TP_ind = 1 end
send_command('@input /echo <----- TP Set changed to ' .. sets.TP.index[TP_ind] .. ' ----->')
ChangeGear(sets.TP[sets.TP.index[TP_ind]])
elseif command == 'toggle DT set' then
DT_ind = DT_ind + 1
if DT_ind > #sets.DT.index then DT_ind = 1 end
send_command('@input /echo <----- DT Set changed to ' .. sets.DT.index[DT_ind] .. ' ----->')
ChangeGear(sets.DT[sets.DT.index[DT_ind]])
elseif command == 'toggle TH set' then
TH_ind = TH_ind + 1
if TH_ind > #sets.TH.index then TH_ind = 1 end
send_command('@input /echo <----- Set changed to ' .. sets.TH.index[TH_ind] .. ' ----->')
ChangeGear(sets.TH[sets.TH.index[TH_ind]])
elseif command == 'toggle KITE set' then
KITE_ind = KITE_ind + 1
if KITE_ind > #sets.KITE.index then KITE_ind = 1 end
send_command('@input /echo <----- Set changed to ' .. sets.KITE.index[KITE_ind] .. ' ----->')
ChangeGear(sets.KITE[sets.KITE.index[KITE_ind]])
elseif command == 'toggle Idle set' then
Idle_ind = Idle_ind + 1
if Idle_ind > #sets.Idle.index then Idle_ind = 1 end
send_command('@input /echo <----- Idle Set changed to ' .. sets.Idle.index[Idle_ind] .. ' ----->')
ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
------------------------------------------
-- Character States --
------------------------------------------
function IdleState()
ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
if player.mpp <= 50 then
ChangeGear({waist = "Fucho-no-obi"})
end
end
function RestingState()
end
function EngagedState()
if player.status == 'Engaged' then
if sets.TP.index == 'DREAMTP11' then
ChangeGear(sets.TP.DreamTP11)
elseif sets.TP.index == 'DREAMTP31' then
ChangeGear(sets.TP.DreamTP31)
elseif sets.TP.index == 'DREAMATT' then
ChangeGear(sets.TP.DreamATT)
elseif sets.TP.index == 'DREAMACC' then
ChangeGear(sets.TP.DreamACC)
elseif sets.DT.index == 'DTHybridDW' then
ChangeGear(sets.DT.DTHybridDW)
elseif sets.DT.index == 'DTRefresh' then
ChangeGear(sets.DT.DTRefresh)
elseif sets.DT.index == 'ANNULDMG' then
ChangeGear(sets.DT.ANNULDMG)
elseif sets.DT.index == 'MEVA' then
ChangeGear(sets.DT.MEVA)
elseif sets.TH.index == 'TreasureHunter' then
ChangeGear(sets.TH.TreasureHunter)
end
end
end
My bad for continually posting and taking up space, I tried inserting my entire LUA and it kept saying "Too many characters."
By arthursaga 2018-10-03 11:51:36
Hi guys,
Wondering if anyone could help with my above post? Any help would be super appreciated.
Just to add to this:
When I toggle my TP sets (F9), and then I toggle into my DT sets (F10) and then I use a WS, I end up in my TP set. What gives? Would like to stay in the set I toggle into.
Thanks in advance.
Lakshmi.Elidyr
Server: Lakshmi
Game: FFXI
Posts: 912
By Lakshmi.Elidyr 2018-10-03 13:48:09
Hi guys,
Wondering if anyone could help with my above post? Any help would be super appreciated.
Just to add to this:
When I toggle my TP sets (F9), and then I toggle into my DT sets (F10) and then I use a WS, I end up in my TP set. What gives? Would like to stay in the set I toggle into.
Thanks in advance.
Have you just tried removing all that and just doing the sets you want manually? To be honest that's just to big of a cluster for my taste.
Edit: No WS gear logic is in there from what I see, so I have no clue where that might be an issue.
Bismarck.Oppa
Server: Bismarck
Game: FFXI
Posts: 41
By Bismarck.Oppa 2018-10-05 13:24:42
Trying to set up rules for using harp for sleeps in dynamis, but will not swap instruments. Thanks for any help in advance.
Vars Code function job_setup()
state.ExtraSongsMode = M{['description']='Extra Songs', 'None', 'FullLength', 'Dummy'}
state.LullabyMode = M{['description']='Lullaby Mode','Normal','Daurdabla','Gjallarhorn'}
state.Buff['Pianissimo'] = buffactive['pianissimo'] or false
state.IdleMode:options('Normal','PDT','MEVA')
state.TPMode = M{['description']='TP Mode', 'Normal', 'WeaponLock'}
send_command('alias tp gs c cycle tpmode')
send_command('bind f10 gs c cycle idlemode')
send_command('bind f11 gs c cycle LullabyMode')
send_command("alias buff gs equip sets.midcast.SongEffect")
send_command("alias debuff gs equip sets.midcast.SongDebuff")
send_command("alias macc gs equip sets.midcast.ResistantSongDebuff")
send_command("alias lul gs equip sets.midcast.LullabyFull")
send_command("alias fc gs equip sets.precast.FastCast.BardSong")
send_command("alias idle gs equip sets.Idle.Current")
send_command("alias meva gs equip sets.meva")
send_command("alias enh gs equip sets.midcast['Enhancing Magic']")
send_command("alias eng gs equip sets.engaged")
send_command("alias wsset gs equip sets.precast.WS")
Rules Code if string.find(spell.name,'Horde') and state.LullabyMode == 'Daurdabla' then
equip(sets.midcast.LullabyDyna)
end
Gearset Code sets.midcast.LullabyDyna = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Daurdabla",
head="Brioso Roundlet +2",
body="Fili Hongreline +1",
hands="Brioso Cuffs +2",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Luminary Sash",
left_ear="Regal Earring",
right_ear="Digni. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
Full lua incase I didn't include something important above. Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:
ExtraSongsMode may take one of three values: None, Dummy, FullLength
You can set these via the standard 'set' and 'cycle' self-commands. EG:
gs c cycle ExtraSongsMode
gs c set ExtraSongsMode Dummy
The Dummy state will equip the bonus song instrument and ensure non-duration gear is equipped.
The FullLength state will simply equip the bonus song instrument on top of standard gear.
Simple macro to cast a dummy Daurdabla song:
/console gs c set ExtraSongsMode Dummy
/ma "Shining Fantasia" <me>
--]]
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('custom_functions.lua')
include('lullaby.lua')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.ExtraSongsMode = M{['description']='Extra Songs', 'None', 'FullLength', 'Dummy'}
state.LullabyMode = M{['description']='Lullaby Mode','Normal','Daurdabla','Gjallarhorn'}
state.Buff['Pianissimo'] = buffactive['pianissimo'] or false
state.IdleMode:options('Normal','PDT','MEVA')
state.TPMode = M{['description']='TP Mode', 'Normal', 'WeaponLock'}
send_command('alias tp gs c cycle tpmode')
send_command('bind f10 gs c cycle idlemode')
send_command('bind f11 gs c cycle LullabyMode')
send_command("alias buff gs equip sets.midcast.SongEffect")
send_command("alias debuff gs equip sets.midcast.SongDebuff")
send_command("alias macc gs equip sets.midcast.ResistantSongDebuff")
send_command("alias lul gs equip sets.midcast.LullabyFull")
send_command("alias fc gs equip sets.precast.FastCast.BardSong")
send_command("alias idle gs equip sets.Idle.Current")
send_command("alias meva gs equip sets.meva")
send_command("alias enh gs equip sets.midcast['Enhancing Magic']")
send_command("alias eng gs equip sets.engaged")
send_command("alias wsset gs equip sets.precast.WS")
-- For tracking current recast timers via the Timers plugin.
custom_timers = {}
send_command("alias g11_m2g16 input /ws Rudra's Storm")
send_command("alias g11_m2g17 input /ws Mordant Rime")
send_command("alias g11_m2g18 input /ws Exenterator")
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('None', 'Normal')
state.CastingMode:options('Normal', 'Resistant')
-- Adjust this if using the Terpander (new +song instrument)
info.ExtraSongInstrument = 'Daurdabla'
-- How many extra songs we can keep from Daurdabla/Terpander
info.MaxSongs = 4
-- If Max Job Points - adds alot of timers to the custom timers
MaxJobPoints = 1
-- Set this to false if you don't want to use custom timers.
state.UseCustomv = M(false, 'Use Custom Timers')
-- Additional local binds
send_command('bind ^` gs c cycle ExtraSongsMode')
send_command('bind !` input /ma "Chocobo Mazurka" <me>')
select_default_macro_book()
send_command('@wait 5;input /lockstyleset 5')
waittime = 2.7
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind !`')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
weaponlock_main="Aeneas"
weaponlock_sub="Genmei Shield"
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FastCast = {
main="Kali",
sub="Genbu's Shield",
head={ name="Vanya Hood", augments={'MP+50','"Fast Cast"+10','Haste+2%',}},
body="Inyanga Jubbah +1",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -3%','Song spellcasting time -3%',}},
legs="Aya. Cosciales +1",
feet={ name="Chironic Slippers", augments={'AGI+12','Rng.Atk.+12','"Fast Cast"+4','Accuracy+18 Attack+18','Mag. Acc.+15 "Mag.Atk.Bns."+15',}},
neck="Voltsurge Torque",
waist="Channeler's Stone",
left_ear="Hermetic Earring",
right_ear="Loquac. Earring",
left_ring="Defending Ring",
right_ring="Kishar Ring",
back="Solemnity Cape",
}
sets.precast.FastCast.Cure = set_combine(sets.precast.FastCast, {back="Pahtli Cape",legs="Doyen Pants"})
sets.precast.FastCast.Stoneskin = set_combine(sets.precast.FastCast, {head="Umuthi Hat",legs="Doyen Pants"})
sets.precast.FastCast['Enhancing Magic'] = set_combine(sets.precast.FastCast, {waist="Witful Belt"})
sets.precast.FastCast.BardSong = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
head="Fili Calot +1",
body="Inyanga Jubbah +1",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -2%','Song spellcasting time -4%',}},
legs="Aya. Cosciales +2",
feet={ name="Telchine Pigaches", augments={'Song spellcasting time -7%',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
left_ring="Defending Ring",
right_ring="Kishar Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.precast.FastCast.Daurdabla = set_combine(sets.precast.FastCast.BardSong, {
range=info.ExtraSongInstrument})
-- Precast sets to enhance JAs
sets.precast.JA.Nightingale = {feet="Bihu Slippers"}
sets.precast.JA.Troubadour = {body="Bihu Justaucorps"}
sets.precast.JA['Soul Voice'] = {legs="Bihu Cannions"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
range={ name="Linos", augments={'Accuracy+15','"Store TP"+4','Quadruple Attack +3',}},
head="Aya. Zucchetto +2",
body="Ashera Harness",
hands="Aya. Manopolas +2",
legs="Jokushu Haidate",
feet="Aya. Gambieras +2",
neck="Caro Necklace",
waist="Grunfeld Rope",
left_ear="Ishvara Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','TP Bonus +25',}},
left_ring="Ilabrat Ring",
right_ring="Shukuyu Ring",
back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS, {neck="Fotia Gorget", waist="Fotia Belt"})
sets.precast.WS['Rudras Storm'] = set_combine(sets.precast.WS)
sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {neck="Fotia Gorget", waist="Fotia Belt"})
sets.precast.WS['Mordant Rime'] = set_combine(sets.precast.WS)
-- Midcast Sets
-- General set for recast times.
sets.midcast.FastRecast = {
main="Kali",
sub="Genbu's Shield",
head={ name="Vanya Hood", augments={'MP+50','"Fast Cast"+10','Haste+2%',}},
body="Inyanga Jubbah +1",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -3%','Song spellcasting time -3%',}},
legs="Aya. Cosciales +1",
feet={ name="Chironic Slippers", augments={'AGI+12','Rng.Atk.+12','"Fast Cast"+4','Accuracy+18 Attack+18','Mag. Acc.+15 "Mag.Atk.Bns."+15',}},
neck="Voltsurge Torque",
waist="Channeler's Stone",
left_ear="Hermetic Earring",
right_ear="Loquac. Earring",
left_ring="Defending Ring",
right_ring="Kishar Ring",
back="Solemnity Cape",
}
-- Gear to enhance certain classes of songs.
sets.midcast.Ballad = {legs="Aoidos' Rhing. +2"}
sets.midcast.Lullaby = {hands="Brioso Cuffs +2"}
sets.midcast.Madrigal = {head="Fili Calot +1"}
sets.midcast.Prelude = {back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','"Fast Cast"+10',}}}
sets.midcast.March = {hands="Fili Manchettes +1"}
sets.midcast.HonorMarch = {hands="Fili Manchettes +1",range="Marsyas"}
sets.midcast.Minuet = {body="Fili Hongreline +1"}
sets.midcast.Minne = {
range="Daurdabla",
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
head="Fili Calot +1",
body="Inyanga Jubbah +1",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -2%','Song spellcasting time -4%',}},
legs="Aya. Cosciales +2",
feet={ name="Telchine Pigaches", augments={'Song spellcasting time -7%',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
left_ring="Defending Ring",
right_ring="Kishar Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.midcast.Paeon = {head="Brioso Roundlet +2"}
sets.midcast.Carol = {head="Fili calot +1",
body="Fili hongreline +1",hands="Fili manchettes +1",
legs="Aoidos' Rhing. +2",feet="Aoidos' Cothrn. +2"}
sets.midcast["Sentinel's Scherzo"] = {feet="Aoidos' Cothrn. +2"}
sets.midcast['Magic Finale'] = {neck="Sanctity Necklace",waist="Luminary Sash",legs="Fili Rhingrave +1"}
sets.midcast.Mazurka = {}
-- For song buffs (duration and AF3 set bonus)
sets.midcast.SongEffect = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Gjallarhorn",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands="Fili Manchettes +1",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Ethereal Earring",
left_ring="Defending Ring",
right_ring="Gelatinous Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
-- For song defbuffs (duration primary, accuracy secondary)
sets.midcast.SongDebuff = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Gjallarhorn",
head="Brioso Roundlet +2",
body="Brioso Justau. +2",
hands="Brioso Cuffs +2",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Luminary Sash",
left_ear="Regal Earring",
right_ear="Digni. Earring",
left_ring="Defending Ring",
right_ring="Gelatinous Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
-- For song defbuffs (accuracy primary, duration secondary)
sets.midcast.ResistantSongDebuff = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Gjallarhorn",
head="Brioso Roundlet +2",
body="Brioso Justau. +2",
hands="Brioso Cuffs +2",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Luminary Sash",
left_ear="Regal Earring",
right_ear="Digni. Earring",
left_ring="Defending Ring",
right_ring="Gelatinous Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.midcast.Lullaby = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Marsyas",
head="Brioso Roundlet +2",
body="Fili Hongreline +1",
hands="Brioso Cuffs +2",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Luminary Sash",
left_ear="Regal Earring",
right_ear="Digni. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.midcast.LullabyFull = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Gjallarhorn",
head="Brioso Roundlet +2",
body="Fili Hongreline +1",
hands="Brioso Cuffs +2",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Luminary Sash",
left_ear="Regal Earring",
right_ear="Digni. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.midcast.LullabyDyna = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Daurdabla",
head="Brioso Roundlet +2",
body="Fili Hongreline +1",
hands="Brioso Cuffs +2",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Luminary Sash",
left_ear="Regal Earring",
right_ear="Digni. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
-- Song-specific recast reduction
sets.midcast.SongRecast = {ear2="Loquacious Earring",ring1="Kishar Ring",legs="Fili Rhingrave +1"} --back="Harmony Cape",waist="Corvax Sash",
--sets.midcast.Daurdabla = set_combine(sets.midcast.FastRecast, sets.midcast.SongRecast, {range=info.ExtraSongInstrument})
-- Cast spell with normal gear, except using Daurdabla instead
sets.midcast.Daurdabla = {range=info.ExtraSongInstrument}
-- Dummy song with Daurdabla; minimize duration to make it easy to overwrite.
sets.midcast.DaurdablaDummy = {
range="Daurdabla",
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
head="Fili Calot +1",
body="Inyanga Jubbah +1",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -2%','Song spellcasting time -4%',}},
legs="Aya. Cosciales +2",
feet={ name="Telchine Pigaches", augments={'Song spellcasting time -7%',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
left_ring="Defending Ring",
right_ring="Kishar Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
-- Other general spells and classes.
sets.midcast.Cure = {
main="Queller rod",
sub="Genbu's Shield",
head="Vanya hood",
body="Gendewitha Bliaut",hands="Bokwus Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
legs="Gendewitha Spats",feet="Gendewitha aloshes"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Cursna = sets.midcast.Cure
sets.midcast['Enhancing Magic'] = {
sub="Ammurapi Shield",
ammo="Staunch Tathlum",
head={ name="Telchine Cap", augments={'Mag. Evasion+21','Enemy crit. hit rate -3','Enh. Mag. eff. dur. +10',}},
body={ name="Telchine Chas.", augments={'Mag. Evasion+24','Enemy crit. hit rate -4','Enh. Mag. eff. dur. +8',}},
hands={ name="Telchine Gloves", augments={'Mag. Evasion+25','"Subtle Blow"+6','Enh. Mag. eff. dur. +9',}},
legs={ name="Telchine Braconi", augments={'Mag. Evasion+24','Enemy crit. hit rate -4','Enh. Mag. eff. dur. +9',}},
feet={ name="Telchine Pigaches", augments={'Mag. Evasion+25','"Subtle Blow"+6','Enh. Mag. eff. dur. +10',}},
neck="Incanter's Torque",
waist="Rumination Sash",
left_ear="Loquacious Earring",
right_ear="Enchntr. Earring +1",
left_ring="Stikini Ring",
right_ring="Evanescence Ring",
back="Perimede Cape",
}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})
sets.midcast.RefreshRecieved = set_combine(sets.midcast['Enhancing Magic'], {back="Grapevine Cape",waist="Gishdubar Sash"})
-- Sets to return to when not performing an action.
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.Idle = {}
sets.Idle.Main = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Marsyas",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands={ name="Chironic Gloves", augments={'"Cure" spellcasting time -7%','MND+8','"Refresh"+1',}},
legs="Assid. Pants +1",
feet={ name="Chironic Slippers", augments={'Phys. dmg. taken -3%','Accuracy+23','Chance of successful block +6','Mag. Acc.+15 "Mag.Atk.Bns."+15',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Infused Earring",
left_ring="Defending Ring",
right_ring="Shadow Ring",
back="Solemnity Cape",
}
sets.Idle.PDT = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Marsyas",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands={ name="Chironic Gloves", augments={'"Cure" spellcasting time -7%','MND+8','"Refresh"+1',}},
legs="Assid. Pants +1",
feet={ name="Chironic Slippers", augments={'Phys. dmg. taken -3%','Accuracy+23','Chance of successful block +6','Mag. Acc.+15 "Mag.Atk.Bns."+15',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Infused Earring",
left_ring="Defending Ring",
right_ring="Shadow Ring",
back="Solemnity Cape",
}
sets.Idle.Current = sets.Idle.Main
-- Defense sets
sets.defense.PDT = {}
sets.defense.MDT = {}
sets.Kiting = {feet="Fili Cothurnes +1"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- Engaged sets
sets.engaged = {
range={ name="Linos", augments={'Accuracy+15','"Store TP"+4','Quadruple Attack +3',}},
head="Ayanmo Zucchetto +2",
body="Ashera Harness",
hands="Aya. Manopolas +2",
legs="Jokushu Haidate",
feet="Aya. Gambieras +2",
neck="Combatant's Torque",
waist="Dynamic Belt +1",
left_ear="Telos Earring",
right_ear="Cessance Earring",
left_ring="Ilabrat Ring",
right_ring="Hetairoi Ring",
back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
}
sets.engaged = {
range={ name="Linos", augments={'Accuracy+15','"Store TP"+4','Quadruple Attack +3',}},
head="Aya. Zucchetto +2",
body="Ashera Harness",
hands="Aya. Manopolas +2",
legs={ name="Chironic Hose", augments={'"Triple Atk."+2','"Mag.Atk.Bns."+21','Accuracy+20 Attack+20',}},
feet={ name="Chironic Slippers", augments={'Accuracy+17','MND+9','Quadruple Attack +3','Accuracy+7 Attack+7',}},
neck="Combatant's Torque",
waist="Dynamic Belt +1",
left_ear="Telos Earring",
right_ear="Cessance Earring",
left_ring="Ilabrat Ring",
right_ring="Hetairoi Ring",
back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
}
sets.meva = {
main="Terra's Staff",
sub="Irenic Strap +1",
ammo="Staunch Tathlum",
head={ name="Telchine Cap", augments={'Mag. Evasion+21','Enemy crit. hit rate -3','Enh. Mag. eff. dur. +10',}},
body={ name="Telchine Chas.", augments={'Mag. Evasion+24','Enemy crit. hit rate -4','Enh. Mag. eff. dur. +8',}},
hands={ name="Telchine Gloves", augments={'Mag. Evasion+25','"Subtle Blow"+6','Enh. Mag. eff. dur. +9',}},
legs={ name="Telchine Braconi", augments={'Mag. Evasion+24','Enemy crit. hit rate -4','Enh. Mag. eff. dur. +9',}},
feet={ name="Telchine Pigaches", augments={'Mag. Evasion+25','"Subtle Blow"+6','Enh. Mag. eff. dur. +10',}},
neck="Warder's Charm +1",
waist="Carrier's Sash",
left_ear="Eabani Earring",
right_ear="Flashward Earring",
left_ring="Purity Ring",
right_ring="Vengeful Ring",
back="Solemnity Cape"
}
-- Relevant Obis. Add the ones you have.
sets.obi = {}
sets.obi.Wind = {waist='Hachirin-no-obi'}
sets.obi.Ice = {waist='Hachirin-no-obi'}
sets.obi.Lightning = {waist='Hachirin-no-obi'}
sets.obi.Light = {waist='Hachirin-no-obi'}
sets.obi.Dark = {waist='Hachirin-no-obi'}
sets.obi.Water = {waist='Hachirin-no-obi'}
sets.obi.Earth = {waist='Hachirin-no-obi'}
sets.obi.Fire = {waist='Hachirin-no-obi'}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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_pretarget(spell)
checkblocking(spell)
if spell.action_type == 'Magic' then
if aftercast_start and os.clock() - aftercast_start < waittime then
windower.add_to_chat(8,"Precast too early! Adding Delay:"..waittime - (os.clock() - aftercast_start))
cast_delay(waittime - (os.clock() - aftercast_start))
end
end
end
function job_precast(spell, action, spellMap, eventArgs)
--[[
for i,v in pairs(buff) do
for i2,v2 in pairs(v) do
print(i2,v2)
end
end
]]
-- handle_equipping_gear(player.status)
precast_start = os.clock()
handle_equipping_gear(player.status)
if spell.type == 'BardSong' then
if buffactive.Nightingale then
local generalClass = get_song_class(spell)
if generalClass and sets.midcast[generalClass] then
windower.add_to_chat(8,'Equipping Midcast - Nightingale active.'..generalClass)
equip(sets.midcast[generalClass])
end
else
equip(sets.precast.FastCast.BardSong)
end
if buffactive.Troubadour and string.find(spell.name,'Lullaby') then
equip({range="Marsyas"})
equip(sets.midcast.Lullaby)
windower.add_to_chat(8,'Marsyas Equipped - Troubadour / Lullaby active')
end
elseif string.find(spell.name,'Cur') and spell.name ~= 'Cursna' then
equip(sets.precast.FastCast.Cure)
elseif spell.name == 'Stoneskin' then
equip(sets.precast.FastCast.Stoneskin)
else
equip(sets.precast.FastCast)
end
-- Auto use Extra Song Instrument for Buffs if less than max # of songs
-- Some thoughts:
-- How to watch party buffs - can take from partybuffs lua and build a table.
local bard_buff_ids = S{195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 218, 219, 220, 221, 222}
num_bard_songs = 0
local self = windower.ffxi.get_player()
for i,v in pairs(self.buffs) do
if bard_buff_ids:contains(v) then
num_bard_songs = num_bard_songs +1
end
end
local generalClass = get_song_class(spell)
if num_bard_songs >= 2 and num_bard_songs < info.MaxSongs and spell.name ~= 'Honor March' and generalClass == 'SongEffect' then
windower.add_to_chat(10,"Swapping to "..info.ExtraSongInstrument.."! Number of bard buffs = "..num_bard_songs)
equip({range=info.ExtraSongInstrument})
end
-- end --
if spell.name == 'Honor March' then
equip({range="Marsyas"})
end
if string.find(spell.name,'Horde') and state.LullabyMode == 'Daurdabla' then
equip(sets.midcast.LullabyDyna)
end
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)
local generalClass = get_song_class(spell)
if spell.action_type == 'Magic' then
if spell.type == 'BardSong' then
-- layer general gear on first, then let default handler add song-specific gear.
if generalClass and sets.midcast[generalClass] then
equip(sets.midcast[generalClass])
end
end
end
-- Auto use Extra Song Instrument for Buffs if less than max # of songs
if spell.english == 'Refresh' and spell.target.type == 'SELF' then
equip(sets.midcast.RefreshRecieved)
end
if num_bard_songs >= 2 and num_bard_songs < info.MaxSongs and spell.name ~= 'Honor March' and generalClass == 'SongEffect' then
equip({range=info.ExtraSongInstrument})
end
-- end --
if spell.name == 'Honor March' then
equip(sets.midcast.HonorMarch)
end
if buffactive.Troubadour and string.find(spell.name,'Lullaby') then
equip(sets.midcast.Lullaby)
equip({range="Marsyas"})
end
weathercheck(spell.element)
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.type == 'BardSong' then
if state.ExtraSongsMode.value == 'FullLength' then
equip(sets.midcast.Daurdabla)
end
end
weathercheck(spell.element)
end
function job_aftercast(spell, action, spellMap, eventArgs)
aftercast_start = os.clock()
local generalClass = get_song_class(spell)
if spell.type == 'BardSong' and not spell.interrupted then
-- if spell.target and spell.target.type == 'SELF' then
-- if spell.target.type ~= 'SELF' and spell.name ~= "Magic Finale" then -- (Only using Custom Timers for debuffs; no huge reason for buffs)
if spell.name ~= "Magic Finale" and (generalClass == "SongDebuff" or generalClass == "ResistantSongDebuff") then -- (Only using Custom Timers for debuffs; no huge reason for buffs)
--adjust_timers(spell, spellMap)
local dur = calculate_duration(spell, spellMap)
send_command('timers create "'..spell.target.name..':'..spell.name..'" '..dur..' down')
end
state.ExtraSongsMode:reset()
end
if state.SpellDebug.value == "On" then
spelldebug(spell)
end
if spell.interrupted then
add_to_chat(8,'--------- Casting Interupted: '..spell.name..'---------')
end
equip(sets.Idle.Current)
check_run_status()
if precast_start and state.SpellDebug.value == "On" then
add_to_chat(8,"Spell: "..spell.name..string.format(" Casting Time: %.2f", aftercast_start - precast_start))
end
precast_start = nil
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
function status_change(new,tab)
handle_equipping_gear(player.status)
if new == 'Resting' then
equip(sets.Resting)
else
equip(sets.Idle.Current)
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
job_handle_equipping_gear(player.status)
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Determine the custom class to use for the given song.
function get_song_class(spell)
-- Can't use spell.targets:contains() because this is being pulled from resources
if spell.skill == 'Singing' then
if set.contains(spell.targets, 'Enemy') then
if state.CastingMode.value == 'Resistant' then
return 'ResistantSongDebuff'
else
return 'SongDebuff'
end
elseif state.ExtraSongsMode.value == 'Dummy' then
return 'DaurdablaDummy'
else
return 'SongEffect'
end
else
return spell.skill
end
end
function calculate_duration(spell, spellMap)
local mult = 1
if player.equipment.range == 'Daurdabla' then mult = mult + 0.3 end -- change to 0.25 with 90 Daur
if player.equipment.range == "Gjallarhorn" then mult = mult + 0.4 end -- change to 0.3 with 95 Gjall
if player.equipment.range == "Marsyas" then mult = mult + 0.5 end --
if player.equipment.main == "Carnwenhan" then mult = mult + 0.1 end -- 0.1 for 75, 0.4 for 95, 0.5 for 99/119
if player.equipment.main == "Legato Dagger" then mult = mult + 0.05 end
if player.equipment.main == "Kali" then mult = mult + 0.05 end
if player.equipment.sub == "Kali" then mult = mult + 0.05 end
if player.equipment.sub == "Legato Dagger" then mult = mult + 0.05 end
if player.equipment.neck == "Aoidos' Matinee" then mult = mult + 0.1 end
if player.equipment.neck == "Moonbow Whistle" then mult = mult + 0.2 end
if player.equipment.body == "Fili Hongreline +1" then mult = mult + 0.12 end
if player.equipment.legs == "Inyanga Shalwar +1" then mult = mult + 0.15 end
if player.equipment.legs == "Inyanga Shalwar +2" then mult = mult + 0.17 end
if player.equipment.feet == "Brioso Slippers" then mult = mult + 0.1 end
if player.equipment.feet == "Brioso Slippers +1" then mult = mult + 0.11 end
if player.equipment.feet == "Brioso Slippers +2" then mult = mult + 0.13 end
if player.equipment.feet == "Brioso Slippers +3" then mult = mult + 0.15 end
if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet" then mult = mult + 0.1 end
if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +3" then mult = mult + 0.2 end
if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +2" then mult = mult + 0.1 end
if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +1" then mult = mult + 0.1 end
if spellMap == 'Madrigal' and player.equipment.head == "Fili Calot +1" then mult = mult + 0.1 end
if spellMap == 'Minuet' and player.equipment.body == "Fili Hongreline +1" then mult = mult + 0.1 end
if spellMap == 'March' and player.equipment.hands == 'Fili Manchettes +1' then mult = mult + 0.1 end
if spellMap == 'Ballad' and player.equipment.legs == "Fili Rhingrave +1" then mult = mult + 0.1 end
if spellMap == 'Lullaby' and player.equipment.hands == 'Brioso Cuffs +1' then mult = mult + 0.1 end
if spellMap == 'Lullaby' and player.equipment.hands == 'Brioso Cuffs +2' then mult = mult + 0.1 end
if spellMap == 'Lullaby' and player.equipment.hands == 'Brioso Cuffs +3' then mult = mult + 0.2 end
if spell.name == "Sentinel's Scherzo" and player.equipment.feet == "Fili Cothurnes +1" then mult = mult + 0.1 end
if MaxJobPoints == 1 then
mult = mult + 0.05
end
if buffactive.Troubadour then
mult = mult*2
end
if spell.name == "Sentinel's Scherzo" then
if buffactive['Soul Voice'] then
mult = mult*2
elseif buffactive['Marcato'] then
mult = mult*1.5
end
end
local generalClass = get_song_class(spell)
-- add_to_chat(8,'Info: Spell Name'..spell.name..' Spell Map:'..spellMap..' General Class:'..generalClass..' Multiplier:'..mult)
if spell.name == "Foe Lullaby II" or spell.name == "Horde Lullaby II" then
base = 60
elseif spell.name == "Foe Lullaby" or spell.name == "Horde Lullaby" then
base = 30
elseif spell.name == "Carnage Elegy" then
base = 180
elseif spell.name == "Battlefield Elegy" then
base = 120
elseif spell.name == "Pining Nocturne" then
base = 120
elseif spell.name == "Maiden's Virelai" then
base = 20
end
if generalClass == 'SongEffect' then
base = 120
totalDuration = math.floor(mult*base)
end
totalDuration = math.floor(mult*base)
if MaxJobPoints == 1 then
if string.find(spell.name,'Lullaby') then
-- add_to_chat(8,'Adding 20 seconds to Timer for Lullaby Job Points')
totalDuration = totalDuration + 20
end
if buffactive['Clarion Call'] then
if buffactive.Troubadour then
-- Doubles Clarion Call Gain for 80 seconds
totalDuration = totalDuration + 80
else
-- add_to_chat(8,'Adding 20 seconds to Timer for Clarion Call Job Points')
totalDuration = totalDuration + 40
end
end
if buffactive['Tenuto'] then
-- add_to_chat(8,'Adding 20 seconds to Timer for Tenuto Job Points')
totalDuration = totalDuration + 20
end
if buffactive['Marcato'] then
-- add_to_chat(8,'Adding 20 seconds to Timer for Marcato Job Points')
totalDuration = totalDuration + 20
end
end
if buffactive.Troubadour then
totalDuration = totalDuration + 20 -- Assuming 20 seconds for capped Trobodour and you actually pre-cast with a Bihu Justaucorps.
end
add_to_chat(8,'Total Duration:'..totalDuration)
return totalDuration
end
-- Function to reset timers.
function reset_timers()
for i,v in pairs(custom_timers) do
send_command('timers delete "'..i..'"')
end
custom_timers = {}
end
-- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
function job_handle_equipping_gear(playerStatus, eventArgs)
disable_specialgear()
if state.TPMode.value == "WeaponLock" then
equip({main=weaponlock_main,sub=weaponlock_sub})
disable("main")
disable("sub")
else
enable("main")
enable("sub")
end
if state.IdleMode.value == "PDT" then
sets.Idle.Current = sets.Idle.PDT
elseif state.IdleMode.value == "MEVA" then
sets.Idle.Current = sets.meva
else
sets.Idle.Current = sets.Idle.Main
end
if playerStatus == 'Idle' then
equip(sets.Idle.Current)
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(8, 12)
end
windower.raw_register_event('logout',reset_timers)
By Nekseus 2018-10-05 15:47:52
This Lua is a mangled mess. No offense, I see Mote Lua's like this all the time. Why are you toggling states with aliases? Are you adding the aliases within macros??? Your BRD experience could be a lot more fluent than this.
For one, you have your Dynamis Midcast set in your Job_Precast rule. This is why it isn't working.
I haven't touched GS in awhile and I dont currently have a BRD to test with, but the first thing I would try is something like this...
Mode... Code
function job_setup()
state.HordeMode = M{['description']='Horde Mode','Off','Harp','Horn'}
Sets... Code
sets.midcast.harp_horde = {
range = "Blurred Harp +1",
-- gears ...
}
sets.midcast.horn_horde = {
range = "Gjallarhorn",
-- gears ...
}
Rule... Code
-- THE UNMODIFIED CODE BELOW CAN BE FOUND AT LINE #738 IN YOUR LUA.
-- Determine the custom class to use for the given song.
function get_song_class(spell)
-- Can't use spell.targets:contains() because this is being pulled from resources
if spell.skill == 'Singing' then
if set.contains(spell.targets, 'Enemy') then
if spell.name == 'Horde*' and state.HordeMode.value ~= 'Off' then
if state.HordeMode.value == 'Harp' then
return 'harp_horde'
elseif state.HordeMode.value == 'Horn' then
return 'horn_horde'
end
if state.CastingMode.value == 'Resistant' then
return 'ResistantSongDebuff'
else
return 'SongDebuff'
end
elseif state.ExtraSongsMode.value == 'Dummy' then
return 'DaurdablaDummy'
else
return 'SongEffect'
end
else
return spell.skill
end
end
EDIT: typo
[+]
Bismarck.Oppa
Server: Bismarck
Game: FFXI
Posts: 41
By Bismarck.Oppa 2018-10-05 18:28:50
This Lua is a mangled mess. No offense, I see Mote Lua's like this all the time. Why are you toggling states with aliases? Are you adding the aliases within macros??? Your BRD experience could be a lot more fluent than this.
For one, you have your Dynamis Midcast set in your Job_Precast rule. This is why it isn't working.
I haven't touched GS in awhile and I dont currently have a BRD to test with, but the first thing I would try is something like this...
Mode... Code
function job_setup()
state.HordeMode = M{['description']='Horde Mode','Off','Harp','Horn'}
Sets... Code
sets.midcast.harp_horde = {
range = "Blurred Harp +1",
-- gears ...
}
sets.midcast.horn_horde = {
range = "Gjallarhorn",
-- gears ...
}
Rule... Code
-- THE UNMODIFIED CODE BELOW CAN BE FOUND AT LINE #738 IN YOUR LUA.
-- Determine the custom class to use for the given song.
function get_song_class(spell)
-- Can't use spell.targets:contains() because this is being pulled from resources
if spell.skill == 'Singing' then
if set.contains(spell.targets, 'Enemy') then
if spell.name == 'Horde*' and state.HordeMode.value ~= 'Off' then
if state.HordeMode.value == 'Harp' then
return 'harp_horde'
elseif state.HordeMode.value == 'Horn' then
return 'horn_horde'
end
if state.CastingMode.value == 'Resistant' then
return 'ResistantSongDebuff'
else
return 'SongDebuff'
end
elseif state.ExtraSongsMode.value == 'Dummy' then
return 'DaurdablaDummy'
else
return 'SongEffect'
end
else
return spell.skill
end
end
EDIT: typo
Giving an error, "'end' expected (to close 'function' at line 738) near '<eof>'
By Nekseus 2018-10-05 18:35:46
Oops, forgot to close the addition i made >.<
Code function get_song_class(spell)
-- Can't use spell.targets:contains() because this is being pulled from resources
if spell.skill == 'Singing' then
if set.contains(spell.targets, 'Enemy') then
if spell.name == 'Horde*' and state.HordeMode ~= 'Off' then
if state.HordeMode.value == 'Harp' then
return 'harp_horde'
elseif state.HordeMode.value == 'Horn' then
return 'horn_horde'
end
end
if state.CastingMode.value == 'Resistant' then
return 'ResistantSongDebuff'
else
return 'SongDebuff'
end
elseif state.ExtraSongsMode.value == 'Dummy' then
return 'DaurdablaDummy'
else
return 'SongEffect'
end
else
return spell.skill
end
end
[+]
Bismarck.Oppa
Server: Bismarck
Game: FFXI
Posts: 41
By Bismarck.Oppa 2018-10-05 20:15:16
Still doesn't want to change instruments, casting all sets in ghorn. Thanks for the help btw.
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:
ExtraSongsMode may take one of three values: None, Dummy, FullLength
You can set these via the standard 'set' and 'cycle' self-commands. EG:
gs c cycle ExtraSongsMode
gs c set ExtraSongsMode Dummy
The Dummy state will equip the bonus song instrument and ensure non-duration gear is equipped.
The FullLength state will simply equip the bonus song instrument on top of standard gear.
Simple macro to cast a dummy Daurdabla song:
/console gs c set ExtraSongsMode Dummy
/ma "Shining Fantasia" <me>
--]]
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('custom_functions.lua')
include('lullaby.lua')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.ExtraSongsMode = M{['description']='Extra Songs', 'None', 'FullLength', 'Dummy'}
state.HordeMode = M{['description']='Horde Mode','Normal','Dyna','Accuracy'}
state.Buff['Pianissimo'] = buffactive['pianissimo'] or false
state.IdleMode:options('Normal','PDT','MEVA')
state.TPMode = M{['description']='TP Mode', 'Normal', 'WeaponLock'}
send_command('alias tp gs c cycle tpmode')
send_command('bind f10 gs c cycle idlemode')
send_command('bind f11 gs c cycle HordeMode')
send_command("alias buff gs equip sets.midcast.SongEffect")
send_command("alias debuff gs equip sets.midcast.SongDebuff")
send_command("alias macc gs equip sets.midcast.ResistantSongDebuff")
send_command("alias lul gs equip sets.midcast.LullabyFull")
send_command("alias fc gs equip sets.precast.FastCast.BardSong")
send_command("alias idle gs equip sets.Idle.Current")
send_command("alias meva gs equip sets.meva")
send_command("alias enh gs equip sets.midcast['Enhancing Magic']")
send_command("alias eng gs equip sets.engaged")
send_command("alias wsset gs equip sets.precast.WS")
-- For tracking current recast timers via the Timers plugin.
custom_timers = {}
send_command("alias g11_m2g16 input /ws Rudra's Storm")
send_command("alias g11_m2g17 input /ws Mordant Rime")
send_command("alias g11_m2g18 input /ws Exenterator")
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('None', 'Normal')
state.CastingMode:options('Normal', 'Dyna')
-- Adjust this if using the Terpander (new +song instrument)
info.ExtraSongInstrument = 'Daurdabla'
-- How many extra songs we can keep from Daurdabla/Terpander
info.MaxSongs = 4
-- If Max Job Points - adds alot of timers to the custom timers
MaxJobPoints = 1
-- Set this to false if you don't want to use custom timers.
state.UseCustomv = M(false, 'Use Custom Timers')
-- Additional local binds
send_command('bind ^` gs c cycle ExtraSongsMode')
send_command('bind !` input /ma "Chocobo Mazurka" <me>')
select_default_macro_book()
send_command('@wait 5;input /lockstyleset 10')
waittime = 2.7
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind !`')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
weaponlock_main="Aeneas"
weaponlock_sub="Genmei Shield"
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FastCast = {
main="Kali",
sub="Genbu's Shield",
head={ name="Vanya Hood", augments={'MP+50','"Fast Cast"+10','Haste+2%',}},
body="Inyanga Jubbah +1",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -3%','Song spellcasting time -3%',}},
legs="Aya. Cosciales +1",
feet={ name="Chironic Slippers", augments={'AGI+12','Rng.Atk.+12','"Fast Cast"+4','Accuracy+18 Attack+18','Mag. Acc.+15 "Mag.Atk.Bns."+15',}},
neck="Voltsurge Torque",
waist="Channeler's Stone",
left_ear="Hermetic Earring",
right_ear="Loquac. Earring",
left_ring="Defending Ring",
right_ring="Kishar Ring",
back="Solemnity Cape",
}
sets.precast.FastCast.Cure = set_combine(sets.precast.FastCast, {back="Pahtli Cape",legs="Doyen Pants"})
sets.precast.FastCast.Stoneskin = set_combine(sets.precast.FastCast, {head="Umuthi Hat",legs="Doyen Pants"})
sets.precast.FastCast['Enhancing Magic'] = set_combine(sets.precast.FastCast, {waist="Witful Belt"})
sets.precast.FastCast.BardSong = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
head="Fili Calot +1",
body="Inyanga Jubbah +1",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -2%','Song spellcasting time -4%',}},
legs="Aya. Cosciales +2",
feet={ name="Telchine Pigaches", augments={'Song spellcasting time -7%',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
left_ring="Defending Ring",
right_ring="Kishar Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.precast.FastCast.Daurdabla = set_combine(sets.precast.FastCast.BardSong, {
range=info.ExtraSongInstrument})
-- Precast sets to enhance JAs
sets.precast.JA.Nightingale = {feet="Bihu Slippers"}
sets.precast.JA.Troubadour = {body="Bihu Justaucorps"}
sets.precast.JA['Soul Voice'] = {legs="Bihu Cannions"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
range={ name="Linos", augments={'Accuracy+15','"Store TP"+4','Quadruple Attack +3',}},
head="Aya. Zucchetto +2",
body="Ashera Harness",
hands="Aya. Manopolas +2",
legs="Jokushu Haidate",
feet="Aya. Gambieras +2",
neck="Caro Necklace",
waist="Grunfeld Rope",
left_ear="Ishvara Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','TP Bonus +25',}},
left_ring="Ilabrat Ring",
right_ring="Shukuyu Ring",
back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS, {neck="Fotia Gorget", waist="Fotia Belt"})
sets.precast.WS['Rudras Storm'] = set_combine(sets.precast.WS)
sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {neck="Fotia Gorget", waist="Fotia Belt"})
sets.precast.WS['Mordant Rime'] = set_combine(sets.precast.WS)
-- Midcast Sets
-- General set for recast times.
sets.midcast.FastRecast = {
main="Kali",
sub="Genbu's Shield",
head={ name="Vanya Hood", augments={'MP+50','"Fast Cast"+10','Haste+2%',}},
body="Inyanga Jubbah +1",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -3%','Song spellcasting time -3%',}},
legs="Aya. Cosciales +1",
feet={ name="Chironic Slippers", augments={'AGI+12','Rng.Atk.+12','"Fast Cast"+4','Accuracy+18 Attack+18','Mag. Acc.+15 "Mag.Atk.Bns."+15',}},
neck="Voltsurge Torque",
waist="Channeler's Stone",
left_ear="Hermetic Earring",
right_ear="Loquac. Earring",
left_ring="Defending Ring",
right_ring="Kishar Ring",
back="Solemnity Cape",
}
-- Gear to enhance certain classes of songs.
sets.midcast.Ballad = {legs="Aoidos' Rhing. +2"}
sets.midcast.Lullaby = {hands="Brioso Cuffs +2"}
sets.midcast.Madrigal = {head="Fili Calot +1"}
sets.midcast.Prelude = {back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','"Fast Cast"+10',}}}
sets.midcast.March = {hands="Fili Manchettes +1"}
sets.midcast.HonorMarch = {hands="Fili Manchettes +1",range="Marsyas"}
sets.midcast.Minuet = {body="Fili Hongreline +1"}
sets.midcast.Minne = {
range="Daurdabla",
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
head="Fili Calot +1",
body="Inyanga Jubbah +1",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -2%','Song spellcasting time -4%',}},
legs="Aya. Cosciales +2",
feet={ name="Telchine Pigaches", augments={'Song spellcasting time -7%',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
left_ring="Defending Ring",
right_ring="Kishar Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.midcast.Paeon = {head="Brioso Roundlet +2"}
sets.midcast.Carol = {head="Fili calot +1",
body="Fili hongreline +1",hands="Fili manchettes +1",
legs="Aoidos' Rhing. +2",feet="Aoidos' Cothrn. +2"}
sets.midcast["Sentinel's Scherzo"] = {feet="Aoidos' Cothrn. +2"}
sets.midcast['Magic Finale'] = {neck="Sanctity Necklace",waist="Luminary Sash",legs="Fili Rhingrave +1"}
sets.midcast.Mazurka = {}
-- For song buffs (duration and AF3 set bonus)
sets.midcast.SongEffect = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Gjallarhorn",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands="Fili Manchettes +1",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Ethereal Earring",
left_ring="Defending Ring",
right_ring="Gelatinous Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
-- For song defbuffs (duration primary, accuracy secondary)
sets.midcast.SongDebuff = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Gjallarhorn",
head="Brioso Roundlet +2",
body="Brioso Justau. +2",
hands="Brioso Cuffs +2",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Luminary Sash",
left_ear="Regal Earring",
right_ear="Digni. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
-- For song defbuffs (accuracy primary, duration secondary)
sets.midcast.ResistantSongDebuff = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Gjallarhorn",
head="Brioso Roundlet +2",
body="Brioso Justau. +2",
hands="Brioso Cuffs +2",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Luminary Sash",
left_ear="Regal Earring",
right_ear="Digni. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.midcast.LullabyDuration = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Marsyas",
head="Brioso Roundlet +2",
body="Fili Hongreline +1",
hands="Brioso Cuffs +2",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Luminary Sash",
left_ear="Regal Earring",
right_ear="Digni. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.midcast.LullabyAccuracy = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Gjallarhorn",
head="Brioso Roundlet +2",
body="Fili Hongreline +1",
hands="Brioso Cuffs +2",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Luminary Sash",
left_ear="Regal Earring",
right_ear="Digni. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.midcast.LullabyDyna = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Daurdabla",
head="Brioso Roundlet +2",
body="Fili Hongreline +1",
hands="Brioso Cuffs +2",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Harfner's Sash",
left_ear="Regal Earring",
right_ear="Musical Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.midcast.LullabyDynaAcc = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Daurdabla",
head="Brioso Roundlet +2",
body="Brioso Justau. +2",
hands="Brioso Cuffs +2",
legs="Inyanga Shalwar +2",
feet="Brioso Slippers +2",
neck="Mnbw. Whistle +1",
waist="Luminary Sash",
left_ear="Regal Earring",
right_ear="Digni. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
-- Song-specific recast reduction
sets.midcast.SongRecast = {ear2="Loquacious Earring",ring1="Kishar Ring",legs="Fili Rhingrave +1"} --back="Harmony Cape",waist="Corvax Sash",
--sets.midcast.Daurdabla = set_combine(sets.midcast.FastRecast, sets.midcast.SongRecast, {range=info.ExtraSongInstrument})
-- Cast spell with normal gear, except using Daurdabla instead
sets.midcast.Daurdabla = {range=info.ExtraSongInstrument}
-- Dummy song with Daurdabla; minimize duration to make it easy to overwrite.
sets.midcast.DaurdablaDummy = {
range="Daurdabla",
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
head="Fili Calot +1",
body="Inyanga Jubbah +1",
hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -2%','Song spellcasting time -4%',}},
legs="Aya. Cosciales +2",
feet={ name="Telchine Pigaches", augments={'Song spellcasting time -7%',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Loquac. Earring",
left_ring="Defending Ring",
right_ring="Kishar Ring",
back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
-- Other general spells and classes.
sets.midcast.Cure = {
main="Queller rod",
sub="Genbu's Shield",
head="Vanya hood",
body="Gendewitha Bliaut",hands="Bokwus Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
legs="Gendewitha Spats",feet="Gendewitha aloshes"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Cursna = sets.midcast.Cure
sets.midcast['Enhancing Magic'] = {
sub="Ammurapi Shield",
ammo="Staunch Tathlum",
head={ name="Telchine Cap", augments={'Mag. Evasion+21','Enemy crit. hit rate -3','Enh. Mag. eff. dur. +10',}},
body={ name="Telchine Chas.", augments={'Mag. Evasion+24','Enemy crit. hit rate -4','Enh. Mag. eff. dur. +8',}},
hands={ name="Telchine Gloves", augments={'Mag. Evasion+25','"Subtle Blow"+6','Enh. Mag. eff. dur. +9',}},
legs={ name="Telchine Braconi", augments={'Mag. Evasion+24','Enemy crit. hit rate -4','Enh. Mag. eff. dur. +9',}},
feet={ name="Telchine Pigaches", augments={'Mag. Evasion+25','"Subtle Blow"+6','Enh. Mag. eff. dur. +10',}},
neck="Incanter's Torque",
waist="Rumination Sash",
left_ear="Loquacious Earring",
right_ear="Enchntr. Earring +1",
left_ring="Stikini Ring",
right_ring="Evanescence Ring",
back="Perimede Cape",
}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})
sets.midcast.RefreshRecieved = set_combine(sets.midcast['Enhancing Magic'], {back="Grapevine Cape",waist="Gishdubar Sash"})
-- Sets to return to when not performing an action.
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.Idle = {}
sets.Idle.Main = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Marsyas",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands={ name="Chironic Gloves", augments={'"Cure" spellcasting time -7%','MND+8','"Refresh"+1',}},
legs="Assid. Pants +1",
feet={ name="Chironic Slippers", augments={'Phys. dmg. taken -3%','Accuracy+23','Chance of successful block +6','Mag. Acc.+15 "Mag.Atk.Bns."+15',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Infused Earring",
left_ring="Defending Ring",
right_ring="Shadow Ring",
back="Solemnity Cape",
}
sets.Idle.PDT = {
main={ name="Kali", augments={'Mag. Acc.+15','String instrument skill +10','Wind instrument skill +10',}},
sub="Genbu's Shield",
range="Marsyas",
head="Fili Calot +1",
body="Fili Hongreline +1",
hands={ name="Chironic Gloves", augments={'"Cure" spellcasting time -7%','MND+8','"Refresh"+1',}},
legs="Assid. Pants +1",
feet={ name="Chironic Slippers", augments={'Phys. dmg. taken -3%','Accuracy+23','Chance of successful block +6','Mag. Acc.+15 "Mag.Atk.Bns."+15',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Etiolation Earring",
right_ear="Infused Earring",
left_ring="Defending Ring",
right_ring="Shadow Ring",
back="Solemnity Cape",
}
sets.Idle.Current = sets.Idle.Main
-- Defense sets
sets.defense.PDT = {}
sets.defense.MDT = {}
sets.Kiting = {feet="Fili Cothurnes +1"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- Engaged sets
sets.engaged = {
range={ name="Linos", augments={'Accuracy+15','"Store TP"+4','Quadruple Attack +3',}},
head="Ayanmo Zucchetto +2",
body="Ashera Harness",
hands="Aya. Manopolas +2",
legs="Jokushu Haidate",
feet="Aya. Gambieras +2",
neck="Combatant's Torque",
waist="Dynamic Belt +1",
left_ear="Telos Earring",
right_ear="Cessance Earring",
left_ring="Ilabrat Ring",
right_ring="Hetairoi Ring",
back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
}
sets.engaged = {
range={ name="Linos", augments={'Accuracy+15','"Store TP"+4','Quadruple Attack +3',}},
head="Aya. Zucchetto +2",
body="Ashera Harness",
hands="Aya. Manopolas +2",
legs={ name="Chironic Hose", augments={'"Triple Atk."+2','"Mag.Atk.Bns."+21','Accuracy+20 Attack+20',}},
feet={ name="Chironic Slippers", augments={'Accuracy+17','MND+9','Quadruple Attack +3','Accuracy+7 Attack+7',}},
neck="Combatant's Torque",
waist="Dynamic Belt +1",
left_ear="Telos Earring",
right_ear="Cessance Earring",
left_ring="Ilabrat Ring",
right_ring="Hetairoi Ring",
back={ name="Intarabus's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
}
sets.meva = {
main="Terra's Staff",
sub="Irenic Strap +1",
ammo="Staunch Tathlum",
head={ name="Telchine Cap", augments={'Mag. Evasion+21','Enemy crit. hit rate -3','Enh. Mag. eff. dur. +10',}},
body={ name="Telchine Chas.", augments={'Mag. Evasion+24','Enemy crit. hit rate -4','Enh. Mag. eff. dur. +8',}},
hands={ name="Telchine Gloves", augments={'Mag. Evasion+25','"Subtle Blow"+6','Enh. Mag. eff. dur. +9',}},
legs={ name="Telchine Braconi", augments={'Mag. Evasion+24','Enemy crit. hit rate -4','Enh. Mag. eff. dur. +9',}},
feet={ name="Telchine Pigaches", augments={'Mag. Evasion+25','"Subtle Blow"+6','Enh. Mag. eff. dur. +10',}},
neck="Warder's Charm +1",
waist="Carrier's Sash",
left_ear="Eabani Earring",
right_ear="Flashward Earring",
left_ring="Purity Ring",
right_ring="Vengeful Ring",
back="Solemnity Cape"
}
-- Relevant Obis. Add the ones you have.
sets.obi = {}
sets.obi.Wind = {waist='Hachirin-no-obi'}
sets.obi.Ice = {waist='Hachirin-no-obi'}
sets.obi.Lightning = {waist='Hachirin-no-obi'}
sets.obi.Light = {waist='Hachirin-no-obi'}
sets.obi.Dark = {waist='Hachirin-no-obi'}
sets.obi.Water = {waist='Hachirin-no-obi'}
sets.obi.Earth = {waist='Hachirin-no-obi'}
sets.obi.Fire = {waist='Hachirin-no-obi'}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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_pretarget(spell)
checkblocking(spell)
if spell.action_type == 'Magic' then
if aftercast_start and os.clock() - aftercast_start < waittime then
windower.add_to_chat(8,"Precast too early! Adding Delay:"..waittime - (os.clock() - aftercast_start))
cast_delay(waittime - (os.clock() - aftercast_start))
end
end
end
function job_precast(spell, action, spellMap, eventArgs)
--[[
for i,v in pairs(buff) do
for i2,v2 in pairs(v) do
print(i2,v2)
end
end
]]
-- handle_equipping_gear(player.status)
precast_start = os.clock()
handle_equipping_gear(player.status)
if spell.type == 'BardSong' then
if buffactive.Nightingale then
local generalClass = get_song_class(spell)
if generalClass and sets.midcast[generalClass] then
windower.add_to_chat(8,'Equipping Midcast - Nightingale active.'..generalClass)
equip(sets.midcast[generalClass])
end
else
equip(sets.precast.FastCast.BardSong)
end
if buffactive.Troubadour and string.find(spell.name,'Lullaby') then
equip({range="Marsyas"})
equip(sets.midcast.Lullaby)
windower.add_to_chat(8,'Marsyas Equipped - Troubadour / Lullaby active')
end
elseif string.find(spell.name,'Cur') and spell.name ~= 'Cursna' then
equip(sets.precast.FastCast.Cure)
elseif spell.name == 'Stoneskin' then
equip(sets.precast.FastCast.Stoneskin)
else
equip(sets.precast.FastCast)
end
-- Auto use Extra Song Instrument for Buffs if less than max # of songs
-- Some thoughts:
-- How to watch party buffs - can take from partybuffs lua and build a table.
local bard_buff_ids = S{195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 218, 219, 220, 221, 222}
num_bard_songs = 0
local self = windower.ffxi.get_player()
for i,v in pairs(self.buffs) do
if bard_buff_ids:contains(v) then
num_bard_songs = num_bard_songs +1
end
end
local generalClass = get_song_class(spell)
if num_bard_songs >= 2 and num_bard_songs < info.MaxSongs and spell.name ~= 'Honor March' and generalClass == 'SongEffect' then
windower.add_to_chat(10,"Swapping to "..info.ExtraSongInstrument.."! Number of bard buffs = "..num_bard_songs)
equip({range=info.ExtraSongInstrument})
end
-- end --
if spell.name == 'Honor March' then
equip({range="Marsyas"})
end
if string.find(spell.name,'Horde') and state.LullabyMode == 'Daurdabla' then
equip(sets.midcast.LullabyDyna)
end
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)
local generalClass = get_song_class(spell)
if spell.action_type == 'Magic' then
if spell.type == 'BardSong' then
-- layer general gear on first, then let default handler add song-specific gear.
if generalClass and sets.midcast[generalClass] then
equip(sets.midcast[generalClass])
end
end
end
-- Auto use Extra Song Instrument for Buffs if less than max # of songs
if spell.english == 'Refresh' and spell.target.type == 'SELF' then
equip(sets.midcast.RefreshRecieved)
end
if num_bard_songs >= 2 and num_bard_songs < info.MaxSongs and spell.name ~= 'Honor March' and generalClass == 'SongEffect' then
equip({range=info.ExtraSongInstrument})
end
-- end --
if spell.name == 'Honor March' then
equip(sets.midcast.HonorMarch)
end
if buffactive.Troubadour and string.find(spell.name,'Lullaby') then
equip(sets.midcast.Lullaby)
equip({range="Marsyas"})
end
weathercheck(spell.element)
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.type == 'BardSong' then
if state.ExtraSongsMode.value == 'FullLength' then
equip(sets.midcast.Daurdabla)
end
end
weathercheck(spell.element)
end
function job_aftercast(spell, action, spellMap, eventArgs)
aftercast_start = os.clock()
local generalClass = get_song_class(spell)
if spell.type == 'BardSong' and not spell.interrupted then
-- if spell.target and spell.target.type == 'SELF' then
-- if spell.target.type ~= 'SELF' and spell.name ~= "Magic Finale" then -- (Only using Custom Timers for debuffs; no huge reason for buffs)
if spell.name ~= "Magic Finale" and (generalClass == "SongDebuff" or generalClass == "ResistantSongDebuff") then -- (Only using Custom Timers for debuffs; no huge reason for buffs)
--adjust_timers(spell, spellMap)
local dur = calculate_duration(spell, spellMap)
send_command('timers create "'..spell.target.name..':'..spell.name..'" '..dur..' down')
end
state.ExtraSongsMode:reset()
end
if state.SpellDebug.value == "On" then
spelldebug(spell)
end
if spell.interrupted then
add_to_chat(8,'--------- Casting Interupted: '..spell.name..'---------')
end
equip(sets.Idle.Current)
check_run_status()
if precast_start and state.SpellDebug.value == "On" then
add_to_chat(8,"Spell: "..spell.name..string.format(" Casting Time: %.2f", aftercast_start - precast_start))
end
precast_start = nil
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
function status_change(new,tab)
handle_equipping_gear(player.status)
if new == 'Resting' then
equip(sets.Resting)
else
equip(sets.Idle.Current)
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
job_handle_equipping_gear(player.status)
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Determine the custom class to use for the given song.
function get_song_class(spell)
-- Can't use spell.targets:contains() because this is being pulled from resources
if spell.skill == 'Singing' then
if set.contains(spell.targets, 'Enemy') then
if spell.name == 'Horde*' and state.HordeMode ~= 'Normal' then
if state.HordeMode.value == 'Dyna' then
return 'LullabyDyna'
elseif state.HordeMode.value == 'Accuracy' then
return 'LullabyAccuracy'
end
end
if state.CastingMode.value == 'Resistant' then
return 'ResistantSongDebuff'
else
return 'SongDebuff'
end
elseif state.ExtraSongsMode.value == 'Dummy' then
return 'DaurdablaDummy'
else
return 'SongEffect'
end
else
return spell.skill
end
end
function calculate_duration(spell, spellMap)
local mult = 1
if player.equipment.range == 'Daurdabla' then mult = mult + 0.3 end -- change to 0.25 with 90 Daur
if player.equipment.range == "Gjallarhorn" then mult = mult + 0.4 end -- change to 0.3 with 95 Gjall
if player.equipment.range == "Marsyas" then mult = mult + 0.5 end --
if player.equipment.main == "Carnwenhan" then mult = mult + 0.1 end -- 0.1 for 75, 0.4 for 95, 0.5 for 99/119
if player.equipment.main == "Legato Dagger" then mult = mult + 0.05 end
if player.equipment.main == "Kali" then mult = mult + 0.05 end
if player.equipment.sub == "Kali" then mult = mult + 0.05 end
if player.equipment.sub == "Legato Dagger" then mult = mult + 0.05 end
if player.equipment.neck == "Aoidos' Matinee" then mult = mult + 0.1 end
if player.equipment.neck == "Moonbow Whistle" then mult = mult + 0.2 end
if player.equipment.body == "Fili Hongreline +1" then mult = mult + 0.12 end
if player.equipment.legs == "Inyanga Shalwar +1" then mult = mult + 0.15 end
if player.equipment.legs == "Inyanga Shalwar +2" then mult = mult + 0.17 end
if player.equipment.feet == "Brioso Slippers" then mult = mult + 0.1 end
if player.equipment.feet == "Brioso Slippers +1" then mult = mult + 0.11 end
if player.equipment.feet == "Brioso Slippers +2" then mult = mult + 0.13 end
if player.equipment.feet == "Brioso Slippers +3" then mult = mult + 0.15 end
if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet" then mult = mult + 0.1 end
if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +3" then mult = mult + 0.2 end
if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +2" then mult = mult + 0.1 end
if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +1" then mult = mult + 0.1 end
if spellMap == 'Madrigal' and player.equipment.head == "Fili Calot +1" then mult = mult + 0.1 end
if spellMap == 'Minuet' and player.equipment.body == "Fili Hongreline +1" then mult = mult + 0.1 end
if spellMap == 'March' and player.equipment.hands == 'Fili Manchettes +1' then mult = mult + 0.1 end
if spellMap == 'Ballad' and player.equipment.legs == "Fili Rhingrave +1" then mult = mult + 0.1 end
if spellMap == 'Lullaby' and player.equipment.hands == 'Brioso Cuffs +1' then mult = mult + 0.1 end
if spellMap == 'Lullaby' and player.equipment.hands == 'Brioso Cuffs +2' then mult = mult + 0.1 end
if spellMap == 'Lullaby' and player.equipment.hands == 'Brioso Cuffs +3' then mult = mult + 0.2 end
if spell.name == "Sentinel's Scherzo" and player.equipment.feet == "Fili Cothurnes +1" then mult = mult + 0.1 end
if MaxJobPoints == 1 then
mult = mult + 0.05
end
if buffactive.Troubadour then
mult = mult*2
end
if spell.name == "Sentinel's Scherzo" then
if buffactive['Soul Voice'] then
mult = mult*2
elseif buffactive['Marcato'] then
mult = mult*1.5
end
end
local generalClass = get_song_class(spell)
-- add_to_chat(8,'Info: Spell Name'..spell.name..' Spell Map:'..spellMap..' General Class:'..generalClass..' Multiplier:'..mult)
if spell.name == "Foe Lullaby II" or spell.name == "Horde Lullaby II" then
base = 60
elseif spell.name == "Foe Lullaby" or spell.name == "Horde Lullaby" then
base = 30
elseif spell.name == "Carnage Elegy" then
base = 180
elseif spell.name == "Battlefield Elegy" then
base = 120
elseif spell.name == "Pining Nocturne" then
base = 120
elseif spell.name == "Maiden's Virelai" then
base = 20
end
if generalClass == 'SongEffect' then
base = 120
totalDuration = math.floor(mult*base)
end
totalDuration = math.floor(mult*base)
if MaxJobPoints == 1 then
if string.find(spell.name,'Lullaby') then
-- add_to_chat(8,'Adding 20 seconds to Timer for Lullaby Job Points')
totalDuration = totalDuration + 20
end
if buffactive['Clarion Call'] then
if buffactive.Troubadour then
-- Doubles Clarion Call Gain for 80 seconds
totalDuration = totalDuration + 80
else
-- add_to_chat(8,'Adding 20 seconds to Timer for Clarion Call Job Points')
totalDuration = totalDuration + 40
end
end
if buffactive['Tenuto'] then
-- add_to_chat(8,'Adding 20 seconds to Timer for Tenuto Job Points')
totalDuration = totalDuration + 20
end
if buffactive['Marcato'] then
-- add_to_chat(8,'Adding 20 seconds to Timer for Marcato Job Points')
totalDuration = totalDuration + 20
end
end
if buffactive.Troubadour then
totalDuration = totalDuration + 20 -- Assuming 20 seconds for capped Trobodour and you actually pre-cast with a Bihu Justaucorps.
end
add_to_chat(8,'Total Duration:'..totalDuration)
return totalDuration
end
-- Function to reset timers.
function reset_timers()
for i,v in pairs(custom_timers) do
send_command('timers delete "'..i..'"')
end
custom_timers = {}
end
-- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
function job_handle_equipping_gear(playerStatus, eventArgs)
disable_specialgear()
if state.TPMode.value == "WeaponLock" then
equip({main=weaponlock_main,sub=weaponlock_sub})
disable("main")
disable("sub")
else
enable("main")
enable("sub")
end
if state.IdleMode.value == "PDT" then
sets.Idle.Current = sets.Idle.PDT
elseif state.IdleMode.value == "MEVA" then
sets.Idle.Current = sets.meva
else
sets.Idle.Current = sets.Idle.Main
end
if playerStatus == 'Idle' then
equip(sets.Idle.Current)
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(8, 12)
end
windower.raw_register_event('logout',reset_timers)
*edit: was able to get it working, had to spell out 'Horde Lullaby II' in the utility secion. Thanks again for the help.
[+]
By Shichishito 2018-10-06 09:39:24
added some rules to smn.lua to inform party members about bloodpact cooldown and when a bloodpact successfully fired to coordinate skillchains
with as little spam as possible.
this is what i currently got: Code
function job_precast(spell, action, spellMap, eventArgs)
-- informs party of remaining Bloodpact cooldown (only for pacts listed in the map SkillchainRagePacts)
local ability_recast = windower.ffxi.get_ability_recasts()
local BPRageRecast = ability_recast[173]
if state.Communication.value == true and not state.Buff['Astral Conduit'] then
if SkillchainRagePacts:contains(spell.english) then
if ability_recast[spell.recast_id] > 1 and ability_recast[spell.recast_id] < 19 then
send_command('input /p '..spell.english..' ready in -'..BPRageRecast..'')
end
end
end
end
function job_pet_aftercast(spell, action, spellMap, eventArgs)
-- When Communication (alt + c) is toggled on you will send party messages
if state.Communication.value == true then
if spell.english:startswith('Flaming Crush') then
send_command('input /p >Flaming Crush< (Fusion/Reverberation) just used it <call20>')
elseif spell.english:startswith('Rush') then
send_command('input /p >>Rush<< (Distortion/Scission) just used it <call20>')
elseif spell.english:startswith('Predator Claws') then
send_command('input /p >>Predator Claws<< (Fragmentation/Scission) just used it <call20>')
elseif spell.english:startswith('Mountain Buster') then
send_command('input /p >>Mountain Buster<< (Gravitation/Induration) just used it <call20>')
elseif spell.english:startswith('Crag Throw') then
send_command('input /p >>Craig Throw<< (Gravitation/Scission) just used it <call20>')
elseif spell.english:startswith('Volt Strike') then
send_command('input /p >>Volt Strike<< (Fragmentation/Scission) just used it <call20>')
elseif spell.english:startswith('Spinning Dive') then
send_command('input /p >>Spinning Dive<< (Distortion/Detonation) just used it <call20>')
elseif spell.english:startswith('Regal Gash') then
send_command('input /p >>Regal Gash<< (Distortion/Detonation) just used it <call20>')
elseif spell.english:startswith('Blindside') then
send_command('input /p >>Blindside<< (Gravitation/Transfixion) just used it <call20>')
elseif spell.english:startswith('Eclipse Bite') then
send_command('input /p >>Eclipse Bite<< (Gravitation/Scission) just used it <call20>')
end
end
end
in laggy situations where you mash the macro the cooldown message gets spamy and for some reason also the aftercast chat message double posts.
now i wonder if there is a way to supress the chat message if the exact same message has been sent a couple of seconds ago to cut down on spam.
By Nekseus 2018-10-06 16:44:15
in laggy situations where you mash the macro the cooldown message gets spamy and for some reason also the aftercast chat message double posts.
now i wonder if there is a way to supress the chat message if the exact same message has been sent a couple of seconds ago to cut down on spam.
You shouldn't be doing this type of automation with gearswap, instead you should make an independent addon. Idk if thats the reason why your issue is happening but GS tends to get bloated by custom user files like this, and especially ones founded on mote's framework. Also you don't need to mash the button during lag. I know you probably know this, just saying :P
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.
|
|