Advertisement
quenti77

prank

Mar 3rd, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. -- Config fields
  2. local mon = peripheral.wrap("top")
  3. local sx, sy = mon.getSize()
  4. local compteur = 0
  5. local question = {}
  6.  
  7. -- q = question
  8. -- r1 à r4 = réponse 1 à 4
  9. -- c = bonne réponse
  10. -- id = compteur ID
  11. local function addQuestion(q, r1, r2, r3, r4, c, id)
  12.     question[id] = {}
  13.     question[id]["question"] = q
  14.     question[id]["rep1"] = r1
  15.     question[id]["rep2"] = r2
  16.     question[id]["rep3"] = r3
  17.     question[id]["rep4"] = r4
  18.     question[id]["select"] = c
  19. end
  20.  
  21. local function readQuestion(id)
  22.    
  23.     mon.setBackgroundColor(colors.red)
  24.     mon.setTextColor(colors.white)
  25.     for i = 1, 7 do
  26.         mon.setCursorPos(1, i)
  27.         mon.clearLine()
  28.     end
  29.    
  30.    
  31. end
  32.  
  33. -- Launch
  34. rednet.open("back")
  35.  
  36. mon.setBackgroundColor(colors.black)
  37. mon.setTextColor(colors.white)
  38. mon.clear()
  39. mon.setCursorPos(1, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement