Poryaei / NotCoin-Clicker

A Python bot and automated clicker for accumulating NotCoins on Telegram.
https://t.me/notcoin_bot
MIT License
103 stars 30 forks source link

Optimization of waiting time #22

Closed BrasD99 closed 8 months ago

BrasD99 commented 9 months ago

Hello!

I decided to share my thoughts about your project. First of all, thank you for your hard work - it's cool that you share this publicly, I respect it.

Your project has a waiting time of 10 minutes, the code:

if getData["data"][0]["availableCoins"] < _sc:
    if not self.readyToClick():
        print('[~] Sleeping For 10MIN')
        self.mining_stats = self._mining_stats[0]
        time.sleep(600)

Many people buy various boosts, including to speed up the recovery time. And stitching for 10 minutes is not the optimal solution... The server returns information about how much "energy" the user currently has, as well as how much "energy" is being restored per second. My suggestion is to use this data. We can wait for the energy to fill up, and then continue clicking.

The proposed method for improving the process:

def fillEnergy(self, lastAvailableCoins, limitCoins, miningPerTime):
    coinsToRecieve = limitCoins - lastAvailableCoins
    waitTime = coinsToRecieve / miningPerTime
    print(f'Filling energy: {waitTime} sec...')
    time.sleep(waitTime)

Thus, each user individually waits for his "energy" to be filled, and then the operations continue.

It is proposed to make edits to the startMin method. All data is available in the getData["data"][0]:

data = getData["data"][0]
if data["availableCoins"] < _sc:
    lastAvailableCoins = data['lastAvailableCoins']
    limitCoins = data['limitCoins']
    miningPerTime = data['miningPerTime']
    self.fillEnergy(lastAvailableCoins, limitCoins, miningPerTime)
Poryaei commented 8 months ago

Hey there, thanks again! Your input will definitely be incorporated into the update