天龙怀旧游戏python脚本

设置图:

游戏窗口最大化。

海贼洞这里定位你要回点的定位。

运行bat就行,脚本出错了还是会重新运行脚本,运行自动启动,end暂停脚本,home重新启动脚本

1.  我常用的是内挂回点脚本,

下面都是前台脚本,如果颜色点位没有区别,那么恭喜直接可以用,如果不能正常运作,那么颜色点位不一样,思路给你了,抓点抓色对应修改动手一下吧。

新建批处理 ng.bat

@echo off  
set "script_path=E:\soft\game\sleep\NG.py"  :: 替换为你的python.py脚本的实际路径  
set "max_wait=120"                             :: 设置等待时间为120秒(2分钟)  
timeout /t 5  
:loop  
    echo Checking python.py...  
    powershell -Command "Start-Process python -Verb RunAs -ArgumentList '""%script_path%"""' -Wait"  
    if %errorlevel% neq 0 (  
        echo python.py failed. Waiting %max_wait% seconds before retrying...  
        timeout /t %max_wait% >nul  
    ) else (  
        echo python.py executed successfully.  
    )  
goto :loop

新建python脚本 ng.py

# -*- coding: utf-8 -*-  
import pygetwindow as gw  
import pyautogui  
import time  
import random  
import threading  
from pynput.keyboard import Key,Listener  
  
running = True  
listener = None  
  
def perform_click(x,y,duration=0.2,delay_range=(0.3,0.4)):  
    pyautogui.moveTo(x,y,duration=duration)  
    delay = random.uniform(*delay_range)  
    time.sleep(delay)  
    pyautogui.mouseDown(x,y,button='left')  
    delay = random.uniform(*delay_range)  
    time.sleep(delay)  
    pyautogui.mouseUp(x,y,button='left')  
  
def on_press(key):  
    global running  
    if key == Key.home:  
        print("继续运行脚本")  
        running = True  
    elif key == Key.end:  
        print("暂停运行脚本")  
        running = False  
  
def start_listener():  
    global listener  
    with Listener(on_press=on_press) as listener:  
        listener.join()  
  
listener_thread = threading.Thread(target=start_listener,daemon=True)  
listener_thread.start()  
delay = random.uniform(2.3,2.5)
time.sleep(delay)  

