Best Player iN ChaNNeL

This is a discussion on Best Player iN ChaNNeL within the Stealthbot Plugins forum part of the Stealthbot category; Code: 'bestinchannel '1.0 'Improved by t[x]aS@DrOiD 'Scripted/Writen By: 'Battle.NET West Account: ToughLuv 'aKa TutMatt on stealthbot Forums 'Improved by t[x]aS@DrOiD ...


+ Reply to Thread
Results 1 to 5 of 5

Thread: Best Player iN ChaNNeL

  1. #1
    lolercakess's Avatar
    lolercakess is offline Member
    lolercakess is on a distinguished road
    Join Date
    Jul 2007
    Posts
    48
    Downloads
    19
    Uploads
    0
    Rep Power
    3
    Reputation
    36

    Best Player iN ChaNNeL

    Code:
    'bestinchannel
    '1.0
    'Improved by t[x]aS@DrOiD
    'Scripted/Writen By:
    'Battle.NET West Account: ToughLuv
    'aKa TutMatt on stealthbot Forums
    'Improved by t[x]aS@DrOiD
    
    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) & " % 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 11:05 AM. Reason: Credtis

  2. #2
    Alt-F[4]'s Avatar
    Alt-F[4] is offline Addict
    Alt-F[4] is an unknown quantity at this point
    Join Date
    Nov 2007
    Location
    PORTUGAL
    Posts
    72
    Downloads
    22
    Uploads
    0
    Rep Power
    3
    Reputation
    6
    doesn´t work for me
    by : MisteriousSoul THX

  3. #3
    KickAsses is offline Newbie
    KickAsses is on a distinguished road
    Join Date
    Mar 2008
    Posts
    5
    Downloads
    0
    Uploads
    0
    Rep Power
    3
    Reputation
    15
    thx

  4. #4
    t0pcraft- is offline Hacker
    t0pcraft- will become famous soon enough
    Join Date
    Jan 2008
    Location
    Under Your Bed
    Posts
    244
    Downloads
    13
    Uploads
    0
    Rep Power
    3
    Reputation
    58
    doesnt work for me neither :/


  5. #5
    M I C H A is offline Member
    M I C H A is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    40
    Downloads
    0
    Uploads
    0
    Rep Power
    1
    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...

+ Reply to Thread

Similar Threads

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

Posting Permissions

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