Jump to content

Bobrocket

Members
  • Posts

    1664
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    100%

Posts posted by Bobrocket

  1. Looking good for a first!

    A few things:

    • You do a lot of unnecessary null checks on bestree. In the time it takes you to check if it is visible, it's not going to change to null.
    • Also, you would run away if the mugger is existing (but not targeting you) - check if both the player and mugger are in combat
    • You also define "tree" in a lot of local scopes - this can mean that the "tree" defined in getState() is different to the "tree" defined in onLoop() - keep variables like that outside the method scope and instead in the class scope (so every method can access it)
    • You only check if the "tree" is not null, not the oak tree (assuming woodcutting is > 15)
    • People would begin cutting oaks at level 16 (use >= 15 to start at 15) - if this is what you want then leave it as it is :)
    • It takes around 6-7 seconds for an NPC to lose interest of you after you are out of its range. Out of the mugger's range may be inside the castle, for example.

    If you have any questions, feel free to message me :)

    • Like 1
  2. I have done some trials to see exactly what random.dat is. I'm still not 100% sure what it is, but hopefully this helps some people:

    • random.dat stays the same until it is deleted
    • It is always length 24 (the client will make an entire new random.dat if it is above length 25)
    • In the RS client, it is a RandomAccessFile object
    • It is always opened with the read and write permissions

    The process when making a new random.dat:

    • If there is no random.dat, on client launch it will create one
    • At this point, it will contain a single character -  ÿ (hex -> 255/FF)
    • When your client logs in, it will increase in size from a single character to 24.
    • This file is never altered from then onwards, however there is something weird that I found that does write to the RandomAccessFile handler that holds the random.dat

     

    Pseudocode:

    random.dat is a "ht"
    
    A ht ->
    new ht(file, string, long)
    
    IF (file.length >= long) delete file
    
    b = new RandomAccessFile(file, string)
    n = b.read();
    if (n != -1 || !string.equals("r")) {
    	write n in the first position
    }
    
    seek to 0
    

    I believe that what this does is essentially make sure that the file is valid - if "n" was -1, it would mean that the read operation failed.

     

    From what I have seen, I believe it might be better if, instead of fully removing random.dat or making a new, empty, read-only one, you should create a read-only random.dat with the hex character FF written inside. This is because it is written like so by the game itself, and therefore is a valid format (or so it thinks), and doesn't look as suspicious (considering it could just very well be a failed write operation after login - there are no stages where random.dat is empty). I will continue my espionage within the OSRS client to see if I can find anything else of interest regarding random.dat.

     

    Good luck everyone!

    • Like 4
  3. To get the pay increase do I multiply the current salary which is 65789.87 * (.05) 5%? For Miller Andrew. 

     

     

    float increasedSalary = (oldSalary / 100) * payIncrease;
    float updatedSalary = oldSalary + increasedSalary;
    
  4. That is certainly impossible.

     

    Those errors happen because the model of ground item is being 'uploaded' but the ground item data itself is not yet available to client.

    Just ignore them for now

     

    Alright, sorry. I was just babysitting the script and I saw an error so I thought I should report it :)

    Mirror mode seems to be working brilliantly otherwise, good job :D

  5. To get mirror mode working, download the latest mirror mode jar (v1.07+ supports mac), and put it in your OSBot/Data folder.

    Start OSBot and choose Mirror mode.

    Load up  an RS client (people have reported OSBuddy doesn't work, so try just in the web browser), and make sure it is left on the login screen.

    Start your specified account,and it should detect and load.

  6. Please don't use custom methods as a basis for bug reports. Test against either:

     

    MoveMouseEvent

    or

    InteractionEvent

     

    This will help both MGI and myself find and test specific parts of code.

     

    Switching from interactable.hover to a MoveMouseEvent, give me a bit of time to push the changes to my VPS.

    MoveMouseEvent code:

    public void hover(NPC n) throws InterruptedException {
            if (n != null) {
                EntityDestination ed = new EntityDestination(getBot(), n);
                MoveMouseEvent mme = new MoveMouseEvent(ed);
                mme.execute();
            }
        }
    
    

    Seems that I get NullPointerExceptions at mme.execute();, not entirely sure why as I have never used events before (kept to the methods like hover/interact etc.) Sorry!

  7. let us know how the linux runs tongue.png

     

    Runs really well on Linux. Uses maybe 50mb more RAM than in Windows, and the only problem I have personally encountered is slow mouse movements using the interactable.hover() method.

     

  8. Edit: Using Ubuntu 14.04.2 32 bit.

     

    So, I am testing my own little combat script, and it seems that it can take anywhere between 1 second to a minute to hover over an NPC. The screenshot below shows this (explanation below)

    36424b3ac5d1cdfb509e76390a78cbb0.png

    Code snippet:

    if (npcViable(npc) && npc.getAnimation() != 361) {
    						log("Found npc " + npc);
    						npc.hover();
    						while (!getMouse().isOnCursor(npc) && npcViable(npc)) { npc.hover(); sleep(focusRand(100, 250)); }
    						if (npcViable(npc)) {
    							if (getMouse().getOnCursorCount() > 1) {
    								npc.interact("Attack");
    								log("Attack by interact");
    							}
    							else {
    								getMouse().click(false);
    								log("Attack by click");
    							}
    							sleep(focusRand(450, 750));
    							target = npc;
    						}
    						else {
    							target = null;
    						}
    					}
    

    It gets stuck in the while loop for the duration.

    On the npc.hover() function, it will move a pixel or so for each iteration.

    I can tell because of the time difference between the "Found npc" and "Attack by interact/click", as there is no computing heavy code between those log functions (and it will work flawlessly on windows)

    I know that Linux is a work in progress and so forth, but otherwise it's flawless smile.png Seen no differences between Windows and Linux and it seems to use just as many resources too! biggrin.png You did a good job on the new mirror mode update

  9. Here are my bookmarks (not screenshotting because fuck you):

    -A Unity3D Minecraft project I took interest in

    -The song "Forever Young"

    -The SVG specification for "d"

    -The wikipedia article for SVG

    -Some boring imgur posts

    -The sapphire support page

    -Some wiki page for Jak X: Combat Racing

    -My tumblr blog

    -Some porn

    -4 more boring imgur posts

    -A mark scheme for a maths paper

    -Login page for a porn site

    -419eater.com

    -"You Are Awesome - A Message From Zoey Proasheck"

    -porn

    -A SNL sketch involving Smash Mouth

    -2 more boring imgur posts

    -The Ban Theory thread somewhere on this forum

    -3 hours of relaxing smooth jazz??

    -A skyrim mod list

    -A porn video entitled "Spank that bitch" which is actually a video of someone reformatting a harddrive

    -Scripters' info page

     

    Do I win :doge:

    • Like 1
  10. There are some cases where you can win unauthorised disputes, however they are rare. Companies like Steam can just take away whatever they bought, so it is no problem for them to lose out on $10 from sales of a product which can have infinite sales. If you have a business account, you are actually more likely to win disputes (in what I've seen, at least).

  11. So, I have this map (warning super large ass image) and I want to be able to get the world position given a position on this map and vice versa. I have some data however I cannot get any equation to do so.

     

    Data points:

    The world position (3218, 3218) is the point (2468, 2010) on the map.

    The world position (2662, 3294) is the point (1358, 1861) on the map.

     

    Is there any equation to get the correct position?

     

    Thanks <3

  12. I have a similar problem with interacting (2.3.75), and I wrote a custom method to stop it.

    You could do something like this until it gets fixed:

    RS2Widget widget = getWidgets().get(218, 35); //HLA
    Rectangle widgetRect = widget.getBounds();
    
    int newWidth = widgetRect.width - 2; //2 px inside boundaries so no chance of misclick
    int newHeight = widgetRect.height - 2;
    int newX = widgetRect.x - 1; //Get in the middle of the 2px boundary
    int newY =widgetRect.y - 1;
    
    Point pointToClick = new Point(random(newX, (newX + newWidth)), random(newY, (newY + newHeight))); //Random point within the bounds
    
    while (!getMouse().getPosition().equals(pointToClick)) { getMouse().move(pointToClick.getX(), pointToClick.getY()); } //Move mouse
    getMouse().click(false); //Left click
    //Click the inventory item or whatever
    
    

    Good luck!

×
×
  • Create New...