Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.57 KB | None | 0 0
  1. import net.kronok.bot.script.EventModel
  2.  
  3. class PowerChopper extends EventModel {
  4.  
  5.   void stop() {
  6.   getBot().log("Woah...")
  7.   }
  8.  
  9.   void start() {
  10.     getBot().log("Starting..");
  11.     addListeners("state", "inventory")
  12.   }
  13.  
  14.   void onPlayerIdle() {
  15.     chop()
  16.   }
  17.  
  18.   void onInventoryItemAdded(int newCount) {
  19.     if(newCount == 28) {
  20.       drop()
  21.     }
  22.   }
  23.  
  24.   def chop() {
  25.     getBot().log("They see me choppin' they hatin'...")
  26.     interactWithObject("Chop down", 1278)
  27.   }
  28.  
  29.   def drop() {
  30.     getBot().log("Dropping...")
  31.     dropAllOf(1511)
  32.   }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement