Advertisement
Guest User

Alchemy Turtle (UNTESTED) (THAUMCRAFT) (FORBIDDEN MAGIC)

a guest
May 22nd, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.15 KB | None | 0 0
  1. --Functions
  2. function main()
  3.     print("Welcome to Alchemy Turtle by kd8lvt!")
  4.     print("Type the number of the recipe you want to preform, then press eneter!")
  5.     print("1. Rubies (ProjectRed) -> Emeralds (Requires Forbidden Magic and that you have is researched!)")
  6.     choice = tonumber(io.read())
  7.     if choice == 1 then
  8.         rubiesToEmeralds()
  9.     end
  10. end
  11. function rubiesToEmeralds()
  12.     print("How many times would you like me to do this recipe? (Must be at LEAST 4 times!)")
  13.     i = tonumber(io.read())
  14.     if i >= 4 then
  15.         if turtle.getItemCount(1) > 0 then
  16.             if turtle.getItemCount(2) > 0 then
  17.                 for i > 0 do
  18.                     turtle.select(2)
  19.                     turtle.drop(1)
  20.                     sleep(0.5)
  21.                     turtle.select(1)
  22.                     turtle.drop(1)
  23.                     turtle.suckDown()
  24.                     fragmentCount = turtle.getItemCount(1)
  25.                     if fragmentCount >= 10
  26.                         turtle.craft()
  27.                     else
  28.                         print("Not enough Emerald Fragments to craft, doing another alchemy phase.")
  29.                     end
  30.             else
  31.                 print("I need at least ".. i .." rubies from Project Red in slot two (Slot to the right of slot one (top left))")
  32.         else
  33.             print("I need at least ".. i .." emerald fragments in slot one (Top left)")
  34.         end
  35.     end
  36.     main()
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement