Code:
'bestraceplayer
'1.0
'****** By droid3 ********
dim Users(40)
dim txtgate
dim Txtminwins
txtgate = "Northrend"
'txtgate = "Azeroth"
'txtgate = "Lordaeron"
Txtminwins = 150 '*////// Wins minimas en la raza
'-----------------------------------------------------------------
'Do Not Edit Below This Line
'-----------------------------------------------------------------

Sub bestraceplayer_event_UserTalk(Username, Flags, Message, Ping)
Call ssc.GetDBEntry(username, Access, Flags)
if Access < 70 then exit sub
If left(lcase(message),16) = botvars.trigger & "bestraceplayer " Then
 
txtrace = lcase(mid(message,17))
if txtrace <> "random" and txtrace <> "orc" and txtrace <> "ud" and txtrace <> "ne" and txtrace <> "human" then
 addq "/emote " & username & " , Type: !BesTRacePlayeR <RanDoM> <OrC> <UD> <Ne> <HuMaN>" 
exit sub
end if
addq "/emote **** Searching The Best [ " & ucase(txtrace) & " ] Player of " & GetInternalUserCount() & " [ " & myChannel & " ] **** "
If scinet.stillexecuting Then
addq "/emote ******** I'm BuSy ********"
Exit Sub
End If
Txttotal = GetInternalUserCount()
For i = 1 to 40
 Users(i) = ""
next
For i = 1 to GetInternalUserCount()
 Users(i) = GetNameByPosition(i)
next
Txttotal = GetInternalUserCount()
For i = 1 to 40
if users(i) <> "" then
name = users(i)
content = scinet.openurl("Warcraft III Ladder="& txtgate & "&PlayerName="&name)
addchat vbred, i
if i = 4 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... " & users(i) & " ..."
if i = 8 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... " & users(i) & " ..."
if i = 13 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... " & users(i) & " ..."
if i = 19 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... " & users(i) & " ..."
if i = 25 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... " & users(i) & " ..."
if i = 29 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... " & users(i) & " ..."
if i = 34 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... " & users(i) & " ..."
if i = 38 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... " & users(i) & " ..."
'Stats
if txtrace = "random" then
If Instr(Content, "Random:</td>") Then
a = Split(Content, "Random:</td>")(1)
RStat =        Split(Split(a, "Row"">")(1), "<")(0)
Rwins = Split(Split(a, "Row"">")(1), "<")(0)
RStat = RStat & "-" & Split(Split(a, "Row"">")(2), "<")(0)
RStat = RStat & "-" & Split(Split(a, "Row"">")(3), "<")(0)
Rporcent = Split(Split(a, "Row"">")(3), "<")(0)
End If
end if
if txtrace = "human" then
If Instr(Content, "Human:</td>") Then
a = Split(Content, "Human:</td>")(1)
HStat =               Split(Split(a, "Row"">")(1), "<")(0)
Rwins = Split(Split(a, "Row"">")(1), "<")(0)
HStat = HStat & "-" & Split(Split(a, "Row"">")(2), "<")(0)
HStat = HStat & "-" & Split(Split(a, "Row"">")(3), "<")(0)
Rporcent = Split(Split(a, "Row"">")(3), "<")(0)
End If
end if
if txtrace = "orc" then
If Instr(Content, "Orc:") Then
a = Split(Content, "Orc:")(1)
OStat =               Split(Split(a, "Row"">")(1), "<")(0)
Rwins = Split(Split(a, "Row"">")(1), "<")(0)
OStat = OStat & "-" & Split(Split(a, "Row"">")(2), "<")(0)
OStat = OStat & "-" & Split(Split(a, "Row"">")(3), "<")(0)
Rporcent = Split(Split(a, "Row"">")(3), "<")(0)
End If
end if
if txtrace = "ud" then
If Instr(Content, "Undead:</td>") Then
a = Split(Content, "Undead:</td>")(1)
UStat =               Split(Split(a, "Row"">")(1), "<")(0)
Rwins = Split(Split(a, "Row"">")(1), "<")(0)
UStat = UStat & "-" & Split(Split(a, "Row"">")(2), "<")(0)
UStat = UStat & "-" & Split(Split(a, "Row"">")(3), "<")(0)
Rporcent = Split(Split(a, "Row"">")(3), "<")(0)
End If
end if
if txtrace = "ne" then
If Instr(Content, "Night Elf:</td>") Then
a = Split(Content, "Night Elf:</td>")(1)
NStat =               Split(Split(a, "Row"">")(1), "<")(0)
Rwins = Split(Split(a, "Row"">")(1), "<")(0)
NStat = NStat & "-" & Split(Split(a, "Row"">")(2), "<")(0)
NStat = NStat & "-" & Split(Split(a, "Row"">")(3), "<")(0)
Rporcent = Split(Split(a, "Row"">")(3), "<")(0)
End If
end if
If Instr(Content, "Total:</td>") Then
a = Split(Content, "Total:</td>")(1)
TStat =               Split(Split(a, "Row"">")(1), "<")(0)
TStat = TStat & "-" & Split(Split(a, "Row"">")(2), "<")(0)
TStat = TStat & "-" & Split(Split(a, "Row"">")(3), "<")(0)
TxtTotalP = Split(Split(a, "Row"">")(3), "<")(0)
End If   

rporcent = replace (rporcent,"%","")
TxtTotalP = replace (TxtTotalP,"%","")
'if rwins > Txtminwins then
if rwins > 100 then
 if rporcent > BestPorcent then
  if int(left(TxtTotalP,2)) > 52 then
   Bestporcent = rporcent
   TxtBest = "The Best [ " & ucase(txtrace) & " ] in channel is " & name & " [ " & rwins & " Wins with " & rporcent & " % ] TotalAcc%: " &  TxtTotalP
   addchat vbred, txtbest
  else
                 TxtBestAbus = "The 'Best Abuse' [ " & ucase(txtrace) & " ] in channel is " & name & " [ " & rwins & " Wins with " & rporcent & " % ] TotalAcc%: " &  TxtTotalP
   addchat vbred, TxtBestAbus 
  end if
 end if
end if
end if
next
if txtbest <> "" then 
 addq "/emote " & txtbest
else
 addq "/emote ** I Can'T Find a GooD " & txtrace & " PLayer in this channel **" 
end if
if TxtBestAbus <> "" then addq "/emote " & TxtBestAbus
end if
end sub
function TxtPorcent(i,txttotal)
 TxtPorcent = i * 100/Txttotal
 TxtPorcent = left(TxtPorcent,5)
end function