Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- calc = 0
- while true do
- id,mess = rednet.receive()
- if (id ==43) and (mess == "demande")then
- rep = turtle.suck()
- obj = turtle.getItemDetail(1)
- while (rep == true) do
- print(obj.name)
- cpt = turtle.getItemCount(1)
- print(cpt)
- if(obj.name == "minecraft:iron_ingot" ) then
- calc = calc + (cpt * 1)
- print(calc.."credit")
- turtle.dropDown()
- end
- rep = turtle.suck()
- end
- print("il y a au final "..calc)
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement