Sign in to follow this  
Followers 0
Iceband

Need a little help with a problem

2 posts in this topic

Hey guys, I wrote this one from scratch but its spitting out an error at the first line of the actual script, telling me that $svar1 isnt set, even though its set globally above.

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused

HotKeySet("{PAUSE}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

#include <Misc.au3>

#requireadmin ;this may be needed to fix some issues with Vista and overly tight security

;;;; Body of program would go here ;;;

sleep ( 5000 )

SplashTextOn("ryanbot setup", "please click player one healbar where you want healing to start ", 400, 100, -1, -1, 0, "Ariel", 15)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

sleep ( 100 )

ExitLoop

EndIf

WEnd

SplashOff()

$res1 = $pos[0]

$res2 = $pos[1]

$var1 = Pixelgetcolor ($res1 , $res2 )

Sleep ( 1000 )

;;;; Body of program would go here ;;;;

SplashTextOn("ryanbot setup", "please click player one healbar to far left for cures ", 400, 100, -1, -1, 0, "Ariel", 15)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$res3 = $pos[0]

$res4 = $pos[1]

$var2 = Pixelgetcolor ($res3 , $res4 )

Sleep ( 1000 )

;;;; Body of program would go here ;;;;

SplashTextOn("ryanbot setup", "please click player YOUR healbar where you want healing to start ", 400, 100, -1, -1, 0, "Ariel", 15)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$res5 = $pos[0]

$res6 = $pos[1]

$var3 = Pixelgetcolor ($res5 , $res6 )

Sleep ( 1000 )

;;;; Body of program would go here ;;;;

SplashTextOn("ryanbot setup", "please click YOU healbar to far left for cures", 400, 100, -1, -1, 0, "Ariel", 15)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$res7 = $pos[0]

$res8 = $pos[1]

$var4 = Pixelgetcolor ($res7 , $res8 )

Sleep ( 1000 )

;;;; Body of program would go here ;;;;

SplashTextOn("ryanbot setup", "click the center of the smiley face ", 400, 100, -1, -1, 0, "Ariel", 15)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$res9 = $pos[0]

$res10 = $pos[1]

$var5 = Pixelgetcolor ($res9 , $res10 )

Sleep ( 1000 )

;;;; Body of program would go here ;;;;

Sleep("1000")

SplashTextOn("ryanbot setup", "click the center of the heart", 400, 100, -1, -1, 0, "Ariel", 15)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$res11 = $pos[0]

$res12 = $pos[1]

$var6 = Pixelgetcolor ($res11 , $res12 )

Sleep ( 1000 )

;;;; Body of program would go here ;;;;

SplashTextOn("ryanbot setup", "please click the WHITE part in the word following ", 400, 100, -1, -1, 0, "Ariel", 15)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$res13 = $pos[0]

$res14 = $pos[1]

$var7 = Pixelgetcolor ($res13 , $res14 )

Sleep ( 1000 )

While 1

$coord = PixelSearch( $res1, $res2, $res1, $res2, $svar1 )

If Not @error Then

sleep ( 100 )

ElseIf $coord = PixelSearch( $res3, $res4, $res3, $res4, $svar2 ) then

Send ( "1" )

sleep ( 500 )

send ( "6" )

Else

Send ( "1" )

sleep ( 500 )

Send ( "3" )

sleep ( 100 )

Send ( "3" )

sleep ( 4000 )

EndIf

$coord = PixelSearch( $res5, $res6, $res5, $res6, $svar3 )

If Not @error Then

sleep ( 100 )

Elseif $coord = PixelSearch( $res7, $res8, $res7, $res8, $svar4 ) then

Send ( "2" )

sleep ( 500 )

send ( "6" )

Else

Send ( "2" )

sleep ( 500 )

Send ( "3" )

sleep ( 100 )

Send ( "3" )

sleep ( 100 )

Send ( "3" )

sleep ( 4000 )

EndIf

$coord = PixelSearch( $res9, $res10, $res9, $res10, $svar5 )

If @error Then

sleep ( 100 )

Else

send ( "7" )

sleep ( 30000 )

send ( "7" )

EndIf

$coord = PixelSearch( $res11, $res12, $res11, $res12, $svar6 )

If Not @error Then

sleep ( 100 )

Else

Send ( "9" )

sleep ( 100 )

EndIf

$coord = PixelSearch( $res13, $res14, $res13, $res14, $svar7 )

If not @error Then

sleep ( 100 )

Else

Send ( "6" )

sleep ( 250 )

send ( "9" )

sleep ( 100 )

EndIf

WEnd

;;;;;;;;

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

ToolTip('Script is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

EndFunc

Share this post


Link to post
Share on other sites



$svar1 is not the same as $var1

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  
Followers 0