mob
verb
Meditate()
set category ="Jutsus"
if(usr.firing)
return
if(usr.resting)
return
if(usr.canmed)
return
if(usr.meditating)
usr.meditating=0
usr.move=1
usr.icon_state=null
usr.canmed=1
usr << "You Stop Meditating."
spawn(100)
usr.canmed=0
else
usr.meditating=1
usr.move=0
usr << "You Meditate."
usr.icon_state="rest"
while(usr.meditating)
sleep(pick(100,120,110))
if(prob(80))
if(usr.chakra > 5)
usr.random=rand(2,3)
if(usr.random==2)
usr<<"Your Genjutsu increases."
usr.chakra-=rand(5,10)
usr.genexp+=rand(10,15)
if(usr.random==3)
usr<<"Your Chakra increases."
usr.chakra-=rand(5,10)
usr.Mchakra+=rand(10,30)
if(usr.chakra <= 5)
usr<<"You Stop Meditating"
usr.meditating=0
usr.icon_state=null
usr.canmed=1
usr.move=1
spawn(100)
usr.canmed=0
mob
proc
Levelup()
if(src.exp>=src.max_exp)
src.level+=1
src.exp = 0
src.max_exp+=rand(20,50)
src.Mchakra+=rand(1,10)
src.taiexp+=rand(5,20)
src.ninexp+=rand(5,20)
src.genexp+=rand(5,20)
src<<"<font size = 2><b><font color = blue>You leveled up!!"
src.maxhealth+=rand(1,11)
src.taiup()
src.ninup()
src.genup()
src.nin=src.Mnin
src.tai=src.Mtai
src.gen=src.Mgen
taiup()
if(src.taiexp>=src.mtaiexp)
src.mtaiexp += rand(1,5)
src.tailvl+=1
src.taiexp = 0
src.level+=1
src.Mtai+=rand(1,5)
src.tai=src.Mtai
src<<"<font size = 2><b><font color = blue>Your Tai leveled up!!"
ninup()
if(src.ninexp>=src.mninexp)
src.mninexp += rand(1,5)
src.ninexp = 0
src.ninlvl+=1
src.Mnin+=rand(1,5)
src.level+=1
src.nin=src.Mnin
src<<"<font size = 2><b><font color = blue>Your Nin leveled up!!"
genup()
if(src.genexp>=src.mgenexp)
src.mgenexp += rand(1,5)
src.genlvl+=1
src.level+=1
src.genexp = 0
src.Mgen+=rand(1,5)
src.gen=src.Mgen
src<<"<font size = 2><b><font color = blue>Your Gen leveled up!!"
stat("--- --- --- --- --- --- --- --- --- --- --- --- ---")
stat(" Status")
stat("--- --- --- --- --- --- --- --- --- --- --- --- ---")
stat("Level: [level]")
stat("Stamina: [health]/[maxhealth]")
stat("Chakra: [chakra]/[Mchakra]")
var/ttexp=round(src.taiexp*100/src.mtaiexp)
var/nnexp=round(src.ninexp*100/src.mninexp)
var/ggexp=round(src.genexp*100/src.mgenexp)
stat("Taijutsu: [tai] ([ttexp]%)")
stat("Ninjutsu: [nin] ([nnexp]%)")
stat("Genjutsu: [gen] ([ggexp]%)")
stat("Seals: [seals]% Accuracy")
I can't get this to work, I've tried so many things and no matter what, my Genjutsu % goes past 100 while the others get to a 100 and go back to 0 making a level up. Do you have any ideas as to what i'm doing wrong or need to change?