Advertisement
Spirit13300

Untitled

May 27th, 2020
1,558
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. calc = 0
  2. while true do
  3.  
  4.   id,mess = rednet.receive()
  5.  
  6.   if (id ==43) and (mess == "demande")then
  7.      
  8.     rep = turtle.suck()
  9.     obj = turtle.getItemDetail(1)
  10.     while (rep == true) do
  11.         print(obj.name)
  12.         cpt = turtle.getItemCount(1)
  13.         print(cpt)
  14.         if(obj.name == "minecraft:iron_ingot" ) then
  15.            calc = calc + (cpt * 1)
  16.            print(calc.."credit")
  17.            turtle.dropDown()
  18.         end
  19.         rep = turtle.suck()
  20.     end
  21.     print("il y a au final "..calc)
  22.   end
  23.  
  24.  
  25.  
  26.   sleep(1)
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement