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
- print("demande de credit")
- rednet.send(43,calc)
- print("credit envoyé")
- calc = 0
- end
- turtle.suck()
- obj = turtle.getItemDetail(1)
- if (obj ~= nil) then
- 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
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement