Advertisement
MagmaLP

Mall Shop Info Screen

Feb 20th, 2023 (edited)
819
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.56 KB | None | 0 0
  1. function calc_color(color)
  2.     return math.pow(2, color - 1)
  3. end
  4. function msg(gap, line, color, groundb, text)
  5.     mon.setBackgroundColor(calc_color(groundb))
  6.     mon.setCursorPos(gap,line)
  7.     mon.setTextColor(calc_color(color))
  8.     text = mon.write(text)
  9. end
  10.  
  11. function deutsch()
  12.     mon = peripheral.wrap("bottom")
  13.     mon.setTextScale(1)
  14.     mon.setBackgroundColor(32768)
  15.     mon.setCursorPos(1,1)
  16.     mon.clear()
  17.    
  18.     msg(01,01,02,16,"Du brauchst schnell HVs, MVs oder LVs?")
  19.     msg(21,01,15,16,"HVs") msg(26,01,15,16,"MVs") msg(35,01,15,16,"LVs")
  20.  
  21.     msg(01,04,05,16,"Dann bist du hier genau richtig.")
  22.  
  23.     msg(01,07,09,16,"Hier kannst du Erze gegen virtuelles")
  24.     msg(01,08,09,16,"Geld tauschen, welches du danach sofort")
  25.     msg(34,08,05,16,"sofort")
  26.     msg(01,09,09,16,"gegen HVs, MVs, LVs ... tauschen kannst")
  27.     msg(07,09,15,16,"HVs") msg(12,09,15,16,"MVs") msg(17,09,15,16,"LVs")
  28.  
  29.     msg(01,12,05,16,"Beispiele:")
  30.     msg(01,13,09,16,"->   4 Stacks Lead Ore = 1 MV")
  31.     msg(01,14,09,16,"->  40 Quartz Crystal  = 1 MV")
  32.     msg(01,15,09,16,"->   9 Ghast Tears     = 1 MV")
  33.     msg(01,16,09,16,"->   1 Wither Skull    = 2 MVs")
  34.     msg(01,17,09,16,"->   3 Ferrouse Ore    = 1 LV")
  35.    
  36.     msg(01,19,05,16,"Geh mal rein da gibts noch mehr :D")
  37.     for i = 20,1,-1 do
  38.         if i <= 9 then
  39.             msg(38,19,01,16,"  "..i)
  40.         end
  41.         msg(37,19,01,16," "..i)
  42.         sleep(1)
  43.     end
  44. end
  45.  
  46. function english()
  47.     mon = peripheral.wrap("bottom")
  48.     mon.setTextScale(1)
  49.     mon.setBackgroundColor(32768)
  50.     mon.setCursorPos(1,1)
  51.     mon.clear()
  52.    
  53.     msg(01,01,02,16,"You need HVs, MVs or LVs quickly?")
  54.     msg(10,01,15,16,"HVs") msg(15,01,15,16,"MVs") msg(22,01,15,16,"LVs")
  55.  
  56.     msg(01,04,05,16,"Then you are exactly right here.")
  57.  
  58.     msg(01,07,09,16,"Here you can exchange ores for virtual")
  59.     msg(01,08,09,16,"money, which you can then immediately")
  60.     msg(27,08,05,16,"immediately")
  61.     msg(01,09,09,16,"exchange for HVs, MVs, LVs...")
  62.     msg(14,09,15,16,"HVs") msg(19,09,15,16,"MVs") msg(24,09,15,16,"LVs")
  63.  
  64.     msg(01,12,05,16,"Examples:")
  65.     msg(01,13,09,16,"->   4 Stacks Lead Ore = 1 MV")
  66.     msg(01,14,09,16,"->  40 Quartz Crystal  = 1 MV")
  67.     msg(01,15,09,16,"->   9 Ghast Tears     = 1 MV")
  68.     msg(01,16,09,16,"->   1 Wither Skull    = 2 MVs")
  69.     msg(01,17,09,16,"->   3 Ferrouse Ore    = 1 LV")
  70.    
  71.     msg(01,19,05,16,"Come in there are more offers :D")
  72.     for i = 20,1,-1 do
  73.         if i <= 9 then
  74.             msg(38,19,01,16,"  "..i)
  75.         end
  76.         msg(37,19,01,16," "..i)
  77.         sleep(1)
  78.     end
  79. end
  80.  
  81. while true do
  82.     deutsch()
  83.     sleep(0.5)
  84.     english()
  85.     sleep(0.5)
  86. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement