|
Gearswap Support Thread
By ProjectA2O 2014-07-29 20:27:06
Hey all, hoping someone can help me with some small modifications to the skillup.lua(big thank you for this btw)thats posted on BG.
I have a little bit of spellcast experience and just started messing with gearswap so please bare with me.
I'm trying to figure out how to get the script to cycle cure1&2 on a target(bones) and not myself, I tried deleting all spells except the two cures from line 33 and changed all instances of <me> to <t> hoping it would be that easy, it runs as far as casting the cures on the target but stops after C2 with an aftercast error something about a nil value.
I can post the full error message if that would help at all.
By kenshynofshiva 2014-07-30 08:15:27
Code
if skilluprun then
if spell.type == "Geomancy" then
if geomancycap and handbellcap then
skilluprun = false
shutdown_logoff()
return
end
send_command('wait 3.0;input /ma "'..geospells[geocount]..'" <me>')
elseif spell.skill == "Healing Magic" then
if healingcap then
skilluprun = false
shutdown_logoff()
return
end
send_command('wait 3.0;input /ma "'..healingspells[healingcount]..'" <me>')
elseif spell.skill == "Enhancing Magic" then
if enhancingcap then
skilluprun = false
shutdown_logoff()
return
end
Have be a bit more specific on the line number or what it states is nil. Looks like it has a counter healingcount that increments the cures being casted which needs to corrected. It walks all these spells from the look of it healingspells = {"Blindna","Cura","Cura II","Cura III","Curaga","Curaga II","Curaga III","Curaga IV","Curaga V","Cure","Cure II","Cure III","Cure IV","Cure V","Cure VI","Cursna","Esuna","Paralyna","Poisona","Reraise","Reraise II","Reraise III","Silena","Stona","Viruna"}
healingcount = 1
Heres the loop code here:
elseif spell.skill == "Healing Magic" and skilluprun then
cancel_spell()
if healingcount < 25 then
healingcount = healingcount +1
else
healingcount = 1
end
send_command('input /ma "'..healingspells[healingcount]..'" <me>')
return
Could change 2
healingspells = {"Cure","Cure II"}
elseif spell.skill == "Healing Magic" and skilluprun then
cancel_spell()
if healingcount < 3 then
healingcount = healingcount +1
else
healingcount = 1
end
send_command('input /ma "'..healingspells[healingcount]..'" <t>')
return
By ProjectA2O 2014-07-30 10:04:21
Thanks for the response, I tried the "if healingcount < 3" change and I'm still getting an error but not in the aftercast section anymore.
GearSwap: Lua error (runtime) - ...gram Files (x86)/Windower4//addons/gearswap/flow.lua:288:
GearSwap has detected an error in the user function self_command:
...es (x86)\Windower4\/addons/gearswap/data/skillup.lua:557: attempt to concatenate field '?' (a nil value)
Edit: so the :557: is they line that gearswap is encountering the error?
By kenshynofshiva 2014-07-30 12:41:07
Yeah the send command it looks like:
if command == "starthealing" then
skilluprun = true
skillupcount = 2
send_command('wait 1.0;input /ma "'..healingspells[healingcount]..'" <me>')
add_to_chat(123,"Starting Healing Skill up")
end
Is the healingspells structure reduced to
healingspells = {"Cure","Cure II"}
By ProjectA2O 2014-07-30 15:18:53
I deleted all spells except the two cures.
Line 33 is just
healingspells = {"Cure","Cure II"}
Lines 554 - 559
if command == "starthealing" then
skilluprun = true
skillupcount = 2
send_command('wait 1.0;input /ma "'..healingspells[healingcount]..'" <t>')
add_to_chat(123,"Starting Healing Skill up")
end
By kenshynofshiva 2014-07-30 16:01:53
Healingcount can get to 3 ouch logic error
if healingcount < 2 then
healingcount = healingcount +1
else
healingcount = 1
end
By Xavierr 2014-07-30 20:16:28
For 1 reason or another I can not get this GS to change to my enfeeble set during midcast. I have tried every which way I know of to get it working but I've run out of ideas D: Trying to get this to work with para, slow, etc... not BRD songs.
------------------------------------------------------------------------------------------------------------
-- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
town_zones = S{"Ru'Lude Gardens","Upper Jeuno","Lower Jeuno","Port Jeuno",
"Western Adoulin","Eastern Adoulin","Aht Urhgan Whitegate","Al Zahbi","Nashmau",
"Port Windhurst","Windhurst Walls", "Windhurst Woods", "Windhurst Waters",
"Port Bastok", "Bastok Mines", "Bastok Markets", "Metalworks",
"Northern San d'Oria", "Southern San d'Oria","Port San d'Oria"}
FakeSongs = S{"Goddess's Hymnus",'Warding round',"Army's Paeon",'Herb Pastoral','Goblin Gavotte'}
function get_sets()
--DarkRing = {name="Dark Ring",augments={"Physical Damage Taken -6%", "Magical Damage Taken -3%", "Spell Interruption Rate Down 5%"}}
--rightDarkRing = {name="Dark Ring",augments={"Physical Damage Taken -5%", "Magical Damage Taken -3%"}}
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Idle sets
sets.idle =
{main="Earth staff", sub="Tzacab Grip",range="Gjallarhorn",
head="Wivre Hairpin",neck="Twilight torque",ear1="Sanare Earring",ear2="Black Earring",
body="Gende. Bilaut +1",hands="Mdk. Dastanas +1",ring1="dark Ring",ring2="defending Ring",
back="Kumbira Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = set_combine(sets.idle,
{main="Terra's staff",
body="Gendewitha Bliaut", hands="Serpentes cuffs",
legs="Nares Trews",feet="Chelona Boots"})
-- Defense sets (not used, only base sets, or macro activated)
sets.defense =
{main="Legato Dagger", sub="Genbu's Shield",
head="Gendewitha Caubeen",neck="Twilight torque",ear1="Merman's Earring",ear2="Merman's Earring",
body="Vanir Cotehardie",hands="Gende. Gages +1",ring1="dark Ring",ring2="defending Ring",
back="Umbra Cape", waist="slipor sash", legs="Gende. Spats +1", feet="Gende. Galosh. +1"}
sets.Kiting = set_combine(sets.defense,
{main="Terra's staff", sub="Oneiros Grip",
legs="Gende. Spats +1", feet="Aoidos' Cothurnes +2"})
-- Precast Sets
sets.fastcast = set_combine(sets.defense,
{head="Nahtirah Hat",neck="orunmila's torque",ear2="Loquac. Earring",
body="anhur robe",hands="Gende. Gages +1",ring1="Prolix Ring",
back="Swith Cape", legs="Orvail Pants +1",feet="Nabu's Crackows"})
sets.songcast = set_combine(sets.defense,
{main="Felibre's Dague", sub="Genbu's shield",
head="Aoidos' Calot +2",neck="orunmila's torque",ear1="Aoidos' Earring",ear2="Loquac. Earring",
body="Anhur robe",hands="Mdk. Dastanas +1",ring1="Prolix Ring",
back="Swith Cape", waist="Aoidos' belt", legs="Gende. Spats +1",feet="Bihu Slippers +1"})
sets.curecast = set_combine(sets.fastcast,
{body="Heka's Kalasiris", back="Pahtli cape"})
sets.enhancecast = set_combine(sets.fastcast,
{waist="Siegel Sash",head="Umuthi Hat"})
sets.nincast = set_combine(sets.fastcast, {})
-- Precast sets to enhance JAs
sets.Nightingale = {feet="Bihu Slippers +1"}
sets.Troubadour = {body="Bihu Justaucorps"}
sets.SoulVoice = {legs="Bihu Cannions"}
-- Waltz set (chr and vit)
sets.Waltz = set_combine(sets.defense,
{range="Gjallarhorn",
head="Nahtirah Hat",
body="Gendewitha Bliaut",
back="Refraction Cape",legs="Gende. Spats +1",feet="Gende. Galosh. +1"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.WS =
{range="Gjallarhorn",
head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Bard's Justaucorps +2",hands="Gende. gages +1",ring1="Rajas Ring",
back="Atheling Mantle",waist="Caudata Belt",legs="Gende. Spats +1",feet="Gende. Galosh. +1"}
sets.WS.Evisceration = set_combine(sets.WS, {})
sets.WS.Exent = set_combine(sets.WS, {})
-- Midcast Sets
-- General set for recast times.
sets.FastRecast = set_combine(sets.defense,
{head="Nahtirah Hat",main="Felibre's Dague",neck="Orunmila's Torque", ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Gende. Gages +1",ring1="Prolix Ring",
back="Swith Cape",waist="Witful belt",legs="Orvail Pants +1",feet="Nabu's Crackows"})
-- Song-specific recast reduction
sets.SongRecast = set_combine(sets.FastRecast, {legs="Aoidos' Rhing. +2", feet="Bihu Slippers +1", waist="Aoidos' Belt"})
sets.FakeSong = set_combine(sets.SongRecast, {range="Terpander"})
-- Buff Song midcasts
sets.SongEffect = set_combine(sets.defense, {main="Legato Dagger", sub="Genbu's shield",
head="Aoidos' Calot +2",neck="Aoidos' Matinee",ear2="Loquacious Earring",
body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",ring1="Prolix Ring",
legs="Marduk's Shalwar +1",feet="Brioso Slippers +1",range="Eminent Flute"})
sets.SongEffect.Ballad = set_combine(sets.SongEffect,
{legs="Aoidos' Rhing. +2"})
sets.SongEffect.Madrigal = set_combine(sets.SongEffect,
{head="Aoidos' Calot +2"})
sets.SongEffect.March = set_combine(sets.SongEffect,
{hands="Aoidos' manchettes +2"})
sets.SongEffect.Minuet = set_combine(sets.SongEffect,
{body="Aoidos' Hongreline +2"})
sets.SongEffect.Minne = set_combine(sets.SongEffect,{})
sets.SongEffect.Carol = set_combine(sets.SongEffect,
{head="Aoidos' Calot +2",
body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",
legs="Aoidos' Rhing. +2",feet="Aoidos' Cothrn. +2"})
sets.SongEffect.Scherzo = set_combine(sets.SongEffect,{feet="Aoidos' Cothrn. +2"})
sets.SongEffect.Paeon = set_combine(sets.SongEffect,
{head="Brioso Roundlet"})
-- song Debuffs midcasts
sets.SongDebuff =
{main="Venabulum",sub="Mephitis Grip",range="Eminent Flute",
head="Bihu Roundlet +1",neck="Orunmila's torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Brioso Just. +1",hands="Lurid Mitts",ring1="Sangoma ring",ring2="Perception ring",
back="Rhapsode's Cape",waist="Demonry Sash",legs="Brioso Cann. +1",feet="Orvail Souliers +1"}
sets.SongDebuff.Finale = set_combine(sets.SongDebuff,{})
sets.SongDebuff.Lullaby = set_combine(sets.SongDebuff,
{hands="Brioso Cuffs +1"})
-- Magic midcasts.
sets.Cure = set_combine(sets.FastRecast, {
main="Chatoyant staff",sub='Verse strap +1',
head="Gende. caubeen +1", ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Heka's Kalasiris",hands="Bokwus Gloves", ring1="Ephedra Ring", ring2="Sirona's Ring",
legs="Nares Trews", feet="Gende. Galosh. +1"})
sets.Stoneskin = set_combine(sets.defense,{
waist="Siegel sash", legs="Shedir seraweels", head="Umuthi Hat"})
sets.EnhancingMagic = set_combine(sets.defense,{
legs="Shedir seraweels"})
sets.Enfeeble =
{main="Venabulum", sub="Mephitis Grip", range="Gjallarhorn",
head="Nahtirah hat", neck="Weike torque", ear1="Psystorm Earring", ear2="Lifestorm Earring",
body="Brioso just +1", hands="Lurid Mitts", ring1="Sangoma ring", ring2="Maquette ring",
back="Refraction Cape", waist="Phasmida belt", legs="Aoidos' Rhing. +2", feet="Bokwus Boots"}
sets.Cursna = set_combine(sets.FastRecast,
{ring1="Ephedra Ring"})
sets.Nuke = set_combine(sets.fastcast,
{body="Bokwus Robe",
main="Venabulum",
sub="Mephitis Grip",
waist="Maniacus Sash",
hands="Yaoyotl Gloves",
ear1="Hecate's Earring",
feet="Umbani Boots",
ring1="Sangoma Ring",
ring2="Strendu Ring",
ear2="Friomisi Earring",
neck="Stoicheion Medal"})
-- Engaged sets
sets.engaged = set_combine(sets.defense,
{range="Gjallarhorn",
head="Gende. caubeen +1", neck="Asperity necklace", ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Hedera Cotehardie", hands="Gende. Gages +1",
back="Atheling mantle", waist="Phasmida belt",legs="Gende. Spats +1",feet="Gende. Galosh. +1"})
-- Sets with weapons defined.
sets.engaged.Dagger = set_combine(sets.engaged,
{main="Mandau", sub="Genbu's shield"})
sets.engaged.DW = set_combine(sets.engaged,
{main="Mandau", sub="Atoyac"})
sets.Gearcollector =
{item="Remedy", item2="Echo Drops",}
end
-------------------------------------------------------------------------------------------------------------------
-- Precast Rules
-------------------------------------------------------------------------------------------------------------------
function precast(spell)
if spell.action_type == 'Magic' then
if spell.type == 'BardSong' then
-- Auto-Pianissimo
if spell.target.type == 'PLAYER' and not spell.target.charmed and not buffactive['Pianissimo'] then
cancel_spell()
send_command('@input /ja "Pianissimo" <me>; wait 1.25; input /ma "'..spell.name..'" '..spell.target.name)
return
elseif buffactive['Nightingale'] then
if spell.target.type == 'SELF' or spell.target.type == 'PLAYER' then
if spell.english:find('Ballad') then
equip(sets.SongEffect.Ballad)
elseif spell.english:find('Madrigal') then
equip(sets.SongEffect.Madrigal)
elseif spell.english:find('March') then
equip(sets.SongEffect.March)
elseif spell.english:find('Minuet') then
equip(sets.SongEffect.Minuet)
elseif spell.english:find('Minne') then
equip(sets.SongEffect.Minne)
elseif spell.english:find('Carol') then
equip(sets.SongEffect.Carol)
elseif spell.english:find('Scherzo') then
equip(sets.SongEffect.Scherzo)
elseif spell.english:find('Paeon V') then
equip(sets.SongEffect.Paeon)
elseif FakeSongs:contains(spell.name) then
equip(sets.FakeSong)
else
equip(sets.SongEffect)
end
elseif spell.target.type == 'MONSTER' then
if spell.english:find('Lullaby') then
equip(sets.SongDebuff.Lullaby)
elseif spell.english:find('Finale') then
equip(sets.SongDebuff.Finale)
else
equip(sets.SongDebuff)
end
end
else
equip(sets.songcast)
end
elseif spell.skill == 'Healing Magic' then
if spell.english:find('Cure') or spell.english:find('Cura')then
equip(sets.fastcast)
else
equip(sets.fastcast)
end
elseif spell.skill == 'Enhancing Magic' then
equip(sets.enhancecast)
elseif spell.skill == 'Ninjutsu' then
equip(sets.nincast)
else
equip(sets.fastcast)
end
elseif spell.type == 'JobAbility' then
if spell.english == 'Nightingale' then
equip(sets.Nightingale)
elseif spell.english == 'Troubadour' then
equip(sets.Troubadour)
elseif spell.english == 'Soul Voice' then
equip(sets.SoulVoice)
end
elseif spell.type == 'WeaponSkill' then
equip(sets.WS)
end
end
-------------------------------------------------------------------------------------------------------------------
-- Midcast Rules
-------------------------------------------------------------------------------------------------------------------
function midcast(spell)
if spell.skill == 'Singing' then
if spell.target.type == 'SELF' or spell.target.type == 'PLAYER' then
if spell.english:find('Ballad') then
equip(sets.SongEffect.Ballad)
elseif spell.english:find('Madrigal') then
equip(sets.SongEffect.Madrigal)
elseif spell.english:find('March') then
equip(sets.SongEffect.March)
elseif spell.english:find('Minuet') then
equip(sets.SongEffect.Minuet)
elseif spell.english:find('Minne') then
equip(sets.SongEffect.Minne)
elseif spell.english:find('Carol') then
equip(sets.SongEffect.Carol)
elseif spell.english:find('Scherzo') then
equip(sets.SongEffect.Scherzo)
elseif spell.english:find('Paeon V') then
equip(sets.SongEffect.Paeon)
elseif FakeSongs:contains(spell.name) then
equip(sets.FakeSong)
else
equip(sets.SongEffect)
end
elseif spell.target.type == 'MONSTER' then
if spell.english:find('Lullaby') then
equip(sets.SongDebuff.Lullaby)
elseif spell.english:find('Finale') then
equip(sets.SongDebuff.Finale)
else
equip(sets.SongDebuff)
end
end
elseif spell.skill == 'Healing Magic' then
if spell.english:find('Cure') or spell.english:find('Cura')then
equip(sets.Cure)
elseif spell.english:find('Cursna') then
equip(sets.Cursna)
else
equip(sets.FastRecast)
end
elseif spell.skill == 'Enhancing Magic' then
if spell.english:find('Bar') or spell.english:find('Boost') or spell.english:find('Protect') or spell.english:find('Shell') then
equip(sets.EnhancingMagic)
elseif spell.english:find('Stoneskin') then
equip(sets.Stoneskin)
else
equip(sets.FastRecast)
end
elseif spell.skill == 'Elemental Magic' then
if spell.english:find('Stone') or spell.english:find('Fir') or spell.english:find('Water') or spell.english:find('Bliz')
or spell.english:find('Thun') or spell.english:find('Aero') then
equip(sets.Nuke)
elseif spell.skill == 'Enfeebling Magic' then
if spell.english:find('Paralyze') or spell.english:find('Slow')then
equip(sets.Enfeeble)
else
equip(sets.FastRecast)
end
elseif spell.prefix == "/magic" or spell.prefix == "/ninjutsu" then
equip(sets.FastRecast)
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Aftercast Rules
-------------------------------------------------------------------------------------------------------------------
function aftercast(spell)
if player.status == 'Engaged' then
if player.sub_job == 'DNC' or player.sub_job == 'NIN'then
equip(sets.engaged.DW)
else
equip(sets.engaged.Dagger)
end
elseif player.status == 'Idle' then
if town_zones:contains(world.area) then
equip(sets.idle)
else
equip(sets.idle)
end
end
end
function status_change(new,old)
if new == 'Engaged' then
disable('main','sub')
add_to_chat(206,'Weapons locked')
elseif new == 'Idle' then
equip(sets.idle)
add_to_chat(206,'Idle set')
elseif new == 'Resting' then
enable('main','sub')
equip(sets.resting)
add_to_chat(206,'Resting set, weapons unlocked')
end
end
By kenshynofshiva 2014-07-30 20:21:15
Question anyone use the //gs equip setname to manually test sets?
Trying with the following:
sets.TP = {}
sets.TP.index = {'Standard', 'Solo', 'Marches', 'AccuracyLite', 'AccuracyFull', 'DT', 'DTAccuracy'}
--1=Standard, 2=Solo, 3=Marches, 4=AccuracyLite, 5=AccuracyFull, 6=DT, 7=DTAccuracy--
TP_ind = 1
sets.TP.Standard = {...
Tried many variations and nada....
Ugh case sensitive lol how I miss that //gs equip sets.TP.Standard
Serveur: Asura
Game: FFXI
Posts: 670
By Asura.Izilder 2014-07-31 12:09:29
ive just started to use Bokura's PLD LUA - anyone know how i can stop going into cure down set if im in a dt/pdt or hybrid mode
also there is an small issue which happens when trying to WS unengaged.
with line 608 on initial use
"attempt to compare number with nil"
http://pastebin.com/enF6Paf4
By kenshynofshiva 2014-07-31 13:26:30
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(123,'Unable To Use WeaponSkill: [Disengaged]')
return
Serveur: Asura
Game: FFXI
Posts: 670
By Asura.Izilder 2014-07-31 13:49:45
thats the lines - how can i stop the error :)
and any idea about this cure lock?
By kenshynofshiva 2014-07-31 13:59:05
Pretty much if want to ws disengaged then delete:
Code 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
else
By kenshynofshiva 2014-07-31 14:22:43
It looks like he stores the info in Armor:
Code if Armor == 'DT' then
Armor = 'None'
add_to_chat(123,'DT Set: [Unlocked]')
else
Armor = 'DT'
add_to_chat(158,'DT Set: [Locked]')
end
Code
if Armor == 'DT' or Armor == 'Hybrid' or Armor == 'PDT' then
return
end
At the top of midcast...
Serveur: Asura
Game: FFXI
Posts: 670
By Asura.Izilder 2014-07-31 16:40:38
thanks ! xd but seems i had to put it at start of precast to work
By kenshynofshiva 2014-07-31 19:46:54
Oh lol he must do one in each lol
By Mozhat 2014-08-01 13:38:41
Is there a Lua/Gearswap script for party chat?
Example: to let the party know you have a status on /party Cursna Please!
If there is, please tell me where I need to put them.
By kenshynofshiva 2014-08-01 13:46:13
Easy enough to add to the section of gain lose buff if curse then send_command ("input /p cursna please!!!!") like so or have it use meds automatically...
Sample sleep: Code
function buff_change(buff,gain)
buff = string.lower(buff)
if buff == "sleep" and gain and player.hp > 200 and player.status == "Engaged" then -- Equip Berserker's Torque When You Are Asleep & Have 200+ HP --
equip({neck="Berserker's Torque"})
else
if not midaction() then
status_change(player.status)
end
end
end
By Mozhat 2014-08-01 21:41:59
Still won't work.
Asura.Lewyo
Serveur: Asura
Game: FFXI
Posts: 86
By Asura.Lewyo 2014-08-02 08:24:34
Can anyone see whats wrong with my prefect defense timer i've tried lots of thing but i cannot seem to get it to work.
Code function aftercast(spell,action)
if not string.find(spell.type,'BloodPact') and not Avatars:contains(spell.english) and not Spirits:contains(spell.english) then
status_change(player.status)
elseif spell.english == "Sleepga" and not spell.interrupted then -- Sleepga Countdown --
send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
end
if not spell.interrupted then
if spell.english == "Perfect Defense" then -- Perfect Defense Countdown --
send_command('wait 47;input /echo '..spell.name..' Effect: [WEARING OFF IN 10 SEC.];wait 10;input /p '..spell.name..' Effect: [OFF]')
end
end
if player.status =='Idle' then
status_change(player.status)
end
end
Cerberus.Conagh
Serveur: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-08-02 08:51:28
Code send_command('@wait 47;input /echo '..spell.name..' Effect: [WEARING OFF IN 10 SEC.];@wait 10;input /p '..spell.name..' Effect: [OFF]')
Missed the @ signs ~
I use this on sleepga
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
Works perfectly
By Jadey 2014-08-02 15:44:24
I can't seem to get my GEO .lua to both inject a custom timer for an Indi-Spell and equip my aftercast gear. Sometimes it'll equip the aftercast on the first Indi after a reload but none beyond that.
Code function get_sets()
-- Load and initialize the include file.
include('Mote-Include.lua')
oldIndi = ''
end
function aftercast(spell)
equip(sets.aftercast)
if player.indi and not classes.CustomIdleGroups:contains('Indi')then
classes.CustomIdleGroups:append('Indi')
handle_equipping_gear(player.status)
elseif classes.CustomIdleGroups:contains('Indi') and not player.indi then
classes.CustomIdleGroups:clear()
handle_equipping_gear(player.status)
end
if not spell.interrupted then
if string.find(spell.english,'Indi') then
send_command('@timers d '..oldIndi)
oldIndi = spell.name
send_command('@timers c '..spell.name..' 195 down')
equip(sets.aftercast)
end
if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
end
end
end
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-08-02 16:48:36
Did you check to make sure that the buff you were looking for was the buff that you got? Remember, it's case-sensitive.
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-08-02 16:49:01
Well, that's a bit of a mess.
1) Code if not string.find(spell.type,'BloodPact') and not Avatars:contains(spell.english) and not Spirits:contains(spell.english) then
Don't use string.find, use :startswith(), for that type of check. EG:
Code if not spell.type:startswith('BloodPact') and not Avatars:contains(spell.english) and not Spirits:contains(spell.english) then
2) Your if/elseif restrictions are poorly made. For example, the Sleepga check will -never- work because it will always be caught by the not Bloodpact/not Avatar/not Spirit check.
3) You're checking for spell.interrupted in two places, and calling status_change in two places. Redundant code, and possibly causing rule conflicts.
4) Perfect Defense is a blood pact, and isn't actually complete until pet_aftercast, not normal aftercast.
5) Sleepga is probably the blood pact version? Assuming that's the case.
Order of checks:
1) Timers for non-interrupted actions Code
if not spell.interrupted then
if spell.english == "Sleepga" then -- Sleepga Countdown --
send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
elseif spell.english == "Perfect Defense" then -- Perfect Defense Countdown --
send_command('wait 47;input /echo '..spell.name..' Effect: [WEARING OFF IN 10 SEC.];wait 10;input /p '..spell.name..' Effect: [OFF]')
end
end
2) Put on idle gear if appropriate. Note: status_change() is called with player.status, which means checking for player.status == 'Idle' should be redundant. The status_change function ought to be checking for that anyway. Therefore all you're really doing is getting status_change to do its job. However you don't want to do that if you've just used a blood pact. Not sure why you're checking for Avatars and Spirits, though, since those are ordinary spells.
Code
if not spell.type:startswith('BloodPact') then
status_change(player.status)
end
3) Thus, complete form is simplified to: Code
function aftercast(spell)
if not spell.type:startswith('BloodPact') then
status_change(player.status)
end
end
function pet_aftercast(spell)
if not spell.interrupted then
if spell.english == "Sleepga" then -- Sleepga Countdown --
send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
elseif spell.english == "Perfect Defense" then -- Perfect Defense Countdown --
send_command('wait 47;input /echo '..spell.name..' Effect: [WEARING OFF IN 10 SEC.];wait 10;input /p '..spell.name..' Effect: [OFF]')
end
end
status_change(player.status)
end
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-08-02 17:51:27
I can't seem to get my GEO .lua to both inject a custom timer for an Indi-Spell and equip my aftercast gear. Sometimes it'll equip the aftercast on the first Indi after a reload but none beyond that.
You're using my includes. Why are you even trying to equip(sets.aftercast)? It should automatically equip sets.idle or sets.engaged (or refinements of those), as appropriate.
Why are you calling handle_equipping_gear()? That's automatically called after aftercast. Actually, you defined the 'aftercast' function, not the 'job_aftercast' function, so you just broke all the aftercast handling.
I'm trying to rework this based on what it looks like you're trying to do...
Code
function job_setup()
indi_timer = ''
indi_duration = 180 -- adjust as needed
end
function job_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted then
if spell.english:startswith('Indi') then
if not classes.CustomIdleGroups:contains('Indi') then
classes.CustomIdleGroups:append('Indi')
end
send_command('@timers d "'..indi_timer..'"')
indi_timer = spell.english
send_command('@timers c "'..indi_timer..'" '..indi_duration..' down spells/00136.png')
elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 60 down spells/00220.png')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 90 down spells/00220.png')
end
end
if not player.indi and (not spell.english:startswith('Indi') or spell.interrupted) then
classes.CustomIdleGroups:clear()
end
end
Went ahead and put the sleep timers as custom timers as well. Remove oldIndi from get_sets().
By Jadey 2014-08-02 18:11:09
Casting Indi-spells with that slotted in gives the error
Code attempt to concatenate global 'timer_duration' (a nil value)
I changed indi_duration to timer_duration and it seems to work fine. Thanks!
E: I'm not sure if the includes/utility are what dictate the Aftermath timer injections, but GEO Aftermath times seem to match up exactly with BLM (4:30 levels 1/2, 3:00 level 3.)
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-08-02 18:53:43
Woops. Should have been the other way around (change timer_duration to indi_duration). Was a copy/paste error.
Edit: Also, you didn't mention Aftermath the first time, just aftercast. Not sure on the details of what you want, there.
By Jadey 2014-08-02 19:05:56
That's a separate issue mostly so I don't have to bother self-timing aftermath. I know that on PUP the libs seem to auto-inject aftermath timers on Stringing Pummel usage. I'd like for Idris to trigger the same timer on Exudation use, but I don't know what I would need to change/if it would require something more on the developer end to include it since it isn't technically a mythic ws even though it seems to function identically.
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-08-03 02:50:00
Add ["Idris"] = "Exudation" to the list of mythic weaponskills in Mote-Mappings. Add 'Idris' to special_aftermath_mythics in Mote-Utility. Use custom_aftermath_timers_precast() and custom_aftermath_timers_aftercast() from Mote-Utility in the job_precast/job_aftercast functions.
Quetzalcoatl.Dab
Serveur: Quetzalcoatl
Game: FFXI
Posts: 35
By Quetzalcoatl.Dab 2014-08-03 03:52:07
How would I add a more then 100MP TP set for THF.lua? for the triple attack ring
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.
|
|