Jump to content
Sign in to follow this  
PcExpert

This script doesn't work

Recommended Posts

This is the script that doesn't work:

HotKeySet("{F1}", "begin")

Sleep(9999999)

func begin()
WinWaitActive("Habbo ~ Habbo Hotel - ")


Sleep(400)

$x = 435
$y = 291
$Color = 0x313031

While 1
If PixelGetColor($x, $y) = NOT $Color Then exitloop
sleep(10)
Wend

MyFunction()

EndFunc



Func MyFunction()
MouseClick("left", 430, 284, 1)
MouseClick("left", 827, 614, 1)
EndFunc

The problem is that this line doesn't work:

If PixelGetColor($x, $y) = NOT $Color Then exitloop

Share this post


Link to post
Share on other sites

I know but you must activate the script with a hotkey

The current code:

HotKeySet("{F1}", "begin")

Sleep(9999999)

func begin()
WinWaitActive("Habbo ~ Habbo Hotel - ")


Sleep(400)

$x = 437
$y = 326
$Color = 0x181818

While 1
If PixelGetColor($x, $y) = Not $Color Then ExitLoop
sleep(10)
Wend

MyFunction()

EndFunc



Func MyFunction()
MouseClick("left", 430, 330, 1)
MouseClick("left", 821, 643, 1)
EndFunc
Edited by PcExpert

Share this post


Link to post
Share on other sites

HotKeySet("{F1}", "begin")

While 1
Sleep(10)
Wend

func begin()
WinWaitActive("Habbo ~ Habbo Hotel - ")

Sleep(400)

$x = 437
$y = 326
$Color = 0x181818

While PixelGetColor($x, $y) = $Color
sleep(10)
Wend

MyFunction()

EndFunc

Func MyFunction()
MouseClick("left", 430, 330, 1)
MouseClick("left", 821, 643, 1)
EndFunc

Edited by w0uter

Share this post


Link to post
Share on other sites

This is the current code:

HotKeySet("{F1}", "begin")

While 1

Sleep(10)

Wend

func begin()

WinWaitActive("Habbo ~ Habbo Hotel - ")

Sleep(400)

$x = 437

$y = 326

$Color = 0x181818

While PixelGetColor($x, $y) = $Color

sleep(10)

Wend

MyFunction()

EndFunc

Func MyFunction()

MouseClick("left", 430, 330, 1)

MouseClick("left", 821, 643, 1)

EndFunc

But how to repeat the detection of the color?

Edited by PcExpert

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...