;'A dying miner' - NPC script

If GetUserFlag(#USERID,45) <> 1
	If GetUserFlag(#USERID,45) = 2
		SendMessageToUser(#USERID,"He's dead.",#MSG_SAY)
	Else
		SendMessageToUser(#USERID,"The dying miner says, 'Don't go into the.. the next room... the lampool is in there...'",#MSG_SAY)
		SetUserFlag(#USERID,45,1)
	EndIf
Else
	Rand = Random(0,3)
	If Rand = 0
		SendMessageToUser(#USERID,"You poke the corpse with a stick",#MSG_EMOTE)
	ElseIf Rand = 1
		SendMessageToUser(#USERID,"As he died, his final act was to warn you of the danger in the next room. You should ignore his warning and go in there anyway - He's not the boss of you.",#MSG_SAY)
	ElseIf Rand = 2
		SendMessageToUser(#USERID,"You search his pockets and find 3 silver coins. Score!",#MSG_TELL)
		SetUserSilver(#USERID,GetUserSilver(#USERID)+3)
	Else
		SendMessageToUser(#USERID,"He's dead.",#MSG_SAY)
	EndIf
	SetUserFlag(#USERID,45,2)
EndIf

Continue = 1