MavricMC

MirrorClient

Mar 6th, 2023 (edited)
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.81 KB | None | 0 0
  1. --Blackjack Mirror version 0.1--
  2.  
  3. os.pullEvent = os.pullEventRaw
  4.  
  5. --Made by Mavric--
  6. --Code on https://pastebin.com/u/MavricMC--
  7.  
  8. local modem = peripheral.wrap("back")
  9. local mainC = 5
  10. local playerC = 10
  11.  
  12.  
  13. modem.open(playerC)
  14. while true do
  15.     local eventData = {os.pullEvent()}
  16.     if eventData[1] == "modem_message" then
  17.         if eventData[5][1] == "clear" then
  18.             term.clear()
  19.         elseif eventData[5][1] == "line" then
  20.             term.clearLine(eventData[5][2])
  21.         elseif eventData[5][1] == "background" then
  22.             term.setBackgroundColor(eventData[5][2])
  23.         elseif eventData[5][1] == "cursor" then
  24.             term.setCursorPos(eventData[5][2], eventData[5][3])
  25.         elseif eventData[5][1] == "text" then
  26.             term.setTextColor(eventData[5][2])
  27.         elseif eventData[5][1] == "write" then
  28.             term.write(eventData[5][2])
  29.         elseif eventData[5][1] == "pic" then
  30.             if eventData[5][2] == "logo" then
  31.                 local pic = paintutils.loadImage("logo.nfp")
  32.                 paintutils.drawImage(pic, eventData[5][3], eventData[5][4])
  33.             elseif eventData[5][2] == "card" then
  34.                 local pic = paintutils.loadImage("card.nfp")
  35.                 paintutils.drawImage(pic, eventData[5][3], eventData[5][4])
  36.             elseif eventData[5][2] == "back" then
  37.                 local pic = paintutils.loadImage("cardBack.nfp")
  38.                 paintutils.drawImage(pic, eventData[5][3], eventData[5][4])
  39.             end
  40.         end
  41.     elseif eventData[1] == "terminate" then
  42.         if (redstone.getInput("bottom")) then
  43.             error("You found the lever didnt you")
  44.         else
  45.             print("Did you think Im that stupid?")
  46.         end
  47.     else
  48.         modem.transmit(mainC, playerC, eventData)
  49.     end
  50. end
  51.  
Add Comment
Please, Sign In to add comment