Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Slots made By Honeyphos1234
- ]]--
- if fs.exists("slots.nfp") or fs.exists("slotss.nfp") or fs.exists("slotsss.nfp") then
- sleep(0.1)
- else
- term.clear()
- term.setCursorPos(10,7)
- print("Getting files...")
- sleep(1)
- term.setCursorPos(10,8)
- print("Loading...")
- sleep(1)
- shell.run("pastebin","get","ZyaRvsfq","slots.nfp")
- shell.run("pastebin","get","EjCaYXsF","slotss.nfp")
- shell.run("pastebin","get","Asj0k6Px","slotsss.nfp")
- term.setCursorPos(10,9)
- print("Done")
- end
- term.setBackgroundColor(colors.magenta)
- term.clear()
- term.setCursorPos(10,8)
- print("How many attempts do you want?")
- term.setCursorPos(10,9)
- attempts = tonumber(read())
- function image()
- p = paintutils.loadImage("slots.nfp")
- paintutils.drawImage(p,1,1)
- term.setCursorPos(1,1)
- term.setTextColor(colors.purple)
- print("V Alpha 0.2 Made by Sandis")
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.purple)
- term.setCursorPos(1,18)
- print(" Win Table ")
- term.setBackgroundColor(colors.magenta)
- term.setCursorPos(12,9)
- print("You've spent "..tests.." out of "..attempts.." tries.")
- end
- tests = 0
- while true do
- if tests == attempts then
- term.clear()
- term.setCursorPos(10,8)
- print("You've spent your "..tests.." tries.")
- sleep(2.5)
- shell.run("slot")
- end
- image()
- term.setCursorPos(16,13)
- print("K")
- term.setCursorPos(26,13)
- print("Q")
- term.setCursorPos(36,13)
- print("D")
- term.setBackgroundColor(colors.purple)
- term.setCursorPos(1,18)
- print(" Win table ")
- term.setBackgroundColor(colors.magenta)
- local event, button, x, y = os.pullEvent("monitor_touch")
- if button == 1 and x == 47 or x == 48 or x == 49 or x == 50 or x == 51 or x == 52 or x == 53 and y == 2 or y == 3 or y == 4 or y == 5 or y == 6 then
- tests = tests + 1
- s = paintutils.loadImage("slotsss.nfp")
- paintutils.drawImage(s,1,1)
- sleep(0.2)
- q = paintutils.loadImage("slotss.nfp")
- paintutils.drawImage(q,1,1)
- sleep(0.2)
- paintutils.drawImage(s,1,1)
- sleep(0.2)
- image()
- repeat
- num = math.random(1,7)
- num1 = math.random(1,7)
- num2 = math.random(1,7)
- if num == 1 then
- --term.clear()
- --image()
- term.setCursorPos(15,13)
- print(" K ")
- sleep(0.1)
- elseif num == 2 then
- --term.clear()
- --image()
- term.setCursorPos(15,13)
- print(" Q ")
- sleep(0.1)
- elseif num == 3 then
- --term.clear()
- --image()
- term.setCursorPos(15,13)
- print(" C ")
- sleep(0.1)
- elseif num == 4 then
- --term.clear()
- --image()
- term.setCursorPos(15,13)
- print(" G ")
- sleep(0.1)
- elseif num == 5 then
- --term.clear()
- --image()
- term.setCursorPos(15,13)
- print(" D ")
- sleep(0.1)
- elseif num == 6 then
- --term.clear()
- --image()
- term.setCursorPos(15,13)
- print(" I ")
- sleep(0.1)
- elseif num == 7 then
- num = num + 2
- end
- if num > 9 then
- break
- end
- if num1 == 1 then
- --term.clear()
- --image()
- term.setCursorPos(25,13)
- print(" K ")
- sleep(0.1)
- elseif num1 == 2 then
- --term.clear()
- --image()
- term.setCursorPos(25,13)
- print(" Q ")
- sleep(0.1)
- elseif num1 == 3 then
- --term.clear()
- --image()
- term.setCursorPos(25,13)
- print(" C ")
- sleep(0.1)
- elseif num1 == 4 then
- --term.clear()
- --image()
- term.setCursorPos(25,13)
- print(" G ")
- sleep(0.1)
- elseif num1 == 5 then
- --term.clear()
- --image()
- term.setCursorPos(25,13)
- print(" D ")
- sleep(0.1)
- elseif num1 == 6 then
- --term.clear()
- --image()
- term.setCursorPos(25,13)
- print(" I ")
- sleep(0.1)
- elseif num1 == 7 then
- num1 = num1 + 2
- end
- if num1 > 9 then
- break
- end
- if num2 == 1 then
- --term.clear()
- --image()
- term.setCursorPos(35,13)
- print(" K ")
- sleep(0.1)
- elseif num2 == 2 then
- --term.clear()
- --image()
- term.setCursorPos(35,13)
- print(" Q ")
- sleep(0.1)
- elseif num2 == 3 then
- --term.clear()
- --image()
- term.setCursorPos(35,13)
- print(" C ")
- sleep(0.1)
- elseif num2 == 4 then
- --term.clear()
- --image()
- term.setCursorPos(35,13)
- print(" G ")
- sleep(0.1)
- elseif num2 == 5 then
- --term.clear()
- --image()
- term.setCursorPos(35,13)
- print(" D ")
- sleep(0.1)
- elseif num2 == 6 then
- --term.clear()
- --image()
- term.setCursorPos(35,13)
- print(" I ")
- sleep(0.1)
- elseif num2 == 7 then
- num2 = num2 + 9
- if num2 > 9 then
- break
- end
- elseif tests == attempts then
- term.clear()
- term.setCursorPos(10,8)
- print("You've spent your "..attempts.." attempts.")
- sleep(3)
- shell.run("slots")
- end
- until num == num1 and num == num2
- if num == num1 and num == num2 and num2 == num1 then
- term.setCursorPos(18,18)
- print("You won price "..num.."!")
- sleep(1)
- --shell.run("slots")
- else
- term.setCursorPos(18,18)
- print("You didn't win :(")
- sleep(1)
- end
- elseif x == 1 or x == 2 or x == 3 or x == 4 or x == 5 or x == 6 or x == 7 or x == 8 and y == 19 then
- if fs.exists("/slots-config") then
- f = fs.open("/slots-config","r")
- message1 = f.readLine()
- message2 = f.readLine()
- message3 = f.readLine()
- message4 = f.readLine()
- message5 = f.readLine()
- message6 = f.readLine()
- if message1 == nil or message2 == nil or message3 == nil or message4 == nil or message5 == nil or message6 == nil then
- term.clear()
- term.setCursorPos(1,1)
- print("You have to define these messages in the slots-config file")
- sleep(2)
- break
- end
- f.close()
- term.clear()
- term.setCursorPos(5,5)
- print("D D D = "..message1)
- term.setCursorPos(5,6)
- print("G G G = "..message2)
- term.setCursorPos(5,7)
- print("I I I = "..message3)
- term.setCursorPos(5,8)
- print("R R R = "..message4)
- term.setCursorPos(5,9)
- print("L L L = "..message5)
- term.setCursorPos(5,10)
- print("C C C = "..message6)
- sleep(3)
- elseif not fs.exists("/slots-config") then
- term.clear()
- term.setCursorPos(1,1)
- print("Please define these messages")
- print("In the file called 'slots-config'")
- sleep(2)
- q = fs.open("/slots-config","w")
- q.writeLine("Put your messages for the win table")
- q.writeLine("here. 1st line = D(Diamond win)")
- q.writeLine("2nd Line = G(Gold win)")
- q.writeLine("3rd Line = I(Iron win)")
- q.writeLine("4th Line = R(Redstone win)")
- q.writeLine("5th Line = L(Lapis win)")
- q.writeLine("6th Line = C(CAKE WIN)")
- q.writeLine("All lines under line 6 is useless")
- q.writeLine("Make sure you delete all this text")
- q.writeLine("And put in your own messages")
- q.close()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement