Jump to content

[Snippet] My Interaction Function


Recommended Posts

Posted

I use this simple to interact with pretty much everything as I couldn't find one like this in the API. It's pretty basic and should be self explanatory. 

private boolean interactWith(String Name, String Interacion) throws InterruptedException{
   RS2Object Next = null;
   Next = closestObjectForName(Name);
   if(Next != null){
      Next.interact(Interacion);
      return true;
   }
   return false;
}
  • 2 weeks later...
Posted

 

Would this not be better, because it won't give false positives? 

private boolean interactWith(String Name, String Interacion) throws InterruptedException{
   RS2Object Next = null;
   Next = closestObjectForName(Name);
   if(Next != null){
      return Next.interact(Interacion);
   }
   return false;
}

 

He also needs to adjust the camera to turn to the object he is trying to interact with. That might fix the false positive as well since turning the camera to the object will increase it's likelihood to click it by a ton.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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