Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var PBot = Java.type("haven.purus.pbot.PBotAPI");
- var Player = PBot.player();
- var PlayerInv = PBot.playerInventory();
- var Utils = Java.type("haven.purus.BotUtils");
- var PBotWindow = PBot.PBotWindow("Grind_Flour", 100, 120, scriptID);
- PBotWindow.addButton("Grind_Flour", "Grinding", 30, 30, 10);
- PBotWindow.addButton("pij", "Stamina", 30, 30, 40);
- PBotWindow.addButton("test", "test", 30, 30, 80);
- function Grind_Flour(){
- if(PBot.getStamina()<=30){
- Utils.drink();
- }
- if(PBot.getStamina()>=90{
- if(PBot.getEnergy()<=3000){
- var allGobs = PBot.getGobs();
- var gobs = [];
- for(var i=0; i<allGobs.length; i++) {
- if(PBot.getGobName(allGobs[i]) == "gfx/terobjs/barrel")
- {
- gobs.push(allGobs[i]);
- }
- }
- PBot.pfRightClick(gobs[0], null);
- PBot.craftItem("flour", 1);
- }
- }
- }
- }
- function pij(){
- Utils.drink();
- PBot.closeWindow(PBotWindow);
- }
- function test(){
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement