kd8lvt

[THAUMCRAFT] FORBIDDEN MAGIC] [UNTESTED] Alchemy Turtle

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