weclome to ic0de.ws Check here


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SCRIPTING] Runescape macro
#1
Brick 
Hello. This is a little script I wrote in a few minutes.
It's a fair demonstration of how powerful scripting languages can be.


PROGRAM USED: xdotool-gui
PLATFORM USED: Linux

TARGET PROGRAM: Runecape client
GAME LOCATION: Corsair Cave's
USAGE: Strictly educational; not for real-world use

Code:
###############################################################
# FROM BANKER SLOT -- MOVE TO CABIN
move mouse to 654 516
delay 1.0 seconds
click mouse right button for 1 times then delay 1.0 seconds
move mouse to 654 545
delay 1.0 seconds
click mouse left button for 1 times then delay 1.0 seconds
delay 20.0 seconds
###############################################################

###############################################################
# INSIDE THE HUT -- COLLECT x5 TINDER BOXES
move mouse to 914 484
delay 0.5 seconds
###############################################################

###############################################################
# PICK UP Tinderbox #1
click mouse left button for 1 times then delay 4.5 seconds
move mouse to 961 484
delay 0.5 seconds

# PICK UP Tinderboxes #2-5
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
###############################################################

###############################################################
# OPEN THE INVENTORY (to drop all Tinderboxes)
move mouse to 1247 686
click mouse left button for 1 times then delay 2.5 seconds
###############################################################

###############################################################
# DROPPING x5 (1-5) Tinderboxes

# DROP Tinderbox #1
move mouse to 1195 413
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1197 456
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #2
move mouse to 1246 421
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1275 465
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #3
move mouse to 1277 417
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1257 459
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #4
move mouse to 1334 418
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1260 464
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #5
move mouse to 1206 459
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1214 502
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds
###############################################################

###############################################################
# PICK UP Tinderboxes #6-10
move mouse to 961 484
delay 1.0 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
delay 1.0 seconds
###############################################################

###############################################################
# DROPPING x5 (6-11) Tinderboxes

# DROP Tinderbox #6
move mouse to 1195 413
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1197 456
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #7
move mouse to 1246 421
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1275 465
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #8
move mouse to 1277 417
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1257 459
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #9
move mouse to 1334 418
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1260 464
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #10
move mouse to 1206 459
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1214 502
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds
###############################################################

###############################################################
# PICK UP Tinderboxes #11-16
move mouse to 961 484
delay 1.0 seconds
click mouse left button for 1 times then delay 1.0 seconds
click mouse left button for 1 times then delay 1.0 seconds
click mouse left button for 1 times then delay 1.0 seconds
click mouse left button for 1 times then delay 1.0 seconds
click mouse left button for 1 times then delay 1.0 seconds
delay 1.0 seconds
###############################################################

###############################################################
# DROPPING x5 (7-12) Tinderboxes

# DROP Tinderbox #11
move mouse to 1195 413
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1197 456
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #12
move mouse to 1246 421
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1275 465
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #13
move mouse to 1277 417
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1257 459
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #14
move mouse to 1334 418
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1260 464
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #15
move mouse to 1206 459
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1214 502
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds
###############################################################

###############################################################
# PICK UP Tinderboxes #16-21
move mouse to 961 484
delay 1.0 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
delay 1.0 seconds
###############################################################

###############################################################
# DROPPING x5 (12-17) Tinderboxes

# DROP Tinderbox #16
move mouse to 1195 413
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1197 456
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #17
move mouse to 1246 421
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1275 465
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #18
move mouse to 1277 417
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1257 459
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #19
move mouse to 1334 418
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1260 464
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #20
move mouse to 1206 459
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1214 502
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds
###############################################################

###############################################################
# PICK UP Tinderboxes #21-26
move mouse to 961 484
delay 1.0 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
delay 1.0 seconds
###############################################################

###############################################################
# DROPPING x5 (12-17) Tinderboxes

# DROP Tinderbox #21
move mouse to 1195 413
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1197 456
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #22
move mouse to 1246 421
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1275 465
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #23
move mouse to 1277 417
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1257 459
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #24
move mouse to 1334 418
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1260 464
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds

# DROP Tinderbox #25
move mouse to 1206 459
delay 0.1 seconds
click mouse right button for 1 times then delay 0.5 seconds
move mouse to 1214 502
delay 0.1 seconds
click mouse left button for 1 times then delay 0.1 seconds
###############################################################

###############################################################
# PICK UP Tinderboxes #26-28
move mouse to 961 484
delay 1.0 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
delay 1.0 seconds
###############################################################

###############################################################
# PICK UP ALL Tinderboxes FROM THE FLOOR
move mouse to 978 482
delay 0.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
###############################################################

###############################################################
# CLOSING THE INVENTORY TAB
move mouse to 1249 680
delay 0.5 seconds
click mouse left button for 1 times then delay 1.5 seconds
###############################################################

###############################################################
# EXITING THE HUT
move mouse to 1039 486
delay 0.5 seconds
click mouse left button for 1 times then delay 4.5 seconds
###############################################################

###############################################################
# TRAVELING TO THE BANKER
move mouse to 1299 429
delay 0.5 seconds
click mouse right button for 1 times then delay 0.5 seconds

move mouse to 1292 457
delay 0.5 seconds
click mouse left button for 1 times then delay 20.0 seconds
###############################################################

###############################################################
# DEPOSITING TO THE BANKER
move mouse to 1057 543
delay 0.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
###############################################################

###############################################################
# EXITING THE BANKER MENU
move mouse to 1099 251
delay 0.5 seconds
click mouse left button for 1 times then delay 2.5 seconds
###############################################################

In theory: You could generate 500k or more Runescape gold points per hour (500k gp/hr) on the official servers.

This could be improved a lot (as some of the delays are not optimized).
There's also "xdotool" which is much more powerful, but lacks a GUI.

This is a good demonstration of how much more manageable code can become with controlled structures (EG: loops and functions).
Discord moderator
[-] The following 1 user Likes Muted's post:
  • Xyt0
Reply
#2
Description of xdotool-gui
https://jlk.fjfi.cvut.cz/arch/manpages/man/xdotool.1.en
X.Org automation tool,
To simulate keyboard input and mouse clicks
https://unix.stackexchange.com/questions...gui-sessio
Reply
#3
I'm pretty sure it secretly runs on Python3 (based on what htop reports). It's just a front-end interface.
Discord moderator
[-] The following 1 user Likes Muted's post:
  • Xyt0
Reply
#4
I'll rewrite this as a CLI script either tonight or tomorrow and amend a post here.

Ideally it'll demonstrate the major advantages of what a CLI program may offer that a GUI may not (due to reduced complexity cost of being forced into pre-built 'widgets' or 'controls' or whatever else you wish to abstractly refer to common images associated with common behaviorial responses).

A major benefit of this rewrite will be easier management and modification of the script itself!

EG: Dynamic ranges (AABB) and arbitrary range based delays (reduced odds of an anti-botting program from detecting patterns and converging on a 'positive flag' in a finitive time frame).
Discord moderator
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)