;'Shopkeeper' NPC script - Starting town

Bone = 492
Venom = 493


If GetUserFlag(#USERID,45) = 6
	If Lower(GetUserMessage(#USERID))="help"
		SendMessageToUser(#USERID,"Shopkeeper says, 'Yes, I make potions and things to sell, and need some resources. Bring me some Acrie venom and a bone or two from the tunnels beneath the town.'",#MSG_SAY)
		SetUserFlag(#USERID,45,7)
	Else
		SendMessageToUser(#USERID,"Shopkeeper says, 'Hey you're not supposed to be back.. ah forget it. This may prove helpful, if you're willing to [help] me.'",#MSG_SAY)
	EndIf
ElseIf GetUserFlag(#USERID,45) > 6
	If HasItem(#USERID, Bone) = 1
		If HasItem(#USERID, Venom) = 1
			SendMessageToUser(#USERID,"Shopkeeper says, 'Excellant, excellant! Here, take this as a reward. It'll get you out of here.'",#MSG_SAY)
			SendMessageToUser(#USERID,"You got a 'Link to Graveyard'! Finally you can leave this place.",#MSG_TELL)
			GiveItem(#USERID, 494)
			TakeItem(#USERID, Bone)
			TakeItem(#USERID, Venom)
		Else
			SendMessageToUser(#USERID,"Shopkeeper says, 'You found the bones? Grab me some Acrie venom, and then return.'",#MSG_SAY)
		EndIf
	ElseIf HasItem(#USERID, Venom) = 1
		SendMessageToUser(#USERID,"Shopkeeper says, 'You got the Venom? Excellant. Now go find me that bone.'",#MSG_SAY)
	Else
		SendMessageToUser(#USERID,"Shopkeeper says, 'Bring me some Acrie venom and a bone from the tunnels beneath the town.'",#MSG_SAY)
	EndIf
Else
	SendMessageToUser(#USERID,"The shopkeeper looks confused",#MSG_EMOTE)
	SendMessageToUser(#USERID,"Shopkeeper says, 'Uh, you're not supposed to be here... something must've messed up. Call a moderater, maybe...'",#MSG_SAY)
EndIf

Continue = 1