while True:  
    if running:  

        color1 = pyautogui.pixel(2544,144)  #内挂
        if color1 == (255,243,49):  
            perform_click(2544,144,duration=0.5,delay_range=(0.3,0.5))  
            delay = random.uniform(0.5,1.0)
            time.sleep(delay)
            pyautogui.moveTo(1600,169, duration=0.2)

  
        color4 = pyautogui.pixel(1294,322)          #断线点1
        color5 = pyautogui.pixel(1177,335)          #断线点2
        if color4 == (255,242,99)  and color5 == (255,242,99)  :  
            delay = random.uniform(15.0,20.0)
            time.sleep(delay)
            perform_click(1344,356,duration=0.2,delay_range=(0.3,0.5))  
            delay = random.uniform(5.0,6.0)
            time.sleep(delay)


        color2 = pyautogui.pixel(1205,397)          #死亡判断点1
        color3 = pyautogui.pixel(1150,397)          #死亡判断点2
        if color2 == (37,37,37)  and      color3 == (37,37,37) :
            delay = random.uniform(200,210)
            time.sleep(delay)
            perform_click(1357,397,duration=0.2,delay_range=(0.3,0.5))  
            delay = random.uniform(5.0,6.0)
            time.sleep(delay)
            # 上面是人物死亡出鞘
            pyautogui.press('tab')
            delay = random.uniform(0.5,1.0)
            time.sleep(delay)
            perform_click(2448,326,duration=0.2,delay_range=(0.3,0.5))  
            pyautogui.mouseDown(2448,326,button='left')
            pyautogui.mouseUp(2448,326 ,button='left')    
            delay = random.uniform(0.04,0.05)
            time.sleep(delay)
            pyautogui.mouseDown(2448,326,button='left')
            pyautogui.mouseUp(2448,326,button='left')      
            delay = random.uniform(3,4)
            time.sleep(delay)
            pyautogui.press('tab')
            delay = random.uniform(0.5,1.0)
            time.sleep(delay)
            perform_click(73,351,duration=0.2,delay_range=(0.3,0.5))  
            delay = random.uniform(5,6)
            time.sleep(delay)
            #上面是走出地府
            delay = random.uniform(2.0,2.2)
            time.sleep(delay)
            perform_click(1299,1313,duration=0.2,delay_range=(0.3,0.5))              
            delay = random.uniform(0.5,1.0)
            time.sleep(delay)
            perform_click(1361,866,duration=0.2,delay_range=(0.3,0.5))     
            delay = random.uniform(0.5,1.0)
            time.sleep(delay)
            perform_click(1419,936,duration=0.2,delay_range=(0.3,0.5))             
            delay = random.uniform(0.5,1.0)
            time.sleep(delay)
            perform_click(1296,825,duration=0.2,delay_range=(0.3,0.5))       
            delay = random.uniform(8,9)
            time.sleep(delay)
            #上面是大理使用地彻符起飞

        color7799 = pyautogui.pixel(575,208)          #珍兽未关闭
        if color7799 == (248,196,88) :  
            delay = random.uniform(0.5,0.8)
            time.sleep(delay)
            perform_click(968,1383,duration=0.2,delay_range=(0.3,0.5))    
            delay = random.uniform(0.5,0.8)
            time.sleep(delay)


        color7788 = pyautogui.pixel(93,112)          #珍兽未出站
        if color7788 != (231,211,123) :  
            delay = random.uniform(0.3,0.5)
            time.sleep(delay)
            perform_click(968,1383,duration=0.2,delay_range=(0.3,0.5))    
            delay = random.uniform(0.5,0.8)
            time.sleep(delay)
       
        color77991 = pyautogui.pixel(575,208)          #珍兽未关闭
        if color77991 == (248,196,88) :  
            perform_click(191,505,duration=0.2,delay_range=(0.3,0.5))    
            delay = random.uniform(0.5,0.8)
            time.sleep(delay)
            perform_click(194,542,duration=0.2,delay_range=(0.3,0.5))    
            delay = random.uniform(3.5,4.0)
            time.sleep(delay)
            perform_click(968,1383,duration=0.2,delay_range=(0.3,0.5))    
            delay = random.uniform(0.5,0.8)
            time.sleep(delay)

  
    time.sleep(0.5)  # 
  
# 由于listener是一个daemon线程,它会在主线程结束时自动退出。因此,不需要显式停止它。

2.  打马活动脚本

新建批处理 dm.bat

@echo off  
set "script_path=E:\soft\game\sleep\DM.py"  :: 替换为你的python.py脚本的实际路径  
set "max_wait=120"                             :: 设置等待时间为120秒(2分钟)  
timeout /t 5  
:loop  
    echo Checking python.py...  
    powershell -Command "Start-Process python -Verb RunAs -ArgumentList '""%script_path%"""' -Wait"  
    if %errorlevel% neq 0 (  
        echo python.py failed. Waiting %max_wait% seconds before retrying...  
        timeout /t %max_wait% >nul  
    ) else (  
        echo python.py executed successfully.  
    )  
goto :loop

新建python脚本 dm.py

# -*- coding: utf-8 -*-  
import pygetwindow as gw  
import pyautogui  
import time  
import random  
import threading  
from pynput.keyboard import Key,Listener  
  
running = True  
listener = None  
  
def perform_click(x,y,duration=0.2,delay_range=(0.3,0.4)):  
    pyautogui.moveTo(x,y,duration=duration)  
    delay = random.uniform(*delay_range)  
    time.sleep(delay)  
    pyautogui.mouseDown(x,y,button='left')  
    delay = random.uniform(*delay_range)  
    time.sleep(delay)  
    pyautogui.mouseUp(x,y,button='left')  
  
def on_press(key):  
    global running  
    if key == Key.home:  
        print("继续运行脚本")  
        running = True  
    elif key == Key.end:  
        print("暂停运行脚本")  
        running = False  
  
def start_listener():  
    global listener  
    with Listener(on_press=on_press) as listener:  
        listener.join()  

listener_thread = threading.Thread(target=start_listener,daemon=True)  
listener_thread.start()  


