Jump to content

Lemons

Lifetime Sponsor
  • Posts

    620
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Posts posted by Lemons

  1. Damn, cost me $50 for my LLC but that is me doing the paperwork/being the registered agent. Smart move either way ^^

     

    Any reason the network in speed is 40x the out speed? Seems a bit backwards to me. Also, what type of processor is the KVM running on, or can you define a "core"? Might be getting one, they are priced nicely.

    • Like 1
  2. From what I understand you want to capture if a user clicks somewhere, and add it to the event queue to the bot will execute that sometime in the future. Capturing the user input is actually easier than you'd think:

    private BotMouseListener listener = new BotMouseListener() {
        // Required funcs
        @ Override
        public void mouseReleased(MouseEvent e) {}
        @ Override
        public void mousePressed(MouseEvent e) {}
        @ Override
        public void mouseExited(MouseEvent e) {}
        @ Override
        public void mouseEntered(MouseEvent e) {}
        @ Override
        public void mouseClicked(MouseEvent e) {
            if (e.getPoint().equals(getMouse().getPosition()))
                return; // The bot generated this click, ignore it
            
            if (getClient().isHumanInputEnabled())
               return; // Ignore incase they have human input enabled
            
            // Queue human interaction or w/e
        }
    }
     
    // Then add these lines to script startup
    getBot().getCanvas().addMouseListener(listener);
    
    // Then add these lines to script stop
    getBot().getCanvas().removeMouseListener(listener);
     

    From here you can make a queue that your script can process when it is ready.

     

    Edit: Also in the future, its usually easier to explain your end-game (in this case queuing user actions to be performed by the bot). Tends to get more possible solutions quicker.

    Edit2: OSBot don't like my "@ Override" (references some banned dude lol), so had to add spaces. Heres a pastebin: http://pastebin.com/kVzsuAba

  3. Clouds don't seem to have any entity type, even if they do hurt you in-game (their behavior is identical to the Zulrah toxic clouds, excepting the damage type/values). 

     

    (Client debug -> entity hover debug shows nothing, and various scanner options also return nothing. They also have no upper-left tooltip when moused over.)

     

    Zulrah clouds are a RS2Object, you can view the IDs using the "Objects" checkbox in the debug. The mouseover doesn't work as I assume they are rendered different than normal RS2Objects.

    • Like 1
  4. You seem to be calling "random(xxx, yyy)" when you intend to call "sleep(xxx, yyy)", this will cause a lot of lag especially in the while loops. Try using a ConditionalSleep instead of the while, or a for like:

    for (int s = 0; s < 10 && someCondition; s++) sleep(100, 200); // Sleeps 1-2s or until someCondition is true

    Though ConditionalSleeps will be a better solution. I tend to avoid while loops due to these issues they can cause.

    • Like 1
  5. SecureRandom random = new SecureRandom();
    String password = new BigInteger(130, random).toString(32);
    System.out.println(password);
    

    Copy/paste the output and save it in a secure location such as a sheet of paper. Better than any password generation site on the internet.

     

     

    I agree with this, I personally use 20 character randomly generated passwords, as they entropy is much higher than a typical password and is secure enough in my mind that most would be bored. But, if I replaced that with a randomly generated 20 word passphrase, I'd feel just as safe.

     

    The problem is most people don't want to remember all that crap, so they just choose "dog" or "cat" or some equally lame password, when a passphrase would also be easily remembered and has a lot more entropy than "dog" or "cat". Most people don't want 20 characters of random numbers/letters for their password, let alone a different one for every website.

     

    If we really wanted to be secure, we'd start using keys more often. Also, storing passwords in plain text, no matter the location (except your head, for now), is a terrible idea as well. Use a secure password manager at least or place the paper in a secure safe (you'd be surprised how many safes are just pseudo-safe :p).

  6. A pass phrase is the worst idea you can possible have for a password, speaking from my experience on "the dark side". Every single password cracking tool like the famous "John the Ripper" will be testing all possible combinations of words that satisfy a length requirement from a dictionary even before testing for short and easy "random strings" like ies29kf.

     

    PS: password cracking dictionaries work against all words in all languages as these dictionaries have terrabytes of data to store every combination of literals that humans understand

     

    This is only true if the passphrase is too short (not enough entropy), or its not randomly generated (which further reduces entropy). As my example showed, the 6 word passphrase has the same entropy as the 10 character lowercase/uppercase/number password given. All passphrases do is replace individual characters and the range that is possible (A-Za-z0-9) with words from the dictionary, making the passphrase essentially a "6 character" password, if words could be considered a "character" that is known in advance. In both cases, all the possible characters/words are known from the beginning, its just the combination the computer has to find. I do agree that passphrases can be easily done wrong, but so can passwords. Its all about that entropy.

    • Like 1
  7. While that password is alright, at the very least you should add uppercase characters. This increases entropy by a good amount, and all websites will allow the uppercase/lowercase/numbers. If you want, can also add some special characters too, but the entropy boost is negligible. If you want really good passwords, make them longer!

     

    Also, for those of you who all like "I can't remember random strings of letters/numbers", consider a pass phrase. Its something like "hurry-clean-lone-wall-shade-slow" (used a generator). This has 61 bits of entropy if the attacker has full knowledge of how we strung the words together, and just has to guess the words. I used https://xkpasswd.net/s/ to generate the passphrase, its based on this XKCD comic:

     

    password_strength.png

     

    The only downside to this is the terrible websites that have a max character limit on their passwords. Just know these sites care very little about your security (*cough*microsoft*cough*).
     
    In summary, a list of example passwords along with how much entropy they have:

    5b4m2b5q34 ....................................... 41 bits of entropy (lowercase/numbers, 10 characters)
    WnYXdikU90 ....................................... 60 bits of entropy (lowercase/uppercase/numbers, 10 characters)
    hurry-clean-lone-wall-shade-slow ................. 61 bits of entropy (basic passphrase 6 words)
    l8J^,kAyM/ ....................................... 66 bits of entropy (lowercase/uppercase/numbers/special, 10 chars)
    qmapwjnjdsel5aqlw6wy ............................. 90 bits of entropy (lowercase/numbers, 20 chars)
    +kKCc~S0Dy27ni!4nSQ~ ............................. 118 bits of entropy (lowercase/uppercase/numbers/special, 20 chars)
  8. 1. random and sleep have nothing to do with each other. Script is just a type of thread - sleep stalls the thread (makes it sleep) for a random amount of time, given by an int. random returns an int, so its used to randomize the amount of time that hte bot sleeps for.

     

    2. GroundItem g = groundItems.get(name / id);

    g.interact("Take");

     

    Explore the API a little more before making scripts. It'll help.

     

    groundItems.get(x, y) is the only "get" there is, you're probably thinking groundItems.closest(name/id).

     

    @@PancakePuncher But you should read/search the API, links at the top of the page (or here: http://osbot.org/api/ )

  9. You said you go to the gym, so exercise isn't the issue. Are you inside a lot? Try taking Vitamin D supplements, deficiencies can cause all sort of depression related issues. Also, if you drink a lot of caffeine it can cause depression like symptoms. Besides that, just try and think positively and when a negative thought comes up, think about it as logically as possible to disprove the negative bias. Try and set some short-term and long-term goals and work towards them as well. Maybe try to do things you normally wouldn't as well.

     

    Most important, don't sit around moping and beating yourself up. When that happens actively try to do anything else (clean the house, anything really) to distract from the negativity. Sometimes this is impossible but just make a best effort.

     

    Depression can be a bitch, but with the lows can come the highs.

  10. I do believe this is to blame:

     

    SVtTnA2.gif

     

    Also the other javascript based animations (names), should use CSS animations :p

     

    Edit: Did a lil profiling and it is indeed all the stuff being painted, maybe a low cpu version is needed for the site too doge.png

     

    t42ZniR.png

     

    Edit 2: Seems all the GIFs are too blame, lol

    • Like 1
  11. I know this issue crops up from time to time, I'm here with a way to fix it :) Thanks bot2max for letting me figure this out on his windows 10 tablet.

    Compatibility method for Windows 10 ONLY

    Spoiler

     

    Step 1 - Open OSBot and the Task Manager, right-click "Java(TM) Platform SE Binary (32 bit)" and select "Open File Location"

    jIPcVpY.png

    Step 2 - Right-Click the selected file and select Properties

    5zQobEr.png

    Step 3 - Go to Compatibility tab, and check "Disable display scaling on High DPI settings"

    TjVcjIb.png

    Step 4 - Restart OSBot

    Manifest hack method (WARNING: This ONLY works on Windows 8.1/10.)

    Spoiler

     

    If you are on 7 or 8, you're SOL, this guide will not work and cause issues with your setup.

     

    Now that is out of the way, lets continue on. Basically, the issue is java is a "dpi aware" application, at least according to windows. As we can see, this is not the case as its microscopic when you launch it on higher DPIs. So, we need to tell windows that java is not in fact dpi aware.

     

    Step 1 - Downloading Resource Hacker

    Download Resource hacker from http://www.angusj.com/resourcehacker/. This is a free program that allows us to change the manifest of programs, which is exactly what we need. Get the "Portable Zip file" version, as we only need this briefly.

     

    Step 2 - Opening Resource Hacker

    Once downloaded extract the application to a new folder. Then right-click "Resource Hacker.exe" file (the exe part is prob hidden, should have an icon with RH in blue) and choose "Run as administrator".

    dVkpz10.png

     

    Step 3 - Using Resource Hacker

    You should now have the Resource Hacker window open. Now click the open file button (shown below).

    WNT1ywY.png

     

     

    Then go to "C:\Program Files\Java", or "C:\Program Files (x86)\Java\" if you installed x86 on a 64-bit system. In here, you should see something resembling either "jre1.8.x_xx" or "jdk1.8.x_xx", if you have multiple you'll need to determine which is being used by OSBot.

     

    Step 3.1 - Determine which JRE/JDK we need to edit

    Generally, its the newest, else if you're having troubles, click start and type "cmd", which should give you the option for a command prompt. Inside the command prompt, type "java -version" and it should output something like:

     

    Pl2iHMc.png

     

    The "1.8.0_65" is what your looking for, and would be the "jre1.8.0_65" or "jdk1.8.0_65" folder.

     

    Step 4 - Backup your shit

    Now, were jumping off track for a second, but this is important when editting any system/executables. We wanna back them up incase we get in a jam. So, now that we know which JRE/JDK we are using, open Windows Explorer (aka the file manager), and go to that folder (something like C:\Program Files\Java\jre1.8.x_xx\ or C:\Program Files (x86)\Java\jre1.8.x_xx\), and go into its "bin" folder. Here, you should see java.exe and javaw.exe. Copy/paste both, they should become "java - Copy.exe" and "javaw - Copy.exe", which is good. Name them w/e you want, but we just want a copy in case things go south.

     

    Step 5 - Editting the manifest

    Now we know which JRE/JDK we are using, we need to go into the "bin" folder of the JRE/JDK. The full file path should look something like:

     

    "C:\Program Files\Java\jre1.8.x_xx\bin\" or "C:\Program Files (x86)\Java\jre1.8.x_xx\bin\"

     

    In here, should be a file called "java.exe", which is the main java executable. Select it and open it in resource editor. Now you should see:

     

    EHqMFeF.png

     

    Now, expand the Manifest tree and select "1 : 0", which should be the only item in this tree. Now you should see the window update with some manifest XML, which looks like:

     

    F9dz4WV.png

     

    Then, scroll this until you see something that looks like:

     

    PspjOlf.png

     

    Basically, your looking for 

    
    <dpiAware>true</dpiAware>
    

    then you'll want to change this to

    
    <dpiAware>false</dpiAware>
    

    Once you are done with this edit, click the green play button

     

    O4GwCFD.png

     

    Then click the save button

     

    JY4Dnxq.png

     

    Now, repeat this step, except replace "java.exe" with "javaw.exe". Once you are done editting both, go and run OSBot and it should be sized so it looks normal on your PC.

     

     

    Closing Notes

    I hope this helps most of you, if not feel free to contact me (check my profile or message me on here), and I can prob help if you run into issues. I personally have not had this issue (72 dpi win 7 nub) but I can see how this would be a huge annoyance.

     

    PS: If you notice any typos/issues please point em out. I wouldn't say I'm sober atm so I can see there being issues I missed :p

    PSS: Sorry if this has been posted before, or if there is an easier fix. Let me know and I'll remove/edit this post.

    • Like 9
  12. I suggest paying for these done privately if you want them. 

    They will all crash if released publicly.

    You just released the ideas though so wouldnt be surprised if all these methods become useless soon. 

     

    Anchovy pizzas have been known for a while, the others are not really new either.

  13. So how can I make the mouse move instantly to a location? Also, how can I make the client think that the mouse has left the game window? IE someone actually playing runescape would be using other apps at the same time in this day and age. But the mouse seems to stop at the bounds. of the client.

     

    From the API for ClientMouseEventHandler:

    generateBotMouseEvent(int id, long time, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int button, boolean botInput)
    An example of moving the mouse instantly:

    getBot().getMouseEventHandler().generateBotMouseEvent(MouseEvent.MOUSE_MOVED, System.currentTimeMillis(), 0, x, y, 0, false, 0, true);
    Just noticed the move outside the screen thing:

    getMouse().moveOutsideScreen()
  14. Won't it take a long time to go through all these nodes?

     

    Depends on what the checks are. If the check is "if the inventory is full" that is a pretty quick check. If it involves a lot of computations/loops, its probably going to 

     

    Is there a better way to sort the nodes?

     

    Yes, do something as you mentioned with the Banking class. You can also make a new type of "Node" which allows nesting of other nodes into it, so you can have more of a tree of nodes instead of a straight line.  I typically try to make nodes reusable, so I boil them down to the most basic part I need (like Banking), and make it configurable on instantiation.

     

    You can see how I do it here (it's messy, sorry): https://github.com/Lem0ns/OSBotAPI/tree/master/tasks

    • Like 1
  15. 1. OSBot Version (do NOT put "current version", be specific)

    2.4.71

     

    2. A description of the issue. Include relevant logs.

    Java Flight Recorder doesn't work with the new security/permissions. Fails at "attempt to add a Permissions to a readonly Permissions object".

     

    3. Are you receiving any errors in the client canvas or the logger? 

    Nope

     

    4. How can you replicate the issue?

    Launch a bot instance, try to attach a Java Flight Recorder

     

    5. Has this issue persisted through multiple versions? If so, how far back?

    Since the security/permissions update I assume.

     

    n3OcnfK.png

     

    I know there is a way to add specific permissions, but this seems to be an issue with the fact the Permissions object is read-only. Is there any way we can run the bot for dev with security/permissions off? This would solve the problem as I only need to run these when I'm developing the script.

×
×
  • Create New...