ID:168809
 
iff i have dfferent races what code do i put in to make each one have there own training state

turf
pb1
icon = 'train.dmi'
icon_state = "pb1"
density = 1
verb
Train()
if(usr.rest >= 1)
if(usr.Fly >= 1)
if(usr.train >= 1)
usr.underlays += 'train.dmi'
usr.train = 1
sleep(10)
usr.maxPl += 250
sleep(10)
usr.maxPl += 250
sleep(10)
usr.maxPl += 250
sleep(10)
usr.maxPl += 250
usr.train = 0
else
usr << "you are already training"
else
usr << "you are flying"
else
usr << "you are resting"
um...ok... make each of the vars into the the names of the train/fly/rest states of each race. Idk wer u want it so you implement it urself...

mob/var
train_state
fly_state
rest_state

turf
pb1
icon = 'train.dmi'
icon_state = "pb1"
density = 1
verb
Train()
if(usr.rest >= 1)
if(usr.Fly >= 1)
if(usr.train >= 1)
usr.underlays += 'train.dmi'
usr.train = 1
sleep(10)
usr.maxPl += 250
sleep(10)
usr.maxPl += 250
sleep(10)
usr.maxPl += 250
sleep(10)
usr.maxPl += 250
usr.train = 0
else
usr << "you are already training"
else
usr << "you are flying"
else
usr << "you are resting"

In response to Lou
i dont understand completly can sum1 explain or another pice of code
In response to Edge657123
obj
pb1
icon = 'train.dmi'
icon_state = "pb1"
density = 1
verb
Train()
for(mob in get_step(src,src.dir)
if(usr.rest) // If the user is resting
if(usr.Fly) // If the user is flying
if(usr.train) // If the user is training
if(usr.race=="Saiyan") // If their race is Saiyan
flick("training",usr)
/* Play the animation of their training state. This state defaults
to the defined icon file, (basically, the training state has to
be in the same dmi file as their normal state */

usr.train = 1 // Makes their training 1 so they cant retrain while they're already training.
sleep(10)
usr.maxPl += 250 // Sleep for a second, increase max powerlevel by 250, continue
sleep(10)
usr.maxPl += 250
sleep(10)
usr.maxPl += 250
sleep(10)
usr.maxPl += 250 // Stop
usr.train = 0 // Their training is now 0 so they can train again.
else
usr << "You are already training."
else
usr << "You are flying."
else
usr << "You are resting."

Please use <.dm><./dm> tags(minus the periods) next time.
-Sin()