while True:  
    if running:  

                    colordanshua1 = pyautogui.pixel(278,52)  #有血
                    colordanshua2 = pyautogui.pixel(453,58)  #是马贼
                    colordanshua3 = pyautogui.pixel(279,35)  #白怪
                    colordanshua33 = pyautogui.pixel(279,35)  #红怪
                    if colordanshua1 == (255,162,150)    and colordanshua3  != (155,153,152)      and  colordanshua2 == (205,195,196)     or  colordanshua33  == (155,1,1)     :
                        pyautogui.press('F2')  
                        delay = random.uniform(0.11,0.12)
                        time.sleep(delay)  
                    else:  
                        pyautogui.press('F1')        
                        delay = random.uniform(0.11,0.12)
                        time.sleep(delay)    

                    colordanshua1  = pyautogui.pixel(278,52)  #没血
                    if colordanshua1 != (255,162,150)      :
                        pyautogui.press('F1')  
                        delay = random.uniform(0.11,0.12)
                        time.sleep(delay)          
              
                    colordanshua1  = pyautogui.pixel(278,64)  #怒气
                    if colordanshua1 == (255,255,213)      :
                        pyautogui.press('F1')  
                        delay = random.uniform(0.11,0.12)
                        time.sleep(delay)          

                    colordanshuamb1 = pyautogui.pixel(1206,136)  #目标1
                    colordanshuamb2 = pyautogui.pixel(1360,216)  #目标5
                    if colordanshuamb1 == (1,1,1)  and  colordanshuamb2 ==  (1,1,1)    :
                        pyautogui.press('F1')  
                        delay = random.uniform(0.11,0.12)
                        time.sleep(delay)    
            
                    colordanshua3 = pyautogui.pixel(279,35)  #红怪
                    colordanshua21 = pyautogui.pixel(360,52)  #怪物大半血
                    colordanshua23 = pyautogui.pixel(1224,1344)  #F4技能好了
                    if    colordanshua3  == (155,1,1)    and  colordanshua21 == (255,162,150)  and    colordanshua23 != (33,28,19)   :
                        delay = random.uniform(0.20,0.22)
                        time.sleep(delay)  
                        pyautogui.press('F5')  
                        delay = random.uniform(0.20,0.22)
                        time.sleep(delay)  
                        pyautogui.press('F4')  
                        delay = random.uniform(0.20,0.22)
                        time.sleep(delay)  
                        pyautogui.press('F6')  
                        delay = random.uniform(0.20,0.22)
                        time.sleep(delay)  
            
                    colordanshua33 = pyautogui.pixel(279,35)  #红怪
                    colordanshua21 = pyautogui.pixel(360,52)  #怪物大半血
                    colordanshua22 = pyautogui.pixel(1188,1344)  #F3技能好了
                    if    colordanshua33  == (155,1,1)   and  colordanshua21 == (255,162,150)  and  colordanshua22 != (33,28,19)    :
                        delay = random.uniform(0.2,0.3)
                        time.sleep(delay)  
                        pyautogui.press('F5')  
                        delay = random.uniform(0.20,0.22)
                        time.sleep(delay)  
                        pyautogui.press('F3')  
                        delay = random.uniform(0.20,0.22)
                        time.sleep(delay)  
              
                    colorlan2 = pyautogui.pixel(104,63)   #  没蓝
                    if colorlan2 != (193,188,255) :
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.press('F7')  #  吃蓝
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
            
            
                    colorjiaxue13 = pyautogui.pixel(166,57)   #  没血
                    if colorjiaxue13  !=(255,162,150)  :
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.press('F10')  # 吃血
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
            
                    colorccc1 = pyautogui.pixel(93,112)   # 宝宝在
                    colorccc2 = pyautogui.pixel(180,100)   # 珍兽50%血        
                    if colorccc1 == (231,211,123)  and  colorccc2  != (255,162,150) :   # 宝宝加血
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.press('F8')  # 
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
            
                    colorccc11 = pyautogui.pixel(93,112)   # 宝宝在
                    colorccc21 = pyautogui.pixel(150,100)   # 珍兽30%血        
                    if colorccc11 == (231,211,123)  and  colorccc21  != (255,162,150) :   # 宝宝加血
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.press('F9')  # 
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    

                    colorcccdz1 = pyautogui.pixel(3,175)   # 队友1在
                    colorcccdz2 = pyautogui.pixel(58,69)   # 我是队长
                    if   colorcccdz1  == (0,0,0)  and  colorcccdz2  == (219,31,10) :   # 给队长
                        delay =  random.uniform(3.21,3.22)
                        time.sleep(delay)    
                        pyautogui.moveTo(20,170, duration=0.2)
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.mouseDown(20,170, button='left')
                        pyautogui.mouseUp(20,170, button='left')
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.mouseDown(20,170, button='right')
                        pyautogui.mouseUp(20,170, button='right')
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.moveTo(47,243, duration=0.2)
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.mouseDown(47,243, button='left')
                        pyautogui.mouseUp(47,243, button='left')
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    

                    colorcccdz3 = pyautogui.pixel(1581,1382)   # 闪烁
                    if   colorcccdz3  == (49,41,32)  :   # 加队
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.moveTo(1581,1382, duration=0.2)
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.mouseDown(1581,1382, button='left')
                        pyautogui.mouseUp(1581,1382, button='left')
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.moveTo(1563,836, duration=0.2)
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.mouseDown(1563,836, button='left')
                        pyautogui.mouseUp(1563,836, button='left')
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    


                    colorcccdz11 = pyautogui.pixel(3,175)   # 队友1不在
                    colorcccdz21 = pyautogui.pixel(58,69)   # 我是队长
                    if   colorcccdz11  != (0,0,0)  and  colorcccdz21  == (219,31,10) :   # 解散队
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.moveTo(37,62, duration=0.2)
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.mouseDown(37,62, button='left')
                        pyautogui.mouseUp(37,62, button='left')
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.mouseDown(37,62, button='right')
                        pyautogui.mouseUp(37,62, button='right')
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.moveTo(62,71, duration=0.2)
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.mouseDown(62,71, button='left')
                        pyautogui.mouseUp(62,71, button='left')
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    


    time.sleep(0.02)  # 
  
