Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved Starting Writing Scripts

Joined
Apr 5, 2015
Messages
297
Hey! I'm a first year comp sci/SENG major in uni, and this semester we're programming in Java.

I'm wondering if someone could ELI5 what/how far I need to know in the course, to successfully program scripts for runemate. I'm super eager, but I don't know where to start, or even how much Java I need to know before I can start.

Also, could someone ELI5 why writing runemate bots is easier/better then, say, Simba? Thanks!
 
12 year old normie
Joined
Jan 8, 2015
Messages
2,769
Basic knowledge is good enough, you'll learn more advanced stuff on the way. Stuff like variables, arrays, loops are almost required to know of.

Code:
package com.bertrand.bots.test;

import com.runemate.game.api.hybrid.entities.Npc;
import com.runemate.game.api.hybrid.region.Npcs;
import com.runemate.game.api.script.Execution;
import com.runemate.game.api.script.framework.LoopingScript;

/**
* Created by Bertrand on 18-01-2016.
* Test bot
*/

public class test extends LoopingScript {
   
    @Override
    public void onStart(String... args) {
        setLoopDelay(300, 600); //sets loop delay, high = lower resources, low = lots of resources
    }

    @Override
    public void onLoop() {
        Npc man = Npcs.newQuery().names("Man").results().nearest(); //inits man, get the man that is nearest
        if (man != null)    { //checks if a man even exists
            man.interact("Pickpocket"); //interacts with npc man
            Execution.delay(1000); //delays for 1000 milliseconds
        }
    }
}

That code literally pickpockets men and nothing else. To get an idea of how it looks, very simply put. Note that a lot of the code isn't native Java, but actually RuneMate API. This is stuff you have to learn, but it speaks for itself.
 
Joined
Apr 5, 2015
Messages
297
Basic knowledge is good enough, you'll learn more advanced stuff on the way. Stuff like variables, arrays, loops are almost required to know of.

Code:
package com.bertrand.bots.test;

import com.runemate.game.api.hybrid.entities.Npc;
import com.runemate.game.api.hybrid.region.Npcs;
import com.runemate.game.api.script.Execution;
import com.runemate.game.api.script.framework.LoopingScript;

/**
* Created by Bertrand on 18-01-2016.
* Test bot
*/

public class test extends LoopingScript {
  
    @Override
    public void onStart(String... args) {
        setLoopDelay(300, 600); //sets loop delay, high = lower resources, low = lots of resources
    }

    @Override
    public void onLoop() {
        Npc man = Npcs.newQuery().names("Man").results().nearest(); //inits man, get the man that is nearest
        if (man != null)    { //checks if a man even exists
            man.interact("Pickpocket"); //interacts with npc man
            Execution.delay(1000); //delays for 1000 milliseconds
        }
    }
}

That code literally pickpockets men and nothing else. To get an idea of how it looks, very simply put. Note that a lot of the code isn't native Java, but actually RuneMate API. This is stuff you have to learn, but it speaks for itself.
Sweet! Thanks! How would i run it on Intellij?
 
Joined
Dec 10, 2014
Messages
3,255
Also, could someone ELI5 why writing runemate bots is easier/better then, say, Simba? Thanks!
RuneMate bots are written in Java, which is a popular programming language, whereas Simba scripts are written in Pascal iirc.
That's the main reason I'd say it's better, just because you're gaining experience in a language that you're likely to use in the future.
Also, Java is Object Oriented, like a lot of popular languages like C# and C++ are either Object Oriented in design, or support it.
Another big plus for Java is that it's easy in the sense that you don't need to worry about pointers or memory management, which reduces the amount of things that learners need to worry about by a large amount.
 
Joined
Apr 5, 2015
Messages
297
RuneMate bots are written in Java, which is a popular programming language, whereas Simba scripts are written in Pascal iirc.
That's the main reason I'd say it's better, just because you're gaining experience in a language that you're likely to use in the future.
Also, Java is Object Oriented, like a lot of popular languages like C# and C++ are either Object Oriented in design, or support it.
Another big plus for Java is that it's easy in the sense that you don't need to worry about pointers or memory management, which reduces the amount of things that learners need to worry about by a large amount.
In terms of the bot, which is more optimal?
 
The only thing Alpha about me is my bots
Joined
Sep 22, 2014
Messages
618
In terms of the bot, which is more optimal?

I'm assuming that you're asking what language is better to write a bot in. I'm going to say Java in this case, not because it is intrinsically any better than Pascal, but because of the fact that RuneScape is also written in Java. This allows botclients such as RuneMate to reflect directly into the game and access a much wider variety of information much more quickly than predominantly colour-based clients such as Simba. This allows bots to do more, more reliably, for longer, with less effort on the part of the bot writer, and consequently gets better results for end users.
 
Joined
Nov 26, 2015
Messages
9
I'm in the same exact boat as you OP. Very eager, but have been hearing a lot of problems with client detection. Do you guys just recommend waiting for Spectre or have you been fine with using multiple accounts on the same IP?
 
Joined
Dec 10, 2014
Messages
3,255
I'm in the same exact boat as you OP. Very eager, but have been hearing a lot of problems with client detection. Do you guys just recommend waiting for Spectre or have you been fine with using multiple accounts on the same IP?
If you're worried about client detection and getting accounts banned, I'd suggest that you have a set of throwaway accounts that serve as development accounts.

I don't play RS anymore, but I do still develop bots for it. I have a main account that I log into once in a while and play legit on (through the official client) and that hasn't been banned. If you really don't want to get an account banned, I wouldn't even log into a botting client with it, no matter how safe it is.
 
Top