Computercraft help

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

zedekblue

Active Member
May 16, 2013
34
3
33
Assuming you know nothing about Lua, I'll break some news to you.
No, yes, no and no.

First: Everything it's printing is on the turtle command prompt. A screen isn't even being used in this program, sorry. If you want anything to be displayed on a screen, you'll need to use the rednet. Which is possible, but annoying to set up and very difficult to explain. :x

Second: Add "print(lv)" to print the level
Code:
while true do
local lv = levelCheck()
 
print(lv)
 
if lv >= 30 then
  getBook()
  m.enchant(30)
  turtle.drop()
end
sleep (2)
end
Although this will print QUITE often and will more than likely ruin the point of it happening. The program would need to be rewritten almost completely if you wanted this to be implemented well.

Third: It's always and only enchanting with 30 levels. You'll just be getting a bunch of (Level 30 --> Level 0) text.

Fourth: Turtles can only drop items below, above, or in front of them. If you want to drop it behind, you'll have to add in some turning or other movements, depending on what else you have in mind for this setup.

Sorry!