Jump to content

aftabdear

Registered
  • Content Count

    29
  • Joined

  • Last visited

  • Feedback

    0%

Community Reputation

3 Neutral

About aftabdear

  • Rank
    New Botter

Recent Profile Visitors

553 profile views
  1. aftabdear

    TRiBot CLI Client Starter

    Is there any way you can add something like disabling autologin? As this would be very useful with sockets.
  2. aftabdear

    Need to make this less static

    New to scripting but trying my best Could someone look at this piece of code for me and tell me how I could improve this to make it less static more human like etc all help appreciated! just a simple banker. package scripts; import org.tribot.api2007.Banking; import org.tribot.api2007.NPCs; import org.tribot.api2007.Objects; import org.tribot.api2007.WebWalking; import org.tribot.api2007.types.RSNPC; import org.tribot.api2007.types.RSObject; import org.tribot.script.Script; public class BankingMethod extends Script{ final RSObject[] booths = Objects.find(20, "Bank booth"); final RSNPC[] bankers = NPCs.find("Banker"); @Override public void run() { Banking(); } public boolean WalkingToBank; { if (!Banking.isBankScreenOpen()) { WebWalking.walkToBank(); Banking(); } else if (booths[0].isOnScreen()) { final RSObject[] booths = Objects.findNearest(20, "Bank booth"); { if (booths.length > 1) { Banking(); } } } else if (bankers.length < 1) { Banking(); } } public boolean Banking() { if (Banking.isBankScreenOpen()) { Banking.depositAll(); println("depositing all items"); } if (!Banking.isBankScreenOpen()){ Banking.openBank(); Banking.depositAll(); } return false; } }
  3. ah I see ty and hella savage lol
  4. that's tru but need to find a way of the script recording these item id's so near the end of the script it will withdraw them
  5. the items and the number of items in my inventory are always changing so I cannot make a string and always say these items etc.
  6. Need a way of recording what I have in my inventory so if I call the code it would withdraw these certain items from the bank.
  7. aftabdear

    Simple Tea Thiever [OPEN SOURCE]

    Very basic tea thiever, supports banking. Requirements- start at varrock east bank enjoy! here's the source code: package scripts; import org.tribot.api.DynamicClicking; import org.tribot.api.General; import org.tribot.api.Timing; import org.tribot.api.types.generic.Condition; import org.tribot.api2007.Banking; import org.tribot.api2007.Inventory; import org.tribot.api2007.NPCs; import org.tribot.api2007.Objects; import org.tribot.api2007.Player; import org.tribot.api2007.Walking; import org.tribot.api2007.WebWalking; import org.tribot.api2007.types.RSNPC; import org.tribot.api2007.types.RSObject; import org.tribot.api2007.types.RSTile; import org.tribot.script.Script; public class teathiever extends Script { private RSTile last_teastall_tile = null; private boolean isAtTeaStall() { final RSObject[] teastall = Objects.findNearest(20, "Tea Stall"); if (teastall.length < 1) return false; return teastall[0].isOnScreen(); } private boolean isInBank() { final RSObject[] booths = Objects.findNearest(20, "Bank booth"); if (booths.length > 1) { if (booths[0].isOnScreen()) return true; } final RSNPC[] bankers = NPCs.findNearest("Banker"); if (bankers.length < 1) return false; return bankers[0].isOnScreen(); } private boolean steal() { if (isStealing()) { final long timeout = System.currentTimeMillis() + General.random(60000, 90000); // Let's define a timeout for the loop below. If we don't have a while (isStealing() && System.currentTimeMillis() < timeout) { sleep(100, 150); if (this.last_teastall_tile != null) { if (!Objects.isAt(this.last_teastall_tile, "Tea stall")) { break; } } } } final RSObject[] teastall = Objects.findNearest(50, "Tea stall"); if (teastall.length < 1) return false; if (!teastall[0].isOnScreen()) { if (!Walking.walkPath(Walking.generateStraightPath(teastall[0]))) return false; if (!Timing.waitCondition(new Condition() { @Override public boolean active() { General.sleep(100); return teastall[0].isOnScreen(); } }, General.random(8000, 9300))) return false; } if (!DynamicClicking.clickRSObject(teastall[0], "Steal-from")) return false; Timing.waitCondition(new Condition() { @Override public boolean active() { return !isStealing(); } }, General.random(1000, 1200)); if (Timing.waitCondition(new Condition() { @Override public boolean active() { return isStealing(); } }, General.random(8000, 9000))) { this.last_teastall_tile = teastall[0].getPosition().clone(); return true; } return false; } private boolean isStealing() { return Player.getAnimation() > 0; } private boolean walkToBank() { if (!WebWalking.walkToBank()) { return false; } return Timing.waitCondition(new Condition() { @Override public boolean active() { General.sleep(200, 300); return isInBank(); } }, General.random(8000, 9000)); } private boolean walkToTeaStall() { final RSObject[] teastall = Objects.findNearest(50, "Tea Stall"); if (teastall.length < 1) return false; if (!WebWalking.walkTo(teastall[0])) return false; return Timing.waitCondition(new Condition() { @Override public boolean active() { General.sleep(200, 300); return isAtTeaStall(); } }, General.random(8000, 9000)); } private boolean bank() { if (!Banking.isBankScreenOpen()) { if (!Banking.openBank()) return false; } if (Banking.depositAll() < 1) return false; return Timing.waitCondition(new Condition() { @Override public boolean active() { return !Inventory.isFull(); } }, General.random(3000, 4000)); } @Override public void run() { while (true) { sleep(50); if (isAtTeaStall()) { if (Inventory.isFull()) { walkToBank(); } else // steal(); // } else if (isInBank()) { if (Inventory.isFull()) bank(); else walkToTeaStall(); } else { if (Inventory.isFull()) walkToBank(); else walkToTeaStall(); } } } } teathiever$1.class
  8. aftabdear

    Exporting a script using eclipse

    have been for hours lol
  9. aftabdear

    Exporting a script using eclipse

    Is there like a certain way of saving it on eclipse?
  10. aftabdear

    Exporting a script using eclipse

    Still nothing showing up in script folder My script: package test; import org.tribot.script.Script; import org.tribot.script.ScriptManifest; @ScriptManifest(authors = { "Aftab Alam" }, category = "Money making", name = "Test") public class test extends Script { @Override public void run() { while (true) { sleep(10); } } } copied the calss file into .tribot>bin>scripts>
  11. aftabdear

    Exporting a script using eclipse

    cheers I'll give it a try
  12. aftabdear

    Exporting a script using eclipse

    this has nothing to do with eclipse.?
  13. Anyone know how to export a local script? I'm doing export>Jarfile> select class path and project>C:\Users\Aftab Alam\AppData\Roaming\.tribot\bin\scripts\woodcutter.jar >finish then loading up the client and checking scripts and unable to find anything?
  14. aftabdear

    Scripting requires VIP?

    Hi i'm new to this forum and wanted to ask if I needed VIP to use the Tribot API and run my local scripts??
×