Manacer

BoyardMice 0.2

Nov 15th, 2013
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.37 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 = nil
  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.  
  12. function Chef(name) -- Détection si le joueur est chef
  13.         for i,chef in ipairs(chef) do
  14.                 if name==chef then
  15.                         return true
  16.                 end
  17.         end
  18.         return false
  19. end
  20.  
  21. function eventTextAreaCallback(id,name,callback)
  22.   if callback=="jeu1" then
  23.   if Chef(name) then
  24.     tfm.exec.newGame("@4491262")
  25.     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)
  26.     ui.removeTextArea(101,all)
  27.     ui.removeTextArea(102,all)
  28.     ui.removeTextArea(104,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=="quizz1" then
  34.   if Chef(name) then
  35.     ui.addTextArea(2, "<font size='15'>(Répondez en !REPONSE) Voici la question : [FACILE] Mûr à point, l’été il est fauché.</font>", all, 200, 46,nil,nil)
  36.     ui.addTextArea(3, "<font size='15'> Fauché, on l’est de n’en point avoir. <b>Qui suis-je ?</b></font>", all, 200, 86,nil,nil)
  37.     timer = 1
  38.     ui.removeTextArea(101,all)
  39.     ui.removeTextArea(102,all)
  40.     ui.removeTextArea(104,all)
  41.    elseif name~="chef" then
  42.   end
  43.   end
  44.   if callback=="quizz2" then
  45.   if Chef(name) then
  46.     ui.addTextArea(2, "<font size='15'></font>", all, 200, 46,nil,nil)
  47.     ui.removeTextArea(101,all)
  48.     ui.removeTextArea(102,all)
  49.     ui.removeTextArea(104,all)
  50.    elseif name~="chef" then
  51.   end
  52.   end
  53.    if callback=="jeu2" then
  54.    if Chef(name) then
  55.     tfm.exec.newGame("@4491823")
  56.     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)
  57.     ui.removeTextArea(101,all)
  58.     ui.removeTextArea(102,all)
  59.     ui.removeTextArea(104,all)
  60.     ui.removeTextArea(1010,all)
  61.     ui.addPopup(8,2,"Rentrez le pseudo du participant !",name,400,200,200)
  62.   end
  63.  elseif name~="chef" then
  64.   end
  65.    if callback=="jeu3" then
  66.    if Chef(name) then
  67.     tfm.exec.newGame("10")
  68.     ui.removeTextArea(101,all)
  69.     ui.removeTextArea(102,all)
  70.     ui.removeTextArea(104,all)
  71.     ui.removeTextArea(1010,all)
  72.     ui.addTextArea(2, "<font size='15'>Vous avez <br> 30 secondes pour répondre à la question de Bluffeur <a href='event:quizz1'> <b>[CLIQUER ICI POUR CONTINUER]</b> </a></font>", all, 200, 46,nil,nil)
  73.     tfm.exec.movePlayer(name, 0, 100)
  74.   end
  75.  elseif name~="chef" then
  76.   end
  77.    if callback=="closewin" then
  78.     ui.removeTextArea(101,name)
  79.     ui.removeTextArea(2,name)
  80.     ui.addPopup(4, 0, "", name, 300000000, 140, 325)
  81.   end
  82.   end
  83.  
  84. function eventPlayerGetCheese(playerName)
  85.  
  86. 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)
  87. 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)
  88. 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)
  89. timer = 999
  90. end
  91.  
  92. if gameon ==true then
  93. timer = 9999
  94. function eventLoop(currentTime, timeRemaining)
  95.   timer = timer + 0.5
  96.   if timer==31 then
  97.     ui.addTextArea(2, "<font size='20'>0</font>", all, 380, 110,nil,nil,1234564444444499999666565)
  98.     tfm.exec.newGame("0")
  99.     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)
  100.     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
  101.   if timer==32 then
  102.   ui.removeTextArea(2,all)
  103.   end
  104.   if timer==1 then
  105.     ui.addTextArea(5, "<font size='20'><br> <b>30</b> ...</font>", all, 380, 210,nil,nil)
  106.   end
  107.   if timer==2.5 then
  108.     ui.addTextArea(5, "<font size='20'>29</font>", all, 380, 110,nil,nil)
  109.   end
  110.   if timer==3 then
  111.     ui.addTextArea(5, "<font size='20'>28</font>", all, 380, 110,nil,nil)
  112.   end
  113.   if timer==4 then
  114.     ui.addTextArea(5, "<font size='20'>27</font>", all, 380, 110,nil,nil)
  115.   end
  116.   if timer==5 then
  117.     ui.addTextArea(5, "<font size='20'>26</font>", all, 380, 110,nil,nil)
  118.     end
  119.   if timer==6 then
  120.     ui.addTextArea(5, "<font size='20'>25</font>", all, 380, 110,nil,nil)
  121.     end
  122.   if timer==7 then
  123.     ui.addTextArea(5, "<font size='20'>24</font>", all, 380, 110,nil,nil)
  124.     end
  125.   if timer==8 then
  126.     ui.addTextArea(5, "<font size='20'>23</font>", all, 380, 110,nil,nil)
  127.     end
  128.   if timer==9 then
  129.     ui.addTextArea(5, "<font size='20'>22</font>", all, 380, 110,nil,nil)
  130.     end
  131.   if timer==10 then
  132.     ui.addTextArea(5, "<font size='20'>21</font>", all, 380, 110,nil,nil)
  133.     end
  134.   if timer==11 then
  135.     ui.addTextArea(5, "<font size='20'>20</font>", all, 380, 110,nil,nil)
  136.     end
  137.   if timer==12 then
  138.     ui.addTextArea(5, "<font size='20'>19</font>", all, 380, 110,nil,nil)
  139.     end
  140.   if timer==13 then
  141.     ui.addTextArea(5, "<font size='20'>18</font>", all, 380, 110,nil,nil)
  142.     end
  143.   if timer==14 then
  144.     ui.addTextArea(5, "<font size='20'>17</font>", all, 380, 110,nil,nil)
  145.     end
  146.   if timer==15 then
  147.     ui.addTextArea(5, "<font size='20'>16</font>", all, 380, 110,nil,nil)
  148.     end
  149.   if timer==16 then
  150.     ui.addTextArea(5, "<font size='20'>15</font>", all, 380, 110,nil,nil)
  151.     end
  152.   if timer==17 then
  153.     ui.addTextArea(5, "<font size='20'>14</font>", all, 380, 110,nil,nil)
  154.     end
  155.   if timer==18 then
  156.     ui.addTextArea(5, "<font size='20'>13</font>", all, 380, 110,nil,nil)
  157.     end
  158.   if timer==19 then
  159.     ui.addTextArea(5, "<font size='20'>12</font>", all, 380, 110,nil,nil)
  160.     end
  161.   if timer==20 then
  162.     ui.addTextArea(5, "<font size='20'>11</font>", all, 380, 110,nil,nil)
  163.     end
  164.   if timer==21 then
  165.     ui.addTextArea(5, "<font size='20'>10</font>", all, 380, 110,nil,nil)
  166.     end
  167.   if timer==22 then
  168.     ui.addTextArea(5, "<font size='20'>9</font>", all, 380, 110,nil,nil)
  169.     end
  170.   if timer==23 then
  171.     ui.addTextArea(5, "<font size='20'>8</font>", all, 380, 110,nil,nil)
  172.     end
  173.   if timer==24 then
  174.     ui.addTextArea(5, "<font size='20'>7</font>", all, 380, 110,nil,nil)
  175.     end
  176.   if timer==25 then
  177.     ui.addTextArea(5, "<font size='20'>6</font>", all, 380, 110,nil,nil)
  178.     end
  179.   if timer==26 then
  180.     ui.addTextArea(5, "<font size='20'>5</font>", all, 380, 110,nil,nil)
  181.     end
  182.   if timer==27 then
  183.     ui.addTextArea(5, "<font size='20'>4</font>", all, 380, 110,nil,nil)
  184.     end
  185.   if timer==28 then
  186.     ui.addTextArea(5, "<font size='20'>3</font>", all, 380, 110,nil,nil,1234564444444455556)
  187.     end
  188.   if timer==29 then
  189.     ui.addTextArea(5, "<font size='20'>2</font>", all, 380, 110,nil,nil,1234564444444499999)
  190.     end
  191.   if timer==30 then
  192.     ui.addTextArea(5, "<font size='20'>1</font>", all, 380, 110,nil,nil,1234564444467495757)
  193.     end
  194.   if timer==999 then
  195.   ui.addTextArea(5, "", all, 380, 110,nil,nil,1234564444467495757)
  196. end
  197. end
  198.  
  199. function eventPopupAnswer(idpopup, playerName, answer)
  200.         if idpopup==7 then
  201.            tfm.exec.newGame(""..answer.."")
  202.                   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)
  203.                   table.insert(enjeu, answer)
  204.                   tfm.exec.movePlayer(""..answer.."", 110, 0)
  205.                   timer = 0
  206.                   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)
  207.                       end
  208.         if idpopup==8 then
  209.            tfm.exec.newGame(""..answer.."")
  210.                   ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [Chef <b>"..playerName.."</b>] a choisis "..answer.." comme participant(e) de l'étape 2 !", all, 300, 140, 325)
  211.                   table.insert(enjeu, answer)
  212.                   tfm.exec.movePlayer(""..answer.."", 110, 0)
  213.                   timer = 0
  214.                   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)
  215.                       end
  216.         if idpopup==9 then
  217.            tfm.exec.newGame(""..answer.."")
  218.                   ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [Chef <b>"..playerName.."</b>] a choisis "..answer.." comme participant(e) de l'étape 3 !", all, 300, 140, 325)
  219.                   table.insert(enjeu, answer)
  220.                   tfm.exec.movePlayer(""..answer.."", 0, 100)
  221.                   ui.addTextArea(2, "<font size='15'>Vous avez <br> 30 secondes pour répondre à la question de Bluffeur <a href='event:quizz1'> <b>[CLIQUER ICI POUR CONTINUER]</b> </a></font>", all, 200, 46,nil,nil)
  222.                       end
  223. end
  224. end
  225.  
  226. function eventNewPlayer(playerName)
  227. 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)
  228. 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)
  229. end
  230.  
  231.  
  232. function eventChatCommand(name,command) -- A partir de la il y'a les commandes
  233.   if command == "aide" then
  234.   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>!jeu : Voir la liste des jeux <br>C'est tout pour le moment !",name,200,50,400)
  235. end
  236.   if command == "argent" then
  237.       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)
  238. end
  239.   if command == "give" then
  240.   table.insert(cagnotte, 1)
  241. end
  242.   if command == "blé" then
  243.   timer = 999
  244.     ui.addTextArea(2, "<font size='15'> Bravo à "..name.." qui réussi l'énigme ! (Pour continuer !jeu)</font>", all, 200, 46,nil,nil)
  245.     ui.addTextArea(3, ".", all, 2044444444444440, 86444444444,nil,nil)
  246. end
  247.   if command == "jeu" then
  248.   ui.addTextArea(101,"<p align='center'><a href='event:jeu1'>Lancer le jeux numéro 1</a></p>",name,300,35,200,21,nil,0x3C5064,nil,true)
  249.   ui.addTextArea(102,"<p align='center'><a href='event:jeu2'>Lancer le jeux numéro 2</a></p>",name,300,75,200,21,nil,0x3C5064,nil,true)
  250.   ui.addTextArea(104,"<p align='center'><a href='event:jeu3'>Lancer le jeux numéro 3</a></p>",name,300,115,200,21,nil,0x3C5064,nil,true)
  251.   end
  252.   end
Advertisement
Add Comment
Please, Sign In to add comment