Welcome!

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

Sign up now!

Runescape 2007 Randoms

Joined
Jul 29, 2014
Messages
61
So I got tired of seeing public bots on RuneMate that didn't include Randoms in their bots. Here you go. Made some modifications to the code but me and Ian created this code like a year ago. I've probably left out 1 or 2 randoms but you can add them inside the strings. Just include this as a task inside your loopingscript!

Code:
import com.runemate.game.api.hybrid.entities.Npc;
import com.runemate.game.api.hybrid.region.Npcs;
import com.runemate.game.api.hybrid.region.Players;
import com.runemate.game.api.script.Execution;
import com.runemate.game.api.script.framework.task.Task;



    public class RandomHandler extends Task {

        public static final String[] RANDOMS = {"Dr Jekyll", "Mysterious Old Man", "Drunken Dwarf", "Frog", "Rick Turpentine", "Sergeant Damien", "Pillory Guard", "Capt' Arnav", "Flippa", "Evil Bob", "Giles", "Leo", "Dunce"};

        public Npc random;

        @Override
        public boolean validate() {
            return (random = Npcs.newQuery().names(RANDOMS).targeting(Players.getLocal()).reachable().results().first()) != null && random.isVisible();
        }

        @Override
        public void execute() {
            if (random != null && random.interact("Dismiss")) {
                Execution.delayUntil(() -> !random.isVisible(), 1000, 1500);
            }
        }
    }
 
Top