|
Gearswap Support Thread
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-10-23 21:50:39
Ragnarok.Flippant said: »if midaction() then cancel_spell() return end
This worked perfectly thankyou, I had incorrectly placed this as a seperate rule altogether >> move to precast and no issues.
Server: Siren
Game: FFXI
Posts: 507
By Siren.Inuyushi 2014-10-24 14:25:11
A few questions for a couple things I've been trying to do. First off, I'm using Mote's gearswap files with everything in a sidecar file.
1 - Does Mote's gearswap automatically equip obis/zodiac ring/twilight cape?
2 - I've been trying to make the BLU.lua in "Refresh" combat mode only equip the correct piece of Serpentes during the right time of day with:
Code function customized_melee_set(meleeSet)
if state.Buff.sleep then
meleeSet = set_combine(meleeSet, sets.buff.Sleep)
elseif state.Buff.reive then
meleeSet = set_combine(meleeSet, {neck="Arciela's Grace +1"})
end
if state.OffenseMode == "Refresh" then
if world.time >= (17*60) or world.time <= (7*60) then
meleeSet = set_combine(sets.engaged.Refresh, {hands="Serpentes Gloves"})
else
meleeSet = set_combine(sets.engaged.Refresh, {feet="Serpentes Sabots"})
end
end
return meleeSet
end
3 - I also am trying to get the neck piece to auto lock to Arciela's Grace +1 while in a reive with this code and catch when I gain the sleep buff.
None of it works. I do have the following in the job_setup function that was supposed to make the sleep gear work. I also have sets.buff.Sleep defined.
Code state.Buff.sleep = buffactive.sleep or false"
Am I going about this the right way? Should I define sets for reives? such as sets.engaged.Reive, sets.engaged.DW.Reive?
Trying to figure all this out, any help is appreciated!
Also, big thanks to Mote for all the work he has done so far!
Quetzalcoatl.Orestes
Server: Quetzalcoatl
Game: FFXI
Posts: 430
By Quetzalcoatl.Orestes 2014-10-24 16:33:30
A few questions for a couple things I've been trying to do. First off, I'm using Mote's gearswap files with everything in a sidecar file.
1 - Does Mote's gearswap automatically equip obis/zodiac ring/twilight cape? I'm pretty sure it does. This is the syntax.
Code
sets.example = {
ring1=gear.ElementalRing,
back=gear.ElementalCape,
waist=gear.ElementalObi
}
Mote has the default gear setup in Mote-Globals.lua. You can see what he has assigned here.
You should be able to change them, by redefining them in user or job_setup. ex: gear.default.obi_ring = "Strendu Ring"
2 - I've been trying to make the BLU.lua in "Refresh" combat mode only equip the correct piece of Serpentes during the right time of day with:
Code function customized_melee_set(meleeSet)
if state.Buff.sleep then
meleeSet = set_combine(meleeSet, sets.buff.Sleep)
elseif state.Buff.reive then
meleeSet = set_combine(meleeSet, {neck="Arciela's Grace +1"})
end
if state.OffenseMode == "Refresh" then
if world.time >= (17*60) or world.time <= (7*60) then
meleeSet = set_combine(sets.engaged.Refresh, {hands="Serpentes Gloves"})
else
meleeSet = set_combine(sets.engaged.Refresh, {feet="Serpentes Sabots"})
end
end
return meleeSet
end If you're using mote_include_version = 2, you'll need to correct state.OffenseMode == "Refresh" to state.OffenseMode.value == "Refresh"
3 - I also am trying to get the neck piece to auto lock to Arciela's Grace +1 while in a reive with this code and catch when I gain the sleep buff.
None of it works. I do have the following in the job_setup function that was supposed to make the sleep gear work. I also have sets.buff.Sleep defined.
Code state.Buff.sleep = buffactive.sleep or false"
Am I going about this the right way? Should I define sets for reives? such as sets.engaged.Reive, sets.engaged.DW.Reive?
Trying to figure all this out, any help is appreciated!
Also, big thanks to Mote for all the work he has done so far!
The buff is called "Reive Mark". This should be all you need.
Code
function customize_melee_set(meleeSet)
if buffactive['Reive Mark'] then
meleeSet = set_combine(meleeSet, sets.reive)
end
return meleeSet
end
As for "sleep". Having sleep cast on you doesn't warrant any action from gearswap, since you didn't cast the spell on yourself. The customize_melee_set() function is triggered as the last step when gearswap is constructing your current gear set. So, in this instance your code isn't being executed, as being slept didn't warrant your lua to build a gear set.
If you want to catch "sleep", you can do that in job_buff_change()
Code
function job_buff_change(buff, gain)
if string.lower(buff) == "sleep" and gain and player.hp > 200 then
equip(sets.Berserker)
end
end
edit: fixed a syntax issue
Server: Siren
Game: FFXI
Posts: 507
By Siren.Inuyushi 2014-10-24 22:19:21
Thanks Orestes! The reive gear is equipping and the correct Serpentes gear is equipping while engaged for refresh. Couple things that I can't rap up:
I want to be able to list equipment for spells in the main/sub slot that will change when I'm not in a melee stance. I tried adding a 'None' melee stance so that when I'm in 'None' my weapons/shields change out depending on action. And when I want to engage, I go into one of the melee stances (Normal, Acc, etc). Sadly this isn't working. It works for my RDM_gear.lua, any idea why it works in RDM and not in BLU?
Quetzalcoatl.Orestes said: »A few questions for a couple things I've been trying to do. First off, I'm using Mote's gearswap files with everything in a sidecar file.
1 - Does Mote's gearswap automatically equip obis/zodiac ring/twilight cape? I'm pretty sure it does. This is the syntax.
Code
sets.example = {
ring1=gear.ElementalRing,
back=gear.ElementalCape,
waist=gear.ElementalObi
}
Mote has the default gear setup in Mote-Globals.lua. You can see what he has assigned here.
You should be able to change them, by redefining them in user or job_setup. ex: gear.default.obi_ring = "Strendu Ring"
What you gave will let me set a default ring to equip if I put gear.ElementalRing in the set. What I'm looking for is to have a default nuking set with MAB, Magic Damage+ in each slot by default. And depending on spell, I can update the ring/back/waist slot to equip if it's the correct day (for ring), day or weather (for cape and obi). I would imagine I would need something in the customize_idle_set and customize_melee_set functions, I just don't know what exactly. Something that would compare the spell element to world.day_element and world.weather_element? Then do a set_combine(meleeSet, sets.Elemental_day) or something of the nature.
As for the sleep gear... that will work to equip it when I get put to sleep. Will it go back to my previous set when I wake? Or do I need to do something like
Code
function job_buff_change(buff, gain)
if string.lower(buff) == "sleep" and gain and player.hp > 200 then
equip(sets.Berserker)
elseif string.lower(buff) == "sleep" and lost then
equip(meleeSet)
end
end
Or will gswap automatically go back to the previous set once sleep is lost?
Lastly... I have it set to equip regen gear when my hpp < 95%, which is great. But, is there a way to make it automatically go to my idle gear (with PDT gear and such) when my hp breaks 95%?
Sorry if this is coming across too demanding. I'm not a programmer by nature. Just a normal Mechanical Engineer. All help is appreciated!
By Xavierr 2014-10-25 07:03:10
recently decided to bring my GEO up to par and I can't figure out how to write a rule for a pet idle set. I would like to have a pet -dt set go on for when my luopon is out and go back into a refresh idle set when it is not. If anyone can toss an example of it on here I would appreciate it.
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2014-10-25 22:46:56
I'm having problems trying to get my Oneiros only equipped when I'm at or above 100mp, it never swaps back to Rajas Ring right now, sorry if my lua file is a bit messy, I've been trying to do this myself and I'm still rubbish at gearswap.
Code function get_sets()
TP_Index = 1
Idle_Index = 1
sets.weapons = {}
sets.weapons[1] = {main="Izhiikoh"}
sets.weapons[2]={main="Sandnung"}
sets.JA = {}
sets.JA.Conspirator = {body="Raider's Vest +2"}
sets.JA.Accomplice = {head="Raid. Bonnet +2"}
sets.JA.Collaborator = {head="Raid. Bonnet +2"}
sets.JA['Perfect Dodge'] = {hands="Plun. Armlets +1"}
sets.JA.Steal = {head="Plun. Bonnet",neck="Rabbit Charm",hands="Thief's Kote",
waist="Key Ring Belt",legs="Pill. Culottes +1",feet="Pillager's Poulaines"}
sets.JA.Flee = {feet="Pillager's Poulaines"}
sets.JA.Despoil = {legs="Raid. Culottes +2",feet="Raid. Poulaines +2"}
sets.JA.Mug = {head="Plun. Bonnet"}
sets.JA["Assassin's Charge"] = {feet="Plun. Poulaines +1"}
sets.JA.Hide = {body="Pillager's Vest"}
sets.JA.Feint = {legs="Plunderer's Culottes"}
sets.WS = {}
sets.WS.SA = {}
sets.WS.TA = {}
sets.WS.SATA = {}
sets.WS.AC = {}
sets.WS.Evisceration = {head="Felistris Mask",neck="Rancor Collar",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Plunderer's Vest",hands="Pill. Armlets +1",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Wanion Belt",legs="Pill. Culottes +1",feet="Plun. Poulaines +1"}
sets.WS["Rudra's Storm"] = {head="Felistris Mask",neck="Rancor Collar",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Plunderer's Vest",hands="Pill. Armlets +1",ring1="Rajas Ring",ring2="Thundersoul Ring",
back="Atheling Mantle",waist="Wanion Belt",legs="Pill. Culottes +1",feet="Plun. Poulaines +1"}
sets.WS["Aeolian Edge"] = set_combine(sets.WS.Evisceration,{head="Thaumas Hat",legs="Raid. Culottes +2",neck="Stoicheion Medal",
ear1="Novio Earring",ear2="Hecate's Earring",waist="Breeze Belt"})
sets.WS.SA.Evisceration = {head="Pillager's Bonnet",neck="Rancor Collar",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Plunderer's Vest",hands="Raid. Armlets +2",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Wanion Belt",legs="Pill. Culottes +1",feet="Plun. Poulaines +1"}
sets.WS.TA.Evisceration = {head="Pillager's Bonnet",neck="Rancor Collar",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Plunderer's Vest",hands="Raid. Armlets +2",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Wanion Belt",legs="Pill. Culottes +1",feet="Plun. Poulaines +1"}
TP_Set_Names = {"Normal","TH","Evasion"}
sets.TP = {}
sets.TP['Normal'] = {range="Raider's Bmrng.",head="Felistris Mask",neck="Asperity Necklace",
ear1="Dudgeon Earring",ear2="Heartseeker Earring",body="Thaumas Coat",hands="Pill. Armlets +1",
ring1="Oneiros Ring",ring2="Epona's Ring",back="Atheling Mantle",waist="Nusku's Sash",
legs="Pill. Culottes +1",feet="Plun. Poulaines +1"}
sets.TP['TH'] = {range="Raider's Bmrng.",head="Felistris Mask",neck="Asperity Necklace",
ear1="Dudgeon Earring",ear2="Heartseeker Earring",body="Thaumas Coat",hands="Plun. Armlets +1",
ring1="Rajas Ring",ring2="Epona's Ring",back="Atheling Mantle",waist="Nusku's Sash",
legs="Pill. Culottes +1",feet="Raid. Poulaines +2"}
sets.TP.Evasion = {head="Espial Cap",body="Espial Gambison",hands="Espial Bracers",legs="Espial Hose",feet="Espial Socks",
ear1="Ethereal Earring",ear2="Elusive Earring",ring1="Rajas Ring",ring2="Heed Ring",neck="Torero Torque",back="Boxer's Mantle"}
Idle_Set_Names = {'Normal','MDT'}
sets.Idle = {}
sets.Idle.Normal = {head="Felistris Mask",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Thaumas Coat",hands="Pill. Armlets +1",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Nusku's Sash",legs="Pill. Culottes +1",feet="Skd. Jambeaux +1"}
sets.Idle.MDT = {head="Espial Cap",neck="Twilight Torque",ear1="Merman's Earring",ear2="Merman's Earring",
body="Avalon Breastplate",hands="Merman's Mittens",ring1="Minerva's Ring",ring2="Shadow Ring",legs="Espial Hose",
feet="Espial Socks"}
sets.midcast = {}
sets.midcast.Ranged = {head="Umbani Cap",body="Skadi's Cuirie +1",hands="Buremte Gloves",legs="Thur. Tights +1",feet="Pillager's Poulaines",
neck="Ej Necklace",waist="Elanid Belt",ear1="Clearview Earring",ear2="Volley Earring",ring1="Hajduk Ring",ring2="Hajduk Ring",
back="Jaeger Mantle"}
end
function precast(spell)
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
elseif spell.type=="WeaponSkill" then
if sets.WS[spell.english] then equip(sets.WS[spell.english]) end
if buffactive['sneak attack'] and buffactive['trick attack'] and sets.WS.SATA[spell.english] then equip(sets.WS.SA[spell.english])
elseif buffactive['sneak attack'] and sets.WS.SA[spell.english] then equip(sets.WS.SA[spell.english])
elseif buffactive['trick attack'] and sets.WS.TA[spell.english] then equip(sets.WS.TA[spell.english]) end
end
end
function midcast(spell)
if spell.name=="Ranged" then
equip(sets.midcast.Ranged)
end
end
function aftercast(spell)
if spell.english == "Feint" and not spell.interrupted then
return
else
status_gear()
end
end
function status_change(new,old)
if T{'Idle','Resting'}:contains(new) then
equip(sets.Idle[Idle_Set_Names[Idle_Index]])
elseif new == 'Engaged' then
if player.mp >= 100 then
equip(set_combine(sets.TP[sets.TP.index[TP_Index]], {ring1="Rajas Ring"}))
else
equip(sets.TP[sets.TP.index[TP_Index]])
end
end
end
function status_change(new,old)
status_gear()
end
function status_gear()
if T{'Idle','Resting'}:contains(player.status) then
equip(sets.Idle[Idle_Set_Names[Idle_Index]])
elseif player.status == 'Engaged' then
equip(sets.TP[TP_Set_Names[TP_Index]])
if buffactive.Feint then
equip(sets.JA.Feint)
end
end
end
function buff_change(buff,gain_or_loss)
if buff=="Sneak Attack" then
soloSA = gain_or_loss
elseif buff=="Trick Attack" then
soloTA = gain_or_loss
elseif buff=="Feint" and not gain then
status_gear()
end
end
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
end
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-10-25 22:56:45
Code if player.mp >= 100 then
equip(set_combine(sets.TP[sets.TP.index[TP_Index]], {ring1="Rajas Ring"}))
else
This checks that your mp is Bigger than 100 it equips Rajas.
Code if player.mp < 100 then
equip(set_combine(sets.TP[sets.TP.index[TP_Index]], {ring1="Rajas Ring"}))
This would then check if your mp is less than 100 it uses Rajas instead
I use mp rules like this~ Code
function get_sets()
send_command('input /macro book 7;wait .1;input /macro set 1') -- Change Default Macro Book Here --
AccIndex = 1
AccArray = {"Low","Mid","High"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. 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 --
Armor = 'None'
Rings = "Oneiros Ring"
sets.tp ={ring1=Rings}
Code if player.mp < 99 then
Rings = "Rajas Ring"
else
Rings = "Oneiros Ring"
end
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2014-10-25 23:03:43
Oh god damn it, I suffered with that for so long and it was something simple like that, cheers Conagh, think I'll give that a quick try.
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-10-25 23:24:23
Oh god damn it, I suffered with that for so long and it was something simple like that, cheers Conagh, think I'll give that a quick try.
in gearswap if what you're doing feels over complicated, you're doing it wrong :£
You could also throw in the "Oni" ring section where it changes a QUick add to chat message to let you know it monitored the change in mp
add_to_chat(9,'MP under 100 swapping to Rajas')
then you can break down if its the code or an error in the way you're handling your sets.
Code function get_sets()
AccIndex = 1
AccArray = {"LowACC","AvgACC","MidACC","HighACC"}
sets.Idle = {}
sets.ring = {ring1="Rajas Ring"}
sets.TP = {}
sets.TP.lowACC = {} -- Gear you equip normmally including a Normal Ring
sets.TP.AvgACC = {}
sets.TP.MidACC = {}
sets.TP.HighAcc = {}
end
function status_change(new,old)
if new == 'Engaged' then
equipSet = sets.TP
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
if player.mp > 100 then
equip(set_combine(equipSet,sets.ring))
end
equip(equipSet)
else
equip(sets.Idle[IdleArray[IdleIndex]])
end
end
windower.register_event('mp change', function(mp)
status_change(player.status)
end)
The 'mp change' bit I added as I believe this forces an Status_Change update and makes sure your gear changes as your MP changes.
I know this works guaranteed, been using similar code on WHM Melee and SAM for Months. Of course this would only throw out a "status change" request when MP changes so you can swap this to HP or TP instead.
Cerberus.Tidis
Server: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2014-10-25 23:47:14
So I got it working now, it seemed I had a couple functions doing essentially the same thing and I don't know if one was overwriting the other, also I had this:
Code equip(set_combine(sets.TP[sets.TP.index[TP_Index]], {ring1="Rajas Ring"}))
which didn't work until I changed it to:
Code equip(set_combine(sets.TP[TP_Set_Names[TP_Index]], {ring1="Rajas Ring"}))
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-10-25 23:53:23
So I got it working now, it seemed I had a couple functions doing essentially the same thing and I don't know if one was overwriting the other, also I had this:
Code equip(set_combine(sets.TP[sets.TP.index[TP_Index]], {ring1="Rajas Ring"}))
which didn't work until I changed it to:
Code equip(set_combine(sets.TP[TP_Set_Names[TP_Index]], {ring1="Rajas Ring"}))
There's lots of ways to do it, it helps if you try and organise your sets into Blocks makes it easier to read and then have all your "TP set rules" in once place so you can dodge that sorta stuff.
Code function get_sets()
send_command('input /macro book 7;wait .1;input /macro set 1') -- Change Default Macro Book Here --
AutoAga = 1
Sublimation = 1
AccIndex = 1
AccArray = {"Low","Mid","High"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. 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 --
Armor = 'None'
sets.TP = {}
sets.TP.Low = {head="Gendewitha Caubeen",neck="Asperity Necklace",ear1="Brutal Earring",
ear2="Suppanomi",body="Theophany briault +1",hands="Dynasty Gloves",ring1="Rajas ring",
ring2="Patricius Ring",back="Cheviot Cape",waist="Goading Belt",legs="Artsieq Hose",feet="Theo. Duckbills +1"}
sets.TP.Mid = {}
sets.TP.High = {}
sets.engaged = {}
sets.engaged.healing = {}
sets.engaged.healing.Curaga = {}
sets.engaged.healing.Cure = {}
sets.engaged.healing.Weather = {}
sets.ws = {}
sets.ws['Realmrazer'] = {}
sets.ws['Flash Nova'] = {head="Nahtirah Hat",neck="Eddy Necklace",ear1="Friomisi Earring",
ear2="Hecate's Earring",body="Bokwus Robe",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Songoma Ring",
back="Toro Cape",waist="Aswang Sash",legs="Theophany Pantaloons",feet="Weath. Souliers +1"}
sets.aftercast = {}
sets.aftercast.night = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
head="Nefer Khat",neck="Twilight Torque",ear1="Merman's Earring",ear2="Coral Earring",
body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Dark ring",ring2="Patricius Ring",
back="Cheviot Cape",waist="Siegel Sash",legs="Nares Trews",feet="Theo. Duckbills +1"}
sets.aftercast.defense = {main="Terra's Staff",ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Twilight Torque",ear1="Merman's Earring",ear2="Coral Earring",
body="Theophany briault +1",hands="Gendewitha Gages",ring1="Dark ring",ring2="Patricius Ring",
back="Cheviot Cape",waist="Siegel Sash",legs="Artsieq Hose",feet="Theo. Duckbills +1"}
sets.aftercast.day = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
head="Nefer Khat",neck="Twilight Torque",ear1="Merman's Earring",ear2="Coral Earring",
body="Heka's Kalasiris",hands="Lurid Mitts",ring1="Dark ring",ring2="Patricius Ring",
back="Cheviot Cape",waist="Siegel Sash",legs="Nares Trews",feet="Serpentes Sabots"}
sets.aftercast.move = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
head="Nefer Khat",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sirona's ring",ring2="Aquasoul Ring",
back="Cheviot Cape",waist="Siegel Sash",legs="Nares Trews",feet="Desert Boots"}
sets.aftercast.resting = {main="Chatoyant Staff",feet="Chelona Boots"}
sets.precast = {}
sets.precast.fastcast = {ammo="Imaptiens",head="Nahtirah Hat",ear1="loquacious Earring",neck="Orunmila's Torque",
body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Artsieq Hose",feet="Chelona Boots",
waist="Witful Belt",ear2="enchanter Earring +1",ring1="Prolix Ring",ring2="Lebeche Ring"}
sets.precast.enhancing = {ammo="Imaptiens",head="Nahtirah Hat",ear1="loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Artsieq Hose",feet="Chelona Boots",
waist="Siegel Sash",ear2="enchanter Earring +1",ring1="Prolix Ring",ring2="Lebeche Ring"}
sets.precast.stoneskin = {ammo="Imaptiens",head="Umuthi Hat",ear1="loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Artsieq Hose",feet="Chelona Boots",
waist="Siegel Sash",ear2="enchanter Earring +1",ring1="Prolix Ring",ring2="Lebeche Ring"}
sets.precast.cure = {ammo="Impatiens",head="Nahtirah Hat",ear1="Loquacious Earring",
body="Heka's Kalasiris",hands="Gendewitha Gages",ring1="Prolix Ring",legs="Orsn. Pantaln. +2",
feet="Cure Clogs",waist="Witful Belt",ring2="Lebeche Ring",back="Pahtli Cape"}
sets.precast.healing = {ammo="Imaptiens",head="Nahtirah Hat",ear1="loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",back="Ogapepo Cape +1",ring1="Veneficium Ring",legs="Orsn. Pantaln. +2",
feet="Chelona Boots",waist="Witful Belt",ring2="lebeche Ring"}
sets.midcast = {}
sets.midcast.healing = {}
sets.midcast.healing.lyna = {ammo="Incantor Stone",head="Orison Cap +2",neck="Orunmila's Torque",
ear1="loquacious Earring",ear2="Enchntr. Earring +1",body="Hedera Cotehardie",hands="Gendewitha Gages",
ring1="Prolix Ring",ring2="Lebeche Ring",back="Swith Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Gende. Galosh. +1"}
sets.midcast.healing.caress = {ammo="Incantor Stone",head="Orison Cap +2",neck="Orunmila's Torque",
ear1="loquacious Earring",ear2="Enchntr. Earring +1",body="Hedera Cotehardie",hands="Orison Mitts +2",
ring1="Prolix Ring",ring2="Lebeche Ring",back="Swith Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Gende. Galosh. +1"}
sets.midcast.healing.cursna = {ammo="Incantor Stone",head="Orison Cap +2",neck="Malison Medallion",ear1="Loquacious Earring",
ear2="Enchntr. Earring +1",body="Hedera Cotehardie",hands="Gendewitha Gages",ring1="Ephedra Ring",ring2="Ephedra Ring",
back="Mending Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Gende. Galoshes"}
sets.midcast.healing.cursnacaress = {ammo="Incantor Stone",head="Orison Cap +2",neck="Malison Medallion",ear1="Loquacious Earring",
ear2="Enchntr. Earring +1",body="Hedera Cotehardie",hands="Orison Mitts +2",ring1="Ephedra Ring",ring2="Ephedra Ring",
back="Mending Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Gende. Galoshes"}
sets.midcast.healing.curaga = {ammo="Incantor Stone",
main="Tamaxchi",sub="Genbu's Shield",head="Gende. Caubeen",body="Theo. Briault +1",hands="Theo. Mitts +1",legs="Orsn. Pantaln. +2",
feet="Piety Duckbills +1",neck="Nuna Gorget +1",waist="Cascade Belt",ear2="Cmn. Earring",ear1="Lifestorm Earring",left_ring="Sirona's Ring",
right_ring="Aquasoul Ring",back="Pahtli Cape",}
sets.midcast.healing.cure = {main="Tamaxchi",head="Gendewitha caubeen",neck="Colossus's Torque",
body="Orison Bliaud +2",hands="Theo. Mitts +1",back="Mending Cape",legs="Orsn. Pantaln. +2",
ring1="Sirona's Ring", ring2="Ephedra Ring", feet="Piety Duckbills +1", waist="Bishop's Sash",
ear2="Beatific Earring", ear1="Roundel Earring"}
sets.midcast.healing.weather = {main="Chatoyant Staff",sub="Mephitis Grip",ammo="Incantor Stone",head="Gende. Caubeen",body="Orison Bliaud +2",hands="Bokwus Gloves",legs="Orsn. Pantaln. +2",
feet="Piety Duckbills +1",neck="Colossus's Torque",waist="Korin Obi",left_ear="Roundel Earring",right_ear="Beatific Earring",left_ring="Sirona's Ring",
right_ring="Ephedra Ring",back="Twilight Cape"}
sets.midcast.healing.recast = {ammo="Incantor Stone",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Theo. briault +1",hands="Dynasty Mitts",
back="Swith Cape",waist="Goading Belt",legs="Artsieq hose",feet="Piety Duckbills +1"}
sets.midcast.enhancing = {}
sets.midcast.enhancing.raw = {main="Beneficus",ammo="Incantor Stone",
head="Umuthi Hat",neck="Colossus's Torque",ear1="Augment. Earring",ear2="Androaa Earring",
body="Hyksos Robe",hands="Dynasty Mitts",
back="Swith Cape",waist="Olympus sash",legs="Piety Pantaloons",feet="Orsn. Duckbills +2"}
sets.midcast.enhancing.recast = {ammo="Incantor Stone",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Enchanter Earring +1",ear2="Loquacious Earring",
body="Theo. briault +1",hands="Dynasty Mitts",
back="Swith Cape",waist="Goading Belt",legs="Artsieq hose",feet="Piety Duckbills +1"}
sets.midcast.enhancing.barspell = {main="Beneficus",sub="Genbu's Shield",ammo="Incantor Stone",
head="Orison Cap +2",neck="Colossus's Torque",ear1="Augment. Earring",ear2="Androaa Earring",
body="Orison Bliaud +2",hands="Orison Mitts +2",
back="Mending Cape",waist="Olympus Sash",legs="Piety Pantaloons",feet="Orison Duckbills +2"}
sets.midcast.enhancing.regen = {main="Bolelabunga", legs="Theophany pantaloons",feet="Gendewitha galoshes",
hands="Orison Mitts +2",body="Piety Briault"}
sets.midcast.enhancing.turtle = {legs="Piety Pantaloons",feet="Piety Duckbills +1"}
sets.midcast.enhancing.stoneskin = {neck="Stone Gorget",waist="Siegel Sash",legs="Haven Hose",Ear1="Earthcry Earring"}
sets.midcast.divine = {}
sets.midcast.divine.holy = {main="Lehbrailg +2",sub="Mephitis Grip",head="Nahtirah Hat",neck="Eddy Necklace",
ear1="Friomisi Earring",ear2="Hecate's Earring",body="Bokwus Robe",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Songoma Ring",
back="Toro Cape",waist="Aswang Sash",legs="Theophany Pantaloons",feet="Weath. Souliers +1"}
sets.midcast.divine.banish = {main="Lehbrailg +2",sub="Mephitis Grip",head="Nahtirah Hat",neck="Eddy Necklace",
ear1="Friomisi Earring",ear2="Hecate's Earring",body="Bokwus Robe",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Songoma Ring",
back="Toro Cape",waist="Aswang Sash",legs="Theophany Pantaloons",feet="Weath. Souliers +1"}
sets.midcast.divine.repose = {ammo="Kalboron Stone",
main="Lehbrailg +2",sub="Mephitis Grip",head="Artsieq Hat",body="Theo. Briault +1",hands="Lurid Mitts",legs="Artsieq Hose",feet="Theo. Duckbills +1",
neck="Imbodla Necklace",waist="Ovate Rope",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",left_ring="Maquette Ring",right_ring="Sangoma Ring",
back="Refraction Cape"}
sets.midcast.divine.flash = { ammo="Kalboron Stone",
main="Lehbrailg +2",sub="Mephitis Grip",head="Artsieq Hat",body="Theo. Briault +1",hands="Lurid Mitts",legs="Artsieq Hose",feet="Theo. Duckbills +1",
neck="Imbodla Necklace",waist="Ovate Rope",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",left_ring="Maquette Ring",right_ring="Sangoma Ring",
back="Refraction Cape"}
sets.midcast.enfeebling = {}
sets.midcast.enfeebling.accuracy = { ammo="Kalboron Stone",
main="Lehbrailg +2",sub="Mephitis Grip",head="Artsieq Hat",body="Theo. Briault +1",hands="Lurid Mitts",legs="Artsieq Hose",feet="Theo. Duckbills +1",
neck="Imbodla Necklace",waist="Ovate Rope",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",left_ring="Maquette Ring",right_ring="Sangoma Ring",
back="Refraction Cape"}
sets.midcast.enfeebling.potency = {ammo="Kalboron Stone",
main="Lehbrailg +2",sub="Mephitis Grip",head="Artsieq Hat",body="Theo. Briault +1",hands="Lurid Mitts",legs="Artsieq Hose",feet="Theo. Duckbills +1",
neck="Imbodla Necklace",waist="Ovate Rope",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",left_ring="Aquasoul Ring",right_ring="Sangoma Ring",
back="Refraction Cape",}
sets.midcast.elemental = {}
sets.midcast.elemental.accuracy = {main="Lehbrailg +2",sub="Mephitis Grip",head="Nahtirah Hat",neck="Eddy Necklace",
ear1="Friomisi Earring",ear2="Hecate's Earring",body="Bokwus Robe",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Songoma Ring",
back="Toro Cape",waist="Aswang Sash",legs="Gendewitha Spats",feet="Weath. Souliers +1"}
sets.JA = {}
sets.JA["Benediction"] = {Head="Piety Briault"}
sets.JA["Devotion"] = {Head="Piety Cap +1"}
end
function pretarget(spell)
if spell.name == 'Cure III' and spell.target.type == 'PLAYER' and not spell.target.charmed and AutoAga == 1 then
cancel_spell()
send_command(';input /ma "Curaga III" '..spell.target.name..';')
return
end
end
Cures = S{'Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'}
Curagas = S{'Curaga','Curaga II','Curaga III','Curaga IV','Curaga V','Cura','Cura II','Cura III'}
Lyna = S{'Paralyna','Silena','Viruna','Erase','Cursna','Stona','Blindna','Poisona'}
Barspells = S{'Barfira','Barfire','Barwater','Barwatera','Barstone','Barstonra','Baraero','Baraera','Barblizzara','Barblizzard','Barthunder','Barthundra'}
Turtle = S{'Protectra V','Shellra V'}
Cursna = S{'Cursna'}
Regens = S{'Regen','Regen II','Regen III','Regen IV','Regen V'}
Enhanced = S{'Flurry','Haste','Refresh'}
Banished = S{'Banish','Banish II','Banish III','Banishga','Banishga II'}
Smited = S{'Holy','Holy II'}
Reposed = S{'Repose','Flash'}
Potency = S{'Slow','Paralyze'}
Defense = S{'Stoneskin'}
function precast(spell,action)
if midaction() then cancel_spell()
return
end
if 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(8,'Unable To Use WeaponSkill: [Disengaged]')
return
else
equipSet = sets.ws
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
equip(equipSet)
end
elseif spell.type == "JobAbility" then
if spell.type == 'JobAbility' and windower.ffxi.get_ability_recasts()[spell.recast_id] > 0 then
cancel_spell()
return
end
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
elseif spell.skill=='Healing Magic' then
if Cures:contains(spell.name) then
equip(sets.precast.cure)
elseif Curagas:contains(spell.name) then
equip(sets.precast.cure)
elseif Lyna:contains(spell.name) then
equip(sets.precast.healing)
else
equip(sets.precast.fastcast)
end
elseif spell.skill =='Enhancing Magic' then
equip(sets.precast.enhancing)
else
equip(sets.precast.fastcast)
end
end
function midcast(spell,action)
if spell.skill =='Healing Magic' then
if Cures:contains(spell.name) then
if world.day =='Lightsday' or world.weather_element == 'Light' or buffactive == 'Aurorastorm' then
if player.status == 'Engaged' then
equip(sets.engaged.healing.weather)
else
equip(sets.midcast.healing.weather)
end
else
if player.status == 'Engaged' then
equip(sets.engaged.healing.cure)
add_to_chat(8,'TP Sets Engaged')
else
equip(sets.midcast.healing.cure)
end
end
elseif Curagas:contains(spell.name) then
if world.day =='Lightsday' or world.weather_element == 'Light' or buffactive == 'Aurorastorm' then
if player.status == 'Engaged' then
equip(sets.engaged.healing.weather)
else
equip(sets.midcast.healing.weather)
end
else
if player.status == 'Engaged' then
equip(sets.engaged.healing.curaga)
else
equip(sets.midcast.healing.curaga)
end
end
elseif Lyna:contains(spell.name) then
if buffactive['Divine Caress'] then
equip(sets.midcast.healing.caress)
else
equip(sets.midcast.healing.lyna)
end
elseif Cursna:contains(spell.name) then
if buffactive['Divine Caress'] then
equip(sets.midcast.healing.cursnacaress)
else
equip(sets.midcast.healing.cursna)
end
else
equip(sets.midcast.healing.recast)
end
elseif spell.skill =='Enhancing Magic' then
if Regens:contains(spell.name) then
equip(sets.midcast.enhancing.regen)
elseif Barspells:contains(spell.name) then
equip(sets.midcast.enhancing.barspell)
elseif Turtle:contains(spell.name) then
equip(sets.midcast.enhancing.turtle)
elseif Enhanced:contains(spell.name) then
equip(sets.midcast.enhancing.recast)
elseif Defense:contains(spell.name) then
equip(sets.midcast.enhancing.stoneskin)
else
equip(sets.midcast.enhancing.raw)
end
elseif spell.skill =='Divine Magic' then
if Banished:contains(spell.name) then
equip(sets.midcast.divine.banish)
elseif Smited:contains(spell.name) then
equip(sets.midcast.divine.holy)
elseif Reposed:contains(spell.name) then
equip(sets.midcast.divine.repose)
elseif Flashed:contains(spell.name) then
equip(sets.midcast.divine.flash)
else
equip(sets.midcast.divine.flash)
end
elseif spell.skill =='Enfeebling Magic' then
if Potency:contains(spell.name) then
equip(sets.midcast.enfeebling.potency)
else
equip(sets.midcast.enfeebling.accuracy)
end
elseif spell.skill =='Elemental Magic' then
equip(sets.midcast.elemental.accuracy)
end
end
function aftercast(spell,action)
if Armor == '119' then
equip(sets.aftercast.defense)
else
Idle()
end
if buffactive['Sublimation: Complete'] and player.mpp < 75 and player.mpp > 25 then
add_to_chat(159,'Sublimation Completed: MP Mid Range')
if Sublimation == 1 then
windower.send_command('@wait 2;input /ja "Sublimation" <me>')
end
elseif buffactive['Sublimation: Complete'] and player.mpp < 25 then
add_to_chat(039,'Sublimation Completed: MP Danger Zone')
if Sublimation == 1 then
windower.send_command('@wait 2;input /ja "Sublimation" <me>')
end
elseif buffactive['Sublimation: Complete'] and player.mpp > 75 then
add_to_chat(158,'Sublimation Completed: MP Safe Zone')
elseif not buffactive['Sublimation: Complete'] and not buffactive['Sublimation: Activated'] and Sublimation == 1 then
windower.send_command('@wait 2;input /ja "Sublimation" <me>')
end
status_change(player.status)
end
function status_change(new,action)
if new == 'Idle' then
enable('main','sub')
if Armor == '119' then
equip(sets.aftercast.defense)
else
Idle()
end
elseif new == 'Resting' then
equip(sets.aftercast.resting)
elseif new == 'Engaged' then
disable('main','sub')
equipSet = sets.TP
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
equip(equipSet)
end
end
function buff_change(buff,gain_or_loss)
if buff == "Sandstorm" then
Idle()
end
end
function Idle()
if buffactive['Sandstorm'] then
equip(sets.aftercast.move)
elseif world.time >= (17*60) or world.time <= (7*60) then
equip(sets.aftercast.night)
else
equip(sets.aftercast.day)
end
end
function pet_midcast(spell,action)
end
function pet_aftercast(spell,action)
end
function self_command(command)
if command == 'C1' then -- Accuracy Level Toggle --
AccIndex = (AccIndex % #AccArray) + 1
add_to_chat(158,'Accuracy Level: '..AccArray[AccIndex])
status_change(player.status)
elseif command == 'C15' then -- MDT Toggle --
if Armor == '119' then
Armor = 'None'
add_to_chat(8,'119 Set: [Unlocked]')
else
Armor = '119'
add_to_chat(158,'119 Set: [Locked]')
end
status_change(player.status)
elseif command == 'A10' then -- Aga Toggle --
if AutoAga == 1 then
AutoAga = 0
add_to_chat(8,'Curaga 3 Mode: [Off]')
else
AutoAga = 1
add_to_chat(158,'Curaga 3 Mode: [ON]')
end
status_change(player.status)
elseif command == 'B10' then -- Sublimation Toggle --
if Sublimation == 1 then
Sublimation = 0
add_to_chat(8,'Auto Sublimation: [Off]')
else
Sublimation = 1
add_to_chat(158,'Auto Sublimation: [ON]')
end
status_change(player.status)
end
end
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-10-26 00:07:04
As for the sleep gear... that will work to equip it when I get put to sleep. Will it go back to my previous set when I wake? Or do I need to do something like Code
function job_buff_change(buff, gain)
if string.lower(buff) == "sleep" and gain and player.hp > 200 then
equip(sets.Berserker)
elseif string.lower(buff) == "sleep" and lost then
equip(meleeSet)
end
end
Or will gswap automatically go back to the previous set once sleep is lost?
Lastly... I have it set to equip regen gear when my hpp < 95%, which is great. But, is there a way to make it automatically go to my idle gear (with PDT gear and such) when my hp breaks 95%?
Code if buff == "sleep" and gain and player.hpp < 95 and player.status == "Engaged" then
equip({neck="Berserker's Torque"})
else
status_change(player.status)
end
Is all you need
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2014-10-26 01:24:19
I use mp rules like this~ Code
function get_sets()
send_command('input /macro book 7;wait .1;input /macro set 1') -- Change Default Macro Book Here --
AccIndex = 1
AccArray = {"Low","Mid","High"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. 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 --
Armor = 'None'
Rings = "Oneiros Ring"
sets.tp ={ring1=Rings}
Code if player.mp < 99 then
Rings = "Rajas Ring"
else
Rings = "Oneiros Ring"
end
This won't work. Rings is passed by value, not reference, at the time the table sets.tp is created. Changing the value of Rings later will not update that table, as sets.tp.ring1 is pointing to a string, not a pointer. If you want to use this method, you would have to make Rings a table, with the attribute name pointing to the string. i.e. Rings = {name="Oneiros Ring"}. Then change the name attribute, i.e. Rings.name = "Rajas Ring". That way, sets.tp.ring1 is pointing to a table, which is assigned by reference.
As for the sleep gear... that will work to equip it when I get put to sleep. Will it go back to my previous set when I wake? Or do I need to do something like Code
function job_buff_change(buff, gain)
if string.lower(buff) == "sleep" and gain and player.hp > 200 then
equip(sets.Berserker)
elseif string.lower(buff) == "sleep" and lost then
equip(meleeSet)
end
end
Or will gswap automatically go back to the previous set once sleep is lost?
Lastly... I have it set to equip regen gear when my hpp < 95%, which is great. But, is there a way to make it automatically go to my idle gear (with PDT gear and such) when my hp breaks 95%?
Code if buff == "sleep" and gain and player.hpp < 95 and player.status == "Engaged" then
equip({neck="Berserker's Torque"})
else
status_change(player.status)
end
Is all you need
I highly do not recommend using this. It will force the status_change function during actions--so if you happen to lose or gain a buff while you're casting a spell, you'll end up in your idle/engaged gear instead of proper midcast gear. At the very least, change the 'else' to 'elseif not midaction() then'.
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-10-26 02:23:10
Ragnarok.Flippant said: »I use mp rules like this~ Code
function get_sets()
send_command('input /macro book 7;wait .1;input /macro set 1') -- Change Default Macro Book Here --
AccIndex = 1
AccArray = {"Low","Mid","High"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. 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 --
Armor = 'None'
Rings = "Oneiros Ring"
sets.tp ={ring1=Rings}
Code if player.mp < 99 then
Rings = "Rajas Ring"
else
Rings = "Oneiros Ring"
end
This won't work. Rings is passed by value, not reference, at the time the table sets.tp is created. Changing the value of Rings later will not update that table, as sets.tp.ring1 is pointing to a string, not a pointer. If you want to use this method, you would have to make Rings a table, with the attribute name pointing to the string. i.e. Rings = {name="Oneiros Ring"}. Then change the name attribute, i.e. Rings.name = "Rajas Ring". That way, sets.tp.ring1 is pointing to a table, which is assigned by reference.
As for the sleep gear... that will work to equip it when I get put to sleep. Will it go back to my previous set when I wake? Or do I need to do something like Code
function job_buff_change(buff, gain)
if string.lower(buff) == "sleep" and gain and player.hp > 200 then
equip(sets.Berserker)
elseif string.lower(buff) == "sleep" and lost then
equip(meleeSet)
end
end
Or will gswap automatically go back to the previous set once sleep is lost?
Lastly... I have it set to equip regen gear when my hpp < 95%, which is great. But, is there a way to make it automatically go to my idle gear (with PDT gear and such) when my hp breaks 95%?
Code if buff == "sleep" and gain and player.hpp < 95 and player.status == "Engaged" then
equip({neck="Berserker's Torque"})
else
status_change(player.status)
end
Is all you need
I highly do not recommend using this. It will force the status_change function during actions--so if you happen to lose or gain a buff while you're casting a spell, you'll end up in your idle/engaged gear instead of proper midcast gear. At the very least, change the 'else' to 'elseif not midaction() then'.
I posted a better alternative after that which works far better but it can work (it was lazy code on the fly but there's a methodology for it although I'm not an advocate of it).
The force to Status_change is a valid point, I'll take another look at my rules again when at home to do so properly and get the full code, good catch.
By Darknightleo 2014-10-26 03:59:42
Hello! I'm not exactly sure where else to turn.
Does anyone have a good Corsair GS file I could download off of them? I've tried searching through multiple threads, but any I find are so old they barely work anymore. Or the download link is broken.
Any help is appreciated, thanks!
Server: Siren
Game: FFXI
Posts: 507
By Siren.Inuyushi 2014-10-26 09:36:43
Hello! I'm not exactly sure where else to turn.
Does anyone have a good Corsair GS file I could download off of them? I've tried searching through multiple threads, but any I find are so old they barely work anymore. Or the download link is broken.
Any help is appreciated, thanks!
If you want a file where you can just drop your sets into a predefined file, I'd recommend Mote's. He has a COR file. You can download all of this files here
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2014-10-26 12:27:07
You mean to use spell.skill when comparing to all the combat skills, not spell.type. Also, use parenthesis around or comparisons (not sure how Lua processes compound expressions, but typically the and is processed first, so, for example, your first condition will cancel every Marksmanship spell, regardless of distance; I always use them just to be sure anyway).
Can shorten it a bit using S table and the contain function. Can also combine the two conditionals since your processing is identical. And lastly, we can conclude, practically speaking, that if the WS is not archery or marksmanship skill, it must be a close-range skill, so we shouldn't need to check.
Code if spell.type:lower() == 'weaponskill' then
if (spell.target.distance > 21.2 and S{'archery','marksmanship'}:contains(spell.skill:lower())) or spell.target.distance > 4.2 then
cancel_spell()
add_to_chat(123, '**!!Canceled '..spell.name..'. '..spell.target.name..' is Too Far!!**')
eventArgs.handled = true
return handle_equipping_gear(player.status)
end
Didn't test, let me know if it doesn't work D;
By Xavierr 2014-10-26 15:22:17
Is there a way to use a different Idle set for when a Luopan is present as compared to when one is not? I've been trying a few methods but can't seem to get it to work.
Bismarck.Inference
Server: Bismarck
Game: FFXI
Posts: 417
By Bismarck.Inference 2014-10-26 16:18:18
Aren't luopan's considered pets? If so then : Code
if pet.isvalid then
equip(Luopan specific set)
else
equip(normal Idle Set)
end
Should work.
By Xavierr 2014-10-26 16:56:46
That is actually exactly what I have. I have tried this in aftercast and in function but neither one seems to do what I want it to do. I'll paste the entire thing up when I get off work and maybe someone will see something I can't.
By Darknightleo 2014-10-26 17:35:10
That is actually exactly what I have. I have tried this in aftercast and in function but neither one seems to do what I want it to do. I'll paste the entire thing up when I get off work and maybe someone will see something I can't. I couldn't get that to work for luopans, either. So I just made it a PetPDT set that's an offshoot of my normal PDT Idle.
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-10-26 18:53:37
that's the closest to a working code that i've seen but it didn't work >< i put the marksmanship and archery weaponskills in my rng lua (which is what i tested the code on) as .. = S{'..', '..'} etc too but it isn't registering the weaponskills. i've also tried contains:(spell.english) and am thinking the S{'archery','marksmanship'}:contains(spell.skill:lower()) needs more clarity.
any help is appreciated! Code ranged_ws = S{"Flaming Arrow", "Piercing Arrow", "Dulling Arrow", "Sidewinder", "Arching Arrow",
"Empyreal Arrow", "Refulgent Arrow", "Apex Arrow", "Namas Arrow", "Jishnu's Radiance", "Hot Shot",
"Split Shot", "Sniper Shot", "Slug Shot", "Heavy Shot", "Detonator", "Last Stand", "Trueflight","Wildfire"}
Code function pretarget(spell,action)
if player.status ~= 'Engaged' then
if (spell.target.distance >5 and spell.type == 'Weaponskill' and not ranged_ws[spell.name]) or (spell.target.distance > 21 and spell.type == '/weaponskill') then
cancel_spell()
return
end
This is how I do it in mine, but I don't use motes... and I don't think I've ever actually tested it..
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-10-26 19:30:08
woot! i got it to work finally, tyvm ^O^!! Code
if spell.type:lower() == 'weaponskill' then
if (spell.target.distance > 4.2 and not ranged_ws:contains(spell.english)) or (spell.target.distance > 21.2 and ranged_ws:contains(spell.english)) then
cancel_spell()
add_to_chat(123, '**!!Canceled '..spell.name..'. '..spell.target.name..' is Too Far!!**')
eventArgs.handled = true
end
end
then i put ranged_ws = S{'..', '..'} in user_setup()
Glad I helped
Quetzalcoatl.Orestes
Server: Quetzalcoatl
Game: FFXI
Posts: 430
By Quetzalcoatl.Orestes 2014-10-26 22:46:37
Thanks Orestes! The reive gear is equipping and the correct Serpentes gear is equipping while engaged for refresh. Couple things that I can't rap up:
I want to be able to list equipment for spells in the main/sub slot that will change when I'm not in a melee stance. I tried adding a 'None' melee stance so that when I'm in 'None' my weapons/shields change out depending on action. And when I want to engage, I go into one of the melee stances (Normal, Acc, etc). Sadly this isn't working. It works for my RDM_gear.lua, any idea why it works in RDM and not in BLU?
Quetzalcoatl.Orestes said: »A few questions for a couple things I've been trying to do. First off, I'm using Mote's gearswap files with everything in a sidecar file.
1 - Does Mote's gearswap automatically equip obis/zodiac ring/twilight cape? I'm pretty sure it does. This is the syntax.
Code
sets.example = {
ring1=gear.ElementalRing,
back=gear.ElementalCape,
waist=gear.ElementalObi
}
Mote has the default gear setup in Mote-Globals.lua. You can see what he has assigned here.
You should be able to change them, by redefining them in user or job_setup. ex: gear.default.obi_ring = "Strendu Ring"
What you gave will let me set a default ring to equip if I put gear.ElementalRing in the set. What I'm looking for is to have a default nuking set with MAB, Magic Damage+ in each slot by default. And depending on spell, I can update the ring/back/waist slot to equip if it's the correct day (for ring), day or weather (for cape and obi). I would imagine I would need something in the customize_idle_set and customize_melee_set functions, I just don't know what exactly. Something that would compare the spell element to world.day_element and world.weather_element? Then do a set_combine(meleeSet, sets.Elemental_day) or something of the nature.
As for the sleep gear... that will work to equip it when I get put to sleep. Will it go back to my previous set when I wake? Or do I need to do something like
Code
function job_buff_change(buff, gain)
if string.lower(buff) == "sleep" and gain and player.hp > 200 then
equip(sets.Berserker)
elseif string.lower(buff) == "sleep" and lost then
equip(meleeSet)
end
end
Or will gswap automatically go back to the previous set once sleep is lost?
Lastly... I have it set to equip regen gear when my hpp < 95%, which is great. But, is there a way to make it automatically go to my idle gear (with PDT gear and such) when my hp breaks 95%?
Sorry if this is coming across too demanding. I'm not a programmer by nature. Just a normal Mechanical Engineer. All help is appreciated!
I'm a little unclear on what you're trying to do with your weapon slots. Is there an example lua i can see that's already doing what you want?
As for obis, they do exactly that with the special sets I mentioned. If there's an obi in your inventory for the day matching the spell you're using, it will be used. Otherwise, the default will be used, specified in the syntax above.
The last thing you mentioned doesn't sound possible. Your changing doesn't trigger any sort of event we can piggy back on. You could check hp when your status changes from engaged to idle and vice versa. You could also check it when you use an ability, or when you hit the update button (F12).
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2014-10-27 00:38:03
That is actually exactly what I have. I have tried this in aftercast and in function but neither one seems to do what I want it to do. I'll paste the entire thing up when I get off work and maybe someone will see something I can't.
pet.isvalid is not updated fast enough to register your pet immediately after a Geo spell (probably something to do with pet taking a second to pop first in game). Does your code work if you trigger something else after having casted the Geo spell, or manually update your idle gear?
You could create and maintain your own variable, something like
Code function aftercast(spell,action)
if not spell.interrupted then
if string.find(spell.english,'Geo') then
luopan = true
elseif spell.english=="Full Circle" or not pet.isvalid then
luopan = false
end
end
status_gear()
end
and use the variable to determine your idle gear.
By Kooljack 2014-10-27 00:55:11
this wont work idk: Code hands={"Xaddi Gauntlets",augments={"Accuracy+15"}}
this samlua has this built into the code, not sure if it works beccause i dont have acc+8 ontronif but i tried use the same idea to change xaddi gauntlets based on acc differentiator between the two pairs I have but it won't work, any ideas for me to try?
Code legs={"Otronif Brais +1",augments={"Accuracy +8"}}
By Kooljack 2014-10-27 00:56:11
what would i use to swap; say, the pre-determened augment armor (paths ABC), what would the code look like to have those different pieces swapping how one needs? is my question as best as I can ask. tough sometimes hehe
any help;) /bow /salute All~
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.
|
|