;'Scavenger hunt' event script

If GetUserFlag(0,11)<>0
	Points = GetUserFlag(#USERID,11)
	If Points > 0
		SendMessageToUser(#USERID,"You have "+Points+" points. You got "+Points*1000+" silver!", #MSG_EMOTE)
		SetUserSilver(#USERID,GetUserSilver(#USERID)+Points*1000)
	Else
		SendMessageToUser(#USERID,"Sorry, you didn't find anything.", #MSG_EMOTE)
	EndIf
	WarpUser(#USERID,509,10,11)
Else
	SetUserFlag(0,11,1)
	SendMessageToMap(#PARAM1,"Grab as many objects as you can! Hunt!", #MSG_EMOTE)
	SpawnItem(455,248,3,3)
	SpawnItem(457,248,11,15)
	SpawnItem(459,248,16,16)
	SpawnItem(462,248,5,12)
	SpawnItem(463,248,10,10)
Endif

Continue = 1