SHOW:
|
|
- or go back to the newest paste.
| 1 | - | m = peripheral.wrap("monitor_0")
|
| 1 | + | -- Made by Rnen10 |
| 2 | -- If problems/questions feel free to contact me | |
| 3 | -- https://twitter.com/Rnen10 | |
| 4 | - | m.setTextScale(3.5) |
| 4 | + | -- rnen. (Evan#7181) on discord |
| 5 | - | m.setCursorPos(11,2) |
| 5 | + | |
| 6 | - | --for i = 1,20, 1 do |
| 6 | + | -- Monitor display for the Iron golem counter: https://pastebin.com/bzqzsY8e |
| 7 | - | --m.setCursorPos(i,2) |
| 7 | + | |
| 8 | - | m.write("x")
|
| 8 | + | local arg = { ... }
|
| 9 | - | --end |
| 9 | + | local m = peripheral.wrap("monitor_0")
|
| 10 | ||
| 11 | if m == nil then | |
| 12 | return | |
| 13 | end | |
| 14 | ||
| 15 | local function CalcScreenTextPos(Str) | |
| 16 | return (10.5 - (math.floor(string.len(Str) / 2))) | |
| 17 | end | |
| 18 | ||
| 19 | if arg[1] == nil then | |
| 20 | arg[1] = "ERROR" | |
| 21 | end | |
| 22 | ||
| 23 | m.clear() | |
| 24 | local s1 = "I've currently" | |
| 25 | local s2 = "murdered" | |
| 26 | local s3 = "innocent" | |
| 27 | local s4 = "iron golems :'("
| |
| 28 | ||
| 29 | m.setTextScale(2) | |
| 30 | ||
| 31 | m.setCursorPos(CalcScreenTextPos(s1),1) | |
| 32 | m.write(s1) | |
| 33 | ||
| 34 | m.setCursorPos(CalcScreenTextPos(s2),2) | |
| 35 | m.write(s2) | |
| 36 | ||
| 37 | --m.setTextScale(3.5) | |
| 38 | m.setCursorPos(CalcScreenTextPos(arg[1]),4) | |
| 39 | m.write(arg[1]) | |
| 40 | ||
| 41 | m.setTextScale(2) | |
| 42 | ||
| 43 | m.setCursorPos(CalcScreenTextPos(s3),5) | |
| 44 | m.write(s3) | |
| 45 | ||
| 46 | m.setCursorPos(CalcScreenTextPos(s4),6) | |
| 47 | m.write(s4) |