Asolidboat

Coding Help Runescape Bot

2 posts in this topic

#1 ·  Posted

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

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.