Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- serverComputer = 6
- function OpenAll()
- for _,side in ipairs(rs.getSides()) do
- rednet.open(side)
- end
- end
- function runApp()
- OpenAll()
- shell.run("clear")
- while true do
- event, param1 = os.pullEvent()
- shell.run("clear")
- if event == "disk" then
- term.write("Enter Transaction Amount: ")
- t = read()
- path = disk.getMountPath(param1)
- rPath = path.."/card"
- l = fs.open(rPath, "r")
- f = l.readAll()
- l.close()
- shell.run("clear")
- sleep(.5)
- print("Processing")
- sleep(.5)
- shell.run("clear")
- print("Processing.")
- sleep(.5)
- shell.run("clear")
- print("Processing..")
- sleep(.5)
- shell.run("clear")
- print("Processing...")
- sleep(.5)
- shell.run("clear")
- term.write("PUT IN SECOND CARD")
- while true do
- event1, param2 = os.pullEvent()
- shell.run("clear")
- if event1 == "disk" then
- term.write("TRANSACTION AMMOUNT IS "..t.."$")
- path = disk.getMountPath(param2)
- rPath = path.."/card"
- l = fs.open(rPath, "r")
- g = l.readAll()
- l.close()
- shell.run("clear")
- sleep(.5)
- print("Processing")
- sleep(.5)
- shell.run("clear")
- print("Processing.")
- sleep(.5)
- shell.run("clear")
- print("Processing..")
- sleep(.5)
- shell.run("clear")
- print("Processing...")
- sleep(.5)
- shell.run("clear")
- k = f.."!SP!Transaction!SP!"..g.."!SP!"..t
- rednet.send(serverComputer, k)
- print("INFORMATION SENT")
- print("ID 1: "..f)
- print("ID 2: "..g)
- print("TRANSACTION AMMOUT: "..t)
- read()
- shell.run("clear")
- break
- end
- end
- end
- end
- end
- runApp()
Advertisement
Add Comment
Please, Sign In to add comment