Page 13 of 16 FirstFirst ... 31112131415 ... LastLast
Results 181 to 195 of 239
  1. #181
    sgtsh's Avatar
    Join Date
    May 2017
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    5
    I feel like i might be a little bit late to the game so to speak in discovering this bot, so if anyone can answer me a few things id very much appreciate it!

    Im assuming that you used to be able to load into a game, exit right away, and receive points? But now after there patches you receive 0....

    To counter there patch, you guys are saying i have to land, an stay alive?

    By increasing the config file setting "wait_for_plain" to 300, I'm assuming this means that (if you manage to stay alive) you gain more points dependant on what rank you're at when exiting?

    I'f thats how its working then i made a few changes of my own to hopefully higher the chance of not dieing....

    first of all, i jump out a lot earlier, and secondly, i hit the floor an start crawling upon landing, then exit after 3 mins...

    I seem to be making points, but have only ran it for literally a couple of games so no idea what sort of average per hour ill make.

    It looks as though its giving me 60bp per game?

    Anyway, if you're interested here's my tweaked superbot.py code. just replace lines 274 to 283 with the below code.

    Code:
     if not pixelMatchesColor(text_position[0], text_position[1], text_start_color, tolerance=color_tolerance):
                print('Jumping from plane in 30 seconds.')
                time.sleep(25)
                print('Jumping in 5 seconds...')
                time.sleep(1)
                print('Jumping in 4 seconds...')
                time.sleep(1)
                print('Jumping in 3 seconds...')
                time.sleep(1)
                print('Jumping in 2 seconds...')
                time.sleep(1)
                print('Jumping in 1 seconds...')
                time.sleep(1)
                pyautogui.press('f')
                print('Waiting to land.')
                time.sleep(60)
                print('Hitting the floor...')
                pyautogui.press('z')
                time.sleep(1)
                print('Unleashing the snake...')
                pyautogui.press('=')
                print('Quitting game in 3 min.')
                time.sleep(60)
                print('Quitting game in 2 min.')
                time.sleep(60)
                print('Quitting game in 1 min.')
                time.sleep(30)
                print('Quitting game in 30 seconds.')
                time.sleep(20)
                print('Quitting game in 10 seconds.')
                time.sleep(5)
                print('Quitting game in 5 seconds...')
                time.sleep(1)
                print('Quitting game in 4 seconds...')
                time.sleep(1)
                print('Quitting game in 3 seconds...')
                time.sleep(1)
                print('Quitting game in 2 seconds...')
                time.sleep(1)
                print('Quitting game in 1 seconds...')
                time.sleep(1)
                pyautogui.press('esc')
                time.sleep(animation_delay)
                pyautogui.click(exit_position[0], exit_position[1])
                time.sleep(exit_animation_delay)
                pyautogui.click(exit_position[0], exit_position[1])
                changeState(loading_state)
                print('Going in menu. Loading again')
                time.sleep(10)
    Last edited by sgtsh; 11-12-2017 at 11:24 AM.

  2. The Following 2 Users Say Thank You to sgtsh For This Useful Post:

    JasSlaughter (11-13-2017),peachhihi (11-16-2017)

  3. #182
    zoekwon's Avatar
    Join Date
    Oct 2017
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    i always open with notepad. which program do u use to see line?

  4. #183
    sgtsh's Avatar
    Join Date
    May 2017
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    5
    download notepad++

  5. #184
    sgtsh's Avatar
    Join Date
    May 2017
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    5
    I noticed the game was using up an awful lot of ram when i just looked back at it after several hours. Iv'e added a little bit more code to force it into shutting the game down an rebooting it after every x many rounds played, which i think will help.

    Under line 23 add:
    Code:
    reboot_game_counter = 0
    then on the end of the code i posted above, add:
    Code:
                if reboot_game_counter > 12:
                    print('Rebooting game to keep ram usage down.')
                    reboot_game_counter == 0
                    killGame()
                    time.sleep(wait_after_killing_a_game)
                    changeState(start_state)
                reboot_game_counter += 1
    Change the 12 for however many rounds you want it to reboot the game after...

    Full autobot.py file :
    Code:
    # -*- coding: utf-8 -*-
    
    import json
    import os
    import time
    
    import psutil
    import pyautogui
    
    pubg_url = 'steam://rungameid/578080'
    
    PROCNAME = "TslGame.exe"
    CRASH_PROCNAME = "BroCrashReporter.exe"
    debug_directory = "debug_screenshots"
    start_state = "HELLO"
    play_state = "PLAYING"
    play_timer_max = 60 * 3
    matching_state = "MATCHING"
    matching_timer_max = 60 * 3
    loading_state = "LOADING"
    loading_timer_max = 60 * 3
    gameloading_state = "GAME IS LOADING"
    gameloading_timer_max = 60 * 3
    reboot_game_counter = 0
    
    state = start_state
    takeScrenshot = True
    timer = 0.0
    
    
    def getConfig():
        with open('config.json', encoding='UTF-8') as data_file:
            data = json.load(data_file)
        return data
    
    def getpixel(x, y):
        return pyautogui.screenshot().getpixel((x, y))
    
    def pixelMatchesColor(x, y, expectedRGBColor, tolerance=0):
        pix = getpixel(x,y)
        if len(pix) == 3 or len(expectedRGBColor) == 3:  # RGB mode
            r, g, b = pix[:3]
            exR, exG, exB = expectedRGBColor[:3]
            return (abs(r - exR) <= tolerance) and (abs(g - exG) <= tolerance) and (abs(b - exB) <= tolerance)
        elif len(pix) == 4 and len(expectedRGBColor) == 4:  # RGBA mode
            r, g, b, a = pix
            exR, exG, exB, exA = expectedRGBColor
            return (abs(r - exR) <= tolerance) and (abs(g - exG) <= tolerance) and (abs(b - exB) <= tolerance) and (
                abs(a - exA) <= tolerance)
        else:
            assert False, 'Color mode was expected to be length 3 (RGB) or 4 (RGBA), but pixel is length %s and expectedRGBColor is length %s' % (
                len(pix), len(expectedRGBColor))
    
    
    def printScreen(message):
        if takeScrenshot:
            if not os.path.exists(debug_directory):
                os.makedirs(debug_directory)
            pyautogui.screenshot('{}/{}{}.png'.format(debug_directory, time.strftime("%m.%d %H.%M.%S", time.gmtime()), message))
    
    
    def changeState(value):
        global state, timer
        state = value
        timer = 0
    
    
    def killGame():
        for proc in psutil.process_iter():
            # check whether the process name matches
            if proc.name() == PROCNAME:
                proc.kill()
    
    def matchesButton(position):
        if pixelMatchesColor(position[0], position[1], white_button,
                          tolerance=color_tolerance) or pixelMatchesColor(position[0],
                                                                          position[1],
                                                                          gray_button,
                                                                          tolerance=color_tolerance) \
        or pixelMatchesColor(position[0],
                             position[1],
                             super_white_button,
                             tolerance=color_tolerance) or pixelMatchesColor(
            position[0], position[1], golden_button, tolerance=color_tolerance):
            return True
        return False
    
    def isGameRunning():
        for proc in psutil.process_iter():
            # check whether the process name matches
            if proc.name() == PROCNAME:
                return True
            else:
                return False
    
    def checkTimer():
        global state
        if state == loading_state and timer > loading_timer_max:
            printScreen('Timeout')
            print('Timeout. Restarting the game')
            changeState(start_state)
        elif state == matching_state and timer > matching_timer_max:
            printScreen('Timeout')
            print('Timeout. Restarting the game')
            changeState(start_state)
        elif state == play_state and timer > play_timer_max:
            printScreen('Timeout')
            print('Timeout. Restarting the game')
            changeState(start_state)
        elif state == gameloading_state and timer > gameloading_timer_max:
            printScreen('Timeout')
            print('Timeout. Restarting the game')
            changeState(start_state)
    
    
    config = getConfig()
    
    # Menu
    print('By using this software you agree with license! You can find it in code.')
    print('Choose a server:')
    number = 1
    for server in config['servers']:
        print('{}. {}'.format(number, server['title']))
        number += 1
    inp = int(input('Type number: '))
    inp -= 1
    server_position = (config['servers'][inp]['x'], config['servers'][inp]['y'], config['servers'][inp]['title'])
    print('Choose a mod:')
    number = 1
    for server in config['modes']:
        print('{}. {}'.format(number, server['title']))
        number += 1
    inp = int(input('Type number: '))
    inp -= 1
    
    print('Can I take screenshots if something wrong happens? (y/N)')
    if input().lower() == 'y':
        print('Thanks')
    else:
        print("Well, if something will go wrong, then I can't help you")
        takeScrenshot = False
    
    # Position init
    mode_position = (config['modes'][inp]['x'], config['modes'][inp]['y'], config['modes'][inp]['title'])
    mode_tick_position = (config['modes'][inp]['tick']['x'], config['modes'][inp]['tick']['y'])
    play_button_position = (config['play_button']['x'], config['play_button']['y'])
    play_state_position = (config['play_state']['x'], config['play_state']['y'])
    text_position = (config['text']['x'], config['text']['y'])
    exit_position = (config['exit_to_lobby']['x'], config['exit_to_lobby']['y'])
    error_position_check = (config['error_position']['x'], config['error_position']['y'])
    error_ok_position = (config['error_ok_position']['x'], config['error_ok_position']['y'])
    game_message_position = (config['game_message_position']['x'], config['game_message_position']['y'])
    exit_button_position = (config['exit_button_position']['x'], config['exit_button_position']['y'])
    reconnect_button_position = (config['reconnect_button_position']['x'], config['reconnect_button_position']['y'])
    
    # Reading timings
    refresh_rate = config["timers"]["refresh_rate"]
    wait_after_killing_a_game = config["timers"]["wait_after_killing_a_game"]
    start_delay = config["timers"]["start_delay"]
    animation_delay = config["timers"]["animation_delay"]
    wait_for_players = config["timers"]["wait_for_players"]
    wait_for_plain = config["timers"]["wait_for_plain"]
    exit_animation_delay = config["timers"]["exit_animation_delay"]
    loading_delay = config["timers"]["loading_delay"]
    
    # Colors
    def getColor(config, name):
        return (config["colors"][name]["r"], config["colors"][name]["g"], config["colors"][name]["b"])
    
    
    color_tolerance = config["color_tolerance"]
    dark_play_color = getColor(config, "dark_play_color")
    play_color = getColor(config, "play_color")
    matching_color = getColor(config, "matching_color")
    matching_tick_color = getColor(config, "matching_tick_color")
    text_start_color = getColor(config, "text_start_color")
    white_button = getColor(config, "white_button")
    gray_button = getColor(config, "gray_button")
    golden_button = getColor(config, "golden_button")
    super_white_button = getColor(config, "super_white_button")
    windows_background = getColor(config, "windows_background")
    exit_button_color = getColor(config, "exit_button_color")
    reconnect_button_color = getColor(config, "reconnect_button_color")
    
    # Game info
    print('Server: {}. Mode: {}'.format(server_position[2], mode_position[2]))
    
    while (1):
        try:
            for proc in psutil.process_iter():
                # check whether the process name matches
                if proc.name() == CRASH_PROCNAME:
                    print('Fucking bugs in PUBG. Trying to avoid them!')
                    proc.kill()
                    killGame()
                    time.sleep(wait_after_killing_a_game)
                    changeState(start_state)
        except Exception as ex:
            print('Something went wrong while killing bug reporter... Error message: {}'.format(ex))
        if state == start_state:
            if pixelMatchesColor(error_position_check[0], error_position_check[1], windows_background,
                                 tolerance=color_tolerance):
                pyautogui.press('enter')
                pyautogui.click(error_ok_position[0], error_ok_position[1])
            killGame()
            time.sleep(wait_after_killing_a_game)
            try:
                os.startfile(pubg_url)
                changeState(loading_state)
                time.sleep(start_delay)
                print('Loading PUBG')
            except Exception as ex:
                print('Something went wrong while starating PUBG... Error message: {}'.format(ex))
    
        elif state == loading_state:
            if pixelMatchesColor(play_state_position[0], play_state_position[1], play_color,
                                 tolerance=color_tolerance) or pixelMatchesColor(play_state_position[0],
                                                                                 play_state_position[1],
                                                                                 dark_play_color,
                                                                                 tolerance=color_tolerance):
                pyautogui.moveTo(play_button_position[0], play_button_position[1])
                time.sleep(animation_delay)
                # Pick a server
                pyautogui.click(server_position[0], server_position[1])
                time.sleep(animation_delay)
                pyautogui.click(mode_position[0], mode_position[1])
                time.sleep(animation_delay)
                if pixelMatchesColor(mode_tick_position[0], mode_tick_position[1], matching_tick_color,
                                     tolerance=color_tolerance):
                    pyautogui.click(mode_tick_position[0], mode_tick_position[1])
                pyautogui.click(play_button_position[0], play_button_position[1])
                changeState(matching_state)
                time.sleep(loading_delay)
                print('Starting matchmaking...')
            elif pixelMatchesColor(text_position[0], text_position[1], text_start_color, tolerance=color_tolerance):
                print('I see text, so the game is probably ready...')
                changeState(play_state)
            elif pixelMatchesColor(reconnect_button_position[0], reconnect_button_position[1], reconnect_button_color, tolerance=color_tolerance):
                print('Nice orange button? I\'ll press it!')
                pyautogui.click(reconnect_button_position[0], reconnect_button_position[1])
                time.sleep(animation_delay)
            elif matchesButton(game_message_position):
                print("Game's message was denied")
                pyautogui.click(game_message_position[0], game_message_position[1])
            elif not pixelMatchesColor(exit_button_position[0], exit_button_position[1], exit_button_color, tolerance=color_tolerance) \
                and not pixelMatchesColor(exit_button_position[0], exit_button_position[1], matching_tick_color, tolerance=color_tolerance)\
                and timer > 30 and isGameRunning():
                print('I can\'t see exit button, so the game is probably ready...')
                time.sleep(wait_for_players)
                changeState(play_state)
    
        elif state == matching_state:
            if pixelMatchesColor(play_state_position[0], play_state_position[1], play_color,
                                 tolerance=color_tolerance) or pixelMatchesColor(play_state_position[0],
                                                                                 play_state_position[1],
                                                                                 dark_play_color,
                                                                                 tolerance=color_tolerance):
                changeState(loading_state)
                time.sleep(loading_delay)
            if not pixelMatchesColor(play_state_position[0], play_state_position[1], matching_color,
                                     tolerance=color_tolerance):
                if pixelMatchesColor(play_state_position[0], play_state_position[1], matching_tick_color,
                                     tolerance=color_tolerance):
                    changeState(gameloading_state)
                    time.sleep(loading_delay)
                    print('Session is loading')
        elif state == gameloading_state:
            if not pixelMatchesColor(play_state_position[0], play_state_position[1], matching_tick_color,
                                     tolerance=color_tolerance):
                print('Loading is complete')
                time.sleep(wait_for_players)
                changeState(play_state)
        elif state == play_state:
            # print(text_position[0], text_position[1])
            if not pixelMatchesColor(text_position[0], text_position[1], text_start_color, tolerance=color_tolerance):
                print('Jumping from plane in 30 seconds.')
                time.sleep(25)
                print('Jumping in 5 seconds...')
                time.sleep(1)
                print('Jumping in 4 seconds...')
                time.sleep(1)
                print('Jumping in 3 seconds...')
                time.sleep(1)
                print('Jumping in 2 seconds...')
                time.sleep(1)
                print('Jumping in 1 seconds...')
                time.sleep(1)
                pyautogui.press('f')
                print('Waiting to land.')
                time.sleep(60)
                print('Hitting the floor...')
                pyautogui.press('z')
                time.sleep(1)
                print('Unleashing the snake...')
                pyautogui.press('=')
                print('Quitting game in 3 min.')
                time.sleep(60)
                print('Quitting game in 2 min.')
                time.sleep(60)
                print('Quitting game in 1 min.')
                time.sleep(30)
                print('Quitting game in 30 seconds.')
                time.sleep(20)
                print('Quitting game in 10 seconds.')
                time.sleep(5)
                print('Quitting game in 5 seconds...')
                time.sleep(1)
                print('Quitting game in 4 seconds...')
                time.sleep(1)
                print('Quitting game in 3 seconds...')
                time.sleep(1)
                print('Quitting game in 2 seconds...')
                time.sleep(1)
                print('Quitting game in 1 seconds...')
                time.sleep(1)
                pyautogui.press('esc')
                time.sleep(animation_delay)
                pyautogui.click(exit_position[0], exit_position[1])
                time.sleep(exit_animation_delay)
                pyautogui.click(exit_position[0], exit_position[1])
                changeState(loading_state)
                print('Going in menu. Loading again')
                time.sleep(10)
                if reboot_game_counter > 12:
                    print('Rebooting game to keep ram usage down.')
                    reboot_game_counter == 0
                    killGame()
                    time.sleep(wait_after_killing_a_game)
                    changeState(start_state)
                reboot_game_counter += 1
    
        time.sleep(refresh_rate)
        timer += refresh_rate
        checkTimer()

  6. The Following 2 Users Say Thank You to sgtsh For This Useful Post:

    gznster123 (12-08-2017),JasSlaughter (11-13-2017)

  7. #185
    momonpler's Avatar
    Join Date
    Sep 2017
    Gender
    male
    Posts
    30
    Reputation
    10
    Thanks
    1
    My Mood
    Angry
    Quote Originally Posted by sgtsh View Post
    I noticed the game was using up an awful lot of ram when i just looked back at it after several hours. Iv'e added a little bit more code to force it into shutting the game down an rebooting it after every x many rounds played, which i think will help.

    Under line 23 add:
    Code:
    reboot_game_counter = 0
    then on the end of the code i posted above, add:
    Code:
                if reboot_game_counter > 12:
                    print('Rebooting game to keep ram usage down.')
                    reboot_game_counter == 0
                    killGame()
                    time.sleep(wait_after_killing_a_game)
                    changeState(start_state)
                reboot_game_counter += 1
    Change the 12 for however many rounds you want it to reboot the game after...

    Full autobot.py file :
    Code:
    # -*- coding: utf-8 -*-
    
    import json
    import os
    import time
    
    import psutil
    import pyautogui
    
    pubg_url = 'steam://rungameid/578080'
    
    PROCNAME = "TslGame.exe"
    CRASH_PROCNAME = "BroCrashReporter.exe"
    debug_directory = "debug_screenshots"
    start_state = "HELLO"
    play_state = "PLAYING"
    play_timer_max = 60 * 3
    matching_state = "MATCHING"
    matching_timer_max = 60 * 3
    loading_state = "LOADING"
    loading_timer_max = 60 * 3
    gameloading_state = "GAME IS LOADING"
    gameloading_timer_max = 60 * 3
    reboot_game_counter = 0
    
    state = start_state
    takeScrenshot = True
    timer = 0.0
    
    
    def getConfig():
        with open('config.json', encoding='UTF-8') as data_file:
            data = json.load(data_file)
        return data
    
    def getpixel(x, y):
        return pyautogui.screenshot().getpixel((x, y))
    
    def pixelMatchesColor(x, y, expectedRGBColor, tolerance=0):
        pix = getpixel(x,y)
        if len(pix) == 3 or len(expectedRGBColor) == 3:  # RGB mode
            r, g, b = pix[:3]
            exR, exG, exB = expectedRGBColor[:3]
            return (abs(r - exR) <= tolerance) and (abs(g - exG) <= tolerance) and (abs(b - exB) <= tolerance)
        elif len(pix) == 4 and len(expectedRGBColor) == 4:  # RGBA mode
            r, g, b, a = pix
            exR, exG, exB, exA = expectedRGBColor
            return (abs(r - exR) <= tolerance) and (abs(g - exG) <= tolerance) and (abs(b - exB) <= tolerance) and (
                abs(a - exA) <= tolerance)
        else:
            assert False, 'Color mode was expected to be length 3 (RGB) or 4 (RGBA), but pixel is length %s and expectedRGBColor is length %s' % (
                len(pix), len(expectedRGBColor))
    
    
    def printScreen(message):
        if takeScrenshot:
            if not os.path.exists(debug_directory):
                os.makedirs(debug_directory)
            pyautogui.screenshot('{}/{}{}.png'.format(debug_directory, time.strftime("%m.%d %H.%M.%S", time.gmtime()), message))
    
    
    def changeState(value):
        global state, timer
        state = value
        timer = 0
    
    
    def killGame():
        for proc in psutil.process_iter():
            # check whether the process name matches
            if proc.name() == PROCNAME:
                proc.kill()
    
    def matchesButton(position):
        if pixelMatchesColor(position[0], position[1], white_button,
                          tolerance=color_tolerance) or pixelMatchesColor(position[0],
                                                                          position[1],
                                                                          gray_button,
                                                                          tolerance=color_tolerance) \
        or pixelMatchesColor(position[0],
                             position[1],
                             super_white_button,
                             tolerance=color_tolerance) or pixelMatchesColor(
            position[0], position[1], golden_button, tolerance=color_tolerance):
            return True
        return False
    
    def isGameRunning():
        for proc in psutil.process_iter():
            # check whether the process name matches
            if proc.name() == PROCNAME:
                return True
            else:
                return False
    
    def checkTimer():
        global state
        if state == loading_state and timer > loading_timer_max:
            printScreen('Timeout')
            print('Timeout. Restarting the game')
            changeState(start_state)
        elif state == matching_state and timer > matching_timer_max:
            printScreen('Timeout')
            print('Timeout. Restarting the game')
            changeState(start_state)
        elif state == play_state and timer > play_timer_max:
            printScreen('Timeout')
            print('Timeout. Restarting the game')
            changeState(start_state)
        elif state == gameloading_state and timer > gameloading_timer_max:
            printScreen('Timeout')
            print('Timeout. Restarting the game')
            changeState(start_state)
    
    
    config = getConfig()
    
    # Menu
    print('By using this software you agree with license! You can find it in code.')
    print('Choose a server:')
    number = 1
    for server in config['servers']:
        print('{}. {}'.format(number, server['title']))
        number += 1
    inp = int(input('Type number: '))
    inp -= 1
    server_position = (config['servers'][inp]['x'], config['servers'][inp]['y'], config['servers'][inp]['title'])
    print('Choose a mod:')
    number = 1
    for server in config['modes']:
        print('{}. {}'.format(number, server['title']))
        number += 1
    inp = int(input('Type number: '))
    inp -= 1
    
    print('Can I take screenshots if something wrong happens? (y/N)')
    if input().lower() == 'y':
        print('Thanks')
    else:
        print("Well, if something will go wrong, then I can't help you")
        takeScrenshot = False
    
    # Position init
    mode_position = (config['modes'][inp]['x'], config['modes'][inp]['y'], config['modes'][inp]['title'])
    mode_tick_position = (config['modes'][inp]['tick']['x'], config['modes'][inp]['tick']['y'])
    play_button_position = (config['play_button']['x'], config['play_button']['y'])
    play_state_position = (config['play_state']['x'], config['play_state']['y'])
    text_position = (config['text']['x'], config['text']['y'])
    exit_position = (config['exit_to_lobby']['x'], config['exit_to_lobby']['y'])
    error_position_check = (config['error_position']['x'], config['error_position']['y'])
    error_ok_position = (config['error_ok_position']['x'], config['error_ok_position']['y'])
    game_message_position = (config['game_message_position']['x'], config['game_message_position']['y'])
    exit_button_position = (config['exit_button_position']['x'], config['exit_button_position']['y'])
    reconnect_button_position = (config['reconnect_button_position']['x'], config['reconnect_button_position']['y'])
    
    # Reading timings
    refresh_rate = config["timers"]["refresh_rate"]
    wait_after_killing_a_game = config["timers"]["wait_after_killing_a_game"]
    start_delay = config["timers"]["start_delay"]
    animation_delay = config["timers"]["animation_delay"]
    wait_for_players = config["timers"]["wait_for_players"]
    wait_for_plain = config["timers"]["wait_for_plain"]
    exit_animation_delay = config["timers"]["exit_animation_delay"]
    loading_delay = config["timers"]["loading_delay"]
    
    # Colors
    def getColor(config, name):
        return (config["colors"][name]["r"], config["colors"][name]["g"], config["colors"][name]["b"])
    
    
    color_tolerance = config["color_tolerance"]
    dark_play_color = getColor(config, "dark_play_color")
    play_color = getColor(config, "play_color")
    matching_color = getColor(config, "matching_color")
    matching_tick_color = getColor(config, "matching_tick_color")
    text_start_color = getColor(config, "text_start_color")
    white_button = getColor(config, "white_button")
    gray_button = getColor(config, "gray_button")
    golden_button = getColor(config, "golden_button")
    super_white_button = getColor(config, "super_white_button")
    windows_background = getColor(config, "windows_background")
    exit_button_color = getColor(config, "exit_button_color")
    reconnect_button_color = getColor(config, "reconnect_button_color")
    
    # Game info
    print('Server: {}. Mode: {}'.format(server_position[2], mode_position[2]))
    
    while (1):
        try:
            for proc in psutil.process_iter():
                # check whether the process name matches
                if proc.name() == CRASH_PROCNAME:
                    print('Fucking bugs in PUBG. Trying to avoid them!')
                    proc.kill()
                    killGame()
                    time.sleep(wait_after_killing_a_game)
                    changeState(start_state)
        except Exception as ex:
            print('Something went wrong while killing bug reporter... Error message: {}'.format(ex))
        if state == start_state:
            if pixelMatchesColor(error_position_check[0], error_position_check[1], windows_background,
                                 tolerance=color_tolerance):
                pyautogui.press('enter')
                pyautogui.click(error_ok_position[0], error_ok_position[1])
            killGame()
            time.sleep(wait_after_killing_a_game)
            try:
                os.startfile(pubg_url)
                changeState(loading_state)
                time.sleep(start_delay)
                print('Loading PUBG')
            except Exception as ex:
                print('Something went wrong while starating PUBG... Error message: {}'.format(ex))
    
        elif state == loading_state:
            if pixelMatchesColor(play_state_position[0], play_state_position[1], play_color,
                                 tolerance=color_tolerance) or pixelMatchesColor(play_state_position[0],
                                                                                 play_state_position[1],
                                                                                 dark_play_color,
                                                                                 tolerance=color_tolerance):
                pyautogui.moveTo(play_button_position[0], play_button_position[1])
                time.sleep(animation_delay)
                # Pick a server
                pyautogui.click(server_position[0], server_position[1])
                time.sleep(animation_delay)
                pyautogui.click(mode_position[0], mode_position[1])
                time.sleep(animation_delay)
                if pixelMatchesColor(mode_tick_position[0], mode_tick_position[1], matching_tick_color,
                                     tolerance=color_tolerance):
                    pyautogui.click(mode_tick_position[0], mode_tick_position[1])
                pyautogui.click(play_button_position[0], play_button_position[1])
                changeState(matching_state)
                time.sleep(loading_delay)
                print('Starting matchmaking...')
            elif pixelMatchesColor(text_position[0], text_position[1], text_start_color, tolerance=color_tolerance):
                print('I see text, so the game is probably ready...')
                changeState(play_state)
            elif pixelMatchesColor(reconnect_button_position[0], reconnect_button_position[1], reconnect_button_color, tolerance=color_tolerance):
                print('Nice orange button? I\'ll press it!')
                pyautogui.click(reconnect_button_position[0], reconnect_button_position[1])
                time.sleep(animation_delay)
            elif matchesButton(game_message_position):
                print("Game's message was denied")
                pyautogui.click(game_message_position[0], game_message_position[1])
            elif not pixelMatchesColor(exit_button_position[0], exit_button_position[1], exit_button_color, tolerance=color_tolerance) \
                and not pixelMatchesColor(exit_button_position[0], exit_button_position[1], matching_tick_color, tolerance=color_tolerance)\
                and timer > 30 and isGameRunning():
                print('I can\'t see exit button, so the game is probably ready...')
                time.sleep(wait_for_players)
                changeState(play_state)
    
        elif state == matching_state:
            if pixelMatchesColor(play_state_position[0], play_state_position[1], play_color,
                                 tolerance=color_tolerance) or pixelMatchesColor(play_state_position[0],
                                                                                 play_state_position[1],
                                                                                 dark_play_color,
                                                                                 tolerance=color_tolerance):
                changeState(loading_state)
                time.sleep(loading_delay)
            if not pixelMatchesColor(play_state_position[0], play_state_position[1], matching_color,
                                     tolerance=color_tolerance):
                if pixelMatchesColor(play_state_position[0], play_state_position[1], matching_tick_color,
                                     tolerance=color_tolerance):
                    changeState(gameloading_state)
                    time.sleep(loading_delay)
                    print('Session is loading')
        elif state == gameloading_state:
            if not pixelMatchesColor(play_state_position[0], play_state_position[1], matching_tick_color,
                                     tolerance=color_tolerance):
                print('Loading is complete')
                time.sleep(wait_for_players)
                changeState(play_state)
        elif state == play_state:
            # print(text_position[0], text_position[1])
            if not pixelMatchesColor(text_position[0], text_position[1], text_start_color, tolerance=color_tolerance):
                print('Jumping from plane in 30 seconds.')
                time.sleep(25)
                print('Jumping in 5 seconds...')
                time.sleep(1)
                print('Jumping in 4 seconds...')
                time.sleep(1)
                print('Jumping in 3 seconds...')
                time.sleep(1)
                print('Jumping in 2 seconds...')
                time.sleep(1)
                print('Jumping in 1 seconds...')
                time.sleep(1)
                pyautogui.press('f')
                print('Waiting to land.')
                time.sleep(60)
                print('Hitting the floor...')
                pyautogui.press('z')
                time.sleep(1)
                print('Unleashing the snake...')
                pyautogui.press('=')
                print('Quitting game in 3 min.')
                time.sleep(60)
                print('Quitting game in 2 min.')
                time.sleep(60)
                print('Quitting game in 1 min.')
                time.sleep(30)
                print('Quitting game in 30 seconds.')
                time.sleep(20)
                print('Quitting game in 10 seconds.')
                time.sleep(5)
                print('Quitting game in 5 seconds...')
                time.sleep(1)
                print('Quitting game in 4 seconds...')
                time.sleep(1)
                print('Quitting game in 3 seconds...')
                time.sleep(1)
                print('Quitting game in 2 seconds...')
                time.sleep(1)
                print('Quitting game in 1 seconds...')
                time.sleep(1)
                pyautogui.press('esc')
                time.sleep(animation_delay)
                pyautogui.click(exit_position[0], exit_position[1])
                time.sleep(exit_animation_delay)
                pyautogui.click(exit_position[0], exit_position[1])
                changeState(loading_state)
                print('Going in menu. Loading again')
                time.sleep(10)
                if reboot_game_counter > 12:
                    print('Rebooting game to keep ram usage down.')
                    reboot_game_counter == 0
                    killGame()
                    time.sleep(wait_after_killing_a_game)
                    changeState(start_state)
                reboot_game_counter += 1
    
        time.sleep(refresh_rate)
        timer += refresh_rate
        checkTimer()
    so this is the final autobot.py ? no need to setting more?
    im lill bit confused rn. as i know after Bluehole patch afk player. u wont get BP.

  8. #186
    Oshee's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    22
    Reputation
    10
    Thanks
    0
    Someone help me or record tutorial video ?

  9. #187
    sgtsh's Avatar
    Join Date
    May 2017
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    5
    so this is the final autobot.py ? no need to setting more?
    im lill bit confused rn. as i know after Bluehole patch afk player. u wont get BP.
    The code from what i gathered used to load a lobby, wait for players to join an a round to start, then the wait_for_plane setting was the time delay before quitting the match, as others said, changing it from 10 seconds to 300 meant that you still got points, i guess after x many mins staying alive, or after getting top 70 for example? im not sure how the bp system works but i know that it is giving me 60 bp's a round.

    I basically removed the code where this setting was implemented, and replaced it with code to jump out the plane earlier, lie down, an start crawling. To avoid afk killers coming an killing you early, which also seemed to result in 0 BP's, maybe because its under x mins, or top 90 or so? idk im just guessing as for the reason...
    Last edited by sgtsh; 11-13-2017 at 07:21 AM.

  10. #188
    JasSlaughter's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by sgtsh View Post
    Under line 23 add:
    Code:
    reboot_game_counter = 0
    then on the end of the code i posted above, add:
    Code:
                if reboot_game_counter > 12:
                    print('Rebooting game to keep ram usage down.')
                    reboot_game_counter == 0
                    killGame()
                    time.sleep(wait_after_killing_a_game)
                    changeState(start_state)
                reboot_game_counter += 1
    Change the 12 for however many rounds you want it to reboot the game after...
    Great idea, thanks for sharing. But when I use your code it restarts after every round no matter what value I set?

  11. #189
    RznB's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    im just keep getting exit from the plane , what do i do? already change the wait_for_plain to 300 but keep the same, and also its always choose duo fpp instead of squad fpp. please help, this is my config looks like
    Code:
    {
      "color_tolerance": 15,
      "colors":{
        "dark_play_color":{
          "r": 123,
          "g": 98,
          "b": 42
        },
        "play_color":{
          "r": 232,
          "g": 180,
          "b": 70
        },
        "matching_color":{
          "r": 121,
          "g": 88,
          "b": 24
        },
        "matching_tick_color":{
          "r": 0,
          "g": 0,
          "b": 0
        },
        "text_start_color":{
          "r": 160,
          "g": 255,
          "b": 226
        },
        "white_button":{
          "r": 129,
          "g": 129,
          "b": 129
        },
        "super_white_button":{
          "r": 255,
          "g": 255,
          "b": 255
        },
        "gray_button":{
          "r": 83,
          "g": 83,
          "b": 83
        },
        "golden_button":{
          "r": 255,
          "g": 182,
          "b": 0
        },
        "windows_background":{
          "r": 255,
          "g": 255,
          "b": 255
        },
        "exit_button_color":{
          "r": 179,
          "g": 179,
          "b": 179
        },
        "reconnect_button_color":{
          "r": 231,
          "g": 164,
          "b": 0
        }
      },
      "timers": {
        "refresh_rate": 0.5,
        "wait_after_killing_a_game": 2,
        "start_delay": 15,
        "animation_delay": 1,
        "wait_for_players": 40,
        "wait_for_plain": 300,
        "exit_animation_delay": 1.5,
        "loading_delay": 3
      },
      "play_button":{
        "x": 97,
        "y": 51
      },
      "play_state":{
        "x": 9,
        "y": 113
      },
      "text":{
        "x": 866,
        "y": 681
      },
      "exit_to_lobby":{
        "x": 861,
        "y": 588
      },
      "error_position":{
        "x": 960,
        "y": 540
      },
      "error_ok_position":{
        "x": 1113,
        "y": 450
      },
      "game_message_position":{
        "x": 988,
        "y": 558
      },
      "exit_button_position":{
        "x": 1859,
        "y": 33
      },
      "reconnect_button_position":{
        "x": 970,
        "y": 520
      },
    "servers":[
    {
    "title": "NA",
    "x": 72,
    "y": 207
    },
    {
    "title": "EU",
    "x": 72,
    "y": 246
    },
    {
    "title": "AS",
    "x": 72,
    "y": 283
    },
    {
    "title": "KR/JP",
    "x": 72,
    "y": 323
    },
    {
    "title": "OC",
    "x": 72,
    "y": 366
    },
    {
    "title": "SA",
    "x": 72,
    "y": 405
    },
    {
    "title": "SEA",
    "x": 72,
    "y": 445
    }
      ],
      "modes":[
        {
          "title": "Squad",
          "x": 67,
          "y": 597,
          "tick":{
            "x": 183,
            "y": 601
          }
        },
        {
          "title": "Squad FPP",
          "x": 67,
          "y": 720,
          "tick":{
            "x": 183,
            "y": 721
          }
        }
      ]
    }
    also is there a updated superbot.py file?

  12. #190
    varth929's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    0
    Code:
    Loading PUBG
    Timeout. Restarting the game
    Loading PUBG
    Timeout. Restarting the game
    It's going only to menu. Can anyone help?

  13. #191
    nd44's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by varth929 View Post
    Code:
    Loading PUBG
    Timeout. Restarting the game
    Loading PUBG
    Timeout. Restarting the game
    It's going only to menu. Can anyone help?
    Me too, but only stuck in Loading PUBG

  14. #192
    sgtsh's Avatar
    Join Date
    May 2017
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    5
    make sure you guys read through all the comments, fixes were already posted.

  15. #193
    nd44's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by sgtsh View Post
    make sure you guys read through all the comments, fixes were already posted.
    Installed all packages, adjusted the resolution but after the game started nothing is happening, any idea?

  16. #194
    MrSamobo's Avatar
    Join Date
    Oct 2016
    Gender
    male
    Posts
    71
    Reputation
    10
    Thanks
    8
    My Mood
    Amazed
    My did not work.

  17. #195
    peachhihi's Avatar
    Join Date
    Sep 2017
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    0
    My Mood
    Asleep
    Quote Originally Posted by sgtsh View Post
    I feel like i might be a little bit late to the game so to speak in discovering this bot, so if anyone can answer me a few things id very much appreciate it!

    Im assuming that you used to be able to load into a game, exit right away, and receive points? But now after there patches you receive 0....

    To counter there patch, you guys are saying i have to land, an stay alive?

    By increasing the config file setting "wait_for_plain" to 300, I'm assuming this means that (if you manage to stay alive) you gain more points dependant on what rank you're at when exiting?

    I'f thats how its working then i made a few changes of my own to hopefully higher the chance of not dieing....

    first of all, i jump out a lot earlier, and secondly, i hit the floor an start crawling upon landing, then exit after 3 mins...

    I seem to be making points, but have only ran it for literally a couple of games so no idea what sort of average per hour ill make.

    It looks as though its giving me 60bp per game?

    Anyway, if you're interested here's my tweaked superbot.py code. just replace lines 274 to 283 with the below code.

    Code:
     if not pixelMatchesColor(text_position[0], text_position[1], text_start_color, tolerance=color_tolerance):
                print('Jumping from plane in 30 seconds.')
                time.sleep(25)
                print('Jumping in 5 seconds...')
                time.sleep(1)
                print('Jumping in 4 seconds...')
                time.sleep(1)
                print('Jumping in 3 seconds...')
                time.sleep(1)
                print('Jumping in 2 seconds...')
                time.sleep(1)
                print('Jumping in 1 seconds...')
                time.sleep(1)
                pyautogui.press('f')
                print('Waiting to land.')
                time.sleep(60)
                print('Hitting the floor...')
                pyautogui.press('z')
                time.sleep(1)
                print('Unleashing the snake...')
                pyautogui.press('=')
                print('Quitting game in 3 min.')
                time.sleep(60)
                print('Quitting game in 2 min.')
                time.sleep(60)
                print('Quitting game in 1 min.')
                time.sleep(30)
                print('Quitting game in 30 seconds.')
                time.sleep(20)
                print('Quitting game in 10 seconds.')
                time.sleep(5)
                print('Quitting game in 5 seconds...')
                time.sleep(1)
                print('Quitting game in 4 seconds...')
                time.sleep(1)
                print('Quitting game in 3 seconds...')
                time.sleep(1)
                print('Quitting game in 2 seconds...')
                time.sleep(1)
                print('Quitting game in 1 seconds...')
                time.sleep(1)
                pyautogui.press('esc')
                time.sleep(animation_delay)
                pyautogui.click(exit_position[0], exit_position[1])
                time.sleep(exit_animation_delay)
                pyautogui.click(exit_position[0], exit_position[1])
                changeState(loading_state)
                print('Going in menu. Loading again')
                time.sleep(10)
    I think I understand a little about the new mechanism to avoid AFK player after many tests. If u want to receive BP, u need to:
    - Kill a player (must kill, if you knock out them you're only receive 15 BP per player, not 60 BP for team rank)
    - Pick up an item (guns, ammo, attachments,...)
    - Wait until the time at the bottom-right count to around 2:55 then exit the match (that why the "wait_for_plain" setting change to "300". And you will receive 60 BP as team rank no matter your rank is 27/27 or 20/27.
    That's what I know, and thank to your tweak bot code, I find that we resolve some issues with the old bot:
    - The non-AFK player wait for us then kill us (receive 0 BP)
    - We may drown if we don't leave the plane soon (receive 0 BP)
    I used to use a AHK script to avoid this issues but sometimes it's not working as intended and Bluehole has recently updated their new anti-cheat system so may people use AHK (for macro no recoil) have been banned so I think it's risky to use it now.
    With the old python bot and script, I got about 350-400 BP per hour, I will test yout bot soon and I think it will have higher amount of BP.

    - - - Updated - - -

    Quote Originally Posted by sgtsh View Post
    The code from what i gathered used to load a lobby, wait for players to join an a round to start, then the wait_for_plane setting was the time delay before quitting the match, as others said, changing it from 10 seconds to 300 meant that you still got points, i guess after x many mins staying alive, or after getting top 70 for example? im not sure how the bp system works but i know that it is giving me 60 bp's a round.

    I basically removed the code where this setting was implemented, and replaced it with code to jump out the plane earlier, lie down, an start crawling. To avoid afk killers coming an killing you early, which also seemed to result in 0 BP's, maybe because its under x mins, or top 90 or so? idk im just guessing as for the reason...
    As my previous reply, the rank doesn't affect much how we receive BP unless you reach top 10 (in Squad mode), you only need to wait enough time (2:55 -> 2:40) then u receive 60 BP immediately. I think your bot is almost perfect now but I think we need to press F then hold W a little to avoid someone sees us only jump out of plane and after touching the ground, we only need to press Z to lie and don't need to crawl to prevent someone sees us crawling on the street,... Just my opinion

    - - - Updated - - -

    Quote Originally Posted by RznB View Post
    im just keep getting exit from the plane , what do i do? already change the wait_for_plain to 300 but keep the same, and also its always choose duo fpp instead of squad fpp. please help, this is my config looks like
    Code:
    {
      "color_tolerance": 15,
      "colors":{
        "dark_play_color":{
          "r": 123,
          "g": 98,
          "b": 42
        },
        "play_color":{
          "r": 232,
          "g": 180,
          "b": 70
        },
        "matching_color":{
          "r": 121,
          "g": 88,
          "b": 24
        },
        "matching_tick_color":{
          "r": 0,
          "g": 0,
          "b": 0
        },
        "text_start_color":{
          "r": 160,
          "g": 255,
          "b": 226
        },
        "white_button":{
          "r": 129,
          "g": 129,
          "b": 129
        },
        "super_white_button":{
          "r": 255,
          "g": 255,
          "b": 255
        },
        "gray_button":{
          "r": 83,
          "g": 83,
          "b": 83
        },
        "golden_button":{
          "r": 255,
          "g": 182,
          "b": 0
        },
        "windows_background":{
          "r": 255,
          "g": 255,
          "b": 255
        },
        "exit_button_color":{
          "r": 179,
          "g": 179,
          "b": 179
        },
        "reconnect_button_color":{
          "r": 231,
          "g": 164,
          "b": 0
        }
      },
      "timers": {
        "refresh_rate": 0.5,
        "wait_after_killing_a_game": 2,
        "start_delay": 15,
        "animation_delay": 1,
        "wait_for_players": 40,
        "wait_for_plain": 300,
        "exit_animation_delay": 1.5,
        "loading_delay": 3
      },
      "play_button":{
        "x": 97,
        "y": 51
      },
      "play_state":{
        "x": 9,
        "y": 113
      },
      "text":{
        "x": 866,
        "y": 681
      },
      "exit_to_lobby":{
        "x": 861,
        "y": 588
      },
      "error_position":{
        "x": 960,
        "y": 540
      },
      "error_ok_position":{
        "x": 1113,
        "y": 450
      },
      "game_message_position":{
        "x": 988,
        "y": 558
      },
      "exit_button_position":{
        "x": 1859,
        "y": 33
      },
      "reconnect_button_position":{
        "x": 970,
        "y": 520
      },
    "servers":[
    {
    "title": "NA",
    "x": 72,
    "y": 207
    },
    {
    "title": "EU",
    "x": 72,
    "y": 246
    },
    {
    "title": "AS",
    "x": 72,
    "y": 283
    },
    {
    "title": "KR/JP",
    "x": 72,
    "y": 323
    },
    {
    "title": "OC",
    "x": 72,
    "y": 366
    },
    {
    "title": "SA",
    "x": 72,
    "y": 405
    },
    {
    "title": "SEA",
    "x": 72,
    "y": 445
    }
      ],
      "modes":[
        {
          "title": "Squad",
          "x": 67,
          "y": 597,
          "tick":{
            "x": 183,
            "y": 601
          }
        },
        {
          "title": "Squad FPP",
          "x": 67,
          "y": 720,
          "tick":{
            "x": 183,
            "y": 721
          }
        }
      ]
    }
    also is there a updated superbot.py file?
    I see you use the updated code for the bot and I don't see anything wrong with these code, they look extractly the same with mine but mine work perfectly lol

Page 13 of 16 FirstFirst ... 31112131415 ... LastLast

Similar Threads

  1. [Discussion] Crossfire - Auto Farm bot ?
    By semihunal in forum CrossFire Farming & Partner Request
    Replies: 9
    Last Post: 01-29-2013, 05:15 PM
  2. [Solved] Where do I find MultiClient/farming bot/afk for CFNA?
    By somaizeu in forum CrossFire Help
    Replies: 2
    Last Post: 07-01-2012, 04:26 PM
  3. Bot Auto Farm = Dead o.o HELP D:
    By BapeD in forum Vindictus Help
    Replies: 22
    Last Post: 01-12-2012, 10:19 AM
  4. [Release] MPGH AFK Auto-Bot [BETA 2]
    By Grim in forum Combat Arms Hacks & Cheats
    Replies: 103
    Last Post: 02-03-2010, 03:25 PM
  5. [Release] MPGH AFK Auto-Bot [BETA]
    By Grim in forum Combat Arms Hacks & Cheats
    Replies: 104
    Last Post: 01-11-2010, 01:38 AM