# 由于listener是一个daemon线程,它会在主线程结束时自动退出。因此,不需要显式停止它。

3.  副本打怪脚本

新建批处理 dg.bat

@echo off  
set "script_path=E:\soft\game\sleep\DG.py"  :: 替换为你的python.py脚本的实际路径  
set "max_wait=120"                             :: 设置等待时间为120秒(2分钟)  
timeout /t 5  
:loop  
    echo Checking python.py...  
    powershell -Command "Start-Process python -Verb RunAs -ArgumentList '""%script_path%"""' -Wait"  
    if %errorlevel% neq 0 (  
        echo python.py failed. Waiting %max_wait% seconds before retrying...  
        timeout /t %max_wait% >nul  
    ) else (  
        echo python.py executed successfully.  
    )  
goto :loop

新建python脚本 dg.py

# -*- coding: utf-8 -*-  
import pygetwindow as gw  
import pyautogui  
import time  
import random  
import threading  
from pynput.keyboard import Key,Listener  
  
running = True  
listener = None  
  
def perform_click(x,y,duration=0.2,delay_range=(0.3,0.4)):  
    pyautogui.moveTo(x,y,duration=duration)  
    delay = random.uniform(*delay_range)  
    time.sleep(delay)  
    pyautogui.mouseDown(x,y,button='left')  
    delay = random.uniform(*delay_range)  
    time.sleep(delay)  
    pyautogui.mouseUp(x,y,button='left')  

  
def on_press(key):  
    global running  
    if key == Key.home:  
        print("继续运行脚本")  
        running = True  
    elif key == Key.end:  
        print("暂停运行脚本")  
        running = False  
  
def start_listener():  
    global listener  
    with Listener(on_press=on_press) as listener:  
        listener.join()  
  
listener_thread = threading.Thread(target=start_listener,daemon=True)  
listener_thread.start()  


