Sign in to follow this  
Followers 0
6105

bad script

3 posts in this topic

#1 ·  Posted (edited)

after kill the monster script or stop or just click in 1 coord and dont stop.. if i pres stop or pause he dont stop click click and click... i can only restart computer :D help plz to find mistake

if i use WinWhait("window..") he spame in all windows too(((

Global $Paused
HotKeySet("{F1}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

$her = PixelSearch( 200, 120, 940, 370, 0xFFFFFF ) 
$box = PixelSearch( 200, 120, 940, 370, 0xBBB083 )
$rat = PixelSearch( 200, 120, 940, 370, 0xFEAE2C ) 

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

While 1

 $hl = $her[0]-50
 $ht = $her[1]-50
 $hr = $her[0]+50
 $hb = $her[1]+50
 $radar = PixelSearch( $hl, $ht, $hr, $hb, 0xFEAE2C )
 If Not @error Then
     Send("{SHIFTDOWN}")
     MouseClick("left", $radar[0]+30, $radar[1]+15)
     Send("{SHIFTUP}")
     Send("e")
     Sleep(2000)
 Else
     Radar2()
 EndIf
WEnd

Func Radar2()
 $hl = $her[0]-100
 $ht = $her[1]-100
 $hr = $her[0]+100
 $hb = $her[1]+100
 $radar = PixelSearch( $hl, $ht, $hr, $hb, 0xFEAE2C )
 If Not @error Then
     Send("{SHIFTDOWN}")
     MouseClick("left", $radar[0]+30, $radar[1]+15)
     Send("{SHIFTUP}")
     Send("e")
     Sleep(2000)
 Else
     Radar3()
 EndIf
EndFunc

Func Radar3()
 $hl = $her[0]-150
 $ht = $her[1]-150
 $hr = $her[0]+150
 $hb = $her[1]+150
 $radar = PixelSearch( $hl, $ht, $hr, $hb, 0xFEAE2C )
  If Not @error Then
     Send("{SHIFTDOWN}")
     MouseClick("left", $radar[0]+30, $radar[1]+15)
     Send("{SHIFTUP}")
     Send("e")
     Sleep(2000)
 Else
     Radar4()
 EndIf
EndFunc

Func Radar4()
 $hl = $her[0]-200
 $ht = $her[1]-200
 $hr = $her[0]+200
 $hb = $her[1]+200
 $radar = PixelSearch( $hl, $ht, $hr, $hb, 0xFEAE2C )
 If Not @error Then
     Send("{SHIFTDOWN}")
     MouseClick("left", $radar[0]+30, $radar[1]+15)
     Send("{SHIFTUP}")
     Send("e")
     Sleep(2000)
 Else
     Radar5()
 EndIf
EndFunc

Func Radar5()
 $hl = $her[0]-250
 $ht = $her[1]-250
 $hr = $her[0]+250
 $hb = $her[1]+250
 $radar = PixelSearch( $hl, $ht, $hr, $hb, 0xFEAE2C )
 If Not @error Then
     Send("{SHIFTDOWN}")
     MouseClick("left", $radar[0]+30, $radar[1]+15)
     Send("{SHIFTUP}")
     Send("e")
     Sleep(2000)
 Else
     Radar6()
 EndIf
EndFunc

Func Radar6()
 $hl = $her[0]-300
 $ht = $her[1]-300
 $hr = $her[0]+300
 $hb = $her[1]+300
 $radar = PixelSearch( $hl, $ht, $hr, $hb, 0xFEAE2C )
 If Not @error Then
     Send("{SHIFTDOWN}")
     MouseClick("left", $radar[0]+30, $radar[1]+15)
     Send("{SHIFTUP}")
     Send("e")
     Sleep(2000)
 Else
     Send("{SHIFTDOWN}")
     MouseClick("left", $rat[0]-20, $rat[1]-10)
     Send("{SHIFTUP}")
 EndIf
EndFunc
Edited by toader

[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

Share this post


Link to post
Share on other sites



the problem is your infinite loop... and put a Sleep(10) inside

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

the problem is your infinite loop... and put a Sleep(10) inside

i dont understand where put Sleep inside.. i puts in all places sleep(( sry for this question but im newby :D

here?:

While 1
 Sleep(10)
 $hl = $her[0]-50
 $ht = $her[1]-50
 $hr = $her[0]+50
 $hb = $her[1]+50
 $radar = PixelSearch( $hl, $ht, $hr, $hb, 0xFEAE2C )
 If Not @error Then
     Send("{SHIFTDOWN}")
     MouseClick("left", $radar[0]+30, $radar[1]+15)
     Send("{SHIFTUP}")
     Send("e")
     Sleep(2000)
 Else
     Radar2()
 EndIf
WEnd
Edited by toader

[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

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