SMN_lua
SMN_gear_lua
I get 2 errors.
First is Gearswap: Lua error (runtime) gives a few directories ending in windower4/addons/gearswap/flow.lua:254:
Second error is Use function error: directories ending in gearswap/data/smn_gear.lua:234: attempt to index field 'astral conduit' and the rest after that was cut off.
Ah, you're defining subtables of sets.buff['astral conduit'] without defining sets.buff['astral conduit'] itself first (I might have left that out of the example code). Just add:
sets.buff['astral conduit'] = {}
before the other set definitions.
Yeah, that fixed the issue. My only other question is where exactly do I put this code?
I put it with the function job_update stuff. I'm still familiarizing myself with how gearswap works so I am unsure if that is where it needs to go.Code:if buffactive['astral conduit'] then if spell.type == 'BloodPactRage' then if magicalRagePacts:contains(spell.english) then equip(sets.buff['Astral Conduit'].MagicalBloodPactRage) else equip(sets.buff['Astral Conduit'].PhysicalBloodPactRage) end eventArgs.handled = true elseif spell.type == 'BloodPactWard' then equip(sets.buff['Astral Conduit'].BloodPactWard) eventArgs.handled = true end end
That would need to go in the event period where it's relevant: precast, or possibly midcast. The update function would be completely useless for it.
figured as much. thanks again.
can i add a wait to add_to_chat somehow?
Only if you use send_command('wait 1;gs c <whatever>') and then pick it up in your self command function and do add_to_chat. Alternatively, you can do something like send_command('wait 1;input /echo ----- MESSAGE ----').
just wondering cause i'm trying to make it so after a ws it shows tp return.. but gs is too fast it only works 50% of the time... it reads tp before ws a lot
edit: best way to add wait to this..?
add_to_chat(158,'TP Return: [' .. player.tp .. '%]')
Is there a tp change event? You can check the values in there for when they're >100 and then it falls below <100 trigger your addtochat. iirc tp change should have old and new value exposed.
oh yeah i do it under after cast and if ws
I have a minor annoyance with COR.lua, this is my gear file: http://pastebin.com/86a41xt6
every ranged attack generates an error "cannot compare to nil" at line 318, commenting out the block 318-326 (low ammo warning) takes the error away, is anything worng in my include?
could anyone please help me with the following lua, the triggers/toggles dont seem to be working.
thanks in advance
http://pastebin.com/GvNS3UKn
is this bad to do?.. because it seems to work.. lol
if spell.type == "WeaponSkill" then
status_change(player.status)
add_to_chat(158,''..(player.name)..' uses '..spell.name..' TP Return: ['..tostring(player.tp)..'%]')
Aside from not closing the conditional, there's nothing technically wrong with it. However it doesn't make any logical sense to call status_change there. If status_change contains code that you want to run at that point, that means you actually want a separate function that handles that code, and call it from both this section and status_change.