|
Gearswap Support Thread
By Celther 2016-07-08 06:08:50
I apologize if this has already been answered, but does Gearswap not yet recognize Wardrobe 3&4? It isn't pulling any gear from either.
Thanks!
Ragnarok.Flippant
Serveur: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-07-08 12:04:24
Well that's the thing, I was expecting to see Aymur, Charmers merlin, and my TP axe (kumbhakarna), to all be seen during the sequence. If you clicked the broken link from original post, it seems that TP axe isnt getting equipped.
I don't play BST, so I might need more context if I am understanding wrong. I assume you mean that you want Kumbhakarna equipped during the pet's midcast (if it gets equipped during your midcast, you will not get the recast time from Charmer's), although it looks like your GS is handling it in player's aftercast instead (which should be, tentatively, fine), but Kumbhakarna is not being equipped until it changes to your TP and/or idle gear (through pet's aftercast).
Are you sure Kumbhakarna is also listed in the same equip set as Nukumi hands/legs? It would appear that whatever that set is is the one intended to be used for the pet's attack.
Fenrir.Reoko
Serveur: Fenrir
Game: FFXI
Posts: 6
By Fenrir.Reoko 2016-07-08 16:41:01
Thank you for taking the time to assist with this issue, firstly, am I wrong in thinking that I can equip more than 2 weapons per ready move?
Also, I should have stated a bit more clearly about the picture, the first pet_status_change is the pet attacking a mob, the precast is using a ready move, aftercast equipping various stuff, pet_aftercast equipping (standard) fighting gear (which includes my second kumbhakarna for PDT, and lastly the pet_status_change for the idle set.
Edit: There's gearswaps for everything in that lua, I did my best to plug my gear in accordingly. Your text to link here... The link is the actual lua, with what starts at 216 I belive is the bits that should equip the TP kumbhakarna.
Ragnarok.Flippant
Serveur: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-07-08 22:54:56
I'm not sure I understand. Precast/midcast are, functionally, the same thing for JA and WS, because they are instant abilities. You'll only use what you're in when midcast processes (essentially, anyway). So no, you cannot equip more than two weapons during your Ready.
Your pet uses a completely separate action, though. So you can equip two new weapons when it is actually using Razor Fang, or whatever. I'm going to continue assuming that what you want is for Kumbhakarna to equip in time for Razor Fang to go off, and it would appear that's what you want based on the variables I see.
The intention of that file is to equip your offensive pet gear during the player's aftercast. But to be frank, the job_aftercast function is a redundant mess and the way equip sets are being handled is unnecessarily convoluted. I will not try to solve this issue, because there is no fun in patching a bad file. I'll only take one shot in the dark and ask if you were in HighAcc or MaxAcc mode, in which case (I think) it should be trying to equip Ready_Acc_Axe3 (Digirbalag) in your sub.
If that doesn't answer the problem, then I recommend trying to find a different BST file. If you cannot, I will work with you personally to rewrite that one.
By Selindrile 2016-07-09 01:18:38
I linked mine a while back, have all the jobs modified from Motenten's versions - https://www.dropbox.com/sh/20vy32liub3glxz/AAAiIVHAasFdwCK1SZdZz7d_a?dl=0
Lakshmi.Reddwarf
Serveur: Lakshmi
Game: FFXI
Posts: 160
By Lakshmi.Reddwarf 2016-07-09 23:41:58
I apologize if this has already been answered, but does Gearswap not yet recognize Wardrobe 3&4? It isn't pulling any gear from either.
Thanks!
i seem to be having an issues interacting with NPCs while Gearswap is loaded (with MW3/4 active), i disable it and i can chat/attack normally. (disable gearswap that is)
with Gearswap Disabled, i can talk to, and attack monsters as normal, with it loaded, NPC wont respond unless i mash enter about 10 times on them, same for attacking monsters. am able to use JA/Magic on them w/o any issues.
Carbuncle.Ricekid
Serveur: Carbuncle
Game: FFXI
Posts: 13
By Carbuncle.Ricekid 2016-07-12 06:05:34
function self_command(command)
if command == 'toggle TP set' then
TP_Index = TP_Index +1
if TP_Index > #TP_Set_Names then TP_Index = 1 end
send_command('@input /echo ----- TP Set changed to '..TP_Set_Names[TP_Index]..' -----')
equip(sets.TP[TP_Set_Names[TP_Index]])
elseif command == 'toggle Idle set' then
Idle_Index = Idle_Index +1
if Idle_Index > #Idle_Set_Names then Idle_Index = 1 end
send_command('@input /echo ----- Idle Set changed to '..Idle_Set_Names[Idle_Index]..' -----')
equip(sets.Idle[Idle_Set_Names[Idle_Index]])
end
Ok guys need some help here how do I toggle between sets with this above thanks!
Serveur: Asura
Game: FFXI
Posts: 127
By Asura.Brennski 2016-07-12 06:08:35
You can either send the comamd: //gs toggle TP set
or have it bound to a key on the keyboard at the time of file load for example on my BLU this is mapped to F9.
Each time you send this it will increase the set +1 to the next one till you reach the end then loop back round to the start.
Carbuncle.Ricekid
Serveur: Carbuncle
Game: FFXI
Posts: 13
By Carbuncle.Ricekid 2016-07-12 06:17:16
It says Gearswap Command Not Found, do i just type this in the text bar?
Edit nvm found it
Serveur: Asura
Game: FFXI
Posts: 127
By Asura.Brennski 2016-07-12 06:23:28
Sorry the command is //gs c toggle TP set
I missed the c because I've mapped it at the top of my LUA
So like: Code
function get_gets()
send_command('bind f9 gs c toggle TP set')
function file_unlod ()
send_command('unbind ^f9')
end
this because I start defining any sets.
Ragnarok.Zuhra
Serveur: Ragnarok
Game: FFXI
Posts: 16
By Ragnarok.Zuhra 2016-07-14 00:45:11
A few questions and a few notes, first off; it's been over a year since I last played and obviously some things have changed, I'm refreshing my memory with a lot of Gearswap for Dummies thread but I'm certain it's a little dated by now and wondered if there was maybe a newer guide or at the very least someone has a more up to date list of job.lua's I could utilize (also will I need to redo my job_gear.lua's or not)?
Secondly I noticed after doing some perusing for the elemental.obi code that the trust function is still set as a maximum of 3 in the mote-utility.lua: Code
-- Can call a max of 3 Trust NPCs, so parties larger than that are out.
if party.count > 4 then
return false
end
and wondered if just changing this maximum party count to 6 would fix it or just cause more issues? (not really sure where all this code is utilized these days)
Finally, I don't really remember what other addon/plugin gearswap uses to manipulate inventory for gear usage but now that we have basically 5 sets of 80 slot inventories (Inventory, Wardrobe1, Wardrobe2, Wardrobe3, Wardrobe4) I seek to never have to wait for gear changes in my moghouse again and wondered if this was reality yet? I noticed in the Organizer thread Rooks is working on getting the 3&4 setup, is that all it will require?
Thanks ahead of time, send me a PM or ingame /tell if you like even.
Lakshmi.Reddwarf
Serveur: Lakshmi
Game: FFXI
Posts: 160
By Lakshmi.Reddwarf 2016-07-15 21:30:13
anyone know what this means? or whats causing it?
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Echo Drops does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Porxie Pork does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Shivite does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Titanite does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Garudite does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Wind Bead does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Ancient Lumber does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Pear Crepe does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Ifritite does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Pear Crepe does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Fern Stone does not have a jobs field in the resources.
22:28:55GearSwap (Debug Mode): GearSwap (Debug Mode): Item Glavoid Shell does not have a jobs field in the resources.
Shiva.Hiep
Serveur: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2016-07-18 10:14:06
Is there a way to have a specific body such as Merlinic Jubbah equipped during MB in the format of sets.magic_burst? As in I have 2 Jubbahs, both high MACC but one has MB augs while the other doesn't. I'd like my MACC/MB one to be equipped during sets.magic_burst.
Serveur: Asura
Game: FFXI
Posts: 127
By Asura.Brennski 2016-07-18 10:25:40
If you do //gs export while wearing each one you will get a file with the augments on.
Copy the line exactly into your GearSwap LUA so your MB one into the MB set and your none MB into free nuke set and GearSwap will equip the correct one based on Augs.
The line will look something like this:
{ name="Herculean Gloves", augments={'Magic burst mdg.+7%','Enmity-2','"Refresh"+1','Accuracy+13 Attack+13',}}
Shiva.Hiep
Serveur: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2016-07-18 10:31:48
Let me rephrase, I use Ctrl Q to toggle between my casting modes (Normal, ConserveMP, MACC), while I use Alt Q to go into MB mode (sets.magic_burst). I only want the MACC/MB Merlinic Jubbah while I'm in MACC Casting Mode and MB Mode. When I'm off my MACC/MB mode, I want the full MACC body that I mentioned in the other post.
Serveur: Asura
Game: FFXI
Posts: 127
By Asura.Brennski 2016-07-18 10:35:08
Do you have separate sets defined in your File for each?
So like sets.magic.MB ={head=""} and sets.magic.macc ={head=""}?
Or post your LUA?
Odin.Lygre
Serveur: Odin
Game: FFXI
Posts: 89
By Odin.Lygre 2016-07-18 14:07:22
Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' and spell.english ~= 'Impact' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.Obi)
if string.find(spell.english,'helix') then
if state.MagicBurst.value then
equip(set_combine(sets.magic_burst,{back=gear.HelixCape}))
end
end
end
if state.MagicBurst.value then
equip(sets.magic_burst)
if state.CastingMode.value == 'MACC' then
equip(sets.magic_burst.MACC)
end
end
end
if string.find(spell.english,'Cur') and spell.target.name == player.name then
equip(sets.midcast.SelfCure)
end
end
end
Just make a separate mb set sets.magic_burst.MACC, and it should equip that set when your casting mode is MACC and MB toggle is on.
Hope this helps.
[+]
Asura.Lior
Serveur: Asura
Game: FFXI
Posts: 23
By Asura.Lior 2016-07-18 16:33:38
Since everyone in my shell told me that GearSwap would work with wardrobe 3/4 now I got those myself. Sadly, I get issues while everyone says "mine is working fine" ... could it be my .lua? It did work fine before I started to use wardrobe 3/4. I hope there is another solution than not to use 3/4 now...
This is my COR.lua: Code -- *** Credit goes to Flippant for helping me with Gearswap *** --
-- ** I Use Some of Motenten's Functions ** --
function get_sets()
AccIndex = 1
AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For Shooting/QD/TP/WS. Default ACC Set Is LowACC. The First TP Set Of Your Main Weapon Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
IdleIndex = 1
IdleArray = {'Movement', 'Regen'} -- Default Idle Set Is Movement --
Armor = 'None'
define_roll_values()
include('organizer-lib')
warning = false
Lock_Main = 'OFF' -- Set Default Lock Main Weapon ON or OFF Here --
AutoGunWS = "Last Stand" -- Set Auto Gun WS Here --
AutoMode = 'OFF' -- Set Default Auto RA/WS ON or OFF Here --
Obi = 'ON' -- Turn Default Obi ON or OFF Here --
ammo_warning_limit = 20 -- Set Ammo Limit Check Here --
target_distance = 5 -- Set Default Distance Here --
select_default_macro_book() -- Change Default Macro Book At The End --
ACC_Shots = S{"Light Shot","Dark Shot"}
Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
sc_map = {SC1="CoursersRoll", SC2="DiaII", SC3="LightShot"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
luzaf="luzafon"
sets.luzaf=T{}
-- Idle/Town Sets --
sets.Idle = {ammo="Chrono Bullet",
head="Meghanada Visor +1",
body="Meg. Cuirie +1",
hands="Meg. Gloves +1",
legs="Carmine Cuisses",
feet="Meg. Jam. +1",
neck="Loricate Torque +1",
waist="Flume Belt",
left_ear={ name="Darkness Earring", augments={'Phys. dmg. taken -2%','"Resist Petrify"+1',}},
right_ear="Genmei Earring",
left_ring="Patricius Ring",
right_ring="Defending Ring",
back="Xucau Mantle"}
sets.Idle.Regen = {ammo="Chrono Bullet",
head={ name="Rawhide Mask", augments={'HP+50','Accuracy+15','Evasion+20',}},
body="Mekosu. Harness",
hands="Umuthi Gloves",
legs={ name="Rawhide Trousers", augments={'MP+50','"Fast Cast"+5','"Refresh"+1',}},
feet={ name="Lanun Bottes +1", augments={'Enhances "Wild Card" effect',}},
neck="Sanctity Necklace",
waist="Flume Belt",
left_ear="Infused Earring",
right_ear="Genmei Earring",
left_ring="Sheltered Ring",
right_ring="Paguroidea Ring",
back="Xucau Mantle"}
sets.Idle.Movement = set_combine(sets.Idle,{})
-- QD Sets --
sets.QD = {ammo="Chrono Bullet",
head="Blood Mask",
neck="Sanctity Necklace",
ear1="Friomisi Earring",
ear2="Hecate's Earring",
body="Mirke Wardecors",
hands="Herculean Gloves",
ring1="Acumen Ring",
ring2="Arvina Ringlet +1",
back={ name="Gunslinger's Cape", augments={'Enmity-2','"Mag.Atk.Bns."+3','"Phantom Roll" ability delay -2','Weapon skill damage +5%',}},
waist="Eschan Stone",
legs={ name="Herculean Trousers", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Crit. hit damage +1%','INT+7','"Mag.Atk.Bns."+15',}},
feet={ name="Herculean Boots", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Crit. hit damage +5%','INT+9','Mag. Acc.+9','"Mag.Atk.Bns."+10',}},}
sets.QD.MidACC = {ammo="Chrono Bullet",
head="Lak. Hat +1",
neck="Sanctity Necklace",
ear1="Gwati Earring",
ear2="Hermetic Earring",
body="Samnuha Coat",
hands="Pursuer's Cuffs",
ring1="Sangoma Ring",
ring2="Perception Ring",
back={ name="Gunslinger's Cape", augments={'Enmity-2','"Mag.Atk.Bns."+3','"Phantom Roll" ability delay -2','Weapon skill damage +5%',}},
waist="Eschan Stone",
legs={ name="Herculean Trousers", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Crit. hit damage +1%','INT+7','"Mag.Atk.Bns."+15',}},
feet="Lak. Bottes +1"}
sets.QD.HighACC = set_combine(sets.QD.MidACC,{})
-- PDT/MDT Sets --
sets.PDT = {ammo="Chrono Bullet",
head="Lithelimb Cap",
neck="Loricate Torque +1",
ear1="Darkness Earring",
ear2="Genmei Earring",
body="Meg. Cuirie +1",
hands="Umuthi Gloves",
ring1="Patricius Ring",
ring2="Defending Ring",
back="Repulse Mantle",
waist="Flume Belt",
legs={ name="Herculean Trousers", augments={'"Store TP"+1','Phys. dmg. taken -5%',}},
feet={ name="Herculean Boots", augments={'Accuracy+15 Attack+15','Phys. dmg. taken -2%','MND+3',}}}
sets.MDT = {ammo="Chrono Bullet",
head="Dampening Tam",
neck="Loricate Torque +1",
ear1="Zennaroi Earring",
ear2="Steelflash Earring",
body="Mekosu. Harness",
hands="Floral Gauntlets",
ring1="Shadow Ring",
ring2="Defending Ring",
back="Xucau Mantle",
waist="Flume Belt",
legs={ name="Herculean Trousers", augments={'"Store TP"+1','Phys. dmg. taken -5%',}},
feet={ name="Herculean Boots", augments={'Accuracy+15 Attack+15','Phys. dmg. taken -2%','MND+3',}}}
-- Roll Set --
sets.luzafon = {head="Lanun Tricorne +1",
hands="Chasseur's Gants +1",
ring1="Luzaf's Ring",
ring2="Barataria Ring",
back="Camulus's Mantle",
legs="Desultor Tassets"}
sets.luzafoff = {head="Lanun Tricorne +1",
hands="Chasseur's Gants +1",
ring2="Barataria Ring",
back="Camulus's Mantle",
legs="Desultor Tassets"}
-- Preshot --
sets.Preshot = {ammo="Chrono Bullet",
head={ name="Taeon Chapeau", augments={'Accuracy+23','"Snapshot"+5','"Snapshot"+5',}},
body={ name="Taeon Tabard", augments={'"Snapshot"+5','"Snapshot"+4',}},
hands={ name="Lanun Gants +1", augments={'Enhances "Fold" effect',}},
legs={ name="Adhemar Kecks", augments={'AGI+10','"Rapid Shot"+10','Enmity-5',}},
feet={ name="Taeon Boots", augments={'Accuracy+19 Attack+19','"Snapshot"+5','"Snapshot"+5',}},
waist="Impulse Belt",
back={ name="Camulus's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Snapshot"+10',}}}
-- Shooting Base Set --
sets.Midshot = {}
-- Fomalhaut Sets --
sets.Midshot['Fomalhaut'] = {ammo="Chrono Bullet",
head="Meghanada Visor +1",
body="Meg. Cuirie +1",
hands="Meg. Gloves +1",
legs="Meg. Chausses +1",
feet="Meg. Jam. +1",
neck="Ocachi Gorget",
waist="Eschan Stone",
left_ear="Neritic Earring",
right_ear="Enervating Earring",
left_ring="Bellona's Ring",
right_ring="Cacoethic Ring +1",
back={ name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','Rng.Acc.+10','Weapon skill damage +10%',}}}
sets.Midshot['Fomalhaut'].MidACC = set_combine(sets.Midshot['Fomalhaut'],{
neck="Marked Gorget",
left_ear="Volley Earring",
left_ring="Hajduk Ring"})
sets.Midshot['Fomalhaut'].HighACC = set_combine(sets.Midshot['Fomalhaut'].MidACC,{})
-- Compensator Sets --
sets.Midshot['Compensator'] = set_combine(sets.Midshot['Fomalhaut'],{})
sets.Midshot['Compensator'].MidACC = set_combine(sets.Midshot['Fomalhaut'].MidACC,{})
sets.Midshot['Compensator'].HighACC = set_combine(sets.Midshot['Fomalhaut'].HighACC,{})
-- Melee Sets --
sets.Melee = {ammo="Chrono Bullet",
head={ name="Dampening Tam", augments={'DEX+10','Accuracy+15','Mag. Acc.+15','Quadruple Attack +3',}},
body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
hands={ name="Adhemar Wristbands", augments={'Accuracy+15','Attack+15','"Subtle Blow"+7',}},
legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
feet={ name="Herculean Boots", augments={'Accuracy+14 Attack+14','"Triple Atk."+4','STR+5',}},
neck="Defiant Collar",
waist="Windbuffet Belt +1",
left_ear="Heartseeker Earring",
right_ear="Dudgeon Earring",
left_ring="Epona's Ring",
right_ring="Petrov Ring",
back="Bleating Mantle"}
sets.Melee.MidACC = {ammo="Chrono Bullet",
head={ name="Dampening Tam", augments={'DEX+10','Accuracy+15','Mag. Acc.+15','Quadruple Attack +3',}},
body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
hands={ name="Adhemar Wristbands", augments={'Accuracy+15','Attack+15','"Subtle Blow"+7',}},
legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
feet={ name="Herculean Boots", augments={'Accuracy+14 Attack+14','"Triple Atk."+4','STR+5',}},
neck="Subtlety Spec.",
waist="Olseni Belt",
left_ear="Heartseeker Earring",
right_ear="Dudgeon Earring",
left_ring="Mars's Ring",
right_ring="Cacoethic Ring +1",
back={ name="Camulus's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Snapshot"+10',}}}
sets.Melee.HighACC = {ammo="Chrono Bullet",
head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}},
body={ name="Adhemar Jacket", augments={'DEX+10','AGI+10','Accuracy+15',}},
hands={ name="Adhemar Wristbands", augments={'Accuracy+15','Attack+15','"Subtle Blow"+7',}},
legs={ name="Carmine Cuisses", augments={'Accuracy+15','Attack+10','"Dual Wield"+5',}},
feet={ name="Herculean Boots", augments={'Accuracy+14 Attack+14','"Triple Atk."+4','STR+5',}},
neck="Subtlety Spec.",
waist="Olseni Belt",
left_ear="Heartseeker Earring",
right_ear="Zennaroi Earring",
left_ring="Mars's Ring",
right_ring="Cacoethic Ring +1",
back={ name="Camulus's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Snapshot"+10',}}}
-- WS Base Set --
sets.WS = {}
-- Last Stand Sets --
sets.WS['Last Stand'] = {ammo="Chrono Bullet",
head="Meghanada Visor +1",
body="Meg. Cuirie +1",
hands="Meg. Gloves +1",
legs="Meg. Chausses +1",
feet="Meg. Jam. +1",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Infused Earring",
right_ear="Enervating Earring",
left_ring="Arvina Ringlet +1",
right_ring="Garuda Ring",
back={ name="Camulus's Mantle", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','Rng.Acc.+10','Weapon skill damage +10%',}}}
sets.WS['Last Stand'].MidACC = set_combine(sets.WS["Last Stand"],{
left_ear="Volley Earring",
left_ring="Hajduk Ring",
right_ring="Cacoethic Ring +1"})
sets.WS["Last Stand"].HighACC = set_combine(sets.WS["Last Stand"].MidACC,{})
-- Wildfire Sets --
sets.WS['Wildfire'] = {ammo="Chrono Bullet",
head={ name="Herculean Helm", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Weapon skill damage +1%','VIT+11','Mag. Acc.+11','"Mag.Atk.Bns."+15',}},
body={ name="Samnuha Coat", augments={'Mag. Acc.+13','"Mag.Atk.Bns."+14','"Fast Cast"+3','"Dual Wield"+4',}},
hands={ name="Herculean Gloves", augments={'Mag. Acc.+17 "Mag.Atk.Bns."+17','"Fast Cast"+5','MND+5','Mag. Acc.+11','"Mag.Atk.Bns."+15',}},
legs={ name="Herculean Trousers", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Crit. hit damage +1%','INT+7','"Mag.Atk.Bns."+15',}},
feet={ name="Herculean Boots", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Crit. hit damage +5%','INT+9','Mag. Acc.+9','"Mag.Atk.Bns."+10',}},
neck="Sanctity Necklace",
waist="Eschan Stone",
left_ear="Hecate's Earring",
right_ear="Friomisi Earring",
left_ring="Arvina Ringlet +1",
right_ring="Acumen Ring",
back={ name="Gunslinger's Cape", augments={'Enmity-2','"Mag.Atk.Bns."+3','"Phantom Roll" ability delay -2','Weapon skill damage +5%',}}}
sets.WS['Wildfire'].MidACC = set_combine(sets.WS["Wildfire"],{
left_ear="Hermetic Earring",
right_ear="Gwati Earring"})
sets.WS['Wildfire'].HighACC = set_combine(sets.WS["Wildfire"].MidACC,{
right_ring="Sangoma Ring"})
-- Leaden Salute Sets --
sets.WS['Leaden Salute'] = {ammo="Chrono Bullet",
head={ name="Herculean Helm", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Weapon skill damage +1%','VIT+11','Mag. Acc.+11','"Mag.Atk.Bns."+15',}},
body={ name="Samnuha Coat", augments={'Mag. Acc.+13','"Mag.Atk.Bns."+14','"Fast Cast"+3','"Dual Wield"+4',}},
hands={ name="Herculean Gloves", augments={'Mag. Acc.+17 "Mag.Atk.Bns."+17','"Fast Cast"+5','MND+5','Mag. Acc.+11','"Mag.Atk.Bns."+15',}},
legs={ name="Herculean Trousers", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Crit. hit damage +1%','INT+7','"Mag.Atk.Bns."+15',}},
feet={ name="Herculean Boots", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Crit. hit damage +5%','INT+9','Mag. Acc.+9','"Mag.Atk.Bns."+10',}},
neck="Sanctity Necklace",
waist="Eschan Stone",
left_ear="Hecate's Earring",
right_ear="Friomisi Earring",
left_ring="Arvina Ringlet +1",
right_ring="Archon Ring",
back={ name="Gunslinger's Cape", augments={'Enmity-2','"Mag.Atk.Bns."+3','"Phantom Roll" ability delay -2','Weapon skill damage +5%',}}}
sets.WS['Leaden Salute'].MidACC = set_combine(sets.WS['Leaden Salute'],{
left_ear="Hermetic Earring",
right_ear="Gwati Earring"})
sets.WS['Leaden Salute'].HighACC = set_combine(sets.WS['Leaden Salute'].MidACC,{
right_ring="Sangoma Ring"})
-- Requiescat Sets --
sets.WS['Requiescat'] = {}
sets.WS['Requiescat'].MidACC = set_combine(sets.WS['Requiescat'],{})
sets.WS['Requiescat'].HighACC = set_combine(sets.WS['Requiescat'].MidACC,{})
-- Elemental Obi --
sets.Obi = {}
sets.Obi.Lightning = {waist="Hachirin-no-Obi"}
sets.Obi.Water = {waist="Hachirin-no-Obi"}
sets.Obi.Fire = {waist="Hachirin-no-Obi"}
sets.Obi.Ice = {waist="Hachirin-no-Obi"}
sets.Obi.Wind = {waist="Hachirin-no-Obi"}
sets.Obi.Earth = {waist="Hachirin-no-Obi"}
sets.Obi.Light = {waist="Hachirin-no-Obi"}
sets.Obi.Dark = {waist="Hachirin-no-Obi"}
-- JA Sets --
sets.JA = {}
sets.JA["Random Deal"] = {body="Lanun Frac +1"}
sets.JA.Fold = {hands="Lanun Gants +1"}
sets.JA["Snake Eye"] = {legs="Lanun Culottes +1"}
sets.JA["Wild Card"] = {feet="Lanun Bottes +1"}
sets.JA["Triple Shot"] = {body="Chasseur's Frac +1"}
-- Waltz Set --
sets.Waltz = {}
sets.Precast = {}
--Fastcast Set --
sets.Precast.FastCast = {head="Carmine Mask",
ear1="Etiolation Earring",
ear2="Loquacious Earring",
body={ name="Taeon Tabard", augments={'Accuracy+16 Attack+16','"Fast Cast"+5','AGI+9',}},
hands="Leyline Gloves",
ring1="Prolix Ring",
legs={ name="Rawhide Trousers", augments={'MP+50','"Fast Cast"+5','"Refresh"+1',}},
feet="Carmine Greaves"}
sets.Midcast = {}
-- Magic Haste Set --
sets.Midcast.Haste = set_combine(sets.Precast.FastCast,{})
-- Cure Set --
sets.Midcast.Cure = set_combine(sets.Midcast.Haste,{})
sets.misc = {main="Fettering Blade",
sub="Demers. Degen +1",
ammo="Compensator",
head="Trump Card",
neck="Sublime Sushi",
ear1="Nvrch. Culottes +2",
ring1="Fomalhaut",
ring2="Atoyac"}
end
function pretarget(spell,action)
if spell.action_type == 'Magic' and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
cancel_spell()
send_command('input /item "Echo Drops" <me>')
elseif spell.type == "CorsairRoll" and buffactive[spell.english] then -- Change Any Rolls To Double-Up When You Have A Roll Up --
cancel_spell()
send_command('doubleup')
elseif spell.english == "Seigan" and buffactive.Seigan then -- Change Seigan To Third Eye If Seigan Is On --
cancel_spell()
send_command('ThirdEye')
elseif spell.english == "Meditate" and player.tp > 2900 then -- Cancel Meditate If TP Is Above 2900 --
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: ' .. player.tp)
elseif spell.action_type == 'Ranged Attack' then
if spell.target.distance > 24.9 then -- Cancel Ranged Attack If You Are Out Of Range --
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
else
if AutoMode == 'ON' and not buffactive.amnesia then -- Auto WS/Triple Shot --
if player.tp >= 1000 then
cancel_spell()
autoWS()
elseif windower.ffxi.get_ability_recasts()[84] < 1 then
cancel_spell()
send_command('TripleShot')
end
end
end
elseif spell.type == 'WeaponSkill' and player.status == 'Engaged' then
if spell.skill == 'Marksmanship' then
if spell.target.distance > 16+target_distance then
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
end
else
if spell.target.distance > target_distance then
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
end
end
end
end
function precast(spell,action)
if spell.action_type == 'Ranged Attack' or spell.type == "WeaponSkill" then
if player.equipment.ammo == "Animikii Bullet" then -- Cancel Ranged Attack or WS If You Have Animikii Bullet Equipped --
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: [Animikii Bullet Equipped!]')
return
else
local check_ammo
local check_ammo_count = 1
if spell.action_type == 'Ranged Attack' then
check_ammo = player.equipment.ammo
if player.equipment.ammo == 'empty' or player.inventory[check_ammo].count <= check_ammo_count then
add_to_chat(123, spell.name..' Canceled: [Out of Ammo]')
cancel_spell()
return
else
equip(sets.Preshot,(buffactive["Triple Shot"] and {body="Chasseur's Frac +1"} or {}))
if player.inventory[check_ammo].count <= ammo_warning_limit and player.inventory[check_ammo].count > 1 and not warning then
add_to_chat(039, '***** [Low Ammo Warning!] *****')
warning = true
elseif player.inventory[check_ammo].count > ammo_warning_limit and warning then
warning = false
end
end
elseif spell.type == "WeaponSkill" then
equipSet = sets.WS
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
end
if spell.english == "Last Stand" and (player.tp > 2990 or buffactive.Sekkanoki) then -- Equip Altdorf's Earring and Wilhelm's Earring When You Have 3000 TP or Sekkanoki For Last Stand --
equipSet = set_combine(equipSet,{ear1="Altdorf's Earring",ear2="Wilhelm's Earring"})
end
equip(equipSet)
end
end
elseif spell.type == "JobAbility" then
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
if spell.english == "Snake Eye" then -- Auto Double-Up After You Use Snake Eye --
send_command('@wait 1;input /ja Double-Up <me>')
end
end
elseif spell.type == "CorsairRoll" or spell.english == "Double-Up" then
equip(sets[luzaf])
if spell.english == "Tactician's Roll" then -- Change Tactician's Roll Equipment Here --
equip({body="Chasseur's Frac +1"})
elseif spell.english == "Caster's Roll" then -- Change Caster's Roll Equipment Here --
equip({legs="Nvrch. Culottes +2"})
elseif spell.english == "Courser's Roll" then -- Change Courser's Roll Equipment Here --
equip({feet="Chass. Bottes +1"})
elseif spell.english == "Blitzer's Roll" then -- Change Blitzer's Roll Equipment Here --
equip({head="Chass. Tricorne +1"})
elseif spell.english == "Allies' Roll" then -- Change Allies' Roll Equipment Here --
equip({hands="Chasseur's Gants +1"})
end
elseif spell.type == "CorsairShot" then
equipSet = sets.QD
if ACC_Shots:contains(spell.english) then
equipSet = sets.QD.HighACC
else
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if not ACC_Shots:contains(spell.english) and (world.day_element == spell.element or world.weather_element == spell.element) and sets.Obi[spell.element] and Obi == 'ON' then -- Use Obi Toggle To Unlock Elemental Obi --
equipSet = set_combine(equipSet,sets.Obi[spell.element])
end
end
equip(equipSet)
elseif spell.action_type == 'Magic' then
if spell.english == 'Utsusemi: Ni' then
if buffactive['Copy Image (3)'] then
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
return
else
equip(sets.Precast.FastCast)
end
else
equip(sets.Precast.FastCast)
end
elseif spell.type == "Waltz" then
refine_waltz(spell,action)
equip(sets.Waltz)
elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
cast_delay(0.2)
send_command('cancel Sneak')
end
end
function midcast(spell,action)
if spell.action_type == 'Ranged Attack' then
equipSet = sets.Midshot
if equipSet[player.equipment.range] then
equipSet = equipSet[player.equipment.range]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if buffactive["Triple Shot"] then
equipSet = set_combine(equipSet,{body="Chasseur's Frac +1"})
end
equip(equipSet)
elseif spell.action_type == 'Magic' then
if spell.english:startswith('Cur') and spell.english ~= "Cursna" then
equip(sets.Midcast.Cure)
elseif spell.english == "Stoneskin" then
if buffactive.Stoneskin then
send_command('@wait 2.8;cancel stoneskin')
end
equip(sets.Midcast.Stoneskin)
elseif spell.english == "Sneak" then
if spell.target.name == player.name and buffactive['Sneak'] then
send_command('cancel sneak')
end
equip(sets.Midcast.Haste)
elseif spell.english:startswith('Utsusemi') then
if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then
send_command('@wait 1.7;cancel Copy Image*')
end
equip(sets.Midcast.Haste)
elseif spell.english == 'Monomi: Ichi' then
if buffactive['Sneak'] then
send_command('@wait 1.7;cancel sneak')
end
equip(sets.Midcast.Haste)
else
equip(sets.Midcast.Haste)
end
end
end
function aftercast(spell,action)
if spell.action_type == 'Ranged Attack' and AutoMode == 'ON' then
autoRA()
else
status_change(player.status)
end
if not spell.interrupted then
if spell.type == "WeaponSkill" then
send_command('wait 0.2;gs c TP')
elseif spell.type == 'CorsairRoll' then
display_roll_info(spell)
elseif spell.english == 'Light Shot' then -- Sleep Countdown --
send_command('wait 50;input /echo '..spell.name..' Effect: [WEARING OFF IN 10 SEC.];wait 10;input /echo '..spell.name..' Effect: [OFF]')
end
end
end
function status_change(new,old)
check_equip_lock()
if Armor == 'PDT' then
equip(sets.PDT)
elseif Armor == 'MDT' then
equip(sets.MDT)
elseif new == 'Engaged' then
equipSet = sets.Melee
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
end
if world.area:endswith('Adoulin') then
equipSet = set_combine(equipSet,{body="Councilor's Garb"})
end
equip(equipSet)
elseif new == 'Idle' then
equip(sets.Idle[IdleArray[IdleIndex]])
elseif new == 'Resting' then
equip(sets.Resting)
end
end
function buff_change(buff,gain)
buff = string.lower(buff)
if buff == "aftermath: lv.3" then -- AM3 Timer/Countdown --
if gain then
send_command('timers create "Aftermath: Lv.3" 180 down;wait 150;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 15;input /echo Aftermath: Lv.3 [WEARING OFF IN 15 SEC.];wait 5;input /echo Aftermath: Lv.3 [WEARING OFF IN 10 SEC.]')
else
send_command('timers delete "Aftermath: Lv.3"')
add_to_chat(123,'AM3: [OFF]')
end
elseif buff == 'weakness' then -- Weakness Timer --
if gain then
send_command('timers create "Weakness" 300 up')
else
send_command('timers delete "Weakness"')
end
end
if not midaction() then
status_change(player.status)
end
end
-- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
function self_command(command)
if command == 'C1' then -- Accuracy Level Toggle --
AccIndex = (AccIndex % #AccArray) + 1
status_change(player.status)
add_to_chat(200,'Accuracy Level: ' .. AccArray[AccIndex])
elseif command == 'C5' then -- Auto Update Gear Toggle --
status_change(player.status)
add_to_chat(200,'Auto Update Gear')
elseif command == 'C3' then -- Obi Toggle --
if Obi == 'ON' then
Obi = 'OFF'
add_to_chat(158,'Obi: [OFF]')
else
Obi = 'ON'
add_to_chat(123,'Obi: [ON]')
end
status_change(player.status)
elseif command == 'C7' then -- PDT Toggle --
if Armor == 'PDT' then
Armor = 'None'
add_to_chat(158,'PDT Set: [Unlocked]')
else
Armor = 'PDT'
add_to_chat(123,'PDT Set: [Locked]')
end
status_change(player.status)
elseif command == 'C15' then -- MDT Toggle --
if Armor == 'MDT' then
Armor = 'None'
add_to_chat(158,'MDT Set: [Unlocked]')
else
Armor = 'MDT'
add_to_chat(123,'MDT Set: [Locked]')
end
status_change(player.status)
elseif command == 'C17' then -- Lock Main Weapon Toggle --
if Lock_Main == 'ON' then
Lock_Main = 'OFF'
add_to_chat(158,'Main Weapon: [Unlocked]')
else
Lock_Main = 'ON'
add_to_chat(123,'Main Weapon: [Locked]')
end
status_change(player.status)
elseif command == 'C8' then -- Distance Toggle --
if player.target.distance then
target_distance = math.floor(player.target.distance*10)/10
add_to_chat(158,'Distance: '..target_distance)
else
add_to_chat(123,'No Target Selected')
end
elseif command == 'C6' then -- Idle Toggle --
IdleIndex = (IdleIndex % #IdleArray) + 1
status_change(player.status)
add_to_chat(200,'Idle Set: ' .. IdleArray[IdleIndex])
elseif command == 'C2' then -- Auto RA/WS Toggle. *Don't Rely On This. It Isn't As Fast As Shooting Manually. It Is Mainly For AFK or When You Dualbox* --
if AutoMode == 'ON' then
AutoMode = 'OFF'
add_to_chat(158,'Auto Mode: [OFF]')
else
AutoMode = 'ON'
add_to_chat(123,'Auto Mode: [ON]')
end
elseif command == 'TP' then
add_to_chat(200,'TP Return: ['..tostring(player.tp)..']')
elseif command:match('^SC%d$') then
send_command('//' .. sc_map[command])
end
if command=="luzaf" then
if luzaf=="luzafon" then
luzaf="luzafoff"
add_to_chat(158, "Luzaf ring off for rolls")
else
luzaf="luzafon"
add_to_chat(123, "Luzaf ring on for rolls")
end
end
end
function check_equip_lock() -- Lock Equipment Here --
if player.equipment.left_ring == "Warp Ring" or player.equipment.left_ring == "Capacity Ring" or player.equipment.right_ring == "Warp Ring" or player.equipment.right_ring == "Capacity Ring" then
disable('ring1','ring2')
elseif player.equipment.back == "Mecisto. Mantle" or player.equipment.back == "Aptitude Mantle +1" or player.equipment.back == "Aptitude Mantle" then
disable('back')
elseif Lock_Main == 'ON' then
disable('main','sub')
else
enable('main','sub','ring1','ring2','back')
end
end
function autoRA() -- Make Auto RA Delay Adjustment Here --
local delay = '2.2'
if spell.type == "WeaponSkill" then
delay = '2.25'
else
if buffactive["Courser's Roll"] then
delay = '0.7'
elseif buffactive[581] then -- Flurry II --
delay = '0.5'
else
delay = '1.05'
end
end
send_command('@wait '..delay..'; input /ra <t>')
end
function autoWS()
send_command('input /ws "'..AutoGunWS..'" <t>')
end
function define_roll_values()
rolls = {
CorsairsRoll = {lucky=5, unlucky=9, bonus="Experience Points"},
NinjaRoll = {lucky=4, unlucky=8, bonus="Evasion"},
HuntersRoll = {lucky=4, unlucky=8, bonus="Accuracy"},
ChaosRoll = {lucky=4, unlucky=8, bonus="Attack"},
MagussRoll = {lucky=2, unlucky=6, bonus="Magic Defense"},
HealersRoll = {lucky=3, unlucky=7, bonus="Cure Potency Received"},
PuppetRoll = {lucky=4, unlucky=8, bonus="Pet Magic Accuracy/Attack"},
ChoralRoll = {lucky=2, unlucky=6, bonus="Spell Interruption Rate"},
MonksRoll = {lucky=3, unlucky=7, bonus="Subtle Blow"},
BeastRoll = {lucky=4, unlucky=8, bonus="Pet Attack"},
SamuraiRoll = {lucky=2, unlucky=6, bonus="Store TP"},
EvokersRoll = {lucky=5, unlucky=9, bonus="Refresh"},
RoguesRoll = {lucky=5, unlucky=9, bonus="Critical Hit Rate"},
WarlocksRoll = {lucky=4, unlucky=8, bonus="Magic Accuracy"},
FightersRoll = {lucky=5, unlucky=9, bonus="Double Attack Rate"},
DrachenRoll = {lucky=3, unlucky=7, bonus="Pet Accuracy"},
GallantsRoll = {lucky=3, unlucky=7, bonus="Defense"},
WizardsRoll = {lucky=5, unlucky=9, bonus="Magic Attack"},
DancersRoll = {lucky=3, unlucky=7, bonus="Regen"},
ScholarsRoll = {lucky=2, unlucky=6, bonus="Conserve MP"},
BoltersRoll = {lucky=3, unlucky=9, bonus="Movement Speed"},
CastersRoll = {lucky=2, unlucky=7, bonus="Fast Cast"},
CoursersRoll = {lucky=3, unlucky=9, bonus="Snapshot"},
BlitzersRoll = {lucky=4, unlucky=9, bonus="Attack Delay"},
TacticiansRoll = {lucky=5, unlucky=8, bonus="Regain"},
AlliessRoll = {lucky=3, unlucky=10, bonus="Skillchain Damage"},
MisersRoll = {lucky=5, unlucky=7, bonus="Save TP"},
CompanionsRoll = {lucky=2, unlucky=10, bonus="Pet Regain and Regen"},
AvengersRoll = {lucky=4, unlucky=8, bonus="Counter Rate"}
}
end
function display_roll_info(spell)
rollinfo = rolls[(string.gsub((string.gsub(spell.english, "%'+", "")), "%s+", ""))]
if rollinfo then
add_to_chat(050, spell.english..' = '..rollinfo.bonus..'. Lucky Roll is '..
tostring(rollinfo.lucky)..', Unlucky Roll is '..tostring(rollinfo.unlucky)..'.')
end
end
function refine_waltz(spell,action)
if spell.type ~= 'Waltz' then
return
end
if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" or spell.name == "Divine Waltz II" then
return
end
local newWaltz = spell.english
local missingHP = 0
local targ
if spell.target.type == "SELF" then
targ = alliance[1][1]
missingHP = player.max_hp - player.hp
elseif spell.target.isallymember then
targ = find_player_in_alliance(spell.target.name)
local est_max_hp = targ.hp / (targ.hpp/100)
missingHP = math.floor(est_max_hp - targ.hp)
end
if targ then
if player.sub_job == 'DNC' then
if missingHP < 40 then
add_to_chat(123,'Full HP!')
cancel_spell()
return
elseif missingHP < 150 then
newWaltz = 'Curing Waltz'
elseif missingHP < 300 then
newWaltz = 'Curing Waltz II'
else
newWaltz = 'Curing Waltz III'
end
else
return
end
end
local waltzTPCost = {['Curing Waltz'] = 20,['Curing Waltz II'] = 35,['Curing Waltz III'] = 50,['Curing Waltz IV'] = 65,['Curing Waltz V'] = 80}
local tpCost = waltzTPCost[newWaltz]
local downgrade
if player.tp < tpCost and not buffactive.trance then
if player.tp < 20 then
add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
cancel_spell()
return
elseif player.tp < 35 then
newWaltz = 'Curing Waltz'
elseif player.tp < 50 then
newWaltz = 'Curing Waltz II'
elseif player.tp < 65 then
newWaltz = 'Curing Waltz III'
elseif player.tp < 80 then
newWaltz = 'Curing Waltz IV'
end
downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
end
if newWaltz ~= spell.english then
send_command('wait 0.03;input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
if downgrade then
add_to_chat(8, downgrade)
end
cancel_spell()
return
end
if missingHP > 0 then
add_to_chat(8,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
end
end
function find_player_in_alliance(name)
for i,v in ipairs(alliance) do
for k,p in ipairs(v) do
if p.name == name then
return p
end
end
end
end
function actualCost(originalCost)
if buffactive["Penury"] then
return originalCost*.5
elseif buffactive["Light Arts"] then
return originalCost*.9
else
return originalCost
end
end
function degrade_spell(spell,degrade_array)
spell_index = table.find(degrade_array,spell.name)
if spell_index>1 then
new_spell = degrade_array[spell_index - 1]
change_spell(new_spell,spell.target.raw)
add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
end
end
function change_spell(spell_name,target)
cancel_spell()
send_command('//'..spell_name..' '..target)
end
function sub_job_change(newSubjob, oldSubjob)
select_default_macro_book()
end
function set_macro_page(set,book)
if not tonumber(set) then
add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
return
end
if set < 1 or set > 10 then
add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
return
end
if book then
if not tonumber(book) then
add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
return
end
if book < 1 or book > 20 then
add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
return
end
send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
else
send_command('@input /macro set '..tostring(set))
end
end
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'SAM' then
set_macro_page(1, 2)
elseif player.sub_job == 'WHM' then
set_macro_page(1, 2)
elseif player.sub_job == 'DNC' then
set_macro_page(1, 2)
elseif player.sub_job == 'NIN' then
set_macro_page(1, 2)
elseif player.sub_job == 'RDM' then
set_macro_page(1, 2)
elseif player.sub_job == 'WAR' then
set_macro_page(1, 2)
elseif player.sub_job == 'DRG' then
set_macro_page(1, 2)
else
set_macro_page(1, 5)
end
end
And I am getting this error when I use a ranged attack. It doesn't swap any gear then: Code Gearswap: Lua runtime error: GearSwap/flow.lua:336:
Gearswap has deteced an error in the user function precast:
...areEnixWindower/addons/GearSwap/data/Lior/COR.lua:384 attempt to index field '?' (a nil value)
Please help :/
Shiva.Hiep
Serveur: Shiva
Game: FFXI
Posts: 669
By Shiva.Hiep 2016-07-18 17:14:29
How would I have my Chironic Slippers (MACC piece) swap in for my MACC/MB set? It's still swapping in my Arbatel Loafers during Klimaform Voidstorm. Also another question, but how would I make a MB Impact set using the format sets.magic_burst?
Ragnarok.Flippant
Serveur: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-07-18 18:58:42
Since everyone in my shell told me that GearSwap would work with wardrobe 3/4 now I got those myself. Sadly, I get issues while everyone says "mine is working fine" ... could it be my .lua? It did work fine before I started to use wardrobe 3/4. I hope there is another solution than not to use 3/4 now...
The logic on line 384 might be a little broken if you moved your ammo to a wardrobe. You can tweak it a little so that will stop giving you an indexing error, but that particular condition will keep checking true if your ammo isn't in your inventory, and thus keep telling you you are low on ammo and cancel your action.
Either change lines 382-396 (there are other indexing holes), and move ammo into inventory (which seems logical since it's being consumed) Code if spell.action_type == 'Ranged Attack' then
check_ammo = player.equipment.ammo
if player.equipment.ammo == 'empty' or not player.inventory[check_ammo] or player.inventory[check_ammo].count <= check_ammo_count then
add_to_chat(123, spell.name..' Canceled: [Out of Ammo]')
cancel_spell()
return
else
equip(sets.Preshot,(buffactive["Triple Shot"] and {body="Chasseur's Frac +1"} or {}))
if player.inventory[check_ammo] and player.inventory[check_ammo].count <= ammo_warning_limit and player.inventory[check_ammo].count > 1 and not warning then
add_to_chat(039, '***** [Low Ammo Warning!] *****')
warning = true
elseif player.inventory[check_ammo] and player.inventory[check_ammo].count > ammo_warning_limit and warning then
warning = false
end
end
Or delete lines 380-388 and 390-396.
If your ammo is already in inventory, I'll try to test in game what the problem might be. If you want to keep those rules, but with your ammo in wardrobe, I'll look for a solution.
How would I have my Chironic Slippers (MACC piece) swap in for my MACC/MB set? It's still swapping in my Arbatel Loafers during Klimaform Voidstorm. Also another question, but how would I make a MB Impact set using the format sets.magic_burst?
You should just be able to put them into the set, since what Lygre posted is handling it in post_midcast, and all the rules come after the apply_grimoire_bonuses. If it's not working, then you'll need to post your entire file.
Made a few changes to that code. Any MB set you want to specify would be sets.magic_burst[spell.english][spellMap][state.CastingMode.value], where each of these are optional. For example, sets.magic_burst.Impact, sets.magic_burst.Impact.MACC, or sets.magic_burst.Helix, etc.
Also moved the weather checks after MB sets because I figure you want those on during MBs as well. Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value and sets.magic_burst then
local equipSet = sets.magic_burst
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[spellMap] then
equipSet = equipSet[spellMap]
end
if equipSet[state.CastingMode.value] then
equipSet = equipSet[state.CastingMode.value]
end
equip(equipSet)
end
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.Obi)
if string.find(spell.english,'helix') and state.MagicBurst.value then
equip({back=gear.HelixCape})
end
end
end
if string.find(spell.english,'Cur') and spell.english~="Cursna" and spell.target.name == player.name then
equip(sets.midcast.SelfCure)
end
end
end
Is there a reason for HelixCape to only be equipped during a MB? (I don't know anything about SCH)
Odin.Lygre
Serveur: Odin
Game: FFXI
Posts: 89
By Odin.Lygre 2016-07-18 20:45:28
Ragnarok.Flippant said: »You should just be able to put them into the set, since what Lygre posted is handling it in post_midcast, and all the rules come after the apply_grimoire_bonuses. If it's not working, then you'll need to post your entire file.
Made a few changes to that code. Any MB set you want to specify would be sets.magic_burst[spell.english][spellMap][state.CastingMode.value], where each of these are optional. For example, sets.magic_burst.Impact, sets.magic_burst.Impact.MACC, or sets.magic_burst.Helix, etc.
Also moved the weather checks after MB sets because I figure you want those on during MBs as well. Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value and sets.magic_burst then
local equipSet = sets.magic_burst
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[spellMap] then
equipSet = equipSet[spellMap]
end
if equipSet[state.CastingMode.value] then
equipSet = [state.CastingMode.value]
end
equip(equipSet)
end
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.Obi)
if string.find(spell.english,'helix') and state.MagicBurst.value then
equip({back=gear.HelixCape})
end
end
end
if string.find(spell.english,'Cur') and spell.english~="Cursna" and spell.target.name == player.name then
equip(sets.midcast.SelfCure)
end
end
end
Is there a reason for HelixCape to only be equipped during a MB? (I don't know anything about SCH)
I have it there just for personal use soloing. That cape has max helix duration on it.
Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value and sets.magic_burst then
local equipSet = sets.magic_burst
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[spellMap] then
equipSet = equipSet[spellMap]
end
if equipSet[state.CastingMode.value] then
equipSet = equipSet[state.CastingMode.value]
end
equip(equipSet)
end
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.Obi)
if string.find(spell.english,'helix') and state.MagicBurst.value then
equip({back=gear.HelixCape})
end
end
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
end
if string.find(spell.english,'Cur') and spell.english~="Cursna" and spell.target.name == player.name then
equip(sets.midcast.SelfCure)
end
end
end
Moved the grimoire bonuses to after the other rules, like you said, in case the MB set overwrites your feet slot etc. Also added an 'equipSet' I think you forgot.
EDIT: Apparently you wanted it the other way, my bad. Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value and sets.magic_burst then
local equipSet = sets.magic_burst
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[spellMap] then
equipSet = equipSet[spellMap]
end
if equipSet[state.CastingMode.value] then
equipSet = equipSet[state.CastingMode.value]
end
equip(equipSet)
end
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.Obi)
if string.find(spell.english,'helix') and state.MagicBurst.value then
equip({back=gear.HelixCape})
end
end
end
if string.find(spell.english,'Cur') and spell.english~="Cursna" and spell.target.name == player.name then
equip(sets.midcast.SelfCure)
end
end
end
Ragnarok.Flippant
Serveur: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-07-18 21:25:09
Indeed, thanks; edited it.
And yeah, I was thinking he wanted the SCH feet overwritten in both the macc and normal MB set, but looking back, he could have meant just the "macc MB" set...which would require recalling that function afterwards based on the condition that it's not macc mode.
Serveur: Asura
Game: FFXI
Posts: 127
By Asura.Brennski 2016-07-20 04:00:10
Hi I'm still having trouble with my GearSwap equipping DT sets while stunned Terrored or asleep and my Cursana received gear when doomed. Can anyone look at my LUA and see if Im making a stupid mistake and how to fix it?
Code
--To toggle gearsets:
--Main command: //gs c toggle x set where x = set name variable. Variables are as follows: --
--Idle sets: Idle, TP sets: TP--
--Resolution sets: Res, Requiescat sets: Req--
function get_sets()
send_command('bind f9 gs c toggle TP set')
send_command('bind f10 gs c toggle Idle set')
send_command('bind f11 gs c toggle CDC set')
send_command('bind f12 gs c toggle Req set')
send_command('bind !f12 gs c toggle Rea set')
send_command('bind ^` gs c toggle MB set')
function file_unload()
send_command('unbind ^f9')
send_command('unbind ^f10')
send_command('unbind ^f11')
send_command('unbind ^f12')
send_command('unbind ^`')
send_command('unbind !f9')
send_command('unbind !f10')
send_command('unbind !f11')
send_command('unbind !f12')
send_command('unbind f9')
send_command('unbind f10')
send_command('unbind f11')
send_command('unbind f12')
end
--Idle Sets--
sets.Idle = {}
sets.Idle.index = {'Standard', 'Cleave'}
Idle_ind = 1
sets.Idle.Standard = {ammo="Homiliary",
head="Rawhide Mask",neck="Sanctity Necklace", ear1="Genmei earring",ear2="Infused Earring",
body="Runeist coat +1",hands="Herculean gloves",ring1="Warden's ring",ring2="Gelatinous Ring +1",
back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+3','Enmity+10',}},
waist="Fucho-no-obi",legs="Carmine Cuisses",feet={ name="Herculean Boots", augments={'CHR+6','STR+14','"Refresh"+1','Mag. Acc.+14 "Mag.Atk.Bns."+14',}}}
sets.Idle.Cleave = { ammo ="Staunch Tathlum",
head={ name="Herculean Helm", augments={'Accuracy+19 Attack+19','Damage taken-3%','AGI+3','Accuracy+2',}},neck="Loricate Torque +1", ear1="Etiolation Earring",ear2="Infused Earring",
body="Emet harness +1",hands="Runeist mitons +1",ring1="Warden's ring",ring2="Gelatinous Ring +1",
back="Evasionist's cape",waist="Flume Belt +1",legs="Carmine Cuisses",feet="Erilaz Greaves +1"}
--TP Sets--
sets.TP = {}
sets.TP.index = {'Standard', 'Tank', 'DT', 'DTAccuracy', 'DW'}
--1=Standard, 2 = Tank,3=DT, 4=DTAccuracy, 5=DW,--
TP_ind = 1
sets.TP.Standard = { sub ="Nepenthe Grip",ammo="Ginsen",
head="Adhemar Bonnet", neck="Lissome necklace", ear1="Brutal Earring", ear2="Cessance earring",
body="Herculean Vest",hands="Adhemar Wristbands",ring1="Cacoethic Ring",ring2="Epona's Ring",
back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
waist="Ioskeha Belt",legs="Samnuha Tights",feet={ name="Herculean Boots", augments={'Accuracy+20 Attack+20','"Triple Atk."+4',}} }
sets.TP.Tank = {sub="Refined Grip +1",ammo="Staunch Tathlum",
head={ name="Herculean Helm", augments={'Accuracy+19 Attack+19','Damage taken-3%','AGI+3','Accuracy+2',}},neck="Loricate Torque +1", ear1="Genmei Earring", ear2="Etiolation Earring",
body="Erilaz Surcoat +1",hands="Kurys Gloves",ring1="Warden's ring",ring2="Gelatinous Ring +1",
back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+3','Enmity+10',}},
waist="Flume Belt +1",legs="Erilaz Leg Guards +1",feet="Erilaz Greaves +1"}
sets.TP.DT = {ammo="Amar Cluster",
head={ name="Herculean Helm", augments={'Accuracy+19 Attack+19','Damage taken-3%','AGI+3','Accuracy+2',}},neck="Loricate Torque +1", ear1="Genmei Earring", ear2="Cessance earring",
body="Emet harness +1",hands="Kurys Gloves",ring1="Dark ring",ring2="Petrov Ring",
back="Solemnity Cape",waist="Flume belt +1",legs="Erilaz Leg Guards +1",feet="Erilaz Greaves +1"}
sets.TP.DTAccuracy = {ammo="Amar Cluster",
head={ name="Herculean Helm", augments={'Accuracy+19 Attack+19','Damage taken-3%','AGI+3','Accuracy+2',}},neck="Loricate Torque +1", ear1="Genmei Earring", ear2="Cessance earring",
body="Emet harness +1",hands="Kurys Gloves",ring1="Cacoethic ring",ring2="Gelatinous Ring +1",
back="Evasionist's Cape",waist="Flume belt +1",legs="Erilaz Leg Guards +1",feet={ name="Herculean Boots", augments={'Accuracy+20 Attack+20','"Triple Atk."+4',}} }
sets.TP.DW = {ammo="Honed tathlum",
head="Adhemar Bonnet", neck="Lissome Necklace", ear1="Suppanomimi", ear2="Cessance earring",
body="Adhemar Jacket",hands="Adhemar Wristbands",ring1="Cacoethic Ring",ring2="Epona's Ring",
back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
waist="Ioskeha Belt",legs="Samnuha Tights",feet={ name="Herculean Boots", augments={'Accuracy+20 Attack+20','"Triple Atk."+4',}} }
--Weaponskill Sets--
sets.WS = {}
sets.Resolution = {}
sets.Resolution.index = {'Attack'}
Resolution_ind = 1
sets.Resolution.Attack = {ammo="Seething Bomblet +1",
head="Adhemar Bonnet",neck="Fotia gorget",ear1="Brutal Earring",ear2="Cessance Earring",
body="Herculean Vest",hands="Adhemar Wristbands",ring1="Petrov Ring",ring2="Epona's ring",
back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
waist="Fotia belt",legs="Samnuha Tights",feet={ name="Herculean Boots", augments={'Accuracy+20 Attack+20','"Triple Atk."+4',}} }
sets.Dimidiation = {}
sets.Dimidiation.index = {'Attack'}
Dimidiation_ind = 1
sets.Dimidiation.Attack = {ammo="Jukukik Feather",
head="Adhemar Bonnet",neck="Caro Necklace",ear1="Brutal Earring",ear2="Cessance Earring",
body="Herculean Vest",hands="Meg. Gloves +1",ring1="Petrov Ring",ring2="Epona's ring",
back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
waist="Grunfeld Rope",legs={ name="Herculean Trousers", augments={'Attack+7','Weapon skill damage +4%','Accuracy+15',}},feet={ name="Herculean Boots", augments={'Accuracy+21','Crit.hit rate+1','DEX+14','Attack+14',}} }
sets.Requiescat = {}
sets.Requiescat.index = {'Attack'}
Requiescat_ind = 1
sets.Requiescat.Attack = {ammo="Seething Bomblet +1",
head="Adhemar Bonnet",neck="Fotia gorget",ear1="Brutal earring",ear2="Moonshade earring",
body="Wayfarer robe",hands="Wayfarer cuffs",ring1="Petrov Ring",ring2="Aquasoul ring",
back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
waist="Fotia belt",legs="Quiahuiz leggings",feet={ name="Herculean Boots", augments={'Mag. Acc.+15 "Mag.Atk.Bns."+15','VIT+10','"Mag.Atk.Bns."+12',}}}
sets.FellCleave = {}
sets.FellCleave.index = {'Attack'}
FellCleave_ind = 1
sets.FellCleave.Attack = {ammo="Seething Bomblet +1",
head="Adhemar Bonnet",neck="Fotia gorget",ear1="Brutal Earring",ear2="Cessance Earring",
body="Herculean Vest",hands="Adhemar Wristbands",ring1="Petrov Ring",ring2="Epona's ring",
back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
waist="Fotia belt",legs="Samnuha Tights",feet={ name="Herculean Boots", augments={'Accuracy+20 Attack+20','"Triple Atk."+4',}} }
sets.SavageBlade = {}
sets.SavageBlade.index = {'Attack'}
SavageBlade_ind = 1
sets.SavageBlade.Attack = {ammo="Seething Bomblet +1",
head="Adhemar Bonnet",neck="Caro Necklace",ear1="Brutal Earring",ear2="Cessance Earring",
body="Herculean Vest",hands="Meg. Gloves +1",ring1="Petrov Ring",ring2="Epona's ring",
back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
waist="Grunfeld Rope",legs={ name="Herculean Trousers", augments={'Attack+7','Weapon skill damage +4%','Accuracy+15',}},
feet={ name="Herculean Boots", augments={'Accuracy+20 Attack+20','"Triple Atk."+4',}}}
--Utility Sets--
sets.Utility = {}
sets.Utility.Phalanx = {ammo ="Sapience Orb", head="Futhark bandeau +1",neck="Incanter's Torque",ear1 ="Lifestorm Earring", ear1="Genmei earring",
body="Emet harness +1",hands="Kurys Gloves", waist ="Olympus Sash", ring1='Begrudging Ring', ring2='Supershear Ring',
legs="Carmine Cuisses",feet="Erilaz Greaves +1", back="Evasionist's cape"}
sets.Utility.Regen = {head="Runeist Bandeau",neck="Incanter's Torque",ear1="Genmei earring",ear2="Augment. earring",
body="Futhark coat",hands="Runeist mitons +1",ring1="Prolix ring", ring2='Supershear Ring',
back="Swith cape",waist="Pythia sash +1",legs="Futhark trousers",feet="Runeist bottes"}
sets.Utility.SID = {ammo ="Staunch Tathlum", head="Herculean Helm",neck="Incanter's Torque",ear1="Genmei earring", ear2 = "Halasz Earring",
body="Emet Harness +1",hands="Herculean Gloves",ring1="Evanescence Ring", ring2='Supershear Ring',
back="Evasionist cape",waist="Flume Belt +1",legs="Carmine Cuisses",feet="Erilaz Greaves +1" }
sets.Utility.Enmity = {ammo="Sapience Orb",head="Rapid Visor",neck="Warder's Charm",ear2 ="Friomisi Earring", ear1="Genmei earring",
body="Emet harness +1",hands="Kurys Gloves", waist ="Kasiri Belt", ring1='Begrudging Ring', ring2='Supershear Ring',
legs="Erilaz Leg Guards +1",feet="Erilaz Greaves +1", back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+3','Enmity+10',}}}
sets.Utility.Enhancing = {ammo="Sapience Orb",head="Erilaz Galea",neck="Incanter's Torque",ear1 ="Andoaa Earring", ear1="Genmei earring",
body="Emet harness +1",hands="Kurys Gloves", waist ="Olympus Sash", ring1='Begrudging Ring', ring2='Supershear Ring',
legs="Carmine Cuisses",feet="Erilaz Greaves +1", back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+3','Enmity+10',}}}
sets.Utility.Doomed = {waist="Gishdubar Sash", ring1 ="Saida Ring"}
--Job Ability Sets--
sets.JA = {}
sets.JA.VP = {ammo="Sapience Orb",head="Erilaz Galea",neck="Incanter's Torque",ear1 ="Andoaa Earring", ear1="Genmei earring",
body="Emet harness +1",hands="Kurys Gloves", waist ="Olympus Sash", ring1='Begrudging Ring', ring2='Supershear Ring',
legs="Runeist Trousers",feet="Erilaz Greaves +1", back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+3','Enmity+10',}}}
sets.JA.Embolen = {ammo="Sapience Orb",head="Erilaz Galea",neck="Incanter's Torque",ear1 ="Andoaa Earring", ear1="Genmei earring",
body="Emet harness +1",hands="Kurys Gloves", waist ="Olympus Sash", ring1='Begrudging Ring', ring2='Supershear Ring',
legs="Carmine Cuisses",feet="Erilaz Greaves +1",back="Evasionist cape"}
sets.JA.Lunge = {ammo="Seething Bomblet +1",
head={ name="Herculean Helm", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Dbl.Atk."+2','Mag. Acc.+12','"Mag.Atk.Bns."+4',}},neck="Sanctity Necklace",ear2="Friomisi earring", ear1="Hecate's Earring",
body="Samnuha Coat",hands="Leyline Gloves", ring1="Acumen Ring", ring2 ='Arvina Ringlet +1', waist ="Eschan Stone",
back="Evasionist's cape",legs="Herculean Trousers",feet={ name="Herculean Boots", augments={'Mag. Acc.+15 "Mag.Atk.Bns."+15','VIT+10','"Mag.Atk.Bns."+12',}}}
sets.JA.Vallation = {head = "Rapid Visor", body="Runeist coat +1",legs="Futhark trousers", ammo="Sapience Orb",neck="Warder's Charm",
ear2="Friomisi Earring", ear1="Genmei earring",hands="Futhark Mitons", waist ="Kasiri Belt", ring1='Begrudging Ring', ring2='Petrov Ring',
feet="Erilaz Greaves +1", legs="Erilaz Leg Guards +1",
back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+3','Enmity+10',}}}
sets.JA.Battuta = {head="Futhark bandeau +1", ammo="Sapience Orb",neck="Warder's Charm",ear2 ="Friomisi Earring", ear1="Genmei earring",
body="Emet harness +1",hands="Futhark Mitons", waist ="Kasiri Belt", ring1='Begrudging Ring', ring2='Petrov Ring',
legs="Erilaz Leg Guards +1",feet="Erilaz Greaves +1",
back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+3','Enmity+10',}}}
sets.JA.Gambit = {hands="Runeist mitons +1", ammo="Sapience Orb",head="Rapid Visor",neck="Warder's Charm",ear2 ="Friomisi Earring", ear1="Genmei earring",
body="Emet harness +1",waist ="Kasiri Belt", ring1='Begrudging Ring', ring2='Petrov Ring',
legs="Erilaz Leg Guards +1",feet="Erilaz Greaves +1",
back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+3','Enmity+10',}}}
sets.JA.Pflug = {feet="Runeist bottes", ammo="Sapience Orb",head="Highwing Helm",neck="Warder's Charm",ear2 ="Friomisi Earring", ear1="Genmei earring",
body="Emet harness +1",hands="Futhark Mitons", waist ="Kasiri Belt", ring1='Begrudging Ring', ring2='Petrov Ring',
legs="Erilaz Leg Guards +1",
back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+3','Enmity+10',}}}
sets.JA.Ryake = {feet = "Futhark Boots",ammo="Sapience Orb",head="Highwing Helm",neck="Warder's Charm",ear2 ="Friomisi Earring", ear1="Genmei earring",
body="Emet harness +1",hands="Futhark Mitons", waist ="Kasiri Belt", ring1='Begrudging Ring', ring2='Petrov Ring',
legs="Erilaz Leg Guards +1",
back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+3','Enmity+10',}}}
--Precast Sets--
sets.precast = {}
sets.precast.FC = {}
sets.precast.FC.Standard = {ammo="Sapience Orb",head="Herculean Helm",neck="Warder's Charm", ear1="Loquac. Earring",ear2="Etiolation Earring",
body="Vrikodara Jupon",hands="Leyline Gloves", waist ="Kasiri Belt",left_ring="Prolix Ring", right_ring="Weatherspoon ring",
legs="Orvail pants +1",feet="Chelona Boots", back="Swith cape"}
sets.precast.FC.Enhancing = {ammo="Sapience Orb",head="Herculean Helm",neck="Jeweled Necklace", ear1="Loquac. Earring", ear2="Etiolation Earring",
body="Vrikodara Jupon",hands="Leyline Gloves", left_ring="Prolix Ring", right_ring="Weatherspoon ring",
legs="Futhark trousers",feet="Chelona Boots"}
sets.precast.FC.Enmity = {ammo="Sapience Orb",head="Herculean Helm",neck="Warder's Charm", ear1="Loquac. Earring", ear2="Etiolation Earring",
body="Vrikodara Jupon",hands="Leyline Gloves", waist ="Kasiri Belt", left_ring="Prolix Ring", right_ring="Weatherspoon ring",
legs="Orvail pants +1",feet="Chelona Boots", back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+3','Enmity+10',}}}
end
function precast(spell)
if spell.skill == 'Enhancing Magic' then
equip(sets.precast.FC.Enhancing)
end
if spell.action_type == 'Ninjutsu' then
equip(sets.precast.FC.Standard)
end
if spell.action_type == 'Magic' then
equip(sets.precast.FC.Standard)
end
if spell.english =='Vivacious Pulse' then
equip(sets.JA.VP)
end
if spell.english == 'Lunge' or spell.english == 'Swipe' then
equip(sets.JA.Lunge)
end
if spell.english == 'Vallation' or spell.english == 'Valiance' then
equip(sets.JA.Vallation)
end
if spell.english=='Flash' then
equip(sets.precast.FC.Enmity)
end
if spell.english == 'Battuta' then
equip(sets.JA.Battuta)
end
if spell.english == 'Pflug' then
equip(sets.JA.Pflug)
end
if spell.english == 'Gambit' then
equip(sets.JA.Gambit)
end
if spell.english == 'Resolution' or spell.english == 'Shockwave' then
equip(sets.Resolution[sets.Resolution.index[Resolution_ind]])
end
if spell.english == 'Dimidiation' then
equip(sets.Dimidiation[sets.Dimidiation.index[Dimidiation_ind]])
end
if spell.english == 'Requiescat' then
equip(sets.Requiescat[sets.Requiescat.index[Requiescat_ind]])
end
if spell.english == 'Fell Cleave' then
equip(sets.FellCleave[sets.FellCleave.index[FellCleave_ind]])
end
if spell.english == 'Savage Blade' then
equip(sets.SavageBlade[sets.SavageBlade.index[SavageBlade_ind]])
end
end
function midcast(spell,act)
if spell.skill == 'Enhancing Magic' then
equip(sets.Utility.Enhancing)
if buffactive['Embolden'] then
equip(sets.JA.Embolen)
end
if string.find(spell.name,'Bar') or spell.name=="Temper" then
equip({hands="Runeist Mitons +1"})
end
end
if spell.english == 'Stoneskin' then
equip(sets.Utility.SID)
if buffactive['Stoneskin'] then
send_command('@wait 0.7; input //cancel Stoneskin; input /echo Refreshing Stoneskin.')
end
end
if spell.english =='Phalanx' then
equip(sets.Utility.Phalanx)
end
if spell.english == 'Regen' or spell.english == 'Regen II' or spell.english =='Regen III' or spell.english == 'Regen IV' then
equip(sets.Utility.Regen)
end
if spell.english == 'Utsusemi: Ichi' then
equip(sets.Utility.SID)
if buffactive['Copy Image (3)'] then
send_command('@wait 0.3; input //cancel Copy Image*')
end
if buffactive['Copy Image (2)'] then
send_command('@wait 0.3; input //cancel Copy Image*')
end
if buffactive['Copy Image (1)'] then
send_command('@wait 0.3; input //cancel Copy Image*')
end
if buffactive['Copy Image'] then
send_command('@wait 0.3; input //cancel Copy Image*')
end
end
if spell.english == 'Utsusemi: Ni' then
equip(sets.Utility.SID)
end
if spell.english =='Flash' or spell.english == 'Crusade' or spell.english == 'Foil' or spell.skill =='Blue Magic' then
equip(sets.Utility.Enmity)
end
end
function aftercast(spell)
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
else
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
if buffactive['doom'] then
equip(sets.Utility.Doom)
end
if buffactive['terror'] or buffactive['stun'] or buffactive['sleep'] then
equip(sets.TP.DT)
end
end
function status_change(new,old)
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
else
equip(sets.Idle[sets.Idle.index[Idle_ind]])
elseif buffactive['doom'] then
equip(sets.Utility.Doom)
end
if buffactive['terror'] or buffactive['stun'] or buffactive['sleep'] then
equip(sets.TP.DT)
end
end
function self_command(command)
if command == 'toggle TP set' then
TP_ind = TP_ind +1
if TP_ind > #sets.TP.index then TP_ind = 1 end
send_command('@input /echo <----- TP Set changed to '..sets.TP.index[TP_ind]..' ----->')
equip(sets.TP[sets.TP.index[TP_ind]])
elseif command == 'toggle Idle set' then
Idle_ind = Idle_ind +1
if Idle_ind > #sets.Idle.index then Idle_ind = 1 end
send_command('@input /echo <----- Idle Set changed to '..sets.Idle.index[Idle_ind]..' ----->')
equip(sets.Idle[sets.Idle.index[Idle_ind]])
elseif command == 'toggle Res set' then
Resolution_ind = Resolution_ind +1
if Resolution_ind > #sets.Resolution.index then Resolution_ind = 1 end
send_command('@input /echo <----- Resolution set changed to '..sets.Resolution.index[Resolution_ind]..' ----->')
elseif command == 'toggle Req set' then
Requiescat_ind = Requiescat_ind +1
if Requiescat_ind > #sets.Requiescat.index then Requiescat_ind = 1 end
send_command('@input /echo <----- Requiescat Set changed to '..sets.Requiescat.index[Requiescat_ind]..' ----->')
elseif command == 'equip TP set' then
equip(sets.TP[sets.TP.index[TP_ind]])
elseif command == 'equip Idle set' then
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
end
Thanks
Odin.Lygre
Serveur: Odin
Game: FFXI
Posts: 89
By Odin.Lygre 2016-07-20 06:50:39
Code function aftercast(spell)
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
else
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
-- if buffactive['doom'] then
-- equip(sets.Utility.Doom)
-- end
-- if buffactive['terror'] or buffactive['stun'] or buffactive['sleep'] then
-- equip(sets.TP.DT)
-- end
end
-- function status_change(new,old)
-- if player.status == 'Engaged' then
-- equip(sets.TP[sets.TP.index[TP_ind]])
-- else
-- equip(sets.Idle[sets.Idle.index[Idle_ind]])
-- elseif buffactive['doom'] then
-- equip(sets.Utility.Doom)
-- end
-- if buffactive['terror'] or buffactive['stun'] or buffactive['sleep'] then
-- equip(sets.TP.DT)
-- end
-- end
function status_change(new,old)
if new == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
elseif new == 'Idle' then
equip(sets.Idle[sets.Idle.index[Idle_ind]])
if buffactive['terror'] or buffactive['stun'] or (buffactive['sleep'] or buffactive['lullaby']) then
equip(sets.TP.DT)
end
end
end
function buff_change(buff, gain)
if (buff == "terror" or buff == "stun" or (buff == 'sleep' or buff == 'lullaby')) then
if gain then
if player.status == 'Engaged' then
equip(sets.TP.DT)
elseif player.status == 'Idle' then
equip(sets.TP.DT)
end
else
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
elseif player.status == 'Idle' then
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
end
end
if buff == "doom" then
if gain then
equip(sets.Utility.Doom)
else
if player.status == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
elseif player.status == 'Idle' then
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
end
end
end
function self_command(command)
if command == 'toggle TP set' then
TP_ind = TP_ind +1
if TP_ind > #sets.TP.index then TP_ind = 1 end
send_command('@input /echo <----- TP Set changed to '..sets.TP.index[TP_ind]..' ----->')
equip(sets.TP[sets.TP.index[TP_ind]])
elseif command == 'toggle Idle set' then
Idle_ind = Idle_ind +1
if Idle_ind > #sets.Idle.index then Idle_ind = 1 end
send_command('@input /echo <----- Idle Set changed to '..sets.Idle.index[Idle_ind]..' ----->')
equip(sets.Idle[sets.Idle.index[Idle_ind]])
elseif command == 'toggle Res set' then
Resolution_ind = Resolution_ind +1
if Resolution_ind > #sets.Resolution.index then Resolution_ind = 1 end
send_command('@input /echo <----- Resolution set changed to '..sets.Resolution.index[Resolution_ind]..' ----->')
elseif command == 'toggle Req set' then
Requiescat_ind = Requiescat_ind +1
if Requiescat_ind > #sets.Requiescat.index then Requiescat_ind = 1 end
send_command('@input /echo <----- Requiescat Set changed to '..sets.Requiescat.index[Requiescat_ind]..' ----->')
elseif command == 'equip TP set' then
equip(sets.TP[sets.TP.index[TP_ind]])
elseif command == 'equip Idle set' then
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
end
I only changed your rules, so that's what I'm posting. Deletions from your code are commented out. Hope this works. Let us know.
Serveur: Asura
Game: FFXI
Posts: 127
By Asura.Brennski 2016-07-20 09:04:57
Thanks that worked.
Ragnarok.Flippant
Serveur: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-07-20 16:37:37
The doom gear won't persist without also having such rules in status_change/aftercast. Also, the terror, etc. gear will not persist after an action (or any attempt of an action) without also having such rules in aftercast.
Lastly, buff is case sensitive.
But, by the time the buff_change function is called, the buffactive table has already been updated anyway. So you can just do:
Code function aftercast(spell)
status_gear(player.status)
end
function status_change(new,old)
status_gear(new,old)
end
status_gear(new,old)
if new == 'Engaged' then
equip(sets.TP[sets.TP.index[TP_ind]])
elseif new == 'Idle' then
equip(sets.Idle[sets.Idle.index[Idle_ind]])
end
defensive_gear()
end
function defensive_gear()
if buffactive['terror'] or buffactive['stun'] or buffactive['sleep'] or buffactive['lullaby'] then
equip(sets.TP.DT)
end
if buffactive.Doom then
equip(sets.Utility.Doom)
end
end
function buff_change(buff, gain)
local buff = string.lower(buff)
if S{"terror","doom","stun","sleep","lullaby"}:contains(buff) and gain then
defensive_gear()
end
if not midaction() then
status_gear(player.status)
end
end
That way, doom is prioritized and buff_change won't put you into TP gear when you're in the middle of a WS or something.
Serveur: Fenrir
Game: FFXI
Posts: 62
By Fenrir.Idevlboy 2016-07-23 17:32:46
I'm sure this has been posted somewhere but after an admittedly very short search I cant seem to find a complete brd lua.
Could someone please link or provide a current working version for 4 song brd? I have been working on GS for way too long today and brain is completely fried. Hoping to get a brd.lua (and sidecar if necessary) I can just pop gear into and go if possible.
Any help would be greatly appreciated. Thanks.
Serveur: Fenrir
Game: FFXI
Posts: 574
By Fenrir.Moldtech 2016-07-23 17:35:04
This what I've been using on Auto. Dunno of complete but it works...
Code -------------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
--[[
Custom commands:
Terpander has a set of modes: None, Dummy, Terpander
You can set these via the standard 'set' and 'cycle' self-commands. EG:
gs c cycle Terpander
gs c set Terpander Dummy
The Dummy state will equip the Terpander and ensure non-duration gear is equipped.
The Terpander state will simply equip the Terpander on top of standard gear.
Use the Dummy version to put up dummy songs that can be overwritten by full-potency songs.
Use the Terpander version to simply put up additional songs without worrying about dummy songs.
Simple macro to cast a dummy Terpander song:
/console gs c set Terpander Dummy
/ma "Shining Fantasia" <me>
There is also an auto-handling of Terpander songs, via the state.AutoTerpander flag:
If state.TerpanderMode is None, and if currently tracked songs (via timers) is less
than the max we could sing while using the Terpander, and if the song is cast on
self (rather than Pianissimo on another player), then it will equip the Terpander on
top of standard duration gear.
--]]
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
include('organizer-lib')
include('organizer-lib')
end
-- Setup vars that are user-independent.
function job_setup()
state.Buff['Pianissimo'] = buffactive['pianissimo'] or false
options.TerpanderModes = {'None','Dummy','Terpander'}
state.TerpanderMode = 'None'
-- For tracking current recast timers via the Timers plugin.
timer_reg = {}
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
options.CastingModes = {'Normal', 'Resistant'}
options.OffenseModes = {'None', 'Normal'}
options.DefenseModes = {'Normal'}
options.WeaponskillModes = {'Normal'}
options.IdleModes = {'Normal', 'PDT'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
brd_daggers = S{}
pick_tp_weapon()
-- Adjust this if using the Terpander (new +song instrument)
info.TerpanderInstrument = 'Terpander'
-- How many extra songs we can keep from Terpander/Terpander
info.TerpanderSongs = 1
-- Whether to try to automatically use Terpander when an appropriate gap in current vs potential
-- songs appears, and you haven't specifically changed state.TerpanderMode.
state.AutoTerpander = false
-- Additional local binds
send_command('bind ^` input /ma "Chocobo Mazurka" <me>')
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
set_macro_page(1, 6)
end
-- Called when this job file is unloaded (eg: job change)
function file_unload()
if binds_on_unload then
binds_on_unload()
end
send_command('unbind ^`')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FC = {ear2="Loquac. Earring",
body="Hedera Cotehardie",waist="Witful Belt",feet="Chelona Boots"}
sets.precast.FC.Cure = set_combine(sets.precast.FC)
sets.precast.FC.Stoneskin = set_combine(sets.precast.FC, {head="Siegel Sash"})
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC.BardSong = {main="Kali",sub="Genmei Shield",
head="Fili Calot +1",neck="Aoidos' Matinee",hands="Schellenband",ear1="Aoidos' Earring",ear2="Loquac. Earring",
body="Hedera Cotehardie",waist="Witful Belt",feet="Chelona Boots"}
sets.precast.FC.Terpander = set_combine(sets.precast.FC.BardSong, {range=info.TerpanderInstrument})
-- Precast sets to enhance JAs
sets.precast.JA.Nightingale = {}
sets.precast.JA.Troubadour = {}
sets.precast.JA['Soul Voice'] = {}
-- Waltz set (chr and vit)
sets.precast.Waltz = {}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Evisceration'] = {}
sets.precast.WS['Exenterator'] = {}
sets.precast.WS['Mordant Rime'] = {}
-- Midcast Sets
-- General set for recast times.
sets.midcast.FastRecast = {ear2="Loquac. Earring",
waist="Witful Belt",feet="Chelona Boots"}
-- Gear to enhance certain classes of songs. No instruments added here since Gjallarhorn is being used.
sets.midcast.Ballad = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",legs="Fili Rhingrave +1"})
sets.midcast.Lullaby = set_combine(sets.midcast.SongDebuff,{range="Gjallarhorn",hands="Brioso Cuffs"})
sets.midcast.Madrigal = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",head="Fili Calot +1"})
sets.midcast.March = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",hands="Fili Manchettes +1"})
sets.midcast.Minuet = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",body="Fili Hongreline +1"})
sets.midcast.Minne = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",})
sets.midcast.Carol = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",head="Fili Calot +1",
body="Fili Hongreline +1",hands="Fili Manchettes +1",
legs="Fili Rhingrave +1",feet="Fili Cothurnes +1"})
sets.midcast.Mazurka = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",legs="Fili Rhingrave +1"})
sets.midcast.Prelude = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",legs="Fili Rhingrave +1"})
sets.midcast["Sentinel's Scherzo"] = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",feet="Fili Cothurnes +1"})
sets.midcast['Magic Finale'] = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",legs="Fili Rhingrave +1"})
sets.midcast["Army's Paeon*"] = set_combine(sets.midcast.SongEffect,{range="Gjallarhorn",head="Brioso Roundlet"})
sets.midcast["Puppet's Operetta"] = {range=info.TerpanderInstrument}
-- For song buffs (duration and AF3 set bonus)
sets.midcast.SongEffect = {main="Kali",
head="Fili Calot +1",neck="Aoidos' Matinee",ear1="Musical Earring",ear2="Loquacious Earring",
body="Fili Hongreline +1",hands="Fili Manchettes +1",ring1="Nereid Ring",ring2="Nereid Ring",
back="Rhapsode's Cape",waist="Marching Belt",legs="Fili Rhingrave +1",feet="Brioso Slippers +1"}
-- For song defbuffs (duration primary, accuracy secondary)
sets.midcast.SongDebuff = {main="Kali",
head="Kaabanax Hat",neck="Aoidos' Matinee",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Fili Hongreline +1",hands="Fili Manchettes +1",ring2="Sangoma Ring",
back="Rhapsode's Cape",waist="Aristo Belt",legs="Fili Rhingrave +1",feet="Brioso Slippers +1"}
-- For song defbuffs (accuracy primary, duration secondary)
sets.midcast.ResistantSongDebuff = {}
-- Song-specific recast reduction
sets.midcast.SongRecast = {ear2="Loquacious Earring",
}
--sets.midcast.Terpander = set_combine(sets.midcast.FastRecast, sets.midcast.SongRecast, {range=info.TerpanderInstrument})
-- Cast spell with normal gear, except using Terpander instead
sets.midcast.Terpander = {range=info.TerpanderInstrument}
-- Dummy song with Terpander; minimize duration to make it easy to overwrite.
sets.midcast.TerpanderDummy = {range=info.TerpanderInstrument,
head="Fili Calot +1",ear1="Aoidos' Earring",ear2="Loquac. Earring",
body="Hedera Cotehardie",waist="Witful Belt",feet="Chelona Boots"
}
-- Other general spells and classes.
sets.midcast.Cure = {main="Iridal Staff",
ammo="Clarus Stone",head="Gendewitha Caubeen",neck="Phalaina Locket",
ear1="Magnetic Earring",ear2="Loquacious Earring",
body="Hedera Cotehardie",hands="Bokwus Gloves",ring1="Ephedra Ring",
ring2="Ephedra Ring",feet="Chironic Slippers"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Stoneskin = {head="Siegel Sash"
}
sets.midcast.Cursna = {
neck="Malison Medallion",
ring1="Ephedra Ring",ring2="Ephedra Ring",}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main=gear.Staff.HMP,
main="Iridal Staff"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {main="Kali",sub="Genmei Shield",range="Oneiros Harp",
head="Brioso Roundlet",neck="Twilight Torque",ear1="Hearty Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Woltaris Ring",ring2="Paguroidea Ring",
back="Shadow Mantle",waist="Fucho-no-obi",legs="Brioso cannions",feet="Fili Cothurnes +1"}
sets.idle.Town = {main="Kali",sub="Genmei Shield",range="Oneiros Harp",
head="Brioso Roundlet",neck="Twilight Torque",ear1="Hearty Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Woltaris Ring",ring2="Paguroidea Ring",
back="Shadow Mantle",waist="Fucho-no-obi",legs="Brioso cannions",feet="Fili Cothurnes +1"}
sets.idle.Weak = {main="Kali",sub="Genmei Shield",range="Oneiros Harp",
head="Brioso Roundlet",neck="Twilight Torque",ear1="Hearty Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Woltaris Ring",ring2="Paguroidea Ring",
back="Shadow Mantle",waist="Fucho-no-obi",legs="Brioso cannions",feet="Fili Cothurnes +1"}
-- Defense sets
sets.defense.PDT = {}
sets.defense.MDT = {}
sets.Kiting = {feet="Fili Cothurnes +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
-- Basic set for if no TP weapon is defined.
sets.engaged = {main="Kali",sub="Genmei Shield",range="Oneiros Harp",
head="Fili Calot +1",neck="Twilight Torque",ear1="Hearty Earring",ear2="Loquacious Earring",
body="Hedera Cotehardie",hands="Fili Manchettes +1",ring1="Woltaris Ring",ring2="Paguroidea Ring",
back="Kumbira Cape",waist="Witful Belt",legs="Fili Rhingrave +1",feet="Fili Cothurnes +1"}
-- Sets with weapons defined.
sets.engaged.Dagger = {main="Kali",sub="Genmei Shield",range="Oneiros Harp",
head="Fili Calot +1",neck="Twilight Torque",ear1="Hearty Earring",ear2="Loquacious Earring",
body="Hedera Cotehardie",hands="Fili Manchettes +1",ring1="Woltaris Ring",ring2="Paguroidea Ring",
back="Kumbira Cape",waist="Witful Belt",legs="Fili Rhingrave +1",feet="Fili Cothurnes +1"}
-- Set if dual-wielding
sets.engaged.DualWield = {main="Kali",sub="Legato Dagger",range="Oneiros Harp",
head="Fili Calot +1",neck="Twilight Torque",ear1="Hearty Earring",ear2="Loquacious Earring",
body="Hedera Cotehardie",hands="Fili Manchettes +1",ring1="Woltaris Ring",ring2="Paguroidea Ring",
back="Kumbira Cape",waist="Witful Belt",legs="Fili Rhingrave +1",feet="Fili Cothurnes +1"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job- versions of event handlers, allowing overriding default handling.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if spell.type == 'BardSong' then
-- Auto-Pianissimo
if spell.target.type == 'PLAYER' and not spell.target.charmed and not state.Buff['Pianissimo'] then
send_command('@input /ja "Pianissimo" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
eventArgs.cancel = true
return
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
-- Default base equipment layer of fast recast.
equip(sets.midcast.FastRecast)
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
if spell == "Puppet's Operetta" then
equip(sets.midcast.TerpanderDummy)
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.type == 'BardSong' then
if state.TerpanderMode == 'Terpander' then
equip(sets.midcast.Terpander)
elseif state.TerpanderMode == 'None' and spell.target.type == 'SELF' and state.AutoTerpander and daur_song_gap() then
equip(sets.midcast.Terpander)
end
state.TerpanderMode = 'None'
end
end
-- Set eventArgs.handled to true if we don't want automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted then
if state.Buff[spell.name] ~= nil then
state.Buff[spell.name] = true
end
if spell.type == 'BardSong' then
if spell.target then
if spell.target.type and spell.target.type:upper() == 'SELF' then
adjust_Timers(spell, action, spellMap)
end
end
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Hooks for other events that aren't handled by the include file.
-------------------------------------------------------------------------------------------------------------------
function job_buff_change(buff, gain)
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
end
end
-------------------------------------------------------------------------------------------------------------------
-- Hooks for Terpander mode handling.
-------------------------------------------------------------------------------------------------------------------
-- Request job-specific mode tables.
-- Return true on the third returned value to indicate an error: that we didn't recognize the requested field.
function job_get_mode_list(field)
if field == 'Terpander' then
if player.inventory[info.TerpanderInstrument] or player.wardrobe[info.TerpanderInstrument] then
return options.TerpanderModes, state.TerpanderMode
else
add_to_chat(123, info.TerpanderInstrument..' is not in player inventory.')
end
end
end
-- Set job-specific mode values.
-- Return true if we recognize and set the requested field.
function job_set_mode(field, val)
if field == 'Terpander' then
state.TerpanderMode = val
return true
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
pick_tp_weapon()
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue)
if stateField == 'OffenseMode' then
if newValue == 'Normal' then
disable('main','sub')
else
enable('main','sub')
end
elseif stateField == 'Reset' then
if state.OffenseMode == 'None' then
enable('main','sub')
end
end
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
local defenseString = ''
if state.Defense.Active then
local defMode = state.Defense.PhysicalMode
if state.Defense.Type == 'Magical' then
defMode = state.Defense.MagicalMode
end
defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
end
local meleeString = ''
if state.OffenseMode == 'Normal' then
if state.CombatForm then
meleeString = 'Melee: Dual-wield, '
else
meleeString = 'Melee: Single-wield, '
end
end
add_to_chat(122,'Casting ['..state.CastingMode..'], '..meleeString..'Idle ['..state.IdleMode..'], '..defenseString..
'Kiting: '..on_off_names[state.Kiting])
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- 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 == 'Resistant' then
return 'ResistantSongDebuff'
else
return 'SongDebuff'
end
elseif state.TerpanderMode == 'Dummy' then
return 'TerpanderDummy'
else
return 'SongEffect'
end
end
-- Function to create custom buff-remaining timers with the Timers plugin,
-- keeping only the actual valid songs rather than spamming the default
-- buff remaining timers.
function adjust_Timers(spell, action, spellMap)
local t = os.time()
-- Eliminate songs that have already expired from our local list.
local tempreg = {}
for i,v in pairs(timer_reg) do
if v < t then tempreg[i] = true end
end
for i,v in pairs(tempreg) do
timer_reg[i] = nil
end
local dur = calculate_duration(spell.name, spellMap)
if timer_reg[spell.name] then
-- Can delete timers that have less than 120 seconds remaining, since
-- the new version of the song will overwrite the old one.
-- Otherwise create a new timer counting down til we can overwrite.
--if (timer_reg[spell.name] - t) <= 120 then
send_command('timers delete "'..spell.name..'"')
timer_reg[spell.name] = t + dur
send_command('timers create "'..spell.name..'" '..dur..' down')
--end
else
-- Figure out how many songs we can maintain.
local maxsongs = 2
if player.equipment.range == info.TerpanderInstrument then
maxsongs = maxsongs + info.TerpanderSongs
end
if buffactive['Clarion Call'] then
maxsongs = maxsongs+1
end
-- If we have more songs active than is currently apparent, we can still overwrite
-- them while they're active, even if not using appropriate gear bonuses (ie: Daur).
if maxsongs < table.length(timer_reg) then
maxsongs = table.length(timer_reg)
end
-- Create or update new song timers.
if table.length(timer_reg) < maxsongs then
timer_reg[spell.name] = t+dur
send_command('timers create "'..spell.name..'" '..dur..' down')
else
local rep,repsong
for i,v in pairs(timer_reg) do
if t+dur > v then
if not rep or rep > v then
rep = v
repsong = i
end
end
end
if repsong then
timer_reg[repsong] = nil
send_command('timers delete "'..repsong..'"')
timer_reg[spell.name] = t+dur
send_command('timers create "'..spell.name..'" '..dur..' down')
end
end
end
end
-- Function to calculate the duration of a song based on the equipment used to cast it.
-- Called from adjust_Timers(), which is only called on aftercast().
function calculate_duration(spellName, spellMap)
local mult = 1
if player.equipment.range == 'Terpander' then mult = mult + 0.0 end
if player.equipment.range == "Gjallarhorn" then mult = mult + 0.4 end -- change to 0.3 with 95 Gjall
if player.equipment.main == "Carnwenhan" then mult = mult + 0.1 end -- 0.1 for 75, 0.4 for 95, 0.5 for 99/119
if player.equipment.main == "Kali" then mult = mult + 0.1 end
if player.equipment.neck == "Aoidos' Matinee" then mult = mult + 0.1 end
if player.equipment.body == "Fili Hongreline +1" then mult = mult + 0.1 end
if player.equipment.legs == "Mdk. Shalwar +1" then mult = mult + 0.1 end
if player.equipment.feet == "Brioso Slippers" then mult = mult + 0.1 end
if player.equipment.feet == "Brioso Slippers +1" then mult = mult + 0.11 end
if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet" then mult = mult + 0.1 end
if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +1" then mult = mult + 0.1 end
if spellMap == 'Madrigal' and player.equipment.head == "Fili Calot +1" then mult = mult + 0.1 end
if spellMap == 'Minuet' and player.equipment.body == "Fili Hongreline +1" then mult = mult + 0.1 end
if spellMap == 'March' and player.equipment.hands == 'Fili Manchettes +1' then mult = mult + 0.1 end
if spellMap == 'Ballad' and player.equipment.legs == "Fili Rhingrave +1" then mult = mult + 0.1 end
if spellName == "Sentinel's Scherzo" and player.equipment.feet == "Fili Cothurnes +1" then mult = mult + 0.1 end
if buffactive.Troubadour then
mult = mult*2
end
if spellName == "Sentinel's Scherzo" then
if buffactive['Soul Voice'] then
mult = mult*2
elseif buffactive['Marcato'] then
mult = mult*1.5
end
end
-- Tweak for inaccuracies in cast vs aftercast timing
mult = mult - 0.05
local totalDuration = mult*120
return totalDuration
end
function daur_song_gap()
if player.inventory[info.TerpanderInstrument] or player.wardrobe[info.TerpanderInstrument] then
-- Figure out how many songs we can maintain.
local maxsongs = 2 + info.TerpanderSongs
local activesongs = table.length(timer_reg)
-- If we already have at least 2 songs on, but not enough to max out
-- on possible Daur songs, flag us as Daur-ready.
if activesongs >= 2 and activesongs < maxsongs then
return true
end
end
return false
end
-- Examine equipment to determine what our current TP weapon is.
function pick_tp_weapon()
if brd_daggers:contains(player.equipment.main) then
state.CombatWeapon = 'Dagger'
if S{'NIN','DNC'}:contains(player.sub_job) and brd_daggers:contains(player.equipment.sub) then
state.CombatForm = "DualWield"
else
state.CombatForm = nil
end
else
state.CombatWeapon = nil
state.CombatForm = nil
end
end
Ragnarok.Flippant
Serveur: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-07-23 17:43:09
Going to want to use the [code] tags for that, BBCode is changing the integrity of at least one line.
Serveur: Fenrir
Game: FFXI
Posts: 574
By Fenrir.Moldtech 2016-07-23 17:45:50
yea, it does have an issue with engaging but disengaged and singing its workin'
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.
|
|