Jump to content

Butters

Lifetime Sponsor
  • Posts

    650
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Butters

  1. This is lovely, though OP wanted to know how to do this with a proxy
  2. Lol good idea. Though if you need to do this for your proxies to work properly, best thing would be to change your proxy in the first place. Have all the ips of jagex servers?
  3. https://wiki.centos.org/FAQ/CentOS6 try the #2 part
  4. Very very likely that his firewall isn't setup to permanently allow certain ports, hence stopped working after reboot
  5. Internet access to what exactly? The http (or whatever) service running on your CentOS machine or the machine itself?
  6. This reminds me when US challenged Japan (or the other way around) to a big ass robot fight that was actually done last year. Hoped it's gonna be cool, sadly wasn't This though lol - gonna have backflipping pizza delivery robots in the future.
  7. Ah, so web walker notices that it's in dialogue and tries to solve it (inbuilt stuff) ,though cause it doesn't have the link it eventually times out. Thanks. What happens is it times out after like 15 seconds and my call to solving the dialogue (after webwalking) gets executed. Don't have the exact web walker message atm though. It's a niche quest area in Black Knights Fortress. I don't think it's used anywhere else apart the quest. Are these links worth adding for web walking? They're nothing special. Though most other parts of the castle are mapped. If you think this should be added then say so and I'll make a request in the correct forum section.
  8. Guessed as much sadly. If there''s no other option then yep, the only way would be to do this "manually"
  9. Oh lol so this is a thing now. Good job. Might want to record the entire process.
  10. If your main class is something like this publi public class Goblins extends Scripts { .. } and you call getBestArrow inside this exact class then you need to do getBestArrow(this);
  11. just pass Script instance to getBestArrow(). It's your main script class (used to access inventory info and etc). And Enum ordinal is the "position" of each element. So if you create an enum like public enum Arrows { BRONZE_ARROW, IRON_ARROW, STEEL_ARROW, MITHRIL_ARROW } bronze ordinal will be 0, iron will be 1, steel will be 2, mithril will be 3. If your enum elements are ordered correctly, in this case, from worst arrow to best, then the higher ordinal() value is returned - the better the arrow is. Now for the stream sorted() method: It just sorts the values, in the this case, in reverse order (from best to worst). So it calls ordinal() method to get which one is best and then sorts by that.
  12. Could also create an enum, cause it's by nature meant to be a "classifier". Then just go through all the list at one go and no need for lenghty hardcoded if statements enum Arrows { BRONZE_ARROW("Bronze arrow", 1, 50), IRON_ARROW("Iron arrow", 1, 50); // Etc, add more private String name; private int level; private int minimumAmount; private Arrows(String name, int level, int minimumAmount) { this.name = name; this.level = level; this.minimumAmount = minimumAmount; } public String getName() { return this.name(); } public int getLevel() { return this.level; } public int getMinimumAmount() { return this.minimumAmount; } } public String getBestArrow(Script s) { Optional<Arrows> arrowOpt = Arrays.asList(Arrows.values()).stream() // Only get those which you can wield .filter(f -> s.skills.getStatic(Skill.RANGED) >= f.getLevel()) // Check if has in inventory .filter(f -> s.inventory.contains(f.getName())) // Check if has the minimum amount .filter(f -> s.inventory.getAmount(f.getName()) >= f.getMinimumAmount()) // Sort in a descending order (last entries in enum first) returns best arrows first .sorted((m, n) -> n.ordinal() - m.ordinal()) .findFirst(); if (arrowOpt.isPresent()) return arrowOpt.get().getName(); return ""; } This should (didn't test it) find the best arrow you can equip if it's in inventory Could use like this String bestArrow = getBestArrow(/*param*/); if (bestArrow != "") s.inventory.interact("Equip", bestArrow);
  13. To my very little understanding, I'd say that something is blocking your connection to the WEB from OSBot application. Try disabling your firewall
  14. Wanna use webwalking and break once in dialogue. What I noticed that it takes a very long time until the break condition fires. Using: WebWalkEvent event = new WebWalkEvent(SECOND_PUSH_WALL_AREA); event.setBreakCondition(new Condition() { @Override public boolean evaluate() { if (dialogues.inDialogue()) { log(formatTime(System.currentTimeMillis() - startTime) + " In dialogue"); return true; } return false; } }); log(formatTime(System.currentTimeMillis() - startTime) + " Executing walking"); execute(event); Output: [INFO][Bot #1][01/27 10:08:04 AM]: Started script : Test2 [INFO][Bot #1][01/27 10:08:04 AM]: 00:00 Executing walking [INFO][Bot #1][01/27 10:08:20 AM]: 00:16 In dialogue [INFO][Bot #1][01/27 10:08:20 AM]: WebWalkingEvent; Terminated because of break condition! The time it takes until the dialogue pops up is like 1 - 2 seconds. So there's roughly a 14-15 seconds wait period. If I just return true in break condition event.setBreakCondition(new Condition() { @Override public boolean evaluate() { log(formatTime(System.currentTimeMillis() - startTime) + " Returning true in break"); return true; } }); I get [INFO][Bot #1][01/27 10:13:18 AM]: Started script : Test2 [INFO][Bot #1][01/27 10:13:18 AM]: 00:00 Executing walking [INFO][Bot #1][01/27 10:13:19 AM]: 00:00 Returning true in break [INFO][Bot #1][01/27 10:13:19 AM]: WebWalkingEvent; Terminated because of break condition! So it's instant. I need it to be as quick as possible in this case. The dialogue opens up once the webwalker clicks on the door to open. Anything I'm doing wrong?
  15. A long shot, but is your firewall letting the connection through? Try disabling it. Edit: Try reaching just from browser https://osbot.org/mvc/get/ver
  16. Open up command line (in Windows it's Windows key + R and type in cmd) nagivate to where OSBot is. Probably do cd Desktop Then launch OSBot from command line with debug enabled java -jar "OSBot 2.4.157.jar" -debug 5011 and post log ouput if there are any errors. Btw be sure to use Java 8 and not Java 9. execute this in command line to confirm java -version
  17. Started with this release Short description: After running the script for about 30~ minutes onMessage() method doesn't fire at all (doesn't catch any new in game messages). Verified this by adding log() call on each call to onMessage(). Additionally, have a custom login handler implemented to track bans. Once onMessage() starts failing - login code listener also stops working. Failed to find what my script does specifically so that listeners start failing. Other scripts work fine. Any way to maybe restart the listener thread?
  18. Thanks for the answer. Dunno if the place to mention this, but exactly at the end of November one of my scripts started failing to get info from message and login code listeners (was working fine until then). I don't think that any other users reported anything similar. Tried debugging a lot but couldn't find the issue.
  19. Recently noticed that a few users have been banned on forums who, at least they claimed, were willing to release "high end and complex" open source scripts, eg. Zulrah and Slayer. Mods will probably know who I'm talking about. I didn't see any disputes or anything of the sort. Naturally, my question is were they involved in any rule breaking or unwillingness to cooperate? Asking in order to get my head straight about what is and what is not allowed regarding scripts, or "behavior". If, for any reason this thread is innapropriate, feel free to close it.
  20. Butters

    OSBot 2.4.157

    .157 works like a charm. Thanks for the effort
  21. Same as with 154 on Ubuntu. Setting memory at 1024MB Debug enabled on port 5012 Starting OSBot in low cpu mode Clearing all randoms from OSBot Starting local script with name: Fancy [DEBUG][01/25 05:15:35 PM]: Injected 2 field list filters [DEBUG][01/25 05:15:35 PM]: Injected 2 field filters [DEBUG][01/25 05:15:35 PM]: Injected 2 method list filters [DEBUG][01/25 05:15:35 PM]: Injected 3 method filters In debug mode! Listening for transport dt_socket at address: 5012 Stealth injection class-filter enabled! Successfully loaded OSBot! Stuck here. Pm if need to test a dev build.
  22. Probably cause he's talking about SDN scripts and not private scripts. And as you mentioned, doing scripts for SDN is a great way to "increase your value". Though honestly, even if you "stamp" your private scripts from templates, anything a lil more advanced and not costing at least a 100$ is a joke. Though, as you mentioned, until you enjoy it - no biggie. For example people asked me to make private scripts with muling and what not for 10-20m, well sorry for being greedy then
  23. Thanks, had a hunch it won't be easy. Tried getSizeX() and getSizeY() (both deprecated) on npcs earlier but they returned wrong values.
×
×
  • Create New...