Coder Social home page Coder Social logo

detectivecode / microbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chsami/microbot

0.0 0.0 0.0 82.97 MB

Open source Runelite botting client

Home Page: https://chsami.github.io/microbot/

License: BSD 2-Clause "Simplified" License

Shell 0.01% C 0.12% Java 99.57% GLSL 0.29% Witcher Script 0.01%

microbot's Introduction

Microbot

Microbot is an opensource automated oldschool runescape client based on runelite. It uses a plugin system to enable scripting. Here is a youtube channel showing off some of the scripts

Youtube Channel

If you have any questions, please join our Discord server.

I Want To Bot

Non jagex account

Here is a youtube video on how to setup the bot from scratch

https://www.youtube.com/watch?v=EbtdZnxq5iw

Jagex Account

If you don't have java installed yet, watch the youtube video: https://www.youtube.com/watch?v=EbtdZnxq5iw

  1. Simply login with the jagex launcher for the first time. This will create a token for your account. Close everything after succesfully login in through the jagex launcher.
  2. Open the shaded.jar from microbot and this should prompt you with the jagex account to login.

Jagex Launcher

If you don't have java installed yet, watch the youtube video: https://www.youtube.com/watch?v=EbtdZnxq5iw

Simply replace the Official RuneLite.jar with the microbot.jar and make sure the name is the same!! After that you can start up the jagex launcher and select runelite, this will startup microbot.

img_2.png

I Want To Develop

First Time Running the project as a Developer?

Make sure to follow this guide if it's your first time running the project

https://github.com/runelite/runelite/wiki/Building-with-IntelliJ-IDEA

Project Layout

Under the Microbot Plugin you'll find a util folder that has all the utility classes which make it easier to interact with the game

Utility Classes are prefixed with Rs2. So for player it is Rs2Player. Npcs is Rs2Npc and so on...

If you can't find a specific thing in a utility class you can always call the Microbot object which has access to every object runelite exposes. So to get the location of a player you can do

Microbot.getClient().getLocalPlayer().getWorldLocation()

img.png

ExampleScript

There is an example script which you can use to play around with the api.

img_1.png

How does the example script look like?

public class ExampleScript extends Script {
public static double version = 1.0;

    public boolean run(ExampleConfig config) {
        Microbot.enableAutoRunOn = false;
        mainScheduledFuture = scheduledExecutorService.scheduleWithFixedDelay(() -> {
            if (!super.run()) return;
            try {
                /*
                 * Important classes:
                 * Inventory
                 * Rs2GameObject
                 * Rs2GroundObject
                 * Rs2NPC
                 * Rs2Bank
                 * etc...
                 */

                long startTime = System.currentTimeMillis();
                
                //YOUR CODE COMES HERE
                Rs2Npc.attack("guard");
                
                long endTime = System.currentTimeMillis();
                long totalTime = endTime - startTime;
                System.out.println("Total time for loop " + totalTime);

            } catch (Exception ex) {
                System.out.println(ex.getMessage());
            }
        }, 0, 2000, TimeUnit.MILLISECONDS);
        return true;
    }

    @Override
    public void shutdown() {
        super.shutdown();
    }
}

All our scripts exist of Config. This is the settings for a specific script Overlay, this is a visual overlay for a specific script Plugin which handles the code for starting and stopping the script Script which handles all of the code the bot has to execute.

Inside the startup of a plugin we can call the script code like this:

@Override
protected void startUp() throws AWTException {
if (overlayManager != null) {
overlayManager.add(exampleOverlay);
}
//CALL YOUR SCRIPT.RUN
exampleScript.run(config);
}

License

RuneLite is licensed under the BSD 2-clause license. See the license header in the respective file to be sure.

microbot's People

Contributors

abextm avatar adam- avatar alexanderhenne avatar alexsuperfly avatar broooklyn avatar bruuhplz avatar chsami avatar deathbeam avatar dekvall avatar devinfrench avatar enriath avatar felanbird avatar griffinboris avatar hyperalch avatar jrod7938 avatar kamielvf avatar llemonduck avatar magicftail avatar melkypie avatar meslewis avatar nightfirecat avatar psikoi avatar raiyni avatar sethtroll avatar thestonedturtle avatar trevor159 avatar trimbe avatar tylerthardy avatar ukmonster avatar wooxsolo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.