smile Posted February 26, 2021 Share Posted February 26, 2021 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; } } 1 Quote Link to comment Share on other sites More sharing options...
Sellout Posted February 27, 2021 Share Posted February 27, 2021 pwetty nice 😮 Quote Link to comment Share on other sites More sharing options...
Hex Posted February 28, 2021 Share Posted February 28, 2021 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! Quote Link to comment Share on other sites More sharing options...
smile Posted March 2, 2021 Author Share Posted March 2, 2021 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 Quote Link to comment Share on other sites More sharing options...
Hex Posted March 2, 2021 Share Posted March 2, 2021 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 🙂 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.