Advertisement
Manacer

Miceboyard 0.1

Nov 10th, 2013
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.19 KB | None | 0 0
  1. version = 0.1
  2. cagnotte = {}
  3. tfm.exec.setUIMapName("<J><b><i>MiceBoyard</b></i>") -- Nom du script (map)
  4. chef = { "Manacer", "PSEUDO2", "PSEUDO3" }
  5. enjeu = {}
  6. ui.addPopup(1,0,"<p align='center'><font size='22'><b><font face='Time Sans MS'>Bienvenue dans<br><br>*------ <font color='#86ED89'>M</font><font color='#95957C'>i</font><font color='#F75F5F'>c</font><font color='#F75FF7'>e</font><font color='#B55FF7'>B</font><font color='#F7CF5F'>o</font><font color='#5FC0F7'>y</font><font color='#5FF7E8'>a</font><font color='#B0F75F'>r</font><font color='#5FF79C'>d</font> ------*</b><br><br></font><font size='12'>Faite !aide pour la liste des commandes.</font>",all,200,50,400)
  7. ui.addTextArea(0, "<font size='12' face='Levenim MT' color='#EA75BB' > <b>MiceBoyard</b> </font><b><font size='12' face='Levenim MT' color='#75EA8C' >"..version.."</font><font size='12' face='Levenim MT' color='#FEFEFE' ></b> By <b><font size='12' face='Levenim MT' color='#E7EA75' >Manacer</b><font size='12' face='Levenim MT' color='#FEFEFE' ></font>", all, 0, 380, 800, 20, 0)
  8. tfm.exec.newGame("@4488791")
  9. tfm.exec.disableAutoShaman(true)
  10. gameon = true
  11. ui.addTextArea(101,"<p align='center'><a href='event:jeu1'>Lancer le jeux numéro 1</a></p>",name,300,235,200,21,nil,0x3C5064,nil,true)
  12.  
  13. function Chef(name) -- Détection si le joueur est chef
  14.         for i,chef in ipairs(chef) do
  15.                 if name==chef then
  16.                         return true
  17.                 end
  18.         end
  19.         return false
  20. end
  21.  
  22. function eventTextAreaCallback(id,name,callback)
  23.   if callback=="jeu1" then
  24.   if Chef(name) then
  25.     tfm.exec.newGame("@4491262")
  26.     ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>Le chef va choisir le/la participant(e) de l'étape 1 !", all, 300, 140, 325)
  27.     ui.removeTextArea(101,all)
  28.     ui.removeTextArea(102,all)
  29.     ui.addPopup(7,2,"Rentrez le pseudo du participant !",name,400,200,200)
  30.    elseif name~="chef" then
  31.   end
  32.   end
  33.    if callback=="jeu2" then
  34.    if Chef(name) then
  35.     tfm.exec.newGame("@4491823")
  36.     ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>Le chef va choisir le/la participant(e) de l'étape 1 !", all, 200, 140, 325)
  37.     ui.removeTextArea(101,all)
  38.     ui.removeTextArea(102,all)
  39.     ui.removeTextArea(1010,all)
  40.     ui.addPopup(8,2,"Rentrez le pseudo du participant !",name,400,200,200)
  41.   end
  42.  elseif name~="chef" then
  43.   end
  44.    if callback=="closewin" then
  45.     ui.removeTextArea(101,name)
  46.     ui.removeTextArea(2,name)
  47.     ui.addPopup(4, 0, "", name, 300000000, 140, 325)
  48.   end
  49.   end
  50.  
  51. function eventPlayerGetCheese(playerName)
  52.  
  53. ui.addPopup(2,0,"<p align='center'><b><font size='14' face='Levenim MT' color='#75EA8C' >"..playerName.."</b> a ramassé la clef ! </font>",all,400,50,200)
  54. ui.addTextArea(2, "<font size='14'>Bravo à <b>"..playerName.."</b> qui à réussi à s'emparer de la clef avant la fin du temps ! ("..timer..")</font>", all, 380, 110,nil,nil,1234564444467495757)
  55. ui.addTextArea(101,"<p align='center'><a href='event:closewin'>Fermer les fenêtres</a></p>",all,300,335,300,21,nil,0x3C5064,nil,true)
  56. timer = 999
  57. ui.addTextArea(1010,"<p align='center'><a href='event:jeu2'><b>Lancer le jeux numéro 2</b></a></p>",name,300,235,200,21,nil,0x3C5064,nil,true)tfm.exec.newGame("@4488791")
  58. end
  59.  
  60. if gameon ==true then
  61. timer = 9999
  62. function eventLoop(currentTime, timeRemaining)
  63.   timer = timer + 0.5
  64.   if timer==31 then
  65.     ui.addTextArea(2, "<font size='20'>0</font>", all, 380, 110,nil,nil,1234564444444499999666565)
  66.     tfm.exec.newGame("0")
  67.     ui.addPopup(1574, 1, "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>", name, -1000, -1000, 1000000)
  68.     ui.addPopup(1575, 3, "<p align='center'><font color='#FA7C7C' size='15'><b>GAME OVER !!<br><br>Votre équipier à échoué vous avez perdu relancer le module pour une nouvelle partie.</b></font></p>", name, 300, 150, 200)  end
  69.   if timer==32 then
  70.   ui.removeTextArea(2,all)
  71.   end
  72.   if timer==1 then
  73.     ui.addTextArea(2, "<font size='20'><br> <b>30</b> ...</font>", all, 380, 210,nil,nil)
  74.   end
  75.   if timer==2.5 then
  76.     ui.addTextArea(2, "<font size='20'>29</font>", all, 380, 110,nil,nil)
  77.   end
  78.   if timer==3 then
  79.     ui.addTextArea(2, "<font size='20'>28</font>", all, 380, 110,nil,nil)
  80.   end
  81.   if timer==4 then
  82.     ui.addTextArea(2, "<font size='20'>27</font>", all, 380, 110,nil,nil)
  83.   end
  84.   if timer==5 then
  85.     ui.addTextArea(2, "<font size='20'>26</font>", all, 380, 110,nil,nil)
  86.     end
  87.   if timer==6 then
  88.     ui.addTextArea(2, "<font size='20'>25</font>", all, 380, 110,nil,nil)
  89.     end
  90.   if timer==7 then
  91.     ui.addTextArea(2, "<font size='20'>24</font>", all, 380, 110,nil,nil)
  92.     end
  93.   if timer==8 then
  94.     ui.addTextArea(2, "<font size='20'>23</font>", all, 380, 110,nil,nil)
  95.     end
  96.   if timer==9 then
  97.     ui.addTextArea(2, "<font size='20'>22</font>", all, 380, 110,nil,nil)
  98.     end
  99.   if timer==10 then
  100.     ui.addTextArea(2, "<font size='20'>21</font>", all, 380, 110,nil,nil)
  101.     end
  102.   if timer==11 then
  103.     ui.addTextArea(2, "<font size='20'>20</font>", all, 380, 110,nil,nil)
  104.     end
  105.   if timer==12 then
  106.     ui.addTextArea(2, "<font size='20'>19</font>", all, 380, 110,nil,nil)
  107.     end
  108.   if timer==13 then
  109.     ui.addTextArea(2, "<font size='20'>18</font>", all, 380, 110,nil,nil)
  110.     end
  111.   if timer==14 then
  112.     ui.addTextArea(2, "<font size='20'>17</font>", all, 380, 110,nil,nil)
  113.     end
  114.   if timer==15 then
  115.     ui.addTextArea(2, "<font size='20'>16</font>", all, 380, 110,nil,nil)
  116.     end
  117.   if timer==16 then
  118.     ui.addTextArea(2, "<font size='20'>15</font>", all, 380, 110,nil,nil)
  119.     end
  120.   if timer==17 then
  121.     ui.addTextArea(2, "<font size='20'>14</font>", all, 380, 110,nil,nil)
  122.     end
  123.   if timer==18 then
  124.     ui.addTextArea(2, "<font size='20'>13</font>", all, 380, 110,nil,nil)
  125.     end
  126.   if timer==19 then
  127.     ui.addTextArea(2, "<font size='20'>12</font>", all, 380, 110,nil,nil)
  128.     end
  129.   if timer==20 then
  130.     ui.addTextArea(2, "<font size='20'>11</font>", all, 380, 110,nil,nil)
  131.     end
  132.   if timer==21 then
  133.     ui.addTextArea(2, "<font size='20'>10</font>", all, 380, 110,nil,nil)
  134.     end
  135.   if timer==22 then
  136.     ui.addTextArea(2, "<font size='20'>9</font>", all, 380, 110,nil,nil)
  137.     end
  138.   if timer==23 then
  139.     ui.addTextArea(2, "<font size='20'>8</font>", all, 380, 110,nil,nil)
  140.     end
  141.   if timer==24 then
  142.     ui.addTextArea(2, "<font size='20'>7</font>", all, 380, 110,nil,nil)
  143.     end
  144.   if timer==25 then
  145.     ui.addTextArea(2, "<font size='20'>6</font>", all, 380, 110,nil,nil)
  146.     end
  147.   if timer==26 then
  148.     ui.addTextArea(2, "<font size='20'>5</font>", all, 380, 110,nil,nil)
  149.     end
  150.   if timer==27 then
  151.     ui.addTextArea(2, "<font size='20'>4</font>", all, 380, 110,nil,nil)
  152.     end
  153.   if timer==28 then
  154.     ui.addTextArea(2, "<font size='20'>3</font>", all, 380, 110,nil,nil,1234564444444455556)
  155.     end
  156.   if timer==29 then
  157.     ui.addTextArea(2, "<font size='20'>2</font>", all, 380, 110,nil,nil,1234564444444499999)
  158.     end
  159.   if timer==30 then
  160.     ui.addTextArea(2, "<font size='20'>1</font>", all, 380, 110,nil,nil,1234564444467495757)
  161.     end
  162.   if timer==999 then
  163.   ui.addTextArea(2, "", all, 380, 110,nil,nil,1234564444467495757)
  164. end
  165. end
  166.  
  167. function eventPopupAnswer(idpopup, playerName, answer)
  168.         if idpopup==7 then
  169.            tfm.exec.newGame(""..answer.."")
  170.                   ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [Chef <b>"..playerName.."</b>] a choisis "..answer.." comme participant(e) de l'étape 1 !", all, 300, 140, 325)
  171.                   table.insert(enjeu, answer)
  172.                   tfm.exec.movePlayer(""..answer.."", 110, 0)
  173.                   timer = 0
  174.                   ui.addTextArea(2, "<font size='20'>Vous avez <br> <b>30 secondes pour ramasser la clef (fromage) GO !</b> ...</font>", all, 380, 210,nil,nil)
  175.                       end
  176.         if idpopup==8 then
  177.            tfm.exec.newGame(""..answer.."")
  178.                   ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [Chef <b>"..playerName.."</b>] a choisis "..answer.." comme participant(e) de l'étape 1 !", all, 300, 140, 325)
  179.                   table.insert(enjeu, answer)
  180.                   tfm.exec.movePlayer(""..answer.."", 110, 0)
  181.                   timer = 0
  182.                   ui.addTextArea(2, "<font size='20'>Vous avez <br> <b>30 secondes pour ramasser la clef (fromage) GO !</b> ...</font>", all, 380, 210,nil,nil)
  183.                       end
  184. end
  185. end
  186.  
  187. function eventNewPlayer(playerName)
  188. ui.addTextArea(0, "<font size='12' face='Levenim MT' color='#EA75BB' > <b>MiceBoyard</b> </font><b><font size='12' face='Levenim MT' color='#75EA8C' >"..version.."</font><font size='12' face='Levenim MT' color='#FEFEFE' ></b> By <b><font size='12' face='Levenim MT' color='#E7EA75' >Manacer</b><font size='12' face='Levenim MT' color='#FEFEFE' ></font>", playerName, 0, 380, 800, 20, 0)
  189. ui.addPopup(1,0,"<p align='center'><font size='22'><b><font face='Time Sans MS'>Bienvenue dans<br><br>*------ <font color='#86ED89'>M</font><font color='#95957C'>i</font><font color='#F75F5F'>c</font><font color='#F75FF7'>e</font><font color='#B55FF7'>B</font><font color='#F7CF5F'>o</font><font color='#5FC0F7'>y</font><font color='#5FF7E8'>a</font><font color='#B0F75F'>r</font><font color='#5FF79C'>d</font> ------*</b><br><br></font><font size='12'>Faite !aide pour la liste des commandes.</font>",playerName,200,50,400)
  190. end
  191.  
  192.  
  193. function eventChatCommand(name,command) -- A partir de la il y'a les commandes
  194.   if command == "aide" then
  195.   ui.addPopup(1,0,"<p align='center'><font size='22'><b><font face='Time Sans MS'>*------ <font color='#86ED89'>M</font><font color='#95957C'>i</font><font color='#F75F5F'>c</font><font color='#F75FF7'>e</font><font color='#B55FF7'>B</font><font color='#F7CF5F'>o</font><font color='#5FC0F7'>y</font><font color='#5FF7E8'>a</font><font color='#B0F75F'>r</font><font color='#5FF79C'>d</font> ------*</b><br><br></font><font size='15'>Liste des commandes !</font><br><br><font size='12'>!argent : Savoir l'argent actuel de l'équipe<br>C'est tout pour le moment !",name,200,50,400)
  196. end
  197.   if command == "argent" then
  198.       ui.addPopup(2,0,"<p align='center'><font size='22'><b><font face='Time Sans MS'>Cagnotte de <b>l'équipe</b> <br><br>*------ <font color='#86ED89'>M</font><font color='#95957C'>i</font><font color='#F75F5F'>c</font><font color='#F75FF7'>e</font><font color='#B55FF7'>B</font><font color='#F7CF5F'>o</font><font color='#5FC0F7'>y</font><font color='#5FF7E8'>a</font><font color='#B0F75F'>r</font><font color='#5FF79C'>d</font> ------*</b><br><br></font><font size='15'><b>" .. table.concat(cagnotte) .. "</b> fraise(s)<br><br><br><br><font size='10'>Si rien ne s'affiche sa veut dire que vous avez 0 fraises.",name,200,50,400)
  199. end
  200.   if command == "give" then
  201.   table.insert(cagnotte, 1)
  202. end
  203.   if command == "start" then
  204.   gameon = false
  205.   end
  206.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement