Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- side = "right"
- mon = peripheral.wrap(side)
- mon.setBackgroundColor(32768)
- mon.setTextScale(1)
- mon.clear()
- function calc_color(color)
- return math.pow(2, color - 1)
- end
- function msg(gap, line, color, groundb, text)
- mon.setBackgroundColor(calc_color(groundb))
- mon.setCursorPos(gap,line)
- mon.setTextColor(calc_color(color))
- text = mon.write(text)
- end
- function start()
- msg(09,03,06,16,"Important informations, plese read")
- msg(09,04,09,16,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
- msg(08,07,05,01," ") msg(31,07,05,01," ")
- msg(08,08,05,01," ") msg(31,08,05,01," ")
- msg(08,09,16,01," deutsch ") msg(31,09,16,01," english ")
- msg(08,10,05,01," ") msg(31,10,05,01," ")
- msg(08,11,05,01," ") msg(31,11,05,01," ")
- msg(08,12,05,16," ")
- event, side, x, y = os.pullEvent("monitor_touch")
- if x >= 8 and x <= 20 and y >= 7 and y <= 11 then
- mon.clear()
- deutsch()
- elseif x >= 31 and x <= 43 and y >= 7 and y <= 11 then
- mon.clear()
- english()
- else
- start()
- end
- end
- function deutsch()
- msg(02,02,05,16,"Willkommen in Trading-City")
- msg(02,03,05,16,"~~~~~~~~~~~~~~~~~~~~~~~~~~")
- msg(02,05,15,16,"Rechter Seite:")
- msg(02,06,04,16,"Diese Seite können nur Spieler nutzen welche")
- msg(02,07,04,16,"der Stadt beigetreten sind. ")
- msg(02,08,10,16,"/t join Trading")
- msg(02,10,15,16,"Linke Seite:")
- msg(02,11,04,16,"Diese Seite können alle Spieler nutzen, auch")
- msg(02,12,04,16,"wenn diese nicht der Stadt beigetreten ist.")
- msg(39,17,16,01," ")
- msg(39,18,16,01," zurück ")
- msg(39,19,16,01," ")
- event, side, x, y = os.pullEvent("monitor_touch")
- if x >= 39 and x <= 50 and y >= 17 and y <= 19 then
- os.reboot()
- else
- deutsch()
- end
- end
- function english()
- msg(2,2,05,16," Welcome to Trading-City ")
- msg(2,3,05,16," ~~~~~~~~~~~~~~~~~~~~~~~ ")
- msg(02,05,15,16,"Right Side:")
- msg(02,06,04,16,"This side can only be used by Players")
- msg(02,07,04,16,"who joined the City. ")
- msg(02,08,10,16,"/t join Trading")
- msg(02,10,15,16,"Left Side:")
- msg(02,11,04,16,"This side can be used by all players, also")
- msg(02,12,04,16,"if they not joined the city")
- msg(39,17,16,01," ")
- msg(39,18,16,01," back ")
- msg(39,19,16,01," ")
- event, side, x, y = os.pullEvent("monitor_touch")
- if x >= 39 and x <= 50 and y >= 17 and y <= 19 then
- os.reboot()
- else
- english()
- end
- end
- start()
Advertisement
Add Comment
Please, Sign In to add comment