Jump to content

Solzhenitsyn

Members
  • Posts

    181
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Solzhenitsyn

  1. I typed an MCVE by hand, parentheses are not the problem.
  2. I have a question about sorting in a stream. When sorting using a single comparator, o is an RS2Object and the reference to realDistance is found. objects.getAll().stream.sorted(Comparator.comparingInt(map::realDistance)).findFirst(); When I try to use a second comparator to tie-break, o is an object and the reference to realDistance and bar are not found. objects.getAll().stream.sorted(Comparator.comparingInt(map::realDistance).thenComparingInt(foo::bar).findFirst(); I am also unable to reverse the result of the sort. objects.getAll().stream.sorted(Comparator.comparingInt(map::realDistance).reversed()).findFirst(); What is the correct way to tie-break a sort in a stream?
  3. It would be much easier to use ML to classify behaviour as bot-like or human-like than for it to generate human-like behaviour.
  4. @Butters If I replace the `ConditionalSleeps` with `while-pred-sleep`, everything else works. edit: derp no markdown
  5. When I try to construct an instance of the ConditionalSleep class, OSBot throws a ClassNotFound exception: Caused by: java.lang.ClassNotFoundException: ConditionalSleep at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 3 more Example usage: new ConditionalSleep(10000) { public boolean condition() throws InterruptedException { return !myPlayer.isAnimating() } }.sleep(); Originally I tried to wrap it in a function to improve the semantics, but since I can't even construct an instance of the class I don't know if it works. If anyone knows what's wrong, I'd appreciate it if you shared. Wrapped in a function (untested): public void conditionalSleep(BooleanSupplier predicate, int timeout) { new ConditionalSleep(timeout) { public boolean condition() { return predicate.getAsBoolean(); } }.sleep(); }
  6. If your class requires that you use it, then you have to use it. Not much that you can do other than suck it up if you are trying to do well. If you're learning about classes and objects, you're probably still in an introductory class anyways so it should be easy anyways. ¯\_ツ_/¯
  7. Accounts mostly hand leveled. Agility (and high alching while doing agility) was botted. Small amount of hired power leveling done. 2 questions: 1. Price for accounts with no wealth and quests nominally completed. 2. Price check for account with Zulrah quest line completed + fairy ring access + most of Zulrah BIS gear. Account 1 Account 2 Account 3 Account 4
  8. boolean death_flag = false; @[member='Override'] public void onMessage(Message message) { if (message.getMessage().contains("dead") && message.getType().equals(Message.MessageType.GAME)) { log("progamerz raped my butthole :feels:"); death_flag = true; } } my butthole m8
  9. Checking if your HP is zero, or if your character has played the death animation works, but you shouldn't do it because it will only work if a conditional check is executed while those conditions are true. If your script is executing instructions in a loop when you die, then the animation will play and your health will be full when your conditional statement runs. Checking to see if you are in the death area is safer, so you shouldn't do either one of those things.
  10. I can. Feel free to add me on Skype: live:aek.solzhenitsyn aek.solzhenitsyn@@gmail.com
  11. Don't use mirror mode. It's a waste of resources, traded for a seemingly negligible increase in security. You can use a VPN to proxy while using the mirror client. I always use injection. Many scripts are not mirror client compatible. It breaks all dialogue operations, and many widget operations. I don't understand your question. Are you asking how to run multiple bots? Run multiple instances of the client. In my experience, running multiple bots in one client does destabilizes the client (and often causes you the hit the maximum allocated memory, so the garbage collector gets called frequently which will cause your CPU to work double time).
  12. I am totally willing to admit that I know almost nothing about computer science. What you are not willing to admit is that you don't read threads, often not even the first post in a thread, before posting advice. That's useless, and a waste of space. So you are correct, I'm no wizard -- but your thoughtless and lazy posts on the threads of myself and others contribute less than virtually any other member who regularly posts on the scripting forums. You obviously know a lot, but withholding that information by teasing only a hint of the solution, or worse yet, delivering nothing at all is far worse than knowing little but making a real attempt to help.
  13. ChopTrees a; // Create in parent frame onStart() { a = new ChopTrees(this) // Initialize in onStart } onLoop() { a.<...> // Access in onLoop } Edit: If you have no idea what's going on
  14. Swizz, don't take this personally (or do, I don't really care) -- I don't think you've ever said anything useful to me before. Half of the time, I don't even think you've read the post or any of the thread. For that matter, I'm actually trying to think of the last time I've seen you say something useful, period. My question: Your response: The worst part is, your response isn't even correct -- the refresh rate only matters because it contributes to the quadratic explosion (e.g., a high number of vertices versus a high refresh rate). Thanks, @Imateamcape @@House. Here is my solution, which is more resource intensive than House or TC, but reduces it to a manageable level: Filter out 2/3 of the vertices which exist in the mesh: Old: New (increased opacity to compensate for fewer vertices): If anyone knows how to reduce the refresh rate of the paint, I would still like to know so that I can do both.
  15. Hi, I am drawing wireframes of relevant entities while I am debugging, but on my toaster it is causing a lot of lag. Is there any way to reduce the refresh rate of onPaint, or a cheaper way of drawing wireframes? Drawing tiny rectangles...
  16. https://en.wikipedia.org/wiki/The_pot_calling_the_kettle_black
  17. A suggestion: Store proxy/bot info, preferred worlds, and local/script names in a json, and allow users to use that information from a drop-down menu during script creation, or to auto-fill fields using settings templates. Nice project.
  18. I don't see how this is faster, since it's the difference between locally calculating a path using whichever pathfinding algorithm the OSB team has implemented, and locally calculating a path using whichever pathfinding algorithm Jagex has implemented.
  19. Signed, Obnoxious/inconsiderate assholes in the library.
×
×
  • Create New...