Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved Camera not working

I've been called a god before.
Joined
Aug 5, 2014
Messages
3,212
Its not rotating camera no matter what i do. #turnTo, #concurentlyTurnTo or what that is.

Works few times, then stops.
 
s̶c̶r̶i̶p̶t̶ bot*
Joined
Aug 23, 2015
Messages
2,232
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.
 
I've been called a god before.
Joined
Aug 5, 2014
Messages
3,212
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.
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?
 
s̶c̶r̶i̶p̶t̶ bot*
Joined
Aug 23, 2015
Messages
2,232
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.
 
I've been called a god before.
Joined
Aug 5, 2014
Messages
3,212
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.
Thank 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.
 
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?
 
s̶c̶r̶i̶p̶t̶ bot*
Joined
Aug 23, 2015
Messages
2,232
Thank 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?
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 xD
 
I've been called a god before.
Joined
Aug 5, 2014
Messages
3,212
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 xD
Changed :)

Works like a charm. Just runemate fucks it up lol. Anyway, thank you. Lets hope cloud sees this soon and fixes it. And interaction and mouse speed and everything.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
What is the value of
PlayerSense.getAsBoolean(PlayerSense.Key.USE_WASD_KEYS)
when this is occurring?
 
I've been called a god before.
Joined
Aug 5, 2014
Messages
3,212
What is the value of
PlayerSense.getAsBoolean(PlayerSense.Key.USE_WASD_KEYS)
when this is occurring?
Code:
Player sense as boolean: false
Code:
System.out.println("Player sense as boolean: " + PlayerSense.getAsBoolean(PlayerSense.Key.USE_WASD_KEYS));
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
V1.0.41 should fix the bug that was resulting in Camera.turnTo blocking endlessly. Please confirm this issue is fixed.
 
Top