ID:1422086
 
(See the best response by Nadrew.)
mob/player/nen/verb/Envelope()
set category="Aura"
if(usr.ko)
usr << "You are knocked out!"
return
if(usr.inten)
usr << "You are already using Envelope"
else if(!usr.knowten && prob(usr.percten+(usr.talent*5)))
usr.nen_power=usr.max_nen_power*20/100
usr.inten=1
usr.inzetsu=0
usr.invisibility=0
ingyo=0
usr.nen_body()
usr.percten++
usr << "You are using Envelope"
if(!usr.knowten)
spawn(100)
usr.nen_power=((usr.max_nen_power*10)/(100))
usr.inten=0
usr << "You are no longer in Envelope. Practice more."
while(usr.inten)
spawn(10)
src.lvlnen+=src.talent
if(src.lvlnen>=100)
src.lvlnen=0
src.max_nen_power+=(src.max_nen_power/10)
if(usr.percten+usr.talent>=100)
usr.knowten=1
usr.verbs+=/mob/player/nen/verb/Close
else if(usr.knowten)
usr.nen_power=usr.max_nen_power*20/100
usr.inten=1
usr.inzetsu=0
usr.invisibility=0
ingyo=0
usr.nen_body()
usr.percten++
if(usr.percten+usr.talent>=100)
usr.knowten=1
usr.verbs+=/mob/player/nen/verb/Close
else
usr << "You failed to produce Envelope. Practice more."


Problem description: What should I do?
You'll need to be more specific about your problem, what's happening, how's it happening, etc etc... Just posting some code and a vague problem description isn't gonna get you much help.

What does the skill do? Are you using any special movement code?
I use this verb on and on to learn this move. Then the verb stops working and when I try to move I can't move. This skill increases aura which is called nen power in the var to 20% of max nen power.
The verb just stops working entirely? Are other commands still working? Are you getting any output or anything like that when using the verb when it doesn't work? Details are important.
One thing I see right away is that your while() loop doesn't seem to have any exit case, it never finishes executing and since you're spawning the code off and not the loop the verb is never going to finish.
Okay let me look at that while look. Should I replace spawn with sleep?

It seems no verb works anymore. If lick say the input pops up I input and click ok and it doesn't output. Nothing works.
Best response
Seems like you're probably causing an infinite loop or something and making the game stall out. The verb itself is pretty terribly written overall and could be done much better, I suggest stepping back and really looking it over. I'll give you a hand with it in a while though, if you're still in need of help. My internet access early in the day is iffy at best.
Looks like replacing spawn with sleep did the trick.
The reason the spawn was causing you troubles is spawn allows the while loop to keep running after the spawn. So when you hit the verb the first time it starts, then each time you hit it after that you stack that spawn statement on top of each other while the while loop just keeps going. It could be viewed as if you wrote the while like


While ()


And that's it.

Where as when you use sleep () it causes the while loop to actually stop and wait bedore continuing.
In response to Akando5959
Yeah I kind of got that idea. Spawn is tricky here.
https://www.thc.org/root/phun/unmaintain.html

I suggest adding comments to explain lines, and having less confusing variable names.
if(usr.inten)
usr << "You are already using Envelope"
return // Add this