|
Gearswap Support Thread
By kithaofcerb 2014-10-08 00:22:16
Ragnarok.Flippant said: »So I have since got my entire DRK.Lua working, except for Accuracy tier changes responding and actually changing gear and getting Mekira to swap in when necessary.
Everything involving Accindex is unchanged from Bokura's Lua, only the sets have been changed to have my items in them. Is there something I'm missing? You cut off your get_sets() function early. Move the end from line 77 to line 648.
You're my hero, thank you
By gdiShun 2014-10-08 00:30:21
What exactly is the difference between state.Buff['buff'] and buffactive['buff']?
Serveur: Cerberus
Game: FFXI
Posts: 4
By Cerberus.Abrogative 2014-10-08 09:43:51
Ooh reading through I learned about bag="inventory" etc. that is useful. I do use a sidecar file already for each job so I can keep updating the main file without losing my sets. I also keep the user functions in the sidecar. I know that variables are great for organizing, but at this time those pieces are used on one job for one set so I didn't see a reason for it as of now. I guess my question was less about organizing my files and more about verifying that the augments are being picked up. I just thought about it and maybe solved it myself. I'm going to try setting my mab and macc sets on idle temporarily tonight so I can actually visibly see if it's equipping the correct pieces every time. Thanks though very much!
Leviathan.Mckeag
Serveur: Leviathan
Game: FFXI
Posts: 204
By Leviathan.Mckeag 2014-10-08 10:00:31
If i wanted my gear to change when AM3 is up how would I go about doing so? And then change back to tp gear when AM3 is down?
By Xxpoure 2014-10-10 12:06:44
ok i have a basic gearswap as im very new and very noobish to it ... my question is ... how can i get my gearswap to use pianissimo when im targeted on another player ... ?? as in what commands to i put in gearswap and where ... any help would be greatful
Asura.Lewyo
Serveur: Asura
Game: FFXI
Posts: 86
By Asura.Lewyo 2014-10-11 06:18:05
I remember reading that the way aruguments on equipment are written in to lua has changed but i cannot seem to find the post that tells me how to update my lua.
Anyone know how it has changed form what it was written in the gearswap folder Advanced sets tables guide?
Cerberus.Conagh
Serveur: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-10-11 19:06:23
ok i have a basic gearswap as im very new and very noobish to it ... my question is ... how can i get my gearswap to use pianissimo when im targeted on another player ... ?? as in what commands to i put in gearswap and where ... any help would be greatful Code function pretarget(spell)
if spell.type == 'BardSong' and spell.target.type and spell.target.type == 'PLAYER' and not buffactive.pianissimo and not spell.target.charmed and not pianissimo_cycle then
cancel_spell()
pianissimo_cycle = true
send_command('input /ja "Pianissimo" <me>;wait 1.5;input /ma "'..spell.name..'" '..spell.target.name..';')
return
end
if spell.name ~= 'Pianissimo' then
pianissimo_cycle = false
end
end
Probably better off to do it as /mages ballad 3 name, for targetting someone you will encounter issues if you don't untarget someone IE you alt tabbed dual boxing or something.
Cerberus.Conagh
Serveur: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-10-11 19:08:30
If i wanted my gear to change when AM3 is up how would I go about doing so? And then change back to tp gear when AM3 is down?
Code if buffactive["Aftermath: Lv.3"] and equipSet["AM3"] then
equipSet = equipSet["AM3"]
in the if engaged part.
sets.TP.Kogarasumaru.AM3.Ionis = {gear}
~
Lakshmi.Zyphos
Serveur: Lakshmi
Game: FFXI
Posts: 70
By Lakshmi.Zyphos 2014-10-16 19:07:33
I've been working on getting Mote's BLU file to work (I just came back and discovered Spellcast is dead) and I'm unable to get the set to switch sets accordingly. IE; I'll WS and then stay TPing in my WS gear; same with casting.
Looking through the commands, I thought F12 would be the "state reset" button I was looking for, but it doesn't seem to do anything but spit out what I have the toggles set to. What'd be the best way to go about fixing this? If it even needs fixing, I'm prolly just missing something.
The lua in question.
Serveur: Sylph
Game: FFXI
Posts: 24
By Sylph.Avebian 2014-10-17 11:13:39
Quick Question, how do you remove a piece of gear, not change it with something else just empty the slot?
Leviathan.Arcon
VIP
Serveur: Leviathan
Game: FFXI
Posts: 666
By Leviathan.Arcon 2014-10-17 14:27:02
Serveur: Odin
Game: FFXI
Posts: 943
By Odin.Calipso 2014-10-18 01:22:39
In mote's BRD lua, there's some options that extend timer durations depending on your gear. How would you go about adding something similar to the GEO one for an augmented Lifestream Cape?
Serveur: Odin
Game: FFXI
Posts: 943
By Odin.Calipso 2014-10-18 17:35:45
Sorry to bump - posted this kinda late last night and realized that no one probably even saw it.
By Santi 2014-10-18 18:23:12
Hey, posted this in BG but haven't heard anything yet. Maybe I'll get lucky here!
Finally got Nagi so I've been trying to get the Aftermath sets working again. I've been trying to figure it out all night.
Motenten's monk example didn't really work for me since I'm using his NIN lua with customgroups for haste buffs. But I tried doing it this way and it seems to append 'AM' after the haste buffs, but it doesnt equip automatically. I have to ALT F12 for GS to notice the AM, and when the buff wears, ALT F12 again.
Here is my buff change function: Code function job_buff_change(buff, gain)
-- If we gain or lose any haste buffs, adjust which gear set we target.
if S{'haste','march','geo-haste','indi-haste','embrava','haste samba','aftermath'}:contains(buff:lower()) then
determine_haste_group()
handle_equipping_gear(player.status)
elseif state.Buff[buff] ~= nil then
state.Buff[buff] = gain
handle_equipping_gear(player.status)
end
end
And my determine haste group function: Code
function determine_haste_group()
classes.CustomMeleeGroups:clear()
if buffactive.embrava and (buffactive.march == 2 or (buffactive.march and buffactive[33])) then
classes.CustomMeleeGroups:append('MaxHaste')
elseif buffactive.march == 2 and buffactive[33] then
classes.CustomMeleeGroups:append('MaxHaste')
elseif buffactive.march and buffactive[580] then
classes.CustomMeleeGroups:append('MaxHaste')
elseif buffactive[33] and buffactive[580] then
classes.CustomMeleeGroups:append('MaxHaste')
elseif buffactive.embrava and (buffactive[33] or buffactive.march) then
classes.CustomMeleeGroups:append('EmbravaHaste')
elseif buffactive.march == 1 and buffactive[33] and buffactive['haste samba'] then
classes.CustomMeleeGroups:append('HighHaste')
elseif buffactive.march == 2 then
classes.CustomMeleeGroups:append('HighHaste')
elseif buffactive[580] then
classes.CustomMeleeGroups:append('HighHaste')
elseif buffactive[33] then
classes.CustomMeleeGroups:append('LowHaste')
end
if buffactive['Aftermath: Lv.3'] then
classes.CustomMeleeGroups:append('AM')
end
end
I call determine_haste_group() in my job_setup() and in job_update()
By gdiShun 2014-10-18 18:29:34
Code if S{'haste','march','geo-haste','indi-haste','embrava','haste samba','aftermath'}:contains(buff:lower()) then
I think you need to change 'aftermath' to 'aftermath: lv.3'
By Santi 2014-10-18 19:50:24
I think I solved it.
Instead of having Aftermath as a custom melee group that appended whenever it was active, I made it a CombatForm.
By fractalvoid 2014-10-22 23:38:04
My COR lua isn't swapping to the appropriate accuracy engaged set after I use a JA or WS while engaged. Kinda ghetto-rigged it to swap automatically into high acc set after any JA, since anything I'm using COR on nowadays requires high acc set anyway, but I'd like for it to automatically detect which acc set I'm using. I also haven't thoroughly tested this function.
Also it won't switch to a non-Animikii Bullet after I try to WS with Animikii equipped.
Here's the lua in it's entirety: Code 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()
AutoMode = 'OFF' -- Set Default Auto RA/WS ON or OFF Here --
Obi = 'ON' -- Turn Default Obi ON or OFF Here --
target_distance = 5 -- Set Default Distance Here --
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. --
-- Idle/Town Sets --
sets.Idle = {}
sets.Idle.Regen = {
head="Oce. Headpiece +1",
neck="Wiglen Gorget",
ear1="Black Earring",
ear2="Dawn Earring",
body="Kheper Jacket",
hands="Skadi's Bazubands",
ring1="Paguroidea Ring",
ring2="Sheltered Ring",
back="Repulse Mantle",
waist="Lycopodium Sash",
legs="Iuitl Tights +1",
feet="Iuitl Gaiters",
ammo="Eminent Bullet"}
sets.Idle.Movement = set_combine(sets.Idle.Regen,{
head="Uk'uxkaj Cap",
neck="Orunmila's Torque",
ring1="Luzaf's Ring",
ring2="Sangoma Ring",
back="Gunslinger's Cape"})
-- QD Sets --
sets.QD = {
ammo="Animikii Bullet",
head="Blood Mask",
neck="Stoicheion Medal",
ear1="Novio Earring",
ear2="Friomisi Earring",
body="Mirke Wardecors",
hands="Nvrch. Gants +2",
ring1="Acumen Ring",
ring2="Stormsoul Ring",
back="Gunslinger's Cape",
waist="Aquiline Belt",
legs="Shneddick tights",
feet="Nvrch. Bottes +2"}
sets.QD.MidACC = set_combine(sets.QD,{})
sets.QD.HighACC = set_combine(sets.QD.MidACC,{
neck="Faith Torque",
ear1="Lifestorm Earring",
ear2="Psystorm Earring",
hands="Sigyn's Bazubands",
ring2="Sangoma Ring",
ring1="Perception Ring",
feet="Lak. Bottes"})
-- PDT/MDT Sets --
sets.PDT = {
head="Umbani Cap",
neck="Twilight Torque",
ear1="Black Earring",
ear2="Darkness Earring",
body="Mekosuchinae harness",
hands="Iuitl Wristbands +1",
ring1="Dark Ring",
ring2="Dark Ring",
back="Shadow Mantle",
waist="Flume Belt",
legs="Iuitl Tights +1",
feet="Iuitl Gaiters +1"}
sets.MDT = set_combine(sets.PDT,{
ear1="Merman's Earring",
ear2="Sanare Earring",
ring1="Shadow Ring",
back="Engulfer Cape",
waist="Resolute Belt"})
-- Roll Set --
sets.Rolls = set_combine(sets.PDT,{
head="Lanun Tricorne",
hands="Nvrch. Gants +2",
ring1="Luzaf's Ring",
ring2="Barataria Ring",
back="Gunslinger's Cape"})
-- Preshot --
sets.Preshot = {
head="Aurore Beret",
hands="Comm. Gants +2",
back="Navarch's Mantle",
waist="Impulse Belt",
legs="Nahtirah Trousers",
feet="Iuitl Gaiters +1"}
-- Shooting Base Set --
sets.Midshot = {}
-- Death Penalty Sets --
sets.Midshot['Death Penalty'] = {}
sets.Midshot['Death Penalty'].MidACC = set_combine(sets.Midshot['Death Penalty'],{})
sets.Midshot['Death Penalty'].HighACC = set_combine(sets.Midshot['Death Penalty'].MidACC,{})
-- Vanir Gun Sets --
sets.Midshot.Pulfanxa = {
ammo="Eminent Bullet",
head="Uk'uxkaj Cap",
neck="Ocachi Gorget",
ear1="Tripudio Earring",
ear2="Volley Earring",
body="Lak. Frac",
hands="Sigyn's Bazubands",
ring1="Hajduk Ring +1",
ring2="Rajas Ring",
back="Terebellum Mantle",
waist="Elanid Belt",
legs="Nahtirah Trousers",
feet="Iuitl Gaiters"}
sets.Midshot.Pulfanxa.MidACC = set_combine(sets.Midshot.Pulfanxa,{
head="Umbani Cap",
neck="Iqabi Necklace",
ear1="Clearview Earring",
body="Mekosuchinae harness",
back="Gunslinger's Cape",
feet="Lak. bottes"})
sets.Midshot.Pulfanxa.HighACC = set_combine(sets.Midshot.Pulfanxa.MidACC,{
hands="Sigyn's Bazubands",
ring2="Hajduk Ring +1",
legs="Thur. Tights +1"})
-- Melee Sets --
sets.Melee = {
head="Whirlpool Mask",
neck="Asperity Necklace",
ear1="Bladeborn Earring",
ear2="Steelflash Earring",
body="Thaumas Coat",
hands="Iuitl Wristbands",
ring1="Epona's Ring",
ring2="Rajas Ring",
back="Atheling Mantle",
waist="Windbuffet Belt",
legs="Iuitl Tights +1",
feet="Qaaxo Leggings",
ammo="Eminent Bullet"}
sets.Melee.MidACC = set_combine(sets.Melee,{
neck="Iqabi Necklace",
body="Mekosuchinae Harness",
hands="Buremte Gloves",
waist="Hurch'lan Sash",
legs="Manibozho brais",
feet="Manibozho boots"})
sets.Melee.HighACC = set_combine(sets.Melee.MidACC,{})
-- WS Base Set --
sets.WS = {}
-- Last Stand Sets --
sets.WS["Last Stand"] = {
ammo="Eminent Bullet",
head="Uk'uxkaj Cap",
neck="Light Gorget",
ear1="Wilhelm's Earring",
ear2="Altdorf's Earring",
body="Kheper Jacket",
hands="Sigyn's Bazubands",
ring1="Stormsoul Ring",
ring2="Stormsoul Ring",
back="Terebellum Mantle",
waist="Light Belt",
legs="Nahtirah Trousers",
feet="Lak. Bottes"}
sets.WS["Last Stand"].MidACC = set_combine(sets.WS["Last Stand"],{
head="Umbani Cap"})
sets.WS["Last Stand"].HighACC = set_combine(sets.WS["Last Stand"].MidACC,{
body="Mekosuchinae Harness",
neck="Iqabi Necklace",
hands="Buremte Gloves",
ring1="Hajduk Ring +1",
ring2="Hajduk Ring +1",
back="Gunslinger's Cape",
legs="Thur. Tights +1"})
-- Wildfire Sets --
sets.WS.Wildfire = {
ammo="Orichalcum Bullet",
head="Umbani Cap",
neck="Stoicheion Medal",
ear1="Novio Earring",
ear2="Friomisi Earring",
body="Lak. Frac",
hands="Iuitl Wristbands +1",
ring1="Stormsoul Ring",
ring2="Acumen Ring",
back="Gunslinger's Cape",
waist="Elanid Belt",
legs="Iuitl Tights +1",
feet="Lanun Bottes"}
sets.WS.Wildfire.MidACC = set_combine(sets.WS.Wildfire,{})
sets.WS.Wildfire.HighACC = set_combine(sets.WS.Wildfire.MidACC,{})
-- Leaden Salute Sets --
sets.WS['Leaden Salute'] = {}
sets.WS['Leaden Salute'].MidACC = set_combine(sets.WS['Leaden Salute'],{})
sets.WS['Leaden Salute'].HighACC = set_combine(sets.WS['Leaden Salute'].MidACC,{})
-- Elemental Obi --
sets.Obi = {}
sets.Obi.Thunder = {waist='Rairin Obi'}
sets.Obi.Water = {waist='Suirin Obi'}
sets.Obi.Fire = {waist='Karin Obi'}
sets.Obi.Ice = {waist='Hyorin Obi'}
sets.Obi.Wind = {waist='Furin Obi'}
sets.Obi.Earth = {waist='Dorin Obi'}
sets.Obi.Light = {waist='Korin Obi'}
sets.Obi.Dark = {waist='Anrin Obi'}
-- JA Sets --
sets.JA = {}
sets.JA["Random Deal"] = {body="Commodore Frac +2"}
sets.JA.Fold = {hands="Commodore Gants +2"}
sets.JA["Snake Eye"] = {legs="Commodore Culottes +2"}
sets.JA["Wild Card"] = {feet="Lanun Bottes"}
-- Waltz Set --
sets.Waltz = {}
sets.Precast = {}
--Fastcast Set --
sets.Precast.FastCast = {
ring1="Prolix Ring",
neck="Orunmila's Torque",
hands="Thaumas Gloves",
ear1="Loquac. Earring",
ring2="Veneficium Ring"}
sets.Midcast = {}
-- Magic Haste Set --
sets.Midcast.Haste = set_combine(sets.PDT,{})
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 > 290 then -- Cancel Meditate If TP Is Above 290 --
cancel_spell()
add_to_chat(123, spell.name .. ' Canceled: ' .. player.tp)
elseif spell.action_type == 'Ranged Attack' then -- Auto WS
if player.tp >= 100 and AutoMode == 'ON' and not buffactive.amnesia then
cancel_spell()
autoWS()
end
elseif spell.action_type == 'Ranged Attack' and spell.target.distance > 24.9 then
cancel_spell()
add_to_chat(123, spell.name..' Canceled: [Out of Range]')
return
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
if spell.action_type == 'Ranged Attack' then
equip(sets.Preshot)
elseif spell.type == "WeaponSkill" then
if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
cancel_spell()
add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
return
equip({ammo="Eminent Bullet"})
else
equipSet = sets.WS
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if spell.english == "Last Stand" and (player.tp > 299 or buffactive.Sekkanoki) then -- Equip Altdorf's Earring and Wilhelm's Earring When You Have 300 TP or Sekkanoki For Last Stand --
equipSet = set_combine(equipSet,{ear1="Altdorf's Earring",ear2="Wilhelm's Earring"})
end
equip(equipSet)
end
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.Rolls)
if spell.english == "Tactician's Roll" then
equip({body="Nvrch. Frac +2"})
elseif spell.english == "Caster's Roll" then
equip({legs="Nvrch. Culottes +2"})
elseif spell.english == "Courser's Roll" then
equip({feet="Nvrch. Bottes +2"})
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 string.find(spell.english,'Utsusemi') then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] 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
equip(equipSet)
elseif spell.action_type == 'Magic' then
if 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 string.find(spell.english,'Utsusemi') then
if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
send_command('@wait 1.7;cancel Copy Image*')
end
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()
elseif not spell.interrupted then
if spell.type == "JobAbility" then
send_command('wait 0.2;gs equip sets.Melee'.MidACC)
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
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
else
status_change(player.status)
end
end
function status_change(new,old)
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
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 120;input /echo Aftermath: Lv.3 [WEARING OFF IN 60 SEC.];wait 30;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 20;input /echo Aftermath: Lv.3 [WEARING OFF IN 10 SEC.]')
else
send_command('timers delete "Aftermath: Lv.3"')
add_to_chat(123,'AM3: [OFF]')
end
elseif buff == 'weakness' then -- Weakness Timer --
if gain then
send_command('timers create "Weakness" 300 up')
else
send_command('timers delete "Weakness"')
end
end
if not midaction() then
status_change(player.status)
end
end
-- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
function self_command(command)
if command == 'C1' then -- Accuracy Level Toggle --
AccIndex = (AccIndex % #AccArray) + 1
status_change(player.status)
add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
elseif command == 'C5' then -- Auto Update Gear Toggle --
status_change(player.status)
add_to_chat(158,'Auto Update Gear')
elseif command == 'C3' then -- Obi Toggle --
if Obi == 'ON' then
Obi = 'OFF'
add_to_chat(123,'Obi: [OFF]')
else
Obi = 'ON'
add_to_chat(158,'Obi: [ON]')
end
status_change(player.status)
elseif command == 'C7' then -- PDT Toggle --
if Armor == 'PDT' then
Armor = 'None'
add_to_chat(123,'PDT Set: [Unlocked]')
else
Armor = 'PDT'
add_to_chat(158,'PDT Set: [Locked]')
end
status_change(player.status)
elseif command == 'C15' then -- MDT Toggle --
if Armor == 'MDT' then
Armor = 'None'
add_to_chat(123,'MDT Set: [Unlocked]')
else
Armor = 'MDT'
add_to_chat(158,'MDT Set: [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(158,'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(123,'Auto Mode: [OFF]')
else
AutoMode = 'ON'
add_to_chat(158,'Auto Mode: [ON]')
end
elseif command == 'TP' then
add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
elseif command:match('^SC%d$') then
send_command('//' .. sc_map[command])
end
end
function autoRA()
send_command('@wait 2.7; input /ra <t>')
end
function autoWS() -- Change Auto WS Here --
send_command('input /ws "Last Stand" <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(158, 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(158, downgrade)
end
cancel_spell()
return
end
if missingHP > 0 then
add_to_chat(158,'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
and here's the bit I added today to temporarily circumvent the problem: Code function aftercast(spell,action)
if spell.action_type == 'Ranged Attack' and AutoMode == 'ON' then
autoRA()
elseif not spell.interrupted then
if spell.type == "JobAbility" then
send_command('wait 0.2;gs equip sets.Melee'.MidACC)
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
Thanks for the help in advance.
Bismarck.Inference
Serveur: Bismarck
Game: FFXI
Posts: 417
By Bismarck.Inference 2014-10-23 00:09:16
Given that none of your conditionals in aftercast are equipping specific gearsets, removing the "Else" on line 427 before status_change should handle it. Due to all the If/Elseifs you have before it, its never getting triggered(namely due to the first ElseIf which checks if a spell was not interrupted, meaning status_change has no chance of even getting hit unless you were interrupted).
As for the bullet, it doesn't look like its even trying to switch it out, just a preliminary rule to cancel so you don't waste it. My quickfix to this would just be to throw your standard bullet in your TP sets/some aftercast sets so you're not just idling on your QD bullets, though there are a handful of more elegant ways to go about it.
By fractalvoid 2014-10-23 08:55:28
Awesome, did not think it would be as simple as removing that else lol. That also fixes the bullet problem since I have normal bullets in my engaged set. Thanks!
Cerberus.Conagh
Serveur: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-10-23 19:50:24
Does anyone know how to cancel a spell if you are already casting in gearswap?
I know how to stop you doing anything if you try to use a ja that is on a cooldown etc but thats for recast I mean purely If X is casting then Cancel spell, but I can't seem to find the right language for it.
Any help appreciated.
Bismarck.Snprphnx
Serveur: Bismarck
Game: FFXI
Posts: 2707
By Bismarck.Snprphnx 2014-10-23 19:58:57
Does anyone know how to cancel a spell if you are already casting in gearswap?
I know how to stop you doing anything if you try to use a ja that is on a cooldown etc but thats for recast I mean purely If X is casting then Cancel spell, but I can't seem to find the right language for it.
Any help appreciated. Do you mean, wanting to cancel an applied buff, so a new one it applied? Like cancelling remaining Ni shadows while Ichi is midcast?
Cerberus.Conagh
Serveur: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-10-23 20:19:17
Bismarck.Snprphnx said: »Does anyone know how to cancel a spell if you are already casting in gearswap?
I know how to stop you doing anything if you try to use a ja that is on a cooldown etc but thats for recast I mean purely If X is casting then Cancel spell, but I can't seem to find the right language for it.
Any help appreciated. Do you mean, wanting to cancel an applied buff, so a new one it applied? Like cancelling remaining Ni shadows while Ichi is midcast?
If I am casting Already and say I hit another macro rq to cast another spell and I'm not done casting I'd rather not swap from Cure gear to Barspell midway through.
Happens alot when Dual boxing or I get Addled on BRD etc and I have a Macro that has specific Wait timers etc etc
Ragnarok.Flippant
Serveur: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2014-10-23 20:49:22
Technically, midaction() will return true when you're, well, mid-action, but last time I played around with it, it wasn't quite right (think cancel_spell() was still equipping aftercast gear, and using midaction() was returning true from aftercast(), so it was a hassle to work around). You can try putting
if midaction() then cancel_spell() return end
in the first line of your precast and see if that works.
[+]
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.
|
|