Jump to content

Best way to implement random camera turns


Recommended Posts

Posted

Making a fishing script & wondering what the best implementation is with regards to making the script randomly turn the camera around every so often for antiban.

Right now I'm randomly generating a number, and if its greater than a certain number it will run a function which pulls a random degree (0-360) and inputs it, but I feel like there's a better way to do this.

Posted (edited)

Rotating camera is very bad antiban if you ask me, you should prefer being more idle compared to doing pointless actions. (Just my opninion :))
Maybe if you can move it with the mouse instead of the arrow keys it might be usefull

This is how I used to do it in the past if you still wanna do it anyway 😉
Well either you can rotate completely random:

getCamera().moveYaw(Utils.randInt(0, 359));

or based around your current angle:

getCamera().moveYaw((getCamera().getYawAngle() + Utils.randInt(-90, 90)) % 360);

The Utils.randInt() is just a random number generator between 2 values incase you were wondering

Edited by Khaleesi
  • Like 1
  • Heart 1
Posted (edited)
1 hour ago, Khaleesi said:

Rotating camera is very bad antiban if you ask me, you should prefer being more idle compared to doing pointless actions. (Just my opninion :))
Maybe if you can move it with the mouse instead of the arrow keys it might be usefull

This is how I used to do it in the past if you still wanna do it anyway 😉
Well either you can rotate completely random:

getCamera().moveYaw(Utils.randInt(0, 359));

or based around your current angle:

getCamera().moveYaw((getCamera().getYawAngle() + Utils.randInt(-90, 90)) % 360);

The Utils.randInt() is just a random number generator between 2 values incase you were wondering

I won't be using it too much, it just looks a bit botty running the script for a while & my screen hasn't moved at all haha

What would be the best way to call it? This is what I'm working with right now.

 

idea64_N3x6J3ebB6.png

Edited by scottgreen
Posted (edited)
2 hours ago, scottgreen said:

I won't be using it too much, it just looks a bit botty running the script for a while & my screen hasn't moved at all haha

What would be the best way to call it? This is what I'm working with right now.

 

idea64_N3x6J3ebB6.png

Probably user a timer to rotate your camera every few minutes or whatever you want :)
You camera will be rotating a lot if you are going to do it this way + it's harder to control
+ Your if check doesn't do anything atm 😉

Edited by Khaleesi

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...