Jump to content
Spacious

Essence Mine Portal Problem

Recommended Posts

Well, I have the rest of my ess miner working fine, but I've run into a problem.

 

Apparently there are two types of portals used to exit the mine. (I'm not talking about how it switches from "Use Portal" to "Exit Portal")

 

The first type of portal is detected fine, but I can't seem to get the second one. The real ID and the object ID both do not work, nor does trying to use it via a string method.

 

 When using the Entity Hover Debug its string name comes up as "<col=00ffff>Portal</col>" (which I found odd because it doesn't do that for any other objects that I've seen), with the ID next to it, and the realID has generally been around 2660 (with the object IDs being somewhere a little above that)

 

Not sure how to go about getting this object. any help would be appreciated.

 

Link to comment
Share on other sites

How would I go about that? lol (thank you btw)

 

You will have to write a custom method for it.

Add all RS2 objects and NPCs to a list and then go through that list by checking for all entities that have either Exit or Use in their actions then return the closest of that subset.

 

I would give you the method but I'm releasing an ess miner myself, no hard feelings :p

Link to comment
Share on other sites

Thank you everyone, I got it figured out!

 

 

You will have to write a custom method for it.

Add all RS2 objects and NPCs to a list and then go through that list by checking for all entities that have either Exit or Use in their actions then return the closest of that subset.

 

I would give you the method but I'm releasing an ess miner myself, no hard feelings tongue.png

 

 

Haha I appreciate the help, thank you, I'm not planning on releasing mine though. It's much more just for a learning experience, I haven't scripted in a few years since rsbot so I'm just trying to refresh myself. 

Link to comment
Share on other sites

How would I go about that? lol (thank you btw)

public RS2Object filterPortal(String action){ 
 for(RS2Object o: objects.getAll()){
    if(o != null && o.getDefinition().getActions()[0].equals(action)){
          return o;
    }
  }
 return null;
}

The getActions()[0] will return the action in the first index of the list aka the First interaction option.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Recently Browsing   0 members

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