GeMercher.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:RunescapeBots 作者: lukegarbutt 项目源码 文件源码
def prevent_logout(top_left_corner, bottom_right_corner, runescape_window):
    seed = random.random()
    x, y = pyautogui.size()
    if seed > 0.5:  # opens up the sale history tab for 5 seconds then returns to ge tab
        while(True):
            realmouse.move_mouse_to(random.randint(0,x), random.randint(0,y))
            if len(list(pyautogui.locateAllOnScreen('Tools/screenshots/sale_history_button.png', region=(top_left_corner[0], top_left_corner[1], bottom_right_corner[0]-top_left_corner[0], bottom_right_corner[1]-top_left_corner[1]))))>0:
                move_mouse_to_box('Tools/screenshots/sale_history_button.png', top_left_corner, bottom_right_corner)
                pyautogui.click()
                time.sleep(9*random.random()+1)
                move_mouse_to_box('Tools/screenshots/grand_exchange_button.png', top_left_corner, bottom_right_corner)
                pyautogui.click()
                break
    else:  # examines the money pouch
        examine_money(bottom_right_corner)

# pass in an image and a search region
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号