Advertisement
william200027

Ecran Jump Participent

Oct 15th, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.71 KB | None | 0 0
  1. ---Variable---
  2. Id = 15
  3. X = 1
  4. Y = 2
  5. Color1 = colors.red
  6. Color2 = colors.orange
  7. Color3 = colors.magenta
  8. Color4 = colors.yellow
  9. Color5 = colors.pink
  10. Color6 = colors.cyan
  11. Color7 = colors.purple
  12. Color8 = colors.green
  13. Color9 = colors.brown
  14. Color10 = colors.blue
  15. Color11 = colors.gray
  16. Color12 = colors.lightGray
  17. Color13 = colors.lightBlue
  18. Color14 = colors.lime
  19. Color = Color1
  20. VariableExtra = {Player1, Player2, Player3, Player4, Player5, Player6, Player7, Player8, Player9, Player10 }
  21. Variable999 = 1
  22. Variable888 = 1
  23. --------------
  24.  
  25. ---Peripherique---
  26. m = peripheral.wrap("back")
  27. rednet.open("left")
  28. chat = peripheral.wrap("right")
  29. ------------------
  30.  
  31. ---Programme---
  32.  
  33. local function r(...) return shell.run(...) end
  34. local function w(...) return write(...) end
  35.  
  36. m.setBackgroundColor(colors.black)
  37. m.clear()
  38. m.setTextScale(2)
  39.  
  40. function base()
  41. m.setCursorPos(1,1)
  42. m.setTextColor(colors.green)
  43. m.write("Liste des Participent:")
  44. end
  45. base()
  46.  
  47. function affi1()
  48. m.setTextColor(Color)
  49. m.setCursorPos(X,Y)
  50. m.write(message)
  51. Y = Y + 1
  52.  if(Y == 13)then
  53.   X = X + 10
  54.   Y = 2
  55.  end
  56.  if(Color == Color14)then
  57.    Color = "Color1"
  58.  end
  59.   if(Color == Color13)then
  60.    Color = Color14
  61.  end
  62.   if(Color == Color12)then
  63.    Color = Color13
  64.  end
  65.   if(Color == Color11)then
  66.    Color = Color12
  67.  end
  68.   if(Color == Color10)then
  69.    Color = Color11
  70.  end
  71.   if(Color == Color9)then
  72.    Color = Color10
  73.  end
  74.   if(Color == Color8)then
  75.    Color = Color9
  76.  end
  77.   if(Color == Color7)then
  78.    Color = Color8
  79.  end
  80.   if(Color == Color6)then
  81.    Color = Color7
  82.  end
  83.   if(Color == Color5)then
  84.    Color = Color6
  85.  end
  86.   if(Color == Color4)then
  87.    Color = Color5
  88.  end
  89.   if(Color == Color3)then
  90.    Color = Color4
  91.  end
  92.   if(Color == Color2)then
  93.    Color = Color3
  94.  end
  95.   if(Color == Color1)then
  96.    Color = Color2
  97.  end
  98.   if(Color == "Color1")then
  99.    Color = Color1
  100.  end
  101. end
  102.  
  103. function Stockage()
  104. if(VariableExtra[1] == message or VariableExtra[2] == message or VariableExtra[3] == message or VariableExtra[4] == message or VariableExtra[5] == message or VariableExtra[6] == message or VariableExtra[7] == message or VariableExtra[8] == message or VariableExtra[9] == message or VariableExtra[10] == message)then
  105.  print("Non")
  106. else
  107.  affi1()
  108.  VariableExtra[Variable999] = message
  109.  Variable999 = Variable999 + 1
  110.  chat.say(message.." c'est inscrit")
  111. end
  112. end
  113.  
  114. function ChatBox()
  115. chat.say("Ses au tour de "..VariableExtra[Variable888])
  116. Variable888 = Variable888 + 1
  117.  if(Variable == 10)then
  118.   Variable = 1
  119.  end
  120. end
  121.  
  122. while true do
  123.  
  124. if(redstone.getInput("top") == true)then
  125.  ChatBox()
  126. end
  127. id, message = rednet.receive()
  128. Stockage()
  129. sleep(0.1)
  130. end
  131. ---------------
  132.  
  133. ----=Autor=----
  134. --By Zaidal86
  135. ----=-----=----
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement