Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Fusion1 = peripheral.wrap("powered_tile_750")
- Fusion2 = peripheral.wrap("powered_tile_752")
- Fusion3 = peripheral.wrap("powered_tile_751")
- Fusion4 = peripheral.wrap("powered_tile_749")
- Mon_de_l_item1 = " Yellorium"
- Mon_de_l_item2 = " Copper"
- Mon_de_l_item3 = " Tin"
- Mon_de_l_item4 = " Or"
- Heure1 = 0
- Heure2 = 0
- Heure3 = 0
- Heure4 = 0
- Nombre = 0
- Nombre = 0
- Nombre = 0
- Nombre = 0
- local function r(...) return shell.run(...) end
- local function w(...) return write(...) end
- if not fs.exists("Config") then
- fs.makeDir("Config")
- end
- if not fs.exists("Config/Yellorium") then
- createAcc1 = fs.open("Config/Yellorium", "w")
- createAcc1.write("0")
- createAcc1.close()
- end
- if not fs.exists("Config/Copper") then
- createAcc1 = fs.open("Config/Copper", "w")
- createAcc1.write("0")
- createAcc1.close()
- end
- if not fs.exists("Config/Tin") then
- createAcc1 = fs.open("Config/Tin", "w")
- createAcc1.write("0")
- createAcc1.close()
- end
- if not fs.exists("Config/Or") then
- createAcc1 = fs.open("Config/Or", "w")
- createAcc1.write("0")
- createAcc1.close()
- end
- local function post(one,two,tree,four)
- http.post(
- "http://zaidal.96.lt/ComputerCraft/scorepost.php",
- "one="..textutils.urlEncode(tostring(one)).."&"..
- "two="..textutils.urlEncode(tostring(two)).."&"..
- "tree="..textutils.urlEncode(tostring(tree)).."&"..
- "four="..textutils.urlEncode(tostring(four))
- )
- end
- function Compte1()
- Element1 = Fusion1.getStackInSlot(3)
- if Element1 == nil then
- else
- if Element1.display_name == "element.U" then
- if Element1.qty == 64 then
- heure1 = fs.open("Config/Yellorium","r")
- Heure1 = heure1.readLine()
- heure1.close()
- Heure1 = Heure1 + 1
- Production1 = fs.open("Config/Yellorium","w")
- Production1.write(Heure1)
- Production1.close()
- Yolo1 = Heure1*64
- Nombre1 = Yolo1/16
- print("Stack: "..Heure1.." = "..Nombre1..Mon_de_l_item1)
- sleep(1)
- end
- end
- end
- end
- function Compte2()
- Element2 = Fusion2.getStackInSlot(3)
- if Element2 == nil then
- else
- if Element2.display_name == "element.Cu" then
- if Element2.qty == 64 then
- heure2 = fs.open("Config/Copper","r")
- Heure2 = heure2.readLine()
- heure2.close()
- Heure2 = Heure + 1
- Production2 = fs.open("Config/Copper","w")
- Production2.write(Heure2)
- Production2.close()
- Yolo2 = Heure2*64
- Nombre2 = Yolo2/16
- print("Stack: "..Heure2.." = "..Nombre2..Mon_de_l_item2)
- sleep(1)
- end
- end
- end
- end
- function Compte3()
- Element3 = Fusion3.getStackInSlot(3)
- if Element3 == nil then
- else
- if Element3.display_name == "element.Sn" then
- if Element3.qty == 64 then
- heure3 = fs.open("Config/Tin","r")
- Heure3 = heure3.readLine()
- heure3.close()
- Heure3 = Heure3 + 1
- Production3 = fs.open("Config/Tin","w")
- Production3.write(Heure3)
- Production3.close()
- Yolo3 = Heure3*64
- Nombre3 = Yolo3/16
- print("Stack: "..Heure3.." = "..Nombre3..Mon_de_l_item3)
- sleep(1)
- end
- end
- end
- end
- function Compte4()
- Element4 = Fusion4.getStackInSlot(3)
- if Element4 == nil then
- else
- if Element4.display_name == "element.Au" then
- if Element4.qty == 64 then
- heure4 = fs.open("Config/Or","r")
- Heure4 = heure4.readLine()
- heure4.close()
- Heure4 = Heure4 + 1
- Production4 = fs.open("Config/Or","w")
- Production4.write(Heure4)
- Production4.close()
- Yolo4 = Heure4*64
- Nombre4 = Yolo4/16
- print("Stack: "..Heure4.." = "..Nombre4..Mon_de_l_item4)
- sleep(1)
- end
- end
- end
- end
- while true do
- Compte1()
- Compte2()
- Compte3()
- Compte4()
- post("Stack: "..Heure1.." = "..Nombre1..Mon_de_l_item,"Stack: "..Heure2.." = "..Nombre2..Mon_de_l_item2,"Stack: "..Heure3.." = "..Nombre3..Mon_de_l_item3,"Stack: "..Heure4.." = "..Nombre4..Mon_de_l_item4)
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement