Jump to content

Move mouse one or two blocks then click?


Recommended Posts

Posted

Can't seem to figure this out, right now I have

mouse.moveSlightly(300);//should move the mouse a little bit from where it is, then sleep for 300miliseconds.
                mouse.click(true);//should left click where current mouse is

I'm not sure if this is right or not, no clue how to do it.

Posted (edited)

would something like:

Position swaaaag = new Position((myPosition().getX() +- 0),(myPosition().getY() +- 0),0);
        if(swaaaag != null){
            if(swaaaag.isVisible(bot)){
                //move camera up high or whatever
               swaaaag.interact(bot, "Walk");
            }else{
                camera.toEntity((org.osbot.rs07.api.model.Entity) swaaaag);
            }
        }

work?

"Herp derp isolate is trying to cast a position as an entity" = for some reason my IDE did it so i didnt bother changing it

Edited by Isolate
Posted (edited)

would something like:

Position swaaaag = new Position((myPosition().getX() +- 0),(myPosition().getY() +- 0),0);
        if(swaaaag != null){
            if(swaaaag.isVisible(bot)){
                //move camera up high or whatever
               swaaaag.interact(bot, "Walk");
            }else{
                camera.toEntity((org.osbot.rs07.api.model.Entity) swaaaag);
            }
        }

work?

"Herp derp isolate is trying to cast a position as an entity" = for some reason my IDE did it so i didnt bother changing it

 

So instead of moving the mouse, It should move the camera and click? That seems like it would be easier, let me mess around with it for a second and i'll tell if you if it works. Thanks for the reply!

 

And also is there any point to that else statement? or is it just a default else statement your IDE said like you said?

Edited by twin 763
Posted

So instead of moving the mouse, It should move the camera and click? That seems like it would be easier, let me mess around with it for a second and i'll tell if you if it works. Thanks for the reply!

 

And also is there any point to that else statement? or is it just a default else statement your IDE said like you said?

Which one... non of them there are unused?

+ my interaction is wrong its "Walk here" i think for walking

Posted

Which one... non of them there are unused?

+ my interaction is wrong its "Walk here" i think for walking

 

else{

camera.toEntity((org.osbot.rs07.api.model.Entity) swaaaag);

}

What exactly does that do? did you just force camera to go into the position swaaaag?

Posted

else{

camera.toEntity((org.osbot.rs07.api.model.Entity) swaaaag);

}

What exactly does that do? did you just force camera to go into the position swaaaag?

only if its not on the screen

in this case make swaaaaaaag like yoru starting position or something.

using "Walk here" and this code seems to work find for me and my bird catcher :)

Posted

only if its not on the screen

in this case make swaaaaaaag like yoru starting position or something.

using "Walk here" and this code seems to work find for me and my bird catcher smile.png

 

My bad man I fell asleep early. I found out it was an issue with my logic and sleep timers on why some stuff was fucking up and not working properly so I need to mess around with that to get it right! Thanks for all your replies though!

Posted (edited)

only if its not on the screen

in this case make swaaaaaaag like yoru starting position or something.

using "Walk here" and this code seems to work find for me and my bird catcher smile.png

 

I lied about it being an issue with my logic i just didnt get your code lol. Thanks a bunch man smile.png

Edited by twin 763

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...