|
Gearswap Support Thread
サーバ: Asura
Game: FFXI
Posts: 389
By Asura.Patriclis 2018-05-08 07:47:57
Line 665 is actually this part, it is not formatted correctly in the post.
function event_action(act)
action = Action(act)
if action:get_category_string() == 'item_finish' then
if action.raw.param == tbid and player.id == action.raw.actor_id then
send_command('wait 1.0;input /ma "'..ninspells[nincount]..'" <me>')
tbid = 0
end
end
end
https://github.com/smd111/Gearswap-Skillup
This link has the latest version of skillup lua.
Doesn't even have the line you're having problems with.
Would suggest using the latest version, rather than trying to fix an old one.
Bahamut.Autobot
サーバ: Bahamut
Game: FFXI
Posts: 21
By Bahamut.Autobot 2018-05-08 09:02:44
Is there a way to equip a specific set or piece based off a targets hpp? I want gear to switch to another set when my targets HPP gets to a certain point. is this possible?
Carbuncle.Kigensuro
サーバ: Carbuncle
Game: FFXI
Posts: 93
By Carbuncle.Kigensuro 2018-05-08 09:18:25
This might have been asked before, but I'm using original Skillup.lua to level skills and I get this error everytime I cast something
Skillup.lua:665: Attempt to index global 'action' (a nil value)
Also after about 30 minutes or so it stops, typically after casting a summon. I can get it running again shortly after by releasing the summon. What might be wrong?
looking at the second post where you posted the file you are trying to use some how you got either a extreme beta version of the code or someone screwed up the code and posted it as there own
--i think it is the latter because the coding style is all wrong for the creator of gearswap-skillup
the true gearswap-skillup can only be found here:
https://github.com/smd111/Gearswap-Skillup
Carbuncle.Kigensuro
サーバ: Carbuncle
Game: FFXI
Posts: 93
By Carbuncle.Kigensuro 2018-05-08 09:21:21
Is there a way to equip a specific set or piece based off a targets hpp? I want gear to switch to another set when my targets HPP gets to a certain point. is this possible? you have to perform some action to get it to work
or do some trickery to get it to work(this is hard to do but it can be done)
Bahamut.Autobot
サーバ: Bahamut
Game: FFXI
Posts: 21
By Bahamut.Autobot 2018-05-08 10:22:15
Carbuncle.Kigensuro said: »Is there a way to equip a specific set or piece based off a targets hpp? I want gear to switch to another set when my targets HPP gets to a certain point. is this possible? you have to perform some action to get it to work
or do some trickery to get it to work(this is hard to do but it can be done)
ok i figured out how to get it to work...sorta. i want to unequip specific pieces. can gearswap unequip gear?
Ragnarok.Lockfort
サーバ: Ragnarok
Game: FFXI
Posts: 252
By Ragnarok.Lockfort 2018-05-08 10:47:59
normally: ammo="Ginsen",
unequip: ammo=empty,
no "" around empty
Bahamut.Autobot
サーバ: Bahamut
Game: FFXI
Posts: 21
By Bahamut.Autobot 2018-05-08 12:09:00
Ragnarok.Lockfort said: »normally: ammo="Ginsen",
unequip: ammo=empty,
no "" around empty
ty
By Squabble 2018-05-08 19:39:51
Is there a way to precast item usage? I want to equip Holy Water+ gear when using holy water but have cursna received gear otherwise when doom is active.
Asura.Chiaia
VIP
サーバ: Asura
Game: FFXI
Posts: 1656
By Asura.Chiaia 2018-05-08 20:11:35
Is there a way to precast item usage? I want to equip Holy Water+ gear when using holy water but have cursna received gear otherwise when doom is active. You can only midcast item usage (which is useless) so Byrth didn't even bother with it in gearswap. https://github.com/Windower/Lua/issues/1271
You could do some code to switch your set the first time it see's you use one it wouldn't be active for the first one but any others you use but then your loosing cursna received gear...
By Boshi 2018-05-09 01:06:12
just have it be a general equip item if buffactive doom and have it lock that slot while doom is on.
By Squabble 2018-05-09 14:43:32
just have it be a general equip item if buffactive doom and have it lock that slot while doom is on.
I already do this with a mix of Holy Water+ and Cursna Received+ gear, I was just wondering if there was a way to max out both by just precasting holy water gear on item usage.
サーバ: Asura
Game: FFXI
Posts: 389
By Asura.Patriclis 2018-05-10 15:06:33
just have it be a general equip item if buffactive doom and have it lock that slot while doom is on.
I already do this with a mix of Holy Water+ and Cursna Received+ gear, I was just wondering if there was a way to max out both by just precasting holy water gear on item usage.
I wrote this at work on my break, where I don't have access to the game to test it out, so if it doesn't work right... sucks XD
Code
get_sets()
state.Buff.Doom = buffactive.doom or false
send_command('bind !` gs c HOLY')
end
--This should be used in tandem with the gear that equips your cursna recieved+ gear when doomed
self_command(command)
if command == 'HOLY' then
send_command('input /item "Holy Water" <me>') --Start using a holy water
--The times below may need tweaking. seriosuly, what the *** do i know, im not a *** horologist.
--The wait timer before equipping holy water+ gear may not be necessary. I forget how long it takes to use a holy water. Tweak this ***as you see fit.
send_command('@wait .5; gs equip sets.HolyWater') --waits .5 so you can start using the item and keep cursna+ gear on in the meantime incase someone cursnas you, then equips holywater+ set
send_command('@wait 1.0; gs c CHECK_DOOM') -- waits 1.0 second until after you've used the item and then calls CHECK_DOOM
elseif command == 'CHECK_DOOM' then
if state.Buff.Doom then --If your *** is still doomed (THANKS HOLY WATER, YOU HAD 1 *** JOB)
if player.status == 'Idle' then --And your scrub *** is idle
equip(set_combine(sets.NormieAssIdleGear, sets.CursnaReceivedSet)) --Overlay cursna+ gear over your normie *** idle set
elseif player.status == 'Engaged' then --If you're fighting like the champion you'll never be
equip(set_combine(sets.NormieAssTPGear, sets.CursnaReceivedSet)) --Overlay cursna+ gear over your normie *** engaged set
else -- If your *** isnt cursed (gj holy water)
if player.status == 'Idle' then --And your scrub *** is idle
equip(sets.NormieAssIdleGear); --Equip your normie *** idle set
elseif player.status == 'Engaged' then --If you're fighting like the champion you'll never be (but at least you might live)
equip(sets.NormieAssTPGear); --Equip your normie *** engaged set
end
end
end
Good luck. Lemme know how it works, maybe ill actually implement it myself if I ever stop being lazy.
サーバ: Odin
Game: FFXI
Posts: 2
By Odin.Stuntmandan 2018-05-12 13:21:36
Trying to figure out a way to keep my warp ring and other items from changing when I gain/lose a buff or move. Several months ago I never had the issue then I updated my motes files and now they change on their own when status changes. Not interested in toggles just wondering if it's something easy to change.
サーバ: Asura
Game: FFXI
Posts: 389
By Asura.Patriclis 2018-05-14 07:29:17
Trying to figure out a way to keep my warp ring and other items from changing when I gain/lose a buff or move. Several months ago I never had the issue then I updated my motes files and now they change on their own when status changes. Not interested in toggles just wondering if it's something easy to change.
Here's the simplest solution I can think of make sure to call the function at the top of your status_change or job_status_change functions. Might have to put it other places depending on how your gearswap works. Just play around with putting it places and it should work for you.
Code
function check_rings()
rings = S{"Warp Ring", "Trizak Ring", "Capacity Ring"}
if rings:contains(player.equipment.left_ring) then
disable("left_ring")
else
enable("left_ring")
end
if rings:contains(player.equipment.right_ring) then
disable("right_ring")
else
enable("right_ring")
end
end
By stuntmandan 2018-05-14 08:00:53
Thank you so much for responding! I'll give it a shot.
By mrlooolz 2018-05-14 11:07:08
hey guys, Thanks for your continued support.
I ported some line of code from my old lua into a new lua I am trying to adopt however it wont work. It was running find on my old lua.
line of code trying to port : https://pastebin.com/FFS9NCY5
my lua starting at line 22 : https://pastebin.com/nizWn4Hm
any help is appreciated
サーバ: Bahamut
Game: FFXI
Posts: 21
By Bahamut.Lordshaxx 2018-05-14 12:35:59
Hi guys, I'm having trouble binding 3 keys together in lua. I want to bind alt + shift + f1 and ctrl + shift + f1 etc. Anyone know the syntax? Can lua even do this? Thanks.
サーバ: Asura
Game: FFXI
Posts: 389
By Asura.Patriclis 2018-05-14 13:03:24
Here are over 400 lines of code that aren't working. I won't tell you what the error is or give any context as to what 'not working' means in this case.
Please spend hours combing over my code looking for an error you know nothing about. Good luck.
/facepalm
NOOOOOOOOOOOOOOOO!
By mrlooolz 2018-05-14 13:46:06
Here are over 400 lines of code that aren't working. I won't tell you what the error is or give any context as to what 'not working' means in this case.
Please spend hours combing over my code looking for an error you know nothing about. Good luck.
/facepalm
NOOOOOOOOOOOOOOOO!
I linked the code that i was trying to import here
https://pastebin.com/FFS9NCY5
I ported the same code from line 22-40 on the new lua
https://pastebin.com/nizWn4Hm
the rest of the lua is working fine, i was just trying to see why this specifc funtion precast wont work.
It used to Auto-entrust and cast the indi bubble on my target.
Hope that helps and ill try be clearer next time.
サーバ: Asura
Game: FFXI
Posts: 389
By Asura.Patriclis 2018-05-14 16:59:43
Lua 1, Line 1: Code function pretarget(spell,action)
Lua 2, Line 22: Code function precast(spell,action)
You're putting the code in an entirely different function.
By Zyla 2018-05-14 17:11:42
Anyone mind helping me figure out why my lua for cor isn't equipping my Luzaf's Ring when the toggle for the ring is on?
These are the 3 spots in the lua where the ring is mentioned.
Code sets.precast.LuzafRing = set_combine(sets.precast.CorsairRoll, {ring2="Luzaf's Ring"})
Code if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") then
if player.status ~= 'Engaged' then
equip(sets.precast.CorsairRoll.Gun)
end
if state.LuzafRing.value then
equip(sets.precast.LuzafRing)
end
Code function display_roll_info(spell)
rollinfo = rolls[spell.english]
local rollsize = (state.LuzafRing.value and 'Large') or 'Small'
if rollinfo then
add_to_chat(104, '[ Lucky: '..tostring(rollinfo.lucky)..' / Unlucky: '..tostring(rollinfo.unlucky)..' ] '..spell.english..': '..rollinfo.bonus..' ('..rollsize..') ')
end
I've used the showswaps function and checked it to see if it's working and for whatever reason I can't fathom it will not equip the ring with the toggle switch on. Any help is appreciated.
サーバ: Asura
Game: FFXI
Posts: 88
By Asura.Selindrile 2018-05-14 17:45:11
@Zyla my first guess is that the standard CorsairRoll set is actually equipping again after the Luzaf using one, would have to see more context of the file.
[+]
By mrlooolz 2018-05-15 02:56:54
Lua 1, Line 1: Code function pretarget(spell,action)
Lua 2, Line 22: Code function precast(spell,action)
You're putting the code in an entirely different function.
I tried the following in lua 2:
function job_precast(spell,action)
function job_pretarget (spell,action)
function precast (spell,action)
function pretarget (spell,action)
None of them seem to allow the code to work. I am not sure what I am missing.
By Zyla 2018-05-15 09:26:13
@Zyla my first guess is that the standard CorsairRoll set is actually equipping again after the Luzaf using one, would have to see more context of the file.
I don't think I can post the file here, and not sure if there is a character limit or I'd just post the whole lua. maybe try in a spoiler tag?
-- Original: Motenten / Modified: Arislan
-------------------------------------------------------------------------------------------------------------------
-- Keybinds
-------------------------------------------------------------------------------------------------------------------
-- Modes: [ F9 ] Cycle Offense Modes
-- [ CTRL+F9 ] Cycle Hybrid Modes
-- [ ALT+F9 ] Cycle Ranged Modes
-- [ WIN+F9 ] Cycle Weapon Skill Modes
-- [ F10 ] Emergency -PDT Mode
-- [ ALT+F10 ] Toggle Kiting Mode
-- [ F11 ] Emergency -MDT Mode
-- [ F12 ] Update Current Gear / Report Current Status
-- [ CTRL+F12 ] Cycle Idle Modes
-- [ ALT+F12 ] Cancel Emergency -PDT/-MDT Mode
-- [ WIN+C ] Toggle Capacity Points Mode
-- [ WIN+` ] Toggle use of Luzaf Ring.
-- [ WIN+Q ] Quick Draw shot mode selector.
--
-- Abilities: [ CTRL+] ] Quick Draw primary shot element cycle forward.
-- [ CTRL+[ ] Quick Draw primary shot element cycle backward.
-- [ ALT+] ] Quick Draw secondary shot element cycle forward.
-- [ ALT+[ ] Quick Draw secondary shot element cycle backward.
-- [ WIN+[ ] Quick Draw toggle target type.
-- [ WIN+] ] Quick Draw toggle use secondary shot.
--
-- [ CTRL+= ] Crooked Cards
-- [ CTRL+` ] Double-Up
-- [ ALT+- ] Fold
-- [ CTRL+- ] Snake Eye
-- [ CTRL+NumLock ] Triple Shot
-- [ CTRL+Numpad/ ] Berserk
-- [ CTRL+Numpad* ] Warcry
-- [ CTRL+Numpad- ] Aggressor
--
-- Spells: [ ALT+numpad+ ] Utsusemi: Ichi
-- [ CTRL+numpad+ ] Utsusemi: Ni
--
-- Weapons: [ CTRL+G ] Cycles between available ranged weapons
-- [ CTRL+W ] Toggle Ranged Weapon Lock
--
-- WS: [ CTRL+Numpad7 ] Savage Blade
-- [ CTRL+Numpad8 ] Last Stand
-- [ CTRL+Numpad9 ] Leaden Salute
-- [ CTRL+Numpad6 ] Wildfire
-- [ CTRL+Numpad4 ] Requiescat
--
-- RA: [ Numpad1 ] Ranged Attack
-------------------------------------------------------------------------------------------------------------------
-- Custom Commands (preface with /console to use these in macros)
-------------------------------------------------------------------------------------------------------------------
-- gs c qd Uses the currently configured shot on the target, with either <t> or
-- <stnpc> depending on setting.
-- gs c altqd Uses the currently configured
--
-- gs c qd t Uses the currently configured shot on the target, but forces use of <t>.
--
-- gs c cycle mainqd Cycles through the available steps to use as the primary shot when using
-- one of the above commands.
-- gs c cycle altqd Cycles through the available steps to use for alternating with the
-- configured main shot.
-- gs c toggle usealtqd Toggles whether or not to use an alternate shot.
-- gs c toggle selectqdtarget Toggles whether or not to use <stnpc> (as opposed to <t>) when using a shot.
--
-- gs c toggle LuzafRing Toggles use of Luzaf Ring on and off
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
-- QuickDraw Selector
state.Mainqd = M{['description']='Primary Shot', 'Fire Shot', 'Ice Shot', 'Wind Shot', 'Earth Shot', 'Thunder Shot', 'Water Shot', 'Dark Shot', 'Light Shot'}
state.Altqd = M{['description']='Secondary Shot', 'Fire Shot', 'Ice Shot', 'Wind Shot', 'Earth Shot', 'Thunder Shot', 'Water Shot', 'Dark Shot', 'Light Shot'}
state.UseAltqd = M(false, 'Use Secondary Shot')
state.SelectqdTarget = M(false, 'Select Quick Draw Target')
state.IgnoreTargetting = M(false, 'Ignore Targetting')
state.DualWield = M(false, 'Dual Wield III')
state.QDMode = M{['description']='Quick Draw Mode', 'STP', 'Magic Enhance', 'Magic Attack', 'Resistant'}
state.Currentqd = M{['description']='Current Quick Draw', 'Main', 'Alt'}
-- Whether to use Luzaf's Ring
state.LuzafRing = M(false, "Luzaf's Ring")
-- Whether a warning has been given for low ammo
state.warned = M(false)
define_roll_values()
lockstyleset = 1
update_offense_mode()
determine_haste_group()
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('STP', 'Normal', 'HighAcc')
state.HybridMode:options('Normal', 'DT')
state.RangedMode:options('STP', 'Normal', 'HighAcc')
state.WeaponskillMode:options('Normal', 'Acc')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'DT', 'Refresh')
state.WeaponLock = M(false, 'Weapon Lock')
state.Gun = M{['description']='Current Gun', 'Doomsday', 'Fomalhaut', 'Anarchy +2'}--, 'Armageddon'
state.CP = M(false, "Capacity Points Mode")
gear.RAbullet = "Decimating Bullet"
gear.WSbullet = "Decimating Bullet"
gear.MAbullet = "Orichalcum Bullet"
gear.QDbullet = "Animikii Bullet"
options.ammo_warning_limit = 10
-- Additional local binds
send_command('bind ^` input /ja "Double-up" <me>')
send_command('bind ^= input /ja "Crooked Cards" <me>')
send_command('bind ^- input /ja "Snake Eye" <me>')
send_command('bind !- input /ja "Fold" <me>')
send_command('bind !` input /ja "Bolter\'s Roll" <me>')
send_command ('bind @` gs c toggle LuzafRing')
send_command('bind numpad. gs c qd')
send_command('bind ^] gs c cycleback mainqd')
send_command('bind ^[ gs c cycle mainqd')
send_command('bind ![ gs c cycle altqd')
send_command('bind !] gs c cycleback altqd')
send_command('bind @[ gs c toggle selectqdtarget')
send_command('bind @] gs c toggle usealtqd')
send_command('bind @c gs c toggle CP')
send_command('bind @q gs c cycle QDMode')
send_command('bind @g gs c cycle Gun')
send_command('bind @w gs c toggle WeaponLock')
send_command('bind ^z input /item "Echo Drops" <me>')
send_command('bind ^x input /item "Remedy" <me>')
send_command('bind ^c input /item "Holy Water" <me>')
send_command('bind ^numlock input /ja "Triple Shot" <me>')
if player.sub_job == "DNC" then
send_command('bind !. input /ja "Spectral Jig" <me>')
elseif player.sub_job == "NIN" then
send_command('bind !. input /ma "Monomi: Ichi" <me>')
send_command('bind !, input /ma "Tonko: Ni" <me>')
send_command('bind !numpad+ input /ma "Utsusemi: Ichi" <me>')
send_command('bind ^numpad+ input /ma "Utsusemi: Ni" <me>')
elseif player.sub_job == 'WAR' then
send_command('bind ^numpad/ input /ja "Berserk" <me>')
send_command('bind ^numpad* input /ja "Warcry" <me>')
send_command('bind ^numpad- input /ja "Aggressor" <me>')
send_command('bind !. input /item "Silent Oil" <me>')
send_command('bind !, input /item "Prism Powder" <me>')
else
send_command('bind !. input /item "Silent Oil" <me>')
send_command('bind !, input /item "Prism Powder" <me>')
end
send_command('bind ^numpad7 input /ws "Savage Blade" <t>')
send_command('bind ^numpad8 input /ws "Last Stand" <t>')
send_command('bind ^numpad9 input /ws "Leaden Salute" <t>')
send_command('bind ^numpad6 input /ws "Wildfire" <t>')
send_command('bind ^numpad4 input /ws "Requiescat" <t>')
send_command('bind ^numpad2 input /ws "Burning Blade" <t>')
send_command('bind ^numpad3 input /ws "Flat Blade" <t>')
send_command('bind numpad1 input /ra <t>')
select_default_macro_book()
set_lockstyle()
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind @`')
send_command('unbind ^-')
send_command('unbind ^=')
send_command('unbind !-')
send_command('unbind !=')
send_command('unbind ^[')
send_command('unbind ^]')
send_command('unbind ![')
send_command('unbind !]')
send_command('unbind @[')
send_command('unbind @]')
send_command('unbind @c')
send_command('unbind @q')
send_command('unbind @g')
send_command('unbind @w')
send_command('unbind ^numlock')
send_command('unbind ^numpad/')
send_command('unbind ^numpad*')
send_command('unbind ^numpad-')
send_command('unbind ^numpad8')
send_command('unbind ^numpad4')
send_command('unbind ^numpad6')
send_command('unbind ^numpad1')
send_command('unbind ^numpad2')
send_command('unbind ^numpad3')
send_command('unbind numpad1')
send_command('unbind numpad.')
send_command('unbind ^numpad.')
send_command('unbind !,')
send_command('unbind !.')
send_command('unbind ^numpad+')
send_command('unbind !numpad+')
send_command('unbind ^z')
send_command('unbind ^x')
send_command('unbind ^c')
send_command('unbind #`')
send_command('unbind #1')
send_command('unbind #2')
send_command('unbind #3')
send_command('unbind #4')
send_command('unbind #5')
send_command('unbind #6')
send_command('unbind #7')
send_command('unbind #8')
send_command('unbind #9')
send_command('unbind #0')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
------------------------------------------------------------------------------------------------
---------------------------------------- Precast Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.precast.JA['Snake Eye'] = {legs="Lanun Trews +1"}
sets.precast.JA['Wild Card'] = {feet="Lanun Bottes +3"}
sets.precast.JA['Random Deal'] = {body="Lanun Frac +1"}
sets.precast.CorsairRoll = {
head={ name="Lanun Tricorne +1", augments={'Enhances "Winning Streak" effect',}},
body="Meg. Cuirie +1",
hands="Umuthi Gloves",
legs={ name="Desultor Tassets", augments={'"Sic" and "Ready" ability delay -5','"Phantom Roll" ability delay -5',}},
feet={ name="Lanun Bottes +1", augments={'Enhances "Wild Card" effect',}},
neck="Regal Necklace",
waist="Flume Belt",
left_ear="Ethereal Earring",
right_ear="Etiolation Earring",
left_ring="Dark Ring",
right_ring="Defending Ring",
back="Camulus's Mantle",
}
sets.precast.CorsairRoll.Gun = set_combine(sets.precast.CorsairRoll.Engaged, {range="Compensator"})
sets.precast.CorsairRoll["Caster's Roll"] = set_combine(sets.precast.CorsairRoll, {legs="Chas. Culottes +1"})
sets.precast.CorsairRoll["Courser's Roll"] = set_combine(sets.precast.CorsairRoll, {feet="Chass. Bottes +1"})
sets.precast.CorsairRoll["Blitzer's Roll"] = set_combine(sets.precast.CorsairRoll, {head="Chass. Tricorne +1"})
sets.precast.CorsairRoll["Tactician's Roll"] = set_combine(sets.precast.CorsairRoll, {body="Chasseur's Frac +1"})
sets.precast.CorsairRoll["Allies' Roll"] = set_combine(sets.precast.CorsairRoll, {hands="Chasseur's Gants +1"})
sets.precast.LuzafRing = set_combine(sets.precast.CorsairRoll, {ring2="Luzaf's Ring"})
sets.precast.FoldDoubleBust = {hands="Lanun Gants +1"}
sets.precast.Waltz = {
body="Passion Jacket",
neck="Phalaina Locket",
ring1="Asklepian Ring",
waist="Gishdubar Sash",
}
sets.precast.Waltz['Healing Waltz'] = {}
sets.precast.FC = {
head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}},
body={ name="Taeon Tabard", augments={'Accuracy+19 Attack+19','"Fast Cast"+5','Phalanx +3',}},
hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
legs={ name="Rawhide Trousers", augments={'MP+50','"Fast Cast"+5','"Refresh"+1',}},
feet={ name="Lanun Bottes +1", augments={'Enhances "Wild Card" effect',}},
neck="Orunmila's Torque",
waist="Flume Belt",
left_ear="Loquac. Earring",
right_ear="Etiolation Earring",
left_ring="Prolix Ring",
right_ring="Kishar Ring",
back="Camulus's Mantle",
}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {
body="Passion Jacket",
neck="Magoraga Beads",
ring1="Lebeche Ring",
})
-- (10% Snapshot from JP Gifts)
sets.precast.RA = {
head="Aurore Beret +1",
body={ name="Skopos Jerkin", augments={'"Snapshot"+3','VIT+1','"Store TP"+1',}},
hands={ name="Lanun Gants +1", augments={'Enhances "Fold" effect',}},
legs="Nahtirah Trousers",
feet="Meg. Jam. +1",
waist="Impulse Belt",
right_ring="Haverton Ring",
back="Camulus's Mantle",
} --59/26
sets.precast.RA.Flurry1 = set_combine(sets.precast.RA, {
}) --47/46
sets.precast.RA.Flurry2 = set_combine(sets.precast.RA.Flurry1, {
}) --30/65
------------------------------------------------------------------------------------------------
------------------------------------- Weapon Skill Sets ----------------------------------------
------------------------------------------------------------------------------------------------
sets.precast.WS = {
ammo=gear.WSbullet,
head={ name="Herculean Helm", augments={'Attack+17','Weapon skill damage +4%','DEX+13','Accuracy+9',}},
body="Meg. Cuirie +1",
hands="Meg. Gloves +1",
legs={ name="Herculean Trousers", augments={'Accuracy+22','Weapon skill damage +4%','DEX+9','Attack+7',}},
feet={ name="Herculean Boots", augments={'Accuracy+29','Weapon skill damage +5%','MND+3',}},
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +25',}},
right_ear="Ishvara Earring",
left_ring="Ifrit Ring +1",
right_ring="Ifrit Ring +1",
back="Atheling Mantle",
}
sets.precast.WS.Acc = set_combine(sets.precast.WS, {
ammo=gear.WSbullet,
head="Meghanada Visor +1",
body="Meg. Cuirie +1",
hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
feet="Meg. Jam. +1",
neck="Sanctity Necklace",
waist="Kentarch Belt +1",
left_ear="Mache Earring",
right_ear="Mache Earring",
left_ring="Ramuh Ring +1",
right_ring="Cacoethic Ring",
back="Lupine Cape",
})
sets.precast.WS['Last Stand'] = {
ammo=gear.WSbullet,
head={ name="Herculean Helm", augments={'Rng.Acc.+25 Rng.Atk.+25','Sklchn.dmg.+2%','AGI+2','Rng.Acc.+15',}},
body="Laksa. Frac +2",
hands="Meg. Gloves +1",
legs="Meg. Chausses +1",
feet={ name="Herculean Boots", augments={'Rng.Acc.+25 Rng.Atk.+25','Weapon skill damage +2%','AGI+2','Rng.Atk.+10',}},
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +25',}},
right_ear="Ishvara Earring",
left_ring="Ilabrat Ring",
right_ring="Apate Ring",
back={ name="Gunslinger's Cape", augments={'Enmity-3','"Mag.Atk.Bns."+4','"Phantom Roll" ability delay -1','Weapon skill damage +3%',}},
}
sets.precast.WS['Last Stand'].Acc = set_combine(sets.precast.WS['Last Stand'], {
neck="Sanctity Necklace",
waist="Kwahu Kachina Belt",
left_ear="Clearview Earring",
right_ear="Enervating Earring",
left_ring="Longshot Ring",
right_ring="Cacoethic Ring",
})
sets.precast.WS['Wildfire'] = {
ammo=gear.MAbullet,
head={ name="Herculean Helm", augments={'"Mag.Atk.Bns."+22','Weapon skill damage +4%','Rng.Acc.+2','Rng.Atk.+10',}},
body="Meg. Cuirie +1",
hands={ name="Herculean Gloves", augments={'"Mag.Atk.Bns."+20','Weapon skill damage +4%','MND+9','Mag. Acc.+12',}},
legs={ name="Herculean Trousers", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Store TP"+5','INT+6','Mag. Acc.+15','"Mag.Atk.Bns."+10',}},
feet={ name="Herculean Boots", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','STR+3','"Mag.Atk.Bns."+13',}},
neck="Sanctity Necklace",
waist="Eschan Stone",
left_ear="Friomisi Earring",
right_ear="Hecate's Earring",
left_ring="Ilabrat Ring",
right_ring="Arvina Ringlet +1",
back={ name="Gunslinger's Cape", augments={'Enmity-3','"Mag.Atk.Bns."+4','"Phantom Roll" ability delay -1','Weapon skill damage +3%',}},
}
sets.precast.WS['Leaden Salute'] = set_combine(sets.precast.WS['Wildfire'], {
head="Pixie Hairpin +1",
ear2="Moonshade Earring",
ring1="Archon Ring",
})
sets.precast.WS['Leaden Salute'].FullTP = {ear2="Hecate's Earring"}
sets.precast.WS['Detonator'] = set_combine(sets.precast.WS['Last Stand'], {
})
sets.precast.WS['Evisceration'] = {
}
sets.precast.WS['Evisceration'].Acc = set_combine(sets.precast.WS['Evisceration'], {
})
sets.precast.WS['Savage Blade'] = {
head={ name="Herculean Helm", augments={'Attack+17','Weapon skill damage +4%','DEX+13','Accuracy+9',}},
body="Laksa. Frac +2",
hands="Meg. Gloves +1",
legs={ name="Herculean Trousers", augments={'Accuracy+22','Weapon skill damage +4%','DEX+9','Attack+7',}},
feet={ name="Herculean Boots", augments={'Accuracy+29','Weapon skill damage +5%','MND+3',}},
neck="Fotia Gorget",
waist="Caudata Belt",
left_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +25',}},
right_ear="Ishvara Earring",
left_ring="Ifrit Ring +1",
right_ring="Ifrit Ring +1",
back={ name="Camulus's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},
}
sets.precast.WS['Savage Blade'].Acc = set_combine(sets.precast.WS['Savage Blade'], {
})
sets.precast.WS['Requiescat'] = {
head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
hands="Meg. Gloves +1",
legs="Meg. Chausses +1",
feet={ name="Herculean Boots", augments={'Accuracy+29','Weapon skill damage +5%','MND+3',}},
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +25',}},
right_ear="Ishvara Earring",
left_ring="Ifrit Ring +1",
right_ring="Epona's Ring",
back={ name="Gunslinger's Cape", augments={'Enmity-3','"Mag.Atk.Bns."+4','"Phantom Roll" ability delay -1','Weapon skill damage +3%',}},
} --MND
sets.precast.WS['Requiescat'].Acc = set_combine(sets.precast.WS['Requiescat'], {
})
------------------------------------------------------------------------------------------------
---------------------------------------- Midcast Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.midcast.FastRecast = sets.precast.FC
sets.midcast.SpellInterrupt = {
legs="Carmine Cuisses +1", --20
ring1="Evanescence Ring", --5
}
sets.midcast.Cure = {
head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}},
body="Meg. Cuirie +1",
hands="Rawhide Gloves",
legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
feet="Meg. Jam. +1",
neck="Phalaina Locket",
waist="Chuq'aba Belt",
left_ear="Gwati Earring",
right_ear="Etiolation Earring",
left_ring="Levia. Ring",
right_ring="Kunaji Ring",
back="Solemnity Cape",
}
sets.midcast.Utsusemi = sets.midcast.SpellInterrupt
sets.midcast.CorsairShot = {
ammo=gear.QDbullet,
head="Lak. Hat +1",
body={ name="Samnuha Coat", augments={'Mag. Acc.+12','"Mag.Atk.Bns."+12','"Dual Wield"+3',}},
hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
legs={ name="Herculean Trousers", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Store TP"+5','INT+6','Mag. Acc.+15','"Mag.Atk.Bns."+10',}},
feet="Lak. Bottes +1",
neck="Sanctity Necklace",
waist="Eschan Stone",
left_ear="Friomisi Earring",
right_ear="Hecate's Earring",
left_ring="Shiva Ring +1",
right_ring="Shiva Ring +1",
back={ name="Gunslinger's Cape", augments={'Enmity-3','"Mag.Atk.Bns."+4','"Phantom Roll" ability delay -1','Weapon skill damage +3%',}},
}
sets.midcast.CorsairShot.STP = set_combine(sets.midcast.CorsairShot, {
neck="Ocachi Gorget",
waist="Yemaya Belt",
left_ear="Cessance Earring",
right_ear="Digni. Earring",
left_ring="Ilabrat Ring",
right_ring="Apate Ring",
back="Lupine Cape",
})
sets.midcast.CorsairShot.Resistant = set_combine(sets.midcast.CorsairShot, {
head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}},
feet={ name="Herculean Boots", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','STR+3','"Mag.Atk.Bns."+13',}},
left_ear="Gwati Earring",
right_ear="Digni. Earring",
left_ring="Perception Ring",
right_ring="Kishar Ring",
})
sets.midcast.CorsairShot['Light Shot'] = sets.midcast.CorsairShot.Resistant
sets.midcast.CorsairShot['Dark Shot'] = sets.midcast.CorsairShot.Resistant
sets.midcast.CorsairShot.Enhance = {body="Mirke Wardecors", feet="Chass. Bottes +1"}
-- Ranged gear
sets.midcast.RA = {
ammo=gear.RAbullet,
head="Meghanada Visor +1",
body="Meg. Cuirie +1",
hands="Meg. Gloves +1",
legs="Meg. Chausses +1",
feet={ name="Herculean Boots", augments={'Rng.Acc.+25 Rng.Atk.+25','Weapon skill damage +2%','AGI+2','Rng.Atk.+10',}},
neck="Marked Gorget",
waist="Kwahu Kachina Belt",
left_ear="Clearview Earring",
right_ear="Enervating Earring",
left_ring="Longshot Ring",
right_ring="Cacoethic Ring",
back={ name="Gunslinger's Cape", augments={'Enmity-3','"Mag.Atk.Bns."+4','"Phantom Roll" ability delay -1','Weapon skill damage +3%',}},
}
sets.midcast.RA.HighAcc = set_combine(sets.midcast.RA.Acc, {
hands={ name="Herculean Gloves", augments={'Rng.Acc.+24 Rng.Atk.+24','Weapon skill damage +2%','Rng.Acc.+14',}},
feet="Meg. Jam. +1",
})
sets.midcast.RA.STP = set_combine(sets.midcast.RA, {
hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
feet={ name="Herculean Boots", augments={'Rng.Acc.+25 Rng.Atk.+25','Weapon skill damage +2%','AGI+2','Rng.Atk.+10',}},
neck="Ocachi Gorget",
waist="Yemaya Belt",
left_ear="Volley Earring",
left_ring="Apate Ring",
right_ring="Ilabrat Ring",
back="Lupine Cape",
})
sets.TripleShot = {
head="Oshosi Mask", --4
body="Chasseur's Frac +1", --12
hands="Oshosi Gloves", -- 3
legs="Oshosi Trousers", --5
feet="Oshosi Leggings", --2
} --27
------------------------------------------------------------------------------------------------
----------------------------------------- Idle Sets --------------------------------------------
------------------------------------------------------------------------------------------------
sets.resting = {}
sets.idle = {
head="Meghanada Visor +1",
body="Meg. Cuirie +1",
hands="Meg. Gloves +1",
legs="Meg. Chausses +1",
feet={ name="Herculean Boots", augments={'Accuracy+13 Attack+13','Damage taken-1%','Attack+7',}},
neck="Sanctity Necklace",
waist="Flume Belt",
left_ear="Ethereal Earring",
right_ear="Etiolation Earring",
left_ring={ name="Dark Ring", augments={'Magic dmg. taken -3%','Phys. dmg. taken -6%',}},
right_ring="Defending Ring",
back="Solemnity Cape",
}
sets.idle.DT = set_combine(sets.idle, {
head="Meghanada Visor +1",
body="Meg. Cuirie +1",
hands="Meg. Gloves +1",
legs="Meg. Chausses +1",
feet={ name="Herculean Boots", augments={'Accuracy+13 Attack+13','Damage taken-1%','Attack+7',}},
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear="Ethereal Earring",
right_ear="Etiolation Earring",
left_ring={ name="Dark Ring", augments={'Magic dmg. taken -3%','Phys. dmg. taken -6%',}},
right_ring="Defending Ring",
back="Solemnity Cape",
})
sets.idle.Refresh = set_combine(sets.idle, {
legs="Rawhide Trousers",
})
------------------------------------------------------------------------------------------------
---------------------------------------- Defense Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.defense.PDT = sets.idle.DT
sets.defense.MDT = sets.idle.DT
sets.Kiting = {legs="Carmine Cuisses +1"}
------------------------------------------------------------------------------------------------
---------------------------------------- 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
sets.engaged = {
head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
body={ name="Adhemar Jacket +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
legs={ name="Herculean Trousers", augments={'Accuracy+25','"Triple Atk."+3','DEX+4',}},
feet={ name="Herculean Boots", augments={'Accuracy+28','"Triple Atk."+3','DEX+1',}},
neck="Clotharius Torque",
waist="Windbuffet Belt +1",
left_ear="Cessance Earring",
right_ear="Brutal Earring",
left_ring="Oneiros Ring",
right_ring="Epona's Ring",
back="Lupine Cape",
}
sets.engaged.HighAcc = set_combine(sets.engaged.MidAcc, {
head={ name="Dampening Tam", augments={'DEX+10','Accuracy+15','Mag. Acc.+15','Quadruple Attack +3',}},
legs="Meg. Chausses +1",
feet="Meg. Jam. +1",
neck="Iqabi Necklace",
waist="Kentarch Belt +1",
left_ear="Mache Earring",
right_ear="Mache Earring",
left_ring="Ramuh Ring +1",
right_ring="Cacoethic Ring",
})
sets.engaged.STP = set_combine(sets.engaged, {
feet="Carmine Greaves +1",
ring1="Chirich Ring",
})
------------------------------------------------------------------------------------------------
---------------------------------------- Hybrid Sets -------------------------------------------
------------------------------------------------------------------------------------------------
sets.engaged.Hybrid = {
neck="Loricate Torque +1", --6/6
ring2="Defending Ring", --10/10
}
------------------------------------------------------------------------------------------------
---------------------------------------- Special Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.buff.Doom = {ring1="Eshmun's Ring", ring2="Eshmun's Ring", waist="Gishdubar Sash"}
sets.Obi = {waist="Hachirin-no-Obi"}
sets.CP = {back="Aptitude Mantle +1"}
sets.Reive = {neck="Ygnas's Resolve +1"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
-- Check that proper ammo is available if we're using ranged attacks or similar.
if spell.action_type == 'Ranged Attack' or spell.type == 'WeaponSkill' or spell.type == 'CorsairShot' then
do_bullet_checks(spell, spellMap, eventArgs)
end
-- Gear
if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") then
if player.status ~= 'Engaged' then
equip(sets.precast.CorsairRoll.Gun)
end
if state.LuzafRing.value then
equip(sets.precast.LuzafRing)
end
elseif spell.type == 'CorsairShot' and state.CastingMode.value == 'Resistant' then
classes.CustomClass = 'Acc'
end
if spell.english == 'Fold' and buffactive['Bust'] == 2 then
if sets.precast.FoldDoubleBust then
equip(sets.precast.FoldDoubleBust)
eventArgs.handled = true
end
end
if spellMap == 'Utsusemi' then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
cancel_spell()
add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
eventArgs.handled = true
return
elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
end
end
end
function job_post_precast(spell, action, spellMap, eventArgs)
if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") then
if player.status ~= 'Engaged' then
equip(sets.precast.CorsairRoll.Gun)
end
elseif spell.action_type == 'Ranged Attack' then
if flurry == 2 then
equip(sets.precast.RA.Flurry2)
elseif flurry == 1 then
equip(sets.precast.RA.Flurry1)
end
-- Equip obi if weather/day matches for WS.
elseif spell.type == 'WeaponSkill' then
if spell.english == 'Leaden Salute' then
if world.weather_element == 'Dark' or world.day_element == 'Dark' then
equip(sets.Obi)
end
if player.tp > 2900 then
equip(sets.precast.WS['Leaden Salute'].FullTP)
end
elseif spell.english == 'Wildfire' and (world.weather_element == 'Fire' or world.day_element == 'Fire') then
equip(sets.Obi)
end
end
end
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Equip obi if weather/day matches for Quick Draw.
if spell.type == 'CorsairShot' then
if (spell.element == world.day_element or spell.element == world.weather_element) and
(spell.english ~= 'Light Shot' and spell.english ~= 'Dark Shot') then
equip(sets.Obi)
end
if state.QDMode.value == 'Magic Enhance' then
equip(sets.midcast.CorsairShot.Enhance)
elseif state.QDMode.value == 'STP' then
equip(sets.midcast.CorsairShot.STP)
end
elseif spell.action_type == 'Ranged Attack' and buffactive['Triple Shot'] then
equip(sets.TripleShot)
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 spell.type == 'CorsairRoll' and not spell.interrupted then
display_roll_info(spell)
end
if spell.english == "Light Shot" then
send_command('@timers c "Light Shot ['..spell.target.name..']" 60 down abilities/00195.png')
end
end
function job_buff_change(buff,gain)
-- If we gain or lose any haste buffs, adjust gear.
if S{'haste', 'march', 'mighty guard', 'embrava', 'haste samba', 'geo-haste', 'indi-haste'}:contains(buff:lower()) then
determine_haste_group()
customize_melee_set()
if not gain then
haste = nil
--add_to_chat(122, "Haste Status: Cleared")
end
if not midaction() then
handle_equipping_gear(player.status)
end
end
-- If we gain or lose any flurry buffs, adjust gear.
if S{'flurry'}:contains(buff:lower()) then
if not gain then
flurry = nil
--add_to_chat(122, "Flurry status cleared.")
end
if not midaction() then
handle_equipping_gear(player.status)
end
end
-- if buffactive['Reive Mark'] then
-- if gain then
-- equip(sets.Reive)
-- disable('neck')
-- else
-- enable('neck')
-- end
-- end
if buff == "doom" then
if gain then
equip(sets.buff.Doom)
send_command('@input /p Doomed.')
disable('ring1','ring2','waist')
else
enable('ring1','ring2','waist')
handle_equipping_gear(player.status)
end
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if state.WeaponLock.value == true then
disable('ranged')
else
enable('ranged')
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)
update_offense_mode()
determine_haste_group()
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if state.CP.current == 'on' then
equip(sets.CP)
disable('back')
else
enable('back')
end
return idleSet
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if state.DualWield.value == true and player.sub_job == 'NIN' then
meleeSet = set_combine(meleeSet, sets.LessDualWield)
end
return meleeSet
end
-- Handle auto-targetting based on local setup.
function job_auto_change_target(spell, action, spellMap, eventArgs)
if spell.type == 'CorsairShot' then
if state.IgnoreTargetting.value == true then
state.IgnoreTargetting:reset()
eventArgs.handled = true
end
eventArgs.SelectNPCTargets = state.SelectqdTarget.value
end
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
local msg = ''
msg = msg .. '[ Offense/Ranged: '..state.OffenseMode.current
if state.HybridMode.value ~= 'Normal' then
msg = msg .. '/' .. state.HybridMode.value
end
msg = msg .. '/' ..state.RangedMode.current .. ' ]'
if state.WeaponskillMode.value ~= 'Normal' then
msg = msg .. '[ WS: '..state.WeaponskillMode.current .. ' ]'
end
if state.DefenseMode.value ~= 'None' then
msg = msg .. '[ Defense: ' .. state.DefenseMode.value .. state[state.DefenseMode.value .. 'DefenseMode'].value .. ' ]'
end
if state.Kiting.value then
msg = msg .. '[ Kiting Mode: ON ]'
end
msg = msg .. '[ *'..state.Mainqd.current
if state.UseAltqd.value == true then
msg = msg .. '/'..state.Altqd.current
end
msg = msg .. ' ('
if state.QDMode.value then
msg = msg .. state.QDMode.current .. ') '
end
msg = msg .. ']'
add_to_chat(060, msg)
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- User self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for custom player commands.
function job_self_command(cmdParams, eventArgs)
if cmdParams[1] == 'qd' then
if cmdParams[2] == 't' then
state.IgnoreTargetting:set()
end
local doqd = ''
if state.UseAltqd.value == true then
doqd = state[state.Currentqd.current..'qd'].current
state.Currentqd:cycle()
else
doqd = state.Mainqd.current
end
send_command('@input /ja "'..doqd..'" <t>')
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
--Read incoming packet to differentiate between Haste/Flurry I and II
windower.register_event('action',
function(act)
--check if you are a target of spell
local actionTargets = act.targets
playerId = windower.ffxi.get_player().id
isTarget = false
for _, target in ipairs(actionTargets) do
if playerId == target.id then
isTarget = true
end
end
if isTarget == true then
if act.category == 4 then
local param = act.param
if param == 845 and flurry ~= 2 then
--add_to_chat(122, 'Flurry Status: Flurry I')
flurry = 1
elseif param == 846 then
--add_to_chat(122, 'Flurry Status: Flurry II')
flurry = 2
elseif param == 57 and haste ~=2 then
--add_to_chat(122, 'Haste Status: Haste I (Haste)')
haste = 1
elseif param == 511 then
--add_to_chat(122, 'Haste Status: Haste II (Haste II)')
haste = 2
end
elseif act.category == 5 then
if act.param == 5389 then
--add_to_chat(122, 'Haste Status: Haste II (Spy Drink)')
haste = 2
end
elseif act.category == 13 then
local param = act.param
--595 haste 1 -602 hastega 2
if param == 595 and haste ~=2 then
--add_to_chat(122, 'Haste Status: Haste I (Hastega)')
haste = 1
elseif param == 602 then
--add_to_chat(122, 'Haste Status: Haste II (Hastega2)')
haste = 2
end
end
end
end)
function determine_haste_group()
-- Assuming the following values:
-- Haste - 15%
-- Haste II - 30%
-- Haste Samba - 5%
-- Honor March - 15%
-- Victory March - 25%
-- Advancing March - 15%
-- Embrava - 25%
-- Mighty Guard (buffactive[604]) - 15%
-- Geo-Haste (buffactive[580]) - 30%
classes.CustomMeleeGroups:clear()
if state.CombatForm.value == 'DW' then
if (haste == 2 and (buffactive[580] or buffactive.march or buffactive.embrava or buffactive[604])) or
(haste == 1 and (buffactive[580] or buffactive.march == 2 or (buffactive.embrava and buffactive['haste samba']) or (buffactive.march and buffactive[604]))) or
(buffactive[580] and (buffactive.march or buffactive.embrava or buffactive[604])) or
(buffactive.march == 2 and (buffactive.embrava or buffactive[604])) or
(buffactive.march and (buffactive.embrava and buffactive['haste samba'])) then
--add_to_chat(122, 'Magic Haste Level: 43%')
classes.CustomMeleeGroups:append('MaxHaste')
state.DualWield:set()
elseif ((haste == 2 or buffactive[580] or buffactive.march == 2) and buffactive['haste samba']) or
(haste == 1 and buffactive['haste samba'] and (buffactive.march or buffactive[604])) or
(buffactive.march and buffactive['haste samba'] and buffactive[604]) then
--add_to_chat(122, 'Magic Haste Level: 35%')
classes.CustomMeleeGroups:append('HighHaste')
state.DualWield:set()
elseif (haste == 2 or buffactive[580] or buffactive.march == 2 or (buffactive.embrava and buffactive['haste samba']) or
(haste == 1 and (buffactive.march or buffactive[604])) or (buffactive.march and buffactive[604])) then
--add_to_chat(122, 'Magic Haste Level: 30%')
classes.CustomMeleeGroups:append('MidHaste')
state.DualWield:set()
elseif (haste == 1 or buffactive.march or buffactive[604] or buffactive.embrava) then
--add_to_chat(122, 'Magic Haste Level: 15%')
classes.CustomMeleeGroups:append('LowHaste')
state.DualWield:set()
else
state.DualWield:set(false)
end
end
end
function define_roll_values()
rolls = {
["Corsair's Roll"] = {lucky=5, unlucky=9, bonus="Experience Points"},
["Ninja Roll"] = {lucky=4, unlucky=8, bonus="Evasion"},
["Hunter's Roll"] = {lucky=4, unlucky=8, bonus="Accuracy"},
["Chaos Roll"] = {lucky=4, unlucky=8, bonus="Attack"},
["Magus's Roll"] = {lucky=2, unlucky=6, bonus="Magic Defense"},
["Healer's Roll"] = {lucky=3, unlucky=7, bonus="Cure Potency Received"},
["Drachen Roll"] = {lucky=4, unlucky=8, bonus="Pet Magic Accuracy/Attack"},
["Choral Roll"] = {lucky=2, unlucky=6, bonus="Spell Interruption Rate"},
["Monk's Roll"] = {lucky=3, unlucky=7, bonus="Subtle Blow"},
["Beast Roll"] = {lucky=4, unlucky=8, bonus="Pet Attack"},
["Samurai Roll"] = {lucky=2, unlucky=6, bonus="Store TP"},
["Evoker's Roll"] = {lucky=5, unlucky=9, bonus="Refresh"},
["Rogue's Roll"] = {lucky=5, unlucky=9, bonus="Critical Hit Rate"},
["Warlock's Roll"] = {lucky=4, unlucky=8, bonus="Magic Accuracy"},
["Fighter's Roll"] = {lucky=5, unlucky=9, bonus="Double Attack Rate"},
["Puppet Roll"] = {lucky=3, unlucky=7, bonus="Pet Magic Attack/Accuracy"},
["Gallant's Roll"] = {lucky=3, unlucky=7, bonus="Defense"},
["Wizard's Roll"] = {lucky=5, unlucky=9, bonus="Magic Attack"},
["Dancer's Roll"] = {lucky=3, unlucky=7, bonus="Regen"},
["Scholar's Roll"] = {lucky=2, unlucky=6, bonus="Conserve MP"},
["Naturalist's Roll"] = {lucky=3, unlucky=7, bonus="Enh. Magic Duration"},
["Runeist's Roll"] = {lucky=4, unlucky=8, bonus="Magic Evasion"},
["Bolter's Roll"] = {lucky=3, unlucky=9, bonus="Movement Speed"},
["Caster's Roll"] = {lucky=2, unlucky=7, bonus="Fast Cast"},
["Courser's Roll"] = {lucky=3, unlucky=9, bonus="Snapshot"},
["Blitzer's Roll"] = {lucky=4, unlucky=9, bonus="Attack Delay"},
["Tactician's Roll"] = {lucky=5, unlucky=8, bonus="Regain"},
["Allies' Roll"] = {lucky=3, unlucky=10, bonus="Skillchain Damage"},
["Miser's Roll"] = {lucky=5, unlucky=7, bonus="Save TP"},
["Companion's Roll"] = {lucky=2, unlucky=10, bonus="Pet Regain and Regen"},
["Avenger's Roll"] = {lucky=4, unlucky=8, bonus="Counter Rate"},
}
end
function display_roll_info(spell)
rollinfo = rolls[spell.english]
local rollsize = (state.LuzafRing.value and 'Large') or 'Small'
if rollinfo then
add_to_chat(104, '[ Lucky: '..tostring(rollinfo.lucky)..' / Unlucky: '..tostring(rollinfo.unlucky)..' ] '..spell.english..': '..rollinfo.bonus..' ('..rollsize..') ')
end
end
-- Determine whether we have sufficient ammo for the action being attempted.
function do_bullet_checks(spell, spellMap, eventArgs)
local bullet_name
local bullet_min_count = 1
if spell.type == 'WeaponSkill' then
if spell.skill == "Marksmanship" then
if spell.english == 'Wildfire' or spell.english == 'Leaden Salute' then
-- magical weaponskills
bullet_name = gear.MAbullet
else
-- physical weaponskills
bullet_name = gear.WSbullet
end
else
-- Ignore non-ranged weaponskills
return
end
elseif spell.type == 'CorsairShot' then
bullet_name = gear.QDbullet
elseif spell.action_type == 'Ranged Attack' then
bullet_name = gear.RAbullet
if buffactive['Triple Shot'] then
bullet_min_count = 3
end
end
local available_bullets = player.inventory[bullet_name] or player.wardrobe[bullet_name]
-- If no ammo is available, give appropriate warning and end.
if not available_bullets then
if spell.type == 'CorsairShot' and player.equipment.ammo ~= 'empty' then
add_to_chat(104, 'No Quick Draw ammo left. Using what\'s currently equipped ('..player.equipment.ammo..').')
return
elseif spell.type == 'WeaponSkill' and player.equipment.ammo == gear.RAbullet then
add_to_chat(104, 'No weaponskill ammo left. Using what\'s currently equipped (standard ranged bullets: '..player.equipment.ammo..').')
return
else
add_to_chat(104, 'No ammo ('..tostring(bullet_name)..') available for that action.')
eventArgs.cancel = true
return
end
end
-- Don't allow shooting or weaponskilling with ammo reserved for quick draw.
if spell.type ~= 'CorsairShot' and bullet_name == gear.QDbullet and available_bullets.count <= bullet_min_count then
add_to_chat(104, 'No ammo will be left for Quick Draw. Cancelling.')
eventArgs.cancel = true
return
end
-- Low ammo warning.
if spell.type ~= 'CorsairShot' and state.warned.value == false
and available_bullets.count > 1 and available_bullets.count <= options.ammo_warning_limit then
local msg = '***** LOW AMMO WARNING: '..bullet_name..' *****'
--local border = string.repeat("*", #msg)
local border = ""
for i = 1, #msg do
border = border .. "*"
end
add_to_chat(104, border)
add_to_chat(104, msg)
add_to_chat(104, border)
state.warned:set()
elseif available_bullets.count > options.ammo_warning_limit and state.warned then
state.warned:reset()
end
end
function update_offense_mode()
if player.sub_job == 'NIN' or player.sub_job == 'DNC' then
state.CombatForm:set('DW')
else
state.CombatForm:reset()
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
if player.sub_job == 'DNC' then
set_macro_page(1, 4)
else
set_macro_page(1, 4)
end
end
function set_lockstyle()
send_command('wait 2; input /lockstyleset ' .. lockstyleset)
end
There seems to be other issues too with it, like how the weapon cycle didn't work even though I changed the rule set to the guns I had available, so I just removed that part entirely. I just manually equip which weapon I want at the time now.
Lakshmi.Avereith
サーバ: Lakshmi
Game: FFXI
Posts: 1218
By Lakshmi.Avereith 2018-05-15 10:18:46
any tips for someone who has never used gearswap, has no programming experience, and wants to start using it finally because I've got enough gearsets for it to actually matter?
don't know where to start or what to do
サーバ: Asura
Game: FFXI
Posts: 88
By Asura.Selindrile 2018-05-15 16:02:09
@zyla what immediately jumps out to me is you have post_precast overwriting your job_precast, first job_precast equips:
Code function job_precast(spell, action, spellMap, eventArgs)
-- Check that proper ammo is available if we're using ranged attacks or similar.
if spell.action_type == 'Ranged Attack' or spell.type == 'WeaponSkill' or spell.type == 'CorsairShot' then
do_bullet_checks(spell, spellMap, eventArgs)
end
-- Gear
if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") then
if player.status ~= 'Engaged' then
equip(sets.precast.CorsairRoll.Gun)
end
if state.LuzafRing.value then
equip(sets.precast.LuzafRing)
end
Then your post_precast does:
Code function job_post_precast(spell, action, spellMap, eventArgs)
if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") then
if player.status ~= 'Engaged' then
equip(sets.precast.CorsairRoll.Gun)
end
And the post precast doesn't care about the Luzaf's ring, can add the ring logic there too, but in all it feels pretty sloppy, and it should only actually fail to work if you're engaged, though if you're open to the idea of a new lua, you may wanna check mine out, also mote-style but a lot of bells and whistles and the weapon sets work. ^^
@Averith Also happy to help you set things up for the first time, will link my Discord, from there, the github links in the github channel are the best way to keep up to date with my updates, and Discord is the best way to contact me (Kalesandrancor), I like having tons of people using my swaps, helps me find bugs and gather ideas to improve things.
https://discord.gg/ug6xtvQ
By Zyla 2018-05-15 20:23:13
@Selindrile yea I'm open to trying a new lua, I can always just add in the extra keybinds I like, and plug in my gear where applicable. Could you post a link to them please? I mainly play blm, blu, cor, geo, and soon run, thf, and sam
edit: nvm, just saw the link in your post, reading everything helps...
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.
|
|