Jump to content

Recommended Posts

Posted (edited)

MY script is below.  Basically I do not want Func _fight2 to interrupt or insert itself in Func _Bash If I hit the hotkey for it before the other ends.  Is there a command to let only one function run at a time?

 

 
Func _Bash()
 HotKeySet("{F4}")
$Swap = PixelSearch(800, 1037, 800, 1037, $color1,1, 1, $wgh)  ;#1CD
If (IsArray($Swap) = 1) Then
MouseClick ("LEFT")
Sleep (150)
Send ("{0}")
Sleep (500)
else
MouseClick ("LEFT")
Sleep (200)
Send ("{1}")
Sleep (1000)
endif
HotKeySet("{F4}","_Bash")
EndFunc
 
Func _Fight2()
 HotKeySet("{F8}")
$Swap = PixelSearch(800, 1037, 800, 1037, $color1,1, 1, $wgh)  ;#1CD
If (IsArray($Swap) = 1) Then
MouseClick ("LEFT")
Sleep (150)
Send ("{2}")
Sleep (500)
else
MouseClick ("LEFT")
Sleep (200)
Send ("{2}")
Sleep (1000)
endif
HotKeySet("{F8}","_Fight2")
EndFunc
Edited by Melba23
Added code tags
  • Moderators
Posted

Mazdryk,

When you last posted a gamebot script I warned you what would happen - so take a week off to read the Forum rules (there is also a link at bottom right of each page) and understand that we enforce them rigidly. Thread locked. :naughty:

M23

P.S. And if you do return, learn that when you post code you should use Code tags - see here how to do it. Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. ;)

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...