File tree Expand file tree Collapse file tree 3 files changed +27
-5
lines changed Expand file tree Collapse file tree 3 files changed +27
-5
lines changed Original file line number Diff line number Diff line change 22___
33A simple autoclicker for blum drop mini-game on python (autoclicker collects ** $dogs** )
44
5- ### Halloween mode:
6- - run ` main.py --halloween ` to enable halloween mode (bot will collect pumpkins and bombs)
5+ ### Elections mode:
6+ - run ` main.py --elections ` to enable elections mode
77
88## Usage
99 - Start tg app, then ` main.py ` and press play
Original file line number Diff line number Diff line change 44 so i located triggers on mine and devided it by window size on my pc,
55 in game this coefficients are multiplied by actual window size to get correct coordinates"""
66HALLOWEEN_MODE = '--halloween' in sys .argv
7+ ELECTIONS_MODE = '--elections' in sys .argv
78DOGS_DROP_TOGGLE = '--disable-dogs' not in sys .argv
89
910CLICK_LIMIT = 1.0
4041 "green" :{"min" :125 , "max" :135 },
4142 "blue" :{"min" :125 , "max" :135 }}
4243
44+ #Election
45+ ELECTIONS_COLOR_TRIGGERS = [
46+ {
47+ "red" :{"min" :250 , "max" :255 },
48+ "green" :{"min" :130 , "max" :140 },
49+ "blue" :{"min" :90 , "max" :105 }
50+ },
51+ {
52+ "red" :{"min" :220 , "max" :230 },
53+ "green" :{"min" :160 , "max" :175 },
54+ "blue" :{"min" :125 , "max" :135 }
55+ }
56+ ]
57+
4358
4459HELP_STRING = \
4560"""
4863Options:
4964 --help - show this string
5065 --halloween - enable halloween mode
66+ --elections - enable elections mode
5167 --disable-dogs - don't collect dogs
5268 --click-limit=n - limit clicks (Example: --click-limit=0.05, only 5% of clicks)
5369
Original file line number Diff line number Diff line change 1515from constants import (
1616 CLICK_LIMIT ,
1717 HELP_STRING ,
18+ ELECTIONS_MODE ,
1819 HALLOWEEN_MODE ,
1920 DOGS_DROP_TOGGLE ,
2021 AVG_GAME_DURATION ,
2526 DEFAULT_COLOR_TRIGGER ,
2627 DOGS_WHITE_COLOR_RANGE ,
2728 HALLOWEEN_COLOR_TRIGGER ,
29+ ELECTIONS_COLOR_TRIGGERS ,
2830)
2931
3032
@@ -53,8 +55,8 @@ def check_running(frame, application_bbox) -> bool:
5355def check_object (frame , x :int , y :int ) -> bool :
5456 """ Finding dropping objects by color """
5557
56- def _check_color_trigger (color_trigger ):
57- if random .random () > CLICK_LIMIT :
58+ def _check_color_trigger (color_trigger , limit : bool = True ):
59+ if not limit and random .random () > CLICK_LIMIT :
5860 return False
5961
6062 if color_trigger ['red' ]['min' ] <= frame [y ][x ][0 ] <= color_trigger ['red' ]['max' ]:
@@ -71,8 +73,12 @@ def _check_color_trigger(color_trigger):
7173 if _check_color_trigger (DEFAULT_COLOR_TRIGGER ):
7274 return True
7375
74- #DOGS DROP
76+ if ELECTIONS_MODE :
77+ for color_trigger in ELECTIONS_COLOR_TRIGGERS :
78+ if _check_color_trigger (color_trigger , False ):
79+ return True
7580
81+ #DOGS DROP
7682 if DOGS_DROP_TOGGLE :
7783 if frame [y ][x ][0 ] == frame [y ][x ][1 ] == frame [y ][x ][2 ] and DOGS_WHITE_COLOR_RANGE [0 ] <= frame [y ][x ][0 ] <= DOGS_WHITE_COLOR_RANGE [1 ]:
7884 counter = 0
You can’t perform that action at this time.
0 commit comments