Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Runescape Scripts


  • Please log in to reply
6 replies to this topic
Anwar
  • Members
  • 15 posts
  • Last active: Sep 11 2013 09:31 PM
  • Joined: 11 Mar 2012

Firstly, I'd like to announce that most RS botting clients are detectable (likely because they use their own client software), and there has been a massive banning spree against bots especially this past week. (There are very few bots left in RS).

 

So, I'd like to make some scripts that utilize the RS client (and simply by color-detection and mouse clicking).

 

My goal is to start off with some simple scripts, and then expand to a larger library.

 

 

Some ideas:

-Cow killing (and looting the hides).

 

 

If there're any other Runescape fans in here, please express your interest and/or ideas.



SnowFlake_FlowSnake
  • Members
  • 845 posts
  • Last active: Jan 24 2016 05:24 PM
  • Joined: 08 Oct 2012

Hi, i use a simple pixelsearch code to chek for cow hides,

 

i will add things like,,If the inv is full it will bank or drop i.

#SingleInstance force
#MaxThreadsPerHotkey 2
#NoEnv
SetBatchLines, -1
toggle = 0 ; Toggle OFF


x:: ; Press X to toggle On/Off
SoundBeep
 ; Random Pauses.
Random,ST, 273,392
Random,SD, 135, 279
Random,MD, 3246, 2982
Random,BD, 8646, 7594


