[Program] Re-login on Disconnect menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Program] Re-login on Disconnect

    Taken from the WoWGlider Members area. Enjoy

    Took a while... well anyways here it is. Enjoy.
    Should work on almost all resolutions windowed now
    Edit: Final revision - everything is accounted for

    Code:
    ; ----------------------------------------------------------------------------
    ;
    ; AutoIt Version: 3.1.0
    ; Author:         Glider #99<>
    ;
    ; Script Function:
    ;    Restarts WoW, re-attaches , FINAL VERSION
    ; ----------------------------------------------------------------------------
    
    ;###########
    ; Globals
    ;###########
    
    AutoItWinSetTitle(random(10, 1000000, 1))
    $win_title = "World of Warcraft"
    
    func act()
    sleep(20)
    WinSetOnTop($win_title, "", 0)
    sleep(20)
    WinActivate($win_title, "")
    sleep(10)
    endfunc
    
    Sleep(random(1000, 2000, 1))
    
    $title = random(10, 1000000, 1)
    $restarted = 1
    $checktimes = 0
    $verify = 0
    
    
    $top_border_height = 23
    $left_border_width = 4
    
    checkwindow()
    
    $dimensions = WinGetClientSize($win_title, "")
    $screen_width = $dimensions[0]
    $screen_height = $dimensions[1]
    
    $win_pos = WinGetPos($win_title, "")
    $win_x = $win_pos[0] + $left_border_width
    $win_y = $win_pos[1] + $top_border_height
    
    
    $level1color = "0xFDFC51"
    $level2color = "0x000000"
    $level3color = "0x000000"
    $level4color = "0x0083DF"
    $hearthY = $win_y + 0.8761574074 * $screen_height ;titans
    $hearthY2 = $win_y + 0.9016203704 * $screen_height ;no titan
    
    ;finally, a resolution checker
    if $screen_width = 800 then
        $level1color = "0xFAFB46"
        $level3color = "0x110D00"
        $level4color = "0x0082DD"
        $hearthX = $win_x + 0.9875 * $screen_width
            $hearth1color = "0x2C2C2C"
            $hearth2color = "0x222221"    
    elseif $screen_width = 1024 then
        $level1color = "0xFCFC4E"
        $level4color = "0x0083DE"
        $hearthX = $win_x + 0.9875 * $screen_width
            $hearth1color = "0x282727"
            $hearth2color = "0x1A1A1A"
    elseif $screen_width = 1152 then
        $hearthX = $win_x + 0.9375 * $screen_width
            $hearth1color = "0x4C4D4C"
            $hearth2color = "0x565656"
    elseif $screen_width = 1280 then
        if $screen_height = 960 then
            $level1color = "0xFFFB5A"
            $level3color = "0x010101"
            $level4color = "0x0080DA"
            $hearthX = $win_x + 0.9375 * $screen_width
                $hearth1color = "0x464746"
                $hearth2color = "0x565756"
        elseif $screen_height = 1024 then
            $level1color = "0x081021"
            $level3color = "0xCC9F00"
            $level4color = "0x0076C9"
            $hearthX = $win_x + 0.9625 * $screen_width
                $hearth1color = "0x4D4E4E"
                $hearth2color = "0x575656"
        else 
            msg("Unknown screen resolution. Support for all square resolutions only.")
            exit
        endif
    else 
    msg("Unknown screen resolution. Support for all square resolutions only.")
    exit
    endif
    
    ;##############################
    ;Easy Set Values
    ;##############################
    $charx = $win_x + 0.8645833333 * $screen_width
    $char1y = $win_y + 0.1469907407 * $screen_height
    $char2y = $win_y + 0.2164351852 * $screen_height
    $char3y = $win_y + 0.2858796296 * $screen_height
    $char4y = $win_y + 0.3553240741 * $screen_height
    $char5y = $win_y + 0.4363425926 * $screen_height
    $char6y = $win_y + 0.505787037 * $screen_height
    $char7y = $win_y + 0.5810185185 * $screen_height
    $char8y = $win_y + 0.65625 * $screen_height
    $char9y = $win_y + 0.7372685185 * $screen_height
    $passboxX = $win_x + 0.4782986111 * $screen_width
    $passboxY = $win_y + 0.6157407407 * $screen_height
    $errx = $win_x + 0.5338541667 * $screen_width
    $erry = $win_y + 0.5173611111 * $screen_height
    $err2x = $win_x + 0.5043402778 * $screen_width
    $err2y = $win_y + 0.5636574074 * $screen_height
    $errcharx = $win_x + 0.5364583333 * $screen_width
    $errchary = $win_y + 0.5173611111 * $screen_height
    $errx2 = $win_x + 0.8211805556 * $screen_width ;suggest a realm
    $erry2 = $win_y + 0.9490740741 * $screen_height
    $errx3 = $win_x + 0.703125 * $screen_width ;help to disconnect
    $erry3 = $win_y + 0.7916666667 * $screen_height
    $arrx = $win_x + 0.4852430556 * $screen_width
    $arr2x = $win_x + 0.5173611111 * $screen_width
    $arry = $win_y + 0.9699074074 * $screen_height
    ;##############################
    
    HotKeySet("{END}", "request_end")
    
    func checkwindow()
    $dimensions = WinGetClientSize($win_title, "")
    if @error then
    msg("Open WoW and put it into windowed mode before starting the offline check!")
    Exit 0
    endif
    endfunc
    
    act()
    
    msg("This bot needs windowed mode and the hearthstone in bottom right action bar, in the last slot.  Use the END key to terminate it.")
    $password = InputBox($title, "Enter your password.")
    $times = InputBox($title, "# of times to sucessfully restart? This will keep from re-afking...")
    
    slot()
    
    func slot()
    $slot = InputBox($title, "Choose your character slot (1-9).  The topmost is number 1.")
    if $slot = 1 then
    Global $chary = $char1y
    elseif $slot = 2 then
    Global $chary = $char2y
    elseif $slot = 3 then
    Global $chary = $char3y
    elseif $slot = 4 then
    Global $chary = $char4y
    elseif $slot = 5 then
    Global $chary = $char5y
    elseif $slot = 6 then
    Global $chary = $char6y
    elseif $slot = 7 then
    Global $chary = $char7y
    elseif $slot = 8 then
    Global $chary = $char8y
    elseif $slot = 9 then
    Global $chary = $char9y
    else
    msg("You can only choose a character slot between 1 and 9.")
    slot()
    endif
    endfunc
    
       $MB_YESNO = 4
       $MB_YES = 6
        if MsgBox($MB_YESNO, $title, "Using glider in invisible mode?") == $MB_YES then
        $invis = "yes"
        else
        $invis = "no"
        endif
    
    if $invis = "no" then
        Msg("Move your mouse over the glider attach button and press ENTER.")
    
        $mouserPOS = MouseGetPos()
    
        $GliX2 = $mouserPOS[0]
        $gliY = $mouserPOS[1]
        $gliX1 = $gliX2 - 80
    endif
    
    starter()
    
    func starter()
    while $restarted
    act()
    startcheck()
    ;DEBUG LINE FOLLOWS
    ;sleep(7000)
    sleep(60 * 1000 * random(5, 10, 1))
    checkwindow()
    wend
    endfunc
    
    func startcheck()
    if $times = 0 then
        msg("Max restart times reached.  Exiting...")
        Exit
    endif
    $checklevel1 = "0x" & Hex(PixelGetColor ( $win_x + 0.126736111 * $screen_width , $win_y + 0.1261574074 * $screen_height ), 6)
    if $checklevel1 = $level1color then
        $checklevel2 = "0x" & Hex(PixelGetColor ( $win_x + 0.0190972222 * $screen_width , $win_y + 0.0324074074 * $screen_height ), 6)
        if $checklevel2 = $level2color then
            $checklevel3 = "0x" & Hex(PixelGetColor ( $win_x + 0.4409722222 * $screen_width , $win_y + 0.9849537037 * $screen_height ), 6)
            if $checklevel3 = $level3color OR $checklevel3 = "0x020101" then
                $checklevel4 = "0x" & Hex(PixelGetColor ( $win_x + 0.5 * $screen_width , $win_y + 0.9282407407 * $screen_height ), 6)
                if $checklevel4 = $level4color then
                    start_bot()
    ;            else
    ;            msg("level 4 failed, was looking for " & $level4color & " and found " & $checklevel4)
                endif
    ;        else
    ;        msg("level 3 failed, was looking for " & $level3color & " and found " & $checklevel3)
            endif
    ;    else
    ;    msg("level 2 failed, was looking for " & $level2color & " and found " & $checklevel2)
        endif
    ;else
    ;msg("level 1 failed, was looking for " & $level1color & " and found " & $checklevel1)
    endif
    endfunc
    
    func start_bot()
    checkwindow()
        sleep(random(10, 20, 1))
        MouseMove($passboxX, $passboxY, 1)
        MouseClick("left", $passboxX, $passboxY, 1, 1)
        sleep(random(10, 20, 1))
        MouseClick("left", $passboxX, $passboxY, 1, 1)
        sleep(random(1000, 2000, 1))
    Send ( $password , 1 )
    sleep(random(1000, 2000, 1))
    send ("{ENTER}")
    sleep(60 * 1000 * random(0.4, 0.5, 0.01))
            $checkloggedon = "0x" & Hex(PixelGetColor ( $win_x + 0.0190972222 * $screen_width , $win_y + 0.0324074074 * $screen_height ), 6)
            if $checkloggedon = $level2color then
                Global $restarted = 1
                    MouseMove($errx, $erry, 1)
                    send("{ENTER}")
                        sleep(random(1000, 2000, 1))
                    MouseClick("left", $errx, $erry, 1, 1)
                        sleep(random(500, 1000, 1))
                    MouseClick("left", $err2x, $err2y, 1, 1)
                        sleep(random(500, 1000, 1))
                    MouseClick("left", $errx2, $erry2, 1, 1)
                        sleep(random(500, 1000, 1))
                    MouseClick("left", $errx3, $erry3, 1, 1)
                starter()
            else
                checkcharload()
                if $verify = 1 then
                    Global $restarted = 0
                        MouseMove($charx, $chary, 1)
                        MouseClick("left", $charx, $chary, 1, 1)
                    Global $arr1 = Hex(PixelGetColor ( $arrx , $arry ), 6)
                    Global $arr2 = Hex(PixelGetColor ( $arr2x , $arry ), 6)
                        MouseClick("left", $charx, $chary, 1, 1)
                        send("{ENTER}")
                            sleep(Int( (60 * 1000 * 0.75) ))
                            Ingame()
                else
                    Global $restarted = 1
                    starter()
                endif
            endif
    endfunc
    
    func ingame()
    checkconnect()
    if $kickedoff = 0 then
        checkwindow()
        checkhearthstone()
    
        if $invis = "no" then
            MouseMove($glix2, $gliy, 1)          ;movemouse to the attach button
                sleep(random(10, 20, 1))
            MouseClick("left", $glix2, $gliy, 1, 1)
                sleep(random(3000, 4000, 1))
            MouseMove($glix1, $gliy, 1)          ;movemouse to the glide button
                sleep(random(10, 20, 1))
            MouseClick("left", $glix1, $gliy, 1, 1)
                sleep(random(3000, 4000, 1))
        elseif $invis = "yes" then
            send("{CTRLDOWN}")
                sleep(random(10, 20, 1))
            send("{CTRLUP}")
                sleep(random(40, 50, 1))
            send("{CTRLDOWN}")
                sleep(random(10, 20, 1))
            send("{CTRLUP}")
            act()
                sleep(random(400, 500, 1))
            send("G")
        endif
        act()
        sleep(random(10, 20, 1))
        Global $restarted = 1
        Global $times = $times - 1
        Global $checktimes = $checktimes + 1
        starter()
    else
    $checkloggedon = "0x" & Hex(PixelGetColor ( $win_x + 0.0190972222 * $screen_width , $win_y + 0.0324074074 * $screen_height ), 6)
        if $checkloggedon = $level2color then
            Global $restarted = 1
            starter()
        else
            Global $restarted = 0
                MouseMove($charx, $chary, 1)
                MouseClick("left", $charx, $chary, 1, 1)
                    Global $arr1 = Hex(PixelGetColor ( $arrx , $arry ), 6)
                    Global $arr2 = Hex(PixelGetColor ( $arr2x , $arry ), 6)
                MouseClick("left", $charx, $chary, 1, 1)
                send("{ENTER}")
                sleep(Int( (60 * 1000 * 0.75) ))
                    Ingame()
        endif
    endif
    endfunc
    
    func checkhearthstone()  ;Set to work with hearthstone in bottom right action bar, last slot
    $checkhearth = "0x" & Hex(PixelGetColor ( $hearthx , $hearthy ), 6) ;with titan panel bottom installed
    if $checkhearth = $hearth1color then
        Global $times = 0
        act()
        sleep(random(1000, 2000, 1))
        send ("{ENTER}")
        sleep(random(500, 1000, 1))
        send ("/exit", 1 )
        sleep(random(1000, 2000, 1))
        send ("{ENTER}")
        sleep(random(500, 1000, 1))
        msg("Hearthstone found used.  You were followed.  Ending program...")
        Exit
    endif
    $checkhearth = "0x" & Hex(PixelGetColor ( $hearthx , $hearthy2 ), 6) ;no titan panels
    if $checkhearth = $hearth2color then
        Global $times = 0
        act()
        sleep(random(1000, 2000, 1))
        send ("{ENTER}")
        sleep(random(500, 1000, 1))
        send ("/exit", 1 )
        sleep(random(1000, 2000, 1))
        send ("{ENTER}")
        sleep(random(500, 1000, 1))
        msg("Hearthstone found used.  You were followed.  Ending program...")
        Exit
    endif
    endfunc
    
    func checkconnect()
    act()
        sleep(random(40, 60, 1))
            send("{ENTER}")
        sleep(random(60, 70, 1))
            send("{ENTER}")
        sleep(random(2000, 3000, 1))
                    $arr1test = Hex(PixelGetColor ( $arrx , $arry ), 6)
                    $arr2test = Hex(PixelGetColor ( $arr2x , $arry ), 6)
    if $arr1test = $arr1 AND $arr2test = $arr2 then
        Global $kickedoff = 1
    else
        Global $kickedoff = 0
    endif
    endfunc
    
    func checkcharload()
    $errleft = $win_x + 0.6163194444 * $screen_width
    $errright = $win_x + 0.6302083333 * $screen_width
    $errbottom = $win_y + 0.5983796296 * $screen_height
    $errtop = $win_y + 0.4027777778 * $screen_height
        MouseMove($errcharx, $errchary, 1)
        sleep(1000)
        MouseClick("left", $errcharx, $errchary, 1, 1)
        sleep(1500)
    $errsearch = PixelSearch($errleft, $errtop, $errright, $errbottom, 0x000000, 1, 1)
              if @error then
            Global $verify = 1
           
             else
            Global $verify = 0
            Send("{ESCAPE}")
                sleep(1000)
            MouseMove($win_x + 0.7317708333 * $screen_width, $win_y + 0.7916666667 * $screen_height, 1)
                sleep(1000)
            MouseClick("left", $win_x + 0.7317708333 * $screen_width, $win_y + 0.7916666667 * $screen_height, 1, 1)
            sleep(1500)
           endif
    endfunc
    
    func msg($text)
        MsgBox(0, $title, $text)
    endfunc
    
    func request_end()
        $MB_YESNO = 4
        $MB_YES = 6
        if MsgBox($MB_YESNO, $title, "End it? Restarted " & $checktimes & " times.") == $MB_YES then
            Exit
        endif
    endfunc
    And a compiled version if you don't have AutoIt. (Which you should )
    http://www.megaupload.com/?d=9AP7UPK7
    Last edited by Matt; 05-13-2006 at 09:54 AM.

    [Program] Re-login on Disconnect
  2. #2
    Shanaar's Avatar Contributor
    Reputation
    85
    Join Date
    Apr 2006
    Posts
    511
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It has a content viewable to registered users only stuck on it- and i'm registered :P

    and what does AutoIt do?

  3. #3
    Matt's Avatar Legendary Authenticator enabled
    Reputation
    633
    Join Date
    Feb 2006
    Posts
    2,996
    Thanks G/R
    2/20
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fixed it... sory

  4. #4
    Shanaar's Avatar Contributor
    Reputation
    85
    Join Date
    Apr 2006
    Posts
    511
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    kk, thanks :P

  5. #5
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AutoIt is a tool that allows you to Automate tasks very easily. Check it out.

    http://www.autoitscript.com/autoit3/

Similar Threads

  1. [PROGRAM] WoW Auto-Login
    By Toxik the Spammer in forum World of Warcraft Bots and Programs
    Replies: 17
    Last Post: 06-04-2008, 03:50 PM
  2. disconnect on login
    By gravestalker in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 03-16-2008, 06:47 PM
All times are GMT -5. The time now is 01:54 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search