mob/fidchelltrans
verb
Transform()
set category = "Transform"
set name = "Fidchell Form"
usr.Fidchell_Trans()
Revert()
set category = "Transform"
set name = "Fidchell Revert"
usr.Fidchell_revert()
mob
proc
Fidchell_Trans()
if(!src.fidchell)
if(src.MP >= 50)
src.fidchell=1
src.underlays+= icon('Fidchell.dmi',"Fidchell")
src.tempstr = src.Strmax
src.tempdef = src.Def
src.tempmdef = src.MDef
src.formstatus="Innis Form"
view(src) << "<I><font color = yellow>[src]: Fidchell!</I></font color = yellow>"
src.Strmax += 20
src.Strmin = src.Strmax - 2
src.Def += 10
src.MDef+=5
src.inavatar=1
if(src.MP >= 0)
while(src.inavatar)
if(src.MP > 0)
src.MP -= 2
sleep(10)
if(src.MP < 0)
src.MP = 0
src.Fidchell_revert()
Problem description:
well this code never had been a problem until now. Now everytime i run the verb, the server freezes, i dont kno why, i think its a loop problem or something
The only thing I can think of is that since you only sleep for a second if the mob has MP, if they didn't have MP and used it, but didn't eventually break it, it would just keep running without delay and lock things up.
If it's not that, then the problem may exist elsewhere. Cause everything else looks alright on a quick skimming over.
By the way, are you making a game based off .hack? That is awesome in so many ways. I'm a major .hack fan.