SHOW:
|
|
- or go back to the newest paste.
| 1 | - | -- Change camount to set how many prizes to give out. |
| 1 | + | |
| 2 | - | -- if you are using this on a multiplayer server |
| 2 | + | |
| 3 | - | -- add a way to stop them being able to access the terminal(add a script to make un-terminatable) |
| 3 | + | mon = peripheral.wrap("top")
|
| 4 | mon.clear() | |
| 5 | mon.setCursorPos(1,1) | |
| 6 | - | mon = peripheral.wrap("right")
|
| 6 | + | mon.write(" Insert Philosipher's Stone")
|
| 7 | mon.setCursorPos(1,2) | |
| 8 | mon.write(" In order to play the slots")
| |
| 9 | - | mon.write(" Press")
|
| 9 | + | |
| 10 | function winner() | |
| 11 | - | mon.write(" Button")
|
| 11 | + | sleep(2) |
| 12 | - | mon.setCursorPos(1,3) |
| 12 | + | mon = peripheral.wrap("top")
|
| 13 | - | mon.write("To Play")
|
| 13 | + | mon.clear() |
| 14 | - | mon.setCursorPos(1,4) |
| 14 | + | mon.setCursorPos(1,1) |
| 15 | - | mon.write(" Slots")
|
| 15 | + | mon.write("*-*-*-*")
|
| 16 | - | print("Welcome, Hold Control + T to edit code")
|
| 16 | + | mon.setCursorPos(1,2) |
| 17 | - | |
| 17 | + | mon.write("-*-*-*-")
|
| 18 | mon.setCursorPos(1,3) | |
| 19 | - | sleep(2) |
| 19 | + | mon.write("Winner!")
|
| 20 | - | mon = peripheral.wrap("right")
|
| 20 | + | mon.setCursorPos(1,4) |
| 21 | - | mon.clear() |
| 21 | + | mon.write("-*-*-*-")
|
| 22 | - | mon.setCursorPos(1,1) |
| 22 | + | mon.setCursorPos(1,5) |
| 23 | - | mon.write("*-*-*-*")
|
| 23 | + | mon.write("*-*-*-*")
|
| 24 | - | mon.setCursorPos(1,2) |
| 24 | + | sleep(0.5) |
| 25 | - | mon.write("-*-*-*-")
|
| 25 | + | mon.clear() |
| 26 | - | mon.setCursorPos(1,3) |
| 26 | + | mon.setCursorPos(1,1) |
| 27 | - | mon.write("Winner!")
|
| 27 | + | mon.write("-*-*-*-")
|
| 28 | - | mon.setCursorPos(1,4) |
| 28 | + | mon.setCursorPos(1,2) |
| 29 | - | mon.write("-*-*-*-")
|
| 29 | + | mon.write("*-*-*-*")
|
| 30 | - | mon.setCursorPos(1,5) |
| 30 | + | mon.setCursorPos(1,3) |
| 31 | - | mon.write("*-*-*-*")
|
| 31 | + | mon.write("Winner!")
|
| 32 | - | sleep(0.5) |
| 32 | + | mon.setCursorPos(1,4) |
| 33 | - | mon.clear() |
| 33 | + | mon.write("*-*-*-*")
|
| 34 | - | mon.setCursorPos(1,1) |
| 34 | + | mon.setCursorPos(1,5) |
| 35 | - | mon.write("-*-*-*-")
|
| 35 | + | mon.write("-*-*-*-")
|
| 36 | - | mon.setCursorPos(1,2) |
| 36 | + | sleep(0.5) |
| 37 | - | mon.write("*-*-*-*")
|
| 37 | + | mon.clear() |
| 38 | - | mon.setCursorPos(1,3) |
| 38 | + | mon.setCursorPos(1,1) |
| 39 | - | mon.write("Winner!")
|
| 39 | + | mon.write("*-*-*-*")
|
| 40 | - | mon.setCursorPos(1,4) |
| 40 | + | mon.setCursorPos(1,2) |
| 41 | - | mon.write("*-*-*-*")
|
| 41 | + | mon.write("-*-*-*-")
|
| 42 | - | mon.setCursorPos(1,5) |
| 42 | + | mon.setCursorPos(1,3) |
| 43 | - | mon.write("-*-*-*-")
|
| 43 | + | mon.write("Winner!")
|
| 44 | - | sleep(0.5) |
| 44 | + | mon.setCursorPos(1,4) |
| 45 | - | mon.clear() |
| 45 | + | mon.write("-*-*-*-")
|
| 46 | - | mon.setCursorPos(1,1) |
| 46 | + | mon.setCursorPos(1,5) |
| 47 | - | mon.write("*-*-*-*")
|
| 47 | + | mon.write("*-*-*-*")
|
| 48 | - | mon.setCursorPos(1,2) |
| 48 | + | sleep(0.5) |
| 49 | - | mon.write("-*-*-*-")
|
| 49 | + | mon.clear() |
| 50 | - | mon.setCursorPos(1,3) |
| 50 | + | mon.setCursorPos(1,1) |
| 51 | - | mon.write("Winner!")
|
| 51 | + | mon.write("-*-*-*-")
|
| 52 | - | mon.setCursorPos(1,4) |
| 52 | + | mon.setCursorPos(1,2) |
| 53 | - | mon.write("-*-*-*-")
|
| 53 | + | mon.write("*-*-*-*")
|
| 54 | - | mon.setCursorPos(1,5) |
| 54 | + | mon.setCursorPos(1,3) |
| 55 | - | mon.write("*-*-*-*")
|
| 55 | + | mon.write("Winner!")
|
| 56 | - | sleep(0.5) |
| 56 | + | mon.setCursorPos(1,4) |
| 57 | - | mon.clear() |
| 57 | + | mon.write("*-*-*-*")
|
| 58 | - | mon.setCursorPos(1,1) |
| 58 | + | mon.setCursorPos(1,5) |
| 59 | - | mon.write("-*-*-*-")
|
| 59 | + | mon.write("-*-*-*-")
|
| 60 | - | mon.setCursorPos(1,2) |
| 60 | + | sleep(0.5) |
| 61 | - | mon.write("*-*-*-*")
|
| 61 | + | mon.clear() |
| 62 | - | mon.setCursorPos(1,3) |
| 62 | + | mon.setCursorPos(1,1) |
| 63 | - | mon.write("Winner!")
|
| 63 | + | mon.write("*-*-*-*")
|
| 64 | - | mon.setCursorPos(1,4) |
| 64 | + | mon.setCursorPos(1,2) |
| 65 | - | mon.write("*-*-*-*")
|
| 65 | + | mon.write("-*-*-*-")
|
| 66 | - | mon.setCursorPos(1,5) |
| 66 | + | mon.setCursorPos(1,3) |
| 67 | - | mon.write("-*-*-*-")
|
| 67 | + | mon.write("Winner!")
|
| 68 | - | sleep(0.5) |
| 68 | + | mon.setCursorPos(1,4) |
| 69 | - | mon.clear() |
| 69 | + | mon.write("-*-*-*-")
|
| 70 | - | mon.setCursorPos(1,1) |
| 70 | + | mon.setCursorPos(1,5) |
| 71 | - | mon.write("*-*-*-*")
|
| 71 | + | mon.write("*-*-*-*")
|
| 72 | - | mon.setCursorPos(1,2) |
| 72 | + | sleep(0.5) |
| 73 | - | mon.write("-*-*-*-")
|
| 73 | + | mon.clear() |
| 74 | - | mon.setCursorPos(1,3) |
| 74 | + | mon.setCursorPos(1,1) |
| 75 | - | mon.write("Winner!")
|
| 75 | + | mon.write("-*-*-*-")
|
| 76 | - | mon.setCursorPos(1,4) |
| 76 | + | mon.setCursorPos(1,2) |
| 77 | - | mon.write("-*-*-*-")
|
| 77 | + | mon.write("*-*-*-*")
|
| 78 | - | mon.setCursorPos(1,5) |
| 78 | + | mon.setCursorPos(1,3) |
| 79 | - | mon.write("*-*-*-*")
|
| 79 | + | mon.write("Winner!")
|
| 80 | - | sleep(0.5) |
| 80 | + | mon.setCursorPos(1,4) |
| 81 | - | mon.clear() |
| 81 | + | mon.write("*-*-*-*")
|
| 82 | - | mon.setCursorPos(1,1) |
| 82 | + | mon.setCursorPos(1,5) |
| 83 | - | mon.write("-*-*-*-")
|
| 83 | + | mon.write("-*-*-*-")
|
| 84 | - | mon.setCursorPos(1,2) |
| 84 | + | |
| 85 | - | mon.write("*-*-*-*")
|
| 85 | + | |
| 86 | - | mon.setCursorPos(1,3) |
| 86 | + | |
| 87 | - | mon.write("Winner!")
|
| 87 | + | sleep(2) |
| 88 | - | mon.setCursorPos(1,4) |
| 88 | + | mon = peripheral.wrap("top")
|
| 89 | - | mon.write("*-*-*-*")
|
| 89 | + | mon.clear() |
| 90 | - | mon.setCursorPos(1,5) |
| 90 | + | mon.setCursorPos(1,1) |
| 91 | - | mon.write("-*-*-*-")
|
| 91 | + | mon.write("*-*-*-*")
|
| 92 | mon.setCursorPos(1,2) | |
| 93 | - | |
| 93 | + | mon.write("-*-*-*-")
|
| 94 | mon.setCursorPos(1,3) | |
| 95 | - | sleep(2) |
| 95 | + | mon.write("Loser!!")
|
| 96 | - | mon = peripheral.wrap("right")
|
| 96 | + | mon.setCursorPos(1,4) |
| 97 | - | mon.clear() |
| 97 | + | mon.write("-*-*-*-")
|
| 98 | - | mon.setCursorPos(1,1) |
| 98 | + | mon.setCursorPos(1,5) |
| 99 | - | mon.write("*-*-*-*")
|
| 99 | + | mon.write("*-*-*-*")
|
| 100 | - | mon.setCursorPos(1,2) |
| 100 | + | sleep(0.5) |
| 101 | - | mon.write("-*-*-*-")
|
| 101 | + | mon.clear() |
| 102 | - | mon.setCursorPos(1,3) |
| 102 | + | mon.setCursorPos(1,1) |
| 103 | - | mon.write("Loser!!")
|
| 103 | + | mon.write("-*-*-*-")
|
| 104 | - | mon.setCursorPos(1,4) |
| 104 | + | mon.setCursorPos(1,2) |
| 105 | - | mon.write("-*-*-*-")
|
| 105 | + | mon.write("*-*-*-*")
|
| 106 | - | mon.setCursorPos(1,5) |
| 106 | + | mon.setCursorPos(1,3) |
| 107 | - | mon.write("*-*-*-*")
|
| 107 | + | mon.write("Loser!!")
|
| 108 | - | sleep(0.5) |
| 108 | + | mon.setCursorPos(1,4) |
| 109 | - | mon.clear() |
| 109 | + | mon.write("*-*-*-*")
|
| 110 | - | mon.setCursorPos(1,1) |
| 110 | + | mon.setCursorPos(1,5) |
| 111 | - | mon.write("-*-*-*-")
|
| 111 | + | mon.write("-*-*-*-")
|
| 112 | - | mon.setCursorPos(1,2) |
| 112 | + | sleep(0.5) |
| 113 | - | mon.write("*-*-*-*")
|
| 113 | + | mon.clear() |
| 114 | - | mon.setCursorPos(1,3) |
| 114 | + | mon.setCursorPos(1,1) |
| 115 | - | mon.write("Loser!!")
|
| 115 | + | mon.write("*-*-*-*")
|
| 116 | - | mon.setCursorPos(1,4) |
| 116 | + | mon.setCursorPos(1,2) |
| 117 | - | mon.write("*-*-*-*")
|
| 117 | + | mon.write("-*-*-*-")
|
| 118 | - | mon.setCursorPos(1,5) |
| 118 | + | mon.setCursorPos(1,3) |
| 119 | - | mon.write("-*-*-*-")
|
| 119 | + | mon.write("Loser!!")
|
| 120 | - | sleep(0.5) |
| 120 | + | mon.setCursorPos(1,4) |
| 121 | - | mon.clear() |
| 121 | + | mon.write("-*-*-*-")
|
| 122 | - | mon.setCursorPos(1,1) |
| 122 | + | mon.setCursorPos(1,5) |
| 123 | - | mon.write("*-*-*-*")
|
| 123 | + | mon.write("*-*-*-*")
|
| 124 | - | mon.setCursorPos(1,2) |
| 124 | + | sleep(0.5) |
| 125 | - | mon.write("-*-*-*-")
|
| 125 | + | mon.clear() |
| 126 | - | mon.setCursorPos(1,3) |
| 126 | + | mon.setCursorPos(1,1) |
| 127 | - | mon.write("Loser!!")
|
| 127 | + | mon.write("-*-*-*-")
|
| 128 | - | mon.setCursorPos(1,4) |
| 128 | + | mon.setCursorPos(1,2) |
| 129 | - | mon.write("-*-*-*-")
|
| 129 | + | mon.write("*-*-*-*")
|
| 130 | - | mon.setCursorPos(1,5) |
| 130 | + | mon.setCursorPos(1,3) |
| 131 | - | mon.write("*-*-*-*")
|
| 131 | + | mon.write("Loser!!")
|
| 132 | - | sleep(0.5) |
| 132 | + | mon.setCursorPos(1,4) |
| 133 | - | mon.clear() |
| 133 | + | mon.write("*-*-*-*")
|
| 134 | - | mon.setCursorPos(1,1) |
| 134 | + | mon.setCursorPos(1,5) |
| 135 | - | mon.write("-*-*-*-")
|
| 135 | + | mon.write("-*-*-*-")
|
| 136 | - | mon.setCursorPos(1,2) |
| 136 | + | sleep(0.5) |
| 137 | - | mon.write("*-*-*-*")
|
| 137 | + | mon.clear() |
| 138 | - | mon.setCursorPos(1,3) |
| 138 | + | mon.setCursorPos(1,1) |
| 139 | - | mon.write("Loser!!")
|
| 139 | + | mon.write("*-*-*-*")
|
| 140 | - | mon.setCursorPos(1,4) |
| 140 | + | mon.setCursorPos(1,2) |
| 141 | - | mon.write("*-*-*-*")
|
| 141 | + | mon.write("-*-*-*-")
|
| 142 | - | mon.setCursorPos(1,5) |
| 142 | + | mon.setCursorPos(1,3) |
| 143 | - | mon.write("-*-*-*-")
|
| 143 | + | mon.write("Loser!!")
|
| 144 | - | sleep(0.5) |
| 144 | + | mon.setCursorPos(1,4) |
| 145 | - | mon.clear() |
| 145 | + | mon.write("-*-*-*-")
|
| 146 | - | mon.setCursorPos(1,1) |
| 146 | + | mon.setCursorPos(1,5) |
| 147 | - | mon.write("*-*-*-*")
|
| 147 | + | mon.write("*-*-*-*")
|
| 148 | - | mon.setCursorPos(1,2) |
| 148 | + | sleep(0.5) |
| 149 | - | mon.write("-*-*-*-")
|
| 149 | + | mon.clear() |
| 150 | - | mon.setCursorPos(1,3) |
| 150 | + | mon.setCursorPos(1,1) |
| 151 | - | mon.write("Loser!!")
|
| 151 | + | mon.write("-*-*-*-")
|
| 152 | - | mon.setCursorPos(1,4) |
| 152 | + | mon.setCursorPos(1,2) |
| 153 | - | mon.write("-*-*-*-")
|
| 153 | + | mon.write("*-*-*-*")
|
| 154 | - | mon.setCursorPos(1,5) |
| 154 | + | mon.setCursorPos(1,3) |
| 155 | - | mon.write("*-*-*-*")
|
| 155 | + | mon.write("Loser!!")
|
| 156 | - | sleep(0.5) |
| 156 | + | mon.setCursorPos(1,4) |
| 157 | - | mon.clear() |
| 157 | + | mon.write("*-*-*-*")
|
| 158 | - | mon.setCursorPos(1,1) |
| 158 | + | mon.setCursorPos(1,5) |
| 159 | - | mon.write("-*-*-*-")
|
| 159 | + | mon.write("-*-*-*-")
|
| 160 | - | mon.setCursorPos(1,2) |
| 160 | + | |
| 161 | - | mon.write("*-*-*-*")
|
| 161 | + | |
| 162 | - | mon.setCursorPos(1,3) |
| 162 | + | |
| 163 | - | mon.write("Loser!!")
|
| 163 | + | result1 = math.random(1,7) |
| 164 | - | mon.setCursorPos(1,4) |
| 164 | + | result1 = result1 - ".0" |
| 165 | - | mon.write("*-*-*-*")
|
| 165 | + | |
| 166 | - | mon.setCursorPos(1,5) |
| 166 | + | result2 = math.random(1,7) |
| 167 | - | mon.write("-*-*-*-")
|
| 167 | + | result2 = result2 - ".0" |
| 168 | ||
| 169 | - | |
| 169 | + | result3 = math.random(1,7) |
| 170 | result3 = result3 - ".0" | |
| 171 | - | result1 = math.random(1,7) |
| 171 | + | |
| 172 | - | result1 = result1 - ".0" |
| 172 | + | result4 = math.random(1,7) |
| 173 | - | |
| 173 | + | result4 = result4 - ".0" |
| 174 | - | result2 = math.random(1,7) |
| 174 | + | |
| 175 | - | result2 = result2 - ".0" |
| 175 | + | result5 = math.random(1,7) |
| 176 | - | |
| 176 | + | result5 = result5 - ".0" |
| 177 | - | result3 = math.random(1,7) |
| 177 | + | |
| 178 | - | result3 = result3 - ".0" |
| 178 | + | result6 = math.random(1,7) |
| 179 | - | |
| 179 | + | result6 = result6 - ".0" |
| 180 | - | result4 = math.random(1,7) |
| 180 | + | |
| 181 | - | result4 = result4 - ".0" |
| 181 | + | result7 = math.random(1,7) |
| 182 | - | |
| 182 | + | result7 = result7 - ".0" |
| 183 | - | result5 = math.random(1,7) |
| 183 | + | |
| 184 | - | result5 = result5 - ".0" |
| 184 | + | result8 = math.random(1,7) |
| 185 | - | |
| 185 | + | result8 = result8 - ".0" |
| 186 | - | result6 = math.random(1,7) |
| 186 | + | |
| 187 | - | result6 = result6 - ".0" |
| 187 | + | result9 = math.random(1,7) |
| 188 | - | |
| 188 | + | result9 = result9 - ".0" |
| 189 | - | result7 = math.random(1,7) |
| 189 | + | |
| 190 | - | result7 = result7 - ".0" |
| 190 | + | term.setCursorPos(25,5) |
| 191 | - | |
| 191 | + | mon = peripheral.wrap("top")
|
| 192 | - | result8 = math.random(1,7) |
| 192 | + | mon.clear() |
| 193 | - | result8 = result8 - ".0" |
| 193 | + | mon.setCursorPos(1,1) |
| 194 | - | |
| 194 | + | mon.write("*******")
|
| 195 | - | result9 = math.random(1,7) |
| 195 | + | mon.setCursorPos(2,2) |
| 196 | - | result9 = result9 - ".0" |
| 196 | + | mon.write(result1.."|"..result2.."|"..result3) |
| 197 | - | |
| 197 | + | mon.setCursorPos(2,3) |
| 198 | - | term.setCursorPos(25,5) |
| 198 | + | mon.write(result4.."|"..result5.."|"..result6) |
| 199 | - | mon = peripheral.wrap("right")
|
| 199 | + | mon.setCursorPos(2,4) |
| 200 | - | mon.clear() |
| 200 | + | mon.write(result7.."|"..result8.."|"..result9) |
| 201 | - | mon.setCursorPos(1,1) |
| 201 | + | mon.setCursorPos(1,5) |
| 202 | - | mon.write("*******")
|
| 202 | + | mon.write("*******")
|
| 203 | - | mon.setCursorPos(2,2) |
| 203 | + | term.setCursorPos(1,3) |
| 204 | - | mon.write(result1.."|"..result2.."|"..result3) |
| 204 | + | print("Debug Info:")
|
| 205 | - | mon.setCursorPos(2,3) |
| 205 | + | print("Results: "..result1.."|"..result2.."|"..result3)
|
| 206 | - | mon.write(result4.."|"..result5.."|"..result6) |
| 206 | + | print(" "..result4.."|"..result5.."|"..result6)
|
| 207 | - | mon.setCursorPos(2,4) |
| 207 | + | print(" "..result7.."|"..result8.."|"..result9)
|
| 208 | - | mon.write(result7.."|"..result8.."|"..result9) |
| 208 | + | |
| 209 | - | mon.setCursorPos(1,5) |
| 209 | + | if result1 == result2 and result2 == result3 then |
| 210 | - | mon.write("*******")
|
| 210 | + | print("Row Match, Top Row")
|
| 211 | - | term.setCursorPos(1,3) |
| 211 | + | winner() |
| 212 | - | print("Debug Info:")
|
| 212 | + | cpayout = 0 |
| 213 | - | print("Results: "..result1.."|"..result2.."|"..result3)
|
| 213 | + | while cpayout < camount do |
| 214 | - | print(" "..result4.."|"..result5.."|"..result6)
|
| 214 | + | redstone.setOutput("right",true)
|
| 215 | - | print(" "..result7.."|"..result8.."|"..result9)
|
| 215 | + | sleep(1) |
| 216 | - | |
| 216 | + | redstone.setOutput("right",false)
|
| 217 | - | if result1 == result2 and result2 == result3 then |
| 217 | + | sleep(0.2) |
| 218 | - | print("Row Match, Top Row")
|
| 218 | + | cpayout = cpayout +1 |
| 219 | - | winner() |
| 219 | + | end |
| 220 | - | cpayout = 0 |
| 220 | + | os.reboot() |
| 221 | - | while cpayout < camount do |
| 221 | + | elseif result4 == result5 and result5 == result6 then |
| 222 | - | redstone.setOutput("bottom",true)
|
| 222 | + | print("Row Match, Middle Row")
|
| 223 | - | sleep(0.2) |
| 223 | + | winner() |
| 224 | - | redstone.setOutput("bottom",false)
|
| 224 | + | cpayout = 0 |
| 225 | - | sleep(0.2) |
| 225 | + | while cpayout < camount do |
| 226 | - | cpayout = cpayout +1 |
| 226 | + | redstone.setOutput("right",true)
|
| 227 | - | end |
| 227 | + | sleep(0.2) |
| 228 | - | os.reboot() |
| 228 | + | redstone.setOutput("right",false)
|
| 229 | - | elseif result4 == result5 and result5 == result6 then |
| 229 | + | sleep(0.2) |
| 230 | - | print("Row Match, Middle Row")
|
| 230 | + | cpayout = cpayout +1 |
| 231 | - | winner() |
| 231 | + | end |
| 232 | - | cpayout = 0 |
| 232 | + | os.reboot() |
| 233 | - | while cpayout < camount do |
| 233 | + | elseif result7 == result8 and result8 == result9 then |
| 234 | - | redstone.setOutput("bottom",true)
|
| 234 | + | print("Row Match, Bottom Row")
|
| 235 | - | sleep(0.2) |
| 235 | + | winner() |
| 236 | - | redstone.setOutput("bottom",false)
|
| 236 | + | cpayout = 0 |
| 237 | - | sleep(0.2) |
| 237 | + | while cpayout < camount do |
| 238 | - | cpayout = cpayout +1 |
| 238 | + | redstone.setOutput("right",true)
|
| 239 | - | end |
| 239 | + | sleep(0.2) |
| 240 | - | os.reboot() |
| 240 | + | redstone.setOutput("right",false)
|
| 241 | - | elseif result7 == result8 and result8 == result9 then |
| 241 | + | sleep(0.2) |
| 242 | - | print("Row Match, Bottom Row")
|
| 242 | + | cpayout = cpayout +1 |
| 243 | - | winner() |
| 243 | + | end |
| 244 | - | cpayout = 0 |
| 244 | + | os.reboot() |
| 245 | - | while cpayout < camount do |
| 245 | + | elseif result1 == result5 and result5 == result9 then |
| 246 | - | redstone.setOutput("bottom",true)
|
| 246 | + | print("Diagonal Match From top to bottom.")
|
| 247 | - | sleep(0.2) |
| 247 | + | winner() |
| 248 | - | redstone.setOutput("bottom",false)
|
| 248 | + | cpayout = 0 |
| 249 | - | sleep(0.2) |
| 249 | + | while cpayout < camount do |
| 250 | - | cpayout = cpayout +1 |
| 250 | + | redstone.setOutput("right",true)
|
| 251 | - | end |
| 251 | + | sleep(0.2) |
| 252 | - | os.reboot() |
| 252 | + | redstone.setOutput("right",false)
|
| 253 | - | elseif result1 == result5 and result5 == result9 then |
| 253 | + | sleep(0.2) |
| 254 | - | print("Diagonal Match From top to bottom.")
|
| 254 | + | cpayout = cpayout +1 |
| 255 | - | winner() |
| 255 | + | end |
| 256 | - | cpayout = 0 |
| 256 | + | os.reboot() |
| 257 | - | while cpayout < camount do |
| 257 | + | elseif result7 == result5 and result5 == result3 then |
| 258 | - | redstone.setOutput("bottom",true)
|
| 258 | + | print("Diagonal Match From bottom to top.")
|
| 259 | - | sleep(0.2) |
| 259 | + | winner() |
| 260 | - | redstone.setOutput("bottom",false)
|
| 260 | + | cpayout = 0 |
| 261 | - | sleep(0.2) |
| 261 | + | while cpayout < camount do |
| 262 | - | cpayout = cpayout +1 |
| 262 | + | redstone.setOutput("right",true)
|
| 263 | - | end |
| 263 | + | sleep(0.2) |
| 264 | - | os.reboot() |
| 264 | + | redstone.setOutput("right",false)
|
| 265 | - | elseif result7 == result5 and result5 == result3 then |
| 265 | + | sleep(0.2) |
| 266 | - | print("Diagonal Match From bottom to top.")
|
| 266 | + | cpayout = cpayout +1 |
| 267 | - | winner() |
| 267 | + | end |
| 268 | - | cpayout = 0 |
| 268 | + | os.reboot() |
| 269 | - | while cpayout < camount do |
| 269 | + | else |
| 270 | - | redstone.setOutput("bottom",true)
|
| 270 | + | print("There was No Match")
|
| 271 | - | sleep(0.2) |
| 271 | + | Loser() |
| 272 | - | redstone.setOutput("bottom",false)
|
| 272 | + | sleep(2) |
| 273 | - | sleep(0.2) |
| 273 | + | os.reboot() |
| 274 | - | cpayout = cpayout +1 |
| 274 | + | |
| 275 | - | end |
| 275 | + | |
| 276 | - | os.reboot() |
| 276 | + | |
| 277 | - | else |
| 277 | + | |
| 278 | - | print("There was No Match")
|
| 278 | + | |
| 279 | - | Loser() |
| 279 | + | |
| 280 | - | sleep(2) |
| 280 | + | while true do |
| 281 | - | os.reboot() |
| 281 | + | |
| 282 | - | end |
| 282 | + | |
| 283 | - | |
| 283 | + | while not redstone.getInput("back") do os.pullEvent("redstone") end
|
| 284 | slots() | |
| 285 | - | |
| 285 | + | |
| 286 | sleep(0) | |
| 287 | - | |
| 287 | + | |
| 288 | - | while rRunning do |
| 288 | + | sleep(0) |
| 289 | end | |
| 290 | sleep(0) | |
| 291 | - | if rEvent == "redstone" then |
| 291 | + | |
| 292 | - | if redstone.getInput("back") then
|
| 292 | + | sleep(0) |
| 293 | - | if redstone.getInput("back") == true then
|
| 293 | + | sleep(0) |