i figured out what this does
t1 = (t1 % #t2) + 1
it checks to see if t1 is less then t2 if it is it will add +1 to t1 else it will set t1 to 0 and add +1 to it
i.e.(example)
Code:
skilluptype = {"Geomancy","Healing","Enhancing","Ninjutsu","Singing","Blue","Summoning"}
skillupcount = 1
skillupcount = (skillupcount % #skilluptype) + 1
will cycle just like this will but will do the count of how many things are in skilluptype by its self so that if you add remove whats in it, it will automaticaly change how high that skillupcount should go before resetting back to the lowest one
Code:
skilluptype = {"Geomancy","Healing","Enhancing","Ninjutsu","Singing","Blue","Summoning"}
skillupcount = 1
if skillupcount < 6 then
skillupcount = skillupcount +1
else
skillupcount = 1
end
"the more you know"
now if i can figure out how to do the same with this
Code:
if Usestaff == 'Atk' then
Usestaff = 'Acc'
add_to_chat(7, '----- Staves Set To ACC -----')
elseif Usestaff == 'Acc' then
Usestaff = 'Atk'
add_to_chat(7, '----- Staves Set To ATK -----')
end
--edit--
ok i figured out how to do this with
Usestaff = (Usestaff=='Atk' and 'Acc' or 'Atk')