mob/proc/SpaceTime()
if(src.intank|src.Kaiten|src.sphere|src.inso|src.firing|src.Rasenganon)
return
else
src << "You will take ten seconds to go into, or out of, your Dimension; if you are put below your current health, it will be cancelled, or if you are below 10% health."
src.oldhealth=src.health
src.overlays+='Icons/Jutsus/spacetime.dmi'
sleep(150)
if(src.spacetime==0)
src.prevx=src.x
src.prevy=src.y
src.prevz=src.z
if(src.oldhealth<=src.health)
if(src.health<=src.health/10)
if(!src.spacetime)
src.loc = locate(179,92,1)
src.overlays-='Icons/Jutsus/spacetime.dmi'
src.spacetime=1
else
src.x=src.prevx
src.y=src.prevy
src.z=src.prevz
src.overlays-='Icons/Jutsus/spacetime.dmi'
src.spacetime=0
else
src.overlays-='Icons/Jutsus/spacetime.dmi'
src << "You have failed going into, or out of, your dimension for whatever reason."
return
Problem description:
Firstly, I'd like to be able to do something similar, but create a different proc that allows you to: pick someone nearby, send them into the "dimension" (179,92,1), save their current co-ords, then be able to send them back.
Secondly, I'm wondering if that bit of code looks off, or if it would work (specifically the 14th line)
Your if(spacetime == 0) should be if(!spacetime). Too specific.
All of your src. are unnecessary... but that's your choice.
About line 14: (X <= X/10) is only true if X == 0, so it's probably not what you want.
It'd be easier to store the loc instead of the coordinates:
Now, to send someone else instead of yourself, it's a bit tricky. Which person should remember where to return the target: the sender or the target? If the sender disappears (dies or logs out or whatever) after sending the target to the other dimension, does the target stay behind (maybe stranded)?