clickingbad icon indicating copy to clipboard operation
clickingbad copied to clipboard

Money "duplication"

Open ghost opened this issue 11 years ago • 2 comments

This bug requires an auto-clicker capable of clicking, at least, 150 times per second. Amass enough money to buy two of any laundering service. Activate the auto-clicker while the mouse is above the sell button, then quickly move to the buy button, and back to the sell button. The time spent on the Buy button should be in the range of a quarter of a second. Make sure to sell all of the laundering services. Repeatedly doing this with proper timing can cause you to end with more money than you started.

ghost avatar Nov 24 '13 23:11 ghost

I can confirm this bug happens on Chrome 31.0.1650.57 m and Firefox 25.0.1.

This appears to be a race condition between the buy_bank()/sell_bank() functions and the ticks() function. A fast enough clicker program can click the Purchase/Sell button faster than the game invokes the tick() function, resulting in selling the nth item for the (n+1)th amount or buying the nth item for the (n-1)th amount.

I believe the fix would be to invoke fix_banks() at the end of buy_bank() and sell_bank(). I looked at the other buy_ and sell_ functions; buy_clicker(), buy_seller() and buy_upgrade() already call their corresponding fix functions. The other two sell_ functions don't, so perhaps you should add fix_sellers() to sell_seller() and fix_clickers() to sell_clicker() as well?

montesse avatar Nov 29 '13 20:11 montesse

The game "refreshes" every 100ms, so if you can get an auto-clicker to click twice within that 100ms time period, then you will get the duplication bug. It's really early in Perth at the moment, so don't hold me to this, but the bug should work for every button that is clickable.

I'll write a commit up now to insert @montesse corrections and hopefully it will be incorporated.

jwalt333 avatar Nov 30 '13 01:11 jwalt333