while True:  
    if running:  

        colordanshua1 = pyautogui.pixel(278,52)  #有血
        if colordanshua1 == (255,162,150)  :
            pyautogui.press('F2')  
            delay = random.uniform(0.11,0.12)
            time.sleep(delay)  
        else:  
            pyautogui.press('F1')  
            delay = random.uniform(0.11,0.12)
            time.sleep(delay)    

        colordanshuamb1 = pyautogui.pixel(1206,136)  #目标1
        colordanshuamb2 = pyautogui.pixel(1360,216)  #目标5
        if colordanshuamb1 == (1,1,1)  and  colordanshuamb2 ==  (1,1,1)    :
            pyautogui.press('F1')  
            delay = random.uniform(0.11,0.12)
            time.sleep(delay)    


        colordanshua3 = pyautogui.pixel(279,35)  #红怪
        colordanshua21 = pyautogui.pixel(360,52)  #怪物大半血
        colordanshua23 = pyautogui.pixel(1224,1344)  #F4技能好了
        if    colordanshua3  == (155,1,1)    and  colordanshua21 == (255,162,150)  and    colordanshua23 != (33,28,19)   :
            delay = random.uniform(0.2,0.3)
            time.sleep(delay)  
            pyautogui.press('F5')  
            delay = random.uniform(0.2,0.3)
            time.sleep(delay)  
            pyautogui.press('F4')  
            delay = random.uniform(0.2,0.3)
            time.sleep(delay)  
            pyautogui.press('F6')  
            delay = random.uniform(0.2,0.3)
            time.sleep(delay)  


        colordanshua211 = pyautogui.pixel(278,52)  #有血
        if colordanshua211 == (255,162,150)  :
            pyautogui.press('F2')  
            delay = random.uniform(0.11,0.12)
            time.sleep(delay)  
        else:  
            pyautogui.press('F1')  
            delay = random.uniform(0.11,0.12)
            time.sleep(delay)    


        colordanshua33 = pyautogui.pixel(279,35)  #红怪
        colordanshua21 = pyautogui.pixel(360,52)  #怪物大半血
        colordanshua22 = pyautogui.pixel(1188,1344)  #F3技能好了
        if    colordanshua33  == (155,1,1)   and  colordanshua21 == (255,162,150)  and  colordanshua22 != (33,28,19)    :
            delay = random.uniform(0.2,0.3)
            time.sleep(delay)  
            pyautogui.press('F5')  
            delay = random.uniform(0.2,0.3)
            time.sleep(delay)  
            pyautogui.press('F3')  
            delay = random.uniform(0.2,0.3)
            time.sleep(delay)  




        colorjiaxue1 = pyautogui.pixel(93,112)   # 宝宝在
        colorjiaxue2 = pyautogui.pixel(166,57)   #  没血
        colorjiaxue5 = pyautogui.pixel(1477,1298)   #  共生
        colorjiaxue6 = pyautogui.pixel(199,100)   # 宝宝满血
        if colorjiaxue1 == (231,211,123)    and colorjiaxue2 != (255,162,150)     and      colorjiaxue5  != (49,41,29)  and      colorjiaxue6  == (255,162,150) :
            delay =  random.uniform(0.21,0.22)
            time.sleep(delay)    
            perform_click(1477,1315,duration=0.2,delay_range=(0.3,0.5))  
            delay =  random.uniform(0.21,0.22)
            time.sleep(delay)    


        colorlan2 = pyautogui.pixel(104,63)   #  没蓝
        if colorlan2 != (193,188,255) :
            delay =  random.uniform(0.21,0.22)
            time.sleep(delay)    
            pyautogui.press('F7')  #  吃蓝
            delay =  random.uniform(0.21,0.22)
            time.sleep(delay)    



        colorjiaxue14 = pyautogui.pixel(93,112)   # 宝宝不在
        colorjiaxue13 = pyautogui.pixel(166,57)   #  没血
        if colorjiaxue13  !=(255,162,150)  and  colorjiaxue14  != (231,211,123):
            delay = random.uniform(0.2,0.3)
            time.sleep(delay)    
            pyautogui.press('F10')  # 吃血
            delay =  random.uniform(0.21,0.22)
            time.sleep(delay)    



        colorccc1 = pyautogui.pixel(93,112)   # 宝宝在
        colorccc2 = pyautogui.pixel(180,100)   # 珍兽30%血        
        if colorccc1 == (231,211,123)  and  colorccc2  != (255,162,150) :   # 宝宝加血
            delay =  random.uniform(0.21,0.22)
            time.sleep(delay)    
            pyautogui.press('F8')  # 
            delay =  random.uniform(0.21,0.22)
            time.sleep(delay)    

        colorccc11 = pyautogui.pixel(93,112)   # 宝宝在
        colorccc21 = pyautogui.pixel(150,100)   # 珍兽30%血        
        if colorccc11 == (231,211,123)  and  colorccc21  != (255,162,150) :   # 宝宝加血
            delay =  random.uniform(0.21,0.22)
            time.sleep(delay)    
            pyautogui.press('F9')  # 
            delay =  random.uniform(0.21,0.22)
            time.sleep(delay)    
  
    time.sleep(0.02)  # 
  
