Jump to content

Best way to implement random camera turns


scottgreen

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
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.
Note: Your post will require moderator approval before it will be visible.

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.

  • Recently Browsing   0 members

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