SHARE
TWEET

Untitled

Spirit13300 May 27th, 2020 1,142 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. calc = 0
  2. rednet.open("left")
  3. while true do
  4.  
  5.   id,mess = rednet.receive()
  6.     print("message")
  7.   if (id ==43) and (mess == "demande")then
  8.      
  9.     rep = turtle.suck()
  10.    
  11.     while (rep == false) do
  12.         rep = turtle.suck()
  13.         sleep(1)
  14.         print("essais")
  15.     end
  16.  
  17.     -- rep = true
  18.  
  19.     rep2 = turtle.getItemDetail(1)
  20.  
  21.         while ( rep2 ~= "minecraft:iron_ingot") do
  22.             rep = turtle.suck()
  23.             while (rep == false) do
  24.               rep = turtle.suck()
  25.               sleep(1)
  26.               print("essais")
  27.             end
  28.             rep2 = turtle.getItemDetail(1)
  29.         end
  30.  
  31.     obj = turtle.getItemDetail(1)
  32.     while (rep == true) do
  33.         print(obj.name)
  34.         cpt = turtle.getItemCount(1)
  35.         print(cpt)
  36.         if(obj.name == "minecraft:iron_ingot" ) then
  37.            calc = calc + (cpt * 1)
  38.            print(calc.."credit")
  39.            turtle.dropDown()
  40.         end
  41.         rep = turtle.suck()
  42.     end
  43.     print("il y a au final "..calc)
  44.   end
  45.  
  46.  
  47.  
  48.   sleep(1)
  49. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top