# 由于listener是一个daemon线程,它会在主线程结束时自动退出。因此,不需要显式停止它。

4.  摆摊(路中央)

bat

@echo off  
set "script_path=E:\soft\game\sleep\baitan.py"  :: 替换为你的python.py脚本的实际路径  
set "max_wait=120"                             :: 设置等待时间为120秒(2分钟)  
timeout /t 5  
:loop  
    echo Checking python.py...  
    powershell -Command "Start-Process python -Verb RunAs -ArgumentList '""%script_path%"""' -Wait"  
    if %errorlevel% neq 0 (  
        echo python.py failed. Waiting %max_wait% seconds before retrying...  
        timeout /t %max_wait% >nul  
    ) else (  
        echo python.py executed successfully.  
    )  
goto :loop

python

# -*- coding: utf-8 -*-  
import pygetwindow as gw  
import pyautogui  
import time  
import random  
import threading  
from pynput.keyboard import Key,Listener  
  
running = True  
listener = None  
  
def perform_click(x,y,duration=0.2,delay_range=(0.3,0.4)):  
    pyautogui.moveTo(x,y,duration=duration)  
    delay = random.uniform(*delay_range)  
    time.sleep(delay)  
    pyautogui.mouseDown(x,y,button='left')  
    delay = random.uniform(*delay_range)  
    time.sleep(delay)  
    pyautogui.mouseUp(x,y,button='left')  

  
def on_press(key):  
    global running  
    if key == Key.home:  
        print("继续运行脚本")  
        running = True  
    elif key == Key.end:  
        print("暂停运行脚本")  
        running = False  
  
def start_listener():  
    global listener  
    with Listener(on_press=on_press) as listener:  
        listener.join()  
  
listener_thread = threading.Thread(target=start_listener,daemon=True)  
listener_thread.start()  


while True:  
    if running:  
                        delay =  random.uniform(2.1,2.2)
                        time.sleep(delay)    
                        pyautogui.moveTo(2249,1094, duration=0.2)  移动到背包摆摊
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    
                        pyautogui.mouseDown(2249,1094, button='left')   点击背包摆摊
                        pyautogui.mouseUp(2249,1094, button='left')  点击背包摆摊
                        delay =  random.uniform(0.21,0.22)
                        time.sleep(delay)    


                        colordanshua1 = pyautogui.pixel(1395,615)  
                        if colordanshua1 == (245,191,80)  :  #摆摊中间界面打开右上角黄色,说明此处可以摆摊
                               pyautogui.moveTo(1118,1279, duration=0.2)  #  移动到轻功
                               delay =  random.uniform(0.21,0.22)
                               time.sleep(delay)    
                               pyautogui.mouseDown(1118,1279, button='left') # 点击轻功
                               pyautogui.mouseUp(1118,1279, button='left')  # 点击轻功
                               delay =  random.uniform(0.21,0.22)
                               time.sleep(delay)    
                               delay = random.uniform(0.06,0.08)
                               time.sleep(delay)  
                               pyautogui.moveTo(897,640, duration=0.1) #  移动路中间摆摊
                               delay =  random.uniform(0.21,0.22)
                               time.sleep(delay)    
                               pyautogui.mouseDown(897,640, button='left') #点击路中间摆摊
                               pyautogui.mouseUp(897,640, button='left')
                               delay =  random.uniform(0.02,0.03)
                               time.sleep(delay)    
                               pyautogui.moveTo(1340,803, duration=0.1)  #移动到确认摆摊
                               delay =  random.uniform(0.02,0.03)
                               time.sleep(delay)    
                               pyautogui.mouseDown(1340,803, button='left') 点击确认摆摊
                               pyautogui.mouseUp(1340,803, button='left')
                               delay =  random.uniform(3.1,3.2)
                               time.sleep(delay)    

                        colordanshua2 = pyautogui.pixel(1395,615)  #摆摊
                        if colordanshua2 != (245,191,80)  :
                               delay =  random.uniform(3.1,3.2)
                               time.sleep(delay)    
  
    time.sleep(0.02)  # 
  
# 由于listener是一个daemon线程,它会在主线程结束时自动退出。因此,不需要显式停止它。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/613167.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

(三)Appdesigner-界面转换及数据导入和保存

提示:文章为系列文章,可以在对应学习专栏里面进行学习。对应资源已上传 目录 前言 一、Appdesigner是什么? 二、界面切换 三、数据导入及保存 (一)数据导入 (二)数据保存 总结 前言 Appd…

windows设置Redis服务后台自启动

1.通过CMD命令行工是进入Redis安装目录,将Redis服务注册到 Windows服务中 redis-server.exe --service-install redis.windows.conf --loglevel verbose 2.查看—下Redis服务是否注册 WinR输入services.msc,确定进入,再查找是否有Redis 3.启动…

自动化测试基础 --- Jmeter

前置环境安装 首先我们需要知道如何下载Jmeter 这里贴上下载网站Apache JMeter - Download Apache JMeter 我们直接解压,然后在bin目录下找到jemter.bat即可启动使用 成功打开之后就是这个界面 每次打开可以用这种方式切换成简体中文 或者直接修改properties文件修改对应的语言…

C 语言中怎么产生真正的随机数?

在C语言中&#xff0c;要产生真正的随机数&#xff0c;我们通常使用标准库中的 <stdlib.h> 头文件中提供的随机数生成函数。 这些函数可以生成伪随机数&#xff0c;但它们在一定程度上是随机的&#xff0c;足以满足大多数应用程序的需求。 1. 伪随机数生成函数 C标准库…

《C语言文件处理:从新手到高手的跃迁》

&#x1f4c3;博客主页&#xff1a; 小镇敲码人 &#x1f49a;代码仓库&#xff0c;欢迎访问 &#x1f680; 欢迎关注&#xff1a;&#x1f44d;点赞 &#x1f442;&#x1f3fd;留言 &#x1f60d;收藏 &#x1f30f; 任尔江湖满血骨&#xff0c;我自踏雪寻梅香。 万千浮云遮碧…

【计算机毕设】基于SpringBoot的在线拍卖系统 - 免费源码(私信领取)

免费领取源码 &#xff5c; 项目完整可运行 &#xff5c; v&#xff1a;chengn7890 诚招源码校园代理&#xff01; 1. 研究目的 本项目旨在设计并实现一个基于Spring Boot的在线拍卖系统&#xff0c;为用户提供便捷的拍卖服务&#xff0c;实现商品的竞拍和交易功能&#xff0c…

前端 | 数据统计及页面数据展现

文章目录 &#x1f4da;实现效果&#x1f4da;模块实现解析&#x1f407;html&#x1f407;css&#x1f407;javascript &#x1f4da;实现效果 折线图分别展现当前累计单词总数及每篇新增单词数&#xff0c;鼠标悬浮读取具体数值。 数值统计 词云图展现&#xff0c;及点击查看…

在线旅游网站,基于 SpringBoot+Vue+MySQL 开发的前后端分离的在线旅游网站设计实现

目录 一. 前言 二. 功能模块 2.1. 登录界面 2.2. 管理员功能模块 2.3. 用户功能模块 三. 部分代码实现 四. 源码下载 一. 前言 随着科学技术的飞速发展&#xff0c;各行各业都在努力与现代先进技术接轨&#xff0c;通过科技手段提高自身的优势&#xff0c;旅游网站当然…

Error: Maximum response size reached

错误原因复现 请求下载的文件是4g的&#xff0c;postman报错Error: Maximum response size reached 解决办法 Postman设置请求时长和数据大小 Settings&#xff0c;打开设置面板 postman有默认请求时间&#xff0c;正常的postman请求后端少量数据&#xff0c;返回特别快。但…

美颜滤镜SDK解决方案,稳定可靠,易于集成

