katastrophi 0 Share Posted March 29, 2020 I'm looking to add some anti ban to a script I have. It's a item combiner script but I want it to click different slots. In the api I can see how to do that. Is there not a way of clicking slot x? Or am I going to have to do it a different way? Link to comment Share on other sites More sharing options...
borisbruneel 1 Share Posted March 29, 2020 I think you are looking for getInventory().getRandom(int id)? katastrophi 1 Link to comment Share on other sites More sharing options...
katastrophi 0 Author Share Posted March 29, 2020 4 minutes ago, borisbruneel said: I think you are looking for getInventory().getRandom(int id)? I'm looking to randomise between a number of slots close to the item. As opposed to any random. E.g. if the item i'm using it with is in slot 3 i want to randomise clicking between slot 2, 5 or 6. But this can be used to iterate over until I get one of the slot numbers I want I guess. Let me know if there's a better solution otherwise that'll probably do it. Link to comment Share on other sites More sharing options...
katastrophi 0 Author Share Posted March 29, 2020 ended up with something like this // get random number between 0-100 // if its above 39 // get random slots until its in a slot close to our item // use our items together // else // click our prefered item slot (the one a player would usually click) e.g. immediately next to it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now