Everything posted by Joseph
-
What is "For"?
The for keyword is meant to loop through an array/list
-
i need some help....
1 is a Room enum. 2 is an array of ObjectType 3 is an array of ConIbject
-
i need some help....
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
-
Checking if a door is closed and open if it's closed
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.
-
AIO Herber
this is help you out, not sure if they changed id or not. http://osbot.org/forum/topic/42894-herb-snippet/
- All Food Support
-
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.
-
Name Covering Paint
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) }
-
Setting XY of Mouse directly.
That's what we got osbot 2 API ;P
-
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
-
All Food Support
There is a way easier way of do thing this.
-
Following players?
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.
-
is this the proper way
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.
-
Debug mode
i was going to ask the same thing :P
-
Upcoming Changes Planned for OSBot 2.1.X
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
-
PreConstruction [Soon to be AIO] [FEEDBACK WELCOME]
Nice little competition good luck
-
how to you pick up clue it says corret spelling
check the action
-
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.
-
requesting a paint
well i have someone making me a pint as we speak so no need
-
requesting a paint
sorry for changing up my paint location -.-
- requesting a paint
-
requesting a paint
i like it, and i dont mind waiting. Lets just see what happens :p
-
requesting a paint
im requesting a paint for my Construction script, im looking for a chatbox size paint.
-
onPaint() fps drop
String status; switch(getState()){ case ATTACK: status = "Attack"; break; } why dont you simply do this. It isnt that hard. Then simply draw status
-
onPaint() fps drop
Just do it the way notoriousP said. I do that in my script all the time. Works great