Jump to content

Joseph

Trade With Caution
  • Posts

    4692
  • Joined

  • Last visited

  • Feedback

    91.3%

Everything posted by Joseph

  1. Shit I didn't know what sout was when I first saw I though it was like shout out. So does that make me a nub
  2. 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
  3. Create an area. Get all local people within that area. Loop through them and remove your self.
  4. How would you do that? Could you provide an example
  5. 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
  6. Joseph

    What is "For"?

    The for keyword is meant to loop through an array/list
  7. 1 is a Room enum. 2 is an array of ObjectType 3 is an array of ConIbject
  8. 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
  9. 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.
  10. Joseph

    All Food Support

    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.
  11. public void onPaint(Graphics g) { Graphics2D gr = (Graphics2D) g; gr.setColor(Color.black); //<----- Sets colour of rectangle gr.fillRect(7, 460, 100, 14); //<----- Sets dimensions of rectangle (x,y,width,height) }
  12. That's what we got osbot 2 API ;P
  13. Joseph

    All Food Support

    Oh because I was on my phone at the time and I still am. But I'll post it tomorrow. I was also going to tell you those tips too
  14. Joseph

    All Food Support

    There is a way easier way of do thing this.
  15. 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.
  16. 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.
  17. i was going to ask the same thing :P
  18. Why do you say that, the osbot 2 API is basically the same as, and even better than osbot 1 API. Also change is usually better
  19. Joseph

    Looting Bag

    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.
  20. well i have someone making me a pint as we speak so no need
  21. sorry for changing up my paint location -.-
×
×
  • Create New...