Jump to content

liverare

Scripter II
  • Posts

    1300
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    0%

Everything posted by liverare

  1. I doubt you can toggle user input from a script, because otherwise that would be a potential security flaw. Imagine your bot messing up, but for some reason you can't intervene at all. You could perhaps open a near-completely transparent Window to cover the bot screen and hide it again once you've made the switch. It's perhaps a very hacky solution, not to mention inefficient too. Your best bet is to ask Alek to allow scripts to toggle user input, but there'd be some caveat like only local scripts could do it, or that you'd need to specify a flag that enables it for that one bot client.
  2. liverare

    Coal bag

    If no configurations changed when you emptied/filled the coal bag, then there is no way to detect whether the coal bag is emptied/filled with configurations. I'd check myself, but I don't have a coal bag. You can always use event-based checking. This is where you grab the number of coal you have in your inventory before you add/remove coal from your coal bag, then you get the new number of coal in your inventory. Calculate the difference and add/subtract that from a running coal number.
  3. I have made the changes, hopefully this'll be updated on the SDN sometime soon. The new chat-box glassblowing interface has keyboard shortcuts, so now the script uses that instead of clicking the box to make glass stuff.
  4. If you haven't figured out arrays work in Java, then I know you haven't a clue what private final static means. You should probably tweak your code, unless you want to be that kid who hands in an A+ work, but who can't explain any of it.
  5. Create a Freedom of Speech Act and Bring an End to "Hate Speech" laws https://petition.parliament.uk/petitions/203615 If you agree and are eligible to sign the petition, I urge that you please do. :edit: Nearly 20K signatures! :edit2: Context for foreigners: if you say something mean/racist/muhsoggykneeist/someotherist on Twitter, Facebook, or any other social media site, you can be arrested and sent to jail for it here in the UK. It's fucking ludicrous. Granted, being an asshat on social media isn't a prize as you can be rightly fired from your job. However, if what you've posted isn't a clear, unambiguous intent to cause harm, then the government shouldn't be able to fuck your shit up fam.
  6. Occam's razor would suggest you were botting and you've come here, a sponsor on a botting forum, to try and make us believe you weren't botting.
  7. Because YT is all about that family friendly content. Dunno, but garden hose is the new meta.
  8. "Smart Botting On Main" The smart way to bot on your main is to not bot on your main.
  9. You can test whether the tile is reachable, which can found here. You should definitely separate out your logic, because you're looking for items and, whilst in the midst of doing that, are re-checking whether you're in danger. You don't/shouldn't do that. You should check whether you're in danger first then find those items: IF IN DANGER GO AND RECOVER ELSE IF FOUND ITEMS LOOT ITEMS ELSE WAIT FOR ITEMS I'm not going to write your entire script, but I will help you find items: private boolean isGroundItemSomethingWeWant(GroundItem item) { boolean yes = false; String itemName = item.getName(); for (String name : P2PLoot) { if (itemName.equals(name)) { yes = true; break; } } return yes; } Then you can do this: List<GroundItem> items = groundItems.getAll().stream() .filter(this::isGroundItemSomethingWeWant) .filter(map::canReach) .collect(Collectors.toList());
  10. Player me = myPlayer(); if (Bank.contains(me)) { if (getInventory().isFull()) { bankItems(); } else { goToJug(); } } else if (Jug.contains(me)) { if (getInventory().isFull()) { goToBank(); } else { lootJugs(); } } else { if (getInventory().isFull()) { goToBank(); } else { goToJug(); } }
  11. if (!getInventory().isFull() && !Jug.contains(myPlayer())){ return state.WalkToBank; } That may be an issue. Can I make a recommendation: stop using States. Read my thread on this topic. I think you can improve the structure of your logic: Player me = myPlayer(); if (Bank.contains(me)) { if (getInventory().isFull()) { bankItems(); } else { goToJug(); } } else if (Jug.contains(me)) { if (getInventory().isFull()) { goToBank(); } else { lootJugs(); } }
  12. import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.graphics.Point; Your problem is that OSBot doesn't come packaged with the SWT ("org.eclipse.swt") library. Your solutions are either: Ask a @Zach or @Alek to see if they can add the library into OSBot. This is unlikely due to it being more overhead for something that's likely to be very niche. Find the library's source code and include that into your script. Use the Swing ("javax.swing") library, because that is packaged with Java by default. You can look into JOptionPane to achieve what it is you're after, but in quite literally one line of code. I'd chose no.3 just because it's the easiest and doesn't add any additional overhead. You can literally just do: String[] trees = { "normal", "oak", "willow" }; Object input = JOptionPane.showInputDialog(bot.getCanvas(), "Select a tree", "Woodcutter", JOptionPane.QUESTION_MESSAGE, null, trees, trees[0]); String tree = null; if (input != null) { tree = input.toString(); }
  13. final Player me = myPlayer(); // Get all green dragons that are 'locked' on me List<NPC> greenDragonsFocusingOnMe = npcs.getAll().stream() .filter(npc -> me.equals(npc.getInteracting())) .filter(npc -> npc.getName().equals("Green dragon")) .collect(Collectors.toList()); // Get the green dragon I'm locked on NPC greenDragonsImFocusedOn = greenDragonsFocusingOnMe.stream() .filter(npc -> npc.equals(me.getInteracting())) .findFirst() .orElse(null); if (greenDragonsFocusingOnMe != null && !greenDragonsFocusingOnMe.isEmpty()) { if (greenDragonsImFocusedOn != null) { // wait for dragon to die // heal if low on health } else { // pick one of those dragons that are focused on you greenDragonsImFocusedOn = greenDragonsFocusingOnMe.get(0); if (greenDragonsImFocusedOn.interact("Attack")) { // ... do stuff } } } One thing I haven't included is the sorting of the green dragons by distance to you. I won't spoon feed you everything.
  14. There are tons of programming concepts, and introducing new programmers to them is the same as telling them to go learn it for themselves. Teach the basic concepts first, then the more advance ones later with an explanation why the advance ones are better.
  15. I wouldn't listen to what others have said, because from reading your code I can see you haven't quite grasped how loops work. You shouldn't be dabbling in enumerators, Lambda expressions, or even extending classes if you haven't figured out how to use loops. Also, be sure to separate chunks of logic into separate routines to make it easier to read and maintain: public String getNextArrow() { String result = null; int arrowCount; String[] arrows = { "Adamant arrow", "Mithril arrow", "Steel arrow", "Iron arrow", "Bronze arrow" }; for (String arrow : arrows) { arrowCount = getInventory().getAmount(arrow); if (arrowCount > 500) { result = arrow; break; } } return result; } public void equipArrows() { String nextArrow = getNextArrow(); if (nextArrow != null) { getInventory().interact("Equip", nextArrow); } } Now there are reasons to use enumerators and Lambda expressions to really enhance what it is you're trying to achieve. But sometimes, simple = better.
  16. Did you bot anything else in the past few weeks?
  17. Thank you for the report - I can confirm there is a problem with the script and I will fix this shortly. Sorry for the inconvenience. :edit: The problem has been resolved, but not by me. Apparently, there was a problem loading resources and updating the bot fixed it.
  18. Looking at the screenshot you posted: Perhaps Czar forgot to update the version number that gets rendered in the paint. If that's the case, then it's hardly a problem. Thread was updated on the 1th of January whereas you ran it on the 4th; that's only 3 days. Assuming things get backed-up on OSBot's side (for script updates), that's not too much of a wait.
  19. Nah, I'd sooner just let the users restart the script. I'm happy just as long as the script is fit for purpose.
  20. Came here for Bon Jovi, but was disappointed.
  21. I received a 2-day ban back in 2015: I believe it expired around 2016. I don't know the exact date, because I was not informed of it. It was just something I realised when I checked on my account status randomly. I stopped botting almost right away when I got my 2-day ban. When I did bot, it was something I did between doing it legit. Try to keep your botting to a minimum. If you can avoid botting, then do so.
  22. Didn't you bother to wait for the first ban to get squashed? Suspensions expire. If it expired then perhaps you got another 2-day ban.
  23. OSBuddy are able to record Grand Exchange transactions straight from their client, so their prices are factual. However, not everybody uses OSBuddy. If you're making a GE flipping script, then I'd suggest you pool price information from as many sources as possible, especially from Jagex themselves. It can't get anymore accurate than the actual RS GE website.
  24. If you get a chance to use it again, please snap a few proggies! They're always good to help advertise the script some more. :)
×
×
  • Create New...