Guest User

Print

a guest
Sep 14th, 2012
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. local args={ ... }
  2. i=1
  3. input={}
  4. while args[i]~=nil do
  5. input[i]=tonumber(args[i])
  6. i=i+1
  7. end
  8.  
  9. function Place(key)
  10. if key=="q" then color=1
  11. else if key=="w" then color=2
  12. else if key=="e" then color=3
  13. else if key=="r" then color=4
  14. else if key=="t" then color=5
  15. else if key=="y" then color=6
  16. else if key=="u" then color=7
  17. else if key=="i" then color=8
  18. else if key=="a" then color=9
  19. else if key=="s" then color=10
  20. else if key=="d" then color=11
  21. else if key=="f" then color=12
  22. else if key=="g" then color=13
  23. else if key=="h" then color=14
  24. else if key=="j" then color=15
  25. else if key=="k" then color=16
  26. else print("ERROR!") end end end end end end end end end end end end end end end end
  27. color=2^(color-1)
  28. rs.setBundledOutput("bottom",color)
  29. sleep(.05)
  30. rs.setBundledOutput("bottom",0)
  31. sleep(.05)
  32. end
  33.  
  34. function Up()
  35. rs.setBundledOutput("back", 1)
  36. sleep(.4)
  37. rs.setBundledOutput("back", 0)
  38. sleep(.4)
  39. end
  40.  
  41. function Down()
  42. rs.setBundledOutput("back", 2)
  43. sleep(.4)
  44. rs.setBundledOutput("back", 0)
  45. sleep(.4)
  46. end
  47.  
  48. function Right()
  49. rs.setBundledOutput("back", 4)
  50. sleep(.4)
  51. rs.setBundledOutput("back", 0)
  52. sleep(.4)
  53. end
  54.  
  55. function Left()
  56. rs.setBundledOutput("back", 8)
  57. sleep(.4)
  58. rs.setBundledOutput("back", 0)
  59. sleep(.4)
  60. end
  61.  
  62. testinput={}
  63. testinput[1]={"q","w","e","r","t","y","u","i"}
  64. testinput[2]={"a","s","d","f","g","h","j","k"}
  65. testinput[3]={"q","w","e","r","t","y","u","i"}
  66. testinput[4]={"a","s","d","f","g","h","j","k"}
  67. testinput[5]={"q","w","e","r","t","y","u","i"}
  68. testinput[6]={"a","s","d","f","g","h","j","k"}
  69. testinput[7]={"q","w","e","r","t","y","u","i"}
  70. testinput[8]={"a","s","d","f","g","h","j","k"}
  71.  
  72.  
  73. for i=1,8 do
  74. Up()
  75. end
  76. Right()
  77. Right()
  78. line=0
  79. for i=1,4 do
  80. line=line+1
  81. if line~=1 then
  82. Down()
  83. Right()
  84. end
  85. for i=1,8 do
  86. Place(testinput[line][i])
  87. Right()
  88. end
  89. Down()
  90. counter=8
  91. line=line+1
  92. for i=1,8 do
  93. Place(testinput[line][counter])
  94. counter=counter-1
  95. Left()
  96. end
  97. end
  98. Left()
  99. Down()
Advertisement
Add Comment
Please, Sign In to add comment