How to Make a Runescape Bot Script in Python

This tutorial provides a simple Python scripting guide for creating a bot in Runescape. While some may refer to it as an autoclicker rather than a bot, the terms are interchangeable. No prior knowledge of Python is required, making this guide beginner-friendly.

The script itself is very simple, consisting of fewer than 10 lines of code that automate basic tasks. However, it’s important to keep expectations realistic, as this method has limitations.

Runescape includes many skills that require minimal interaction, making this type of script useful for activities such as cooking, smithing, thieving, fletching, and mining. While you can expand the script later, starting simple helps reduce mistakes.

As a beginner, mistakes are common. This type of script carries a risk of getting your account banned, and experience is the only way to improve. Even if a skill is AFK-friendly, that doesn’t mean it’s safe to automate. For that reason, avoid using this on your main account.

Before creating your bot, consider using a fresh account that you don’t mind losing. Using a VPN is also recommended to reduce the risk of chain bans. This method works for both Old School Runescape and Runescape 3, but Runescape 3 is generally more suitable due to its AFK-friendly gameplay.

This script is best used for a single account. Running it on multiple accounts often leads to poor results. It’s mainly useful for players with limited time who want to automate repetitive tasks.

Keep in mind that most of the Runescape community is strongly against botting. The game’s anti-cheat systems can detect automation and issue bans quickly. Even running a script for a couple of hours or performing too many clicks in a short time can trigger detection.

New users often make mistakes and get caught. If you explore other scripts online, treat them as learning material rather than tools to run directly.

Requirements

  • Python 3.5 or higher
  • pyautogui module

The pyautogui module allows your script to control the mouse and interact with the screen.

Getting Mouse Position

import pyautogui
x = pyautogui.position()
print(x)

This script retrieves your mouse position (X and Y coordinates), which is necessary for clicking on specific areas of the screen.

Example output:

Point(x=538, y=304)

Clicking on the Screen

import pyautogui
x = 538
y = 304
pyautogui.click(x, y)

This code moves the mouse to the specified position and performs a click.

Adding Delay with Time Sleep

import pyautogui
import time

pyautogui.click(538, 304)
time.sleep(20)
pyautogui.click(1124, 824)

This allows your script to wait before performing the next action.

Adding Random Delay

import pyautogui
import time
import random

pyautogui.click(538, 304)
time.sleep(random.randint(20, 25))
pyautogui.click(1124, 824)

Random delays make the script less predictable.

Looping the Script

Run the script a fixed number of times:

x = 0
while x < 12:
    pyautogui.click(1154, 442)
    time.sleep(50)
    x += 1

Run the script indefinitely:

while True:
    pyautogui.click(1534, 596)
    time.sleep(random.randint(4, 7))

Conclusion

This tutorial covers the basics of creating a simple Python autoclicker. While it can automate repetitive tasks, it comes with risks. Use it carefully and continue learning to improve your scripts.

This article is a work in progress and will be expanded with more examples in the future.

Kinguin. Everybody plays. Special offers everyday.