mlrkey
-
Posts
18 -
Joined
-
Last visited
-
Feedback
0%
Posts posted by mlrkey
-
-
Does anyone have one? The one in the API is a bit slow.
-
How can I go about doing this? I want to return true in my main class if a button in my gui class is selected.
-
Player p = getPlayers().closest(playerName);
// ..
p.interact("Attack");
make sure to add the necessary checks, I'm only showing the core process. It's the same as any other <code>Entity</code>
Any way to get the closest player without looking at name?
-
how is this done again? thanks guys
-
Need a bit of help with this
Edit: Figured it out.
area.contains(item)
-
public boolean dropOnlyThis(String[] blackList) throws IllegalArgumentException, InterruptedException { if (getInventory().contains(blackList)) { List<Item> list = getInventory().filter(new ContainsNameFilter<Item>(blackList)); for (Item item: list) { if (item != null) { item.interact("drop"); sleep(gRandom(400,100)); } } } return !getInventory().contains(blackList); }
tell me if this helps
I should have been more specific. I have 15 of a certain item in my inv and I want to only drop 5 of that item.
-
Can't seem to figure this out, I have 15 of a certain item in my inv and I want to only drop 5 of that item.
-
I've tried using localwalker but it doesn't seem to always put me on the exact tile I need. Is there anyway to do this? Thanks
-
"script" cannot be resolved in:
java.util.List<GroundItem> allGroundItems = script.getGroundItems().getAll();
-
Going with the second method, here is a simplistic easy to follow way (completely untested and just for demonstration, but it should work):
public int getAmountOf(String groundItemName){ int numberOfItems = 0; java.util.List<GroundItem> allGroundItems = script.getGroundItems().getAll(); if(allGroundItems != null && allGroundItems.size() > 0){ for(GroundItem groundItem : allGroundItems){ if(groundItem != null && groundItem.getName() != null && groundItem.getName().equals(groundItemName)){ numberOfItems++; } } } return numberOfItems; }
Thanks a lot Will try soon
-
If the player dropped 10 buckets, or if there are 10 buckets on the ground and you dont care where they came from?
Dont care where they came from.
-
How would I go about doing this? Don't ask why lol...
Thanks
drop items faster?
in Scripting Help
Posted
the drop all methods in the api are really slow. i'm just trying to drop all of a certain item and it takes forever. anyone have a faster method? thanks