高质量的视觉体验已成为企业吸引用户、提升品牌形象的关键&#xff0c;美摄科技凭借其领先的美颜滤镜SDK技术&#xff0c;为企业提供了从人像美颜到多元场景处理的全方位解决方案&#xff0c;助力企业轻松实现视觉升级。 一、强大能力&#xff0c;覆盖多场景 美摄科技美颜滤镜…

洪水仿真模拟(ArcGIS),水利数字孪生新利器

这两天ArcGIS Pro的官方账号释放了一个名为“Flood Simulation in ArcGIS Pro”的洪水模拟功能视频。根据视频详情页的介绍&#xff0c;该洪水仿真模拟功能会作为新功能出现在ArcGIS Pro 3.3中。 由于我目前从事的主要应用方向都是弱GIS的领域&#xff0c;所以我已经很久没有再…

无线收发模块家电控制实验

zkhengyang可申请加入数字音频系统研究开发交流答疑群(课题组) 当然可以先用固定电平发送&#xff0c;可以实现&#xff0c;0/1数据发送&#xff0c;接收。 可以使用51单片机来编码码&#xff0c;解码&#xff0c;或者任何MCU或者SOC&#xff0c;DSP&#xff0c;FPGA。 注意G…

银河麒麟操作系统 v10 离线安装 Docker v20.10.9

1查看系统版本 [rootweb-0001 ~]# cat /etc/os-release NAME"Kylin Linux Advanced Server" VERSION"V10 (Tercel)" ID"kylin" VERSION_ID"V10" PRETTY_NAME"Kylin Linux Advanced Server V10 (Tercel)" ANSI_COLOR"…

OBS插件--自定义着色器

自定义着色器 自定义着色器是一个滤镜插件&#xff0c;可以用于源和场景。插件自带一百多款滤镜效果&#xff0c;支持自己编写效果代码。 下面截图演示下操作步骤&#xff1a; 首先&#xff0c;打开 OBS直播助手 在插件中心左侧导航栏&#xff0c;选择 滤镜 项&#xff0c;然…

在go-zero中使用jwt

gozero使用jwt 两个步骤 获取token验证token 前端获取token 先编写 jwt.api 文件&#xff0c;放在api目录下 syntax "v1"info (title: "type title here"desc: "type desc here"author: "type author here"email: &quo…

经常睡不好觉?试试用上华为手环9新升级的睡眠监测功能

睡眠问题是不是经常困扰着你呢&#xff1f;听说&#xff0c;华为手环9的睡眠监测功能升级了&#xff0c;无论是入睡前、睡眠中还是睡醒后&#xff0c;都能够帮助我们改善睡眠&#xff0c;让我们告别糟糕的睡眠质量&#xff01; 睡觉前&#xff0c;打开华为手环9的睡眠模式&…

二值信号量、计数型信号量与互斥量

二值信号量 什么是信号量? 信号量(Semaphore),是在多任务环境下使用的一种机制,是可以用来保证两个或多个关键代码段不被并发调用。 信号量这个名字,我们可以把它拆分来看,信号可以起到通知信号的作用,然后我们的量还可以用来表示资源的数量,当我们的量只有0和1的时…

1.基于python的单细胞数据预处理-特征选择

文章目录 特征选择背景基于基因离散度基于基因归一化方差基于基因皮尔森近似残差特征选择总结 参考&#xff1a; [1] https://github.com/Starlitnightly/single_cell_tutorial [2] https://github.com/theislab/single-cell-best-practices 特征选择背景 现在已经获得了经过…

企业微信集成H5授权登录相关知识(二)

流程&#xff1a; 1.前端请求企业微信获取code&#xff1a;官网网页授权链接 2.企业微信返回的code请求后端判断是否已绑定系统账户 3.后端根据企业微信code&#xff0c;accessToken获得userId 4.userId获取user进行oauth2授权方式进行免密登录 相关知识&#xff1a; 一&a…

初阶数据结构—顺序表和链表

第一章&#xff1a;线性表 线性表&#xff08;linear list&#xff09;是n个具有相同特性的数据元素的有限序列。 线性表是一种在实际中广泛使用的数据结构&#xff0c;常见的线性表&#xff1a;顺序表、链表、栈、队列、字符串... 线性表在逻辑上是线性结构&#xff0c;也就…