Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- liste = {}
- liste["P1"] = {"125204","149514" }
- liste["P3"] = {"113156","124000" }
- liste["P4"] = {"120806","126092" }
- liste["P5"] = {"129420" , "154859" }
- liste["P6"] = {"49101" , "60303" }
- liste["P7"] = {"129835" , "142101" }
- liste["P8"] = {"125204" , "149514" }
- liste["P9"] = {"121024" , "134300" }
- liste["P10"] = {"276534" , "279689" }
- liste["P11"] = { "258972" , "334445" }
- liste["P13"] = { "155517" , "156510" }
- liste["P17"] = { "112790" , "114122" }
- liste["P18"] = { "767142" , "1299415"}
- P = { "P1","P3","P4","P5","P6","P7","P8","P9","P10","P11","P13","P17","P18" }
- currentP = "P1"
- time = { P1 = 120, P3 = 360, P4 = 120, P5 = 120, P6 = 120, P7 = 63, P8 = 120, P9 = 120, P10 = 120, P11 = 120,P13 = 360, P17 = 63, P18 = 120, P32 = 120}
- timeLeft = { P1 = false, P3 = true, P4 = false, P5 = false, P6 = false, P7 = false, P8 = false, P9 = false, P10 = false, P11 = true, P13 = true, P17 = false, P18 = true, P32 = false}
- shaman = { P1 = false, P3 = true, P4 = false, P5 = false, P6 = false, P7 = true, P8 = false, P9 = false, P10 = false, P11 = true, P13 = true, P17 = true, P18 = true, P32 = false}
- playerList = {}
- alive = 0
- tfm.exec.disableAutoNewGame ( true )
- print(time[currentP])
- for name, v in pairs ( tfm.get.room.playerList ) do
- table.insert ( playerList, name )
- end
- function launchGame ( )
- currentP = P [math.random ( #P )]
- nextMap = "@".. liste [currentP] [math.random ( #liste[currentP] )]
- tfm.exec.disableAutoShaman ( shaman [currentP] )
- print(nextMap)
- tfm.exec.newGame ( nextMap )
- end
- function eventLoop (past, remaining)
- if remaining < 500 or alive == 0 then
- launchGame ( )
- end
- end
- function eventNewGame ( )
- alive = #playerList
- tfm.exec.setGameTime( time[currentP] )
- tfm.exec.disableAutoTimeLeft ( timeLeft[currentP] )
- end
- function eventPlayerDied ( name )
- if currentP == "P3" or currentP == "P13" then
- tfm.exec.respawnPlayer ( name )
- else
- alive = alive - 1
- end
- end
- function eventPlayerRespawn ( name )
- alive = alive + 1
- print (alive)
- end
- function eventPlayerWon ( name )
- if currentP == "P18" then
- tfm.exec.setGameTime ( 20 )
- elseif currentP == "P13" or currentP == "P3" then
- tfm.exec.respawnPlayer ( name )
- end
- alive = alive - 1
- print(alive)
- end
- function eventPlayerVampire ( name )
- alive = alive - 1
- end
- function eventNewPlayer ( name )
- table.insert ( playerList, name )
- print ( name.. " vient d'entrer dans le salon." )
- if currentP == "P3" or currentP == "P13" then
- tfm.exec.respawnPlayer ( name )
- end
- end
- function eventPlayerLeft ( name )
- for k, v in ipairs ( playerList ) do
- if playerList[k] == name then
- print(playerList[k])
- table.remove ( playerList, k )
- print ( name.. " vient de quitter le salon." )
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement