Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Puhson

    Members
    • Posts

      2
    • Joined

    • Last visited

    Recent Profile Visitors

    The recent visitors block is disabled and is not being shown to other users.

    Puhson's Achievements

    1. Would it be like this then? import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.combat.Combat; import org.dreambot.api.methods.interactive.NPCs; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.utilities.impl.Condition; import org.dreambot.api.wrappers.interactive.Character; import org.dreambot.api.wrappers.interactive.NPC; import org.dreambot.api.wrappers.interactive.Player; import java.util.Objects; @ScriptManifest(author = "Puh", name = "Revenant Imp Killer", version = 1.0, description = "Kills Revenant Imps", category = Category.COMBAT) public class RevenantImpKiller extends AbstractScript { public Character getLocal; @Override public void onStart() { log("Script started!"); } public static Player getLocal() { return null; } @Override public int onLoop() { if (!(getLocal).isInCombat()) { NPC imp = NPCs.closest("Revenant imp"); if (imp != null && imp.interact("Attack")) { sleepUntil(() -> (getLocal()).isInCombat(), Calculations.random(3000, 5000)); } } return Calculations.random(200, 600); } private void sleepUntil(Object o, int random) { } @Override public void onExit() { log("Script stopped!"); } }
    2. I am trying to make a combat script and trying to figure out whats wrong. getLocalPlayer gives me this = Cannot resolve symbol 'getLocalPlayer' And sleepuntil gives me this: Cannot resolve method 'sleepUntil(<lambda expression>, int)' My code: import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.interactive.NPCs; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.wrappers.interactive.NPC; @ScriptManifest(author = "Puh", name = "Revenant Imp Killer", version = 1.0, description = "Kills Revenant Imps", category = Category.COMBAT) public class RevenantImpKiller extends AbstractScript { @Override public void onStart() { log("Script started!"); } @Override public int onLoop() { if (!(getLocalPlayer).isInCombat()) { NPC imp = NPCs.closest("Revenant imp"); if (imp != null && imp.interact("Attack")) { sleepUntil(() -> getLocalPlayer().isInCombat(), Calculations.random(3000, 5000)); } } return Calculations.random(200, 600); } @Override public void onExit() { log("Script stopped!"); } }
    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.