Toggle := !Toggle
While Toggle{
 
    sleep, %ST%

CoordMode, Pixel, Screen
PixelSearch, FoundX, FoundY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, 0xFFFFFF, 0, Fast RGB ; 0xFFFFFF White

If ErrorLevel = 0 ; If Color is found then
 
	Click, %FoundX%, %FoundY% Left, 1 ; Click on it.
    
If ErrorLevel = 1 ; If not Found
{
 Sleep, %MD% ; Pause the search for 3,2 ~ 2,9 sec.
}


V:: ; Restart Script.
Reload

  • Download link of my scripts on Autohotkey.com 2/10/2015 [DOWNLAND]
  • Contact Info:  https://github.com/floowsnaake //  FloowSnaake(A)gmail.com
  • IF you need Help send me a PM,Email or Post on Github

  • Quote by tank  Posted 29 September 2015 - 06:14 PM

  • "Eventually i will find a way to convert the DB back to PHPBB3. but i dont have the bandwidth right now. No one that has tried has had success. It is the Only way i can keep this open is if i could successfully convert it."

Anwar
  • Members
  • 15 posts
  • Last active: Sep 11 2013 09:31 PM
  • Joined: 11 Mar 2012

Looking for a partner to make more scripts!

 

(So far, I made a fishing one).



drmrfrk
  • Members
  • 6 posts
  • Last active: Sep 01 2013 10:17 PM
  • Joined: 14 Aug 2013
I'm definitely up for scripting these. I have a power miner, power woodcutter, auto alch, a somewhat efficient auto attacker, a handful of auto walkers. I'm looking to add banking support soon.

I've ran autoit scripts for dozens of hours without any bans. (autohotkey is an expansion of the autoit scripting language)

drmrfrk
  • Members
  • 6 posts
  • Last active: Sep 01 2013 10:17 PM
  • Joined: 14 Aug 2013

I know it's not the new autohotkey format, it's still in autoit language, but here is my power woodcutter

 

Spoiler
 
 
also 
Spoiler

 

My somewhat work in progress auto attacker  -  Moves mouse inside a rectangular area on screen and 

when it detects the pixel color of the weakness of the enemy you want to attack, it clicks there.  More accurate then 

using a pixel color of the actual npc itself as I have yet to find an area that the environment doesn't include the same color

as the npc you want to attack.  

 

This was tested in the cow pens in taverly.  The cows weakness to water spells has a blue shade that isn't in any of the areas near by.  I haven't had the script mistake environment colors as of yet, so the script hasn't taken the character far from the pen.

 

The script isn't currently working, as it has been edited.  

 

as it stands

 

 

 

func _findattack()
;detect color of the blue pixel of the cows weakness to water spells when it appears.
$px = PixelSearch(162, 271,411, 386,0xE4E6E8,0,1)

If Not @error Then
	_success()
		elseif @error Then
	;optional second color check
	_2ndsearch()
EndIf

EndFunc

func _success()
		;
		$pos = MouseGetPos()
		mouseclick("left",$pos[0],$pos[1],1,1)
		sleep(6450)
EndFunc

func _2ndsearch()
	$px = PixelSearch(179, 175,475, 375,0x818A96,0,1)
	If Not @error Then
	_success()
	elseif @error Then
	_mousemove()
EndIf
EndFunc

;coordinates where you want your mouse to start moving to detect npcs
Global $mousex = 200
Global $mousey = 400
func _mousemove()
	;starts mouse movement to eventually hover over target which will show their weakness
	;weakness to water has a blue color that is best to be used with.
	mousemove($mousex,$mousey,1)
	$mousex = $mousex + 5
	;replace 435 with the X coordinate of the top right corner you want to search within
	;replace 305 with the Y coordinate of the bottom right corner you want to search within

	;when mouse gets outside your specified area, it is reset to the left most area you are searching in
	; and moved down by 5 pixels, of however much you want.
	  if $mousex > 435 Then
		  _movemousedown()
	  elseif $mousey > 305 Then
		  _resetmousepos()
	  EndIf
	  sleep($mousemovedelay)
	  
	;work in progress.  To randomize the movement of the screen to the left and to the right.
	;also can be used to rotate screen to bring more available npc's to attack on screen.
	  Switch @SEC
Case 1 To 1
;sends the left arrow key to window, rotating screen
    send("{left}","")
Case 30 to 30
	send("{right}","")
EndSwitch
  EndFunc
  

  
  ;resets mouse position to 
  func _resetmousepos()
	  $mousex = $mousexmin
	  $mousey = $mouseymin
	  mouseclick("left",629, 424,1,1)
	  ;msgbox("","","in resetmousepos function. $mousex is  " & $mousex & "$mousey is  " & $mousey,"","")
	  
	  EndFunc
  
  
  func _movey()
	   mousemove($mousex,$mousey,1)
	  
	  ;$mousey = $mousey - 5
	  if $mousey > 305 Then
		EndIf
	  _findattack()
  EndFunc

i also prefer to always use the old school interface layout, lowest graphics w/fixed screen size and a function like

 

func _resizers()
   WinMove("[CLASS:SunAwtFrame]", "", 1, 1,810,703,1)
 
EndFunc
 
to always have the runescape downloaded client positioned top left corner and re-sized to 810x703.  This is providing you are running the script with only one client open at the same time.  
 
 
 
 
Edit - 
 
added some to the power woodchopper.  now you start script, chop the tree until it's gone, hover the mouse cursor over where you want the top left corner of the rectangle you want to search in, press alt+d, move mouse to lower right, press alt+f, then move mouse to an area within the rectangle, press alt+g which gets the color of the tree (after the tree has regrown), then script runs indefinitely.  Keep in mind the rectangle you want to search should only be inside the tree trunk.  So in the picture below, I used alt+d & alt+f to set the top left and bottom right corners of the rectangle, then after the tree grew back, I moved the mouse to an area inside the rectangle, pressed alt+g to tell the script to look for that color.
 
pojzb.png
 
 
 
HotKeySet("!d", "gettopleft")
HotKeySet("!f", "getbottomright")
HotKeySet("!g", "getColor") 
Global $topleft
Global $bottomright
Global $color = 0

msgbox("","","press alt+d to set top left corner -- alt+f to set bottom right corner --  alt+g to set color of the tree inside the coordinates previously set)

while 1 =1 
if $color > 0 Then
_choptree()
EndIf

WEnd

Func getColor() 
   $point = MouseGetPos() 
   $color = PixelGetColor($point[0], $point[1]) 
EndFunc

func gettopleft()
   $topleft = MouseGetPos()
EndFunc

func getbottomright()
   $bottomright = MouseGetPos()
   
   EndFunc


func _choptree()
   
   $px3 = PixelSearch($topleft[0],$topleft[1],$bottomright[0],$bottomright[1],$color,0,1)
   If Not @error Then
	   _clickchoptree()
	elseif @error Then
	   _droplogs()
	   EndIf
   
EndFunc


func _clickchoptree()
	
	MouseClick("left", $topleft[0], $topleft[1],1,1)
   
	$sleep3 = random(7000,10000)
	sleep($sleep3)
   
	Switch @SEC
	Case 50 to 60
	   _droplogs()
	   EndSwitch
	  EndFunc


drmrfrk
  • Members
  • 6 posts
  • Last active: Sep 01 2013 10:17 PM
  • Joined: 14 Aug 2013

First working rough draft of a power miner I converted from autoit.

I havent replaced the sleep amounts with
random,output,min,max yet but it's reliable right now





;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; Power Miner ~
; by ~
; drmrfrk ~
; 2013 ~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

; shift+f8 sleeps 15 sec
; shift+f9 terminates script


;~~~~~~~~~~~~~~~~~~~~~~~~~~
; main setup
; Have ore you are power mining on ability bar
; hover mouse over ability bar and press ALT+SHIFT+A
; hover mouse over the rock you want to mine and press ALT+SHIFT+S
;
;
; next 2 steps are to draw a rectangle on screen that we will search
; within to detect if ore is there or not
;
; Move the mouse and Use ALT+SHIFT+D to set the top left corner of the search area
; Move the mouse and Use ALT+SHIFT+F to set the bottom right corner of the search area
; Hover the mouse over some portion of the rock that will disapear after you mine
; it and Use ALT+SHIFT+G to grab the color to search for
;
;
; To start script use ALT+SHIFT+H



CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
;hotkey setup
+f8::
sleep,15000
return

+f9::
exitapp
return


;getability bar pos
+!a::
MouseGetPos, AbilitybarX, AbilitybarY
Global AbilitybarX := AbilitybarX
Global AbilitybarY := AbilitybarY
return

;get ore click pos
+!s::
MouseGetPos, Oreclickx, Oreclicky
Global Oreclickx := Oreclickx
Global Oreclicky := Oreclicky
return


;get top left pos
+!d::
MouseGetPos, Oretopleftx, Oretoplefty
return


;get bottom right pos
+!f::
MouseGetPos, Orebottomleftx, Orebottomlefty
return

+!g::
MouseGetPos, MouseX, MouseY
PixelGetColor, color, %MouseX%, %MouseY%

MsgBox You just set the rock color to %color%
color2 := color
Mousex2 := mousex
mousey2 := mousey
return


+!h::
while 1 = 1
{

PixelSearch, Px, Py, Oretopleftx, Oretoplefty, Orebottomleftx, Orebottomlefty, color, 3, Fast
if ErrorLevel
sleep,200
else
_startmining(Oreclickx,Oreclicky,AbilitybarX, AbilitybarY)
sleep,4000
if A_Sec < 3
{
;safe guard to drop ore by clicking on the ability bar
;if seconds hand of system clock is < 3
click left %Abilitybarx%,%AbilitybarY%
click up left
click left %Abilitybarx%,%AbilitybarY%
click up left
}
}
return



_startmining(x,y,dropx,dropy)
{
click left %x%,%y%
click up left
sleep,300
click left %dropx%,%dropy%
click up left
sleep,300
}

OG_DEV
  • Members
  • 1 posts
  • Last active: Nov 15 2013 03:31 AM
  • Joined: 14 Nov 2013

Hi I just have a few quick questions. well im not really sure how RS can tell when your botting or not? like if im using the desktop one you can download, and then have a seperate program running with an auto clicker, how can they know this?

 

also im terrible with writing scripts, and wanted to change it up. ive been mining in the living rock caverns past few days, and all ive been doing is set an auto clicker to 2 second intervals, and then just be hitting Z+1 at the same time to drop gold, and preset superheat for the next auto click.

 

im sure its a simple script, but i was wondering if someone could help me out, and make one, or some advice.

i just need it to click one spot every 2 seconds or so, and hit "Z" and "1" at the same time every 2 seconds, but offset one second so it actually works lol.

 

i know thats simple enough, jsut all the proper language is gibberish to me.

so anyone willing to help me out would be greatly appreciated.

Thanks!