Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this program gets the arguments given, and proceeds with the given method to modify the given accounts balance
- version = "1.0.0"
- local tArg = {..}--Amount, Account, Method, Server
- local Amount = tArg[0]
- local Account = tArg[1]
- local Method = tArg[2]
- local Server = tArg[3]
- local SecurityProtocol = 1000
- local function EditAccount()
- local File = fs.open(Account,"a")
- File.nextLine()
- local Balance = File.readLine()
- File.clearLine()
- File.writeLine(Balance + Amount)
- File.close()
- end
- local function SendTransfer()
- local Modem = peripheral.find("Modem")
- rednet.open(Modem)
- rednet.send(Server,{Amount,Account},SecurityProtocol)
- rednet.close(Modem)
- end
- if Method == "Local" then
- EditAccount()
- elseif Method == "Wireless" then
- SendTransfer()
- end
Add Comment
Please, Sign In to add comment