2
« on: May 05, 2017, 04:21:09 PM »
Кстати, а можешь поделиться свои кодом?
вот моё творчество, осталось пчелу допинать и алгоритм апгрейда сделать вместо тупого клика
// New Script
// Author: Shuraken
// Version: 1.0 (04.05.2017)
// Clicker Heroes
#name "Clicker Heroes"
sub(test_screen, $test_screen_x, $test_screen_y, $test_screen_x1, $test_screen_y1, $start_colormode, $end_colormode)
if ($test_screen_x1 = 0)
$test_screen_x1 = $_xmax
end_if
if ($test_screen_y1 = 0)
$test_screen_y1 = $_ymax
end_if
if ($end_colormode = 0)
$end_colormode = 8
end_if
for($i = $start_colormode, $i < $end_colormode + 1)
getscreen
COLORMODE($i)
print(pxl(1302,572))
SCREENSHOTEX($test_screen_x, $test_screen_y, $test_screen_x1, $test_screen_y1, "test_screen", 0)
end_cyc
end_sub
sub(click)
LCLICK(1445,647) // 8363153
end_sub
sub(check_hp)
GETSCREEN
COLORMODE(7, 1330,932, 1560,932)
$HP = 100 - pxlcount(1330,932, 1560,932, 8355711) / (1560 - 1330) * 100
end_sub
sub(check_next_area)
$shift = 0
getscreen
while((pxl(1552,102) = 39166) | (pxl(1546,102) = 39166))
LCLICK(1547,79)
$shift = 1
waitms(300)
getscreen
end_cyc
if(($shift = 1) & (pxlxor(1380,273, 1403,291) = 9741626))
KEYPRESS(#1)
KEYPRESS(#2)
KEYPRESS(#3)
KEYPRESS(#4)
$start_fight = $_ms
while($_ms - $start_fight < 30*1000)
click()
end_cyc
getscreen
if(pxl(1552,102) = 39166) | (pxl(1546,102) = 39166)
LCLICK(1547,79)
LCLICK(1547,79)
$timer[2] = $check_area_timer
else
wait(1)
LCLICK(1322,75)
$timer[2] = 30*60
end_if
end_if
end_sub
sub(check_fish)
GETSCREEN
COLORMODE(7, 812,451, 1862,951)
IF_PICTURE_IN (812,451, 1862,951, "fish.bmp", 8388479, 100)
LCLICK($_return1, $_return2)
print("Yay!")
end_if
end_sub
sub(check_bee)
GETSCREEN
COLORMODE(7, 1185,129, 1699,129)
$bee = 0
while (PXLXOR(1185,129, 1699,129) ! 8355711)
IF_PIXEL_IN (1185,129, 1699,129, 255)
lclick($_return1, $_return2+10)
$bee = 1
end_if
end_cyc
if ($bee = 1)
KEYPRESS(#4)
KEYPRESS(#5)
end_if
end_sub
sub(event, $event)
switch($event)
case(0)
WHEELDOWN(10)
WHEELDOWN(10)
LCLICK(172,609) // 16710356
LCLICK(172,609) // 16710356
LCLICK(172,609) // 16710356
case(1)
WHEELDOWN(10)
WHEELDOWN(10)
LCLICK(329,634) // 2398418
LCLICK(386,634) // 9815236
LCLICK(445,635) // 11711156
LCLICK(524,640) // 3355443
LCLICK(582,638) // 4551822
LCLICK(645,632) // 9098988
LCLICK(708,635) // 9887215
LCLICK(329,634) // 2398418
LCLICK(386,634) // 9815236
LCLICK(445,635) // 11711156
LCLICK(524,640) // 3355443
LCLICK(582,638) // 4551822
LCLICK(645,632) // 9098988
LCLICK(708,635) // 9887215
LCLICK(329,634) // 2398418
LCLICK(386,634) // 9815236
LCLICK(445,635) // 11711156
LCLICK(524,640) // 3355443
LCLICK(582,638) // 4551822
LCLICK(645,632) // 9098988
LCLICK(708,635) // 9887215
LCLICK(329,634) // 2398418
LCLICK(386,634) // 9815236
LCLICK(445,635) // 11711156
LCLICK(524,640) // 3355443
LCLICK(582,638) // 4551822
LCLICK(645,632) // 9098988
LCLICK(708,635) // 9887215
case(2)
check_next_area()
case(3)
check_fish()
case(4)
check_bee()
end_switch
end_sub
sub(update_timers)
for ($i=0, $i < ARRSIZE($timer))
if (($_ms - $time_arr[$i]) > ($timer[$i] + $timer_base[$i])*1000)
event($i)
$time_arr[$i] = $_ms
end_if
end_cyc
end_sub
$check_area_timer = 1*60
$timer[0] = 100 //жмякать на апгрейд героя
$timer[1] = 100 //жмякать на апгрейд скилов
$timer[2] = $check_area_timer //жмякать на следующую локу
$timer[3] = 1*60 //проверять рыбу
$timer[4] = 10 //проверять пчелу
$timer_base[0] = 0
$timer_base[1] = 0
$timer_base[2] = 0
$timer_base[3] = 0
$timer_base[4] = 0
for ($i=0, $i < ARRSIZE($timer))
$time_arr[$i] = $_ms
end_cyc
while(1)
click()
update_timers()
end_cyc
halt