;'Michael' the mushroom NPC - Starting area quest

If GetUserFlag(#USERID,45) < 2
	SendMessageToUser(#USERID,"Michael says, 'Ah! The beauties of fungal spores as they grow. Sounds weird, doesn't it? But I'm a mycologist by hobby, it's really quite interesting.'",#MSG_SAY)
ElseIf GetUserFlag(#USERID,45) = 2
	MSG=Lower(GetUserMessage(#USERID))
	If MSG="shovel"
		SendMessageToUser(#USERID,"Michael says, 'Yes, I've seemed to misplaced it and... Oh, I must have left it in my [garden]!'",#MSG_SAY)
	ElseIf MSG="garden"
		SendMessageToUser(#USERID,"Michael says, 'Indeed, I'm a biologist and I grow plants. I'm also into mushrooms by hobby, or 'mycology' as it's called. Mind [help]ing me find my shovel?'",#MSG_SAY)
	ElseIf MSG="help"
		SendMessageToUser(#USERID,"Michael says, 'Excellant! Now I'm pretty sure I left it in my [garden]. That's the area enclosed by a fence on the west side of town. Here's the key.'",#MSG_SAY)
		GiveItem(#USERID,497)
		SendMessageToUser(#USERID,"You got the 'Garden Key'.",#MSG_TELL)
		SetUserFlag(#USERID,45,3)
	Else
		SendMessageToUser(#USERID,"Michael says, 'Now where did I put my [shovel]?'",#MSG_SAY)
	EndIf
ElseIf GetUserFlag(#USERID,45) = 3
	If HasItem(#USERID,498) = 1
		TakeItem(#USERID,497)
		TakeItem(#USERID,498)
		SendMessageToUser(#USERID,"You hand over the shovel.",#MSG_EMOTE)
		SendMessageToUser(#USERID,"Michael says, 'Ah, you got it! Brilliant! I'm most indebted to you, "+GetUserName(#USERID)+"!'",#MSG_SAY)
		SetUserFlag(#USERID,45,4)
	ElseIf HasItem(#USERID,497) = 0
		SendMessageToUser(#USERID,"Michael says, 'Lost the key? No matter, here's a spare.'",#MSG_SAY)
		GiveItem(#USERID,497)
		SendMessageToUser(#USERID,"You got the 'Garden Key'.",#MSG_TELL)
	Else
		SendMessageToUser(#USERID,"Michael says, 'My shovel ought to be in the garden west of here...'",#MSG_SAY)
	EndIf
ElseIf GetUserFlag(#USERID,45) = 4
	MSG=Lower(GetUserMessage(#USERID))
	If MSG="shovel"
		SendMessageToUser(#USERID,"Michael says, 'Yes, yes, this is my shovel. Thank you once more for retrieving it.'",#MSG_SAY)
	ElseIf MSG="favor"
		SendMessageToUser(#USERID,"Michael says, 'Well, you must know by now that I'm into [mushrooms]. It just so happens that Jack mentioned something about unusual [mushrooms] to me.'",#MSG_SAY)
	ElseIf MSG="mushrooms"
		SendMessageToUser(#USERID,"Michael says, 'Yes, he said bugs have burrowed into his basement, and that in their tunnels, mushrooms have popped up. Grab me, oh, a number of them, won't you?'",#MSG_SAY)
		SetUserFlag(#USERID,45,5)
		SetUserFlag(#USERID,38,6)
		SetUserFlag(#USERID,39,0)
	Else
		SendMessageToUser(#USERID,"Michael says, 'Ah, the person who found my [shovel]! I wonder whether you'd be willing to do me a [favor]?'",#MSG_SAY)
	EndIf
ElseIf GetUserFlag(#USERID,45) = 5
	If GetUserFlag(#USERID,39) = 7
		SetUserFlag(#USERID,45,6)
		SetUserFlag(#USERID,38,0)
		SetUserFlag(#USERID,39,0)
		GiveItem(#USERID,501)
		TakeItem(#USERID,499)
		SendMessageToUser(#USERID,"Michael says, 'Ah, fine specimens, these. It'll be quite entertaining identifying what strain these are.'",#MSG_SAY)
		SendMessageToUser(#USERID,"Michael says, 'But, I forget myself. You've twice now did me a big favor, and I've done nothing for you! Oh, I know what I    can give you...'",#MSG_SAY)
		SendMessageToUser(#USERID,"You got the 'Key to North Salus'.",#MSG_TELL)
	Else
		SendMessageToUser(#USERID,"Michael says, 'Grab me some of the mushrooms in Jack's bug-tunnel. Jack lives right south of me.'",#MSG_SAY)
	EndIf
Else
	If HasItem(#USERID,501) = 0
		GiveItem(#USERID,501)
		SendMessageToUser(#USERID,"Michael says, 'Need another key?'",#MSG_SAY)
		SendMessageToUser(#USERID,"You got the 'Key to North Salus'.",#MSG_TELL)
	Else
		SendMessageToUser(#USERID,"Michael says, 'These are fine shrooms indeed!'",#MSG_SAY)
	EndIf
EndIf

Continue = 1