;Tutorial priest

If GetUserFlag(#USERID,45) = 3
	If HasItem(#USERID,506) = 1
		While HasItem(#USERID,506) = 1
			TakeItem(#USERID,506)
		Wend
		SetUserFlag(#USERID,45,4)
		SendMessageToUser(#USERID,"The Priest says, 'Ah! You found it, thank you! You're trying to get out of this graveyard? Do me a favor, and I'll let you have the key to the gate.'",#MSG_SAY)
	Else
		SendMessageToUser(#USERID,"The Priest says, 'I left my book somewhere around here, please go find it for me.'",#MSG_SAY)
		RemoveItem(753,506)
		SpawnItem(753,506,12,12)
	EndIf
ElseIf GetUserFlag(#USERID,45) = 4
	SetUserFlag(#USERID,45,5)
	SendMessageToUser(#USERID,"The Priest says, 'Kill the skeleton right down these stairs, and return to me. Then I'll give you the key to the gate.'",#MSG_SAY)
ElseIf GetUserFlag(#USERID,45) = 7
	SetUserFlag(#USERID,45,7)
	SendMessageToUser(#USERID,"The Priest says, 'You killed the skeleton. Very good. Here's the key to open the gate out of this graveyard.'",#MSG_SAY)
	GiveItem(#USERID,507)
	SendMessageToUser(#USERID,"You got the 'Gate Key'!",#MSG_TELL)
Else
	If HasItem(#USERID,507) = 1
		SendMessageToUser(#USERID,"The Priest says, 'Go through the gate north and east of here.'",#MSG_SAY)
	Else
		SendMessageToUser(#USERID,"The Priest says, 'Get along now, no point waiting. The skeleton is just down these stairs.'",#MSG_SAY)
	EndIf
EndIf

Continue = 1