ID:169286
 
obj
Spar_Partner // Gotta love em.
icon='turf.dmi'
icon_state="spar"
density = 1
name = "Sparring Partner" // I wanted to call him George.
verb
Train()
set category = "Temp" // Temporary verbs panel
set src in oview (1) // Anything within 1 tile of George.
var/mob/players/M = usr
for(M in get_step(src,src.dir)) // Gotta make sure that the person is facing him.
if(M.level<=5) // For right now, for testing sake, anyone below or at level 5 can use the bag.
M << "You begin to spar." // Tell em they begin to spar. No icon yet.
M.nomotion = 1 // Don't move! Of course, to spar, you have to move, so..
sleep(50)
M << "Finished." // U R DUN olololol
M.exp += 1 // Give 'em a little bit. I'll add in a calculation later.
M.nomotion = 0 // You can move now.
M.CheckLevel() // Check to see if they need to be leveled.

I'd like to know how to have it so that if someone activates the Train verb, they can't reactivate it until the procedure is through. Also, I'd like the player and the sparring parter to move around the area and return to their original positions during the time the player is paralyzed. What I was thinking for this was using usr.loc = locate and just lay down specially-named turfs for the things to move to, but I wouldn't know how to have the obj do that. I could, however, change the Sparring Parter into a mob. If I did that, could I use the same procedure for movement, using src.loc = locate?

Make a boolean variable (which is a variable that can either be true or false) and set it to 1 when the verb is used. Then at the end set it to 0. Then put a check which only lets you use the verb if that variable is 0.

As for movement, you need to be very specific in how you want them moved. Look up all the step() procs though.
In response to DeathAwaitsU
That presents a problem. I defined training(= 0) under mob/players Login() and the variable list. I get a runtime error stating that "Cannot read null.training", when using this code:

obj
Spar_Partner
icon='turf.dmi'
icon_state="spar"
density = 1
name = "Sparring Partner"
verb
Train()
set category = "Temp"
set src in oview (1)
var/mob/players/M
if(M.training==0)
for(M in get_step(src,src.dir))
if(M.level<=4)
M << "You begin to spar."
M.training = 1
M.nomotion = 1
sleep(50)
M << "Finished."
M.exp += 1
M.nomotion = 0
M.CheckLevel()
M.training = 0
else
M << "You are too high leveled to train with this!"
else
M << "You're already training!"
In response to Sinoflife
Oh bad...
if(!M.training)


-Cerebral
In response to Cerebral Assassin
Sorry, I'm a bit dyslexic. All I needed to do was swap the for string with the if string for training.
In response to Sinoflife
Yeah, that too, but with Boolean vars use:
if(M.Boolean) //True

if(!M.Boolean) //False