Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. package Omega.construction.thingstobuild;
  2. import Omega.construction.ids.ids;
  3. import com.rsbuddy.script.methods.Inventory;
  4. import com.rsbuddy.script.methods.Objects;
  5. import com.rsbuddy.script.methods.Walking;
  6. import com.rsbuddy.script.methods.Widgets;
  7. import com.rsbuddy.script.wrappers.*;
  8. import omeg.Rubiyath.Utilities.my;
  9. import Omega.construction.Utils.Strat.strategy;
  10.  
  11. public class crudewoodenchair implements strategy {
  12. @SuppressWarnings("deprecation")
  13. public boolean isValid() {
  14. return Inventory.containsOneOf(ids.PLANKIDS()) && Inventory.containsOneOf(ids.NAILIDS()) && Inventory.containsOneOf(ids.HAMMERIDS()) && Inventory.contains(ids.SAWID());
  15.  
  16. }
  17.  
  18.  
  19.  
  20.  
  21. public void execute() {
  22. if (Widgets.get(396).getComponent(49).isVisible());{
  23. Widgets.get(396).getComponent(49).click();{
  24.  
  25. } else {
  26. GameObject Chairs = Objects.getNearest(ids.CHAIRIDS());
  27. if (Chairs.isOnScreen()) {
  28. interact("Build Chair");
  29. } else {
  30. Walking.findPath(Chairs.getLocation().randomize(2,2)).traverse();{
  31.  
  32. }
  33.  
  34.  
  35. public String getStatus() {
  36. return "We are Building Crude Wooden Chair";
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement