Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. package main;
  2.  
  3. import org.dreambot.api.methods.Calculations;
  4. import org.dreambot.api.script.AbstractScript;
  5. import org.dreambot.api.script.ScriptManifest;
  6. import org.dreambot.api.script.Category;
  7. import org.dreambot.api.wrappers.interactive.GameObject;
  8. import org.dreambot.api.wrappers.interactive.NPC;
  9.  
  10. @ScriptManifest(author = "OsrsBot69", name = "SimpleWoadBuyer", description = "Give account cash, and go to the farmer - will buy woad leaves until out of money.", version = 1.0, category = Category.MONEYMAKING)
  11. public class Main extends AbstractScript {
  12. private int state;
  13. private int coins;
  14. private String gardener;
  15. public void onStart() {
  16. log("Starting Script");
  17. state = 0;
  18. }
  19.  
  20. public void onExit(){
  21. log("Exit Script");
  22. }
  23.  
  24. @Override
  25. public int onLoop() {
  26. if (state == 0) {
  27. buyLeaf();
  28. } else if (state == 1) {
  29. bank();
  30. } else {
  31. }
  32. return Calculations.random(500, 1000);
  33. }
  34. private void buyLeaf() {
  35. if (getInventory().contains("Coins")) {
  36. log("Talk");
  37. } else {
  38. state = 1;
  39. log("Banking");
  40. }
  41. }
  42. private void bank() {
  43. if (!getInventory().contains(coins)){
  44. log("Bank");
  45. }
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement