Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function centerText(text, y, colors)
- mX = mon.getSize()
- x = math.floor(mX/2) - math.floor(string.len(text)/2)
- mon.setCursorPos(x, y)
- mon.setTextColors(colors)
- mon.write(text)
- end
- function Text(text, y, colors)
- mX = mon.getSize()
- x = 3
- mon.setCursorPos(x,y)
- mon.setTextColors(colors)
- mon.write(text)
- end
- mon = peripheral.wrap("back")
- mon.setTextScale(1)
- mon.setBackgroundColors(colors.gray)
- mon.clear()
- centerText("Bienvenue à la boutique du serveur", 1,16384)
- centerText("Pour acheter un produit,", 2,2)
- centerText("clique gauche sur un coffre", 3,2)
- centerText("_________________________________________________________", 4,2)
- centerText(" Item | Prix", 5,2)
- Text(" Coal | 1 euro", 6,2)
- Text(" Ender Pearl | 10 euros", 7,2)
- Text(" Emerald | 50 euros", 8,2)
- Text(" Iridium Ore | 250 euros", 9,2)
- Text(" Personal Anchor | 100 euro", 10,2)
- Text(" Personal Anchor Cart | 100 euro", 11,2)
- Text(" World Anchor | 1 000 euros", 12,2)
- Text(" Anchor Cart | 1 000 euros", 13,2)
Advertisement
Add Comment
Please, Sign In to add comment