SHARE
TWEET

Untitled

Spirit13300 May 27th, 2020 984 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. calc = 0
  2. while true do
  3.  
  4. id,mess = rednet.receive()
  5.  
  6. if (id ==43) and (mess == "demande")then
  7.    
  8.  
  9.     print("demande de credit")
  10.     rednet.send(43,calc)
  11.     print("credit envoy√©")
  12.     calc = 0
  13. end
  14.  
  15.  
  16. turtle.suck()
  17. obj = turtle.getItemDetail(1)
  18. if (obj ~= nil) then
  19.     print(obj.name)
  20.     cpt = turtle.getItemCount(1)
  21.     print(cpt)
  22.     if(obj.name == "minecraft:iron_ingot" ) then
  23.        calc = calc + (cpt * 1)
  24.        print(calc.."credit")
  25.        turtle.dropDown()
  26.      end
  27. end
  28.  
  29. sleep(1)
  30.  
  31. 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