CurrRank=20

If GetUserFlag(0,26)=1
	Percent=Floor(100-(GetUserFlag(22,26)/GetUserFlag(21,26))*100)
	SendMessageToUser(#USERID,"Highscores are being updated: "+Percent+"% complete...",#MSG_SERVER)
	Goto End
Endif

If GetUserFlag(0,26)=0
	SetUserFlag(0,26,2)
	Timer(411,2000000,1,0,0)
Endif

SendMessageToUser(#USERID,"Most powerful players out of "+GetUserFlag(21,26)+" total...",#MSG_EMOTE)

Label ListLoop
If CurrRank=0
	Goto End
Endif
If IsOnline(GetUserFlag(CurrRank,26))=1
	Status="*"
Else
	Status=""
Endif

SendMessageToUser(#USERID,"Rank "+CurrRank+": "+GetUserName(GetUserFlag(CurrRank,26))+" ("+GetUserFlag(GetUserFlag(CurrRank,26),28)+") "+Status+"",#MSG_SERVER)
CurrRank=CurrRank-1
Goto ListLoop

Label End

Continue = 1