|
Gearswap Support Thread
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2014-05-30 13:37:31
So I'm trawling through my THF gearswap today, hopefully will get it done, as I said before it's based on Byrth's example lua file I was wondering what the purpose of this function is?
Code function buff_change(buff,gain_or_loss)
if buff=="Sneak Attack" then
soloSA = gain_or_loss
elseif buff=="Trick Attack" then
soloTA = gain_or_loss
end
end
I'm curious whether to keep it or remove it as I'm unaware of it's purpose.
VIP
Server: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-05-30 14:01:17
The purpose of the buff_change function is to notify you when your buffs change. You can take any action you feel is appropriate when said buffs change.
As you can see, it is setting variables if you gain or lose the "Sneak Attack" and "Trick Attack" buffs.
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2014-05-30 14:24:42
Ah ok that makes sense, also I'm trying to make a set for using my Raider's Boomerang but so far haven't had any luck, could someone tell me what I'm doing wrong? Code sets.Midshot["Raider's Bmrng."] = {head="Pillager's Bonnet",hands="Buremte Gloves",legs="Thur. Tights +1",feet="Pillager's Poulaines",
neck="Ej Necklace",waist="Elanid Belt",ear1="Clearview Earring",ear2="Volley Earring",ring1="Hadjuk Ring",ring2="Hajduk Ring",
back="Jaeger Mantle"}
Figured it out, wrong type of brackets again :/ I'll get used to this eventually!
Carbuncle.Asterius
Server: Carbuncle
Game: FFXI
Posts: 1
By Carbuncle.Asterius 2014-05-30 18:53:28
Code <?xml version="1.0"?>
<spellcast>
<config
debug="false"
requireversion="2.40"
showgearswaps="false"
showspellinfo="false"
hideerrors="true"
/>
<!--Variables-->
<variables>
<var name="Melee">1</var>
<var name="SongTarget">Me</var>
<!-- Set this to 1 if using Balrahn's Ring for Assault/Salvage, otherwise set to 0 -->
<var Name="BalrahnsRing">1</var>
</variables>
<!--Gear Sets-->
<sets>
<group name="common" default="yes">
<set name="Idle">
<main>Terra's Staff</main>
<range>Oneiros Harp</range>
<head>Nahtirah Hat</head>
<neck>Twilight Torque</neck>
<lear>Merman's Earring</lear>
<rear>Merman's Earring</rear>
<body>Gendewitha Bliaut</body>
<hands>Serpentes Cuffs</hands>
<lring>Shadow Ring</lring>
<rring>Defending Ring</rring>
<back>Umbra Cape</back>
<waist>Slipor Sash</waist>
<legs>Nares Trews</legs>
<feet>Serpentes Sabots</feet>
<sub>Vivid Strap +1</sub>
</set>
<set name="Buff" baseset="Idle">
<main>Legato Dagger</main>
<range>Gjallarhorn</range>
<head>Aoidos' Calot +2</head>
<neck>Aoidos' Matinee</neck>
<lear></lear>
<rear></rear>
<body>Aoidos' Hngrln. +2</body>
<hands>Ad. Mnchtte. +2</hands>
<lring></lring>
<rring></rring>
<back>Harmony Cape</back>
<waist>Corvax Sash</waist>
<legs>Aoidos' Rhing. +2</legs>
<feet>Aoidos' Cothrn. +2</feet>
<sub>Genbu's Shield</sub>
</set>
<set name="Debuff">
<main>Lehbrailg +2</main>
<head>Bihu Roundlet</head>
<neck>Piper's Torque</neck>
<lear>Gwati Earring</lear>
<rear>Enchntr. Earring</rear>
<body>Brioso Just.</body>
<hands>Bihu Cuffs</hands>
<lring>Sangoma Ring</lring>
<rring>Balrahn's Ring</rring>
<back>Rhapsode's Cape</back>
<waist>Demonry Sash</waist>
<legs>Bihu Cannions</legs>
<feet>Artsieq Boots</feet>
<sub>Mephitis Grip</sub>
</set>
<set name="FastCast">
<main>Lehbrailg +2</main>
<head>Nahtirah Hat</head>
<neck></neck>
<lear>Loquac. Earring</lear>
<rear></rear>
<body>Anhur Robe</body>
<hands>Gende. Gages +1</hands>
<lring>Prolix Ring</lring>
<rring></rring>
<back>Swith Cape</back>
<waist></waist>
<legs>Orvail Pants +1</legs>
<feet>Rostrum Pumps</feet>
<sub>Vivid Strap +1</sub>
</set>
<set name="FastSong" baseset="FastCast">
<main>Felibre's Dague</main>
<head>Aoidos' Calot +2</head>
<neck>Aoidos' Matinee</neck>
<lear></lear>
<rear>Aoidos' Earring</rear>
<body></body>
<hands></hands>
<lring></lring>
<rring></rring>
<back></back>
<waist>Aoidos' Belt</waist>
<legs>Gendewitha Spats</legs>
<feet>Bihu Slippers</feet>
<sub></sub>
</set>
<set name="EnhancingFC" baseset="FastCast">
<waist>Siegel Sash</waist>
</set>
<set name="CureFC" baseset="FastCast">
<back>Pahtli Cape</back>
</set>
<set name="Cure">
<main>Lehbrailg +2</main>
<head>Gende. Caubeen</head>
<neck></neck>
<lear>Loquac. Earring</lear>
<rear>Lifestorm Earring</rear>
<body>Gendewitha Bliaut</body>
<hands>Gende. Gages +1</hands>
<lring>Prolix Ring</lring>
<rring>Sangoma Ring</rring>
<back>Pahtli Cape</back>
<waist>Demonry Sash</waist>
<legs>Nares Trews</legs>
<feet>Artsieq Boots</feet>
<sub>Genbu's Shield</sub>
</set>
<set name="Stoneskin" baseset="Recast">
<waist>Siegel Sash</waist>
<rear>Earthcry Earring</rear>
</set>
<set name="Cursna" baseset="Recast">
<waist></waist>
</set>
<set name="Recast">
<main>Lehbrailg +2</main>
<head>Nahtirah Hat</head>
<neck></neck>
<lear>Loquac. Earring</lear>
<rear></rear>
<body>Anhur Robe</body>
<hands>Gende. Gages +1</hands>
<lring>Prolix Ring</lring>
<rring></rring>
<back>Swith Cape</back>
<waist></waist>
<legs>Gendewitha Spats</legs>
<feet>Bihu Slippers</feet>
<sub></sub>
</set>
</group>
</sets>
<rules>
<!--Rules to stop parsing if you can't perform an action-->
<if buffactive="Petrification|Stun|Terror|Charm">
<return/>
</if>
<elseif skill="*Magic|BardSong|Ninjutsu*" buffactive="Silence">
<return/>
</elseif>
<elseif type="Weaponskill|JobAbility|PetCommand" buffactive="Amnesia">
<cancelspell/>
<return/>
</elseif>
<command when="Engaged|Idle|Aftercast|Resting">Dancing Chains</command>
<!--Status Rules-->
<if spell="Dancing Chains">
<cancelspell />
<if status="Idle">
<equip set="Idle" />
</if>
</if>
<!-- Equips Balrahn's Ring if enabled and in Assault, Nyzul or Salvage area -->
<if advanced="$BalrahnsRing=1" area="Nyzul*|Leujaoam*|Mamool*|Periqia|Lebros*|Ilrusi*|*Remnants">
<equip when="Idle|Aftercast">
<lring lock="True">Balrahn's Ring</lring>
</equip>
</if>
<!--Song Rules-->
<if skill="Singing">
<if spell="Valor Minuet*|*Madrigal|*March|*Prelude|*Carol*|*Etude|*Minne*|*Ballad*|*Scherzo|*Paeon*|*Mazurka|Goddess's Hymnus">
<CastDelay delay="0.3" />
<if buffactive="Nightingale|Troubadour">
<equip when="precast" set="Buff" />
</if>
<else>
<equip when="precast" set="FastSong" />
<midcastdelay delay ="0.5" />
<equip when="midcast" set="Buff" />
</else>
</if>
<if spell="*Mambo">
<CastDelay delay="0.3" />
<if buffactive="Nightingale|Troubadour">
<equip when="precast" set="Idle">
<range>Daurdabla</range>
</equip>
</if>
<else>
<equip when="precast" set="FastSong" />
<midcastdelay delay ="0.5" />
<equip when="midcast" set="Idle">
<range>Daurdabla</range>
</equip>
</else>
</if>
<elseif spell="*Elegy|*Finale|Foe Requiem*|*Threnody|*Lullaby*|*Nocturne">
<CastDelay delay="0.3" />
<if buffactive="Nightingale|Troubadour">
<equip when="precast" set="Debuff" />
</if>
<else>
<equip when="precast" set="FastSong" />
<midcastdelay delay ="0.3" />
<equip when="midcast" set="Debuff" />
</else>
</elseif>
</if>
<!--Healing Magic Rules-->
<if skill="Healing*">
<if Spell="Cure*|Cura*">
<CastDelay delay="0.3" />
<equip when="precast" set="CureFC" />
<midcastdelay delay="0.3" />
<equip when="midcast" set="Cure" />
</if>
<if Spell="Reraise|Raise">
<CastDelay delay="0.3" />
<equip when="precast" set="FastCast" />
<midcastdelay delay="0.3" />
<equip when="midcast" set="Recast" />
</if>
<if Spell="*na|Erase">
<CastDelay delay="0.3" />
<equip when="precast" set="FastCast" />
<midcastdelay delay="0.3" />
<equip when="midcast" set="Recast" />
</if>
<if Spell="Cursna">
<CastDelay delay="0.3" />
<equip when="precast" set="FastCast" />
<midcastdelay delay="0.3" />
<equip when="midcast" set="Cursna" />
</if>
</if>
<!--Summoning Magic Rules-->
<if skill="SummoningMagic">
<CastDelay delay="0.3" />
<equip when="precast" set="FastCast" />
<midcastdelay delay="0.3" />
<equip when="midcast" set="Recast" />
</if>
<!--Ninjutsu Rules-->
<if skill="Ninjutsu*">
<if spell="Utsusemi*">
<CastDelay delay="0.3" />
<equip when="precast" set="FastCast" />
<midcastdelay delay="0.3" />
<equip when="midcast" set="Recast" />
</if>
<if spell="Utsusemi: Ichi" buffactive="Copy Image*">
<midcastdelay delay="1.9" />
<cmd when="midcast">cancel 66;|cancel 444;|cancel 445;|cancel 446;</cmd>
</if>
<if spell="Monomi: Ichi" buffactive="Sneak">
<CastDelay delay="0.3" />
<equip when="precast" set="FastCast" />
<midcastdelay delay="1.0" />
<cmd when="midcast">cancel 71</cmd>
</if>
</if>
<!--Enhancing Magic Rules-->
<if skill="Enhancing*">
<if Spell="Haste|Refresh|Regen*|Bar*|Protect*|Shell*|Blink|Aquaveil|Phalanx|Erase">
<CastDelay delay="0.3" />
<equip when="precast" set="EnhancingFC" />
<midcastdelay delay="0.3" />
<equip when="midcast" set="Recast" />
</if>
<if Spell="Stoneskin">
<CastDelay delay="0.3" />
<equip when="precast" set="EnhancingFC" />
<midcastdelay delay="2.0" />
<equip when="midcast" set="Stoneskin" />
<cmd when="midcast">cancel 37</cmd>
</if>
</if>
<!--JA Rules-->
<if Buffactive="Pianissimo">
<midcastdelay delay="0.3" />
<changetarget target="<t>"/>
</if>
<if mode="OR" spell="Pianissimo" buffactive="Pianissimo">
<var cmd="set SongTarget stpt" />
</if>
<elseif advanced='"$SongTarget"="stpt"'>
<var cmd="set SongTarget me" />
</elseif>
<if spell="Soul Voice">
<equip when="precast">
<legs>Brd. Cannions +2</legs>
</equip>
</if>
<if spell="Nightingale">
<equip when="precast">
<feet>Bihu Slippers</feet>
</equip>
</if>
<if spell="Troubadour">
<equip when="precast">
<body>Bihu Justaucorps</body>
</equip>
</if>
<if spell="Spectral Jig">
<cmd when="precast">cancel 71</cmd>
</if>
</rules>
</spellcast>
Hi everyone,
I've been having trouble with my spellcast while switching into idle set. It seems to only swap my right earring to my idle earring while the left earring stays as loq. earring.
Any help would be greatly appreciated!!
Server: Asura
Game: FFXI
Posts: 41
By Asura.Shystie 2014-05-30 19:19:17
I do not know if this has been brought up but I have been experiencing this and am at a loss.
My THF gearswap is equipping gear that is not in any of my sets. The Thaumas Coat was once my TP body but not longer is. and when I am fighting, it still equips it. I have to hit the F12 button (using Motenten GS) everytime to get it to swap to the correct TP body (Skadi's +1 and Plunderer's +1 pending situation).
Yes, I have made the changes and saved and reloaded as I havent used this body in like a month. I had some gearswaps for my friends as sometimes I would play their characters but I have since moved their files into their own folders...not to mention they are all titled <name>_JOB.lua
When I moved my Thaumas Coat out of inventory/wardrobe it equips the correct body piece.
Any ideas? Thanks in advance!
Server: Phoenix
Game: FFXI
Posts: 118
By Phoenix.Tigertail 2014-05-30 19:20:56
Hey guys, I got an error in the console when I first logged on. It said:
GearSwap: Lua error (runtime) - C:/Windower4//addons/GearSwap/helper_functions.lua:236: attempt to index field '?' (a nil value)
I don't remember seing this before, and after that it said Loaded your THF lua file!
Idk what to make of it, is it just a weird error that means nothing? TIA.
:)
Quetzalcoatl.Hellblade
Server: Quetzalcoatl
Game: FFXI
Posts: 50
By Quetzalcoatl.Hellblade 2014-05-30 19:22:19
I get the same thing as of today.
Sylph.Leafe
Server: Sylph
Game: FFXI
Posts: 27
By Sylph.Leafe 2014-05-30 21:48:37
Hello! I'm new to Gearswap and still trying to teach myself to use lua, but I've run into a couple error messages today and I'm not sure what to make of them. When they show up the same error message will be displayed roughly 2-4 times in quick succession.
The first error reads:
GearSwap: Lua error (runtime) - ...Windower4//addons/gearswap/gearswap.lua:273: attempt to index field '?' (a nil value)
This error message seems to appear mostly when items are moving into or out of my inventory. I've seen this error appear when defeating mobs or reives, when using a consumable item, when an item dropped from the pool into my inventory, and when trading items to an npc.
The second error reads:
GearSwap: Lua error (runtime) - ...Windower4//addons/gearswap/gearswap.lua:407: attempt to index field '?' (a nil value)
I've only seen this second error appear when I use my Chakra job ability. If it matters, the relevant gear being swapped in is in my Mog Wardrobe, although I don't have this issue with other job abilities that pull from the same location.
If anyone could advise me on any way to fix these errors I would greatly appreciate it. Before today I was unaware of the gearswap.lua file and had never opened it, so I don't *think* it was anything that I changed. However like I said I'm still new to gearswap so I wouldn't be surprised if I somehow messed things up lol. Also, if it would help if I posted anything from my gearswap.lua or MNK.lua files please let me know.
Edit: I just came across a third error when listing an item on the Auction House. This one referenced gearswap.lua:285: and was directly followed by another error for gearswap.lua:273:
Server: Ragnarok
Game: FFXI
Posts: 1
By Ragnarok.Britannica 2014-05-30 22:46:44
I'm getting the same error on pretty much every action. (Gearswap lua.407 attempt to index field ? A nil value.) also lua.273. Macros are also not working properly.
Quetzalcoatl.Elysien
Server: Quetzalcoatl
Game: FFXI
Posts: 452
By Quetzalcoatl.Elysien 2014-05-30 23:31:48
same errors etc.. also, for some reason my range slot on bard will not try to equip anything every other cast. which becomes annoying if im wanting to do gjallarhorn songs or play dummy songs w/ daurdabla. it happens during precast, midcast, and aftercast. sometimes it will precast properly but then not afercast into my regen harp, for example.
VIP
Server: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-05-31 01:47:12
All known errors, and will be worked on when Byrth gets back. Some of them have already been fixed on Dev.
Asterius said: I've been having trouble with my spellcast while switching into idle set. It seems to only swap my right earring to my idle earring while the left earring stays as loq. earring.
This is the GearSwap help thread, not the Spellcast help thread.
[+]
Server: Siren
Game: FFXI
Posts: 28
By Siren.Namelessone 2014-05-31 20:47:52
im looking to set up gearswap for a brd. I have it running on other jobs just fine, but when I use Byrths brd file I get error saying I need no_interruptions.lau include. I have searched and searched and can not find this file. any help?
Fenrir.Greever
Server: Fenrir
Game: FFXI
Posts: 67
By Fenrir.Greever 2014-05-31 21:44:26
for some reason my rng GS has stoped swaping for ws and /ra. it will swap for ja's though.
this is the file:
Code function get_sets()
-- Load and initialize the include file.
include('Mote-Include.lua')
init_include()
-- UserGlobals may define additional sets to be added to the local ones.
if define_global_sets then
define_global_sets()
end
-- Optional: load a sidecar version of the init and unload functions.
load_user_gear(player.main_job)
init_gear_sets()
-- Global default binds
binds_on_load()
send_command('bind f9 gs c cycle RangedMode')
send_command('bind ^f9 gs c cycle OffenseMode')
send_command('bind !f9 gs c cycle WeaponskillMode')
end
-- Called when this job file is unloaded (eg: job change)
function file_unload()
binds_on_unload()
end
function init_gear_sets()
-- using sidecar file rng_gear.lua
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if spell.type:lower() == 'weaponskill' then
if player.status ~= "Engaged" or player.tp < 100 then
eventArgs.cancel = true
return
end
if (spell.target.distance >8 and not bow_gun_weaponskills:contains(spell.english)) or (spell.target.distance >21) then
-- Cancel Action if distance is too great, saving TP
add_to_chat(122,"Distance too great for WeaponSkill /Canceling")
eventArgs.cancel = true
return
elseif state.Defense.Active then
-- Don't gearswap for weaponskills when Defense is on.
eventArgs.handled = true
end
end
if spell.type == 'Waltz' then
refine_waltz(spell, action, spellMap, eventArgs)
end
if spell.name == "Ranged" or spell.type:lower() == 'weaponskill' then
-- If ammo is empty, or special ammo being used without buff, replace with default ammo
if U_Shot_Ammo[player.equipment.ammo] and not buffactive['unlimited shot'] or player.equipment.ammo == 'empty' then
if DefaultAmmo[player.equipment.range] and player.inventory[DefaultAmmo[player.equipment.range]] then
add_to_chat(122,"Unlimited Shot not Active or Ammo Empty, Using Default Ammo")
equip({ammo=DefaultAmmo[player.equipment.range]})
else
add_to_chat(122,"Either Defaul Ammo is Unavailable or Unknown Weapon. Staying empty")
equip({ammo=empty})
end
end
if not buffactive['unlimited shot'] then
-- If not empty, and if unlimited shot is not active
-- Not doing it for unlimited shot to avoid excessive log
if player.equipment.ammo ~= 'empty' then
if player.inventory[player.equipment.ammo].count < 15 then
add_to_chat(122,"Ammo '"..player.inventory[player.equipment.ammo].shortname.."' running low ("..player.inventory[player.equipment.ammo].count..")")
end
end
end
end
end
-- Run after the default precast() is done.
-- eventArgs is the same one used in job_precast, in case information needs to be persisted.
-- This is where you place gear swaps you want in precast but applied on top of the precast sets
function job_post_precast(spell, action, spellMap, eventArgs)
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.name == 'Spectral Jig' and buffactive.sneak then
-- If sneak is active when using, cancel before completion
send_command('cancel 71')
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 buffactive["Barrage"] then
equip(sets.BarrageMid)
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)
end
-- Run after the default aftercast() is done.
-- eventArgs is the same one used in job_aftercast, in case information needs to be persisted.
function job_post_aftercast(spell, action, spellMap, eventArgs)
end
-- Called before the Include starts constructing melee/idle/resting sets.
-- Can customize state or custom melee class values at this point.
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_handle_equipping_gear(status, eventArgs)
end
function customize_idle_set(idleSet)
return idleSet
end
function customize_melee_set(meleeSet)
return meleeSet
end
function job_status_change(newStatus, oldStatus, eventArgs)
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 status == "Camouflage" then
if gain_or_loss == "gain" then
send_command('@wait .5;gs disable body')
else
enable('body')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for custom player commands.
function job_self_command(cmdParams, eventArgs)
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)
end
-- Job-specific toggles.
function job_toggle(field)
end
-- Request job-specific mode lists.
-- Return the list, and the current value for the requested field.
function job_get_mode_list(field)
end
-- Set job-specific mode values.
-- Return true if we recognize and set the requested field.
function job_set_mode(field, val)
end
-- Handle auto-targetting based on local setup.
function job_auto_change_target(spell, action, spellMap, eventArgs)
end
-- Handle notifications of user state values being changed.
function job_state_change(stateField, newValue)
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
end
here is the gear lua:
Code function init_gear_sets()
-- Overriding Global Defaults for this job
-- gear.Staff = {} no need to set this, it's already set
gear.Staff.PDT = ""
gear.default.weaponskill_neck = ""
gear.default.weaponskill_waist = ""
-- List of ammunition that should only be used under unlimited shot
U_Shot_Ammo = S{'Achiyal. Arrow','Achiyal. Bullet'}
-- Simply add a line of DefaultAmmo["Weapon"] = "Ammo Name"
DefaultAmmo = {}
DefaultAmmo["Yoichinoyumi"] = "Achiyal. Arrow"
DefaultAmmo["Annihilator"] = "Achiyal. Bullet"
add_to_chat(123,'sidecar load')
-- Default macro set/book
set_macro_page(3,5)
-- Options: Override default values
options.OffenseModes = {'Normal', 'Acc', 'TP'}
options.RangedModes = {'Normal', 'Acc', 'TP', 'TPAcc'}
options.DefenseModes = {'Normal', 'PDT'}
options.WeaponskillModes = {'Normal', 'Acc'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
state.Defense.PhysicalMode = 'PDT'
-- Misc. Job Ability precasts
sets.precast.Step = {ear2=""}
sets.precast.JA['Bounty Shot'] = {hands="Sylvan Glovelettes +2"}
sets.precast.JA['Scavenge'] = {feet="Orion Socks +1"}
sets.precast.JA['Sharpshot'] = {legs="orion braccae"}
sets.precast.JA['double shot'] = {head="Sylvan Gapette +2"}
-- Idle Set (My 'base')
sets.idle = {
head="Arcadian Beret",neck="Twilight Torque",ear1="Volley Earring",ear2="Clearview Earring",
body="Sylvan Caban +2",hands="Sigyn's Bazubands",ring1="Dark Ring",ring2="Dark Ring",
back="Shadow Mantle",waist="Scout's Belt",legs="Sylvan Bragues +2",feet="Fajin Boots"}
-- Engaged sets
sets.engaged = set_combine(sets.idle, {})
sets.engaged.Acc = set_combine(sets.engaged, {
neck="Iqabi necklace",
back="Attacker's mantle"})
sets.engaged.TP = set_combine(sets.engaged, {
})
-- Ranged Attack
sets.precast.RangedAttack = set_combine(sets.idle, {
head="Sylvan Gapette +2",
body="Sylvan Caban +2",hands="Iuitl Wristbands",
waist="Impulse Belt",pants="Nahtirah Trousers",feet="Wurrukatte Boots"})
sets.midcast.RangedAttack = set_combine(sets.idle, {
head="Arcadian Beret",neck="Ocachi Gorget",
Body="Kyujutsugi", hands="Arc. Bracers +1",ring1="Paqichikaji ring",ring2="Rajas Ring",
back="Sylvan Chlamys",waist="Goading Belt",legs="Aetosaur Trousers",feet="orion socks +1"})
sets.midcast.RangedAttack.Acc = set_combine(sets.midcast.RangedAttack, {
neck="peacock Charm",
ring1="Hajduk Ring",ring2="hajduk ring",legs="Orion Braccae +1", hands="sigyn's bazubands"})
sets.midcast.RangedAttack.TP = set_combine(sets.midcast.RangedAttack, {
head="Scout's Beret +2",back="Sylvan Chlamys"})
sets.midcast.RangedAttack.TPAcc = set_combine(sets.midcast.RangedAttack.acc, {
head="Scout's Beret +2"})
-- Weaponskill sets
sets.precast.WS = set_combine(sets.midcast.RangedAttack, {head="orion beret +1",hands="Arcadian Bracers +1",
ear1="Flame pearl",ear2="moonshade earring",ring1="pyrosoul ring",waist="Pipilaka belt", neck="Ocachi gorget"})
sets.precast.WS['Last Stand'] = set_combine(sets.precast.WS, {
neck="light gorget",waist="flame belt",ear1="moonshade earring",ear2="Volley earring",ring1="solemn Ring", ring2="rajas ring", legs="Nahtirah Trousers"})
sets.precast.WS['Last Stand'].Acc= set_combine(sets.precast.WS, {
neck="light gorget", Waist="flame belt", legs="orion braccae +!",ring1="hajduk ring",ring2="hajduk ring"})
sets.precast.WS['Coronach'] = set_combine(sets.precast.WS, {ear2="Volley earring", waist="Breeze Belt", legs="Nahtirah Trousers"})
sets.precast.WS['Coronach'].Acc = set_combine(sets.precast.WS, {ring1="hajduk ring", ring2="hajduk ring", neck="breeze gorget",waist="breeze belt", legs="orion Braccae +1"})
sets.precast.WS['Wildfire'] = {head="Orion Beret+1", neck="Atzintli necklace", ear1="Hecate's earring", ear2="Moldavite earring", body="Orion jerkin +1", hands="Orion Bracers +1",
ring1="solemn ring", ring2="Paqichikaji ring", back="Sylvaan Chlamys", waist="Scout's Belt", legs="Shneddick tights", feet="Orion Socks +1"}
sets.precast.WS['Jishnus Radiance'] = set_combine(sets.precast.WS, {neck="light gorget", waist="flame belt"})
sets.precast.WS['Jishnus Radiance'] = set_combine(sets.precast.WS, {neck="light gorget", waist="flame belt",ring1="hajduk ring",ring2="hajduk ring",legs="orion Braccae +1"})
sets.precast.WS['Namas Arrow'] = set_combine(sets.precast.WS, {ear2="clearview earring"})
sets.precast.WS['Namas Arrow'].Acc = set_combine(sets.precast.WS, {ear2="clearview earring", neck="light gorget", waist="flame belt", ring1="hajduk ring", ring2=-"hajduk ring", legs="orion braccae +1"})
-- Resting sets
sets.resting = {}
-- Defense sets
sets.defense.PDT = set_combine(sets.idle, {})
sets.defense.MDT = set_combine(sets.idle, {})
sets.Kiting = {feet="Fajin Boots"}
-- Barrage Set
sets.BarrageMid = set_combine(sets.midcast.RangedAttack.Acc, {
hands="Orion Bracers +1",legs="Desultor Tassets"})
end
function file_unload()
-- If you need any custom unload for this job/user
end
edit: ive updated all mote files and would like to mention that i did not write this gear swap.
VIP
Server: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-05-31 21:47:28
Siren.Namelessone said: »im looking to set up gearswap for a brd. I have it running on other jobs just fine, but when I use Byrths brd file I get error saying I need no_interruptions.lau include. I have searched and searched and can not find this file. any help?
Just delete the first line from byrth's file, where it does include('no_interruptions.lua'). That's probably something he built for his own use, but isn't included in the demo install directory. I wouldn't expect it to have any effect on how the rest of the file works.
Lakshmi.Byrth
VIP
Server: Lakshmi
Game: FFXI
Posts: 6195
By Lakshmi.Byrth 2014-05-31 21:48:47
Yeah, that's just my include that prevents movement interruptions on bard. It's something that I stuck in there because I was annoyed that my 0.5 second casting time had to always follow a second of standing still. I didn't include it in the official repository because it's a bit sketchy and doesn't always work right. I'll fix it now.
Server: Siren
Game: FFXI
Posts: 28
By Siren.Namelessone 2014-05-31 21:57:02
ty
Server: Bahamut
Game: FFXI
Posts: 462
By Bahamut.Greyfawkz 2014-05-31 23:00:30
for some reason my rng GS has stoped swaping for ws and /ra. it will swap for ja's though.
this is the file:
Code function get_sets()
-- Load and initialize the include file.
include('Mote-Include.lua')
init_include()
-- UserGlobals may define additional sets to be added to the local ones.
if define_global_sets then
define_global_sets()
end
-- Optional: load a sidecar version of the init and unload functions.
load_user_gear(player.main_job)
init_gear_sets()
-- Global default binds
binds_on_load()
send_command('bind f9 gs c cycle RangedMode')
send_command('bind ^f9 gs c cycle OffenseMode')
send_command('bind !f9 gs c cycle WeaponskillMode')
end
-- Called when this job file is unloaded (eg: job change)
function file_unload()
binds_on_unload()
end
function init_gear_sets()
-- using sidecar file rng_gear.lua
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if spell.type:lower() == 'weaponskill' then
if player.status ~= "Engaged" or player.tp < 100 then
eventArgs.cancel = true
return
end
if (spell.target.distance >8 and not bow_gun_weaponskills:contains(spell.english)) or (spell.target.distance >21) then
-- Cancel Action if distance is too great, saving TP
add_to_chat(122,"Distance too great for WeaponSkill /Canceling")
eventArgs.cancel = true
return
elseif state.Defense.Active then
-- Don't gearswap for weaponskills when Defense is on.
eventArgs.handled = true
end
end
if spell.type == 'Waltz' then
refine_waltz(spell, action, spellMap, eventArgs)
end
if spell.name == "Ranged" or spell.type:lower() == 'weaponskill' then
-- If ammo is empty, or special ammo being used without buff, replace with default ammo
if U_Shot_Ammo[player.equipment.ammo] and not buffactive['unlimited shot'] or player.equipment.ammo == 'empty' then
if DefaultAmmo[player.equipment.range] and player.inventory[DefaultAmmo[player.equipment.range]] then
add_to_chat(122,"Unlimited Shot not Active or Ammo Empty, Using Default Ammo")
equip({ammo=DefaultAmmo[player.equipment.range]})
else
add_to_chat(122,"Either Defaul Ammo is Unavailable or Unknown Weapon. Staying empty")
equip({ammo=empty})
end
end
if not buffactive['unlimited shot'] then
-- If not empty, and if unlimited shot is not active
-- Not doing it for unlimited shot to avoid excessive log
if player.equipment.ammo ~= 'empty' then
if player.inventory[player.equipment.ammo].count < 15 then
add_to_chat(122,"Ammo '"..player.inventory[player.equipment.ammo].shortname.."' running low ("..player.inventory[player.equipment.ammo].count..")")
end
end
end
end
end
-- Run after the default precast() is done.
-- eventArgs is the same one used in job_precast, in case information needs to be persisted.
-- This is where you place gear swaps you want in precast but applied on top of the precast sets
function job_post_precast(spell, action, spellMap, eventArgs)
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.name == 'Spectral Jig' and buffactive.sneak then
-- If sneak is active when using, cancel before completion
send_command('cancel 71')
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 buffactive["Barrage"] then
equip(sets.BarrageMid)
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)
end
-- Run after the default aftercast() is done.
-- eventArgs is the same one used in job_aftercast, in case information needs to be persisted.
function job_post_aftercast(spell, action, spellMap, eventArgs)
end
-- Called before the Include starts constructing melee/idle/resting sets.
-- Can customize state or custom melee class values at this point.
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_handle_equipping_gear(status, eventArgs)
end
function customize_idle_set(idleSet)
return idleSet
end
function customize_melee_set(meleeSet)
return meleeSet
end
function job_status_change(newStatus, oldStatus, eventArgs)
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 status == "Camouflage" then
if gain_or_loss == "gain" then
send_command('@wait .5;gs disable body')
else
enable('body')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for custom player commands.
function job_self_command(cmdParams, eventArgs)
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)
end
-- Job-specific toggles.
function job_toggle(field)
end
-- Request job-specific mode lists.
-- Return the list, and the current value for the requested field.
function job_get_mode_list(field)
end
-- Set job-specific mode values.
-- Return true if we recognize and set the requested field.
function job_set_mode(field, val)
end
-- Handle auto-targetting based on local setup.
function job_auto_change_target(spell, action, spellMap, eventArgs)
end
-- Handle notifications of user state values being changed.
function job_state_change(stateField, newValue)
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
end
here is the gear lua:
Code function init_gear_sets()
-- Overriding Global Defaults for this job
-- gear.Staff = {} no need to set this, it's already set
gear.Staff.PDT = ""
gear.default.weaponskill_neck = ""
gear.default.weaponskill_waist = ""
-- List of ammunition that should only be used under unlimited shot
U_Shot_Ammo = S{'Achiyal. Arrow','Achiyal. Bullet'}
-- Simply add a line of DefaultAmmo["Weapon"] = "Ammo Name"
DefaultAmmo = {}
DefaultAmmo["Yoichinoyumi"] = "Achiyal. Arrow"
DefaultAmmo["Annihilator"] = "Achiyal. Bullet"
add_to_chat(123,'sidecar load')
-- Default macro set/book
set_macro_page(3,5)
-- Options: Override default values
options.OffenseModes = {'Normal', 'Acc', 'TP'}
options.RangedModes = {'Normal', 'Acc', 'TP', 'TPAcc'}
options.DefenseModes = {'Normal', 'PDT'}
options.WeaponskillModes = {'Normal', 'Acc'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
state.Defense.PhysicalMode = 'PDT'
-- Misc. Job Ability precasts
sets.precast.Step = {ear2=""}
sets.precast.JA['Bounty Shot'] = {hands="Sylvan Glovelettes +2"}
sets.precast.JA['Scavenge'] = {feet="Orion Socks +1"}
sets.precast.JA['Sharpshot'] = {legs="orion braccae"}
sets.precast.JA['double shot'] = {head="Sylvan Gapette +2"}
-- Idle Set (My 'base')
sets.idle = {
head="Arcadian Beret",neck="Twilight Torque",ear1="Volley Earring",ear2="Clearview Earring",
body="Sylvan Caban +2",hands="Sigyn's Bazubands",ring1="Dark Ring",ring2="Dark Ring",
back="Shadow Mantle",waist="Scout's Belt",legs="Sylvan Bragues +2",feet="Fajin Boots"}
-- Engaged sets
sets.engaged = set_combine(sets.idle, {})
sets.engaged.Acc = set_combine(sets.engaged, {
neck="Iqabi necklace",
back="Attacker's mantle"})
sets.engaged.TP = set_combine(sets.engaged, {
})
-- Ranged Attack
sets.precast.RangedAttack = set_combine(sets.idle, {
head="Sylvan Gapette +2",
body="Sylvan Caban +2",hands="Iuitl Wristbands",
waist="Impulse Belt",pants="Nahtirah Trousers",feet="Wurrukatte Boots"})
sets.midcast.RangedAttack = set_combine(sets.idle, {
head="Arcadian Beret",neck="Ocachi Gorget",
Body="Kyujutsugi", hands="Arc. Bracers +1",ring1="Paqichikaji ring",ring2="Rajas Ring",
back="Sylvan Chlamys",waist="Goading Belt",legs="Aetosaur Trousers",feet="orion socks +1"})
sets.midcast.RangedAttack.Acc = set_combine(sets.midcast.RangedAttack, {
neck="peacock Charm",
ring1="Hajduk Ring",ring2="hajduk ring",legs="Orion Braccae +1", hands="sigyn's bazubands"})
sets.midcast.RangedAttack.TP = set_combine(sets.midcast.RangedAttack, {
head="Scout's Beret +2",back="Sylvan Chlamys"})
sets.midcast.RangedAttack.TPAcc = set_combine(sets.midcast.RangedAttack.acc, {
head="Scout's Beret +2"})
-- Weaponskill sets
sets.precast.WS = set_combine(sets.midcast.RangedAttack, {head="orion beret +1",hands="Arcadian Bracers +1",
ear1="Flame pearl",ear2="moonshade earring",ring1="pyrosoul ring",waist="Pipilaka belt", neck="Ocachi gorget"})
sets.precast.WS['Last Stand'] = set_combine(sets.precast.WS, {
neck="light gorget",waist="flame belt",ear1="moonshade earring",ear2="Volley earring",ring1="solemn Ring", ring2="rajas ring", legs="Nahtirah Trousers"})
sets.precast.WS['Last Stand'].Acc= set_combine(sets.precast.WS, {
neck="light gorget", Waist="flame belt", legs="orion braccae +!",ring1="hajduk ring",ring2="hajduk ring"})
sets.precast.WS['Coronach'] = set_combine(sets.precast.WS, {ear2="Volley earring", waist="Breeze Belt", legs="Nahtirah Trousers"})
sets.precast.WS['Coronach'].Acc = set_combine(sets.precast.WS, {ring1="hajduk ring", ring2="hajduk ring", neck="breeze gorget",waist="breeze belt", legs="orion Braccae +1"})
sets.precast.WS['Wildfire'] = {head="Orion Beret+1", neck="Atzintli necklace", ear1="Hecate's earring", ear2="Moldavite earring", body="Orion jerkin +1", hands="Orion Bracers +1",
ring1="solemn ring", ring2="Paqichikaji ring", back="Sylvaan Chlamys", waist="Scout's Belt", legs="Shneddick tights", feet="Orion Socks +1"}
sets.precast.WS['Jishnus Radiance'] = set_combine(sets.precast.WS, {neck="light gorget", waist="flame belt"})
sets.precast.WS['Jishnus Radiance'] = set_combine(sets.precast.WS, {neck="light gorget", waist="flame belt",ring1="hajduk ring",ring2="hajduk ring",legs="orion Braccae +1"})
sets.precast.WS['Namas Arrow'] = set_combine(sets.precast.WS, {ear2="clearview earring"})
sets.precast.WS['Namas Arrow'].Acc = set_combine(sets.precast.WS, {ear2="clearview earring", neck="light gorget", waist="flame belt", ring1="hajduk ring", ring2=-"hajduk ring", legs="orion braccae +1"})
-- Resting sets
sets.resting = {}
-- Defense sets
sets.defense.PDT = set_combine(sets.idle, {})
sets.defense.MDT = set_combine(sets.idle, {})
sets.Kiting = {feet="Fajin Boots"}
-- Barrage Set
sets.BarrageMid = set_combine(sets.midcast.RangedAttack.Acc, {
hands="Orion Bracers +1",legs="Desultor Tassets"})
end
function file_unload()
-- If you need any custom unload for this job/user
end
edit: ive updated all mote files and would like to mention that i did not write this gear swap.
I use the same one for RNG, and mine also stopped working. no clue how to fix it lol, my weaponskills change gear, but no preshot/tp gearchanges
Fenrir.Greever
Server: Fenrir
Game: FFXI
Posts: 67
By Fenrir.Greever 2014-05-31 23:06:43
To elaborate on my situation, i get no lua errors when shooting for tp but gs wont equip either my preshot set or my mid shot set. It will revert to my idle set if i manually switch gear though.
when i try to ws i get this error: ".../Greever_rng.lua:85: attempt to index global 'bow_gun_weaponskills' (a nil value)"
It will use the ws but not swap any gear for it.
VIP
Server: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-05-31 23:44:52
The manual bow_gun_weaponskills variable doesn't exist anymore, since weaponskills can now be identified via spell.skill.
Any checks for that should instead check for spell.skill == 'Archery' or spell.skill == 'Marksmanship'.
Quetzalcoatl.Orestes
Server: Quetzalcoatl
Game: FFXI
Posts: 430
By Quetzalcoatl.Orestes 2014-06-01 00:56:19
Per Mote's suggestion, you can modify the offending line to the following: Code
if ((spell.target.distance >8 and spell.skill ~= 'Archery' and spell.skill ~= 'Marksmanship') or (spell.target.distance >21)) then
Leviathan.Trein
Server: Leviathan
Game: FFXI
Posts: 6
By Leviathan.Trein 2014-06-01 01:09:35
I have the weaponskills working again, thx for advise.
However, preshot/ra still won't work. No errors in the console. Gearswap just won't change my equip.
Server: Odin
Game: FFXI
Posts: 943
By Odin.Calipso 2014-06-01 02:19:55
has something changed (recently) with enhancing magic or certain spells? suddenly, my enhancing gear no longer equips for boost spells.
(I'm no expert, so please bear with me as I try to explain).
I can add a general enhancing magic statement that will make it work, but from my understanding it used to use the definitions from the mote-mappings file.
VIP
Server: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-06-01 02:40:13
There is no mapping for Boost spells in Mote-Mappings, so that never should have been an issue. They should just use the standard ['Enhancing Magic'] set.
In general, there are only mappings for spell groups for which there is some relevant reason to distinguish them from more standard set selections, such as magic skill. There is no gear that enhances Boost spells specifically, so no mapping was made.
Server: Odin
Game: FFXI
Posts: 943
By Odin.Calipso 2014-06-01 03:10:36
Sorry, guess I should've specified better. At some point during updates, some spells stopped equipping gear (namely boost spells and some elemental magic and enfeebles), and at the urging of a friend I added them all into the mote-mappings (which, at the time, seemed to work/fix the problem). I've since updated (just tonight) everything including all the Mote- files, removing all my edits except for a few things in my actual whm.lua, and for whatever reason enhancing gear didn't equip for boost spells (it just sits in precast gear) :( .. it does however equip for stoneskin.
I'm not sure if I broke something somewhere, for the time being I just added a elseif spell.name == 'Boost-STR' or 'Boost-DEX' or 'Boost-Agi' or 'Boost-MND' or 'Boost-INT' or 'Boost-CHR' or 'Boost-VIT' then
return "EnhancingMagic"
which makes it work.
Here's the whole file:
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
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', 'NoKclub'}
options.DefenseModes = {'Normal'}
options.WeaponskillModes = {'Normal'}
options.CastingModes = {'Normal', 'Resistant'}
options.IdleModes = {'Normal', 'PDT'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
state.Defense.PhysicalMode = 'PDT'
state.OffenseMode = 'None'
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
-- Fast cast sets for spells
sets.precast.FC = {ammo="Impatiens",
head="Nahtirah Hat",neck="Orunmila's Torque",ear2="Loquacious Earring",
body="Dalmatica +1",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Veneficium Ring",
back="ogapepo cape",waist="Witful Belt",legs="Artsieq Hose",feet="Piety Duckbills"}
sets.precast.FC.EnhancingMagic = set_combine(sets.precast.FC, {waist="Witful belt"})
sets.precast.FC.HealingMagic = set_combine(sets.precast.FC, {})
sets.precast.FC.StatusRemoval = sets.precast.FC.HealingMagic
sets.precast.FC.Cure = set_combine(sets.precast.FC.HealingMagic, {main="Tamaxchi",sub="Genbu's Shield",
head="Iaso Mitra",body="Heka's Kalasiris",ammo="Impatiens",feet="Iaso Boots",legs="Nabu's Shalwar",back="Pahtli Cape"})
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['Hexa Strike'] = {
head="Espial Cap",neck="Nefarious Collar",ear1="Ghillie Earring +1",ear2="Ghillie Earring +1",
body="Espial Gambison",hands="Espial Bracers",ring1="Rajas Ring",ring2="Aqua Ring",
back="Rancorous Mantle",waist="Prosilio Belt",legs="Espial Hose",feet="Battlecast gaiters"}
sets.precast.WS['Realmrazer'] = {
head="Espial Cap",neck="Light Gorget",ear1="Ghillie Earring +1",ear2="Ghillie Earring +1",
body="Espial Gambison",hands="Espial Bracers",ring1="Aquasoul Ring",ring2="Aqua Ring",
back="Rancorous Mantle",waist="Light Belt",legs="Espial Hose",feet="Battlecast gaiters"}
-- Midcast Sets
sets.midcast.FastRecast = {}
-- Cure sets
gear.default.obi_waist = "Goading Belt"
gear.default.obi_back = "Mending Cape"
sets.midcast.CureSolace = {main="Tamaxchi",sub="Muse Tariqah",ammo="Oreiad's Tathlum",
head="Iaso Mitra",neck="Phrenic Torque",ear1="Novia Earring",ear2="Orison Earring",
body="Orison Bliaud +2",hands="Bokwus Gloves",ring1="Haoma's Ring",ring2="Sirona's Ring",
back="Mending Cape",waist="Pythia Sash +1",legs="Sifahir Slacks",feet="Piety Duckbills"}
sets.midcast.Cure = {main="Tamaxchi",sub="Muse Tariqah",ammo="Oreiad's Tathlum",
head="Iaso Mitra",neck="Phrenic Torque",ear1="Novia Earring",ear2="Orison Earring",
body="Orison Bliaud +2",hands="Bokwus Gloves",ring1="Haoma's Ring",ring2="Sirona's Ring",
back="Mending Cape",waist="Pythia Sash +1",legs="Sifahir Slacks",feet="Piety Duckbills"}
sets.midcast.Curaga = {main="Tamaxchi",sub="Genbu's Shield",ammo="Oreiad's Tathlum",
head="Iaso Mitra",neck="Phrenic Torque",ear1="Novia Earring",ear2="Orison Earring",
body="Theo. Briault",hands="Orison Mitts +2",ring1="Haoma's Ring",ring2="Sirona's Ring",
back="Mending Cape",waist="Pythia Sash +1",legs="Sifahir Slacks",feet="Piety Duckbills"}
sets.midcast.CureMelee = {main="Tamaxchi",sub="Muse Tariqah",ammo="Oreiad's Tathlum",
head="Iaso Mitra",neck="Phrenic Torque",ear1="Novia Earring",ear2="Orison Earring",
body="Orison Bliaud +2",hands="Bokwus Gloves",ring1="Haoma's Ring",ring2="Sirona's Ring",
back="Mending Cape",waist="Pythia Sash +1",legs="Orison Pantaloons +2",feet="Piety Duckbills"}
sets.midcast.Cursna = {main="Yagrush",sub="Genbu's Shield",
head="Iaso Mitra",neck="Malison Medallion",
body="Orison Bliaud +2",hands="Hieros Mittens",ring1="Ephedra Ring",ring2="Haoma's Ring",
back="Mending Cape",waist="Witful Belt",legs="Theophany Pantaloons",feet="Gendewitha Galoshes +1"}
sets.midcast.StatusRemoval = {main="Yagrush",sub="Genbu's Shield",
head="Orison Cap +2",legs="Orison Pantaloons +2"}
sets.midcast.EnhancingMagic = {main="Beneficus",sub="Genbu's Shield",
body="Anhur Robe",hands="Ayao's Gages",head="Umuthi hat",neck="Colossus's Torque",
back="Merciful Cape",waist="Olympus Sash",legs="Piety Pantaloons",feet="Orison Duckbills +2"}
sets.midcast.Stoneskin = {main="Beneficus",sub="Genbu's Shield",
body="Anhur Robe",hands="Ayao's Gages",head="Umuthi hat",neck="Colossus's Torque",
back="Merciful Cape",waist="Olympus Sash",legs="Piety Pantaloons",feet="Orison Duckbills +2"}
sets.midcast.Auspice = {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="Orison Mitts +2",
back="Merciful cape",waist="Olympus Sash",legs="Piety Pantaloons",feet="Orison Duckbills +2"}
sets.midcast.Regen = {main="Bolelabunga",
body="Piety Briault",hands="Orison Mitts +2",head="Marduk's Tiara +1",
legs="Theophany Pantaloons"}
sets.midcast.Protectra = {ring1="Sheltered Ring",feet="Piety Duckbills"}
sets.midcast.Shellra = {ring1="Sheltered Ring",legs="Piety Pantaloons"}
sets.midcast.DivineMagic = {main="Yagrush", sub="Genbu's Shield",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Theo. Briault",hands="Lurid Mitts",ring1="Maquette Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Piety Pantaloons",feet="Piety Duckbills"}
sets.midcast.ElementalMagic = {main="Yagrush", sub="Genbu's Shield",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Theo. Briault",hands="Lurid Mitts",ring1="Maquette Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Piety Pantaloons",feet="Piety Duckbills"}
sets.midcast.DarkMagic = {main="Yagrush", sub="Genbu's Shield",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Theo. Briault",hands="Lurid Mitts",ring1="Maquette Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Piety Pantaloons",feet="Piety Duckbills"}
sets.midcast.Stun = {ammo="Impatiens",main="Yagrush",
head="Nahtirah Hat",neck="Orunmila's Torque",ear2="Loquacious Earring",
body="Dalmatica +1",hands="Lurid Mitts",ring1="Prolix Ring",ring2="Veneficium Ring",
back="ogapepo cape",waist="Witful Belt",legs="Artsieq Hose",feet="Piety Duckbills"}
-- Custom spell classes
sets.midcast.MndEnfeebles = {main="Yagrush", sub="Genbu's Shield",ammo="Oreiad's Tathlum",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Theo. Briault",hands="Lurid Mitts",ring1="Maquette Ring",ring2="Sangoma Ring",
back="Ogapepo Cape",waist="Demonry Sash",legs="Artsieq Hose",feet="Piety Duckbills"}
sets.midcast.Dia = {main="Yagrush", sub="Genbu's Shield",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Theo. Briault",hands="Lurid Mitts",ring1="Maquette Ring",ring2="Sangoma Ring",
back="Ogapepo Cape",waist="Chaac belt",legs="Piety Pantaloons",feet="Piety Duckbills"}
sets.midcast.IntEnfeebles = {main="Yagrush", sub="Genbu's Shield",ammo="Oreiad's Tathlum",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Theo. Briault",hands="Lurid Mitts",ring1="Maquette Ring",ring2="Sangoma Ring",
back="Ogapepo Cape",waist="Demonry Sash",legs="Artsieq Hose",feet="Piety Duckbills"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Bolelabunga", sub="Genbu's Shield",ammo="Impatiens",
head="Wivre Hairpin",neck="Twilight Torque",ear1="Ethereal earring",ear2="Novia Earring",
body="Theo. Briault",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Dark Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Nares Trews",feet="Iaso boots"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {main="Bolelabunga", sub="Genbu's Shield",ammo="Impatiens",
head="Wivre Hairpin",neck="Twilight Torque",ear1="Ethereal earring",ear2="Moonshade Earring",
body="Artsieq Jubbah",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Dark Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Nares Trews",feet="Iaso boots"}
sets.idle.PDT = {main="Bolelabunga", sub="Genbu's Shield",ammo="Impatiens",
head="Wivre Hairpin",neck="Twilight Torque",ear1="Ethereal earring",ear2="Moonshade Earring",
body="Artsieq Jubbah",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Dark Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Nares Trews",feet="Iaso boots"}
sets.idle.Town = {main="Yagrush", sub="Leafkin shield",ammo="Impatiens",
head="Iaso Mitra",neck="Twilight Torque",ear1="Ethereal earring",ear2="Moonshade Earring",
body="Woodland Tunic",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Dark Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Sifahir Slacks",feet="Iaso boots"}
sets.idle.Weak = {main="Bolelabunga", sub="Genbu's Shield",ammo="Impatiens",
head="Wivre Hairpin",neck="Twilight Torque",ear1="Ethereal earring",ear2="Moonshade Earring",
body="Artsieq Jubbah",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Dark Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Nares Trews",feet="Iaso boots"}
sets.Oneiros = {main="Terra's Staff", sub="Oneiros Grip"}
-- Defense sets
sets.defense.PDT = {}
sets.defense.MDT = {}
sets.Kiting = {feet="Iaso Boots"}
-- 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 = {ammo="Cheruski Needle",
head="Espial Cap",neck="Inquisitor's Chain",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Espial Gambison",hands="Espial Bracers",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Rancorous Mantle",waist="Ninurta's Sash",legs="Espial Hose",feet="Battlecast gaiters"}
sets.engaged.noKclub = {ammo="Cheruski Needle",
head="Espial Cap",neck="Inquisitor's Chain",ear1="Steelflash Earring",ear2="Bladeborn earring",
body="Espial Gambison",hands="Espial Bracers",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Umbra Cape",waist="Cetl Belt",legs="Espial Hose",feet="Battlecast gaiters"}
-- 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.
-------------------------------------------------------------------------------------------------------------------
function customize_idle_set(idleSet)
if player.mpp < 75 and state.IdleMode == "Normal" and state.Defense.Active == false then
idleSet = set_combine(idleSet, sets.Oneiros)
end
return idleSet
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
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
-- Default base equipment layer of fast recast.
equip(sets.midcast.FastRecast)
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 not spell.interrupted then
if state.Buff[spell.name] ~= nil then
state.Buff[spell.name] = true
elseif spell.name == "Afflatus Misery" then
state.Buff['Afflatus Solace'] = false
end
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
elseif spell.name == 'Boost-STR' or 'Boost-DEX' or 'Boost-Agi' or 'Boost-MND' or 'Boost-INT' or 'Boost-CHR' or 'Boost-VIT' then
return "EnhancingMagic"
elseif spell.name == 'Dia' or 'Dia II' or 'Diaga' then
return "Dia"
end
end
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
VIP
Server: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-06-01 03:21:16
You're still using the old form of skill names. This changed several weeks ago.
Anything that is based on the value of spell.skill should be written with proper spacing. So "Enhancing Magic" rather than "EnhancingMagic".
Thus gear sets should be sets.precast.FC['Enhancing Magic'], not sets.precast.FC.EnhancingMagic, etc.
The only reason what you did works is because you've created a custom spell map for enhancing magic that happens to match the old spell.skill value, when what you actually needed was to fix the set names.
Server: Odin
Game: FFXI
Posts: 943
By Odin.Calipso 2014-06-01 03:24:27
Oh, doh, I guess that's what I get for just copy/pasting the whole block of gear sets every time I updated. Never noticed the difference in the new ones :(. It works perfectly now, thank you!
Fenrir.Greever
Server: Fenrir
Game: FFXI
Posts: 67
By Fenrir.Greever 2014-06-01 07:15:49
Ty for the advice, can confirm that the ws are now working w/o error but still having the issue where preshot/midshot sets are not working. as trien mentioned, theres no GS or lua error.
Sylph.Cyc
Server: Sylph
Game: FFXI
Posts: 24
By Sylph.Cyc 2014-06-01 07:49:19
Having some problems converting a simple rule I had in my SCH spellcast to GearSwap: Code elseif spell.type == 'Scholar' then
if spell.english == 'Manifestation' and buffactive['Light Arts'] then
cancel_spell()
send_command('input /ja "Accession" <me>')
elseif spell.english == 'Accession' and buffactive['Dark Arts'] then
cancel_spell()
send_command('input /ja "Manifestation" <me>')
end
elseif spell.type == 'JobAbility' then
if spell.english == 'Light Arts' and buffactive['Light Arts'] then
cancel_spell()
send_command('input /ja "Addendum: White" <me>')
elseif spell.english == 'Dark Arts' and buffactive['Dark Arts'] then
cancel_spell()
send_command('input /ja "Addendum: Black" <me>')
end
The JobAbility part works, but the Scholar part doesn't change stratagems according to the Arts.
By Miang 2014-06-01 08:36:53
Few issues here, spell.type would never be 'Scholar', it's things like 'WhiteMagic' or 'JobAbility' (as you've put in the second if statement.
Change it to something like: Code elseif spell.type == 'JobAbility' then
if buffactive['Light Arts'] or buffactive['Addendum: White'] then
if spell.english == 'Light Arts' and not buffactive['Addendum: White'] then
cancel_spell()
send_command('input /ja "Addendum: White" <me>;')
elseif spell.english == 'Manifestation' then
cancel_spell()
send_command('input /ja "Accession" <me>;')
end
elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
if spell.english == 'Dark Arts' and not buffactive['Addendum: Black'] then
cancel_spell()
send_command('input /ja "Addendum: Black" <me>;')
elseif spell.english == 'Accession' then
cancel_spell()
send_command('input /ja "Manifestation" <me>;')
end
end
end
Remora.Brain
Server: Remora
Game: FFXI
Posts: 602
By Remora.Brain 2014-06-01 11:49:34
Ever since yesterday my SAM spellcast keeps spamming me with red text, but it still seems to be doing everything I expect of it. I'm almost completely clueless when it comes to stuff like this.
Code sets.TP.index = {'TsuruIonisFodder','TsuruIonisACC','Amano5hit','AmanoTank','Anahera4hit','LanceIonis'}
TP_ind = 1
Code function self_command(command)
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]..' ----->')
equip(sets.TP[sets.TP.index[TP_ind]])
end
end
Code function precast(spell)
if player.equipment.head == 'Reraise Hairpin' then disable('head')
else enable('head') end
if player.equipment.left_ear == 'Reraise Earring' then disable('ear1')
else enable('ear1') end
if sets.precast[spell.english] then
equip(sets.precast[spell.english])
end
end
I figure if there's a problem it'd be in one of those because I just frankensteined that ***together as best I could, but I have no idea why it's put like that in the first place so I can't really understand how to fix it.
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.
|
|