;'Jorkaw' NPC script

If Lower(GetUserMessage(#USERID))="cancel"
	SetUserFlag(#USERID,38,0)
	SetUserFlag(#USERID,39,0)
	SendMessageToUser(#USERID,"Jorkaw 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,"Jorkaw says, 'Alright, I'll find someone else to do it for me.'",#MSG_SAY)
	GoTo END
EndIf

If GetUserFlag(#USERID,38) = 4
	If GetUserFlag(#USERID,39) > 0
		If GetUserFlag(#USERID,39) < 150
			SendMessageToUser(#USERID,"Jorkaw says, 'You killed "+GetUserFlag(#USERID,39)+" vipers? Great work, only "+Floor(150-GetUserFlag(#USERID,39))" left to kill. Come back when done.'",#MSG_SAY)
		Else
			SendMessageToUser(#USERID,"Jorkaw says, 'You've killed 150 vipers? Great, it wont remove the problem, but it should reduce their presence until next year, at least.'",#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,26)
				SendMessageToUser(#USERID,"You've gotten a Desert Flak Jacket as a reward!",#MSG_TELL)
			EndIf
		EndIf
	Else
	SendMessageToUser(#USERID,"Jorkaw says, 'Please kill 150 vipers in the Viper Pit in the desert. It's located just slightely south, and east, of here.'",#MSG_SAY)
	EndIf
	Goto END
EndIf
If GetUserFlag(#USERID,38) <> 0
	SendMessageToUser(#USERID,"Jorkaw says, 'Ah, I would ask you for help, but it looks like you're already doing something.'",#MSG_SAY)
	Goto END
EndIf

If Lower(GetUserMessage(#USERID))="yes"
	SendMessageToUser(#USERID,"Jorkaw says, 'Great, Every year, the snakes around here breed at incredible rates, flooding the desert with themselves. I'll pay you to kill 150 of the pests.'",#MSG_SAY)
	SendMessageToUser(#USERID,"Jorkaw says, 'Don't bother yourself over the vipers out and about the desert, only trouble yourself with the mature adults in the Viper Pit right near here.'",#MSG_SAY)
	SetUserFlag(#USERID,38,4)
	SetUserFlag(#USERID,39,0)
ElseIf Lower(GetUserMessage(#USERID))="no"
	SendMessageToUser(#USERID,"Jorkaw says, 'How sad. I had most hoped for your cooperation, but I guess I must go without.'",#MSG_SAY)
Else
	SendMessageToUser(#USERID,"Jorkaw says, 'You know... you might be just the person I was looking for, would you be interested in some work?'",#MSG_SAY)
EndIf

Label END

Continue = 1