Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var PBot = Java.type("haven.purus.pbot.PBotAPI");
  2. var Player = PBot.player();
  3. var PlayerInv = PBot.playerInventory();
  4. var Utils = Java.type("haven.purus.BotUtils");
  5.  
  6. var PBotWindow = PBot.PBotWindow("Grind_Flour", 100, 120, scriptID);
  7. PBotWindow.addButton("Grind_Flour", "Grinding", 30, 30, 10);
  8. PBotWindow.addButton("pij", "Stamina", 30, 30, 40);
  9. PBotWindow.addButton("test", "test", 30, 30, 80);
  10.  
  11.  
  12. function Grind_Flour(){
  13.    
  14.     if(PBot.getStamina()<=30){
  15.         Utils.drink();
  16.     }
  17.     if(PBot.getStamina()>=90{
  18.     if(PBot.getEnergy()<=3000){
  19.    
  20.    
  21.     var allGobs = PBot.getGobs();
  22.     var gobs = [];
  23.    
  24.    
  25.     for(var i=0; i<allGobs.length; i++) {
  26.         if(PBot.getGobName(allGobs[i]) == "gfx/terobjs/barrel")
  27.         {
  28.             gobs.push(allGobs[i]);
  29.         }
  30.     }
  31.    
  32.     PBot.pfRightClick(gobs[0], null);
  33.     PBot.craftItem("flour", 1);
  34.    
  35.     }
  36.     }
  37.     }
  38. }
  39.  
  40. function pij(){
  41.     Utils.drink();
  42.    
  43.     PBot.closeWindow(PBotWindow);
  44.    
  45. }
  46.  
  47. function test(){
  48.  
  49.    
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement