Brenower

Bolhas

Jul 20th, 2014
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.15 KB | None | 0 0
  1. time=-3;
  2.  
  3. tfm.exec.disableAutoNewGame(true)
  4. tfm.exec.disableAutoShaman(true)
  5. tfm.exec.disableAutoTimeLeft(true)
  6. tfm.exec.newGame('<C><P Ca="" /><Z><S><S lua="1" L="80" o="324650" H="40" X="200" Y="210" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S lua="2" P="0,0,0.3,0.2,0,0,0,0" L="80" o="324650" X="400" Y="210" T="12" H="40" /><S lua="3" L="80" o="324650" X="600" H="40" Y="210" T="12" P="0,0,0.3,0.2,0,0,0,0" /></S><D><DS Y="169" X="404" /></D><O /></Z></C>')
  7. ui.addTextArea(0,"<p align='center'><J><font size='20'>Prepare-se</font></p>",nil,0,25,800,nil,1,1,0.7,true)
  8.  
  9. function eventNewGame()
  10.         time=-3;
  11.         ui.addTextArea(0,"<p align='center'><J><font size='20'>Prepare-se</font></p>",nil,0,25,800,nil,1,1,0.7,true)
  12. end
  13.  
  14. function eventLoop()
  15.         time=time+0.5;
  16.         if time == 1 then
  17.             ui.addTextArea(0,"<p align='center'><J><font size='20'>3</font></p>",nil,0,25,800,nil,1,1,0.7,true)
  18.         elseif time == 2 then
  19.             ui.addTextArea(0,"<p align='center'><J><font size='20'>2</font></p>",nil,0,25,800,nil,1,1,0.7,true)
  20.         elseif time == 3 then
  21.             ui.addTextArea(0,"<p align='center'><J><font size='20'>1</font></p>",nil,0,25,800,nil,1,1,0.7,true)
  22.         elseif time == 4 then
  23.             ui.addTextArea(0,"<p align='center'><J><font size='20'>Começou!</font></p>",nil,0,25,800,nil,1,1,0.7,true)
  24.             tfm.exec.addShamanObject(59,200,400)
  25.             tfm.exec.addShamanObject(59,400,400)
  26.             tfm.exec.addShamanObject(59,600,600)
  27.             tfm.exec.removePhysicObject(1)
  28.             tfm.exec.removePhysicObject(2)
  29.             tfm.exec.removePhysicObject(3)
  30.         end
  31. end
  32.  
  33. function eventPlayerDied(p)
  34.         tfm.exec.addShamanObject(59,tfm.get.room.playerList[p].x, 400)
  35.         local i = 0;
  36.         local p = nil;
  37.         for i,v in pairs(tfm.get.room.playerList) do
  38.             if not v.isDead then
  39.             i=i+1;
  40.             p=i;
  41.             end
  42.         end
  43.         if i <= 1 then
  44.             tfm.exec.giveCheese(p)
  45.             tfm.exec.playerVictory(p)
  46.             tfm.exec.newGame('<C><P Ca="" /><Z><S><S lua="1" L="80" o="324650" H="40" X="200" Y="210" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S lua="2" P="0,0,0.3,0.2,0,0,0,0" L="80" o="324650" X="400" Y="210" T="12" H="40" /><S lua="3" L="80" o="324650" X="600" H="40" Y="210" T="12" P="0,0,0.3,0.2,0,0,0,0" /></S><D><DS Y="169" X="404" /></D><O /></Z></C>')
  47.         end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment