|
Gearswap Support Thread
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-18 17:43:44
Is it not running the function at all, or is it running the function but the unbinds aren't working? I'm not sure how to test if the function is running or not, but the unbinds definitely aren't activating. If I switch to another job that doesn't bind those keys differently, they're still bound to whatever they were on WHM.
I'd assumed you'd know based on the PutItemizer call you have in there.
Valefor.Vaeria
Serveur: Valefor
Game: FFXI
Posts: 28
By Valefor.Vaeria 2014-07-19 00:22:05
I have a very noob question regarding Gearswap, I'm sorry!... moving forward... I am using one of Motes' base for BLM I am attempting to add my own gear. However, I do not understand what gear I need to put into each of these categories. Any help would be greatly appreciated! Thank you!.
Basically, I need to know what kind of gear goes into these sets.
Or at least, what the difference between precast and mid cast? Am I looking for fast cast/haste gear in precast? Then the midcast is what I am actually using once the spell goes off?
Bismarck.Inference
Serveur: Bismarck
Game: FFXI
Posts: 417
By Bismarck.Inference 2014-07-19 00:34:34
There are a handful of job specific forums that would be more catered to answering gear-specific questions, this is intended for purely GearSwap related questions/issues.
http://www.ffxiah.com/forum/forum/83/jobs/
To answer what part of your question is GearSwap related, there are three points throughout a casting procedure : Precast, Midcast, and Aftercast.
Precast is registered at the moment that you tell the server you want to do something. If I type /ma "Stone" <t>, the second I hit enter it registers my precast. This is the area I would want to put Fast Cast gear, gear that needs to be equipped at activation of a JA, or Weapon Skill gear(Weapon Skills have no midcast)
Midcast is most akin to when you receive the "Inference is casting Stone" message in your chat log, this is the area where you would want to put gear to enhance the potency of your spells.
Aftercast occurs after you receive the "Nasty Monster takes 99999 points of damage" chat log. This is where you'd want to go back to the set you'd normally idle in when not doing any action, whether that be a Refresh set or PDT set for example.
[+]
Valefor.Vaeria
Serveur: Valefor
Game: FFXI
Posts: 28
By Valefor.Vaeria 2014-07-19 01:02:32
Thank you! This is exactly what I was looking for, not necessarily specific gear to put there, just what kind of gear to put in these locations. :) Thank you for the pro tips!
By Kell 2014-07-19 01:43:43
I'm using bokura's MNK gearswap lua, found here, but I've found that since the update it'll swap me into equipment other than that in my acc set of choice. In this case, my hat will either remain from my Vsmite WS set (Aug'd uk'uxkaj) or it'll pop me into my hybrid PDT set hat (Lithelimb). I usually have to toggle or WS again for it to reset.
Bug? Otherwise gearswap has been an amazing alternative to spellcast.
Serveur: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2014-07-19 01:43:54
Is it not running the function at all, or is it running the function but the unbinds aren't working? I'm not sure how to test if the function is running or not, but the unbinds definitely aren't activating. If I switch to another job that doesn't bind those keys differently, they're still bound to whatever they were on WHM.
I'd assumed you'd know based on the PutItemizer call you have in there. I see what you're saying now. No, it's not executing the job_file_unload function because that was actually what triggered me looking into it. All my other (main) jobs rebind over the keys, so I never noticed them *not* unbinding on job change. I was experimenting with a way to automatically call all my gear using Itemizer, and when it didn't send it all away, that sparked the investigation. I didn't even think about that, my apologies.
By Selindrile 2014-07-19 09:50:02
Running a modified version of Motenten's Blu, coming back after being gone for a while, and can't for the life of me figure out why my buff-specific gear isn't working properly (Efflux gear, Diffusion, etc).
I tested out Motenten's current version, and it seems to be working properly there, so I'm not sure what I screwed up, if anyone feels like having a look, it would be appreciated.
Code -------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
-- Initialization function for this job file.
function get_sets()
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent.
function job_setup()
state.Buff['Burst Affinity'] = buffactive['Burst Affinity'] or false
state.Buff['Chain Affinity'] = buffactive['Chain Affinity'] or false
state.Buff.Convergence = buffactive.Convergence or false
state.Buff.Diffusion = buffactive.Diffusion or false
state.Buff.Efflux = buffactive.Efflux or false
state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false
blue_spell_maps = {
-- Magic nukes
['Sandspin']='Magic',['Cursed Sphere']='Magic',['Blastbomb']='Magic',['Bomb Toss']='Magic',['Death Ray']='Magic',
['Ice break']='Magic',['Maelstrom']='Magic',['Firespit']='Magic',['Acrid Stream']='Magic',['Leafstorm']='Magic',
['Thermal Pulse']='Magic',['Charged whisker']='Magic',['Water Bomb']='Magic',['Dark Orb']='Magic',['Mind Blast']='Magic',
['Magic Hammer']='Magic',['Everyone\'s Grudge']='Magic',['Mysterious Light']='Magic',['Eyes On Me']='Magic',
['Blazing Bound']='Magic',['Vapor Spray']='Magic',['Gates of Hades']='Magic',['Bilgestorm']='Magic',
['Tempestuous Upheaval']='Magic',['Rending Deluge']='Magic',['Embalming Earth']='Magic',['Foul Waters']='Magic',
['Retinal Glare']='Magic',['Droning Whirlwind']='Magic',['Regurgitation']='Debuff',
-- Magical stuns
['Blitzstrahl']='MagicStun',['Temporal Shift']='MagicStun',['Thunderbolt']='MagicStun',
-- Breath spells
['Poison Breath']='Breath',['Magnetite Cloud']='Breath',['Self Destruct']='Breath',['Hecatomb Wave']='Breath',['Radiant Breath']='Breath',
['Flying Hip Press']='Breath',['Bad Breath']='Breath',['Frost Breath']='Breath',['Heat Breath']='Breath',['Final Sting']='Breath',
['Thunder Breath']='Breath',['Wind Breath']='Breath',
-- Buff spells where Blue Magic Skill matters (need verification)
['Metallic Body']='BuffSkill',['Diamondhide']='BuffSkill',['Reactor Cool']='BuffSkill',['Plasma Charge']='BuffSkill',
['Magic Barrier']='BuffSkill',['Barrier Tusk']='BuffSkill',['Orcish Counterstance']='BuffSkill',['Pyric Bulwark']='BuffSkill',
['Nature\'s Meditation']='BuffSkill',['Carcharian Verve']='BuffSkill',
-- Debuffs
['Sheep Song']='Debuff',['Blood Drain']='Debuff',['Soporific']='Debuff',['Soud Blast']='Debuff',['Chaotic Eye']='Debuff',
['Digest']='Debuff',['Blank Gaze']='Debuff',['Venom Shell']='Debuff',['MP Drainkiss']='Debuff',['Stinking Gas']='Debuff',
['Geist Wall']='Debuff',['Awful Eye']='Debuff',['Blood Saber']='Debuff',['Jettatura']='Debuff',['Frightful Roar']='Debuff',
['Filamented Hold']='Debuff',['Cold Wave']='Debuff',['Light of Penance']='Debuff',['1000 Needles']='Debuff',['Feather Tickle']='Debuff',
['Yawn']='Debuff',['Voracious Trunk']='Debuff',['Infrasonics']='Debuff',['Sandspray']='Debuff',['Corrosive Ooze']='Debuff',
['Enervation']='Debuff',['Lowing']='Debuff',['Triumphant Roar']='Debuff',['Actinic Burst']='Debuff',['Osmosis']='Debuff',
['Cimicine Discharge']='Debuff',['Demoralizing Roar']='Debuff',['Auroral Drape']='Debuff',['Dream Flower']='Debuff',
['Reaving Wind']='Debuff',['Mortal Ray']='Debuff',['Absolute Terror']='Debuff',['Blistering Roar']='Debuff',
-- Physical spells
['Foot Kick']='Physical',['Power Attack']='Physical',['Sprout Smack']='Physical',['Wild Oats']='Physical',['Queasyshroom']='Physical',
['Battle Dance']='Physical',['Bludgeon']='Physical',['Screwdriver']='Physical',['Smite of Rage']='Physical',['Pinecone Bomb']='Physical',
['Jet Stream']='Physical',['Uppercut']='Physical',['Mandibular Bite']='Physical',['Death Scissors']='Physical',
['Dimensional Death']='Physical',['Spinal Cleave']='Physical',['Frenetic Rip']='Physical',['Hydro Shot']='Physical',
['Hysteric Barrage']='Physical',['Cannonball']='Physical',['Asuran Claws']='Physical',['Disseverment']='Physical',
['Vertical Cleave']='Physical',['Goblin Rush']='Physical',['Vanity Dive']='Physical',['Benthic Typhoon']='Physical',
['Quad. Continuum']='Physical',['Empty Thrash']='Physical',['Heavy Strike']='Physical',['Grand slam']='Physical',
['Body Slam']='Physical',['Sub-zero Smash']='Physical',['Ram Charge']='Physical',['Delta Thrust']='Physical',
['Feather storm']='Physical',['Helldive']='Physical',['Spiral Spin']='Physical',['Claw Cyclone']='Physical',['Terror Touch']='Physical',
['Sickle Slash']='Physical',['Seedspray']='Physical',['Quadrastrike']='Physical',['Tourbillion']='Physical',['Amorphic Spikes']='Physical',
['Barbed Crescent']='Physical',['Bloodrake']='Physical',['Paralyzing Triad']='Physical',['Glutinous Dart']='Physical',
-- Physical stuns
['Head Butt']='PhysStun',['Sudden Lunge']='PhysStun',['Tail Slap']='PhysStun',['Frypan']='PhysStun',['Whirl of Rage']='PhysStun',
-- Cure spells, modified by blue skill,healing skill and MND
['Pollen']='BlueCure',['Healing Breeze']='BlueCure',['Wild Carrot']='BlueCure',['Magic Fruit']='BlueCure',
['Plenilune Embrace']='BlueCure',['White Wind']='BlueCure'}
-- Spells that have static effects, not modified by skill or stats
blue_no_skill_spell_list = S{'Cocoon','Harden Shell','Refueling','Zephyr Mantle','Regeneration','Animating Wail','Battery Charge',
'Occultation','Winds of Promy.','Feather Barrier','Memento mori','Saline Coat','Warm-Up','Amplification','Exuviation','Fantod'}
blue_diffusion_spell_list = S{'Cocoon','Metallic Body','Refueling','Animating Wail','Feather Barrier','Memento Mori','Zephyr Mantle','Warm-Up','Amplification',
'Saline Coat','Reactor Cool','Exuviation','Plasma Charge','Harden Shell'}
-- Spells available only through Unbriled Learning
blue_unbridled_spell_list = S{'Harden Shell','Thunderbolt','Absolute Terror','Gates of Hades','Tourbillion','Pyric Bulwark','Bilgestorm','Bloodrake',
'Droning Whirlwind','Carcharian Verve','Blistering Roar'}
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
options.OffenseModes = {'Normal','Acc','iLvl'}
options.DefenseModes = {'Normal','PDT','Evasion','Shield'}
options.WeaponskillModes = {'Normal','Acc'}
options.CastingModes = {'Normal','Acc'}
options.IdleModes = {'Normal','PDT'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
state.Defense.PhysicalMode = 'PDT'
state.OffenseMode = 'Normal'
-- Default macro set/book
set_macro_page(7, 2)
end
-- Called when this job file is unloaded (eg: job change)
function file_unload()
if binds_on_unload then
binds_on_unload()
end
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Azure Lore'] = {hands="Luhlaza Bazubands"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Uk'uxkaj cap",neck="Phalaina Locket",
body="Assim. Jubbah +1",hands="Buremte Gloves",Ring1="Kunaji Ring",Ring2="Asklepian Ring",
legs="Desultor Tassets",feet="Assim. Charuqs +1"}
sets.precast.Waltz['Healing Waltz'] = {legs="Desultor Tassets"}
-- Fast cast sets for spells
sets.precast.FC = {ammo="Impatiens",
ear1="Loquac. Earring",
Ring1="Prolix Ring",
back="Swith Cape",waist="Witful Belt",}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
sets.precast.FC.BlueMagic = set_combine(sets.precast.FC, {body="Mavi Mintan +2"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Kheper Jacket",hands="Buremte Gloves",Ring1="Epona's Ring",Ring2="Rajas Ring",
back="Atheling mantle",waist="Wanion Belt",legs="Manibozho Brais",feet="Assim. Charuqs +1"}
sets.precast.WS.Acc = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Luhlaza Jubbah",hands="Buremte Gloves",Ring1="Epona's Ring",Ring2="Rajas Ring",
back="Letalis Mantle",waist="Anguinus Belt",legs="Manibozho Brais",feet="Assim. Charuqs +1"}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {neck="Soil Gorget",waist="Shadow Belt"})
sets.precast.WS['Requiescat'].Acc = set_combine(sets.precast.WS.Acc, {neck="Soil Gorget",waist="Shadow Belt"})
sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {head="Uk'uxkaj Cap",neck="Rancor Collar"})
sets.precast.WS['Chant du Cygne'].Acc = set_combine(sets.precast.WS.Acc, {neck="Rancor Collar"})
sets.precast.WS['Vorpal Blade'] = set_combine(sets.precast.WS, {head="Uk'uxkaj Cap",neck="Rancor Collar"})
sets.precast.WS['Vorpal Blade'].Acc = set_combine(sets.precast.WS.Acc, {neck="Rancor Collar"})
sets.precast.WS['Sanguine Blade'] = {ammo="Erlene's Notebook",
head="Hagondes Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat",hands="Hagondes Cuffs",Ring1="Spiral Ring",Ring2="Strendu Ring",
back="Cornflower Cape",waist="Aswang Sash",legs="Hagondes Pants",feet="Hagondes Sabots"}
-- Midcast Sets
sets.midcast.FastRecast = {ammo="Impatiens",
head="Whirlpool Mask",ear1="Loquacious Earring",
body="Assim. Jubbah +1",hands="Buremte Gloves",Ring1="Prolix Ring",
waist="Twilight belt",legs="Manibozho Brais",feet="Assim. Charuqs +1"}
-- Specific spells
sets.midcast.Utsusemi = sets.midcast.FastRecast
-- Blue Magic sets
sets.midcast.Physical = {ammo="Honed Tathlum",
head="Luhlaza Keffiyeh",neck="Ziel Charm",ear1="Heartseeker Earring",ear2="Steelflash Earring",
body="Assim. Jubbah +1",hands="Buremte gloves",Ring1="Spiral Ring",Ring2="Rajas Ring",
back="Cornflower Cape",waist="Wanion Belt",legs="Manibozho Brais",feet="Luhlaza Charuqs"}
sets.midcast.Physical.Acc = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Ziel Charm",ear1="Heartseeker Earring",ear2="Steelflash Earring",
body="Assim. Jubbah +1",hands="Buremte gloves",Ring1="Spiral Ring",Ring2="Rajas Ring",
back="Letalis Mantle",waist="Hurch'lan Sash",legs="Manibozho Brais",feet="Assim. Charuqs +1"}
sets.midcast.PhysStun = {ammo="Honed Tathlum",
head="Luhlaza Keffiyeh",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Assim. Jubbah +1",hands="Hagondes Cuffs",Ring1="Strendu Ring",Ring2="Sangoma Ring",
back="Cornflower Cape",waist="Hurch'lan Sash",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}
sets.midcast.PhysStun.Acc = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Ziel Charm",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Assim. Jubbah +1",hands="Hagondes Cuffs",Ring1="Strendu Ring",Ring2="Sangoma Ring",
back="Cornflower Cape",waist="Hurch'lan Sash",legs="Mavi Tayt +2",feet="Assim. Charuqs +1"}
sets.midcast.Magic = {ammo="Erlene's notebook",
head="Hagondes Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat",hands="Hagondes Cuffs",Ring1="Spiral Ring",Ring2="Strendu Ring",
back="Cornflower Cape",waist="Wanion Belt",legs="Hagondes pants",feet="Hagondes Sabots"}
sets.midcast.Debuff = {ammo="Mavi Tathlum",
head="Luhlaza Keffiyeh",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Assim. Jubbah +1",hands="Hagondes cuffs",Ring1="Strendu Ring",Ring2="Sangoma Ring",
back="Cornflower Cape",waist="Aswang Sash",legs="Mavi tayt +2",feet="Luhlaza Charuqs"}
sets.midcast.MagicStun = sets.midcast.Debuff
sets.midcast.BuffSkill = {ammo="Mavi Tathlum",
head="Luhlaza Keffiyeh",neck="Mavi Scarf",ear1="Loquac. Earring",
body="Assim. Jubbah +1",hands="Assim. Bazu.",Ring1="Prolix Ring",
back="Cornflower Cape",waist="Hurch'lan Sash",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}
sets.midcast.Breath = {ammo="Mavi Tathlum",
head="Luhlaza Keffiyeh",neck="Mavi Scarf",ear1="Loquac. Earring",
body="Assim. Jubbah +1",hands="Assim. Bazu.",Ring1="Prolix Ring",
back="Cornflower Cape",waist="Hurch'lan Sash",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}
sets.midcast.BlueCure = {ammo="Mavi Tathlum",
head="Uk'uxkaj cap",neck="Phalaina Locket",ear1="Loquac. Earring",
body="Assim. Jubbah +1",hands="Buremte Gloves",Ring1="Kunaji Ring",Ring2="Asklepian Ring",
back="Tempered Cape",waist="Witful Belt",legs="Praeco Slacks",feet="Luhlaza Charuqs"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = sets.idle
-- Idle sets
sets.idle = {ammo="Honed Tathlum",
head="Wivre Hairpin",neck="Twilight torque",ear1="Moonshade Earring", ear2="Ethereal Earring",
body="Assim. Jubbah +1",hands="Serpentes Cuffs",Ring1="Sheltered Ring",Ring2="Dark Ring",
back="Atheling Mantle",waist="Flume Belt",legs="Blood Cuisses",feet="Serpentes Sabots"}
sets.idle.Town = {ammo="Honed Tathlum",
head="Wivre Hairpin",neck="Twilight torque",ear1="Moonshade Earring", ear2="Ethereal Earring",
body="Assim. Jubbah +1",hands="Serpentes Cuffs",Ring1="Sheltered Ring",Ring2="Dark Ring",
back="Atheling Mantle",waist="Flume Belt",legs="Blood Cuisses",feet="Serpentes Sabots"}
sets.idle.DT = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Twilight torque",ear1="Moonshade Earring", ear2="Ethereal Earring",
body="Hagondes Coat",hands="Hagondes Cuffs",Ring1="Dark Ring",Ring2="Dark Ring",
back="Mollusca mantle",waist="Flume Belt",legs="Blood Cuisses",feet="Hagondes Sabots"}
--sets.idle.Weak = sets.idle
-- Defense sets
sets.defense.PDT = {ammo="Honed Tathlum",
head="Hagondes Hat",neck="Twilight torque",ear1="Moonshade Earring", ear2="Ethereal Earring",
body="Hagondes Coat",hands="Hagondes Cuffs",Ring1="Dark Ring",Ring2="Dark Ring",
back="Mollusca mantle",waist="Flume Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
sets.defense.MDT = {ammo="Honed Tathlum",
head="Uk'uxkaj Cap",neck="Twilight torque",ear1="Moonshade Earring", ear2="Ethereal Earring",
body="Hagondes Coat",hands="Hagondes Cuffs",Ring1="Dark Ring",Ring2="Dark Ring",
back="Mollusca mantle",waist="Flume Belt",legs="Kaabnax Trousers",feet="Assim. Charuqs +1"}
sets.Kiting = {legs="Blood Cuisses"}
-- Engaged sets
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Normal melee group
sets.engaged = {ammo="Honed Tathlum",
head="Thurandaut Chapeau +1",neck="Asperity Necklace", ear1="Dudgeon Earring", ear2="Heartseeker Earring",
body="Thaumas Coat",hands="Buremte Gloves",Ring1="Epona's Ring",Ring2="Rajas Ring",
back="Atheling mantle",waist="Twilight belt",legs="Manibozho Brais",feet="Manibozho Boots"}
sets.engaged.Acc = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace", ear1="Dudgeon Earring", ear2="Heartseeker Earring",
body="Thaumas Coat",hands="Buremte Gloves",Ring1="Epona's Ring",Ring2="Rajas Ring",
back="Letalis mantle",waist="Hurch'lan Sash",legs="Manibozho Brais",feet="Assim. Charuqs +1"}
sets.engaged.iLvl = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Assim. Jubbah +1",hands="Buremte Gloves",Ring1="Epona's Ring",Ring2="Rajas Ring",
back="Letalis mantle",waist="Cetl Belt",legs="Manibozho Brais",feet="Assim. Charuqs +1"}
sets.engaged.Acc.Evasion = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Dudgeon Earring", ear2="Heartseeker Earring",
body="Assim. Jubbah +1",hands="Buremte Gloves",Ring1="Epona's Ring",Ring2="Rajas Ring",
back="Letalis mantle",waist="Cetl Belt",legs="Kaabnax Trousers",feet="Assim. Charuqs +1"}
sets.engaged.Evasion = {ammo="Honed Tathlum",
head="Uk'uxkaj Cap",neck="Asperity Necklace",ear1="Suppanomimi", ear2="Brutal Earring",
body="Assim. Jubbah +1",hands="Buremte Gloves",Ring1="Epona's Ring",Ring2="Rajas Ring",
back="Letalis mantle",waist="Cetl Belt",legs="Kaabnax Trousers",feet="Assim. Charuqs +1"}
sets.engaged.Shield = {ammo="Honed Tathlum",
head="Uk'uxkaj Cap",neck="Asperity Necklace", ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Thaumas Coat",hands="Buremte Gloves",Ring1="Epona's Ring",Ring2="Rajas Ring",
back="Atheling mantle",waist="Cetl Belt",legs="Manibozho Brais",feet="Manibozho Boots"}
sets.engaged.PDT = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Twilight torque",ear1="Moonshade Earring", ear2="Ethereal Earring",
body="Assim. Jubbah +1",hands="Hagondes Cuffs",Ring1="Dark Ring",Ring2="Dark Ring",
back="Mollusca mantle",waist="Flume Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
sets.engaged.Acc.PDT = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Twilight torque",ear1="Dudgeon Earring", ear2="Heartseeker Earring",
body="Assim. Jubbah +1",hands="Buremte Gloves",Ring1="Dark Ring",Ring2="Dark Ring",
back="Letalis mantle",waist="Hurch'lan Sash",legs="Kaabnax Trousers",feet="Assim. Charuqs +1"}
-- Sets that have JS specific enhancements
sets.buff['Burst Affinity'] = {feet="Mavi Basmak +2"} --{legs="Assimilator's Shalwar"}
sets.buff['Chain Affinity'] = {feet="Assim. Charuqs +1"}
sets.buff.Convergence = {head="Luhlaza Keffiyeh"}
sets.buff.Diffusion = {feet="Luhlaza Charuqs"}
sets.buff.Efflux = {legs="Mavi Tayt +2"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
-- Auto handle Unbridled learning activation if casting a spell that requires it
if blue_unbridled_spell_list[spell.english] and not buffactive['Unbridled Learning'] then
windower.send_command('@input /ja "Unbridled learning" <me>; wait 1.25; input /ma "'..spell.name..'" '..spell.target.name)
eventArgs.cancel = true
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)
if spell.action_type == 'Magic' then
if spell.skill == 'BlueMagic' then
-- Define the Blue Magic spell type used
classes.CustomClass = blue_spell_class(spell)
--add_to_chat(122, 'Spell = '..classes.CustomClass)
else
-- Default base equipment layer is fast recast.
equip(sets.midcast.FastRecast)
end
end
end
-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'BlueMagic' then
if classes.CustomClass == 'Physical' then
if state.Buff['Chain Affinity'] then
equip(sets.buff['Chain Affinity'])
end
if state.Buff['Efflux'] then
equip(sets.buff.Efflux)
end
elseif classes.CustomClass == 'Magic' then
if state.Buff['Burst Affinity'] then
equip(sets.buff['Burst Affinty'])
end
if state.Buff['Covergence'] then
equip(sets.buff.Convergence)
end
elseif state.Buff['Diffusion'] and blue_diffusion_spell_list[spell] then
equip(sets.buff.Diffusion)
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted then
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = true
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function blue_spell_class(spell)
if blue_no_skill_spell_list[spell.english] then
-- Use the default set if skill is not needed
return nil
elseif blue_spell_maps[spell.english] then
-- If the spell is defined in blue_spell_maps
-- return the value as customClass
return blue_spell_maps[spell.english]
else
-- Basic error handling for when the blue spell name is not recognized
-- fallback to standard set
add_to_chat(122,'Spell '..spell.english..' not recognized, using default set')
return nil
end
end
By gdiShun 2014-07-20 07:36:30
Hi. Came back recently and making the transfer from Spellcast to Gearswap and have a couple questions(for now :x)
1. Is something like this possible? Code sets.precast.WS['Blade: Shun' or 'Blade: Ku']
Basically have 1 set for 2 WS without set_combines or anything like that. Just would prefer it for the cleaner code. lol :x
2. For Spellcast I have this bind in my init.txt: Code bind ^Backspace sc set %status; I use it mainly to update my feet piece during night/day and sometimes for updating the set when SC would glitch or I had a menu open when it was supposed to change gear. I don't think the latter is needed but how would I accomplish the former? Self-commands or is there a better way in the .lua file itself? :x
Thanks! Probably will be back with more. lol.
By Miang 2014-07-20 07:41:19
Hi. Came back recently and making the transfer from Spellcast to Gearswap and have a couple questions(for now :x)
1. Is something like this possible? Code sets.precast.WS['Blade: Shun' or 'Blade: Ku']
Basically have 1 set for 2 WS without set_combines or anything like that. Just would prefer it for the cleaner code. lol :x
2. For Spellcast I have this bind in my init.txt: Code bind ^Backspace sc set %status; I use it mainly to update my feet piece during night/day and sometimes for updating the set when SC would glitch or I had a menu open when it was supposed to change gear. I don't think the latter is needed but how would I accomplish the former? Self-commands or is there a better way in the .lua file itself? :x
Thanks! Probably will be back with more. lol.
For 1. you need to create 2 sets, and just link the second back to the first: Code sets.precast.WS['Blade: Shun'] = T{w/e gear you want}
sets.precast.WS['Blade: Ku'] = sets.precast.WS['Blade: Shun']
For 2, the way I have my GS setup I have an "idle" function that I normally call function handle_idle() and I call this function in the code in multiple locations, such as if I gain the buff terror/stun/petri or if I'm in aftercast. If you had a function to do this in your GS, in your self_command you could have if command == 'idle' then handle_idle(), and in you init.txt change it to bind ^Backspace gs c idle;
[+]
By gdiShun 2014-07-20 10:06:45
Thanks, Miang. I actually accidentally found out that "gs c update" will do #2 as well. No need for custom self_commands.
Serveur: Sylph
Game: FFXI
Posts: 15065
By Sylph.Tigerwoods 2014-07-20 10:19:14
Can you do things like switch to black belt when your gear is locked (salvage) since I'll use the haste from it until I unlock enough gear to cap haste w/o
Leviathan.Arcon
VIP
Serveur: Leviathan
Game: FFXI
Posts: 666
By Leviathan.Arcon 2014-07-20 11:59:39
Yes, encumbrance is in the resources, so it works from within Lua. I don't know if GS has its own encumbrance table exposed though. If it does, it would probably be easier to use that, but someone else would have to explain how.
Serveur: Valefor
Game: FFXI
Posts: 211
By Valefor.Lisamarie 2014-07-20 12:55:02
I have two broken gearswaps.... I'm in the process of switching over (After being away from the game for 8 months)...
WHM... Code -------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
-- Initialization function for this job file.
function get_sets()
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent.
function job_setup()
state.Buff['Afflatus Solace'] = buffactive['Afflatus Solace'] or false
state.Buff['Afflatus Misery'] = buffactive['Afflatus Misery'] or false
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
options.OffenseModes = {'None', 'Normal'}
options.DefenseModes = {'Normal'}
options.WeaponskillModes = {'Normal'}
options.CastingModes = {'Normal', 'Resistant', 'Dire'}
options.IdleModes = {'Normal', 'PDT'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
state.Defense.PhysicalMode = 'PDT'
state.OffenseMode = 'None'
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FC = {main="Capricorn Staff", body="Anhur Robe", back="Swith Cape", head="Nahtirah Hat", feet="Chelona Boots", neck="Orison Locket", hands="Gendewitha Gages", legs="Orvail Pants", ammo="Incantor Stone", ear1="Loquac. Earring"}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'])
sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {legs="Orison Pantaloons +2", body="Heka's Kalasiris"})
sets.precast.FC.StatusRemoval = sets.precast.FC['Healing Magic']
sets.precast.FC.Cure = set_combine(sets.precast.FC['Healing Magic'], {main="Tamaxchi",sub="Genbu's Shield",ammo="Impatiens"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
-- Precast sets to enhance JAs
sets.precast.JA.Benediction = {body="Piety Briault"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Nahtirah Hat",ear1="Roundel Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",
back="Refraction Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
gear.default.weaponskill_neck = "Asperity Necklace"
gear.default.weaponskill_waist = ""
sets.precast.WS = {
head="Nahtirah Hat",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Refraction Cape",waist=gear.ElementalBelt,legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.precast.WS['Flash Nova'] = {
head="Nahtirah Hat",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="Strendu Ring",
back="Toro Cape",waist="Thunder Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Midcast Sets
sets.midcast.FastRecast = {
head="Nahtirah Hat",ear2="Loquacious Earring",
body="Hedera Cotehardie",hands="Gendewitha Gages",
back="Swith Cape",waist="Witful Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Cure sets
gear.default.obi_waist = "Goading Belt"
gear.default.obi_back = "Mending Cape"
sets.midcast.CureSolace = {main="Tamaxchi",sub="Genbu's Shield",ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Phrenic Torque", body="Orison Bliaud +2", back="Orison Cape", ring2="Ephedra Ring", ring1="Sirona's ring", feet="Gende. Galoshes", legs="Orsn. Pantaln. +2", ear1="Novia Earring", ear2="Orison Earring", hands="Bokwus Gloves", waist="Cascade Belt"}
sets.midcast.Cure = {main="Tamaxchi",sub="Genbu's Shield",ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Phrenic Torque", body="Orison Bliaud +2", back="Orison Cape", ring2="Ephedra Ring", ring1="Sirona's ring", feet="Gende. Galoshes", legs="Orsn. Pantaln. +2", ear1="Novia Earring", ear2="Orison Earring", hands="Bokwus Gloves", waist="Cascade Belt"}
sets.midcast.Curaga = {main="Tamaxchi", body="Heka's Kalasiris", neck="Phrenic Torque", back="Pahtli Cape", ring2="Ephedra Ring", feet="Gende. Galoshes", legs="Orison Pantaloon's +2", ammo="Incantor Stone", head="Gendewitha Caubeen", ear1="novia Earring", ear2="Orison Earring", hands="Ayao's Gages", ring1="Sirona's ring", ring2="Cascade Belt", sub="Genbu's Shield"}
sets.midcast.CureMelee = {ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Orison Locket",ear1="Lifestorm Earring",ear2="Orison Earring",
body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Prolix Ring",ring2="Sirona's Ring",
back="Tuilha Cape",waist=gear.ElementalObi,legs="Orison Pantaloons +2",feet="Piety Duckbills +1"}
sets.midcast.Cursna = {main="Beneficus",sub="Genbu's Shield",
head="Orison Cap +2",neck="Orison Locket",
body="Orison Bliaud +2",hands="Gendewitha Gages",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Mending Cape",waist="Goading Belt",legs="Clr. Pantaln. +2",feet="Gendewitha Galoshes"}
sets.midcast.StatusRemoval = {
head="Orison Cap +2",legs="Orison Pantaloons +2"}
-- 110 total Enhancing Magic Skill; caps even without Light Arts
sets.midcast['Enhancing Magic'] = {main="Beneficus",sub="Genbu's Shield",
head="Orison Cap +2",neck="Colossus's Torque",
body="Anhur Robe",hands="Ayao's Gages",
back="Swith Cape",waist="Cascade Belt",legs="Clr. Pantaln +2" ,feet="Orison Duckbills +2"}
sets.midcast.Stoneskin = {
head="Nahtirah Hat",neck="Orison Locket",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Dynasty Mitts",
back="Swith Cape +1",waist="Siegel Sash",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.midcast.Auspice = {hands="Dynasty Mitts",feet="Orison Duckbills +2"}
sets.midcast.BarElement = {main="Beneficus",sub="Genbu's Shield",
head="Orison Cap +2",neck="Colossus's Torque",
body="Orison Bliaud +2",hands="Ayao's Gages",
back="Swith Cape",waist="Cascade Belt",legs="Clr. Pantaln +2" ,feet="Orison Duckbills +2"}
sets.midcast.Regen = {
body="Clr. Briault +2" ,hands="Orison Mitts +2", head="Nahtirah Hat", waist="Witful Belt",
legs="Gendewitha Spats", feet="Gendewitha Galoshes", neck="Orison Locket"}
sets.midcast.Protectra = {ring1="Sheltered Ring",feet="Piety Duckbills +1"}
sets.midcast.Shellra = {ring1="Sheltered Ring",legs="Piety Pantaloons"}
sets.midcast['Divine Magic'] = {main="Bolelabunga",sub="Genbu's Shield",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring2="Sangoma Ring",
back="Refraction Cape",waist=gear.ElementalObi,legs="Theophany Pantaloons",feet="Gendewitha Galoshes"}
sets.midcast['Dark Magic'] = {main="Bolelabunga", sub="Genbu's Shield",
head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Piety Duckbills +1"}
-- Custom spell classes
sets.midcast.MndEnfeebles = {main="Lehbrailg +2", sub="Mephitis Grip",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Piety Duckbills +1"}
sets.midcast.IntEnfeebles = {main="Lehbrailg +2", sub="Mephitis Grip",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Piety Duckbills +1"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main=gear.Staff.HMP,
body="Gendewitha Bliaut",hands="Serpentes Cuffs",
waist="Austerity Belt",legs="Nares Trews",feet="Chelona Boots +1"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {main="Owleyes", sub="Genbu's Shield", ammo="Incantor Stone", head="Wivre Hairpin", ring2="Dark Ring", ring1="Dark Ring", ear1="Merman's Earring",
ear2="Moonshade Earring", neck="Twilight Torque", body="Gendewitha Bliaut", back="Umbra Cape", hands="Serpentes Cuffs', waist="Tarutaru Sash", legs="Nares Trews", feet="Serpentes Sabots" }
sets.idle.PDT = {main="Bolelabunga", sub="Genbu's Shield",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Umbra Cape",waist="Witful Belt",legs="Gendewitha Spats",feet="Herald's Gaiters"}
sets.idle.Town = {main="Bolelabunga", sub="Genbu's Shield",ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Witful Belt",legs="Nares Trews",feet="Herald's Gaiters"}
sets.idle.Weak = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Meridian Ring",
back="Umbra Cape",waist="Witful Belt",legs="Nares Trews",feet="Gendewitha Galoshes"}
-- Defense sets
sets.defense.PDT = {main=gear.Staff.PDT,sub="Achaq Grip",
head="Gendewitha Caubeen",neck="Twilight Torque",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Umbra Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.defense.MDT = {main=gear.Staff.PDT,sub="Achaq Grip",
head="Nahtirah Hat",neck="Twilight Torque",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Tuilha Cape",legs="Bokwus Slops",feet="Gendewitha Galoshes"}
sets.Kiting = {feet="Herald's Gaiters"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- Engaged sets
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Basic set for if no TP weapon is defined.
sets.engaged = {
head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Vanir Cotehardie",hands="Dynasty Mitts",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Umbra Cape",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Divine Caress'] = {hands="Orison Mitts +2",back="Mending Cape"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if spell.english == "Paralyna" and buffactive.Paralyzed then
-- no gear swaps if we're paralyzed, to avoid blinking while trying to remove it.
eventArgs.handled = true
end
if spell.skill == 'Healing Magic' then
gear.default.obi_back = "Mending Cape"
else
gear.default.obi_back = "Toro Cape"
end
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = true
end
end
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Apply Divine Caress boosting items as highest priority over other gear, if applicable.
if spellMap == 'StatusRemoval' and buffactive['Divine Caress'] then
equip(sets.buff['Divine Caress'])
end
end
-- Return true if we handled the aftercast work. Otherwise it will fall back
-- to the general aftercast() code in Mote-Include.
function job_aftercast(spell, action, spellMap, eventArgs)
if state.Buff[spell.english] ~= nil then
state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if (default_spell_map == 'Cure' or default_spell_map == 'Curaga') and player.status == 'Engaged' then
return "CureMelee"
elseif default_spell_map == 'Cure' and state.Buff['Afflatus Solace'] then
return "CureSolace"
elseif spell.skill == "Enfeebling Magic" then
if spell.type == "WhiteMagic" then
return "MndEnfeebles"
else
return "IntEnfeebles"
end
end
end
end
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
if cmdParams[1] == 'user' and not areas.Cities:contains(world.area) then
local needsArts =
player.sub_job:lower() == 'sch' and
not buffactive['Light Arts'] and
not buffactive['Addendum: White'] and
not buffactive['Dark Arts'] and
not buffactive['Addendum: Black']
if not buffactive['Afflatus Solace'] and not buffactive['Afflatus Misery'] then
if needsArts then
send_command('@input /ja "Afflatus Solace" <me>;wait 1.2;input /ja "Light Arts" <me>')
else
send_command('@input /ja "Afflatus Solace" <me>')
end
end
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'OffenseMode' then
if newValue == 'Normal' then
disable('main','sub')
else
enable('main','sub')
end
elseif stateField == 'Reset' then
if state.OffenseMode == 'None' then
enable('main','sub')
end
end
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
local defenseString = ''
if state.Defense.Active then
local defMode = state.Defense.PhysicalMode
if state.Defense.Type == 'Magical' then
defMode = state.Defense.MagicalMode
end
defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
end
local meleeString = ''
if state.OffenseMode == 'Normal' then
meleeString = 'Melee: Weapons locked, '
end
add_to_chat(122,'Casting ['..state.CastingMode..'], '..meleeString..'Idle ['..state.IdleMode..'], '..defenseString..
'Kiting: '..on_off_names[state.Kiting])
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
set_macro_page(4, 14)
end
BRD... Code -- *** Credit goes to Flippant for helping me with Gearswap *** --
-- ** I Use Byrth & Motenten's Functions ** --
-- Last Updated: 05/05/14 12:00 AM ** --
function get_sets()
AccIndex = 1
AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
IdleIndex = 1
IdleArray = {"Movement","PDT"} -- Default Idle Set Is Movement --
timer_reg = {}
pianissimo_cycle = false
Daurdabla = 'ON' -- Set Default Daurdabla ON or OFF Here --
ElementalStaff = 'ON' -- Set Default Precast Elemental Staff ON or OFF Here --
Main = 'OFF' -- Set Default Main Weapon ON or OFF Here --
target_distance = 5 -- Set Default Distance Here --
select_default_macro_book() -- Change Default Macro Book At The End --
-- Daurdabla Trigger Songs --
DaurdSongs = S{"Army's Paeon","Army's Paeon II","Shining Fantasia","Herb Pastoral","Goblin Gavotte"}
Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
sc_map = {SC1 = "ChocoboMazurka", SC2 = "HerbPastoral", SC3 = "GoblinGavotte"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
sets.Idle = {}
-- Idle Sets --
sets.Idle.Movement = {
main="Earth Staff",
range="Gjallarhorn",
head="Wivre Hairpin",
neck="Twilight Torque",
ear1="Merman's Earring",
ear2="Moonshade Earring",
body="Gendewitha Bliaut",
hands="Serpentes Cuffs",
ring1="Sheltered Ring",
ring2="Paguroidea Ring",
back="Umbra Cape",
waist="Flume Belt",
legs="Nares Trews",
feet="Aoidos' Cothrn. +2"}
sets.Idle.PDT = set_combine(sets.Idle.Movement,{
head="Gende. Caubeen",
legs="Gendewitha Spats"})
sets.Resting = set_combine(sets.Idle.Movement,{})
sets.Precast = {}
-- Song Precast Set --
sets.Precast.SongCast = {
sub="Genbu's Shield",
main="Felibre's Dague",
range=empty,
ammo=empty,
head="Aoidos' Calot +2",
neck="Aoidos' Matinee",
ear1="Loquac. Earring",
ear2="Moonshade Earring",
body="Anhur Robe",
hands="Gendewitha Gages",
back="Swith Cape",
waist="Aoidos' Belt",
legs="Gendewitha Spats",
feet="bokwus Boots"}
-- Precast Daurdabla Set --
sets.Precast.Daurdabla = {
sub="Genbu's Shield",
main="Felibre's Dague",
range="Terpander",
ammo=empty,
head="Aoidos' Calot +2",
neck="Aoidos' Matinee",
ear1="Loquac. Earring",
ear2="Moonshade Earring",
body="Anhur Robe",
hands="Gendewitha Gages",
back="Swith Cape",
waist="Aoidos' Belt",
legs="Gendewitha Spats",
feet="bokwus Bots"}
-- Fastcast Set --
sets.Precast.FastCast = {
head="Nahtirah Hat",
neck="Jeweled Collar",
ear1="Loquac. Earring",
body="Anhur Robe",
hands="Gendewitha Gages",
back="Swith Cape",
waist="Witful Belt",
legs="Orvail Pants",
feet="Chelona Boots"}
-- Cure Precast Set --
sets.Precast.Cure = {
head="Nahtirah Hat",
neck="Jeweled Collar",
ear2="Loquac. Earring",
body="Heka's Kalasiris",
hands="Gendewitha Gages",
back="Pahtli Cape",
waist="Witful Belt",
legs="Orvail Pants",
feet="Chelona Boots"}
-- Midcast Base Set --
sets.Midcast = {
head="Nahtirah Hat",
neck="Jeweled Collar",
ear1="Loquac. Earring",
hands="Gendewitha Gages",
back="Swith Cape",
-- Song Debuff Set --
sets.Midcast.Wind = {
main="Izhiikoh",
sub="Genbu's Shield",
head="Nahtirah Hat",
neck="Aoidos' Matinee",
ear1="Lifestorm Earring",
ear2="Psystorm Earring",
body="Aoidos' Hnrln. +2",
hands="Gendwewitha Gages",
ring1="Balrahn's Ring",
ring2="Omega Ring",
back="Mesmeric Cape",
waist="Marching Belt",
legs="Aoidos' Rhing. +2",
feet="Bokwus Boots"}
-- Song Buff Set --
sets.Midcast.WindBuff = {
main="Izhiikoh",
sub="Genbu's Shield",
head="Nahtirah Hat",
neck="Aoidos' Matinee",
ear1="Lifestorm Earring",
ear2="Psystorm Earring",
body="Aoidos' Hnrln. +2",
hands="Gendwewitha Gages",
ring1="Balrahn's Ring",
ring2="Omega Ring",
back="Mesmeric Cape",
waist="Marching Belt",
legs="Aoidos' Rhing. +2",
feet="Bokwus Boots"}
sets.Midcast.March = {hands="Ad. Mnchtte. +2",
range="Langeleik"}
sets.Midcast.Minuet = {body="Aoidos' Hngrln. +2",
range="Apollo's Flute"}
sets.Midcast.Madrigal = {head="Aoidos' Calot +2",
range="Cantabank's Horn"}
sets.Midcast.Prelude = {head="Aoidos' Calot +2",
range="Cantabank's Horn"}
sets.Midcast.Ballad = {legs="Aoidos' Rhing. +2",
range="Crooner's Cithara"}
sets.Midcast.Scherzo = {feet="Aoidos' Cothrn. +2",
range="Syrinx"}
sets.Midcast.Mazurka = {head="Nahtirah Hat",
range="Vihuela"}
sets.Midcast.Mambo = {head="Nahtirah Hat",
range="Vihuela"}
sets.Midcast.Paeon = {head="Brioso Roundlet +1"}
sets.Midcast.Finale = {range="Ney"}
sets.Midcast.Elegy = {range="Syrinx"}
sets.Midcast.Lullaby = {range="Mary's Horn"}
-- Cure Set --
sets.Midcast.Cure = {
main="Arka IV",
sub="Quire",
head="Gende. Caubeen",
neck="Jeweled Collar",
ear1="Loquac. Earring",
body="Gendewitha Bliaut",
hands="Bokwus Gloves",
ring1="Karka Ring",
ring2="Omega Ring",
back="Swith Cape",
waist="Witful Belt",
legs="Orvail Ants",
feet="Gendewitha Galoshes"}
-- Curaga Set --
sets.Midcast.Curaga = {
main="Arka IV",
sub="Quire",
head="Gende. Caubeen",
neck="Jeweled Collar",
ear1="Loquac. Earring",
body="Gendewitha Bliaut",
hands="Bokwus Gloves",
ring1="Karka Ring",
ring2="Omega Ring",
back="Swith Cape",
waist="Witful Belt",
legs="Orvail Ants",
feet="Gendewitha Galoshes"}
-- Haste Set --
sets.Midcast.Haste = set_combine(sets.Precast.FastCast,{
head="Gende. Caubeen",
neck="Jeweled Collar",
ear1="Loquac. Earring",
body="Hedera Cotehardie",
hands="Gendewitha Gages",
back="Swith Cape",
waist="Phasmida Belt",
legs="Gendewitha Spats",
feet="Gendewitha Galoshes"})
-- Cursna Set --
sets.Midcast.Cursna = set_combine(sets.Midcast.Haste,{
feet="Gende. Galoshes"})
-- Stoneskin Set --
sets.Midcast.Stoneskin = set_combine(sets.Midcast.Haste, {
ear2="Earthcry Earring",
legs="Haven Hose",
waist="Siegel Sash")
-- JA Sets --
sets.JA = {}
sets.JA.Nightingale = {feet="Brd. Slippers +2"}
sets.JA.Troubadour = {body="Bard's Justaucorps +2"}
sets.JA["Soul Voice"] = {legs="Brd. Cannions +2"}
-- Waltz --
sets.Waltz = {}
-- Melee Sets --
sets.Melee = {}
sets.Melee.MidACC = set_combine(sets.Melee,{})
sets.Melee.HighACC = set_combine(sets.Melee.MidACC,{})
-- WS Base Set --
sets.WS = {}
sets.WS.Exenterator = {}
sets.WS.Exenterator.MidACC = set_combine(sets.WS.Exenterator,{})
sets.WS.Exenterator.HighACC = set_combine(sets.WS.Exenterator.MidACC,{})
sets.WS.Evisceration = {}
sets.WS.Evisceration.MidACC = set_combine(sets.WS.Evisceration,{})
sets.WS.Evisceration.HighACC = set_combine(sets.WS.Evisceration.MidACC,{})
sets.WS["Mercy Stroke"] = {}
sets.WS["Mercy Stroke"].MidACC = set_combine(sets.WS["Mercy Stroke"],{})
sets.WS["Mercy Stroke"].HighACC = set_combine(sets.WS["Mercy Stroke"].MidACC,{})
sets.WS["Rudra's Storm"] = {}
sets.WS["Rudra's Storm"].MidACC = set_combine(sets.WS["Rudra's Storm"],{})
sets.WS["Rudra's Storm"].HighACC = set_combine(sets.WS["Rudra's Storm"].MidACC,{})
sets.WS["Mordant Rime"] = {}
-- Lock Main Weapon --
sets.MainWeapon = {
main="Carnwenhan",
sub="Genbu's Shield"}
end
function pretarget(spell,action)
if spell.action_type == 'Magic' and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
cancel_spell()
send_command('input /item "Echo Drops" <me>')
elseif spell.type == "BardSong" and spell.target.name == player.name and buffactive.Pianissimo then -- Change Target From <me> To <t> When Pianissimo Is Active --
change_target('<t>')
elseif spell.type == 'BardSong' and spell.target.type and spell.target.type == 'PLAYER' and not buffactive.Pianissimo and not spell.target.charmed and not pianissimo_cycle then -- Auto Pianoissimo When You Cast A Song On A Player --
cancel_spell()
pianissimo_cycle = true
send_command('input /ja "Pianissimo" <me>;wait 1.5;input /ma "'..spell.name..'" '..spell.target.name..';')
return
elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
degrade_spell(spell,Cure_Spells)
elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
degrade_spell(spell,Curaga_Spells)
end
if spell.name ~= 'Pianissimo' then
pianissimo_cycle = false
end
end
function precast(spell,action)
if spell.action_type == 'Magic' then
if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu or BardSong If You Are Silenced or Out of Range --
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
return
else
if spell.type == 'BardSong' then
if Daurdabla == 'ON' then
equip(sets.Precast.Daurdabla)
else
if buffactive.Nightingale then
equip_song_gear(spell)
return
else
equip_song_gear(spell)
equip(sets.Precast.SongCast)
end
end
elseif string.find(spell.english,'Cur') and spell.english ~= "Cursna" then
equip(sets.Precast.Cure)
elseif string.find(spell.english,'Utsusemi') then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
cancel_spell()
add_to_chat(123, spell.english .. ' Canceled: [3+ Images]')
return
else
equip(sets.Precast.FastCast)
end
else
equip(sets.Precast.FastCast)
end
end
elseif spell.type == "WeaponSkill" then
if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
cancel_spell()
add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
return
else
equipSet = sets.WS
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if spell.english == "Evisceration" and player.tp > 299 then
equipSet = set_combine(equipSet,{ear1="Jupiter's Pearl"})
end
equip(equipSet)
end
elseif spell.type == "JobAbility" then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
elseif spell.type == "Waltz" then
refine_waltz(spell,action)
equip(sets.Waltz)
elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
cast_delay(0.2)
send_command('cancel Sneak')
end
if sets.Precast[spell.element] and not buffactive.Nightingale and ElementalStaff == 'ON' then
equip(sets.Precast[spell.element])
end
if Main == 'ON' then
equip(sets.MainWeapon)
end
end
function midcast(spell,action)
equipSet = {}
if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' then
equipSet = sets.Midcast
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
elseif string.find(spell.english,'Cure') then
equipSet = equipSet.Cure
elseif string.find(spell.english,'Cura') then
equipSet = equipSet.Curaga
elseif spell.english == "Stoneskin" then
if buffactive.Stoneskin then
send_command('@wait 2.8;cancel stoneskin')
end
equipSet = equipSet.Stoneskin
elseif spell.english == "Sneak" then
if spell.target.name == player.name and buffactive['Sneak'] then
send_command('cancel sneak')
end
equipSet = equipSet.Haste
elseif string.find(spell.english,'Utsusemi') then
if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
send_command('@wait 1.7;cancel Copy Image*')
end
equipSet = equipSet.Haste
elseif spell.english == 'Monomi: Ichi' then
if buffactive['Sneak'] then
send_command('@wait 1.7;cancel sneak')
end
equipSet = equipSet.Haste
end
elseif spell.type == 'BardSong' then
if Daurdabla == 'ON' then
equip(sets.Precast.Daurdabla)
else
equip_song_gear(spell)
end
end
equip(equipSet)
if Main == 'ON' then
equip(sets.MainWeapon)
end
end
function aftercast(spell,action)
if spell.type and spell.type == 'BardSong' and spell.target and spell.target.name == player.name and not spell.interrupted then
local t = os.time()
local tempreg = {}
for i,v in pairs(timer_reg) do
if v < t then tempreg[i] = true end
end
for i,v in pairs(tempreg) do
timer_reg[i] = nil
end
local dur = calculate_duration(spell.name)
if timer_reg[spell.name] then
if (timer_reg[spell.name] - t) <= 120 then
send_command('timers delete "'..spell.name..'"')
timer_reg[spell.name] = t + dur
send_command('timers create "'..spell.name..'" '..dur..' down')
end
else
local maxsongs = 2
if player.equipment.range == 'Daurdabla' then
maxsongs = maxsongs+2
end
if buffactive['Clarion Call'] then
maxsongs = maxsongs+1
end
if maxsongs < table.length(timer_reg) then
maxsongs = table.length(timer_reg)
end
if table.length(timer_reg) < maxsongs then
timer_reg[spell.name] = t+dur
send_command('timers create "'..spell.name..'" '..dur..' down')
else
local rep,repsong
for i,v in pairs(timer_reg) do
if t+dur > v then
if not rep or rep > v then
rep = v
repsong = i
end
end
end
if repsong then
timer_reg[repsong] = nil
send_command('timers delete "'..repsong..'"')
timer_reg[spell.name] = t+dur
send_command('timers create "'..spell.name..'" '..dur..' down')
end
end
end
end
status_change(player.status)
end
function status_change(new,old)
if new == 'Engaged' then
equipSet = sets.Melee
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
equip(equipSet)
elseif new == 'Idle' then
equip(sets.Idle[IdleArray[IdleIndex]])
elseif new == 'Resting' then
equip(sets.Resting)
end
if Main == 'ON' then
equip(sets.MainWeapon)
end
end
function buff_change(buff,gain)
buff = string.lower(buff)
if buff == "aftermath: lv.3" then -- AM3 Timer --
if gain then
send_command('timers create "Aftermath: Lv.3" 180 down;wait 120;input /echo Aftermath: Lv.3 [WEARING OFF IN 60 SEC.];wait 30;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 20;input /echo Aftermath: Lv.3 [WEARING OFF IN 10 SEC.]')
else
send_command('timers delete "Aftermath: Lv.3"')
add_to_chat(123,'AM3: [OFF]')
end
elseif buff == 'weakness' then -- Weakness Timer --
if gain then
send_command('timers create "Weakness" 300 up')
else
send_command('timers delete "Weakness"')
end
end
if not midaction() then
status_change(player.status)
end
end
-- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
function self_command(command)
if command == 'C1' then
send_command('input /ma "Victory March" <me>')
add_to_chat(158,'Melee Speed II: [Victory March]')
elseif command == 'C2' then
send_command('input /ma "Advancing March" <me>')
add_to_chat(158,'Melee Speed: [Advancing March]')
elseif command == 'C3' then
send_command('input /ma "Valor Minuet V" <me>')
add_to_chat(158,'Melee Attack: [Valor Minuet V]')
elseif command == 'C5' then
send_command('input /ma "Valor Minuet IV" <me>')
add_to_chat(158,'Melee Attack: [Valor Minuet IV]')
elseif command == 'C7' then
send_command('input /ma "Hunter\'s Prelude" <me>')
add_to_chat(158,'Ranged Accuracy: [Hunter\'s Prelude]')
elseif command == 'C15' then
send_command('input /ma "Archer\'s Prelude" <me>')
add_to_chat(158,'Ranged Accuracy: [Archer\'s Prelude]')
elseif command == 'C9' then
send_command('input /ma "Blade Madrigal" <me>')
add_to_chat(158,'Melee Accuracy II: [Blade Madrigal]')
elseif command == 'C10' then
send_command('input /ma "Sword Madrigal" <me>')
add_to_chat(158,'Melee Accuracy: [Sword Madrigal]')
elseif command == 'C12' then
send_command('input /ma "Valor Minuet III" <me>')
add_to_chat(158,'Melee Attack: [Valor Minuet III]')
elseif command == 'C8' then -- Distance Toggle --
if player.target.distance then
target_distance = math.floor(player.target.distance*10)/10
add_to_chat(158,'Distance: '..target_distance)
else
add_to_chat(123,'No Target Selected')
end
elseif command == 'C16' then -- Main Weapon Toggle --
if Main == 'ON' then
Main = 'OFF'
add_to_chat(123,'Main Weapon: [Unlocked]')
else
Main = 'ON'
add_to_chat(158,'Main Weapon: [Locked]')
end
status_change(player.status)
elseif command == 'C18' then -- Daurdabla Toggle --
if Daurdabla == 'ON' then
Daurdabla = 'OFF'
add_to_chat(123,'Daurdabla: [OFF]')
else
Daurdabla = 'ON'
add_to_chat(158,'Daurdabla: [ON]')
end
status_change(player.status)
elseif command == 'C17' then -- Accuracy Level Toggle --
AccIndex = (AccIndex % #AccArray) + 1
status_change(player.status)
add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
elseif command == 'C6' then -- Idle Toggle --
IdleIndex = (IdleIndex % #IdleArray) + 1
add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
status_change(player.status)
elseif command:match('^SC%d$') then
send_command('//' .. sc_map[command])
end
end
function equip_song_gear(spell)
if DaurdSongs:contains(spell.english) then
equip(sets.Precast.Daurdabla)
add_to_chat(158,'Daurdabla: [ON]')
else
if spell.target.type == 'MONSTER' then
equip(sets.Midcast.Wind)
if string.find(spell.english,'Finale') then equip(sets.Midcast.Finale) end
if string.find(spell.english,'Lullaby') then equip(sets.Midcast.Lullaby) end
else
equip(sets.Midcast.WindBuff)
if string.find(spell.english,'March') then equip(sets.Midcast.March) end
if string.find(spell.english,'Minuet') then equip(sets.Midcast.Minuet) end
if string.find(spell.english,'Madrigal') then equip(sets.Midcast.Madrigal) end
if string.find(spell.english,'Ballad') then equip(sets.Midcast.Ballad) end
if string.find(spell.english,'Scherzo') then equip(sets.Midcast.Scherzo) end
if string.find(spell.english,'Mazurka') then equip(sets.Midcast.Mazurka) end
if string.find(spell.english,'Paeon') then equip(sets.Midcast.Paeon) end
end
end
end
function calculate_duration(name)
local mult = 1
if player.equipment.neck == "Aoidos' Matinee" then mult = mult + 0.1 end
if player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
if string.find(name,'March') and player.equipment.hands == 'Ad. Mnchtte. +2' then mult = mult + 0.1 end
if string.find(name,'Minuet') and player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
if string.find(name,'Madrigal') and player.equipment.head == "Aoidos' Calot +2" then mult = mult + 0.1 end
if string.find(name,'Ballad') and player.equipment.legs == "Aoidos' Rhing. +2" then mult = mult + 0.1 end
if string.find(name,'Scherzo') and player.equipment.feet == "Aoidos' Cothrn. +2" then mult = mult + 0.1 end
if buffactive.Troubadour then
mult = mult*2
end
if string.find(name,'Scherzo') then
if buffactive['Soul Voice'] then
mult = mult*2
elseif buffactive['marcato'] then
mult = mult*1.5
end
end
mult = mult - 0.05
local totalDuration = mult*120
return totalDuration
end
function actualCost(originalCost)
if buffactive["Penury"] then
return originalCost*.5
elseif buffactive["Light Arts"] or buffactive["Addendum: White"] then
return originalCost*.9
elseif buffactive["Dark Arts"] or buffactive["Addendum: Black"] then
return originalCost*1.1
else
return originalCost
end
end
function degrade_spell(spell,degrade_array)
spell_index = table.find(degrade_array,spell.name)
if spell_index > 1 then
new_spell = degrade_array[spell_index - 1]
change_spell(new_spell,spell.target.raw)
add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
end
end
function change_spell(spell_name,target)
cancel_spell()
send_command('//'..spell_name..' '..target)
end
function refine_waltz(spell,action)
if spell.type ~= 'Waltz' then
return
end
if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" then
return
end
local newWaltz = spell.english
local waltzID
local missingHP
if spell.target.type == "SELF" then
missingHP = player.max_hp - player.hp
elseif spell.target.isallymember then
local target = find_player_in_alliance(spell.target.name)
local est_max_hp = target.hp / (target.hpp/100)
missingHP = math.floor(est_max_hp - target.hp)
end
if missingHP ~= nil then
if player.sub_job == 'DNC' then
if missingHP < 40 and spell.target.name == player.name then
add_to_chat(123,'Full HP!')
cancel_spell()
return
elseif missingHP < 150 then
newWaltz = 'Curing Waltz'
waltzID = 190
elseif missingHP < 300 then
newWaltz = 'Curing Waltz II'
waltzID = 191
else
newWaltz = 'Curing Waltz III'
waltzID = 192
end
else
return
end
end
local waltzTPCost = {['Curing Waltz'] = 20, ['Curing Waltz II'] = 35, ['Curing Waltz III'] = 50}
local tpCost = waltzTPCost[newWaltz]
local downgrade
if player.tp < tpCost then
if player.tp < 20 then
add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
cancel_spell()
return
elseif player.tp < 35 then
newWaltz = 'Curing Waltz'
elseif player.tp < 50 then
newWaltz = 'Curing Waltz II'
end
downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
end
if newWaltz ~= spell.english then
send_command('@input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
if downgrade then
add_to_chat(8, downgrade)
end
cancel_spell()
return
end
if missingHP > 0 then
add_to_chat(8,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
end
end
function find_player_in_alliance(name)
for i,v in ipairs(alliance) do
for k,p in ipairs(v) do
if p.name == name then
return p
end
end
end
end
function sub_job_change(newSubjob, oldSubjob)
select_default_macro_book()
end
function set_macro_page(set,book)
if not tonumber(set) then
add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
return
end
if set < 1 or set > 10 then
add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
return
end
if book then
if not tonumber(book) then
add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
return
end
if book < 1 or book > 20 then
add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
return
end
send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
else
send_command('@input /macro set '..tostring(set))
end
end
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'WHM' then
set_macro_page(1, 3)
elseif player.sub_job == 'BLM' then
set_macro_page(2, 3)
elseif player.sub_job == 'DNC' then
set_macro_page(3, 3)
elseif player.sub_job == 'NIN' then
set_macro_page(5, 3)
elseif player.sub_job == 'WAR' then
set_macro_page(10, 3)
else
set_macro_page(1, 3)
end
end
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-20 16:04:01
@Selindrile: You're using 'BlueMagic' instead of 'Blue Magic' for your sets based on spell.skill. Need to fix that throughout the file.
I didn't bother looking for errors beyond that, since that's going to cause plenty of things to break as it is.
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-20 16:27:24
@Tigerwoods: Yes, easily enough, though it takes a bit of understanding of some of gearswap's internals.
Here's a function that you can use to determine if any of a list of slots are encumbered:
Code
-- Call these function with a list of equipment slots to check ('head', 'neck', 'body', etc)
-- Returns true if any of the specified slots are currently encumbered.
-- Returns false if all specified slots are unencumbered.
function is_encumbered(...)
local check_list = {...}
-- Compensate for people passing a table instead of a series of strings.
if type(check_list[1]) == 'table' then
check_list = check_list[1]
end
local check_set = S(check_list)
for slot_id,slot_name in pairs(gearswap.default_slot_map) do
if check_set:contains(slot_name) then
if gearswap.encumbrance_table[slot_id] then
return true
end
end
end
return false
end
And could be used like:
Code
if is_encumbered('head', 'body', 'hands', 'legs', 'feet') then
add_to_chat(123,'main armor at least partly encumbered')
else
add_to_chat(123,'all main armor unencumbered')
end
Note: I'll add this function to Mote-Utility for general use.
[+]
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-20 16:44:10
@Lisamarie:
Whm: Line 179, mismatched quotes on hands.
You have: hands="Serpentes Cuffs'
Should be: hands="Serpentes Cuffs"
Brd:
Line 112, missing the closing brace for sets.Midcast.
Line 221, missing the closing brace for the table inside set_combine().
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-20 17:55:04
I see what you're saying now. No, it's not executing the job_file_unload function because that was actually what triggered me looking into it. All my other (main) jobs rebind over the keys, so I never noticed them *not* unbinding on job change. I was experimenting with a way to automatically call all my gear using Itemizer, and when it didn't send it all away, that sparked the investigation. I didn't even think about that, my apologies.
Ok, tracked down the problem. Was a bug in the include libraries. Fix has been pushed to dev, and should reach live soonish.
By gdiShun 2014-07-20 19:11:18
Is there a way to get buffs by ID and not name? Like for Haste and March.
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-20 19:54:44
Do you mean find the ID for the buff, or check whether a buff is present by ID? If the latter, yes, just do buffactive[37] or whatever. If the former, check the windower/res directory.
[+]
By gdiShun 2014-07-20 20:01:04
Do you mean find the ID for the buff, or check whether a buff is present by ID? If the latter, yes, just do buffactive[37] or whatever. If the former, check the windower/res directory.
It was the latter, thanks!
Serveur: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2014-07-20 23:45:44
I see what you're saying now. No, it's not executing the job_file_unload function because that was actually what triggered me looking into it. All my other (main) jobs rebind over the keys, so I never noticed them *not* unbinding on job change. I was experimenting with a way to automatically call all my gear using Itemizer, and when it didn't send it all away, that sparked the investigation. I didn't even think about that, my apologies.
Ok, tracked down the problem. Was a bug in the include libraries. Fix has been pushed to dev, and should reach live soonish. Awesome! I look forward to seeing it fixed. I guess it's good I stumbled on it lol. Thanks for your help; I'm sure I'll need it again soon.
Serveur: Sylph
Game: FFXI
Posts: 305
By Sylph.Elgorian 2014-07-21 03:06:18
http://pastebin.com/Xeg7rCeC
Getting errors with this:
Code
function aftercast(spell)
if player.status =='Engaged' then
if TP_Index = 1 then
if player.mp >= 100 then
equip(sets.TP[sets.TP.index[TP_Index]])
elseif player.mp < 100 then
equip(sets.TP[sets.TP.index[TP_Index]], {ring2="Rajas Ring"})
end
else
equip(sets.TP[sets.TP.index[TP_Index]])
end
else
equip(sets.aftercast.Idle)
end
end
Attempting to swap to Rajas Ring if MP drops under 100 for the Oneiros Ring latent in just the DD set. I want the DT set to keep dark ring. I want the acc set to keep oneiros ring regardless of mp for the accuracy.
Serveur: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2014-07-21 09:17:12
http://pastebin.com/Xeg7rCeC
Getting errors with this:
Code
function aftercast(spell)
if player.status =='Engaged' then
if TP_Index = 1 then
if player.mp >= 100 then
equip(sets.TP[sets.TP.index[TP_Index]])
elseif player.mp < 100 then
equip(sets.TP[sets.TP.index[TP_Index]], {ring2="Rajas Ring"})
end
else
equip(sets.TP[sets.TP.index[TP_Index]])
end
else
equip(sets.aftercast.Idle)
end
end
Attempting to swap to Rajas Ring if MP drops under 100 for the Oneiros Ring latent in just the DD set. I want the DT set to keep dark ring. I want the acc set to keep oneiros ring regardless of mp for the accuracy. I'm not familiar with the index functionality, but shouldn't you do :
equip(set_combine(sets.TP[sets.TP.index[TP_Index]], {ring2="Rajas Ring"}))
It looks like you're not telling it to combine the set, but I could be off.
By Selindrile 2014-07-21 10:54:48
@Motenten, I see, seems like more changed than I realized, going to just have to remake again I think at this point, but thank you very much for taking a look at it.
Serveur: Sylph
Game: FFXI
Posts: 305
By Sylph.Elgorian 2014-07-21 11:59:46
http://pastebin.com/Xeg7rCeC
Getting errors with this:
Code
function aftercast(spell)
if player.status =='Engaged' then
if TP_Index = 1 then
if player.mp >= 100 then
equip(sets.TP[sets.TP.index[TP_Index]])
elseif player.mp < 100 then
equip(sets.TP[sets.TP.index[TP_Index]], {ring2="Rajas Ring"})
end
else
equip(sets.TP[sets.TP.index[TP_Index]])
end
else
equip(sets.aftercast.Idle)
end
end
Attempting to swap to Rajas Ring if MP drops under 100 for the Oneiros Ring latent in just the DD set. I want the DT set to keep dark ring. I want the acc set to keep oneiros ring regardless of mp for the accuracy. I'm not familiar with the index functionality, but shouldn't you do :
equip(set_combine(sets.TP[sets.TP.index[TP_Index]], {ring2="Rajas Ring"}))
It looks like you're not telling it to combine the set, but I could be off.
Well that was one mistake I didn't catch but the issue is here I guess:
is on line 110 the "if TP_Index = 1 then" part.
'then' expected near '='
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-21 12:24:06
if TP_Index = 1 then
should be
if TP_Index == 1 then
Edit: Also, you aren't required to do a set_combine with multiple sets; equip() can handle multiple sets the same way set_combine does, automatically.
By Avebian 2014-07-21 12:25:18
Is there a way to save the .lua so it auto loads based on main job and subjob? Like now I have Avebian_BST.lua, so it loads that whenever I change to BST. I'd like someway for it to auto load a different .lua if I change to a sub Mage job.
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-21 12:32:22
It won't auto-load based on subjob. Instead it calls the sub_job_change function. However you can use that to separate out your own code. One simple example:
Code
function get_sets()
load_on_subjob()
end
function sub_job_change(new_sj, old_sj)
load_on_subjob()
end
function load_on_subjob()
if player.sub_job == 'WHM' or player.sub_job == 'RDM' then
include('bst_mage.lua')
else
include('bst_melee.lua')
end
init_gear_sets()
end
And then in bst_mage.lua and bst_melee.lua you define all your functions normally, including an init_gear_sets function that defines all your gear sets.
If the actual rules are the same between the two, and you're only changing the sets, then you can keep all the rules in bst.lua and only need to worry about setting up the gear sets in the init_gear_sets function.
Serveur: Sylph
Game: FFXI
Posts: 305
By Sylph.Elgorian 2014-07-21 12:54:24
if TP_Index = 1 then
should be
if TP_Index == 1 then
Edit: Also, you aren't required to do a set_combine with multiple sets; equip() can handle multiple sets the same way set_combine does, automatically.
Worked. Thanks. :) still a little foggy on when to use '=' and '==' but I'm getting there. Writing at 3am didn't help either.
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.
|
|