Jump to content

Clicking Tiles ~ RSTile?


Varies

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

 

 

You'll find most of the things you need available from the MethodProvider

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...