Jump to content

Clicking Tiles ~ RSTile?


Recommended Posts

Posted

Hello,

 

I have been looking around the API for some kind of "hack" that would allow me to click on RSTile's effectively without having any object collision in the way, IE Ground Items.

 

I am tracking down Rockcrabs and my script works effectively enough to the point of going to there location, then clicking where the are using

mouse.click(false);

Now this has it's share of problems being that it doesn't check that if there are items in the way.

 

Now the problem with rock crabs is that you aren't actually able to walk to there location using crab.interact("Walk here"); Since it's a tile.

 

Unless if I have missed something in the API and there's a massive chance I have, is there a method or even a class that handles RSTile's and actually interacts with them, again by walking here.

Posted (edited)

If you need to interact with a rockcrab fishing spot, use the Npcs class, eg.

getNpcs().closest(fishing spot name or ID).interact("catch");

obv. with some added null checks and what have you. Interacting with an NPC will execute an InteractionEvent, which will walk to the npc as needed.

 

If you really just need to interact with a position ("RSTile"), you could do it by coordinates

new Position(x, y, z).interact(bot, "Walk here");

alternatively to walk to the position, use the Walking class, which has a number of methods that accept positions and areas.

Edited by FrostBug
  • Like 1
Posted

If you need to interact with a rockcrab fishing spot, use the Npcs class, eg.

getNpcs().closest(fishing spot name or ID).interact("catch");

obv. with some added null checks and what have you.

 

If you really just need to interact with a position ("RSTile"), you could do it by coordinates

new Position(x, y, z).interact(bot, "Walk here");

alternatively to walk to the position, use the Walking class, which has a number of methods that accept positions and areas.

 

 

Ahhh alright, I actually haven't been able to dive too far into all the Classes and never looked over the entire method library for it. I'll give it a go but it looks like what I needed, thank you.

 

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