Klazam33

Botania Dropper

May 6th, 2021 (edited)
662
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("kapi")
  2.  
  3. n = 6 -- Amount dropped at a time
  4.  
  5. while true do
  6.    
  7.     kapi.clear()
  8.    
  9.     print("Place flower food in slot 1\nThis program will drop "..n.." at a time, so be prepared.\n")
  10.     sleep(1)
  11.  
  12.     if turtle.getItemCount(1) == 0 then
  13.         print("I need a refill. Press enter when ready.")
  14.         keypress = kapi.keyread()
  15.        
  16.         if keypress == keys.enter then --
  17.             print("Thank you. Checking now")
  18.         else
  19.             print("Not valid input, but sure, still checking now.")
  20.         end
  21.     else
  22.         print("Inventory detected. Dropping now.")
  23.         turtle.dropDown(n) -- drops the defined number above at a time
  24.        
  25.         time = 399 -- 399 second timer for Coal blocks
  26.         while time > 0 do -- Countdown timer
  27.             sleep(1)
  28.             time = time-1
  29.             if time > 0 then
  30.                 kapi.clear()
  31.                 print("In the process of feeding flowers. Currently snoozing for " ..time.. " seconds.")
  32.             else
  33.                 kapi.clear()
  34.                 print("Waking up.")
  35.                 sleep(1)
  36.             end
  37.         end -- ending countdown timer
  38.     end
  39. end
RAW Paste Data