Jump to content

LoudPacks

Members
  • Posts

    926
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by LoudPacks

  1. I live in America but I'm very glad it turned out the way it did.
  2. onStart since it only needs to be set once.
  3. Clean your project, remove osbot from buildpath and re add it, restart eclipse.
  4. http://osbot.org/forum/topic/100862-bank-closest-to-entity/ that will get the closest bank to your player, or you can hardcode one in instead either way. and then once you have that you can do: if(!currentBank.contains(myPlayer().getPosition()){ getWalking().webWalk(currentBank); } else { if(!getBank().isOpen()){ getBank().open(); new ConditionalSleep(2500, 3000){ @Override public boolean condition(){ return getBank().isOpen(); } }.sleep(); } else { //withdraw stuff etc. } }
  5. Yes but I dont really see why would release something like a shop buyer that doesnt work once a few people are using it on multiple accounts because regardless of money its going to be useless once many people have it
  6. So basically only if they are free is what your saying? AKA they shouldnt be uploaded because your not going to profit and it will just saturate whatever store your buying from + crash the item price.
  7. Google bot has like 2 mins online I think its a bot to keep the rankings up on google by simulating visitors.
  8. Area currentBank = closestTo(myPlayer()); private enum Bank { DRAYNOR(Banks.DRAYNOR), AL_KHARID(Banks.AL_KHARID), LUMBRIDGE(Banks.LUMBRIDGE_UPPER), FALADOR_EAST(Banks.FALADOR_EAST), FALADOR_WEST(Banks.FALADOR_WEST), VARROCK_EAST(Banks.FALADOR_EAST), VARROCK_WEST(Banks.VARROCK_WEST), SEERS(Banks.CAMELOT), CATHERBY(Banks.CATHERBY), EDGEVILLE(Banks.EDGEVILLE), YANILLE(Banks.YANILLE), GNOME_STRONGHOLD(Banks.GNOME_STRONGHOLD), ARDOUNGE_NORTH(Banks.ARDOUGNE_NORTH), ARDOUNE_SOUTH(Banks.ARDOUGNE_SOUTH), CASTLE_WARS(Banks.CASTLE_WARS), DUEL_ARENA(Banks.DUEL_ARENA), PEST_CONTROL(Banks.PEST_CONTROL), CANIFIS(Banks.CANIFIS), BLAST_FURNACE(new Area(1949, 4956, 1947, 4958)), TZHAAR(Banks.TZHAAR); private final Area area; Bank(Area area) { this.area = area; } } public static Area closestTo(Entity e) { HashMap<Bank, Integer> distMap = new HashMap<Bank, Integer>(); for (Bank b : Bank.values()) { distMap.put(b, e.getPosition().distance(b.area.getRandomPosition())); } HashMap<Integer, Bank> distMapSorted = sortByDistance(distMap); Area cBank = distMapSorted.values().toArray(new Bank[Bank.values().length])[0].area; return cBank; } private static <K, V extends Comparable<? super V>> HashMap<V, K> sortByDistance(Map<K, V> map) { HashMap<V, K> result = new LinkedHashMap<>(); Stream<Map.Entry<K, V>> st = map.entrySet().stream(); st.sorted(Map.Entry.comparingByValue()).forEachOrdered(e -> result.put(e.getValue(), e.getKey())); return result; }
  9. Dynamic gives you your current level, not experience
  10. Give me my 5 stars back and Ill mow your lawn for the rest of the year
  11. Integrating HLJ With OSBot General Requirements: Registered HLJ Account: http://heylookjagex.xyz/index.php Your HLJ token A Registered Script With Valid Script ID *A Bot-Token and Bot-ID If Tracking Specific Bot Instances (Optional) IDE With OSBot Script HeyLookJagex Thread: http://osbot.org/forum/topic/100322-botwatch-an-osbot-exclusive/ Class File Requirements: HJLServer Class: HJLEntry Class: InventoryMonitor Class: Installation: 1. Create the above classes in your project with the code displayed above. 2. In your Main.java create a new HLJServer object with the parameters. ​Make sure you place this in Main.java, onStart() or wherever your script starts, this should NOT loop. HLJ has two constructors: one takes a Script, Token, ScriptID, another takes Script, TokenID, BotToken, and BotID. The first constructor is to be used if you're tracking stats for ALL bots running your script. The second constructor is to be used if you're only tracking stats for that specific bot instance. In order to use HLJ with your scripts, you must have a registered account as well as a registered script with a valid script id.​ 3. Add your desired items and skills that you would like to track below your instantiated HLJ object. In this case I add woodcutting, bones, and oak logs; note that the item IDs are used. Skill linked items must be added with their corresponding skills as seen with oak logs. 4. HLJ runs on a separate thread so you must call exit() in Main.java on your HLJ object when your script exits. Documentation:
  12. There's a server debug mode with command line arguments in the latest dev version Im sure you run in debug mode with IntelliJ but I dont imagine its the simplest of tasks and I use Eclipse so I couldnt help you.
  13. UM THIS IS TARZAN (you can tell by the phill collins)
  14. Or you can use the log function and just log what its doing. For example, log your conditional statement results to see where its getting hung up. Also a good idea is to have it log the state its currently on.
  15. Some dank Java 8: private enum Bank { DRAYNOR(Banks.DRAYNOR), AL_KHARID(Banks.AL_KHARID), LUMBRIDGE(Banks.LUMBRIDGE_UPPER), FALADOR_EAST(Banks.FALADOR_EAST), FALADOR_WEST(Banks.FALADOR_WEST), VARROCK_EAST(Banks.FALADOR_EAST), VARROCK_WEST(Banks.VARROCK_WEST), SEERS(Banks.CAMELOT), CATHERBY(Banks.CATHERBY), EDGEVILLE(Banks.EDGEVILLE), YANILLE(Banks.YANILLE), GNOME_STRONGHOLD(Banks.GNOME_STRONGHOLD), ARDOUNGE_NORTH(Banks.ARDOUGNE_NORTH), ARDOUNE_SOUTH(Banks.ARDOUGNE_SOUTH), CASTLE_WARS(Banks.CASTLE_WARS), DUEL_ARENA(Banks.DUEL_ARENA), PEST_CONTROL(Banks.PEST_CONTROL), CANIFIS(Banks.CANIFIS), TZHAAR(Banks.TZHAAR); private final Area area; Bank(Area area) { this.area = area; } } public static Area closestTo(lemons.api.script.entities.Entity e) { HashMap<Bank, Integer> distMap = new HashMap<Bank, Integer>(); for (Bank b : Bank.values()) { distMap.put(b, e.getPosition().distance(b.area.getRandomPosition())); } HashMap<Integer, Bank> distMapSorted = sortByDistance(distMap); Area cBank = distMapSorted.values().toArray(new Bank[Bank.values().length])[0].area; return cBank; } private static <K, V extends Comparable<? super V>> HashMap<V, K> sortByDistance(Map<K, V> map) { HashMap<V, K> result = new LinkedHashMap<>(); Stream<Map.Entry<K, V>> st = map.entrySet().stream(); st.sorted(Map.Entry.comparingByValue()).forEachOrdered(e -> result.put(e.getValue(), e.getKey())); return result; } ---------------------------------------------------------------------------------------------------------------- WebWalk.walk(closestTo(myPlayer());
  16. Make your cc class implement MessageListener then in your main class do addMessageListener(new CC()); and then u can override onmessage as well which will fire when a message is received, then just check that its a CC message: this is useful for parsing the message text and username from a cc mesage: private String parseUserName(String messageText) { String temp = messageText.replaceAll("\\[(.*?)\\][\\S]", ""); String temp2 = temp.replace(":", ""); return temp2; } private String parseMessageText(String message) { return message.replaceAll("<[^>]*>", ""); }
  17. You can write your own logs to a txt file provided its located in the Data folder or a subfolder within the Data folder. Not sure if you can get the actual console output tho. Unless your making your own script you definitely cant do this.
  18. Some tips: - null checks - use conditional sleeps whenever possible - dont just write code in order, use logic and conditional statements for example: public int onLoop(){ //this is bad getBank().open(); getBank().depositAll(); getBank().withdraw("Coins", 20000); getBank().close; return 500; } public int onLoop(){ //this is better and is less likely to break if(!getBank().isOpen()){ getBank().open(); new ConditionalSleep(2500, 3000){ @Override public boolean condition(){ return getBank().isOpen(); } }.sleep(); } else { if(getBank().getAmount("Coins") >= 20000 && !getInventory().contains("Coins")){ getBank().withdraw("Coins", 20000); new ConditionalSleep(2500, 3000){ @Override public boolean condition(){ return getInventory().contains("Coins"); }.sleep(); } } if(getInventory().contains("Coins")){ getBank().close(); new ConditionalSleep(2500, 3000){ @Override public boolean condition(){ return !getBank().isOpen(); } }.sleep(); } return 500; }
  19. Open For Private Script Orders!

  20. That seems like exactly what I would need. Something like this Example: @Override public void onResponseCode(int code) { if(c.getType().equals(ResponseCode.ACCOUNT_DISABLED)) log("BANNED"); } The thing is tho, my code is all ran on a separate thread so how would I make sure that is called since the main thread is sleeping when the login manager is disabled?
×
×
  • Create New...