Jump to content
Parabot - Bot for Ikov, DreamScape, SoulPlay, RuneWild, and more

Leaderboard


Popular Content

Showing content with the highest reputation on 05/22/2019 in all areas

  1. 2 points
    Jadsbutt

    HELP: DS Script

    I'm uncertain if there's a rule where if you place loot[0].interact(2); into a boolean if it'll even run that. Also I believe for this line of code if (!Players.getMyPlayer().isInCombat()) { if (loot.length > 0) { if (loot[0].distanceTo() <= 15) { loot[0].interact(2); Time.sleep(500); } } } return !Players.getMyPlayer().isInCombat(); } Instead of if (!Players.getMyPlayer().isInCombat()) {, just have public boolean activate() { return !Players.getMyPlayer().isInCombat(); } Because what this says is if !Players.getMyPlayer().isInCombat();, it'll run the execute() code, if it's false it'll do nothing. You'll want to make a separate class file for looting. For example, public class Loot implements Strategy { public boolean activate() { } public void execute() { } } Then back at your main class you would add strategies.add(new Loot()); to it, to ensure it runs the code and is provided by the main class your using to run the strategies. So for your loot class file it would look like, public class Loot implements Strategy { public boolean activate() { for (GroundItem b : GroundItems.getNearest(217, 211, 219, 2485, 985, 988, 987)) { return b != null && !Players.getMyPlayer().isInCombat(); } return false; // So in this instance, the code above would return true for when b != null and when your player is not in combat. B != null meaning it can see the item is there on the ground and has a value not equal to null. } @Override public void execute() { GroundItem[] loot = GroundItems.getNearest(989,6199,20343); if (!Players.getMyPlayer().isInCombat()) { if (loot.length > 0) { if (loot[0].distanceTo() <= 15) { loot[0].interact(2); Time.sleep(500); } } } } I hope this helps somewhat. If I said anything wrong I hope a experienced programmer corrects it 😝
  2. 2 points
    montyxX

    keep getting this message

    oh wow that was pre fast thank you for the update 🙂 you guys rock
  3. 1 point
    Lord

    HELP: DS Script

    You can click file->clear cache, Equally you are able yo just delete the Cache folder in the Parabot folder or finally add -clearcache to you Run.bat if you load the bot through CMD this will clear it every time you load the CMD.
  4. 1 point
    Lord

    HELP: DS Script

    Please clear cache and try again I have just updated it 🙂
  5. 1 point
    Lord

    keep getting this message

    Till now, I have updated. Please clear cache and try again 🙂
This leaderboard is set to Amsterdam/GMT+01:00
×
×
  • Create New...