Welcome!

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

Sign up now!

Bug "Hello, World!" Bot doesn't show up on runemate.

Joined
May 4, 2017
Messages
18
I'm trying to write a bot that prints "Hello, World!" in the console of Intellij.
First of all in the "public class TutorialBot extends LoopingScript" line, there is a line going through the word "LoopingScript" and when i hover above this i get the following message:
'com.runemate.game.api.script.framework.LoopingScript' is deprecated'

When running this code runemate spectre does start, but when I navigate in preferences to the directory of this bot and refresh the bot list, the bot won't show up. However in the console I do get a notice: Your bot list has been refreshed.

I appreciate all suggestions.

  1. RuneMate Version: 2.30.1
  2. Affected Games: n/a

Code Used:
package com.legitcurry.bots.tutorial_bot;

import com.runemate.game.api.script.framework.LoopingScript;

/**
* Created by Ahmad on 12-May-17.
*/
public class TutorialBot extends LoopingScript {
private String output;
@Override
public void onLoop() {
setOutput("Hello, World!");
System.out.println(getOutput());
setLoopDelay(1000);
}
public void setOutput(String string){
output = string;
}
public String getOutput(){
return output;
}
}
 
Joined
Aug 23, 2015
Messages
1,961
  • Encapsulation is more for when you have code spanning across multiple classes.
  • You need to extend LoopingBot. Looping script is depreciated, which means you can no longer use it. It's the same thing, name changed.
  • You should set your loop delay in a thing called onStart, not in your loop. Take a look at some open source bots.
  • Make sure you're directing runemate to the out folder of your intellij directory to look for bots in dev mode. It's under client preferences.
 
Top