|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本来想写点小代码代肝下游戏来着 之前好好的 加了手动停止之后 发现外部while无法作用
def begin1(): #二十八章
global single , T1 , kill
za = floor(li/6)
c = 1
if za < 1:
print("大哥给点寿司吧!!!!")
else:
if num5 < 1:
print("大哥给点时间吧")
else:
x = int(num2) - int(num0)
y = int(num3) - int(num1) #确定游戏位置
kill = 1
single = 1
T1 = 1
x1 = randint(int(a*0.8276*int(x))+num0,(int(a*0.973*int(x)+num0)))#28章
y1 = randint(int(a*0.775*int(y)+num1),(int(a*0.89*int(y)+num1)))
sleep(uniform(3,4))
moveTo(x1,y1 ,duration = 0.25)#第二十八章
print("第二十八章坐标",(x1,y1))
sleep(uniform(0.1,0.5))
click()
sleep(uniform(3,4))
while c <= za:
print(c ,za)
while kill == 1:
x2 = randint(int(a*0.7*int(x)+num0),(int(a*0.7823*int(x)+num0)))#探索
y2 = randint(int(a*0.722*int(y)+num1),(int(a*0.7788*int(y)+num1)))
x3 = randint(int(a*0.71354*int(x)+num0),(int(a*0.759*int(x)+num0)))#傀儡师1
y3 = randint(int(a*0.372*int(y)+num1),(int(a*0.4425*int(y)+num1)))
x4 = randint(int(a*0.898*int(x)+num0),(int(a*0.943*int(x)+num0)))#傀儡师2
y4 = randint(int(a*0.383*int(y)+num1),(int(a*0.46*int(y)+num1)))
x5 = randint(int(a*0.23*int(x)+num0),(int(a*0.7*int(x)+num0)))#结算
y5 = randint(int(a*0.578*int(y)+num1),(int(a*0.715*int(y)+num1)))
x6 = randint(int(a*0.0208*int(x)+num0),(int(a*0.0646*int(x)+num0)))#返回
y6 = randint(int(a*0.0463*int(y)+num1),(int(a*0.1213*int(y)+num1)))
x7 = randint(int(a*0.548*int(x)+num0),(int(a*0.66*int(x)+num0)))#确定
y7 = randint(int(a*0.5426*int(y)+num1),(int(a*0.583*int(y)+num1)))
x8 = randint(int(a*0.23*int(x)+num0),(int(a*0.7*int(x)+num0)))#结算2
y8 = randint(int(a*0.578*int(y)+num1),(int(a*0.715*int(y)+num1)))
print("正在刷第", c ,"次")
ct0 = uniform(2,3)
sleep(ct0)
moveTo(x2,y2,duration = uniform(0.1,0.5))#探索
print("探索坐标",(x2,y2))
ct1 = uniform(2,3)
sleep(ct1)
click()
ct2 = uniform(2,3)
sleep(ct2)
moveTo(x3,y3,duration = uniform(0.1,0.5))#傀儡师1
print(("傀儡师一坐标",x3,y3))
st1 = uniform(0.1,0.5)
sleep(st1)
click()
lt1 = randint(num5+1,num5+3)
sleep(lt1)
moveTo(x5,y5,duration = uniform(0.1,0.5))#结算
print(("结算一坐标",x5,y5))
click()
ct3 = uniform(2,3)
sleep(ct3)
moveTo(x4,y4,duration = uniform(0.1,0.5))#傀儡师2
print(("傀儡师二坐标",x4,y4))
st2 = uniform(0.1,0.5)
sleep(st2)
click()
lt2 = randint(num5+1,num5+3)
sleep(lt2)
moveTo(x8,y8, duration = uniform(0.1,0.5))#结算
print(("结算二坐标",x8,y8))
st3 = uniform(0.1,0.5)
sleep(st3)
click()
ct4 = uniform(2,3)
sleep(ct4)
moveTo(x6,y6,duration = uniform(0.1,0.5))#返回
print(("返回坐标",x6,y6))
st4 = uniform(0.1,0.5)
sleep(st4)
click()
ct5 = uniform(2,3)
sleep(ct5)
moveTo(x7,y7, duration = uniform(0.1,0.5))#确定
print(("确定坐标",x7,y7))
st5 = uniform(0.1,0.5)
sleep(st5)
click()
ct6 = uniform(2,3)
sleep(ct6)
print("第",c,"次共计用时",
"{:.2f}".format(ct0+ct1+ct2+ct3+ct4+ct5+ct6+st1+st2+st3+st4+st5+lt1+lt2),"s")
c = c + 1
print(c,za)
print("!!!!!手动停止!!!!!")
break
print("共计耗费体力",(c-1)*6,"寿司")
single = 0
T1 = 0
c = 1
[img]file:///C:/Users/Administrator/Desktop/78@5Z7CLS$6CH@0%25%5B@P4K10.png[/img] |
|