1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resolved Starting Writing Scripts

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

  1. ozdev

    Joined:
    Apr 5, 2015
    Messages:
    297
    Likes Received:
    41
    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. Derk

    Derk 12 year old normie

    Joined:
    Jan 8, 2015
    Messages:
    2,766
    Likes Received:
    1,339
    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;
    2.  
    3. import com.runemate.game.api.hybrid.entities.Npc;
    4. import com.runemate.game.api.hybrid.region.Npcs;
    5. import com.runemate.game.api.script.Execution;
    6. import com.runemate.game.api.script.framework.LoopingScript;
    7.  
    8. /**
    9. * Created by Bertrand on 18-01-2016.
    10. * Test bot
    11. */
    12.  
    13. public class test extends LoopingScript {
    14.    
    15.     @Override
    16.     public void onStart(String... args) {
    17.         setLoopDelay(300, 600); //sets loop delay, high = lower resources, low = lots of resources
    18.     }
    19.  
    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. }
    29.  
    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. ozdev

    Joined:
    Apr 5, 2015
    Messages:
    297
    Likes Received:
    41
    Sweet! Thanks! How would i run it on Intellij?
     
  5. Derk

    Derk 12 year old normie

    Joined:
    Jan 8, 2015
    Messages:
    2,766
    Likes Received:
    1,339
  6. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    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.
  7. ozdev

    Joined:
    Apr 5, 2015
    Messages:
    297
    Likes Received:
    41
    In terms of the bot, which is more optimal?
     
  8. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    What do you mean?
     
  9. Eagles13

    Eagles13 The only thing Alpha about me is my bots

    Joined:
    Sep 22, 2014
    Messages:
    618
    Likes Received:
    186
    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.
     
  10. ghoi

    Joined:
    Nov 26, 2015
    Messages:
    9
    Likes Received:
    0
    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?
     
  11. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    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

Loading...