Python实现LOL英雄联盟 云顶之弈 24h自动化挂机刷代币 超简单代码实现

前言

LOL正值2023世界赛期间,推出全新通行证。

新通行证双至臻皮肤精美无比,但是,想要拥有双至臻,那就意味着要4000代币,属实是非常难肝,特别是50级以后每级400分才20代币,获得少且付出时间多,不经意间我就好奇怎么才能完成这个“无尽任务”,点进公告,发现规则如下:

分多的肯定是55和大乱斗,以及限时游戏模式(如:无限活力,极限闪击等)。

但是!

靠自己打肯定是累到无与伦比的!

那么!

如果他能自动进行游戏,我岂不是轻松很多?

可是!

上述三种模式如果采取挂机,那肯定会有种自己挂着挂着户口本就越来越薄的错觉……

然而!

这里还有一种游戏模式。

没错!

云顶之弈!在这个八人各自为战的模式里,其他人只会因为你的挂机而沾沾自喜,而我们又站着就把钱挣了,何乐而不为呢?

于是!

我开始了解放双手的战争…………

好了,废话不多说,代码如下,(如果有用,还请回来点个爱心 ^ ^ )

import time
import pyautogui

#准备时间
time.sleep(6)

while True:
    # 找到开始游戏按钮并点击
    start_button = pyautogui.locateCenterOnScreen('start_button.png',confidence=0.7)
    if start_button:
        pyautogui.click(start_button)

    # 找到接受游戏按钮并点击
    accept_button = pyautogui.locateCenterOnScreen('accept_button.png',confidence=0.7)
    if accept_button:
        pyautogui.click(accept_button)

    # 找到结束游戏按钮并点击
    end_game = pyautogui.locateCenterOnScreen('end_game.png',confidence=0.7)
    if end_game:
        pyautogui.moveTo(x=959, y=565)
        pyautogui.mouseDown()
        pyautogui.mouseUp()

    # 找到再玩一次按钮并点击
    again_button = pyautogui.locateCenterOnScreen('again_button.png',confidence=0.7)
    if again_button:
        pyautogui.click(again_button)

具体操作:

运行代码,然后在6s内将LOL客户端调至如下画面:

 

然后,去做你爱做的事情吧,但是别忘了客户端放至最上层…………(不然捉捕不到肯定就无法继续了。。。。) 

PS:推荐客户端调成窗口化,目前还没测试全屏和无边框能否正常运行(理论可以。。。)

  • 5
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
以下是一个基于Python的Eth代币转账实现代码示例,需要使用web3.py库: ```python from web3 import Web3 import json # 1. 连接到以太坊节点 web3 = Web3(Web3.HTTPProvider('https://mainnet.infura.io/v3/{your-infura-project-id}')) # 2. 加载代币合约ABI with open('abi.json', 'r') as abi_definition: abi = json.load(abi_definition) # 3. 获取代币合约 contract_address = '0x1234567890123456789012345678901234567890' contract = web3.eth.contract(address=contract_address, abi=abi) # 4. 发送代币转账交易 token_sender_address = '0x1234567890123456789012345678901234567890' token_sender_private_key = '{your-private-key}' token_receiver_address = '0x0987654321098765432109876543210987654321' token_amount = 1000 gas_limit = 100000 gas_price = web3.toWei('20', 'gwei') # 获取nonce值 nonce = web3.eth.getTransactionCount(token_sender_address) # 构造交易数据 transaction = { 'nonce': nonce, 'to': contract_address, 'value': 0, 'gas': gas_limit, 'gasPrice': gas_price, 'data': contract.functions.transfer(token_receiver_address, token_amount).buildTransaction({'from': token_sender_address}).hex(), } # 对交易进行签名 signed_txn = web3.eth.account.signTransaction(transaction, private_key=token_sender_private_key) # 发送交易 tx_hash = web3.eth.sendRawTransaction(signed_txn.rawTransaction) # 等待交易被打包 tx_receipt = web3.eth.waitForTransactionReceipt(tx_hash) # 打印交易信息 print(f'Transaction sent: {tx_hash.hex()}') print(f'Transaction receipt: {tx_receipt}') ``` 其中,需要将代码中的以下参数替换为实际的值: - `{your-infura-project-id}`:Infura项目ID - `abi.json`:代币合约ABI文件路径 - `contract_address`:代币合约地址 - `token_sender_address`:代币发送者地址 - `token_sender_private_key`:代币发送者私钥 - `token_receiver_address`:代币接收者地址 - `token_amount`:代币数量 - `gas_limit`:交易的gas限制 - `gas_price`:交易的gas价格 需要注意的是,这只是一个简单的示例代码,实际使用中需要根据具体情况进行调整和完善。同时,在使用时需要非常小心,以免出现错误导致代币丢失。建议在测试环境中进行充分的测试,确保代码的正确性和安全性。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值