mob/proc/repair()
while((src.cloth>=1) && (src.maxcloth>src.cloth))
src.cloth+=10
sleep(20)
mob/Login()
if(usr.save==0)
var/tmp/A=input("Who is your character?") in list ("Seiya", "Shiryu", "Hyoga", "Shun", "Ikki")
if(A=="Seiya")
src.level=1 //level of the character
src.cloth=1000 //hit points of the character(cloth)
src.maxcloth=1000
src.cosmo=100 //the power of the character(attack)
src.arm=150 //cloth resistance of the user(defense)
src.speed=20 //speed of the character
src.maxspeed=20 //maximum speed of the character
src.stamina=100 //the total energy of the character
src.exp=10 //experience of the character
src.maxexp=20 //maximum experience of the character
src.stats=0 //points you can spend on these stats
src.luck=10 //luck(chance of dodging or a critical hit)
src.icon='seiya.dmi'
src.loc= locate(1,1,1)
src.repair(usr)
if(A=="Shiryu")
usr.arm=1000
usr.level=1
usr.exp=10
usr.maxexp=20
usr.maxspeed=10
usr.speed=10
usr.cosmo=100
usr.stats=0
usr.cloth=1000
usr.stamina=100
if(A=="Shun")
usr.arm=1000
usr.level=1
usr.exp=10
usr.maxexp=20
usr.speed=10
usr.cosmo=100
usr.stats=0
usr.cloth=1000
usr.stamina=100
else if(usr.save==1)
return ..()
I added src.repair(usr) under Seiya because it doesn't work under mob/New(). I am trying to have the cloth repair itself when the cloth variable below the maximum cloth variable of 1000. But it doesn't work! If I change around the while proc it will continue over 1000. So I think I either wrote the while wrong or the while proc just stops working indefinitely. Please help me fix this.
while(src.cloth>=1 && src.maxcloth>src.cloth)