Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit 7693a1f

Browse files
authored
Update auto_fight.py
For a more up-to-date version, see https://github.com/e-sim-python/eSim
1 parent f985396 commit 7693a1f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

eSim/Fight/auto_fight.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@
77
from Help_functions.bot_functions import fighting, get_battle_id, location, random_sleep
88
from login import double_click, get_content
99

10+
CHANCE_TO_SKIP_RESTORE = 10 # You can change this number however you like.
11+
1012

1113
async def auto_fight(server, battle_id="", side="attacker", wep="0", food="", gift="", restores="100"):
1214
"""Dumping health at a random time every restore"""
1315
URL = f"https://{server}.e-sim.org/"
1416
restores_left = int(restores)
1517
for _ in range(int(restores)):
18+
if randint(1, 100) <= CHANCE_TO_SKIP_RESTORE:
19+
await asyncio.sleep(600)
1620
restores_left -= 1
1721
try:
1822
if not str(battle_id).replace("0", "").isdigit():

0 commit comments

Comments
 (0)