Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

getCamera().moveYaw()

Featured Replies

Has anyone else had problems with this method not doing anything?

 

Havent tried it, maybe show us the code you are using? I might check it out in a minute.

  • Author

Havent tried it, maybe show us the code you are using? I might check it out in a minute.

private void checkCamera() {
		if (s.myPlayer().getRotation() == northRotation) {
			if (s.getCamera().getYawAngle() < 360 - 45
					&& s.getCamera().getYawAngle() > 45) {
				s.log("turn north");
				int number = s.random(360 - 45, 360 + 45);
				if (number > 360)
					number -= 360;
				s.getCamera().moveYaw(number);
			}
		}
		if (s.myPlayer().getRotation() == eastRotation) {
			if (s.getCamera().getYawAngle() < 45
					&& s.getCamera().getYawAngle() > 90 + 45) {
				s.getCamera().moveYaw(s.random(45, 90 + 45));
				s.log("turn east");
			}
		}
		if (s.myPlayer().getRotation() == southRotation) {
			if (s.getCamera().getYawAngle() < 90 + 45
					&& s.getCamera().getYawAngle() > 180 + 45) {
				s.getCamera().moveYaw(s.random(90 + 45, 180 + 45));
				s.log("turn south");
			}
		}
		if (s.myPlayer().getRotation() == westRotation) {
			if (s.getCamera().getYawAngle() < 90 + 45
					&& s.getCamera().getYawAngle() > 180 + 45) {
				s.getCamera().moveYaw(s.random(180 + 45, 360 - 45));
				s.log("turn west");
			}
		}
		s.getCamera().toTop();

	}
private void checkCamera() {
		if (s.myPlayer().getRotation() == northRotation) {
			if (s.getCamera().getYawAngle() < 360 - 45
					&& s.getCamera().getYawAngle() > 45) {
				s.log("turn north");
				int number = s.random(360 - 45, 360 + 45);
				if (number > 360)
					number -= 360;
				s.getCamera().moveYaw(number);
			}
		}
		if (s.myPlayer().getRotation() == eastRotation) {
			if (s.getCamera().getYawAngle() < 45
					&& s.getCamera().getYawAngle() > 90 + 45) {
				s.getCamera().moveYaw(s.random(45, 90 + 45));
				s.log("turn east");
			}
		}
		if (s.myPlayer().getRotation() == southRotation) {
			if (s.getCamera().getYawAngle() < 90 + 45
					&& s.getCamera().getYawAngle() > 180 + 45) {
				s.getCamera().moveYaw(s.random(90 + 45, 180 + 45));
				s.log("turn south");
			}
		}
		if (s.myPlayer().getRotation() == westRotation) {
			if (s.getCamera().getYawAngle() < 90 + 45
					&& s.getCamera().getYawAngle() > 180 + 45) {
				s.getCamera().moveYaw(s.random(180 + 45, 360 - 45));
				s.log("turn west");
			}
		}
		s.getCamera().toTop();

	}

 

 

Just tested strictly the moveYaw method, it works, its slow and jerky and doesnt go to the exact angle, but it works (kinda).

  • Author

Just tested strictly the moveYaw method, it works, its slow and jerky and doesnt go to the exact angle, but it works (kinda).

Lol k.  Not sure what im doing wrong then :( Its not that important though. Thanks for ur help!

Lol k.  Not sure what im doing wrong then sad.png Its not that important though. Thanks for ur help!

 

 

Well there are 360 possible degrees in the circle (obviously) and by the looks of it, your code will only execute on 4 of those degrees. 

0, 90, 180, 270, or whatever you defined those 4 constants to be. 

  • Author

Well there are 360 possible degrees in the circle (obviously) and by the looks of it, your code will only execute on 4 of those degrees. 

0, 90, 180, 270, or whatever you defined those 4 constants to be. 

That has to do with what direction the player is facing. (north, south, east, and west)

That has to do with what direction the player is facing. (north, south, east, and west)

 

Oh ok I just reread that. Do your logs execute?

  • Author

Oh ok I just reread that. Do your logs execute?

Yeah. Ill run it again and show u a screenshot

Oh ok I just reread that. Do your logs execute?

Only the north one and i think its because it logs before it executes the method.  

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.