Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- w,h = term.getSize()
- PRICES = {
- ['currency'] = "iron",
- ['case'] = {
- [1] = 4,
- [2] = 8,
- [3] = 12,
- },
- ['ram'] = {
- [1] = 1,
- [1.5] = 2,
- [2] = 3,
- [2.5] = 5,
- [3] = 7,
- [3.5] = 8,
- },
- ['cpu'] = {
- [1] = 2,
- [2] = 8,
- [3] = 13,
- },
- ['hdd'] = {
- [1] = 2,
- [2] = 5,
- [3] = 13,
- },
- ['gpu'] = {
- ['a1'] = 6,
- ['a2'] = 8,
- ['g1'] = 5,
- ['g2'] = 8,
- ['g3'] = 13,
- },
- ['misc'] = {
- ['floppy'] = 2,
- ['openos'] = 4,
- ['datac'] = 30,
- },
- }
- DEFAULT_SETUP = {
- }
- function caseSTEP()
- -- CASE SCREEN
- -- http://i.imgur.com/GdW7BUB.png
- paintutils.drawFilledBox(1,1,w,3,colours.green)
- paintutils.drawFilledBox(1,4,w,h,colours.white)
- paintutils.drawFilledBox(2,7,5,9,colours.grey)
- paintutils.drawFilledBox(2,11,5,13,colours.yellow)
- paintutils.drawFilledBox(2,15,5,17,colours.cyan)
- term.setCursorPos(2,2)
- local title = "rpe.host's server builder"
- term.blit(title,string.rep("0",#title),string.rep("d",#title))
- term.setCursorPos(2,5)
- term.setTextColour(colours.lightGrey)
- term.setBackgroundColour(colours.white)
- term.write("Select a case:")
- term.setCursorPos(7,7)
- term.setTextColour(colours.grey)
- term.write("Tier 1: " .. PRICES['case'][1] .. " " .. PRICES['currency'])
- term.setCursorPos(7,11)
- term.write("Tier 2: " .. PRICES['case'][2] .. " " .. PRICES['currency'])
- term.setCursorPos(7,15)
- term.write("Tier 3: " .. PRICES['case'][3] .. " " .. PRICES['currency'])
- term.setCursorPos(7,9)
- term.setTextColour(colours.black)
- term.write("Our value package")
- term.setCursorPos(7,13)
- term.setTextColour(colours.orange)
- term.write("Perfect for small apps")
- term.setCursorPos(7,17)
- term.setTextColour(colours.cyan)
- term.write("Ideal for when you need a bit more power")
- caseSTEPwait()
- end
- function caseSTEPwait()
- while true do
- local _,s,x,y = os.pullEvent("mouse_up")
- --middle: 3
- --left: 1
- --right: 2
- if y >= 7 and y <= 9 then
- -- Tier 1
- paintutils.drawFilledBox(1,1,w,3,colours.green)
- paintutils.drawFilledBox(1,4,w,h,colours.white)
- term.setCursorPos(2,2)
- local title = "rpe.host's server builder"
- term.blit(title,string.rep("0",#title),string.rep("d",#title))
- term.setCursorPos(2,5)
- term.setTextColour(colours.lightGrey)
- io.read()
- caseSTEP()
- elseif y >= 11 and y <= 13 then
- -- Tier 2
- elseif y >= 15 and y <= 17 then
- -- Tier 3
- end
- end
- end
- caseSTEP()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement