Runescape 2007 Randoms

Discussion in 'Projects' started by NastyNate, Jul 21, 2015.

  1. 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 (Text):
    1.  
    2. import com.runemate.game.api.hybrid.entities.Npc;
    3. import com.runemate.game.api.hybrid.region.Npcs;
    4. import com.runemate.game.api.hybrid.region.Players;
    5. import com.runemate.game.api.script.Execution;
    6. import com.runemate.game.api.script.framework.task.Task;
    7.  
    8.  
    9.  
    10.     public class RandomHandler extends Task {
    11.  
    12.         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"};
    13.  
    14.         public Npc random;
    15.  
    16.         @Override
    17.         public boolean validate() {
    18.             return (random = Npcs.newQuery().names(RANDOMS).targeting(Players.getLocal()).reachable().results().first()) != null && random.isVisible();
    19.         }
    20.  
    21.         @Override
    22.         public void execute() {
    23.             if (random != null && random.interact("Dismiss")) {
    24.                 Execution.delayUntil(() -> !random.isVisible(), 1000, 1500);
    25.             }
    26.         }
    27.     }
    28.  
     

Share This Page

Loading...