if you really wanted to do the above do it like this
function self_command(command)
if command == 'toggle TP set' then
if sets.aftercast.TP == sets.engaged.TPnormal then
sets.aftercast.TP = sets.engaged.TPacc
sets.aftercast.Ranged = sets.midcast.ranged.TPacc
send_command('@input /echo ACC SET')
elseif sets.aftercast.TP == sets.engaged.TPacc then
sets.aftercast.TP = sets.engaged.TPnormal
sets.aftercast.Ranged = sets.midcast.ranged.TPnormal
send_command('@input /echo NORMAL SET')
end
end
end
but there are better ways to do this
but i would take a rewrite of your code to do it
here
set_type = {'Normal','Acc'}
set_number = 1
sets.aftercast.TP = {}--leve blank
sets.aftercast.TP.normal = {}--put your tp normal set here
sets.aftercast.TP.acc = {}--put your tp acc set here
sets.aftercast.Ranged = {}--leve blank
sets.aftercast.Ranged.Normal = {}--put your Ranged normal set here
sets.aftercast.Ranged.Acc = {}--put your Ranged acc set here
function self_command(command)
if command == 'toggle TP set' then
set_number = (set_number % #set_type)+1
send_command('@input /echo '..set_type[set_number]..' SET')
end
end
to equip the sets use
equip(sets.aftercast.TP[set_type[set_number]])
equip(sets.aftercast.Ranged[set_type[set_number]])
and should you ever need to add more set typs
add the sets and also
edit
set_type = {'Normal','Acc'} exaple: set_type = {'Normal','Acc','Tpgain'}
sets.aftercast.TP.Tpgain = {}--put your tp tpgain set here
sets.aftercast.Ranged.Tpgain = {}--put your ranged tpgain set here