Jump to content

Coding Help Runescape Bot


Recommended Posts

Disclaimer My last post got taken down for not being about "Game automation." maybe i didn't explain it well enough

 

I am coding a thieving bot for a runescape private server called "Spawnpk" there is a stall where you click and get money. Randomly at times the game will teleport you away from this stall you click on. I am using pixel search to click on the stall, but once i get teleported the range between me and the stall make it so the script can't find the pixel. The solution i have is once the pixel search stopped clicking the mouse, the script would move and click  an area on the minimap and move closer to the stall so the pixelsearch could find the pixel. Here is my code:

$left = 1079
$top = 34
$right = 1906
$bottom = 611

$color = 0xEFD21E

HotKeySet("{f1}", "myExit")

while(1)
   WinActivate("[V93] SpawnPK")
   $pix = PixelSearch($left, $top, $right, $bottom, $color, 1)

   if not(@error) Then
      MouseClick("left",$pix[0],$pix[1],1,1)
   EndIf
   if int(@error) Then
      Mousemove ( 1826, 119 [, speed = 10] )
   EndIf
WEnd



func myExit()
   Exit
EndFunc

Everything works until the second if statement, i get confused from there. Can anyone help me please

 

Link to comment
Share on other sites

  • Developers

Well, it seems you haven't read the forumrules yet as we do NOT allow any game automation threads in these forums!

Please read them carefully and do not post another topic about game automation!

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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