Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("<ROSE> [~Tribo Mini-Game] <N>Lua launched successfully! <J>##")
- adm = {"Bolodefchoco"}
- tfm.exec.NewGame[[0]]
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoNewGame(true)
- maps={"0","4","9","17","19","22","23","38","39","47","49","51","53","74","81","89","90","94","97","118","123","138","139","140","141","142","143"}
- function eventLoop(time,remaining)
- if remaining<=0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- tfm.exec.setUIMapName("<VP>Survive<ROSE> By<BV> Bolodefchoco")
- tfm.exec.setUIShamanName("<J>ALL")
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAllShamanSkills(true)
- function eventPlayerLeft(playerName)
- end
- function getAlivePlayers()
- local alivePlayersInt = 0
- local alivePlayers = {}
- for i, player in pairs(tfm.get.room.playerList) do
- if player.isDead == false then
- alivePlayersInt = alivePlayersInt + 1
- table.insert(alivePlayers, player)
- end
- end
- return {alivePlayers, alivePlayersInt}
- end
- function eventPlayerDied(playerName)
- alivePlayers = getAlivePlayers()
- alivePlayersList = alivePlayers[1]
- alivePlayersNum = alivePlayers[2]
- if alivePlayersNum == 1 then
- winner = alivePlayersList[1].playerName
- ui.addTextArea(0, ("<TI><B><V>"..tostring(winner).." <BL>venceu a luta <r>macabra<BL>! Muhahaha"), nil, nil, nil, nil, 20, nil, 0, nil)
- tfm.exec.giveCheese(winner)
- tfm.exec.playerVictory(winner)
- tfm.exec.setPlayerScore(winner, 10, true)
- tfm.exec.setGameTime("10")
- else
- print('<V>'..playerName..' <J>morreu!')
- end
- end
- function Vampire()
- for i in pairs(tfm.get.room.playerList) do
- tfm.exec.setVampirePlayer(i)
- end
- end
- function Shaman()
- for i in pairs(tfm.get.room.playerList) do
- tfm.exec.setShaman(i)
- end
- end
- function getAdmin(name)
- local isAdm=false
- for i,v in pairs(adm) do
- if name==v then
- isAdm=true
- break
- end
- end
- return isAdm
- end
- function eventChatCommand(name,cmd)
- for index,player in pairs(admin) do
- if c:sub(0,4)=="p" then
- elseif c:sub(0,1)=="p" then
- ui.addTextArea(3,"<B><R>[~Adm] ["..p.."]</B><font color='#000000'>"..c:sub(2).."",playe,0,375, 790, 25, 0,0,0,true)
- elseif cmd=="s" and getAdmin(name) then
- Shaman()
- elseif cmd=="v" and getAdmin(name) then
- Vampire()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement