Resolved Starting Writing Scripts

Discussion in 'Developer Support' started by ozdev, Jan 18, 2016.

  1. 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 bots 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!

  2. Best Answer:
    Post #4 by Derk, Jan 18, 2016
  3. 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 (Text):
    1. package com.bertrand.bots.test;
    3. import;
    4. import;
    5. import;
    6. import;
    8. /**
    9. * Created by Bertrand on 18-01-2016.
    10. * Test bot
    11. */
    13. public class test extends LoopingScript {
    15.     @Override
    16.     public void onStart(String... args) {
    17.         setLoopDelay(300, 600); //sets loop delay, high = lower resources, low = lots of resources
    18.     }
    20.     @Override
    21.     public void onLoop() {
    22.         Npc man = Npcs.newQuery().names("Man").results().nearest(); //inits man, get the man that is nearest
    23.         if (man != null)    { //checks if a man even exists
    24.             man.interact("Pickpocket"); //interacts with npc man
    25.             Execution.delay(1000); //delays for 1000 milliseconds
    26.         }
    27.     }
    28. }
    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.
  4. Sweet! Thanks! How would i run it on Intellij?
  5. RuneMate bots are written in Java, which is a popular programming language, whereas Simba scripts bots 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.
    ozdev likes this.
  6. In terms of the bot, which is more optimal?
  7. What do you mean?
  8. 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.
  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?
  10. 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.
    ghoi likes this.

Share This Page