;'Slime Scientist' NPC script

If Lower(GetUserMessage(#USERID))="cancel"
	SetUserFlag(#USERID,38,0)
	SetUserFlag(#USERID,39,0)
	SendMessageToUser(#USERID,"The scientist says,'Alright, I'll find someone else to do it for me.'",#MSG_SAY)
	GoTo END
ElseIf Lower(GetUserMessage(#USERID))="reset"
	SetUserFlag(#USERID,38,0)
	SetUserFlag(#USERID,39,0)
	SendMessageToUser(#USERID,"The scientist says,'Alright, I'll find someone else to do it for me.'",#MSG_SAY)
	GoTo END
EndIf

If HasItem(#USERID,198) = 1
	SendMessageToUser(#USERID,"The scientist says,'Ah, this is such a peaceful part of the woods, wouldn't you say?'",#MSG_SAY)
	GoTo END
EndIf

If GetUserFlag(#USERID,38) = 3
	If GetUserFlag(#USERID,39) > 0
		If GetUserFlag(#USERID,39) < 50
			SendMessageToUser(#USERID,"The scientist says,'You only killed "+GetUserFlag(#USERID,39)+" of the 50 I asked you to. Come back once finished.'",#MSG_SAY)
		Else
			SendMessageToUser(#USERID,"The scientist says,'You killed those slime? Brilliant! Now I can go view that moss specimen. Ah yes, this is for your trouble:'",#MSG_SAY)
			If IsInvFull(#USERID) = 1
				SendMessageToUser(#USERID,"Your inventory is full, get rid of a item and talk to me again.",#MSG_CRITICAL)
			Else
				SetUserFlag(#USERID,38,0)
				SetUserFlag(#USERID,39,0)
				GiveItem(#USERID,198)
				SendMessageToUser(#USERID,"A 'Orb of Guidance' has been added to your inventory.",#MSG_TELL)
			EndIf
		EndIf
	Else
		SendMessageToUser(#USERID,"The scientist says,'Slaughter 50 of those slimes in the Slime Caverns for me, and come and tell me once you are done.'",#MSG_SAY)
	EndIf
	Goto END
EndIf
If GetUserFlag(#USERID,38) <> 0
	SendMessageToUser(#USERID,"The scientist says,'Oh bother. I'm in a spot of a problem. Unfortunately, it seems you are already busy.'",#MSG_SAY)
	Goto END
EndIf

If Lower(GetUserMessage(#USERID))="yes"
	SendMessageToUser(#USERID,"The scientist says,'Brilliant! Slaughter 50 of those slimes wholesale for me, to lessen the population. That should allow me to get through with less trouble.'",#MSG_SAY)
	SetUserFlag(#USERID,38,3)
	SetUserFlag(#USERID,39,0)
ElseIf Lower(GetUserMessage(#USERID))="no"
	SendMessageToUser(#USERID,"The scientist says,'Oh bother. Hopefully someone else will lend a hand.'",#MSG_SAY)
Else
	SendMessageToUser(#USERID,"The scientist says,'I have a problem! There is a new strain of moss growing in the Slime Caverns that I absolutely must examine! There are too many slimes in the way, however. Can you help me?' [yes/no]",#MSG_SAY)
EndIf

Label END

Continue = 1