By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now!Can you send me the code? So i dont have to write it myself. Thank you. Scripts without camera are useless... Btw how is with interacting with npc at yours?YES! THANK YOU! This has been happening to me for a while (and @SlashnHax as well). But due to no one else mentioning it, I just assumed it was me somehow.
I've been using the middle mouse to turn the camera while the !object.isVisible for a workaround.
// Rotate camera towards an Npc with the middle mouse button
public static void middleMouseTurnTo(Interactable interactable){
// Area to hover over
Area hoverArea = new Area.Circular(Players.getLocal().getPosition(), 3);
// Hover over random coordinate
hoverArea.getRandomCoordinate().hover();
boolean turnLeft;
SudoTimer turnTimer = new SudoTimer(1000, 2500);
if(Math.random() < 0.5)
turnLeft = true;
else
turnLeft = false;
// Move camera with mouse until object is on the screen
Mouse.press(Mouse.Button.WHEEL);
turnTimer.start();
while(interactable != null && !interactable.isVisible() && turnTimer.getRemainingTime() > 0) {
if(turnLeft) {
if(Camera.getPitch() < 0.2) // If camera is angled too low
Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() - (Math.random() * 50)), (int) (Mouse.getPosition().getY() + (5 + Math.random() * 20))));
else if(Camera.getPitch() > 0.5) // If the camera is angled too high
Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() - (Math.random() * 50)), (int) (Mouse.getPosition().getY() - (5 + Math.random() * 20))));
else
Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() - (Math.random() * 50)), (int) (Mouse.getPosition().getY() - 10 + (Math.random() * 20))));
}
else {
if(Camera.getPitch() < 0.2) // If camera is angled too low
Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() + (Math.random() * 50)), (int) (Mouse.getPosition().getY() + (5 + Math.random() * 20))));
else if(Camera.getPitch() > 0.5) // If the camera is angled too high
Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() + (Math.random() * 50)), (int) (Mouse.getPosition().getY() - (5 + Math.random() * 20))));
else
Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() + (Math.random() * 50)), (int) (Mouse.getPosition().getY() - 10 + (Math.random() * 20))));
}
}
turnTimer.reset();
Mouse.release(Mouse.Button.WHEEL);
}
Thank you very much sir. And yes. The interaction is bad af... I cant interact the NPCs in less than 1 min of trying...Interaction with moving NPCs is pretty difficult for the bot the handle... It ran take sometimes over 10 tries before it finally gets it. If the NPC is not moving, it only takes a couple of tries, but it for sure isn't near as good as vanilla RM client as far as interactions go.
And also...
Code:// Rotate camera towards an Npc with the middle mouse button public static void middleMouseTurnTo(Interactable interactable){ // Area to hover over Area hoverArea = new Area.Circular(Players.getLocal().getPosition(), 3); // Hover over random coordinate hoverArea.getRandomCoordinate().hover(); boolean turnLeft; SudoTimer turnTimer = new SudoTimer(1000, 2500); if(Math.random() < 0.5) turnLeft = true; else turnLeft = false; // Move camera with mouse until object is on the screen Mouse.press(Mouse.Button.WHEEL); turnTimer.start(); while(interactable != null && !interactable.isVisible() && turnTimer.getRemainingTime() > 0) { if(turnLeft) { if(Camera.getPitch() < 0.2) // If camera is angled too low Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() - (Math.random() * 50)), (int) (Mouse.getPosition().getY() + (5 + Math.random() * 20)))); else if(Camera.getPitch() > 0.5) // If the camera is angled too high Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() - (Math.random() * 50)), (int) (Mouse.getPosition().getY() - (5 + Math.random() * 20)))); else Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() - (Math.random() * 50)), (int) (Mouse.getPosition().getY() - 10 + (Math.random() * 20)))); } else { if(Camera.getPitch() < 0.2) // If camera is angled too low Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() + (Math.random() * 50)), (int) (Mouse.getPosition().getY() + (5 + Math.random() * 20)))); else if(Camera.getPitch() > 0.5) // If the camera is angled too high Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() + (Math.random() * 50)), (int) (Mouse.getPosition().getY() - (5 + Math.random() * 20)))); else Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() + (Math.random() * 50)), (int) (Mouse.getPosition().getY() - 10 + (Math.random() * 20)))); } } turnTimer.reset(); Mouse.release(Mouse.Button.WHEEL); }
Note, the above code works like a champ in RM v1, but in spectre (I think due to slow mouse movements) it will work, but it goes pretty slow.
Can you send me the SudoTimer too?Interaction with moving NPCs is pretty difficult for the bot the handle... It ran take sometimes over 10 tries before it finally gets it. If the NPC is not moving, it only takes a couple of tries, but it for sure isn't near as good as vanilla RM client as far as interactions go.
And also...
Code:// Rotate camera towards an Npc with the middle mouse button public static void middleMouseTurnTo(Interactable interactable){ // Area to hover over Area hoverArea = new Area.Circular(Players.getLocal().getPosition(), 3); // Hover over random coordinate hoverArea.getRandomCoordinate().hover(); boolean turnLeft; SudoTimer turnTimer = new SudoTimer(1000, 2500); if(Math.random() < 0.5) turnLeft = true; else turnLeft = false; // Move camera with mouse until object is on the screen Mouse.press(Mouse.Button.WHEEL); turnTimer.start(); while(interactable != null && !interactable.isVisible() && turnTimer.getRemainingTime() > 0) { if(turnLeft) { if(Camera.getPitch() < 0.2) // If camera is angled too low Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() - (Math.random() * 50)), (int) (Mouse.getPosition().getY() + (5 + Math.random() * 20)))); else if(Camera.getPitch() > 0.5) // If the camera is angled too high Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() - (Math.random() * 50)), (int) (Mouse.getPosition().getY() - (5 + Math.random() * 20)))); else Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() - (Math.random() * 50)), (int) (Mouse.getPosition().getY() - 10 + (Math.random() * 20)))); } else { if(Camera.getPitch() < 0.2) // If camera is angled too low Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() + (Math.random() * 50)), (int) (Mouse.getPosition().getY() + (5 + Math.random() * 20)))); else if(Camera.getPitch() > 0.5) // If the camera is angled too high Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() + (Math.random() * 50)), (int) (Mouse.getPosition().getY() - (5 + Math.random() * 20)))); else Mouse.move(new InteractablePoint((int) (Mouse.getPosition().getX() + (Math.random() * 50)), (int) (Mouse.getPosition().getY() - 10 + (Math.random() * 20)))); } } turnTimer.reset(); Mouse.release(Mouse.Button.WHEEL); }
Note, the above code works like a champ in RM v1, but in spectre (I think due to slow mouse movements) it will work, but it goes pretty slow.
SudoTimer is just a wrapper for the runemate Timer class. You could change it back to RuneMate's Timer, or wait until I get back home. Up to you xDThank you very much sir. And yes. The interaction is bad af... I cant interact the NPCs in less than 1 min of trying...
@Cloud this is serious issue.
Can you send me the SudoTimer too?
ChangedSudoTimer is just a wrapper for the runemate Timer class. You could change it back to RuneMate's Timer, or wait until I get back home. Up to you xD
What is the value of
PlayerSense.getAsBoolean(PlayerSense.Key.USE_WASD_KEYS)
when this is occurring?
Player sense as boolean: false
System.out.println("Player sense as boolean: " + PlayerSense.getAsBoolean(PlayerSense.Key.USE_WASD_KEYS));
We use essential cookies to make this site work, and optional cookies to enhance your experience.