I'm pretty sure I made a method for someone that asked a question just like this before. I'll see if I could find it.
edit:
here return a list of players in your area
Create a Boolean within your GUI class. Add an event handler on your start button
, within the event handler invert the Boolean, also dispose the GUI. In your main class within your onloop set the GUI visible. Then you will sleep while your GUI is still running
What im trying to do: change the values within the third box. I was able to do it with the second box. But it wont let me do that for the third box. when ever i choose an option from the second box. it will highlight the one i chosed, then it will un-highlight for no reason.
If anybody knows of a solution let me know
you could also create an area using one tile. Check that one tile to see if a door is null or not. Because the position of a tile changes when you open and close the door.
public int eatFood(int hp) throws InterruptedException {
if (client.getSkills().getCurrentLevel(Skill.HITPOINTS) <= hp) {
for (Item i: client.getInventory().getItems()) {
if (i!=null && i.getDefinition().getActions()[0].equalsIgnoreCase("eat")) {
client.getInventory().interactWithId(i.getId(), i.getDefinition().getActions()[0], true);
}
}
}
return 1000;
}
this method will only work with items that contain the action eat in the first index.
public List<Player> getPlayer(Area area) {
List<Player> list = new ArrayList<Player>();
for(Player p: client.getLocalPlayers()){
if (p!=null){
if (area.contains(p)){
if (!p.getName().contains(client.getMyPlayer().getName()))
list.add(p);
}
}
}
return list;
}
im not going to spoon feed you everything. But this method return a list of players that are within the area, not counting you of course.
Now what you could do is, whoever you want to follow someone. You could loop through the new method, until you find the person you want, maybe by name, or however you want. Then you could use the MethodProvider#selectEntityOption method.
I have:
an empty interface - "ObjectType"
a main Enum fulled with variables - "Main"
and another Enum fulled with more variables. - "P" which implements the empty interface "ObjectType"
with in the "Main" Enum im trying to access the "P" Enum and all its variables so with in the "Main" Enum constructor. I did this.
Main(int requirement, int cost, ObjectType... objectType)
so within the fixed variable im trying to add in the whole "P" Enum as one of the fixed variable arguments. So i did this.
PARK(1, 1000, P.values());
Is this the proper way of doing this? Im not too sure i haven't tried it out yet. This idea popped into my head, this is the first time ive done this.
well when you want to deposit stuff into the bank, you need to open bank, then open the bag, then deposit items
thats why i have a depositAllIntoBank() with will open the bag for you and deposit all the item, using the little button.