vap0r01 / RollercoinBot

Bot to play Rollercoin Games
30 stars 33 forks source link

Trying add CoinClick support, need help #9

Open ValoWaking opened 3 years ago

ValoWaking commented 3 years ago

Hi im trying to add CoinClick support and bot didnt want to start, so i need help:

class BotCoinClick:

def __init__(self):
    self.start_img_path = "rc_items/CoinClick_gameimg.png"
    self.game = "CoinClick"

def play(self):
    start_game(self.start_img_path)
    start_game_msg(self.game)
    self.run_game()
    end_game()

def run_game(self):
    while check_image("rc_items/bitcoin_droppingcoin.png"):
    click_image("rc_items/bitcoin_droppingcoin.png")
SteidleR commented 3 years ago

Too few information to help you. Does 'coinclick_gameimg.png' exist and has the correct scale? Added BotCoinClick().play() to the main function? What you mean with 'didn't want to start'? Is the Game on the games page clicked and it doesn't click on 'Start Game' or does it just not find the template on the main game page?

Sorry for the many questions ;D but i need more information

ValoWaking commented 3 years ago

No, i mean that the command prompt is closed in few seconds... Now i fixed it. At this moment bot is enter to the game, but didn't want to click the coins, and mouse cursor doesn't move

`class BotCoinClick: def init(self): self.start_img_path = "rc_items/CoinClick_gameimg.png" self.game = "CoinClick"

def play(self):
    start_game(self.start_img_path)
    start_game_msg(self.game)
    self.run_game()
    end_game()

def run_game(self):
    while not check_image("rc_items/gain_power.png"):
        if check_image("rc_items/bitcoin_droppingcoin.png"):
              click_image("rc_items/bitcoin_droppingcoin.png")
        if check_image("rc_items/dashcoin_droppingcoin.png"):
              click_image("rc_items/dashcoin_droppingcoin.png")
        if check_image("rc_items/dogecoin_droppingcoin.png"):
              click_image("rc_items/dogecoin_droppingcoin.png")
        if check_image("rc_items/litecoin_droppingcoin.png"):
              click_image("rc_items/litecoin_droppingcoin.png")

def main(): global GAME_NUM while True: GAME_NUM += 1 BotCoinClick().play() time.sleep(20)`

ValoWaking commented 3 years ago

Try it by your self

dashcoin_droppingcoin dogecoin_droppingcoin litecoin_droppingcoin bitcoin_droppingcoin

ValoWaking commented 3 years ago

also try this bitcoin_droppingcoin dashcoin_droppingcoin dogecoin_droppingcoin litecoin_droppingcoin

SteidleR commented 3 years ago

I've already tested to implement this a few weeks ago but my implementation was too slow. The coins are moving way too fast so the template matching can't recognize this. maybe you have to implement a other method to check if there is a coin to click. Maybe you could achieve this by using some color recognition at a given position or column? Please let me know if you could come up with some working bot. I'm currently developing the coinflip bot and after that i will look at coin click

ValoWaking commented 3 years ago

Yeah, i think about this. OpenCV is create new screenshots so slowly...

ValoWaking commented 3 years ago

And today I have message "System is detect you a bot" ))) but account still not banned

SteidleR commented 3 years ago

Ok this is interesting ;) I've run this bot 20hours and without any message. But no ban is good

ValoWaking commented 3 years ago

Did u try to compile Rollercoin-Automation on c#?

SteidleR commented 3 years ago

no

jonnytracker commented 3 years ago

i have submitted working coin click game i created ..

SteidleR commented 3 years ago

Nice, thanks! I will merge that and restructure the code a bit to get it working with the current bot

SteidleR commented 3 years ago

@blcx Sry but i couldnt get your code to run correctly. The doge coins won't get clicked. Maybe you could work on your code and contribute to it (I have it on the branch 'coinclick'). It would be really nice if you could get it to run.

jonnytracker commented 3 years ago

I will away few days from my computer and will check it when im back ..

The issue:

  1. it is hard coded for my screen HD , please make sure there is no font magnifying or other screen magnification.
  2. Is it at least clicking the menu and game start button ? If so then it probably is the region box issue due to different screen size

Anyway il take a look when im back. Thank you

SteidleR commented 3 years ago

menu and start button are clicked, some of the coins are also clicked