SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local sign = peripheral.find "minecraft:sign" |
| 1 | + | |
| 2 | local modem = peripheral.find "modem" | |
| 3 | - | local label = os.getComputerLabel() |
| 3 | + | local channel = 49961 |
| 4 | - | local chest = peripheral.wrap "bottom" |
| 4 | + | local offset = vector.new(-3, -3, 2) |
| 5 | ||
| 6 | - | sign.setSignText "Rotating" |
| 6 | + | local function randbytes(len) |
| 7 | local out = "" | |
| 8 | - | local powered_rail_side = "right" |
| 8 | + | for i = 1, len do |
| 9 | out = out .. string.char(math.random(0, 255)) | |
| 10 | - | --[[ |
| 10 | + | |
| 11 | - | while true do |
| 11 | + | return out |
| 12 | - | local presence, meta = turtle.inspect() |
| 12 | + | |
| 13 | - | if presence and meta.name == "minecraft:activator_rail" then |
| 13 | + | |
| 14 | - | break |
| 14 | + | |
| 15 | while true do | |
| 16 | - | turtle.turnRight() |
| 16 | + | |
| 17 | local open = false | |
| 18 | - | ]] |
| 18 | + | |
| 19 | local position = vector.new(entity.x, entity.y, entity.z) + offset | |
| 20 | - | turtle.turnLeft() |
| 20 | + | if entity.displayName == "6_4" or entity.displayName == "gollark" and position:length() < 4 then |
| 21 | - | local presence, meta = turtle.inspect() |
| 21 | + | open = true |
| 22 | - | if presence and meta.name == "minecraft:golden_rail" then |
| 22 | + | |
| 23 | - | powered_rail_side = "left" |
| 23 | + | |
| 24 | math.randomseed(math.floor(os.clock() * 100)) | |
| 25 | - | turtle.turnRight() |
| 25 | + | local rc = math.random(0, 65535) |
| 26 | modem.transmit(channel, rc, open) | |
| 27 | - | local function sign_display(player) |
| 27 | + | print(open, rc) |
| 28 | - | local l2, l3 = "", "" |
| 28 | + | sleep(0.1) |
| 29 | - | if player then |
| 29 | + | |
| 30 | - | l2 = "Welcome, " |
| 30 | + | |
| 31 | - | l3 = player |
| 31 | + | |
| 32 | main() |