;Event Portal System

SetUserFlag(#USERID,11,0)

EVENT = GetUserFlag(0,10)

If GetUserFlag(0,11) > 0
	If GetUserAccess(#USERID) > 4
		WarpUser(#USERID,551,10,10)
	Else
		SendMessageToUser(#USERID,"The event has already started.",#MSG_SERVER)
	EndIf
	GoTo END
EndIf

If EVENT = 1
	SendMessageToUser(#USERID,"You have joined the Water Race.", #MSG_EMOTE)
	WarpUser(#USERID,500,10,16)
ElseIf EVENT = 2
	SendMessageToUser(#USERID,"You have joined the Forest Race.", #MSG_EMOTE)
	WarpUser(#USERID,452,3,2)
ElseIf EVENT = 3
	SendMessageToUser(#USERID,"You have joined the Death Dungeon.", #MSG_EMOTE)
	WarpUser(#USERID,550,10,18)
ElseIf EVENT = 4
	SendMessageToUser(#USERID,"You have joined the Four Corners.", #MSG_EMOTE)
	WarpUser(#USERID,552,10,10)
ElseIf EVENT = 5
	SendMessageToUser(#USERID,"You have joined the Scavenger Hunt.", #MSG_EMOTE)
	WarpUser(#USERID,464,10,10)
ElseIf EVENT = 6
	SendMessageToUser(#USERID,"You have joined the Cyber Says.", #MSG_EMOTE)
	WarpUser(#USERID,548,10,10)
ElseIf EVENT = 7
	SendMessageToUser(#USERID,"You have joined the Urban Race.", #MSG_EMOTE)
	WarpUser(#USERID,580,15,18)
ElseIf EVENT = 8
	SendMessageToUser(#USERID,"You have joined the Dance Master.", #MSG_EMOTE)
	WarpUser(#USERID,655,10,8)
ElseIf EVENT = 9
	SendMessageToUser(#USERID,"You have joined the Desert Race", #MSG_EMOTE)
	WarpUser(#USERID,830,18,18)
Else
	If GetUserAccess(#USERID) > 4
		WarpUser(#USERID,551,10,10)
	Else
		SendMessageToUser(#USERID,"There is no open event...please try again later.",#MSG_SERVER)
	EndIf
EndIf

Label END

Continue = 1