mob/proc
CD2()
spawn while(CD2)
if(!CD2T)
CD2=0
return
else
CD2T-=1
sleep(10)
CD3()
spawn while(CD3)
if(!CD3T)
CD3=0
return
else
CD3T-=1
sleep(10)
MOVE1
if(src.Player=="Mu")
if(!DUSTABLE||Chakra<80||CAMO)return
walk(src,0)
CD2=1
CD3=1
INJ=1
utilize(80)
injutsu=1
move_speed=0
Jutsu1=1
running=0
CD2T=40;CD3T=30
src.CD2();src.CD3()
MOVE 2
if(src.Player=="Mu")
if(Chakra<35||CAMO)return
walk(src,0)
CD3=1
INJ=1
utilize(35)
injutsu=1
move_speed=0
Jutsu1=1
running=0
CD3T=30
src.CD3()
Problem description:These are to differnt moves i labeled them now,
the problem is if someone starts with using move 2 the counter starts counting down on the cool down but
if they use move 1 it restarts the counter - which is correct BUT MOVE 2's counter counts down twice as fast
do to the fact i have it set to cancel when CDX=0
i have tried to make CDXT 0 call then restart it but it still ran into the problem. so now i'm coming to y'all
My advice to you is to write clearer code and you will avoid situations like these. A variable AND proc sharing names like CD3 and CD3T is bound to cause some confusion. Don't be afraid to sacrifice some time writing a little more because it saves you time later.