Jump to content

Solzhenitsyn

Members
  • Posts

    181
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by Solzhenitsyn

  1. 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?

  2. On 7/23/2018 at 8:44 AM, myOSBaccount said:

    why don't we just implement machine learning in osbot? certainly it should be simple enough with how far technology has come

    4 hours ago, Supamen said:

    I mean, I'm sure we could get a plethora of people here to run patterns for OSBot, then we can use that data and randomise the path? I'm no programmer (I'm a Web Developer/Designer) so I could be well and truly off. Couldn't we use that data and then randomise the path? 

    In fact, I'm on YouTube getting a better understanding of Machine Learning right now - so stop me there if I'm talking some serious shit.

    :feels: 

    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. 

     

  3. 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();
        }

     

  4. 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. 

    ¯\_ツ_/¯

  5. 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

    Ut9U164.png

     

    Account 2

    s2W7pbC.png

     

    Account 3

    d4RYZCy.png

     

     

    Account 4

    WmBuVWp.png

  6. why u guys ignoring the message feels.png but yeh its his wish.

    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

     

    feels.png feels.png feels.png

    • Like 1
  7. It works, or you can check if your player has the death animation (which might be different now because of the grim reaper)

     

    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.

    • Like 2
    1. 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).

    • Like 1
  8. I obviously misread your post, doesn't take a genius to see that.

     

    Do I even know you? I don't think we've ever even talked before lol. Not sure why you're trying to act like such an elitist when you're clearly just the typical "I wrote a binary search algorithm and therefore am a wizard" kid. Get off your high horse before you start making a fool of yourself.

     

    As for your actual question no I don't think it's possible unless you manipulate the game directly. The bots refresh rate is directly correlated to the game because, as I said, the bot does nothing but draw using the same graphics context.

     

    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.

    • Like 1
  9. 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:

    Is there any way to reduce the refresh rate of onPaint (...)?

     

    Your response:

    The refresh rate is what's causing the "lag". Typically injection based bots (OSBot?) will hook into the relevant graphics methods to paint over the game buffer before it's drawn to the canvas.

     

    You're going to want to post your code so we can see if there's any optimizations you could do. 

     

     
    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).
     
    facep.gif
     
    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:
    oPSbdjo.png
     
    New (increased opacity to compensate for fewer vertices):
    f3HKzzn.png
     
    If anyone knows how to reduce the refresh rate of the paint, I would still like to know so that I can do both.
  10. Yeah, but how does it work? Is it using A*? Because I imagine that the pathfinding is calculated client sided when you issue a movement order, which could potentially be done by hooking the callback and getting the path and then not sending it to the server.

     

    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.

×
×
  • Create New...