;'Lottery System' - Timed script

Day = GetDayofWeek()

SendMessageToAll("[DoZ Lottery Fund:]",#MSG_TELL)

;Lottery day (Thursday)
If Day = 4
	SendMessageToAll("The lottery number will be broadcasted in two hours",#MSG_TELL)
	SendMessageToAll("Current jackpot: "+GetUserFlag(0,36),#MSG_TELL)
	
	;Two hour's time until the lottery
	Timer(557,7200000,0,0,0)
EndIf

ITEM = Random(0,5)
If ITEM = 0
	ITEM_DESCRIPTION="3 Regulus' Scrolls - Becuase we all love Mr. Regulus"
ElseIf ITEM = 1
	ITEM_DESCRIPTION="a beautiful katana - For those Japanese fanatics"
ElseIf ITEM = 2
	ITEM_DESCRIPTION="a skill of Transportation - You are now free to move about the game"
ElseIf ITEM = 3
	ITEM_DESCRIPTION="a VIP pass - Don't let it get to your head"
ElseIf ITEM = 4
	ITEM_DESCRIPTION="a leather jacket - Not that cheap pleather crap"
ElseIf ITEM = 5
	ITEM_DESCRIPTION="a set of Venator armor - The hunter has become the hunter"
EndIf


SendMessageToAll("The daily raffle will take place in one hour",#MSG_TELL)
SendMessageToAll("Today's item is "+ITEM_DESCRIPTION,#MSG_TELL)

;An hour's time until the raffle.
;User Timer5, becuase script 556 needs it
Timer5(556,3600000,ITEM,ITEM_DESCRIPTION,0,0,0)

SendMessageToAll("Buy lottery and raffle tickets at our Oisvo offices - DoZ Lottery Fund",#MSG_TELL)

Continue = 1