Jump to content

kadiem

Members
  • Posts

    52
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

1223 profile views

kadiem's Achievements

Iron Poster

Iron Poster (3/10)

7

Reputation

  1. shop.interact("Trade"); new ConditionalSleep(Script.random(4000, 8000)) { @Override public boolean condition() { return store.isOpen(); } }; the ConditionalSleep is supposed to wait 4 to 8 seconds or until store is opened, but neither of those are working
  2. I don't remember acutely but if you do math I ran about 10-15 accounts (120x10-15) for 2 months, the ban rate was very low that I could bot literately 24/7 without any break and not a single ban.
  3. Before 3-4 months I was making about 120K/HR now I don't know.
  4. Hello everyone, I'm releasing this script it made me bank but I don't use it anymore so I don't know how much money does it generate now, features:- -GE Buys Bows and collect Sells Steel Arrows and collect Change un-noted bows to noted -Brain's Shop Buys Steel Arrows until 1950 Sells bows only if the quantity in the shop is acceptable Hops world (F2p) -Friends Chat (Not completed) Know the bot location Send trade signal -Update Create file With all numbers (Bows sold, Arrows Bought) Send Email (Via external jar) Source package Main; import org.osbot.rs07.api.GrandExchange; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.Player; import org.osbot.rs07.api.ui.Message; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import java.awt.*; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; @ScriptManifest(name = "Shopper", author = "Kadiem", version = 1.0, info = "", logo = "") public class Main extends Script { long Timer; Area shopArea = new Area(2953, 3205, 2960, 3202); Area grandexchangeArea = Banks.GRAND_EXCHANGE; Area tradingArea = Banks.VARROCK_WEST; static String Status = "Normal"; boolean GotTradeOffer; Timer logTimer; Timer updateTimer; int numberofWSB; int numberofWLB; int numberofMSB; int numberofMLB; int numberofSA; int coinsinbank; @Override public void onStart() throws InterruptedException { logTimer = new Timer(0); updateTimer = new Timer(0); Timer = System.currentTimeMillis(); try { File file = new File(getDirectoryData()+"info.txt"); if(!file.exists()) { file.createNewFile(); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Override public int onLoop() throws InterruptedException { if(logTimer.Passed(1)){ log("Current money stock " + (int) inventory.getAmount("Coins")); log("Current money stock in bank " + coinsinbank); logTimer.reset(); } if(updateTimer.Passed(30)){ Update(); updateTimer.reset(); sleep(random(2000,3000)); } if(Status == "Normal") { if (!GotTradeOffer) { if (tabs.open(Tab.INVENTORY) && !trade.isFirstInterfaceOpen()) { if (inventory.contains("Willow longbow") && inventory.contains("Willow shortbow") && inventory.contains("Maple shortbow") && inventory.contains("Maple longbow")) { GoToShop(); } if (!inventory.contains("Willow longbow") || !inventory.contains("Willow shortbow") || !inventory.contains("Maple shortbow") || !inventory.contains("Maple longbow")) { GoToGe(); } } } else if (GotTradeOffer) { Trade(); } }else if (Status == "Muling"){ WalktoTrade(); } return 100; } private void WalktoTrade() { if(!tradingArea.contains(myPlayer())){ walking.webWalk(tradingArea); } } public void Update(){ try { File file = new File(getDirectoryData()+"info.txt"); if(!file.exists()) { file.createNewFile(); } PrintWriter pw = new PrintWriter(new FileWriter(file, true)); long timeRan = System.currentTimeMillis() - this.Timer; pw.println(myPlayer().getName()); DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date = new Date(); pw.println(dateFormat.format(date)); pw.println("Time running ["+formatTime(timeRan)+"]"); pw.println("Current money stock " +"["+(int) inventory.getAmount("Coins")/1000+"K"+"]"); pw.println("Number of steel arrows bought " +"["+ numberofSA+"]"); pw.println("Number of willow shortbows bought " +"["+ numberofWSB+"]"); pw.println("Number of willow longbows bought " +"["+ numberofWLB+"]"); pw.println("Number of maple shortbows bought " +"["+ numberofMSB+"]"); pw.println("Number of maple longbows bought " +"["+ numberofMLB+"]"); pw.println("-------------------------------------------------------------------------"); pw.close(); log("Update!"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public final String formatTime(long ms) { long s = ms / 1000; long m = s / 60; long h = m / 60; return String.format("%02d:%02d:%02d", h %= 24, m %= 60, s %= 60); } private void Trade() throws InterruptedException { Player muleTrade = (Player)this.players.closest(new String[]{"Yourname"}); if(grandExchange.isOpen()){ grandExchange.close(); } if(store.isOpen()){ store.close(); } if(!trade.isFirstInterfaceOpen()) { if(muleTrade != null) { muleTrade.interact(new String[]{"Trade with"}); new ConditionalSleep(5000) { public boolean condition() throws InterruptedException { return getTrade().isCurrentlyTrading(); } }.sleep(); }else{ return; } } if(trade.isFirstInterfaceOpen()){ trade.offer("Coins",GetQuantity()); getTrade().acceptTrade(); new ConditionalSleep(5000){ public boolean condition() throws InterruptedException { return getTrade().isSecondInterfaceOpen(); } }.sleep(); } if(trade.isSecondInterfaceOpen()){ getTrade().acceptTrade(); new ConditionalSleep(5000){ public boolean condition() throws InterruptedException { return !getTrade().isSecondInterfaceOpen(); } }.sleep(); GotTradeOffer = false; if (inventory.contains("Willow longbow") && inventory.contains("Willow shortbow") && inventory.contains("Maple shortbow") && inventory.contains("Maple longbow")) { GoToShop(); } if (!inventory.contains("Willow longbow") || !inventory.contains("Willow shortbow") || !inventory.contains("Maple shortbow") || !inventory.contains("Maple longbow")) { GoToGe(); } } } private int GetQuantity() { int x = (int) (inventory.getAmount("Coins") - 100000); return x; } public boolean invcheck(String name){ if(inventory.contains(name) && inventory.getAmount(name) == 100){ return true; } return false; } private void GoToGe() throws InterruptedException { NPC grandexchangeclerk = npcs.closest("Grand Exchange Clerk"); if (!grandexchangeArea.contains(myPlayer())) { walking.webWalk(grandexchangeArea); } if (grandexchangeArea.contains(myPlayer())) { if (inventory.contains(849) || inventory.contains(847) || inventory.contains(851) || inventory.contains(853)) { changetonoted(); } else { if (!grandExchange.isOpen()) { if (grandexchangeclerk != null) { grandexchangeclerk.interact("Exchange"); new ConditionalSleep(Script.random(5000, 8000)) { public boolean condition() throws InterruptedException { return grandExchange.isOpen(); } }.sleep(); } } if (grandExchange.isOpen()) { BUY(847, "willow longbow", 150, 100, "Steel arrow", 32); BUY(849, "willow shortbow", 100, 100, "Steel arrow", 32); BUY(851, "Maple longbow", 336, 100, "Steel arrow", 32); BUY(853, "Maple shortbow", 208, 100, "Steel arrow", 32); } } if(inventory.getAmount("Coins") >= 100000){ despositcoins(); } } } private void despositcoins() throws InterruptedException { if(!bank.isOpen()){ bank.open(); } if (bank.isOpen()) { coinsinbank = (int) bank.getAmount("Coins"); bank.deposit("Coins",GetQuantity()); bank.close(); } } public GrandExchange.Box getbox(){ if(grandExchange.getStatus(GrandExchange.Box.BOX_1) == GrandExchange.Status.EMPTY){ return GrandExchange.Box.BOX_1; } if(grandExchange.getStatus(GrandExchange.Box.BOX_2) == GrandExchange.Status.EMPTY){ return GrandExchange.Box.BOX_2; } if(grandExchange.getStatus(GrandExchange.Box.BOX_3) == GrandExchange.Status.EMPTY){ return GrandExchange.Box.BOX_3; } return null; } public void BuyMethod(String name,int price,int Quantity) throws InterruptedException { grandExchange.buyItems(getbox()); sleep(random(1000,1500)); keyboard.typeString(name); keyboard.typeString("",true); } private void changetonoted() throws InterruptedException { if(!bank.isOpen()){ bank.open(); } if (bank.isOpen()) { bank.depositAllExcept("Coins"); sleep(random(1000, 1500)); getWidgets().getWidgetContainingText("Note").interact("Note"); sleep(random(1000, 1500)); if (bank.contains("Maple shortbow")) { bank.withdrawAll("Maple shortbow"); } if (bank.contains("Maple longbow")) { bank.withdrawAll("Maple longbow"); } if (bank.contains("Willow shortbow")) { bank.withdrawAll("Willow shortbow"); } if (bank.contains("Willow longbow")) { bank.withdrawAll("Willow longbow"); } } } public void BUY(int id,String name,int Price,int Quantity,String Sellingname,int Sellingprice) throws InterruptedException { if(inventory.contains(Sellingname)){ grandExchange.sellItem(886,Sellingprice, (int) inventory.getAmount(886)); new ConditionalSleep(Script.random(5000, 8000)) { public boolean condition() throws InterruptedException { return grandExchange.isOpen(); } }.sleep(); sleep(random(1000, 1100)); } if (grandExchange.getStatus(GrandExchange.Box.BOX_1) == GrandExchange.Status.FINISHED_SALE || grandExchange.getStatus(GrandExchange.Box.BOX_2) == GrandExchange.Status.FINISHED_SALE || grandExchange.getStatus(GrandExchange.Box.BOX_3) == GrandExchange.Status.FINISHED_SALE) { grandExchange.collect(); } if (grandExchange.getStatus(GrandExchange.Box.BOX_1) == GrandExchange.Status.FINISHED_BUY || grandExchange.getStatus(GrandExchange.Box.BOX_2) == GrandExchange.Status.FINISHED_BUY || grandExchange.getStatus(GrandExchange.Box.BOX_3) == GrandExchange.Status.FINISHED_BUY) { grandExchange.collect(); } else if (!inventory.contains(name) && grandExchange.getItemId(GrandExchange.Box.BOX_1) != id && grandExchange.getItemId(GrandExchange.Box.BOX_2) != id && grandExchange.getItemId(GrandExchange.Box.BOX_3) != id || inventory.contains(name) && inventory.getAmount(name) < Quantity && grandExchange.getItemId(GrandExchange.Box.BOX_1) != id && grandExchange.getItemId(GrandExchange.Box.BOX_2) != id && grandExchange.getItemId(GrandExchange.Box.BOX_3) != id) { grandExchange.buyItem(id, name, Price, GetQuantity(name,Quantity)); new ConditionalSleep(Script.random(5000, 8000)) { public boolean condition() throws InterruptedException { return grandExchange.isOpen(); } }.sleep(); sleep(random(1000, 1100)); } } private int GetQuantity(String name,int InitialQuantity) { if(!inventory.contains(name)){ return InitialQuantity; } if(inventory.contains(name) && inventory.getAmount(name) < 100){ int x = (int) (100 - inventory.getAmount(name)); return x; } return 0; } private void GoToShop() throws InterruptedException { NPC Brian = npcs.closest("Brian"); if(!shopArea.contains(myPlayer())){ walking.webWalk(shopArea); } if(shopArea.contains(myPlayer())){ if(!store.isOpen()){ if(Brian !=null) { Brian.interact("Trade"); new ConditionalSleep(Script.random(5000, 8000)) { public boolean condition() throws InterruptedException { return grandExchange.isOpen(); } }.sleep(); } } if(store.isOpen()){ shop(); HopWorlds(); } } } private void shop() throws InterruptedException { while(store.getAmount("Steel arrow") >= 1460) { store.buy("Steel arrow", 10); numberofSA = numberofSA + 10; sleep(random(800,1100)); } if (store.getAmount("Oak longbow") <= 5) { store.sell("Oak longbow", 5); sleep(random(800,1100)); } if (store.getAmount("Willow shortbow") <= 4) { store.sell("Willow shortbow", 5); numberofWSB = numberofWSB + 5; sleep(random(800,1100)); } if (store.getAmount("Willow longbow") <= 4) { store.sell("Willow longbow", 5); numberofWLB = numberofWLB + 5; sleep(random(800,1100)); } if (store.getAmount("Maple shortbow") <= 3) { store.sell("Maple shortbow", 5); numberofMSB = numberofMSB + 5; sleep(random(800,1100)); } if (store.getAmount("Maple longbow") <= 3) { store.sell("Maple longbow", 5); numberofMLB = numberofMLB + 5; sleep(random(800,1100)); } } private void HopWorlds() throws InterruptedException { store.close(); new ConditionalSleep(Script.random(5000, 8000)) { public boolean condition() throws InterruptedException { return !store.isOpen(); } }.sleep(); worlds.hop(WorldNumber()); tabs.open(Tab.INVENTORY); sleep(random(2000,3000)); tabs.open(Tab.INVENTORY); new ConditionalSleep(Script.random(5000, 8000)) { public boolean condition() throws InterruptedException { return tabs.open(Tab.INVENTORY); } }.sleep(); sleep(random(3000,4000)); } private int WorldNumber(){ if(worlds.getCurrentWorld() == 301){ return 8; } if(worlds.getCurrentWorld() == 308){ return 16; } if(worlds.getCurrentWorld() == 316){ return 26; } if(worlds.getCurrentWorld() == 326){ return 35; } if(worlds.getCurrentWorld() == 335){ return 82; } if(worlds.getCurrentWorld() == 382){ return 83; } if(worlds.getCurrentWorld() == 383){ return 84; } if(worlds.getCurrentWorld() == 384){ return 93; } if(worlds.getCurrentWorld() == 393){ return 94; } return 1; } public void SendReply(String message) throws InterruptedException { if(grandExchange.isOpen()){ grandExchange.close(); } tabs.open(Tab.FRIENDS); new ConditionalSleep(Script.random(5000, 8000)) { public boolean condition() throws InterruptedException { return Tab.FRIENDS.isOpen(bot); } }.sleep(); sleep(random(1500,2000)); getWidgets().getWidgetContainingText("Yourname").interact("Message"); new ConditionalSleep(Script.random(5000, 8000)) { public boolean condition() throws InterruptedException { return dialogues.inDialogue(); } }.sleep(); sleep(random(1500,2000)); keyboard.typeString(message,true); } public String getlocation(){ if(shopArea.contains(myPlayer())){ return "At the shop"; } if(grandexchangeArea.contains(myPlayer())){ return "At ge"; } return null; } public void onMessage(Message c) throws InterruptedException { if (c.getMessage().contains("Yourname wishes to trade with you.")){ this.log("Yourname wishes to trade with you."); GotTradeOffer = true; } if (c.getMessage().contains("Where are u?.")){ this.log("Message recived."); SendReply(getlocation()); } if (c.getMessage().contains("Ok im here.")){ this.log("Message recived."); Trade(); } if (c.getMessage().contains("Ok come here.")){ SendReply("Comming..."); this.log("Message recived."); Status = "Muling"; } if (c.getMessage().contains("Ok done.")){ SendReply("Ok back to normal"); this.log("Message recived."); Status = "Normal"; } } @Override public void onPaint(Graphics2D g) { //This is where you will put your code for paint(s) } } Email jar source: package Email; import java.awt.EventQueue; import java.io.File; import java.util.Properties; import javax.activation.*; import javax.mail.*; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeBodyPart; import javax.mail.internet.MimeMessage; import javax.mail.internet.MimeMultipart; import javax.swing.JFrame; public class SendMailTLS { public static void main(String[] args) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { Frame1 frame = new Frame1(); frame.setVisible(true); } }); try { while (true) { SendEmail(); Thread.sleep(Minutes(40)); } } catch (InterruptedException e) { e.printStackTrace(); } } public static int Minutes(int Minutes){ return Minutes*60000; } public static void SendEmail(){ final String username = "Yourname@email.com"; final String password = "Email Password"; Properties props = new Properties(); props.put("mail.smtp.auth", true); props.put("mail.smtp.starttls.enable", true); props.put("mail.smtp.host", "smtp.gmail.com"); props.put("mail.smtp.port", "587"); props.put("mail.smtp.ssl.trust", "smtp.gmail.com"); Session session = Session.getInstance(props, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password); } }); try { Message message = new MimeMessage(session); message.setFrom(new InternetAddress("Yourname@email.com")); message.setRecipients(Message.RecipientType.TO, InternetAddress.parse("Emailtorecieve@email.com")); message.setSubject("Account Updates"); message.setText("Account Updates"); MimeBodyPart messageBodyPart = new MimeBodyPart(); Multipart multipart = new MimeMultipart(); String currentUsersHomeDir = System.getProperty("user.home"); String otherFolder = currentUsersHomeDir + "\\OSBot\\Data\\info.txt"; messageBodyPart = new MimeBodyPart(); String file = otherFolder; String fileName = "info.txt"; DataSource source = new FileDataSource(file); messageBodyPart.setDataHandler(new DataHandler(source)); messageBodyPart.setFileName(fileName); multipart.addBodyPart(messageBodyPart); message.setContent(multipart); System.out.println("Sending"); Transport.send(message); System.out.println("Done"); } catch (MessagingException e) { e.printStackTrace(); } } } Hope you enjoy it and please let me know your opinions in the poll Thanks.
  5. Hello everyone, I'm selling 22m for 20$ Paypal tursted users only skype live:xyoxbox Thanks.
  6. I aldeady tried making and writing a txt file and it worked .Can I execute external jar which is in the directoryfile through getDirectoryData()
  7. I changed pathname to getDirectoryData()+"Test.txt" and it worked thank you so much!!
  8. It's my script i already tried this : try { File file = new File("Test.txt"); if(!file.exists()) { file.createNewFile(); } PrintWriter pw = new PrintWriter(file); pw.println("Test"); pw.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } But it's giving me permission error is there another way?
  9. Is there anyway to make the script copy all logs like this one into txt file? [INFO][Bot #1][08/21 12:51:53 AM]: WebWalkingEvent; We have reached the final destination! [INFO][Bot #1][08/21 12:51:53 AM]: Current money stock 662459 [INFO][Bot #1][08/21 12:52:00 AM]: Current money stock 662459
  10. Hello everyone, I'm releasing my second script (actually it's like mini-script), as the name says it chats with other people. Source: private Dialogue Dialogue; boolean said; int Index; private void Respond() throws InterruptedException { //Message sending method if(said == true){ sleep(random(2000,4500)); Dialogue = new Dialogue(); List<String> RespondSpeach = Dialogue.getNumberList1(); keyboard.typeString(RespondSpeach.get(Index) , true); said = false; } } public void onMessage(Message m) throws InterruptedException { //Message recieveing method Dialogue = new Dialogue(); List<String> ReceivedSpeach = Dialogue.getNumberList(); for (String word : ReceivedSpeach){ if (m.getMessage().contains(word)){ Index = ReceivedSpeach.indexOf(word); said = true; } } } and here is the dialogue class: Hope that some people find it useful
  11. Yh still trying to make good anti-ban I tried using enums but for some reasons it made the script laggy i dont know why
  12. F2pChopper My first release Good morning everyone i'm releasing my first script, hopping that it could be useful for some people Features: Changes axe according to WC level Changes tree/area according to WC level Drops logs when PowerChopping(Before level 60) and stores Yew logs(At 60 and above) Requirements: Have Bronze, Steel, Black, Mithril, Adamant, Rune axes in your bank Source: package Chopper; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.Item; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.*; import org.osbot.rs07.api.util.Utilities; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import java.awt.*; import java.util.List; @ScriptManifest(name = "F2pChopper", author = "Kadhim", version = 1.6, info = "Chopper", logo = "") public class Main extends Script { Timer BanTimer; long Timer; int LogChopped; Area WithdrawAxesBank = Banks.DRAYNOR; Area Bankyew = Banks.GRAND_EXCHANGE; Area WILLOWAREA = new Area( new int[][]{ {2968, 3188}, {2959, 3192}, {2961, 3201}, {2966, 3201}, {2969, 3200}, {2972, 3197}, {2975, 3195}, {2976, 3194} } ); Area TREESAREA = new Area( new int[][]{ {2909, 3308}, {2923, 3301}, {2928, 3313}, {2921, 3318} } ); Area OAKAREA = new Area(3151, 3458, 3170, 3450); Area YEWAREA = new Area( new int[][]{ { 3201, 3505 }, { 3225, 3505 }, { 3222, 3498 }, { 3207, 3498 }, { 3207, 3498 }, { 3207, 3499 } } ); @Override public void onStart() { BanTimer = new Timer(0); Timer = System.currentTimeMillis(); } @Override public int onLoop() throws InterruptedException { CheckContMessage(); if (BanTimer.Passed(random(10, 15))) { ANTI_BAN(); log("Anti-Ban"); BanTimer.reset(); } if(!inventory.contains(Axe())){ WithdrawAxes(); } if(skills.getDynamic(Skill.WOODCUTTING) < 60){ if(!inventory.isFull()){ PowerChopping(); }else{ if(inventory.isFull()){ Drop(); } } } if(skills.getDynamic(Skill.WOODCUTTING) >= 60){ if(!inventory.isFull()){ ChopYews(); }else{ if(inventory.isFull()){ BankYew(); } } } return 100; } public void PowerChopping() throws InterruptedException { if(skills.getDynamic(Skill.WOODCUTTING) < 15){ this.ChopTrees(); } if(skills.getDynamic(Skill.WOODCUTTING) >= 15 && skills.getDynamic(Skill.WOODCUTTING) < 30){ this.ChopOaks(); } if(skills.getDynamic(Skill.WOODCUTTING) >= 30 && skills.getDynamic(Skill.WOODCUTTING) < 60){ this.ChopWillows(); } } private void CheckContMessage() { RS2Widget lvlUp = widgets.get(233, 11); RS2Widget cont = widgets.get(233, 2); if (lvlUp != null) { cont.interact(new String[]{"Continue"}); } if (cont != null) { cont.interact(new String[]{"Continue"}); } } private void ANTI_BAN() throws InterruptedException { switch (random((int)0, (int)9)) { case 0: { //Hovering for (int x = 0; x < 5; x = x + random(0,5)){ switch (random((int)0, (int)1)) { case 0: { for (int z = 0; z < 5; z = z + random(0,5)) { inventory.hover(random(0, 27)); } break; } case 1: { Entity TREE_STUMP = objects.closest("Tree stump"); if(TREE_STUMP != null){ TREE_STUMP.hover(); } break; } } } break; } case 1: { //Typing switch (random((int)0, (int)3)) { case 0: { keyboard.typeString("Type something", true); break; } case 1: { keyboard.typeString("Type something", true); break; } case 2: { keyboard.typeString("Type something", true); break; } case 3: { keyboard.typeString("Type something", true); break; } case 4: { keyboard.typeString("Type something", false); break; } } break; } case 2: { //Move mouse out of screen mouse.moveOutsideScreen(); sleep(random(1000,10000)); break; } case 3: { //Check skill xp getSkills().hoverSkill(Skill.WOODCUTTING); sleep(random(2000,3000)); break; } case 4: { //Examine inventory Item Axe = getInventory().getItem(Axe()); Item Logs = getInventory().getItem(LogsInInv()); switch (random((int)0, (int)1)) { case 0: { Axe.interact("Examine"); break; } case 1: { Logs.interact("Examine"); break; } } break; } case 5: { //Open random tabs tabs.open(Tab.forId(random(0,13))); break; } } } private void ChopYews() throws InterruptedException { Entity YEW = objects.closest("Yew"); if(!YEWAREA.contains(myPlayer())){ walking.webWalk(YEWAREA); } if(YEWAREA.contains(myPlayer())){ if (YEW != null && !myPlayer().isMoving() && !myPlayer().isAnimating()) { YEW.interact("Chop down"); new ConditionalSleep(Script.random(10000, 15000)) { public boolean condition() throws InterruptedException { return !myPlayer().isAnimating(); } }.sleep(); } } } private void ChopWillows() throws InterruptedException { if(!WILLOWAREA.contains(myPlayer())){ walking.webWalk(WILLOWAREA); } if(WILLOWAREA.contains(myPlayer())){ Entity WTREE = objects.closest("Willow"); if (WTREE != null && !myPlayer().isMoving() && !myPlayer().isAnimating()) { WTREE.interact("Chop down"); new ConditionalSleep(Script.random(10000, 15000)) { public boolean condition() throws InterruptedException { return !myPlayer().isAnimating(); } }.sleep(); } } } private void ChopOaks() throws InterruptedException { if(!OAKAREA.contains(myPlayer())){ walking.webWalk(OAKAREA); } if(OAKAREA.contains(myPlayer())){ Entity OTREE = objects.closest("Oak"); if (OTREE != null && !myPlayer().isMoving() && !myPlayer().isAnimating()) { OTREE.interact("Chop down"); new ConditionalSleep(Script.random(10000, 15000)) { public boolean condition() throws InterruptedException { return !myPlayer().isAnimating(); } }.sleep(); } } } private void ChopTrees() throws InterruptedException { if(!TREESAREA.contains(myPlayer())){ walking.webWalk(TREESAREA); } if(TREESAREA.contains(myPlayer())){ Entity TREE = objects.closest("Tree"); if (TREE != null && !myPlayer().isMoving() && !myPlayer().isAnimating()) { TREE.interact("Chop down"); new ConditionalSleep(Script.random(10000, 15000)) { public boolean condition() throws InterruptedException { return !myPlayer().isAnimating(); } }.sleep(); } } } public void WithdrawAxes() throws InterruptedException { if(!WithdrawAxesBank.contains(myPlayer())){ walking.webWalk(WithdrawAxesBank); } if(WithdrawAxesBank.contains(myPlayer())){ if(!bank.isOpen()){ bank.open(); } if(bank.isOpen()){ if(bank.contains(Axe())){ bank.depositAll(); bank.withdraw(Axe(),1); }else{ log("Bank does not contain " +Axe()); logoutTab.logOut(); } } } } public void BankYew() throws InterruptedException { if(!Bankyew.contains(myPlayer())){ walking.webWalk(Bankyew); } if(Bankyew.contains(myPlayer())){ if(!bank.isOpen()){ bank.open(); } if(bank.isOpen()){ bank.depositAllExcept(Axe()); } } } public void Drop(){ inventory.dropAllExcept(Axe()); } public String LogsInInv(){ if(inventory.contains("Logs")){ return "Logs"; } if(inventory.contains("Oak logs")){ return "Oak logs"; } if(inventory.contains("Willow logs")){ return "Willow logs"; } if(inventory.contains("Yew logs")){ return "Yew logs"; } return null; } public String Axe(){ if(skills.getDynamic(Skill.WOODCUTTING) < 6){ return "Bronze axe"; } if(skills.getDynamic(Skill.WOODCUTTING) >= 6 && skills.getDynamic(Skill.WOODCUTTING) < 11){ return "Steel axe"; } if(skills.getDynamic(Skill.WOODCUTTING) >= 11 && skills.getDynamic(Skill.WOODCUTTING) < 21){ return "Black axe"; } if(skills.getDynamic(Skill.WOODCUTTING) >= 21 && skills.getDynamic(Skill.WOODCUTTING) < 31){ return "Mithril axe"; } if(skills.getDynamic(Skill.WOODCUTTING) >= 31 && skills.getDynamic(Skill.WOODCUTTING) < 41){ return "Adamant axe"; } if(skills.getDynamic(Skill.WOODCUTTING) >= 41){ return "Rune axe"; } return null; } @Override public void onPaint(Graphics2D g) { g.setFont(new Font("Arial",Font.BOLD,18)); g.setColor(Color.CYAN); long timeRan = System.currentTimeMillis() - this.Timer; g.drawString("Time Ran: " + this.formatTime(timeRan), 25, 282); g.drawString("Current level: " + this.skills.getDynamic(Skill.WOODCUTTING), 25, 300); g.drawString("Yew logs: " + LogChopped, 25, 320); } public final String formatTime(long ms) { long s = ms / 1000; long m = s / 60; long h = m / 60; return String.format("%02d:%02d:%02d", h %= 24, m %= 60, s %= 60); } public void onMessage(Message m){ if(m.getMessage().contains("You get some yew logs")){ LogChopped++; } } } Paste this to timer class public boolean Passed(long Minutes ){ return (Minutes * 60000) - getElapsed() < 0; } Progresses:
  13. Nvm it was just bot could not attack while my health is low and have no food in the inventory
×
×
  • Create New...