if anybody wants to critique my menu for gearswap here it is
http://pastebin.com/828JrAxf
i can post some images if you would like to see what it looks like
if anybody wants to critique my menu for gearswap here it is
http://pastebin.com/828JrAxf
i can post some images if you would like to see what it looks like
I would like to see those pics, please and thank you![]()
thanks i edited my post now and managed to put code tags around it![]()
EDIT: I have found a solution tomy problem within mote's template, but would still like an answer out of curiosity.
Can anyone explain to me why neither of these work?
Code:function aftercast(spell,action) if player.in_combat and pet.isvalid then equip(sets.aftercast) elseif not player.in_combat and pet.isvalid then equip(sets.aftercast.PetEngaged) end endCode:function aftercast(spell,action) if player.status =='Engaged' then equip(sets.aftercast) elseif player.status =='Idle' and pet.isvalid then equip(sets.aftercast.PetEngaged) end end
If you have a sets.midcast.Stun set, that will be used instead of the sets.midcast['Dark Magic'] set. The gear you define in sets.midcast.Stun will be applied on top of sets.midcast.FastRecast. If your sets.midcast.Stun set is empty, the only gear applied will be sets.midcast.FastRecast. Any gear you define in sets.midcast.Stun will be used in place of any gear in sets.midcast.FastRecast.
On the other hand, if sets.midcast.Stun doesn't exist at all, it will fall back on sets.midcast['Dark Magic'], if it exists, and follow the same overlay rules.
Hmm was there any change since last night that would make "Now_Indi = spell.name" just stop working? as well as my Cure spell code that is based on mote's stuff that changes tiers of cure based on what HP is missing. All of this was workin last night and then just wasnt workin tonight. Only thing i did was change a shield in my lua to anotehr one.
sorry it took so much time sleep found my number and i answered
but here you areSpoiler: show
--added spoiler tags my bad
Ah! That makes sense. Thanks. I'm beginning to understand how this works more and more thanks to your answers.
One (hopefully) last question. Would I have to define anything for stun in the beginning list of spell changes? Or if I say, copy the sets.midcast['Dark Magic'] then tweak it and title it sets.midcast.Stun will that be enough? Or would I need to change code somewhere else?
Actually, I lied. I do have one more question. Every time I load those two files I posted a page back I get an error that they're out of date and a link to fix it. They still function, but I'm wondering if I should get on that.
I tried following the guide but I got stuck along the way. Is there some easy way I could update my files, or is it even necessary?
OK so i think i figured out what is wrong with gearswap. Its not using my precast at all. Keeping in mind i havent changed anything in the code for it, its not using any fast cast gear or any cancelling of buffs like sneak. Or anything else i have in my precast. Is anyone else having this issue? cause unless i accidently hit a key and added something in that section im not seeing that is messing it all up i dont see why it would work yesterday but not today.
Code:function precast(spell) -- if midaction() or pet_midaction() then -- add_to_chat(039,'Cancelling '..spell.name..'!') -- cancel_spell() -- return -- end if spell.type == 'Magic' then equip(sets.FC) if spell.skill == 'Geomancy' then equip(sets.FC.Geo) if spell.name:startswith('Indi-') then if spell.target.type == 'SELF' then Now_Indi = spell.name else Now_Entrust = spell.name end end end if spell.skill == 'Elemental Magic' then if spell.name == 'Impact' then equip(sets.FC.Impact) else equip(sets.FC.Elem) end end if spell.name == 'Stun' then equip(sets.FC.Stun) end if spell.name == 'Stoneskin' then equip(sets.FC.Stoneskin) if buffactive.stoneskin then windower.ffxi.cancel_buff(37) end elseif spell.name == 'Sneak' then equip(sets.FC.Enh) if buffactive.sneak and spell.target.type == 'SELF' then windower.ffxi.cancel_buff(71) end elseif spell.skill == 'Enhancing Magic' then equip(sets.FC.Enh) end if spell.name:startswith('Cure') then equip(sets.FC.Cure) refine_cure(spell) return end if spell.name:startswith('Cura') then equip(sets.FC.Cure) end end if spell.name:startswith('Curing Waltz') then refine_waltz(spell) return end if spell.type == "Step" or spell.type == "Flourish1" then equip(sets.TP.Acc) -- Change to real Accuracy Gear if Ever Obtained. -- end if spell.name == 'Spectral Jig' and buffactive.sneak then windower.ffxi.cancel_buff(71) end if spell.name == 'Light Arts' and buffactive['Addendum: White'] then -- Code to Use Addendums with 1 macro for light arts and 1 for dark arts (typing //lightarts also works) -- cancel_spell() add_to_chat(122,'Addendum: White Already Activated. Using Light Arts Cancelled!') return elseif spell.name == 'Light Arts' and buffactive['Light Arts'] then cancel_spell() send_command('Addendum: White') add_to_chat(122,'Addendum: White Activated!') return elseif spell.name == 'Light Arts' and not buffactive['Light Arts'] then add_to_chat(122,'Click Second Time to Trigger Addendum!') send_command('@input /recast "Parsimony"') return end if spell.name == 'Dark Arts' and buffactive['Addendum: Black'] then cancel_spell() add_to_chat(122,'Addendum: Black Activated. Using Dark Arts Cancelled!') return elseif spell.name == 'Dark Arts' and buffactive['Dark Arts'] then cancel_spell() send_command('Addendum: Black') add_to_chat(122,'Addendum: Black Activated!') return elseif spell.name == 'Dark Arts' and not buffactive['Dark Arts'] then add_to_chat(122,'Click Second Time to Trigger Addendum!') send_command('@input /recast "Penury"') return end end
Beginning list of spell changes? I have no idea what you're talking about.
Copying and renaming any set should be perfectly fine for any purpose, as long as the parent table has already been defined (eg: sets.engaged.Acc has to be defined before you can have sets.engaged.Acc.PDT).
It's not strictly necessary (at this time), but it's recommended. Since you already have a sidecar file, just download the newest geo.lua file to replace the one you're using. The only thing you need to do after that is re-copy the modes from the new geo.lua to your sidecar, since they work differently.
im trying to set my gear as a local variable but its not working
this is what im trying to use
local set_gear = sets[player.status]
im also trying to see if any gear is different from whats equiped with this
but it always shows differentCode:if equip_control(player.equipment, set_gear) then equip(set_gear) end function equip_control(tbl1, tbl2) for k,v in pairs(tbl1) do if type(v) ~= "table" then if (tbl2[k] ~= v) then print('different') return true end else for k1,v1 in pairs(tbl2[v]) do if type(v) ~= "table" then if (tbl2[k] ~= v) then print('different1') return true end else for k2,v2 in pairs(tbl2[v][v1]) do if (tbl2[k][k1][k2] ~= v2) then print('different2') return true end end end end end end print('same') return false end
--edit i figured out how to do the first one its like this
Code:local set_gear = {} set_gear = set_combine(set_gear, sets[player.status])
Ok further testing now shows that my issue is only with magic. spectral jig cancels sneak properly but magic sneak/stoneskin isnt cancelling. nor is any of the fast cast gear. Does anyone spot a mistake in this code that would make this whole section not work? It was workin fine the night before last. Also "refine_cure(spell)" isnt processing but I think it is due to nothing in magic precast happening.
Code:function precast(spell) if spell.type == 'Magic' then equip(sets.FC) if spell.skill == 'Geomancy' then equip(sets.FC.Geo) if spell.name:startswith('Indi-') then if spell.target.type == 'SELF' then Now_Indi = spell.name else Now_Entrust = spell.name end end end if spell.skill == 'Elemental Magic' then if spell.name == 'Impact' then equip(sets.FC.Impact) else equip(sets.FC.Elem) end end if spell.name == 'Stun' then equip(sets.FC.Stun) end if spell.name == 'Stoneskin' then equip(sets.FC.Stoneskin) if buffactive.stoneskin then windower.ffxi.cancel_buff(37) end elseif spell.name == 'Sneak' then equip(sets.FC.Enh) if buffactive.sneak and spell.target.type == 'SELF' then windower.ffxi.cancel_buff(71) end elseif spell.skill == 'Enhancing Magic' then equip(sets.FC.Enh) end if spell.name:startswith('Cure') then equip(sets.FC.Cure) refine_cure(spell) return end if spell.name:startswith('Cura') then equip(sets.FC.Cure) end end end
The problem is that nothing between
if spell.type == 'Magic' then
and
end
is working. Everything including precast gear swaps, cancels, and cure refine function isn't workin suddenly. I moved the cure refine part out of the magic section and it started working. I jsut now tried taking it all out of the magic section and i crashed lol. So i need to look at it further for that reasoning. buffactive.sneak works fine with my spectral jig section. All of this stuff was workin fine the night before last with no changes, other than i changed genbu shield to Sors shield in my sets. Unless i accidently put a stray "-" in the code which i dont see (sometimes i think im focused on game and add stuff to my luas when i try to do stuff in game like open windows) Only other thing i can think of is i got a messed up resources (because its only magics having an issue suddenly), which i went to github and redownloaded what i thot was the newest resources but didnt seem to fix it. Also the only thing that got updated between it workin and not working when i opened launcher was resources.
here are all the ones you need
spell.type
JobAbility
PetCommand
CorsairRoll
Samba
Waltz
Jig
Step
Flourish1
Flourish2
Flourish3
Scholar
Effusion
Rune
Ward
CorsairShot
BloodPactWard
BloodPactRage
Monster
WeaponSkill
MonsterSkill
WhiteMagic
BlackMagic
SummonerPact
Ninjutsu
BardSong
Geomancy
BlueMagic
Trust
Item
spell.skill
Hand-to-Hand
Dagger
Sword
Great Sword
Axe
Great Axe
Scythe
Polearm
Katana
Great Katana
Club
Staff
Archery
Marksmanship
Throwing
Divine Magic
Healing Magic
Enhancing Magic
Enfeebling Magic
Elemental Magic
Dark Magic
Summoning Magic
Ninjutsu
Singing
Blue Magic
spell.action_type
Ability
Magic
you can see that magic is not a spell type
so you want spell.action_type
Ok lemme try that. Its wierd tho cause its worked before til yesterday.
UPDATE: It works now thank you dlsmd!
ok i did away with the checking out if the gear equiping is the sam as gear already equiped
but i need help with this example
how can i do this??Code:function a() local test = {} test = set_combine(test, sets.Idle) b(test) equip(test) end function b(test) test = set_combine(test, sets.precast.magic) end
the above does not work
--edit i can do this but it looks wonky --
for i,v in pairs(sets.Resting) do test[i] = v end
instead of
test = set_combine(test, sets.precast.magic)
why cant i get gearswap to play a sound thru chatmon like i could spellcast.
send_command('@chatmon play c:\chatmonwavs\tada.wav)
send_command('@input //chatmon play c:\chatmonwavs\tada.wav)
neither of those work, am i doin it wrong?
wrong slash \ is a special character in lua and all strings need to be serounded by eather '' or ""
send_command('chatmon play c:/chatmonwavs/tada.wav')
--edit--
i forgot you could just do this as well
windower.play_sound('c:/chatmonwavs/tada.wav')