|
Gearswap Support Thread
By MarrocAdalwulf 2015-02-06 17:12:00
So, I'm still trying to figure out what's wrong with my gearsets in my BRD lua files. I tried using Conagh's file, but it confused the hell out of me, and would force me to completely rework how I play BRD from the ground up. I'd rather not do that if I can help it. If someone could look over the coding for it, it's right here for the initial code, while I have a sidecar file with my gearsets here.
I'll admit, I'm not that great at working with this code, as I don't fully understand it yet. Most coding I've done would be HTML coding for websites, and very slight work on simple gaming designs, all several years ago, so I know I'm rusty at best. Any help would be much appreciated. If you're using a sidecar for your gearsets then you have to include the function user_setup() in your sidecar. That's what's missing. Also, function user_setup() should be the exact copy as in your main lua.
Your sidecar should look like this: Code
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('None', 'Normal')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT')
brd_daggers = S{'Izhiikoh', 'Vanir Knife', 'Atoyac', 'Aphotic Kukri', 'Sabebus'}
pick_tp_weapon()
-- Adjust this if using the Terpander (new +song instrument)
info.ExtraSongInstrument = 'Daurdabla'
-- How many extra songs we can keep from Daurdabla/Terpander
info.ExtraSongs = 2
-- Set this to false if you don't want to use custom timers.
state.UseCustomTimers = M(true, 'Use Custom Timers')
-- Additional local binds
send_command('bind ^` gs c cycle ExtraSongsMode')
send_command('bind !` input /ma "Chocobo Mazurka" <me>')
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
-- gear here
-- more gear
end Tried inputting the function user_setup() in my sidecar file, and it's still completely ignoring my debuff set while equipping my BardSong set. The really weird part is, it's putting my earrings and rings on from the debuff set, but all the other gear is from BardSong.
By MarrocAdalwulf 2015-02-06 17:14:29
Hello everyone,
i'm using Motenten's BRD lua and when i use showswaps, it seems like it isn't putting the grip in the sub slot at the midcast section (As aftercast tho). Precast is Dagger, then switching to staff and grip. Maybe it's too fast and can't put sub in in time? Any way around this?
Thx for ur help Looks like we're having the exact same problem here.
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-02-06 21:35:30
Stupid question... Are you sure you don't have an /equip line in your macro? I have to ask because you'd be surprised how many people do and then spend hours and days looking for a bug in GS.
I'm no Brd so I can't try out Kinematic's lua's to see if there's a bug in there somewhere, which is possible but unlikely. There does seem to be an issue with Kinematic's BRD as mentioned on other forums. But for the most part, those turned out to an error on the user part.
All I can suggest is to backup your luas and start with a fresh copy to see if that works properly. Make sure you rename both the main file AND the sidecar. If it does work then the bug is at your end and you'll have to rework Kinematic's again.
It would help tremendously if you could post your entire lua and not just your gear. That way we could pinpoint where the culprit is.
My gut feeling is it's some error you've overlooked that's small yet big enough to make you SMH.
By MarrocAdalwulf 2015-02-06 21:43:37
Stupid question. Are you sure you don't have an /equip line in your macro? I had to ask because you'd be surprised how many people do and then spend hours and days looking for a bug in GS.
I'm no Brd so I can't try out Kinematic's lua's to see if there's a bug in there somewhere, which is possible but unlikely. There does seem to be an issue with Kinematic's BRD as mentioned on other forums. But for the most part, those turned out to an error on the user part.
All I can suggest is to backup your luas and start with a fresh copy to see if that works properly. Make sure you rename both the main file AND the sidecar. If it does work then the bug is at your end and you'll have to rework Kinematic's again.
It would help tremendously if you could post your entire lua and not just your gear. That way we could pinpoint where the culprit is.
My gut feeling is it's some error you've overlooked that's small yet big enough to make you SMH. Just double checked my macros, and the only ones that are messing up don't have any of the /equip lines in there. It's just a simple /ma "" <t> macro. Basic lua here and gearsets lua here. I'll also try using the original lua without any modifications, short of gear, and see if that fixes the problem.
By MarrocAdalwulf 2015-02-06 22:16:23
Stupid question... Are you sure you don't have an /equip line in your macro? I have to ask because you'd be surprised how many people do and then spend hours and days looking for a bug in GS.
I'm no Brd so I can't try out Kinematic's lua's to see if there's a bug in there somewhere, which is possible but unlikely. There does seem to be an issue with Kinematic's BRD as mentioned on other forums. But for the most part, those turned out to an error on the user part.
All I can suggest is to backup your luas and start with a fresh copy to see if that works properly. Make sure you rename both the main file AND the sidecar. If it does work then the bug is at your end and you'll have to rework Kinematic's again.
It would help tremendously if you could post your entire lua and not just your gear. That way we could pinpoint where the culprit is.
My gut feeling is it's some error you've overlooked that's small yet big enough to make you SMH. I just figured it out! I was going through, adding in all my gear to the fresh copy, and I noticed that the midcast set wasn't called BardSong, just the precast set. The midcast set was called SongEffect. So, I switched the names, and it works just fine now. Thank you for your help! <3
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-02-06 22:48:46
Hello everyone,
i'm using Motenten's BRD lua and when i use showswaps, it seems like it isn't putting the grip in the sub slot at the midcast section (As aftercast tho). Precast is Dagger, then switching to staff and grip. Maybe it's too fast and can't put sub in in time? Any way around this?
Thx for ur help Looks like we're having the exact same problem here. This is just a shot in the dark but try doing this (I removed gear just to emphasize main, sub, range and ammo slots). It's something I would try.
If you do have a shield then replace sub=empty with sub="Genbu's Shield" or whatever shield. Otherwise use sub=empty. Code
sets.precast.FC = {main="Lehbrailg +2", sub="Vivid Strap", range=empty, ammo="Impatiens"}
sets.precast.FC.BardSong = {main="Felibre's Dague", sub="Genbu's Shield", range="Linos", ammo=empty}
sets.midcast.SongEffect = {main="Legato Dagger", sub=empty, range="Gjallarhorn", ammo=empty}
sets.midcast.SongDebuff = {main="Lehbrailg +2", sub="Mephitis Grip", range="Gjallarhorn", ammo=empty}
sets.midcast.ResistantSongDebuff = {main="Lehbrailg +2", sub="Mephitis Grip", range="Gjallarhorn", ammo=empty}
sets.midcast.DaurdablaDummy = {main="Izhiikoh", sub=empty, range=info.ExtraSongInstrument, ammo=empty}
sets.idle = {main="Terra's Staff", sub="Mephitis Grip", range="Oneiros Harp", ammo=empty}
sets.idle.Town = {main="Terra's Staff", sub="Mephitis Grip", range="Oneiros Harp", ammo=empty}
Serveur: Odin
Game: FFXI
Posts: 33
By Odin.Myhnegon 2015-02-06 23:30:28
This is just a shot in the dark but try doing this (I removed gear just to emphasize main, sub, range and ammo slots). It's something I would try.
If you do have a shield then replace sub=empty with sub="Genbu's Shield" or whatever shield. Otherwise use sub=empty. Code
sets.precast.FC = {main="Lehbrailg +2", sub="Vivid Strap", range=empty, ammo="Impatiens"}
sets.precast.FC.BardSong = {main="Felibre's Dague", sub="Genbu's Shield", range="Linos", ammo=empty}
sets.midcast.SongEffect = {main="Legato Dagger", sub=empty, range="Gjallarhorn", ammo=empty}
sets.midcast.SongDebuff = {main="Lehbrailg +2", sub="Mephitis Grip", range="Gjallarhorn", ammo=empty}
sets.midcast.ResistantSongDebuff = {main="Lehbrailg +2", sub="Mephitis Grip", range="Gjallarhorn", ammo=empty}
sets.midcast.DaurdablaDummy = {main="Izhiikoh", sub=empty, range=info.ExtraSongInstrument, ammo=empty}
sets.idle = {main="Terra's Staff", sub="Mephitis Grip", range="Oneiros Harp", ammo=empty}
sets.idle.Town = {main="Terra's Staff", sub="Mephitis Grip", range="Oneiros Harp", ammo=empty} Tyvm Quixacotl, that sub=empty and ammo=empty did the trick for me.
but i have another question
Motenten placed song enhancing gear extra Code
-- Gear to enhance certain classes of songs. No instruments added here since Gjallarhorn is being used.
sets.midcast.Ballad = {legs="Aoidos' Rhing. +2"}
sets.midcast.Lullaby = {hands="Brioso Cuffs"}
sets.midcast.Madrigal = {head="Aoidos' Calot +2"}
sets.midcast.March = {hands="Aoidos' Manchettes +2"}
sets.midcast.Minuet = {body="Aoidos' Hongreline +2"}
sets.midcast.Minne = {}
sets.midcast.Paeon = {head="Brioso Roundlet"}
sets.midcast.Carol = {head="Aoidos' Calot +2",
body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",
legs="Aoidos' Rhing. +2",feet="Aoidos' Cothrn. +2"}
sets.midcast["Sentinel's Scherzo"] = {feet="Aoidos' Cothrn. +2"}
sets.midcast['Magic Finale'] = {neck="Piper's Torque",waist="Aoidos' Belt",legs="Aoidos' Rhing. +2"}
And for the mentioned songs, it replaces the items in the buff or debuff set. Is there a way to turn that off by command, so it would use the full buff/debuff set?
It's mainly about Lullaby, the Brioso Cuffs add sleep duration, but on resisting stuff I'd like to use hands from the debuff set.
I hope u get what I mean.
Thx again
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-02-07 02:17:38
Tyvm Quixacotl, that sub=empty and ammo=empty did the trick for me. I'm glad it worked out for you. The idea occurred to me when I remembered the code for Twilight Cloak or Respite Cloak. Since you can't equip headgear for cloaks then you need a placeholder at precast and midcast or it won't equip (in this case, head=empty). Same idea goes for main/grips and range/ammo.
but i have another question
Motenten placed song enhancing gear extra Code
-- Gear to enhance certain classes of songs. No instruments added here since Gjallarhorn is being used.
sets.midcast.Ballad = {legs="Aoidos' Rhing. +2"}
sets.midcast.Lullaby = {hands="Brioso Cuffs"}
sets.midcast.Madrigal = {head="Aoidos' Calot +2"}
sets.midcast.March = {hands="Aoidos' Manchettes +2"}
sets.midcast.Minuet = {body="Aoidos' Hongreline +2"}
sets.midcast.Minne = {}
sets.midcast.Paeon = {head="Brioso Roundlet"}
sets.midcast.Carol = {head="Aoidos' Calot +2",
body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",
legs="Aoidos' Rhing. +2",feet="Aoidos' Cothrn. +2"}
sets.midcast["Sentinel's Scherzo"] = {feet="Aoidos' Cothrn. +2"}
sets.midcast['Magic Finale'] = {neck="Piper's Torque",waist="Aoidos' Belt",legs="Aoidos' Rhing. +2"}
And for the mentioned songs, it replaces the items in the buff or debuff set. Is there a way to turn that off by command, so it would use the full buff/debuff set?
It's mainly about Lullaby, the Brioso Cuffs add sleep duration, but on resisting stuff I'd like to use hands from the debuff set.
I hope u get what I mean.
Thx again You already have the command built-in. It's 'gs c cycle CastingMode' (/console gs c cycle CastingMode for macros or ctrl-F11). This command cycles between CastingMode:Normal and CastingMode:Resistant.
When you are in CastingMode:Normal you use Brioso Cuffs for lullaby. But when you're in CastingMode:Resistant then you switch to Aoidos' Manchettes +2 along with the other gear in sets.midcast.ResistantSongDebuff.
Forget which mode you're in? Just hit F12 to display your current status and modes.
CastingMode:Normal is set as default but you can always set CastingMode:Resistant as default by switching the two options like this: Code
state.CastingMode:options('Resistant', 'Normal')
Here are the applicable codes to give you a better picture how it works. Code
state.CastingMode:options('Normal', 'Resistant')
-- For song defbuffs (duration primary, accuracy secondary)
sets.midcast.SongDebuff = {main="Lehbrailg +2",sub="Mephitis Grip",range="Gjallarhorn",
head="Brioso Roundlet +1",neck="Aoidos' Matinee",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",ring2="Sangoma Ring",
back="Kumbira Cape",waist="Goading Belt",legs="Marduk's Shalwar +1",feet="Brioso Slippers +1"}
-- For song defbuffs (accuracy primary, duration secondary)
sets.midcast.ResistantSongDebuff = {main="Lehbrailg +2",sub="Mephitis Grip",range="Gjallarhorn",
head="Brioso Roundlet +1",neck="Wind Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Brioso Justaucorps +1",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",ring2="Sangoma Ring",
back="Kumbira Cape",waist="Demonry Sash",legs="Brioso Cannions +1",feet="Bokwus Boots"}
-- Determine the custom class to use for the given song.
function get_song_class(spell)
-- Can't use spell.targets:contains() because this is being pulled from resources
if set.contains(spell.targets, 'Enemy') then
if state.CastingMode.value == 'Resistant' then
return 'ResistantSongDebuff'
else
return 'SongDebuff'
end
elseif state.ExtraSongsMode.value == 'Dummy' then
return 'DaurdablaDummy'
else
return 'SongEffect'
end
end
Serveur: Odin
Game: FFXI
Posts: 33
By Odin.Myhnegon 2015-02-07 05:37:05
Tyvm Quixacotl, that sub=empty and ammo=empty did the trick for me. I'm glad it worked out for you. The idea occurred to me when I remembered the code for Twilight Cloak or Respite Cloak. Since you can't equip headgear for cloaks then you need a placeholder at precast and midcast or it won't equip (in this case, head=empty). Same idea goes for main/grips and range/ammo.
but i have another question
Motenten placed song enhancing gear extra Code
-- Gear to enhance certain classes of songs. No instruments added here since Gjallarhorn is being used.
sets.midcast.Ballad = {legs="Aoidos' Rhing. +2"}
sets.midcast.Lullaby = {hands="Brioso Cuffs"}
sets.midcast.Madrigal = {head="Aoidos' Calot +2"}
sets.midcast.March = {hands="Aoidos' Manchettes +2"}
sets.midcast.Minuet = {body="Aoidos' Hongreline +2"}
sets.midcast.Minne = {}
sets.midcast.Paeon = {head="Brioso Roundlet"}
sets.midcast.Carol = {head="Aoidos' Calot +2",
body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",
legs="Aoidos' Rhing. +2",feet="Aoidos' Cothrn. +2"}
sets.midcast["Sentinel's Scherzo"] = {feet="Aoidos' Cothrn. +2"}
sets.midcast['Magic Finale'] = {neck="Piper's Torque",waist="Aoidos' Belt",legs="Aoidos' Rhing. +2"}
And for the mentioned songs, it replaces the items in the buff or debuff set. Is there a way to turn that off by command, so it would use the full buff/debuff set?
It's mainly about Lullaby, the Brioso Cuffs add sleep duration, but on resisting stuff I'd like to use hands from the debuff set.
I hope u get what I mean.
Thx again You already have the command built-in. It's 'gs c cycle CastingMode' (/console gs c cycle CastingMode for macros or ctrl-F11). This command cycles between CastingMode:Normal and CastingMode:Resistant.
When you are in CastingMode:Normal you use Brioso Cuffs for lullaby. But when you're in CastingMode:Resistant then you switch to Aoidos' Manchettes +2 along with the other gear in sets.midcast.ResistantSongDebuff.
Forget which mode you're in? Just hit F12 to display your current status and modes.
CastingMode:Normal is set as default but you can always set CastingMode:Resistant as default by switching the two options like this: Code
state.CastingMode:options('Resistant', 'Normal')
Here are the applicable codes to give you a better picture how it works. Code
state.CastingMode:options('Normal', 'Resistant')
-- For song defbuffs (duration primary, accuracy secondary)
sets.midcast.SongDebuff = {main="Lehbrailg +2",sub="Mephitis Grip",range="Gjallarhorn",
head="Brioso Roundlet +1",neck="Aoidos' Matinee",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",ring2="Sangoma Ring",
back="Kumbira Cape",waist="Goading Belt",legs="Marduk's Shalwar +1",feet="Brioso Slippers +1"}
-- For song defbuffs (accuracy primary, duration secondary)
sets.midcast.ResistantSongDebuff = {main="Lehbrailg +2",sub="Mephitis Grip",range="Gjallarhorn",
head="Brioso Roundlet +1",neck="Wind Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Brioso Justaucorps +1",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",ring2="Sangoma Ring",
back="Kumbira Cape",waist="Demonry Sash",legs="Brioso Cannions +1",feet="Bokwus Boots"}
-- Determine the custom class to use for the given song.
function get_song_class(spell)
-- Can't use spell.targets:contains() because this is being pulled from resources
if set.contains(spell.targets, 'Enemy') then
if state.CastingMode.value == 'Resistant' then
return 'ResistantSongDebuff'
else
return 'SongDebuff'
end
elseif state.ExtraSongsMode.value == 'Dummy' then
return 'DaurdablaDummy'
else
return 'SongEffect'
end
end
Thx again for ur support
Yes, i know of the ctrl+F11 function and i just double checked to be sure, but unfortunately it keeps swapping in the Brioso Cuffs.
I think the code for it is this Code
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
if spell.type == 'BardSong' then
-- layer general gear on first, then let default handler add song-specific gear.
local generalClass = get_song_class(spell)
if generalClass and sets.midcast[generalClass] then
equip(sets.midcast[generalClass])
end
end
end
end
As far as i can tell, it doesn't make any difference between normal and resistant gear set.
Might have to add gear sets just for lullaby and remove the Brioso Cuffs from the enhancing gear list?
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-02-07 14:47:10
Thx again for ur support
Yes, i know of the ctrl+F11 function and i just double checked to be sure, but unfortunately it keeps swapping in the Brioso Cuffs.
I think the code for it is this Code
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
if spell.type == 'BardSong' then
-- layer general gear on first, then let default handler add song-specific gear.
local generalClass = get_song_class(spell)
if generalClass and sets.midcast[generalClass] then
equip(sets.midcast[generalClass])
end
end
end
end
As far as i can tell, it doesn't make any difference between normal and resistant gear set.
Might have to add gear sets just for lullaby and remove the Brioso Cuffs from the enhancing gear list? You might want to add the following lines to your function job_post_midcast block. It doesn't fix the real problem since it's a workaround but at least it insures that you equip resist gear for Lullaby when you are in CastingMode:Resistant. Code
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.type == 'BardSong' then
if state.ExtraSongsMode.value == 'FullLength' then
equip(sets.midcast.Daurdabla)
end
state.ExtraSongsMode:reset()
if spell.english:contains('Lullaby') and state.CastingMode.value == 'Resistant' then
equip(sets.midcast.ResistantSongDebuff)
elseif spell.english:contains('Lullaby') and state.CastingMode.value == 'Normal' then
equip(sets.midcast.SongDebuff, sets.midcast.Lullaby)
end
end
end
Serveur: Odin
Game: FFXI
Posts: 33
By Odin.Myhnegon 2015-02-07 22:46:49
Thx again, that helps alot^^
Cerberus.Rabies
Serveur: Cerberus
Game: FFXI
Posts: 57
By Cerberus.Rabies 2015-02-11 19:28:54
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
gs c toggle LuzafRing -- Toggles use of Luzaf Ring on and off
Offense mode is melee or ranged. Used ranged offense mode if you are engaged
for ranged weaponskills, but not actually meleeing.
Weaponskill mode, if set to 'Normal', is handled separately for melee and ranged weaponskills.
--]]
-- 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()
-- 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()
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('Melee', 'Acc')
state.RangedMode:options('Normal', 'Acc')
state.WeaponskillMode:options('Normal', 'Acc')
gear.RAbullet = "Adlivun Bullet"
gear.WSbullet = "Adlivun Bullet"
gear.MAbullet = "Decimating Bullet"
gear.QDbullet = "Animikii Bullet"
options.ammo_warning_limit = 15
-- Additional local binds
send_command('bind ^` input /ja "Double-up" <me>')
send_command('bind !` input /ja "Bolter\'s Roll" <me>')
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind !`')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Triple Shot'] = {body="Navarch's Frac +2"}
sets.precast.JA['Snake Eye'] = {legs="Lanun Culottes"}
sets.precast.JA['Wild Card'] = {feet="Lanun Bottes +1"}
sets.precast.JA['Random Deal'] = {body="Lanun Frac +1"}
sets.precast.JA['Quick Draw'] = {head="Blood Mask",body="Mirke Wardecors"}
sets.precast.CorsairRoll = {head="Lanun Tricorne +1",hands="Navarch's Gants +2",ring1="Barataria Ring",ring2="Luzaf's Ring"}
sets.precast.CorsairRoll["Caster's Roll"] = set_combine(sets.precast.CorsairRoll, {legs="Navarch's Culottes +2"})
sets.precast.CorsairRoll["Courser's Roll"] = set_combine(sets.precast.CorsairRoll, {feet="Navarch's Bottes +2"})
sets.precast.CorsairRoll["Blitzer's Roll"] = set_combine(sets.precast.CorsairRoll, {head="Navarch's Tricorne +2"})
sets.precast.CorsairRoll["Tactician's Roll"] = set_combine(sets.precast.CorsairRoll, {body="Navarch's Frac +2"})
sets.precast.CorsairRoll["Allies' Roll"] = set_combine(sets.precast.CorsairRoll, {hands="Navarch's Gants +2"})
sets.precast.LuzafRing = {ring2="Luzaf's Ring"}
sets.precast.FoldDoubleBust = {hands="Lanun Gants"}
sets.precast.CorsairShot = {head="Blood Mask"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Whirlpool Mask",
body="Iuitl Vest",hands="Iuitl Wristbands",
legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Fast cast sets for spells
sets.precast.FC = {ammo=gear.RAbullet,
head="Umbani cap",neck="Orunmila's Torque",ear1="Loquacious Earring",ear2="Volley Earring",
body="Dread Jupon",hands="Alruna's gloves +1",ring1="Prolix ring",ring2="Hajduk ring +1",
back="Gunslinger's cape",waist="Ninurta's sash",legs="Blood cuisses",feet="Laksamana's bottes +1"}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
sets.precast.RA = {ammo=gear.RAbullet,
head="Aurore beret +1",
body="Skopos Jerkin",hands="Lanun Gants +1",ring2="Haverton ring",
back="Navarch's Mantle",waist="Impulse Belt",legs="Nahtirah Trousers",feet="Wurrukatte boots"}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo=gear.MAbullet,
head="Lanun tricorne +1",neck="Light gorget",ear1="Clearview Earring",ear2="Moonshade earring",
body="Laksamana's frac +1",hands="Lanun gants +1",ring1="Garuda ring +1",ring2="Hajduk ring +1",
back="Gunslinger's cape",waist="Light belt",legs="Nahtirah Trousers",feet="Scopuli nails +1"}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Evisceration'] = sets.precast.WS
sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {legs="Nahtirah Trousers"})
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {legs="Nahtirah Trousers"})
sets.precast.WS['Last Stand'] = {ammo=gear.RAbullet,
head="Lanun tricorne +1",neck="Light gorget",ear1="Auster's Pearl",ear2="Moonshade earring",
body="Laksamana's frac +1",hands="Lanun gants +1",ring1="Garuda ring +1",ring2="Garuda ring +1",
back="Gunslinger's cape",waist="Light belt",legs="Nahtirah Trousers",feet="Vanir Boots"}
sets.precast.WS['Last Stand'].Acc = {ammo=gear.RAbullet,
head="Lanun tricorne +1",neck="Light gorget",ear1="Auster's Pearl",ear2="Moonshade earring",
body="Laksamana's frac +1",hands="Alruna's gloves +1",ring1="Garuda ring +1",ring2="Garuda ring +1",
back="Gunslinger's cape",waist="Light belt",legs="Thurandaut tights +1",feet="Vanir Boots"}
sets.precast.WS['Wildfire'] = {ammo=gear.MAbullet,
head="Fugacity Beret +1",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Moonshade earring",
body="Lanun frac +1",hands="Nilas Gloves",ring1="Arvina ringlet +1",ring2="Garuda ring +1",
back="Gunslinger's cape",waist="Salire belt",legs="Laksamana's trews +1",feet="Lanun bottes +1"}
sets.precast.WS['Wildfire'].Brew = {ammo=gear.MAbullet,
head="Fugacity Beret +1",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Moonshade earring",
body="Lanun frac +1",hands="Nilas Gloves",ring1="Arvina ringlet +1",ring2="Garuda ring +1",
back="Gunslinger's cape",waist="Salire belt",legs="Laksamana's trews +1",feet="Lanun bottes +1"}
sets.precast.WS['Leaden Salute'] = {ammo=gear.MAbullet,
head="Pixie hairpin +1",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Moonshade earring",
body="Lanun frac +1",hands="Nilas Gloves",ring1="Arvina ringlet +1",ring2="Archon Ring",
back="Gunslinger's cape",waist="Light belt",legs="Laksamana's trews +1",feet="Lanun bottes +1"}
-- Midcast Sets
sets.midcast.FastRecast = {
head="Whirlpool Mask",
body="Iuitl Vest",hands="Iuitl Wristbands",
legs="Manibozho Brais",feet="Iuitl Gaiters +1"}
-- Specific spells
sets.midcast.Utsusemi = sets.midcast.FastRecast
sets.midcast.CorsairShot = {ammo=gear.QDbullet,
head="Blood Mask",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Crematio Earring",
body="Mirke Wardecors",hands="Nilas Gloves",ring1="Fenrir Ring +1",ring2="Fenrir Ring +1",
back="Gunslinger's cape",waist="Salire Belt",legs="Laksamana's trews +1",feet="Laksamana's Bottes +1"}
sets.midcast.CorsairShot.Acc = {ammo=gear.QDbullet,
head="Blood Mask",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Crematio Earring",
body="Mirke Wardecors",hands="Nilas Gloves",ring1="Fenrir Ring +1",ring2="Fenrir Ring +1",
back="Gunslinger's cape",waist="Salire Belt",legs="Laksamana's trews +1",feet="Laksamana's Bottes +1"}
sets.midcast.CorsairShot['Light Shot'] = {ammo=gear.QDbullet,
head="Blood Mask",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Crematio Earring",
body="Mirke Wardecors",hands="Nilas Gloves",ring1="Fenrir Ring +1",ring2="Fenrir Ring +1",
back="Gunslinger's cape",waist="Salire Belt",legs="Laksamana's trews +1",feet="Laksamana's Bottes +1"}
sets.midcast.CorsairShot['Dark Shot'] = {ammo=gear.QDbullet,
head="Blood Mask",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Crematio Earring",
body="Mirke Wardecors",hands="Nilas Gloves",ring1="Fenrir Ring +1",ring2="Fenrir Ring +1",
back="Gunslinger's cape",waist="Salire Belt",legs="Laksamana's trews +1",feet="Laksamana's Bottes +1"}
-- Ranged gear
sets.midcast.RA = {ammo=gear.RAbullet,
head="Lanun tricorne +1",neck="Gaudryi necklace",ear1="Clearview Earring",ear2="Volley Earring",
body="Laksamana's Frac +1",hands="Alruna's gloves +1",ring1="Hajduk ring +1",ring2="Haverton ring",
back="Gunslinger's cape",waist="Ponente sash",legs="Nahtirah trousers",feet="Scopuli nails +1"}
sets.midcast.RA.Acc = {ammo=gear.RAbullet,
head="Umbani cap",neck="Gaudryi necklace",ear1="Clearview Earring",ear2="Volley Earring",
body="Laksamana's Frac +1",hands="Alruna's gloves +1",ring1="Hajduk ring +1",ring2="Haverton ring",
back="Gunslinger's cape",waist="Elanid Belt",legs="Thurandaut tights +1",feet="Vanir Boots"}
-- Sets to return to when not performing an action.
-- Idle sets
sets.idle = {ammo=gear.RAbullet,
head="Umbani cap",neck="Gaudryi necklace",ear1="Clearview Earring",ear2="Volley Earring",
body="Mekosuchinae harness",hands="Alruna's gloves +1",ring1="Garuda ring +1",ring2="Garuda ring +1",
back="Mecistopins mantle",waist="Elanid Belt",legs="Blood cuisses",feet="Vanir Boots"}
sets.idle.Town = {ammo=gear.RAbullet,
head="Umbani cap",neck="Gaudryi necklace",ear1="Clearview Earring",ear2="Volley Earring",
body="Mekosuchinae harness",hands="Alruna's gloves +1",ring1="Garuda ring +1",ring2="Garuda ring +1",
back="Mecistopins mantle",waist="Elanid Belt",legs="Blood cuisses",feet="Vanir Boots"}
-- Defense sets
sets.defense.PDT = {ammo=gear.RAbullet,
head="Umbani cap",neck="Gaudryi necklace",ear1="Clearview Earring",ear2="Volley Earring",
body="Mekosuchinae harness",hands="Alruna's gloves +1",ring1="Garuda ring +1",ring2="Garuda ring +1",
back="Mecistopins mantle",waist="Elanid Belt",legs="Blood cuisses",feet="Vanir Boots"}
sets.defense.MDT = {ammo=gear.RAbullet,
head="Umbani cap",neck="Gaudryi necklace",ear1="Clearview Earring",ear2="Volley Earring",
body="Mekosuchinae harness",hands="Alruna's gloves +1",ring1="Garuda ring +1",ring2="Garuda ring +1",
back="Mecistopins mantle",waist="Elanid Belt",legs="Blood cuisses",feet="Vanir Boots"}
sets.Kiting = {feet="Skadi's Jambeaux +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
-- Normal melee group
sets.engaged.Melee = {ammo=gear.RAbullet,
head="Whirlpool Mask",neck="Asperity necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Mekosuchinae harness",hands="Qaaxo Mitaines",ring1="Ramuh ring +1",ring2="Haverton ring",
back="Mecistopins mantle",waist="Anguinus Belt",legs="Qaaxo tights",feet="Qaaxo leggings"}
sets.engaged.Acc = {ammo=gear.RAbullet,
head="Whirlpool Mask",neck="Iqabi necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Mekosuchinae harness",hands="Qaaxo Mitaines",ring1="Ramuh ring +1",ring2="Haverton ring",
back="Mecistopins mantle",waist="Anguinus Belt",legs="Qaaxo tights",feet="Qaaxo leggings"}
sets.engaged.Melee.DW = {ammo=gear.RAbullet,
head="Whirlpool Mask",neck="Asperity necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Mekosuchinae harness",hands="Qaaxo Mitaines",ring1="Ramuh ring +1",ring2="Haverton ring",
back="Mecistopins mantle",waist="Anguinus Belt",legs="Qaaxo tights",feet="Qaaxo leggings"}
sets.engaged.Acc.DW = {ammo=gear.RAbullet,
head="Whirlpool Mask",neck="Asperity necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Mekosuchinae harness",hands="Qaaxo Mitaines",ring1="Ramuh ring +1",ring2="Haverton ring",
back="Mecistopins mantle",waist="Anguinus Belt",legs="Qaaxo tights",feet="Qaaxo leggings"}
sets.engaged.Ranged = {ammo=gear.RAbullet,
head="Whirlpool Mask",neck="Asperity necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Mekosuchinae harness",hands="Qaaxo Mitaines",ring1="Ramuh ring +1",ring2="Haverton ring",
back="Mecistopins mantle",waist="Anguinus Belt",legs="Qaaxo tights",feet="Qaaxo leggings"}
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 sets
if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") then
equip(sets.precast.LuzafRing)
elseif spell.type == 'CorsairShot' and state.CastingMode.value == 'Resistant' then
classes.CustomClass = 'Acc'
elseif spell.english == 'Fold' and buffactive['Bust'] == 2 then
if sets.precast.FoldDoubleBust then
equip(sets.precast.FoldDoubleBust)
eventArgs.handled = true
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if spell.type == 'CorsairRoll' and not spell.interrupted then
display_roll_info(spell)
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Return a customized weaponskill mode to use for weaponskill sets.
-- Don't return anything if you're not overriding the default value.
function get_custom_wsmode(spell, spellMap, default_wsmode)
if buffactive['Transcendancy'] then
return 'Brew'
end
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)
if newStatus == 'Engaged' and player.equipment.main == 'Chatoyant Staff' then
state.OffenseMode:set('Ranged')
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 .. 'Off.: '..state.OffenseMode.current
msg = msg .. ', Rng.: '..state.RangedMode.current
msg = msg .. ', WS.: '..state.WeaponskillMode.current
msg = msg .. ', QD.: '..state.CastingMode.current
if state.DefenseMode.value ~= 'None' then
local defMode = state[state.DefenseMode.value ..'DefenseMode'].current
msg = msg .. ', Defense: '..state.DefenseMode.value..' '..defMode
end
if state.Kiting.value then
msg = msg .. ', Kiting'
end
if state.PCTargetMode.value ~= 'default' then
msg = msg .. ', Target PC: '..state.PCTargetMode.value
end
if state.SelectNPCTargets.value then
msg = msg .. ', Target NPCs'
end
msg = msg .. ', Roll Size: ' .. ((state.LuzafRing.value and 'Large') or 'Small')
add_to_chat(122, msg)
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
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"},
["Puppet 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"},
["Drachen Roll"] = {lucky=3, unlucky=7, bonus="Pet 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"},
["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's 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, spell.english..' provides a bonus to '..rollinfo.bonus..'. Roll size: '..rollsize)
add_to_chat(104, 'Lucky roll is '..tostring(rollinfo.lucky)..', Unlucky roll is '..tostring(rollinfo.unlucky)..'.')
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.element == 'None' then
-- physical weaponskills
bullet_name = gear.WSbullet
else
-- magical weaponskills
bullet_name = gear.MAbullet
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
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(1, 7)
end
This is my current COR lua, I'm looking to add a option for Racc bullets. This is the code I have in Function user_setup:
Code function user_setup()
state.OffenseMode:options('Melee', 'Acc')
state.RangedMode:options('Normal', 'Acc')
state.WeaponskillMode:options('Normal', 'Acc')
gear.RAbullet = "Adlivun Bullet"
gear.WSbullet = "Adlivun Bullet"
gear.MAbullet = "Decimating Bullet"
gear.QDbullet = "Animikii Bullet"
options.ammo_warning_limit = 15
-- Additional local binds
send_command('bind ^` input /ja "Double-up" <me>')
send_command('bind !` input /ja "Bolter\'s Roll" <me>')
select_default_macro_book()
end
This is the rule for Ranged Attack with these bullets I believe:
Code 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.element == 'None' then
-- physical weaponskills
bullet_name = gear.WSbullet
else
-- magical weaponskills
bullet_name = gear.MAbullet
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
Anyone know how I would go about making it work with a new bullet under User_Function, such as "gear.RACCbullet"?
Carbuncle.Galmaximas
Serveur: Carbuncle
Game: FFXI
Posts: 88
By Carbuncle.Galmaximas 2015-02-11 21:21:50
http://pastebin.com/nbPuPX3n
screwed up my whm lua trying to edit error reads issue near line 294 if someone can help me out
Serveur: Asura
Game: FFXI
Posts: 230
By Asura.Sabishii 2015-02-11 22:07:53
Carbuncle.Galmaximas said: »http://pastebin.com/nbPuPX3n
screwed up my whm lua trying to edit error reads issue near line 294 if someone can help me out Code sets.midcast.['Enhancing Magic'] 'name'=
{main="Ababinili",
Take out that 'name' thing.
Carbuncle.Galmaximas
Serveur: Carbuncle
Game: FFXI
Posts: 88
By Carbuncle.Galmaximas 2015-02-11 22:11:22
Carbuncle.Galmaximas said: »http://pastebin.com/nbPuPX3n
screwed up my whm lua trying to edit error reads issue near line 294 if someone can help me out Code sets.midcast.['Enhancing Magic'] 'name'=
{main="Ababinili",
Take out that 'name' thing.
Doesn't work it says name expected on line 293 near '['
VIP
Serveur: Asura
Game: FFXI
Posts: 234
By Asura.Darvamos 2015-02-11 23:13:07
This
sets.midcast.['Enhancing Magic'] 'name'=
{main="Ababinili",
Should be
sets.midcast['Enhancing Magic'] =
{main="Ababinili",
Edit:
Also taking a very quick look at your GS lua I noticed you have two for Sacrific.
sets.midcast.Sacrific
sets.midcast['Sacrific']
Carbuncle.Galmaximas
Serveur: Carbuncle
Game: FFXI
Posts: 88
By Carbuncle.Galmaximas 2015-02-12 00:58:22
This
sets.midcast.['Enhancing Magic'] 'name'=
{main="Ababinili",
Should be
sets.midcast['Enhancing Magic'] =
{main="Ababinili",
Edit:
Also taking a very quick look at your GS lua I noticed you have two for Sacrific.
sets.midcast.Sacrific
sets.midcast['Sacrific']
meh I just repasted my back up and deleted that one it was too jacked up to mess with but thx sir for the help I suck at lua language
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-02-12 05:56:26
This is my current COR lua, I'm looking to add a option for Racc bullets. This is the code I have in Function user_setup: Code function user_setup()
state.OffenseMode:options('Melee', 'Acc')
state.RangedMode:options('Normal', 'Acc')
state.WeaponskillMode:options('Normal', 'Acc')
gear.RAbullet = "Adlivun Bullet"
gear.WSbullet = "Adlivun Bullet"
gear.MAbullet = "Decimating Bullet"
gear.QDbullet = "Animikii Bullet"
options.ammo_warning_limit = 15
-- Additional local binds
send_command('bind ^` input /ja "Double-up" <me>')
send_command('bind !` input /ja "Bolter\'s Roll" <me>')
select_default_macro_book()
end
This is the rule for Ranged Attack with these bullets I believe:
Code 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.element == 'None' then
-- physical weaponskills
bullet_name = gear.WSbullet
else
-- magical weaponskills
bullet_name = gear.MAbullet
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
Anyone know how I would go about making it work with a new bullet under User_Function, such as "gear.RACCbullet"? Adlivun Bullet already has the highest Racc + which is 15 but okay whatever.
Motes has 2 RangedModes built-in, Normal and Acc but you'd still have to add a few new lines for the additional ammo. You could do something like this. Then all you'd need to do is hit Alt-F9 to cycle between RangedMode:Normal and RangedMode:Acc and the appropriate ammo. Code
function user_setup()
state.OffenseMode:options('Melee', 'Acc')
state.RangedMode:options('Normal', 'Acc')
state.WeaponskillMode:options('Normal', 'Acc')
gear.RAbullet = "Regular Bullet Here"
gear.RAbullet.Acc = "Accuracy Bullet Here"
gear.WSbullet = "Adlivun Bullet"
gear.MAbullet = "Decimating Bullet"
gear.QDbullet = "Animikii Bullet"
options.ammo_warning_limit = 15
-- Additional local binds
send_command('bind ^` input /ja "Double-up" <me>')
send_command('bind !` input /ja "Bolter\'s Roll" <me>')
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
sets.precast.RA = {ammo=gear.RAbullet,
head="Navarch's Tricorne +2",
body="Laksamana's Frac",hands="Lanun Gants"}
sets.precast.RA.Acc = set_combine(sets.precast.RA, {ammo=gear.RAbullet.Acc})
-- Ranged gear
sets.midcast.RA = {ammo=gear.RAbullet,
head="Lanun Tricorne",neck="Ocachi Gorget",
ear1="Clearview Earring",ear2="Volley Earring"}
sets.midcast.RA.Acc = set_combine(sets.midcast.RA, {ammo=gear.RAbullet.Acc})
end
-- Run after the default precast() is done.
function job_post_precast(spell, action, spellMap, eventArgs)
if state.RangedMode.value == 'Acc' then
equip(gear.RAbullet.Acc)
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.element == 'None' then
-- physical weaponskills
bullet_name = gear.WSbullet
else
-- magical weaponskills
bullet_name = gear.MAbullet
end
else
-- Ignore non-ranged weaponskills
return
end
elseif spell.type == 'CorsairShot' then
bullet_name = gear.QDbullet
elseif spell.action_type == 'Ranged Attack' then
if state.RangedMode.value == 'Normal' then
bullet_name = gear.RAbullet
elseif state.RangedMode.value == 'Acc' then
bullet_name = gear.RAbullet.Acc
end
if buffactive['Triple Shot'] then
bullet_min_count = 3
end
end
Cerberus.Rabies
Serveur: Cerberus
Game: FFXI
Posts: 57
By Cerberus.Rabies 2015-02-12 15:18:15
Thanks a lot Quixacotl, I know Adlivun has the highest Racc it's the bullet I want to use for it but I was planning on using Eminent for non-acc purpose due to higher DMG.
Serveur: Bismarck
Game: FFXI
Posts: 6
By Bismarck.Airgetlamh 2015-02-12 15:37:20
Using Mote's MNK file. All works fine except the impetus rule. I'm using a sidecar file with my own gearsets in which I define the sets.impetus_body the rule calls for in the main file.
Mote MNK
Lines 291-300.
No idea why it's not working.
Any ideas?
Thanks
Cerberus.Rabies
Serveur: Cerberus
Game: FFXI
Posts: 57
By Cerberus.Rabies 2015-02-12 18:05:52
This is my current COR lua, I'm looking to add a option for Racc bullets. This is the code I have in Function user_setup: Code function user_setup()
state.OffenseMode:options('Melee', 'Acc')
state.RangedMode:options('Normal', 'Acc')
state.WeaponskillMode:options('Normal', 'Acc')
gear.RAbullet = "Adlivun Bullet"
gear.WSbullet = "Adlivun Bullet"
gear.MAbullet = "Decimating Bullet"
gear.QDbullet = "Animikii Bullet"
options.ammo_warning_limit = 15
-- Additional local binds
send_command('bind ^` input /ja "Double-up" <me>')
send_command('bind !` input /ja "Bolter\'s Roll" <me>')
select_default_macro_book()
end
This is the rule for Ranged Attack with these bullets I believe:
Code 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.element == 'None' then
-- physical weaponskills
bullet_name = gear.WSbullet
else
-- magical weaponskills
bullet_name = gear.MAbullet
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
Anyone know how I would go about making it work with a new bullet under User_Function, such as "gear.RACCbullet"? Adlivun Bullet already has the highest Racc + which is 15 but okay whatever.
Motes has 2 RangedModes built-in, Normal and Acc but you'd still have to add a few new lines for the additional ammo. You could do something like this. Then all you'd need to do is hit Alt-F9 to cycle between RangedMode:Normal and RangedMode:Acc and the appropriate ammo. Code
function user_setup()
state.OffenseMode:options('Melee', 'Acc')
state.RangedMode:options('Normal', 'Acc')
state.WeaponskillMode:options('Normal', 'Acc')
gear.RAbullet = "Regular Bullet Here"
gear.RAbullet.Acc = "Accuracy Bullet Here"
gear.WSbullet = "Adlivun Bullet"
gear.MAbullet = "Decimating Bullet"
gear.QDbullet = "Animikii Bullet"
options.ammo_warning_limit = 15
-- Additional local binds
send_command('bind ^` input /ja "Double-up" <me>')
send_command('bind !` input /ja "Bolter\'s Roll" <me>')
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
sets.precast.RA = {ammo=gear.RAbullet,
head="Navarch's Tricorne +2",
body="Laksamana's Frac",hands="Lanun Gants"}
sets.precast.RA.Acc = set_combine(sets.precast.RA, {ammo=gear.RAbullet.Acc})
-- Ranged gear
sets.midcast.RA = {ammo=gear.RAbullet,
head="Lanun Tricorne",neck="Ocachi Gorget",
ear1="Clearview Earring",ear2="Volley Earring"}
sets.midcast.RA.Acc = set_combine(sets.midcast.RA, {ammo=gear.RAbullet.Acc})
end
-- Run after the default precast() is done.
function job_post_precast(spell, action, spellMap, eventArgs)
if state.RangedMode.value == 'Acc' then
equip(gear.RAbullet.Acc)
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.element == 'None' then
-- physical weaponskills
bullet_name = gear.WSbullet
else
-- magical weaponskills
bullet_name = gear.MAbullet
end
else
-- Ignore non-ranged weaponskills
return
end
elseif spell.type == 'CorsairShot' then
bullet_name = gear.QDbullet
elseif spell.action_type == 'Ranged Attack' then
if state.RangedMode.value == 'Normal' then
bullet_name = gear.RAbullet
elseif state.RangedMode.value == 'Acc' then
bullet_name = gear.RAbullet.Acc
end
if buffactive['Triple Shot'] then
bullet_min_count = 3
end
end
When I add "gear.RAbullet.Acc = "Adlivun Bullet" under my function_user_setup() I get an error:
Gearswap: Lua runtime error: Gearswap/flow.lua:295;
Gearswap has detected an error in the user function get_sets:
Rabies_COR.lua:45: attempt to index field 'RAbullet' (a string value)
Know whats causing this by chance?
Serveur: Bahamut
Game: FFXI
Posts: 62
By Bahamut.Phidruran 2015-02-12 21:50:44
What would be the easiest way to add coding to a gearswap file to use Marin Staff for all wind magic?
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-02-12 22:24:22
Code
sets.midcast['Elemental Magic'] = {nuke gear here}
function midcast(spell,action)
if spell.skill == 'Elemental Magic' then
if spell.element == 'Wind' then
equip(sets.midcast['Elemental Magic'], {main="Marin Staff"})
end
end
end
By Crevox 2015-02-12 22:36:18
Wouldn't it be
Code set_combine(sets.midcast['Elemental Magic'], {main="Marin Staff"})
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-02-12 22:37:46
When I add "gear.RAbullet.Acc = "Adlivun Bullet" under my function_user_setup() I get an error:
Gearswap: Lua runtime error: Gearswap/flow.lua:295;
Gearswap has detected an error in the user function get_sets:
Rabies_COR.lua:45: attempt to index field 'RAbullet' (a string value)
Know whats causing this by chance? Oops substitute gear.RAbullet_Acc instead of gear.RAbullet.Acc. That should work. Code
function user_setup()
state.OffenseMode:options('Melee', 'Acc')
state.RangedMode:options('Normal', 'Acc')
state.WeaponskillMode:options('Normal', 'Acc')
gear.RAbullet = "Regular Bullet Here"
gear.RAbullet_Acc = "Accuracy Bullet Here"
gear.WSbullet = "Adlivun Bullet"
gear.MAbullet = "Decimating Bullet"
gear.QDbullet = "Animikii Bullet"
options.ammo_warning_limit = 15
-- Additional local binds
send_command('bind ^` input /ja "Double-up" <me>')
send_command('bind !` input /ja "Bolter\'s Roll" <me>')
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
sets.precast.RA = {ammo=gear.RAbullet,
head="Navarch's Tricorne +2",
body="Laksamana's Frac",hands="Lanun Gants"}
sets.precast.RA.Acc = set_combine(sets.precast.RA, {ammo=gear.RAbullet_Acc})
-- Ranged gear
sets.midcast.RA = {ammo=gear.RAbullet,
head="Lanun Tricorne",neck="Ocachi Gorget",
ear1="Clearview Earring",ear2="Volley Earring"}
sets.midcast.RA.Acc = set_combine(sets.midcast.RA, {ammo=gear.RAbullet_Acc})
end
-- Run after the default precast() is done.
function job_post_precast(spell, action, spellMap, eventArgs)
if state.RangedMode.value == 'Acc' then
equip(gear.RAbullet_Acc)
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.element == 'None' then
-- physical weaponskills
bullet_name = gear.WSbullet
else
-- magical weaponskills
bullet_name = gear.MAbullet
end
else
-- Ignore non-ranged weaponskills
return
end
elseif spell.type == 'CorsairShot' then
bullet_name = gear.QDbullet
elseif spell.action_type == 'Ranged Attack' then
if state.RangedMode.value == 'Normal' then
bullet_name = gear.RAbullet
elseif state.RangedMode.value == 'Acc' then
bullet_name = gear.RAbullet_Acc
end
if buffactive['Triple Shot'] then
bullet_min_count = 3
end
end
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-02-12 22:38:58
Wouldn't it be
Code set_combine(sets.midcast['Elemental Magic'], {main="Marin Staff"}) Edit: In this case, Code
equip(sets.midcast['Elemental Magic'], {main="Marin Staff"})
... is the correct syntax because equip() is a GS command. Example: equip(set1, set2, set3, etc). set_combine is only used within get_sets.
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-02-12 22:48:04
Bismarck.Airgetlamh said: »Using Mote's MNK file. All works fine except the impetus rule. I'm using a sidecar file with my own gearsets in which I define the sets.impetus_body the rule calls for in the main file.
Mote MNK
Lines 291-300.
No idea why it's not working.
Any ideas?
Thanks Does your sidecar include the function user_setup block?
Your sidecar should look like this: Code
-------------------------------------------------------------------------------------------------------------------
-- 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('Normal', 'SomeAcc', 'Acc', 'Fodder')
state.WeaponskillMode:options('Normal', 'SomeAcc', 'Acc', 'Fodder')
state.HybridMode:options('Normal', 'PDT', 'Counter')
state.PhysicalDefenseMode:options('PDT', 'HP')
update_combat_form()
update_melee_groups()
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
-- Gear
-- More Gear
end
Cerberus.Rabies
Serveur: Cerberus
Game: FFXI
Posts: 57
By Cerberus.Rabies 2015-02-13 02:11:59
When I add "gear.RAbullet.Acc = "Adlivun Bullet" under my function_user_setup() I get an error:
Gearswap: Lua runtime error: Gearswap/flow.lua:295;
Gearswap has detected an error in the user function get_sets:
Rabies_COR.lua:45: attempt to index field 'RAbullet' (a string value)
Know whats causing this by chance? Oops substitute gear.RAbullet_Acc instead of gear.RAbullet.Acc. That should work. Code
function user_setup()
state.OffenseMode:options('Melee', 'Acc')
state.RangedMode:options('Normal', 'Acc')
state.WeaponskillMode:options('Normal', 'Acc')
gear.RAbullet = "Regular Bullet Here"
gear.RAbullet_Acc = "Accuracy Bullet Here"
gear.WSbullet = "Adlivun Bullet"
gear.MAbullet = "Decimating Bullet"
gear.QDbullet = "Animikii Bullet"
options.ammo_warning_limit = 15
-- Additional local binds
send_command('bind ^` input /ja "Double-up" <me>')
send_command('bind !` input /ja "Bolter\'s Roll" <me>')
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
sets.precast.RA = {ammo=gear.RAbullet,
head="Navarch's Tricorne +2",
body="Laksamana's Frac",hands="Lanun Gants"}
sets.precast.RA.Acc = set_combine(sets.precast.RA, {ammo=gear.RAbullet_Acc})
-- Ranged gear
sets.midcast.RA = {ammo=gear.RAbullet,
head="Lanun Tricorne",neck="Ocachi Gorget",
ear1="Clearview Earring",ear2="Volley Earring"}
sets.midcast.RA.Acc = set_combine(sets.midcast.RA, {ammo=gear.RAbullet_Acc})
end
-- Run after the default precast() is done.
function job_post_precast(spell, action, spellMap, eventArgs)
if state.RangedMode.value == 'Acc' then
equip(gear.RAbullet_Acc)
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.element == 'None' then
-- physical weaponskills
bullet_name = gear.WSbullet
else
-- magical weaponskills
bullet_name = gear.MAbullet
end
else
-- Ignore non-ranged weaponskills
return
end
elseif spell.type == 'CorsairShot' then
bullet_name = gear.QDbullet
elseif spell.action_type == 'Ranged Attack' then
if state.RangedMode.value == 'Normal' then
bullet_name = gear.RAbullet
elseif state.RangedMode.value == 'Acc' then
bullet_name = gear.RAbullet_Acc
end
if buffactive['Triple Shot'] then
bullet_min_count = 3
end
end
Thanks for the help and quick reply it's very helpful wish I wasn't so computer illiterate at times. I replaced everything with what you said:
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
gs c toggle LuzafRing -- Toggles use of Luzaf Ring on and off
Offense mode is melee or ranged. Used ranged offense mode if you are engaged
for ranged weaponskills, but not actually meleeing.
Weaponskill mode, if set to 'Normal', is handled separately for melee and ranged weaponskills.
--]]
-- 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()
-- 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()
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('Ranged', 'Melee', 'Acc')
state.RangedMode:options('Normal', 'Acc')
state.WeaponskillMode:options('Normal', 'Acc', 'Att', 'Mod')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT', 'Refresh')
gear.RAbullet = "Eminent Bullet"
gear.RAbullet_Acc = "Adluvun Bullet"
gear.WSbullet = "Adlivun Bullet"
gear.MAbullet = "Bronze Bullet"
gear.QDbullet = "Adlivun Bullet"
options.ammo_warning_limit = 15
-- Additional local binds
send_command('bind ^` input /ja "Double-up" <me>')
send_command('bind !` input /ja "Bolter\'s Roll" <me>')
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind !`')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Triple Shot'] = {body="Navarch's Frac +2"}
sets.precast.JA['Snake Eye'] = {legs="Lanun Culottes"}
sets.precast.JA['Wild Card'] = {feet="Lanun Bottes"}
sets.precast.JA['Random Deal'] = {body="Lanun Frac"}
sets.precast.CorsairRoll = {head="Lanun Tricorne",hands="Navarch's Gants +2",ring2="Luzaf's Ring"}
sets.precast.CorsairRoll["Caster's Roll"] = set_combine(sets.precast.CorsairRoll, {legs="Navarch's Culottes +2"})
sets.precast.CorsairRoll["Courser's Roll"] = set_combine(sets.precast.CorsairRoll, {feet="Navarch's Bottes +2"})
sets.precast.CorsairRoll["Blitzer's Roll"] = set_combine(sets.precast.CorsairRoll, {head="Navarch's Tricorne +2"})
sets.precast.CorsairRoll["Tactician's Roll"] = set_combine(sets.precast.CorsairRoll, {body="Navarch's Frac +2"})
sets.precast.CorsairRoll["Allies' Roll"] = set_combine(sets.precast.CorsairRoll, {hands="Navarch's Gants +2"})
sets.precast.LuzafRing = {ring2="Luzaf's Ring"}
sets.precast.FoldDoubleBust = {hands="Lanun Gants"}
sets.precast.CorsairShot = {head="Blood Mask"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Whirlpool Mask",
body="Iuitl Vest",hands="Iuitl Wristbands",
legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Fast cast sets for spells
sets.precast.FC = {head="Haruspex Hat",ear2="Loquacious Earring",hands="Thaumas Gloves",ring1="Prolix Ring"}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
sets.precast.RA = {ammo=gear.RAbullet,
head="Navarch's Tricorne +2",
body="Laksamana's Frac",hands="Lanun Gants",
back="Navarch's Mantle",waist="Impulse Belt",legs="Nahtirah Trousers",feet="Wurrukatte Boots"}
sets.precast.RA.Acc = set_combine(sets.precast.RA, {ammo=gear.RAbullet_Acc})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
head="Whirlpool Mask",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Manibozho Jerkin",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist=gear.ElementalBelt,legs="Manibozho Brais",feet="Iuitl Gaiters +1"}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Evisceration'] = sets.precast.WS
sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {legs="Nahtirah Trousers"})
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {legs="Nahtirah Trousers"})
sets.precast.WS['Last Stand'] = {ammo=gear.WSbullet,
head="Whirlpool Mask",neck=gear.ElementalGorget,ear1="Clearview Earring",ear2="Moonshade Earring",
body="Laksamana's Frac",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Stormsoul Ring",
back="Terebellum Mantle",waist=gear.ElementalBelt,legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}
sets.precast.WS['Last Stand'].Acc = {ammo=gear.WSbullet,
head="Laksamana's Hat",neck=gear.ElementalGorget,ear1="Clearview Earring",ear2="Moonshade Earring",
body="Laksamana's Frac",hands="Buremte Gloves",ring1="Hajduk Ring",ring2="Stormsoul Ring",
back="Libeccio Mantle",waist=gear.ElementalBelt,legs="Thurandaut Tights +1",feet="Laksamana's Bottes"}
sets.precast.WS['Wildfire'] = {ammo=gear.MAbullet,
head="Wayfarer Circlet",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Manibozho Jerkin",hands="Iuitl Wristbands",ring1="Stormsoul Ring",ring2="Demon's Ring",
back="Toro Cape",waist=gear.ElementalBelt,legs="Iuitl Tights",feet="Iuitl Gaiters +1"}
sets.precast.WS['Wildfire'].Brew = {ammo=gear.MAbullet,
head="Wayfarer Circlet",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Manibozho Jerkin",hands="Iuitl Wristbands",ring1="Stormsoul Ring",ring2="Demon's Ring",
back="Toro Cape",waist=gear.ElementalBelt,legs="Iuitl Tights",feet="Iuitl Gaiters +1"}
sets.precast.WS['Leaden Salute'] = sets.precast.WS['Wildfire']
-- Midcast Sets
sets.midcast.FastRecast = {
head="Whirlpool Mask",
body="Iuitl Vest",hands="Iuitl Wristbands",
legs="Manibozho Brais",feet="Iuitl Gaiters +1"}
-- Specific spells
sets.midcast.Utsusemi = sets.midcast.FastRecast
sets.midcast.CorsairShot = {ammo=gear.QDbullet,
head="Blood Mask",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Lanun Frac",hands="Schutzen Mittens",ring1="Hajduk Ring",ring2="Demon's Ring",
back="Toro Cape",waist="Aquiline Belt",legs="Iuitl Tights",feet="Lanun Bottes"}
sets.midcast.CorsairShot.Acc = {ammo=gear.QDbullet,
head="Laksamana's Hat",neck="Stoicheion Medal",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Lanun Frac",hands="Schutzen Mittens",ring1="Stormsoul Ring",ring2="Sangoma Ring",
back="Navarch's Mantle",waist="Aquiline Belt",legs="Iuitl Tights",feet="Iuitl Gaiters +1"}
sets.midcast.CorsairShot['Light Shot'] = {ammo=gear.QDbullet,
head="Laksamana's Hat",neck="Stoicheion Medal",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Lanun Frac",hands="Schutzen Mittens",ring1="Stormsoul Ring",ring2="Sangoma Ring",
back="Navarch's Mantle",waist="Aquiline Belt",legs="Iuitl Tights",feet="Iuitl Gaiters +1"}
sets.midcast.CorsairShot['Dark Shot'] = sets.midcast.CorsairShot['Light Shot']
-- Ranged gear
sets.midcast.RA = {ammo=gear.RAbullet,
head="Lanun Tricorne",neck="Ocachi Gorget",ear1="Clearview Earring",ear2="Volley Earring",
body="Laksamana's Frac",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Stormsoul Ring",
back="Terebellum Mantle",waist="Commodore Belt",legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}
sets.midcast.RA.Acc = {ammo=gear.RAbullet_Acc,
head="Laksamana's Hat",neck="Huani Collar",ear1="Clearview Earring",ear2="Volley Earring",
body="Laksamana's Frac",hands="Buremte Gloves",ring1="Hajduk Ring",ring2="Beeline Ring",
back="Libeccio Mantle",waist="Commodore Belt",legs="Thurandaut Tights +1",feet="Laksamana's Bottes"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {neck="Wiglen Gorget",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
-- Idle sets
sets.idle = {ammo=gear.RAbullet,
head="Whirlpool Mask",neck="Wiglen Gorget",ear1="Clearview Earring",ear2="Volley Earring",
body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Shadow Mantle",waist="Flume Belt",legs="Nahtirah Trousers",feet="Skadi's Jambeaux +1"}
sets.idle.Town = {main="Surcouf's Jambiya",range="Eminent Gun",ammo=gear.RAbullet,
head="Laksamana's Hat",neck="Wiglen Gorget",ear1="Clearview Earring",ear2="Volley Earring",
body="Laksamana's Frac",hands="Iuitl Wristbands",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Shadow Mantle",waist="Flume Belt",legs="Nahtirah Trousers",feet="Skadi's Jambeaux +1"}
-- Defense sets
sets.defense.PDT = {
head="Whirlpool Mask",neck="Twilight Torque",ear1="Clearview Earring",ear2="Volley Earring",
body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Shadow Mantle",waist="Flume Belt",legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}
sets.defense.MDT = {
head="Whirlpool Mask",neck="Twilight Torque",ear1="Clearview Earring",ear2="Volley Earring",
body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Defending Ring",ring2="Shadow Ring",
back="Engulfer Cape",waist="Flume Belt",legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}
sets.Kiting = {feet="Skadi's Jambeaux +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
-- Normal melee group
sets.engaged.Melee = {ammo=gear.RAbullet,
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Iuitl Gaiters +1"}
sets.engaged.Acc = {ammo=gear.RAbullet,
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Hurch'lan Sash",legs="Manibozho Brais",feet="Iuitl Gaiters +1"}
sets.engaged.Melee.DW = {ammo=gear.RAbullet,
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Iuitl Gaiters +1"}
sets.engaged.Acc.DW = {ammo=gear.RAbullet,
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Hurch'lan Sash",legs="Manibozho Brais",feet="Iuitl Gaiters +1"}
sets.engaged.Ranged = {ammo=gear.RAbullet,
head="Whirlpool Mask",neck="Twilight Torque",ear1="Clearview Earring",ear2="Volley Earring",
body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Shadow Mantle",waist="Flume Belt",legs="Nahtirah Trousers",feet="Iuitl Gaiters +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
-- Run after the default precast() is done.
function job_post_precast(spell, action, spellMap, eventArgs)
if state.RangedMode.value == 'Acc' then
equip(gear.RAbullet_Acc)
end
end
-- gear sets
if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") and state.LuzafRing.value then
equip(sets.precast.LuzafRing)
elseif spell.type == 'CorsairShot' and state.CastingMode.value == 'Resistant' then
classes.CustomClass = 'Acc'
elseif spell.english == 'Fold' and buffactive['Bust'] == 2 then
if sets.precast.FoldDoubleBust then
equip(sets.precast.FoldDoubleBust)
eventArgs.handled = true
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if spell.type == 'CorsairRoll' and not spell.interrupted then
display_roll_info(spell)
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Return a customized weaponskill mode to use for weaponskill sets.
-- Don't return anything if you're not overriding the default value.
function get_custom_wsmode(spell, spellMap, default_wsmode)
if buffactive['Transcendancy'] then
return 'Brew'
end
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)
if newStatus == 'Engaged' and player.equipment.main == 'Chatoyant Staff' then
state.OffenseMode:set('Ranged')
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 .. 'Off.: '..state.OffenseMode.current
msg = msg .. ', Rng.: '..state.RangedMode.current
msg = msg .. ', WS.: '..state.WeaponskillMode.current
msg = msg .. ', QD.: '..state.CastingMode.current
if state.DefenseMode.value ~= 'None' then
local defMode = state[state.DefenseMode.value ..'DefenseMode'].current
msg = msg .. ', Defense: '..state.DefenseMode.value..' '..defMode
end
if state.Kiting.value then
msg = msg .. ', Kiting'
end
if state.PCTargetMode.value ~= 'default' then
msg = msg .. ', Target PC: '..state.PCTargetMode.value
end
if state.SelectNPCTargets.value then
msg = msg .. ', Target NPCs'
end
msg = msg .. ', Roll Size: ' .. ((state.LuzafRing.value and 'Large') or 'Small')
add_to_chat(122, msg)
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
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"},
["Puppet 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"},
["Drachen Roll"] = {lucky=3, unlucky=7, bonus="Pet 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"},
["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's 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, spell.english..' provides a bonus to '..rollinfo.bonus..'. Roll size: '..rollsize)
add_to_chat(104, 'Lucky roll is '..tostring(rollinfo.lucky)..', Unlucky roll is '..tostring(rollinfo.unlucky)..'.')
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.element == 'None' then
-- physical weaponskills
bullet_name = gear.WSbullet
else
-- magical weaponskills
bullet_name = gear.MAbullet
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
elseif state.RangedMode.value == 'Acc' then
bullet_name = gear.RAbullet_Acc
end
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
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(1, 7)
end
Now when I try to load I'm getting the error
"Rabies_COR.lua:482: '<eof>' expected near 'end'"
Tried google but couldn't really find anyone that had same problem and a solution you know what this is cause by?
Serveur: Bismarck
Game: FFXI
Posts: 6
By Bismarck.Airgetlamh 2015-02-13 07:27:34
Bismarck.Airgetlamh said: »Using Mote's MNK file. All works fine except the impetus rule. I'm using a sidecar file with my own gearsets in which I define the sets.impetus_body the rule calls for in the main file.
Mote MNK
Lines 291-300.
No idea why it's not working.
Any ideas?
Thanks Does your sidecar include the function user_setup block?
Your sidecar should look like this: Code
-------------------------------------------------------------------------------------------------------------------
-- 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('Normal', 'SomeAcc', 'Acc', 'Fodder')
state.WeaponskillMode:options('Normal', 'SomeAcc', 'Acc', 'Fodder')
state.HybridMode:options('Normal', 'PDT', 'Counter')
state.PhysicalDefenseMode:options('PDT', 'HP')
update_combat_form()
update_melee_groups()
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
-- Gear
-- More Gear
end
Well that's embarrassing. Out of all my gear files, this is the only one I don't have the vars in at the start.... ugh.
Thanks!
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-02-13 08:04:02
Thanks for the help and quick reply it's very helpful wish I wasn't so computer illiterate at times. I replaced everything with what you said:
Now when I try to load I'm getting the error
"Rabies_COR.lua:482: '<eof>' expected near 'end'"
Tried google but couldn't really find anyone that had same problem and a solution you know what this is cause by? That's what happens when you post half a function block. When it's corrected and you paste that back then things don't fall into the right places.
Anyways I buttoned everything up so there should be no errors. It should do what you're asking. Hit Alt-F9 to cycle RangedMode:Normal and RangedMode:Acc and Eminent and Adlivun Bullets accordingly for RA. http://pastebin.com/KdiUM8pk
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.
|
|