--------------------------------------------------------------------
Code: Select all
pause on
#singleinstance, force
coordmode, mouse, screen
coordmode, pixel, screen
setdefaultmousespeed, 3
;;this only works with bluestacks in full sized windowed mode. not fullscreen
msgbox, 0, 0, Go
Loop
{
Loop 40
{
;get encounter
click, 360, 390
sleep, 300
Click, 360, 390, Left, down ; press the LMD and hold it
Click, 360, 490, Left, 0 ; move the mouse and click zero times (aka, move only)
sleep, 5000
Pixelgetcolor, color, 430, 164
if (color = 0x000000)
{
break
}
}
click, 260, 390
sleep, 2000
;fight encounter
click, 272, 868, 4 ;instinct subsect
sleep, 400
click, 500, 860, 4 ; sharpen ability
sleep, 5500 ;delay for combat scene
loop 4
{
sleep, 2000
click, 260, 930, 4 ;weapons tab
sleep, 400
loop 2
{
click, 500, 860, 4 ;attack
sleep, 5500
}
click, 260, 800, 4 ;control tab
sleep, 400
click, 1050, 900, 1 ;petrify
sleep, 400
click, 260, 930. 4 ;weapons tab
sleep, 500
click, 830, 900, 9 ;heavy hit
sleep, 600
click, 1600, 900, 6 ;go
sleep, 14500
pixelgetcolor, endd, 1064, 71
if (endd = 0x1C1C1C)
{
break
}
pixelgetcolor, gold1, 541, 350 [, RGB]
if (gold1 = 0x000000)
{
break
}
pixelgetcolor, expad1, 1386, 220 [, RGB]
if (expad1 = 0x000000)
{
break
}
}
sleep, 1200
;claim rewards
pixelgetcolor, gold, 716, 360 [, slow RGB]
if (gold = 0x825511)
{
click, 728, 756, 3 ;accept gold 3x offer
}
pixelgetcolor, expad, 1015, 395 [, slow RGB]
if (expad = 0x664D45)
{
click, 728, 756, 3 ;accept exp 3x offer
}
click, 1080, 730, 5 ;skip offer
sleep, 900
click, 1080, 730, 3 ;speed up screen
sleep, 3700
click, 1380, 260, 5 ;close window
sleep, 900
click, 780, 600, 5 ;confirm tossing item drops
sleep, 1400
}
exitapp
!z::exitapp
!8::pause
My first use of pixelgetcolor followed by if(xx){break} works beautifully to break the loop and move onto the next section. None of the rest work at all, and wont break the immediate loop they're a part of when they should be true. I'm using windowspy to track pixel colors at certain mousecoords under the circumstances it should trigger in. The game its for has very simple 2D graphics with no shading or anything so I dont see why this shouldn't be working. Any advice? Thanks.