Advertisement
Woterek

Fireworks

Dec 9th, 2013
4,213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.21 KB | None | 0 0
  1. a,b = 0,0
  2. part = 0
  3. kon,rod = 0,0
  4. A,B="R","R"
  5.  
  6. Party={29,24,23,22,21,14,13,11,9,4,2,1,0}
  7. r={1,1,1,1,1,1}
  8. Kon2={0,4,1,9,11,13}
  9.  
  10. DPart={
  11.  A={1,0,-1,0,0,1,0},
  12.  B={0,0,-0.3,0.2,0,0,0}
  13. }
  14.  
  15. for v,dis in pairs({"utoNewGame","utoShaman","utoTimeLeft","fkDeath"}) do
  16.  tfm.exec["disableA"..dis](true)
  17. end
  18.  
  19. tfm.exec.newGame('<C><P F="3" /><Z><S><S L="162" X="513" H="45" Y="366" T="11" P="0,0,0.05,0.1,-20,0,0,0" /><S L="801" X="400" H="42" Y="379" T="11" P="0,0,0.05,0.1,0,0,0,0" /><S L="202" X="649" H="150" Y="353" T="11" P="0,0,0.05,0.1,-40,0,0,0" /><S L="155" X="769" H="200" Y="317" T="11" P="0,0,0.05,0.1,-10,0,0,0" /></S><D><P X="656" Y="27" T="64" P="0,0" /><T Y="359" X="70" /></D><O /></Z></C>')
  20. tfm.exec.setUIMapName('<textformat tabstops="[500]"><R>HAPPY NEW YEAR!\tBy Woterek</R>')
  21.  
  22. function eventPlayerDied(name)
  23.  tfm.exec.respawnPlayer(name)
  24. end
  25.  
  26. function eventNewPlayer(name)
  27.  tfm.exec.respawnPlayer(name)
  28.  system.bindMouse(name, true)
  29.  ui.addTextArea(1, '<a href="event:next"><font size="25">•<font></a> <'..A..'><a href="event:kon"><font size="25">•<font></a> <'..B..'><a href="event:rod"><font size="25">♥<font></a>', name, 730, 340, nil, nil, 0, 0, 1)
  30. end
  31.  
  32. function eventTextAreaCallback(id, name, cb)
  33.  if cb == 'kon' then
  34.   kon=(kon+1)%3
  35.   if kon == 0 then
  36.    A="R"
  37.   elseif kon == 1 then
  38.    A="J"
  39.   elseif kon == 2 then
  40.    A="VP"
  41.    part = 0
  42.   end
  43.  elseif cb == 'rod' then
  44.   rod=(rod+1)%4
  45.   if rod == 0 then
  46.    B="R"
  47.   elseif rod == 1 then
  48.    B="J"
  49.   elseif rod == 2 then
  50.    B="VP"
  51.   elseif rod == 3 then
  52.    B="CH"
  53.   end
  54.  elseif cb == 'next' then
  55.   if part==29 then
  56.    part=0
  57.    b = 1
  58.   end
  59.   for i,arg in pairs(Party) do
  60.    if part==arg then
  61.     part=Party[i-1]
  62.    end
  63.   end
  64.   if part==0 and b==0 then
  65.    part = 1
  66.   end
  67.  end
  68.  ui.addTextArea(1, '<a href="event:next"><font size="25">•<font></a> <'..A..'><a href="event:kon"><font size="25">•<font></a> <'..B..'><a href="event:rod"><font size="25">♥<font></a>', name, 730, 340, nil, nil, 0, 0, 1)
  69. end
  70.  
  71. for name in pairs(tfm.get.room.playerList) do
  72.  eventNewPlayer(name)
  73. end
  74.  
  75. function eventMouse(name, x, y)
  76.  if a == 0 then
  77.   time = os.time()
  78.   for i=1,7 do
  79.    tfm.exec.displayParticle(13, x+DPart.A[i], 550, 0, -4+DPart.B[i], 0, -0.7, nil)
  80.   end
  81.   mx,my,a = x,100,1
  82.  end
  83. end
  84.  
  85. function eventLoop()
  86.  if a == 1 then
  87.   for i=1,6 do
  88.    if time < os.time() - i*500 and r[i] == 1 then
  89.     r[i] = 0
  90.     if kon == 1 then
  91.      part = 24-math.abs(i-4)
  92.     elseif kon == 2 then
  93.      part = Kon2[i]
  94.     end
  95.     for t=0,2*math.pi,0.1 do
  96.      if rod == 0 then
  97.       x=i*10*math.sin(t) + mx
  98.       y=i*10*math.cos(t)
  99.      elseif rod == 1 then
  100.       x=i*(16*math.sin(t)^3) + mx
  101.       y=i*(13*math.cos(t)-5*math.cos(2*t)-2*math.cos(3*t)-math.cos(4*t))
  102.      elseif rod == 2 then
  103.       x=i*20*(math.sin(t)^5)+mx
  104.       y=i*20*(math.cos(t)^5)
  105.      elseif rod == 3 then
  106.       x=i*5*((math.sin(t)^5)+(math.sin(5*t)^5)+math.asin(math.sin(t)))+mx
  107.       y=i*5*((math.cos(t)^5)+(math.cos(5*t)^5)+math.asin(math.cos(t)))
  108.      end
  109.      y=-y + my
  110.      tfm.exec.displayParticle(part, x, y, 0, 0, 0, 0, nil)
  111.     end
  112.    end
  113.   end
  114.   if time < os.time() - 3000 then
  115.    a = 0
  116.    r={1,1,1,1,1,1}
  117.   end
  118.  end
  119.  if b == 1 then
  120.   b = 0
  121.  end
  122. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement