Skip to content

Commit 1284e72

Browse files
committed
add README & 調整頻率
1 parent 89e86c8 commit 1284e72

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

README.md

+34-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
1-
# LOL12thBalloon
2-
LOL週年活動搶氣球程式
1+
# LOL12thBalloon - LOL週年活動搶氣球程式
2+
3+
## balloon.exe
4+
仰賴圖片辨識,會因使用者顯示設定而需個別設定
5+
6+
### 環境
7+
- LOL大廳解析度:**1280*720**
8+
- Windows顯示比例:**125%**
9+
- 需以**管理員**身分執行
10+
11+
### 功能
12+
- 爬取Garena新聞下方的最新評論,並輸入序號
13+
- 搶完60顆氣球後自動兌換獎勵(需圖資支持)
14+
- 完成後自動停止並播放通知,大約10分鐘可以搶完60顆氣球
15+
16+
### 個人化
17+
- 若使用者無法和開發環境相同,可自行截圖並替換以下檔案
18+
- confirm.png
19+
- inBox1.png
20+
- inBox2.png
21+
- submit1.png
22+
- submit2.png
23+
24+
## balloonCMD.exe
25+
使用token執行,需自行取得token
26+
27+
### 使用說明
28+
1. 開啟LOL主程式並進入活動頁面
29+
2. 開啟 `C:\Garena\Games\32775\Game\Logs\LeagueClient Logs` 資料夾(請自行依安裝路徑調整)
30+
3. 使用記事本打開最新的_LeagueClient.log文件
31+
![](https://i.imgur.com/B8p9Tp2.png)
32+
4. 在其中搜尋 `https://bargain.lol.garena.tw/?token=`
33+
![](https://i.imgur.com/09ndWug.png)
34+
5. 複製網址貼上到程式中

balloonCMD.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ def getBalloon(token):
7575
time.sleep(0.5)
7676
return True
7777
print("錯誤!{}".format(errDic[res['error']]))
78-
time.sleep(0.1)
78+
time.sleep(0.25)
7979
else:
8080
allAmount = res["enter_code_amount"]
8181
curAmount = res["current_token_amount"]
8282
print("成功!已兌換{}顆氣球,當前擁有{}顆氣球".format(allAmount,curAmount))
8383
countSuccess +=1
84-
time.sleep(0.4)
84+
time.sleep(1)
8585
countSubmit += 1
8686
def redeemBalloon(token,item_id):
8787
url = "https://bargain.lol.garena.tw/api/redeem"
@@ -94,6 +94,7 @@ def redeemBalloon(token,item_id):
9494
resJson = json.loads(res.text)
9595
if 'reward' in resJson.keys():
9696
print("已兌換獎勵:{}".format(resJson['reward']['name']))
97+
time.sleep(0.5)
9798
#else:
9899
# print(resJson)
99100
def Balloon(token):
@@ -106,8 +107,8 @@ def Balloon(token):
106107
if __name__ == '__main__':
107108
token = ""
108109
while(not token):
109-
url = input("請輸入token,或貼上活動頁面「個人數據回顧」中包含token的網址:")
110-
reUrl = re.match(r'https://datareview\.lol\.garena\.tw/.+?token=(.+)', url)
110+
url = input("請輸入token,或貼上包含token的網址:")
111+
reUrl = re.match(r'https://.+?\.lol\.garena\.tw/.+?token=(.+)', url)
111112
token = reUrl.group(1) if reUrl else (url if len(url) == 64 else token)
112113
if token: Balloon(token)
113114

0 commit comments

Comments
 (0)