area/InfectionZone
icon='InfectionZone.dmi'
name="Airborne Plague"
layer=6
Click()
Text(usr,"An airborne strain of the plague. I better stay clear if I want to stay alive.")
Entered()
if(usr)
InfectionStart()
return
proc/InfectionStart()
if(usr.PlagueProtection<=3)
usr<<"<font color=green><i>The plague infection builds up in your veins."
usr.Infection=TRUE
usr.infectionlevel+=10
usr.PvPFlag = TRUE
spawn(600)
InfectionStart()
if(usr.infectionlevel>=50)
usr.overlays+='InfectionOverlay.dmi'
if(usr.infectionlevel>=100)
sleep(100)
view(6)<<"<font color=green><b>The plague has claimed [usr]."
usr.loc=locate(usr.SpawnPoint)
usr.dir = SOUTH
usr.infectionlevel=0
usr.Infection=FALSE
usr.overlays-='InfectionOverlay.dmi'
usr.PvPFlag = FALSE
InfectionStart(null)
Problem description: Sometimes it works, sometimes it doesn't up until a few days ago. And upon death the player is still infected. I feel like I'm missing something or that the proc isn't properly being canceled.
Sometimes it properly loops, and again sometimes it just won't and kill the player quicker than it should. I have no ideas what's wrong.