Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.powerbot.concurrent.Task;
- import org.powerbot.concurrent.strategy.Condition;
- import org.powerbot.concurrent.strategy.Strategy;
- import org.powerbot.game.api.ActiveScript;
- import org.powerbot.game.api.Manifest;
- import org.powerbot.game.api.methods.node.GroundItems;
- import org.powerbot.game.api.methods.tab.Inventory;
- import org.powerbot.game.api.wrappers.node.GroundItem;
- @Manifest(authors = { "Speed" }, name = "GetDoseGoldPieces", description= "THIS FOR ALL MY NIGGERS")
- public class GoldPiece extends ActiveScript {
- protected void setup() {
- provide(new PickupStrategy());
- provide(new Strategy(new Condition() {
- public boolean validate() {
- return Inventory.getCount(995) > 0;
- }
- }, new Task() {
- public void run() {
- log.info("WE HAS DAT GP");
- stop();
- }
- }));
- }
- public class PickupStrategy extends Strategy implements Task {
- @Override
- public boolean validate() {
- return Inventory.getCount(995) == 0;// dont bitch at me about constants
- // bitch, they get folded anyway
- }
- public void run() {
- final GroundItem item = GroundItems.getNearest(995);
- if (item != null) {
- log.info("Found DAT GP.");
- item.interact("Take");
- } else {
- log.info("Fuck dis SHITE MAYNE");
- }
- }
- }}
Add Comment
Please, Sign In to add comment