Best Player iN ChaNNeL

This is a discussion on Best Player iN ChaNNeL within the Warcraft 3 Hacks, bots and tools board part of the Warcraft 3 forum category; Code: 'bestinchannel '1.0 'Improved by t[x][email protected] 'Scripted/Writen By: 'Battle.NET West Account: ToughLuv 'aKa TutMatt on stealthbot Forums 'Improved by t[x][email protected] ...

Results 1 to 5 of 5
  1. #1
    lolercakess's Avatar
    lolercakess is offline Member
    Array
    Join Date
    Jul 2007
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    11
    Reputation
    41

    Best Player iN ChaNNeL

    Code:
    'bestinchannel
    '1.0
    'Improved by t[x][email protected]
    'Scripted/Writen By:
    'Battle.NET West Account: ToughLuv
    'aKa TutMatt on stealthbot Forums
    'Improved by t[x][email protected]
    
    dim Users(40)
    dim txtgate
    txtgate = "Northrend"
    'txtgate = "Azeroth"
    'txtgate = "Lordaeron"
    '-----------------------------------------------------------------
    'Do Not Edit Below This Line
    '-----------------------------------------------------------------
     
    Sub bestinchannel_event_UserTalk(Username, Flags, Message, Ping)
    If left(lcase(message),14) = botvars.trigger & "bestinchannel" Then
    Call ssc.GetDBEntry(username, Access, Flags)
    if Access < 70 then exit sub
    addq "/emote **** Searching The Best of " & GetInternalUserCount() & " [ " & myChannel & " ] **** "
    call best(username, ping)
    End If
    End Sub
    Sub bestinchannel_Event_WhisperFromUser(Username, Flags, Message)
    Call bestinchannel_event_UserTalk(Username, Flags, Message, -4)
    End Sub
    Sub bestinchannel_Event_PressedEnter(Text)
    Call bestinchannel_event_UserTalk(Username, 0, Text, -3)
    End Sub
    
    '-----------------------------------------------------------------
    Sub best(username, htr)
    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
    
    For i = 1 to 40
    if users(i) <> "" then
    name = users(i)
    content = scinet.openurl("http://www.battle.net/war3/ladder/war3-player-profile.aspx?Gateway="& txtgate & "&PlayerName="&name)
    addchat vbred, i
     
    if i = 3 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " &#37; DoNe ] ...Wait plz... " 
    if i = 8 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... " 
    if i = 14 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... "
    if i = 19 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... "
    if i = 25 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... "
    if i = 29 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... "
    if i = 34 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... "
    if i = 38 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... "
    'if i = 36 then addq "/emote *** Working... [ " & TxtPorcent(i,Txttotal) & " % DoNe ] ...Wait plz... "
     
    pos1 = instr(content, "Total")
    pos1 = instr(pos1,content,"rankingRow")
    pos1 = instr(pos1, content, ">")+1
    pos2 = instr(pos1, content, "<")
    wins = mid(content, pos1, pos2-pos1)
    pos1 = instr(pos1, content, "%")-15
    pos1 = instr(pos1, content, ">")+1
    pos2 = instr(pos1, content, "<")-2
    percent = mid(content, pos1, pos2-pos1)
    if wins > 100 then
    If int(wins) > mostwins Then
    mostwins = int(wins)
    tp = csng(percent)
    winname = name
    Elseif int(wins) = mostwins Then
    If csng(percent) > tp Then
    winname = name
    ElseIf csng(percent) = tp Then
    winname = winname & ", " & name
    End If
    End If
    if isnumeric(percent) then
    If CSng(percent) > mostpercent Then
    mostpercent = CSng(percent)
    tw = wins
    Bestname = name
    Elseif CSng(percent) = mostpercent Then
    If wins > tw Then
    Bestname = name
    ElseIf wins = tw Then
    bestname = bestname & ", " & name
    End If
    End If
    end if
    end if
    end if
    Next
    addchat vbred, "Mas Wins: " & winname & " " & wins & " " & tp
    addchat vbgreen,"El Mejor: " & bestname  & " " & tw & " " & mostpercent
    If mostwins = 0 Then
    Select Case Ping
    Case -4
    addq "/w " & username & " Everyone in this channel have no wins"
    Case -3
    addchat vbgreen, "Everyone in this channel have no wins"
    Case Else
    addq "Everyone in this channel have no wins"
    End Select
    Exit Sub
    End If
    
    x = split(winname)
    If ubound(x) =0 Then
    tp = left(tp,2) & "." & mid(tp,3)
    message = "/emote [ " & winname & " ] has the most wins in the channel (" & mostwins & " wins) (" & tp & " %)"
    Elseif ubound(x) > 0 Then
    tp = left(tp,2) & "." & mid(tp,3)
    message = "/emote [ " & winname & " ] have the most wins in the channel (" & mostwins & " wins) (" & tp & " %)"
    End If
    x = split(bestname)
    If ubound(x) = 0 Then
    mostpercent = left(mostpercent,2) & "." & mid(mostpercent,3)
    if mostpercent = "10.000" then mostpercent = "100"
    message2 = "/emote [ " & bestname &" ] Is the best for me in the channel (" & mostpercent & " %) (" & tw & " wins)"
    Elseif ubound(x) > 0 Then
    mostpercent = left(mostpercent,2) & "." & mid(mostpercent,3)
    message2 = "/emote [ " & bestname &" ] have the best % in the channel (" & mostpercent & " %) (" & tw & " wins)"
    End If
    Select Case htr
    Case -4
    addq "/w " & username & " " & message
    addq "/w " & username & " " & message2
    Case -3
    addchat vbgreen, message
    addchat vbgreen, message2
    Case Else
    addq message
    addq message2
    End Select
    End Sub
    function TxtPorcent(i,txttotal)
    TxtPorcent = i * 100/Txttotal
    TxtPorcent = left(TxtPorcent,5)
    end function


    Last edited by T[X]AS; 12-10-2008 at 12:05 PM. Reason: Credtis

  2. #2
    Alt-F[4]'s Avatar
    Alt-F[4] is offline Member
    Array
    Join Date
    Nov 2007
    Location
    PORTUGAL
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    10
    Reputation
    6
    doesn´t work for me
    by : MisteriousSoul THX

  3. #3
    KickAsses is offline Newbie
    Array
    Join Date
    Mar 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    10
    Reputation
    15
    thx

  4. #4
    t0pcraft- is offline Hacker
    Array
    Join Date
    Jan 2008
    Location
    Under Your Bed
    Posts
    233
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    10
    Reputation
    61
    doesnt work for me neither :/


  5. #5
    M I C H A is offline Member
    Array
    Join Date
    Jul 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    9
    Reputation
    1
    Haha.. your lucky For me it works sometimes...
    Ive installed it - worked.. well the result of the best was a bit confusing but there was a result.. then i translated all spoken word from the bot into german and it work again, cool. Ive fixed some spelling misstakes (made by me) and then... shit... Error. Ive deleted the hole plugin and loded it new, no change.... i did not change something and next day i used it, it worked just right ... 1 time -.-
    I also have the idea there have to be at least 30 Members in the Channel or no person has to leave while running... well im not sure cause my problem is not there all the time...

Similar Threads

  1. MaNGOS private server gm commands help?!?
    By tripydevp in forum WoW Private Servers
    Replies: 8
    Last Post: 09-17-2009, 08:16 PM
  2. [Ascent] & [Mangos] GM Commands
    By allexutz in forum WoW Private Servers
    Replies: 5
    Last Post: 11-05-2008, 02:05 AM
  3. White Paper : Memory reading
    By tttommeke in forum WoW Guides
    Replies: 0
    Last Post: 12-01-2007, 08:33 PM
  4. Can someone please extract MAPS for me?
    By Ryan in forum WoW Private Servers
    Replies: 8
    Last Post: 11-07-2007, 12:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •