Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this program recieves the requested amount, and then waits for card input
- local tArg = {..}
- local RAmount = tArg[0]
- local Reader = peripheral.find("reader")
- repeat
- local event, side, id, data = os.pullEvent("mag_swipe")
- until event == "mag_swipe"
- local CardData = {data}
- local ClientAccount = CardData[0]
- local ServerID = CardData[1]
- local Protocol = CardData[2]
- local modem = peripherals.find("modem")
- local Transmition = {RAmount,ClientAccount,id}
- rednet.open("modem")
- rednet.send(ServerID,Transmition,Protocol)
- repeat
- local id, message, protocol = rednet.receive()
- until id == ServerID
- if message == "Accepted" then
- return("true")
- elseif message == "Declined" then
- return("false")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement