Advertisement
Eshkation-

Untitled

Nov 12th, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.18 KB | None | 0 0
  1. local letreiro = {
  2.     {1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0},
  3.     {1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0},
  4.     {1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0},
  5.     {1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0},
  6.     {1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0},
  7.     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  8.     {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
  9. }
  10.  
  11. local t = os.time()
  12. local ox = 40
  13. local oy = 200
  14.    
  15. function eventLoop()
  16.     local px = 0
  17.     local py = 0
  18.     local id = 5
  19.     if t < os.time()-1500 then
  20.         t = os.time()
  21.         id = 31
  22.         px = -3
  23.         py = -3
  24.     end
  25.     for i, d in pairs(letreiro) do
  26.         for j, k in pairs(d) do
  27.             if k and k == 1 then
  28.                 local x = (j * 20) + ox
  29.                 local y = (i * 20) + oy
  30.                 tfm.exec.displayParticle(id, x+px, y+py, 0, 0, 0, 0)
  31.             end
  32.         end
  33.     end
  34. end
  35.  
  36. eventLoop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement