Jump to content

[Snippet] How to generate a hash based off of the current RSN!


smile

Recommended Posts

Hey guys, hope you enjoy this snippet. This can be used to give your scripts a bit more randomization but also consistency so it's not entirely random (which humans aren't either)

The only thing I need to work out is how to get it to be a lower number, somewhere in the 10,000's or 100,000's or even in a range (basically I want to limit the max number it can be) at least so it's more manageable to create bot profiles for.

private String username;
    private long seed;
    java.util.Random random;
    private int number;
    private boolean shouldGenerateHash = true;

//this next part should be in your onLoop.

if (shouldGenerateHash) {
            if (getAPIContext().localPlayer().get() != null){
                username = getAPIContext().localPlayer().getName();
                seed = UUID.nameUUIDFromBytes(username.getBytes(StandardCharsets.UTF_8)).getMostSignificantBits();
                random = new java.util.Random(seed);
                number = random.nextInt();
                System.out.println("Generated number based off of username hash: " + number);
                shouldGenerateHash = false;
            }
        }

 

  • Like 1
Link to comment
Share on other sites

Nice work! 

I see this as a similar mechanism as generating a seed for each user and basing actions on that. The problem is not all actions are the same. 

I think the plethora of mouse settings could outweight this snipper but good job anyway!

Link to comment
Share on other sites

On 2/28/2021 at 9:57 AM, Hex said:

Nice work! 

I see this as a similar mechanism as generating a seed for each user and basing actions on that. The problem is not all actions are the same. 

I think the plethora of mouse settings could outweight this snipper but good job anyway!

Yeah the basis of the snippet is just to generate the seed tbh and then you implement your own stuff to change stuff up

Link to comment
Share on other sites

7 hours ago, smile said:

Yeah the basis of the snippet is just to generate the seed tbh and then you implement your own stuff to change stuff up

Sounds good mate, great contribution 🙂

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...