Jump to content

Bobrocket

Members
  • Posts

    1664
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    100%

Posts posted by Bobrocket

  1.  

    am i meant to know what kappa means

     

    Search Results
    kappa
    ˈkapə/
    noun
    noun: kappa; plural noun: kappas
    1. the tenth letter of the Greek alphabet ( Κ, κ ), transliterated as ‘k’
      • Astronomy
        the tenth star in a constellation.
        noun: Kappa
        "Kappa Orionis"
      • Biochemistry
        denoting one of the two types of light polypeptide chain present in all immunoglobulin molecules (the other being lambda).
        modifier noun: kappa

     

     

    kJuMNzh.png

    • Like 1
  2. Ya indeed that's what I meant smile.png

    I was just giving an example without going to deep.

     

    I think Osbot should change the way the interact with widgets.

    Like clicking the "Click here to continue" messages. you can either click on it at the whole left or right side of the chatbox.

    but what human does that? 

     

    Just with some very easy math you can actually get a more humanized mouse smile.png

     

    Khaleesi

     

    Just a bit of thought, would it be possible to calculate the actual bounds of a widget based on colours? I have no clue myself but if it's possible then that would be really good.

  3. Ya that's a good read indeed biggrin.png

     

    Thats issue with most of the scripts, the randoms values are spread way too much.

     

    A good way to decrease these random values, like clicking at the outer edge of an widget is to randomnize your numbers twice ^^

    random(random(xMin),random(Xmax)).

     

    This way you got a much higher change of hitting closer to the middle of the widget.

    There is still a chance you'll click the edge, but less likely.

     

    Not sure if that is what you are tryign to say ^^

     

    Khaleesi

     

    If you want to do something like that, you should look into distributions wink.png

    I wrote a small bit about distributions in my SmartKeyboard thread (cba to find it lol), but to sort of target the bullseye as it were (and then hit the bullseye 99% of the time), you'd take a normal distribution for both x and y:

    Point widgetPoint = new Point(getNormalDistributedRand(x1, x2), getNormalDistributedRand(y1, y2));
    

    Another way is to add up 2 randoms, eg 2 6-sided die have the highest probability of rolling a 7.

    int randX = rand(1, 6) + rand(1, 6);
    

    Reading the link I sent again, read how they note "depends on placement". This is where statistics starts to become a very big part of botting.

    If you look at my API, I take a lot of this into account. Look at my NPC file here, note the hover(), getSuitablePoints(), and the variety of random functions. What we're essentially saying when we hover is we're trying to match a point that is as close to the mouse as possible (ie doing less work; in words of Fitt's law getting as small an index of difficulty as possible) that is also a suitable point on the NPC. Think of it as a car with thinking and stopping distances. You want the stopping distance to be as small as possible, so we can technically say that we want to stop at the centre, and by the time we enter the rectangle we have finished thinking.

     

    Sounds very confusing, but it's about as human-like as you can get.

  4. Here's a good read for you: https://rs-hacking.com/resources/macroingdetection.pdf

    It's legitimacy is questionable, but it gives us good ideas of what to do.

     

    Some summary points:

    Bots lack accuracy and precision, which humans possess. (look at graph below)

    520px-Accuracy_and_precision.svg.png

    Low accuracy = far from the true value; high accuracy = close to true value

    Low precision = values very spread out; high precision = values close together

     

    Even when doing random(x, y) when taken enough times, the mean of random(x, y) is still going to be around (x + y) / 2.

     
     
     
     
  5.  

    Try something like this? (This is probably what typeString does, but with a substantial delay between each key)

    void typeFast(String str) {
        for(char c : str.toCharArray()) {
            getKeyboard().typeKey(c);
        }
        getKeyboard().typeKey((char)KeyEvent.VK_ENTER);
    }
    

     

    typeKey() still has the delay afaik (hence why my SmartKeyboard is still pretty slow).

    Also, when pressing enter, you want to send 13 & 10 in rapid succession (\r\n):

    getKeyboard().typeKey((char)13);
    getKeyboard().typeKey((char)10);
    
  6. But how is that any different doge.png

     

     

    Empty object will not throw errors when calling methods (thus making get...Finder.findClosest().interact/attack/pickpocket safe to use). Not null checking also allows a more understandable code base - "wouldn't an entity exist if it isn't null?".

  7. "As far as other APIs are concerned, they are typically made to bridge the gap between no knowledge and full knowledge (at least mine is). There are a lot of things that OSBot's API does that it shouldn't do"

     

    That IS what it should do, it makes sense in your program to write

    NPC dwarf = getNpcs().closest("Dwarf");
    if( dwarf != null ) dwarf.interact("Attack");
    
    

    So that you can then handle the case where there isn't a Dwarf nearby.

    NPC dwarf = getNpcs().closest("Dwarf");
    if( dwarf != null ) dwarf.interact("Attack");
    else log("Where's he gone??");
    

    It doesn't make sense to create a seperate method in an API to handle the null case, just sayin' wink.pngdoge.png

    NPC dwarf = getNPCFinder().findClosest("Dwarf");
    if (dwarf.exists()) dwarf.attack();
    else log("wtf");
    

    :/ :/ :/ :/ :/ :/ :/ :/ :/ :/

     

  8. Thanks for the idea. I will have a look at it, however, I doubt this is going to make it type fast, this is more making the typing look human (by making mistakes), I don't want mistakes in mine, I want it to type really fast (almost instant), as this is going to be ran on trash accounts so I don't care about how human-like it looks smile.png

     

    Someone had the source for an instant typer once upon a time, not sure how it was done but try looking into KeyEvents?

  9. Alright, here is a reasonable example of why you want to have control:

     

    Monster X is found in two regions, Region A and Region B.

     

    NPC monsterX = getNPCs().closest("Monster X");

    if(monsterX != null)

    monsterX.interact("Attack");

    else if (regionB.contains(myPlayer())

    walk(new Path(regionA))

     

    Not using null checks:

    getNPCs().closest("Monster X").interact("Attack"); //Does nothing, doesn't go to a different region

    Not using null checks with region switching:

    NPC monsterX = getNPCs().closest("Monster X");

    if(!monsterX.getPosition.equals(new Position(-1, -1, 0)) //See where I'm going with this?

    monsterX.interact("Attack")

    else if (regionB.contains(myPlayer())

    walk(new Path(regionA));

     

    You could do some hard spaghetti crap and make booleans for new NPC instances, but that's a hundred times worse than returning null. It's totally fine for scripters to do this because you guys know exactly what to expect from the behavior of your script. From our standpoint, this would be a nightmare.

     

    I know it's useless to reply at this point, it's been a long time. I'm not sure why I didn't say this in the first place, but in any data type present in OmniAPI, #exists() will define whether or not the object is both there and available to be interacted with (for example, in widgets it will check if the child isn't null and if the widget is visible). No need for nasty instanceof checks, no need for null checks either ;)

    if (getNPCFinder().findClosest("Dwarf").exists()) {
        getNPCFinder().getLastFound().attack();
    }
    else {
        log("not there :(");
    }
    

    Or, in your case:

    NPC monsterX = getNPCFinder().findClosest("Monster X");
    if (monsterX.exists()) monsterX.attack();
    else if (regionB.contains(myPlayer())) walk(new Path(regionA));
    

    Might be something to look in to ;)

  10. Thank you very much, I'll look into this code after my homework. I've seen you around the script dev section a lot and have been following your progress. Greatly appreicated. I hope to join scripter II when I meet the prerequisites.

     

    Will do. My room mate may actually know of this, hes taking game development and is in our programming II course in which the main language they teach in until progamming III is Java. I'll speak to him about this.

     

    Your tutorial for learning how to begin writing scripts is actually where I started from and I cannot thank you enough. I actually didn't realize how easy a lot of this is due to the API. I've looked at another member's custom API like OSBot's, however opted out to focus on learning more about OSB's API. I've been building off your sample tea thiever and will be converting it to a node "framework" soon to be more efficient on lower end PCs. I'm using it as a base to learn off of and hopefully expand it to more than just tea thieving which my version mellows out at 6k XP/hour due to my massive delays I have in place. I don't need a complex GUI such as your rock crab script. Thats a bit overdoing it for a simple something like this. I plan to just have a check box to see if the user (me) wants to bank the tea at the cost of a lower XP/hour. This is just helping us produce our script we plan to release which more details will be available when it comes time.

    I've been programming in .NET for a while now so a GUI is easier to work with for me. Thank you all very much for your time. If anyone else wishes to contribute or add more resources, I'd greatly appreciate it.

     

    As far as other APIs are concerned, they are typically made to bridge the gap between no knowledge and full knowledge (at least mine is). There are a lot of things that OSBot's API does that it shouldn't do, for example:

    getNpcs().closest("Dwarf").interact("Attack");
    

    Will break your script if there is no "Dwarf" NPC. Little shameless self plug here, but my API allows this (eg no script breaking)

    getNPCFinder().findClosest("Dwarf").attack();
    

    What you might notice in the change between .NET to Java that there isn't as much type checking (ie you do a lot of default(type) in .NET for a lot of classes whereas you don't really in Java). You also have to use the .equals(object) method in Java, instead of using == in .NET. Lastly, Java tends to use methods for public modifiers (eg .getItem() vs .Item). Good luck!

    • Like 1
  11. Back in 2011-2013, a few friends and I were writing a game.

    Granted, we didn't get too far, and its "legacy" remains unnoticed.

     

    Some screenshots of showing the evolution of the game:

     

    November 2011

    ad641075b494509ee6bbaa932c3bddc3.png

    First "build" if you will.

     

    Late November 2011

    0f0c4419922fb0a6ffed83e13dfec506.png

    Random map generation; no specific algorithm, just pure random.

     

     

    Late December 2011

    22876daa5ba529f1424e3d2f4229ddcf.png

    491d2cab32d1135c2f41e4767ba808a4.png

    We had moved from pure VB.NET w/ GDI+ to C# with XNA. Was better for everyone in the end.

     

    Jan/Feb 2012

    pic.png

    (Sorry for low-res, it was a thumbnail that was cached) - we had made better progress on the map editor and more tiles etc. We also had a better map generating algorithm than before.

     

    If I get my hands on any other screenshots, I'll post them :)

    • Like 1
×
×
  • Create New...