Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mSide = "left"
- sorter = 86
- display = 0
- cashIn = 85
- x = 0
- tableName = {}
- tableAmount = {}
- tableBetName = {}
- function waitSorter()
- rednet.open(mSide)
- print("Processing...")
- event, sid, betAmount, dis = os.pullEvent("rednet_message")
- end
- function sendDisplay()
- tableName = textutils.serialize(tableName)
- tableAmount = textutils.serialize(tableAmount)
- tableBetName = textutils.serialize(tableBetName)
- rednet.open(mSide)
- rednet.send(display, tableName)
- rednet.send(display, tableAmount)
- rednet.send(display, tableBetName)
- end
- function sendCash()
- tableName = textutils.serialize(tableName)
- tableAmount = textutils.serialize(tableAmount)
- tableBetName = textutils.serialize(tableBetName)
- rednet.open(mSide)
- rednet.send(cashIn, tableName)
- rednet.send(cashIn, tableAmount)
- rednet.send(cashIn, tableBetName)
- print("Bets transmitted")
- end
- function addTable()
- table.insert(tableName, name)
- table.insert(tableAmount, amount)
- table.insert(tableBetName, betName)
- end
- function logIn()
- event, name = os.pullEvent()
- if event == "player" then
- print("Hello "..name.." Welcome to FusionBetter")
- print("Please enter the exact name of the player you want to bet on")
- print("Note that i am case sensitive")
- betName = io.read()
- print("Please insert the amount you want to bet on "..betName.." in the chest")
- print("You will get odds of 2:1")
- waitSorter()
- print("You have bet "..betAmount.." on "..betName)
- print("Use the FusionCasher to cash in after the competetion")
- print("Thank you for using FusionBetter, good luck")
- addTable()
- elseif event == "redstone" then
- print("No betting while a race is in progress")
- --sendDisplay()
- sendCash()
- end
- end
- while true do
- logIn()
- end
Advertisement
Add Comment
Please, Sign In to add comment