Brenower

No ritmo [v1.1]

May 26th, 2014
703
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.53 KB | None | 0 0
  1. pisos={
  2.     pcor={ 
  3.         ["type"]=12;
  4.         ["width"]=100;
  5.         ["color"]=324650;
  6.     };
  7.     gelo={
  8.         ["type"]=1;
  9.         ["width"]=100;
  10.         ["friction"]=0;
  11.     };
  12.     lava={
  13.         ["type"]=3;
  14.         ["restitution"]=20;
  15.         ["friction"]=0;
  16.         ["width"]=100;
  17.     };
  18.     choco={
  19.         ["friction"]=20;
  20.         ["width"]=100;
  21.         ["type"]=4;
  22.     };
  23.     nuvem={
  24.         ["type"]=8;
  25.         ["miceCollision"]=false;
  26.         ["width"]=100;
  27.     };
  28.     tramp={
  29.         ["restitution"]=1.2;
  30.         ["width"]=100;
  31.         ["type"]=2;
  32.     };
  33.     agua={
  34.         ["type"]=7;
  35.         ["width"]=100;
  36.     };
  37. };
  38. pre=0;
  39. tp={"gelo","agua","tramp","nuvem","choco","pcor","lava"};
  40.  
  41. tfm.exec.disableAutoNewGame(true)
  42. tfm.exec.disableAutoShaman(true)
  43. tfm.exec.newGame('<C><P D="x_nekodancer/x_mondes/x_'..math.random(1,12)..'.jpg" Ca="" /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="100" o="324650" X="200" H="10" Y="300" T="12" lua="12" /><S lua="13" L="100" o="324650" P="0,0,0.3,0.2,0,0,0,0" X="600" Y="300" T="12" H="10" /><S lua="14" L="100" o="324650" P="0,0,0.3,0.2,0,0,0,0" X="400" Y="300" T="12" H="10" /></S><D></D><O /></Z></C>');
  44. ui.addTextArea(0,"<J><p align='center'><font size='28'>Prepare-se!</p>",nil,0,360,800,35,0,1,0.8,true)
  45. function eventLoop()
  46.     pre=pre+0.5;
  47.     if pre == 3 then
  48.         ui.updateTextArea(0,"<J><p align='center'><font size='28'>3",nil)
  49.     elseif pre == 4 then
  50.         ui.updateTextArea(0,"<VP><p align='center'><font size='28'>2",nil)
  51.     elseif pre == 5 then
  52.         ui.updateTextArea(0,"<VP><p align='center'><font size='28'>1",nil)
  53.     elseif pre == 6 then
  54.         pre=0;
  55.         ui.updateTextArea(0,"<VP><p align='center'><font size='28'>Começou!",nil)
  56.         tfm.exec.removePhysicObject(12)
  57.         tfm.exec.removePhysicObject(13)
  58.         tfm.exec.removePhysicObject(14)
  59.         tfm.exec.addPhysicObject(12,200,300,pisos[tp[math.random(#tp)]])
  60.         tfm.exec.addPhysicObject(13,600,300,pisos[tp[math.random(#tp)]])
  61.         tfm.exec.addPhysicObject(14,400,300,pisos[tp[math.random(#tp)]])
  62.     end
  63.     local i = 0;
  64.     local pl = nil;
  65.     for p,v in pairs(tfm.get.room.playerList) do
  66.         if not v.isDead then
  67.             i=i+1;
  68.             pl = p;
  69.         end
  70.     end
  71.     if i == 1 or i == 0 then
  72.         tfm.exec.giveCheese(pl)
  73.         tfm.exec.playerVictory(pl)
  74.         for v in pairs(tfm.get.room.playerList) do
  75.             tfm.exec.respawnPlayer(v)
  76.             i=111;
  77.         end
  78.         tfm.exec.addPhysicObject(12,200,300,pisos['choco'])
  79.         tfm.exec.addPhysicObject(13,600,300,pisos['choco'])
  80.         tfm.exec.addPhysicObject(14,400,300,pisos['choco'])
  81.         pre=-3;
  82.         ui.updateTextArea(0,"<J><p align='center'><font size='28'>Prepare-se",nil);
  83.     end
  84. end
  85.  
  86. function eventNewPlayer(p)
  87.     ui.addTextArea(0,"<J><p align='center'><font size='28'>Prepare-se!</p>",p,0,360,800,35,0,1,0.8,true)
  88.    
  89. end
Advertisement
Add Comment
Please, Sign In to add comment