;'Fortress 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(1180, 485, 7, 13)
	SpawnItem(1187, 485, 8, 10)
	SpawnItem(1186, 485, 10, 7)
	SpawnItem(1185, 485, 5, 14)
	SpawnItem(1183, 485, 11, 5)
Endif

Continue = 1