Advertisement
podoko_Lua

À qui est cet avatar ?

May 2nd, 2014
536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.84 KB | None | 0 0
  1. --[[    À qui est cet avatar ?
  2.        
  3.     Ce module et ses avatars ne sont pas mis à jour.
  4.     commandes : !new !next ![réponse] !exit (arrête le module)
  5.    
  6.     ]]
  7.  
  8.    
  9. map1 = '<C><P D="../avatar/'
  10. map2 = '.jpg,350,150" /><Z><S><S L="800" H="50" X="400" Y="375" T="0" P="0,0,0.3,0.2,0,0,0,0" /></S><D /><O /></Z></C>'
  11. listA = {   {"Acelsouris","6365/15096365"}, {"Allomuxxu","7319/1077319"}, {"Autocollant","1873/27451873"}, {"Catochi","4642/5794642"}, {"Claraza","8020/11278020"}, {"Cparti","7305/1467305"}, {"Craponne","3549/3633549"}, {"Donalddx","3006/8923006"}, {"Dryanou","9328/4219328"}, {"Enzo","122/122"}, {"Eyeground","1228/2781228"}, {"Grabouilie","7924/33017924"}, {"Idole","1742/661742"}, {"Kikletruc","7511/31757511"}, {"Kimesis","8829/6828829"}, {"Ladybirde","1162/35271162"}, {"Lisanges","1625/26681625"}, {"Mcfloy","9429/3609429"}, {"Mfc","4482/4482"}, {"Mlledebby","5678/735678"}, {"Moaaaerui","5410/21745410"}, {"Ookatsukeoo","3687/4853687"}, {"Podoko","3091/653091"}, {"Pooommes","7063/25887063"},{"Rectop","6663/4746663"}, {"Rongeurmice","4423/8964423"}, {"Roxaline","3618/10373618"}, {"Sackos","2853/992853"}, {"Skisouris","1052/10641052"}, {"Somptueux","8484/5958484"}, {"Sourisdieux","70769/8070769"}, {"Sulffura","7189/32237189"}, {"Suricette","2423/982423"}, {"Themousen","7420/727420"}, {"Toonney","6876/14876876"}, {"Toutankaman","3549/6903549"}, {"Walidpokemon","4884/12144884"}, {"Xhroria","6895/52736895"}
  12.         }
  13.  
  14. --
  15.  
  16. qLeft = 0
  17. pseudo = ""
  18. pasTrouve = false
  19.  
  20.  
  21.  
  22.  
  23. tfm.exec.disableAutoNewGame (true)
  24. tfm.exec.disableAfkDeath (true)
  25. tfm.exec.disableAutoTimeLeft (true)
  26. tfm.exec.disableAutoShaman (true)
  27. tfm.exec.disableAutoScore (true)
  28.  
  29. function eventPlayerDied (name)
  30.     tfm.exec.respawnPlayer (name)
  31. end
  32.  
  33.  
  34.  
  35. function newQ()
  36.     local n = math.random(#listA)
  37.     tfm.exec.newGame(map1..listA[n][2]..map2)
  38.     pseudo = listA[n][1]
  39.    
  40.     qLeft = qLeft - 1
  41.     pasTrouve = true
  42.     tfm.exec.setGameTime(30, true)
  43. end
  44.  
  45. function newG (nbQ)
  46.    
  47.     for name, key in pairs(tfm.get.room.playerList) do
  48.         tfm.exec.setPlayerScore(name, 0, false)
  49.     end
  50.     qLeft = nbQ
  51.     pasTrouve = false
  52.     tfm.exec.setGameTime (4, true)
  53. end
  54.  
  55.  
  56.  
  57.  
  58.  
  59. function eventChatCommand (name, command)
  60.    
  61.     local listM = {}
  62.     for elmt in string.gmatch(command, "[^%s]+") do
  63.         table.insert(listM, elmt)
  64.     end
  65.    
  66.     if (command == pseudo) and pasTrouve then
  67.    
  68.         tfm.exec.giveCheese (name)
  69.         tfm.exec.playerVictory (name)
  70.         tfm.exec.setPlayerScore (name, 10, true)
  71.        
  72.         eventChatCommand (admin, "next")
  73.        
  74.     elseif listM[1] == "new" then
  75.         newG(tonumber(listM[2]) or 10)
  76.        
  77.     elseif command == "next" then
  78.         pasTrouve = false
  79.         tfm.exec.setGameTime (4)
  80.    
  81.     elseif command == "exit" then system.exit()
  82.     end
  83. end
  84.  
  85.  
  86. function eventLoop (past, left)
  87.    
  88.     if (left <= 0) then
  89.         if pasTrouve then
  90.             tfm.exec.setGameTime (5, true)
  91.             pasTrouve = false
  92.         elseif qLeft >= 0 then
  93.             newQ()     
  94.         end
  95.     end
  96. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement