Advertisement
Manacer

MiceBoyard 0.1 - BETA 2

Nov 9th, 2013
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.76 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"
  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.." BETA - 2</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 eventTextAreaCallback(id,name,callback)
  14.   if callback=="jeu1" then
  15.     tfm.exec.newGame("@4491262")
  16.     ui.removeTextArea(101,all)
  17.     ui.removeTextArea(102,all)
  18.     ui.addPopup(7,2,"Rentrez le pseudo du participant !",chef,400,200,200)
  19.   end
  20.    if callback=="jeu2" then
  21.     tfm.exec.newGame("@4491823")
  22.     ui.removeTextArea(101,all)
  23.     ui.removeTextArea(102,all)
  24.     ui.removeTextArea(1010,all)
  25.     ui.addPopup(8,2,"Rentrez le pseudo du participant !",chef,400,200,200)
  26.   end
  27.    if callback=="closewin" then
  28.     ui.removeTextArea(101,name)
  29.     ui.removeTextArea(2,name)
  30.     ui.addPopup(4, 0, "", name, 300000000, 140, 325)
  31.   end
  32.   end
  33.  
  34.  
  35. function eventPlayerDied(playerName)
  36.   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)
  37.     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
  38.   timer = 999
  39.   ui.addTextArea(2, "", all, 38000000, 110,nil,nil,1234564444467495757)
  40.  
  41. function eventPlayerGetCheese(playerName)
  42.  
  43. 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)
  44. 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)
  45. 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)
  46. timer = 999
  47. 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")
  48. end
  49.  
  50. if gameon ==true then
  51. timer = 9999
  52. function eventLoop(currentTime, timeRemaining)
  53.   timer = timer + 0.5
  54.   if timer==31 then
  55.     ui.addTextArea(2, "<font size='20'>0</font>", all, 380, 110,nil,nil,1234564444444499999666565)
  56.     tfm.exec.newGame("0")
  57.     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)
  58.     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
  59.   if timer==32 then
  60.   ui.removeTextArea(2,all)
  61.   end
  62.   if timer==1 then
  63.     ui.addTextArea(2, "<font size='20'><br> <b>30</b> ...</font>", all, 380, 210,nil,nil)
  64.   end
  65.   if timer==2.5 then
  66.     ui.addTextArea(2, "<font size='20'>29</font>", all, 380, 110,nil,nil)
  67.   end
  68.   if timer==3 then
  69.     ui.addTextArea(2, "<font size='20'>28</font>", all, 380, 110,nil,nil)
  70.   end
  71.   if timer==4 then
  72.     ui.addTextArea(2, "<font size='20'>27</font>", all, 380, 110,nil,nil)
  73.   end
  74.   if timer==5 then
  75.     ui.addTextArea(2, "<font size='20'>26</font>", all, 380, 110,nil,nil)
  76.     end
  77.   if timer==6 then
  78.     ui.addTextArea(2, "<font size='20'>25</font>", all, 380, 110,nil,nil)
  79.     end
  80.   if timer==7 then
  81.     ui.addTextArea(2, "<font size='20'>24</font>", all, 380, 110,nil,nil)
  82.     end
  83.   if timer==8 then
  84.     ui.addTextArea(2, "<font size='20'>23</font>", all, 380, 110,nil,nil)
  85.     end
  86.   if timer==9 then
  87.     ui.addTextArea(2, "<font size='20'>22</font>", all, 380, 110,nil,nil)
  88.     end
  89.   if timer==10 then
  90.     ui.addTextArea(2, "<font size='20'>21</font>", all, 380, 110,nil,nil)
  91.     end
  92.   if timer==11 then
  93.     ui.addTextArea(2, "<font size='20'>20</font>", all, 380, 110,nil,nil)
  94.     end
  95.   if timer==12 then
  96.     ui.addTextArea(2, "<font size='20'>19</font>", all, 380, 110,nil,nil)
  97.     end
  98.   if timer==13 then
  99.     ui.addTextArea(2, "<font size='20'>18</font>", all, 380, 110,nil,nil)
  100.     end
  101.   if timer==14 then
  102.     ui.addTextArea(2, "<font size='20'>17</font>", all, 380, 110,nil,nil)
  103.     end
  104.   if timer==15 then
  105.     ui.addTextArea(2, "<font size='20'>16</font>", all, 380, 110,nil,nil)
  106.     end
  107.   if timer==16 then
  108.     ui.addTextArea(2, "<font size='20'>15</font>", all, 380, 110,nil,nil)
  109.     end
  110.   if timer==17 then
  111.     ui.addTextArea(2, "<font size='20'>14</font>", all, 380, 110,nil,nil)
  112.     end
  113.   if timer==18 then
  114.     ui.addTextArea(2, "<font size='20'>13</font>", all, 380, 110,nil,nil)
  115.     end
  116.   if timer==19 then
  117.     ui.addTextArea(2, "<font size='20'>12</font>", all, 380, 110,nil,nil)
  118.     end
  119.   if timer==20 then
  120.     ui.addTextArea(2, "<font size='20'>11</font>", all, 380, 110,nil,nil)
  121.     end
  122.   if timer==21 then
  123.     ui.addTextArea(2, "<font size='20'>10</font>", all, 380, 110,nil,nil)
  124.     end
  125.   if timer==22 then
  126.     ui.addTextArea(2, "<font size='20'>9</font>", all, 380, 110,nil,nil)
  127.     end
  128.   if timer==23 then
  129.     ui.addTextArea(2, "<font size='20'>8</font>", all, 380, 110,nil,nil)
  130.     end
  131.   if timer==24 then
  132.     ui.addTextArea(2, "<font size='20'>7</font>", all, 380, 110,nil,nil)
  133.     end
  134.   if timer==25 then
  135.     ui.addTextArea(2, "<font size='20'>6</font>", all, 380, 110,nil,nil)
  136.     end
  137.   if timer==26 then
  138.     ui.addTextArea(2, "<font size='20'>5</font>", all, 380, 110,nil,nil)
  139.     end
  140.   if timer==27 then
  141.     ui.addTextArea(2, "<font size='20'>4</font>", all, 380, 110,nil,nil)
  142.     end
  143.   if timer==28 then
  144.     ui.addTextArea(2, "<font size='20'>3</font>", all, 380, 110,nil,nil,1234564444444455556)
  145.     end
  146.   if timer==29 then
  147.     ui.addTextArea(2, "<font size='20'>2</font>", all, 380, 110,nil,nil,1234564444444499999)
  148.     end
  149.   if timer==30 then
  150.     ui.addTextArea(2, "<font size='20'>1</font>", all, 380, 110,nil,nil,1234564444467495757)
  151.     end
  152.   if timer==999 then
  153.   ui.addTextArea(2, "", all, 380, 110,nil,nil,1234564444467495757)
  154. end
  155. end
  156.  
  157. function eventPopupAnswer(idpopup, playerName, answer)
  158.         if idpopup==7 then
  159.            tfm.exec.newGame(""..answer.."")
  160.                   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)
  161.                   table.insert(enjeu, answer)
  162.                   tfm.exec.movePlayer(""..answer.."", 110, 0)
  163.                   timer = 0
  164.                   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)
  165.                       end
  166.         if idpopup==8 then
  167.            tfm.exec.newGame(""..answer.."")
  168.                   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)
  169.                   table.insert(enjeu, answer)
  170.                   tfm.exec.movePlayer(""..answer.."", 110, 0)
  171.                   timer = 0
  172.                   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)
  173.                       end
  174. end
  175. end
  176.  
  177. function eventNewPlayer(playerName)
  178. 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)
  179. 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)
  180. end
  181.  
  182.  
  183. function eventChatCommand(name,command) -- A partir de la il y'a les commandes
  184.   if command == "aide" then
  185.   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)
  186. end
  187.   if command == "argent" then
  188.       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)
  189. end
  190.   if command == "give" then
  191.   table.insert(cagnotte, 1)
  192. end
  193.   if command == "start" then
  194.   gameon = false
  195.   end
  196.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement