Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. package org.parabot.Kozs.kPickup;
  2.  
  3. import java.util.ArrayList;
  4.  
  5. import org.parabot.environment.api.utils.Time;
  6. import org.parabot.environment.scripts.Category;
  7. import org.parabot.environment.scripts.Script;
  8. import org.parabot.environment.scripts.ScriptManifest;
  9. import org.parabot.environment.scripts.framework.Strategy;
  10. import org.rev317.min.api.methods.GroundItems;
  11. import org.rev317.min.api.methods.GroundItems.Option;
  12. import org.rev317.min.api.methods.Inventory;
  13. import org.rev317.min.api.wrappers.GroundItem;
  14.  
  15. @ScriptManifest(author = "Kozs", category = Category.UTILITY,
  16. description = "Picks shit up", name = "kPickerUpper", servers = { "PKH" }, version = 1)
  17.  
  18. public class Main extends Script {
  19.  
  20. public static ArrayList<Strategy> strategies = new ArrayList<Strategy>();
  21.  
  22. public boolean onExecute() {
  23. strategies.add(new PickUpLoot());
  24. provide(strategies);
  25. return true;
  26. }
  27.  
  28. public class PickUpLoot implements Strategy {
  29.  
  30. @Override
  31. public boolean activate() {
  32. return !Inventory.contains(385);
  33. }
  34.  
  35. @Override
  36. public void execute() {
  37. for (GroundItem item : GroundItems.getNearest(385)) {
  38. if (item != null) {
  39. item.interact(Option.TAKE);
  40. Time.sleep(1000);
  41. }
  42. }
  43.  
  44. }
  45.  
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement