Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- adm = { "Tectoon", "Theapps", "Sagazgamer" }
- np= tfm.exec.disableAutoNewGame(true) or {[[@1703644]], [[@360778]], [[@183740]], [[@4624694]], [[@2065627]], [[@1474189]], [[@1482964]], [[@626107]], [[@4530334]], [[@2593758]], [[@524924]], [[@2722183]]}
- function eventLoop(a, b)
- local c= 0;
- table.foreach(tfm.get.room.playerList, function(i,v) c= not v.isDead and c+1 or c end)
- c= (c == 0 or b <=0) and tfm.exec.newGame(np[math.random(#np)]) or nil;
- end
- eventNewGame = function()
- sh = 2
- alive = 0
- maxscore = 0
- for i in pairs(tfm.get.room.playerList) do
- alive = alive + 1
- for l = 1,2 do
- if tfm.get.room.playerList[i].score < maxscore + 1 and sh ~= 0 then
- sh = sh - 1
- tfm.exec.setShaman(i)
- tfm.exec.setPlayerScore(i, 0, false)
- if sh == 1 then
- tfm.exec.setNameColor(i, 0xFF1100) ------- Aonde está FFAB35 você mude para outro código, outra cor, que será a cor do shaman
- tfm.exec.setUIMapName("Treinamento Shaman V1.1")
- end
- end
- end
- end
- end
- eventLoop(0, 0)
- parametre = { ["Tempo automático"] = true }
- aff = { lJoueurs = {} , joueur = {}
- }
- joueur = {}
- for k, pseudo in pairs(adm) do
- ui.addTextArea (1, "<p align='center'><b><a href='event:time'>Time</a></b></p>", pseudo, 61, 30, 40, 20, 0xC06F6E, 0x324650, 0.75, true)
- ui.addTextArea (4, "<p align='center'><b><a href='event:map'>Mapa</a></b></p>", pseudo, 10, 30, 40, 20, 0x000000, 0x324650, 0.5, true)
- for l, m in pairs ( aff ) do
- aff[l][pseudo] = false
- end
- end
- function eventTextAreaCallback(id, source, callback)
- if callback == 'time' then
- ui.addPopup (0, 2, "Tempo para definir:", source, 10, 70, 150, true)
- elseif callback == 'map' then
- ui.addPopup (1, 2, "Código do Mapa:", source, 10, 70, 150, true)
- elseif parametre[callback] ~= nil then
- paraGestion(callback, source )
- ui.updateTextArea (id, callback .. ": <a href='event:" .. callback .. "'>" .. B(parametre[callback]) .. "</a>", source )
- elseif joueur[callback] ~= nil or callback == "Nomes" then
- if aff["joueur"][source] then
- effJoueur ( source )
- if callback ~= dernierProfil[source] then
- eventTextAreaCallback(id, source, callback)
- end
- else
- affJoueur(source, callback)
- ui.updateTextArea (id, "<p align='center'><b><V><a href='event:" .. callback .. "'>" .. callback .. "</a></N></b></p>", source)
- end
- dernierProfil[source] = callback
- elseif parametreJ[callback] ~= nil then
- if dernierProfil[source] == "all" then
- for k, v in pairs ( joueur ) do
- if all[callback] ~= nil then
- joueur[k][callback] = all[callback]
- end
- paraJGestion ( k, callback )
- end
- end
- end
- end
- function eventPopupAnswer (id, playerName, answer)
- if id == 0 then
- tfm.exec.setGameTime(answer, true)
- elseif id == 1 then
- tfm.exec.newGame(answer)
- end
- end
- function eventChatCommand(p,c)
- local args={}
- for i in c:gmatch('[^%s]+') do
- table.insert(args,i)
- end
- if args[1]==[[skip]] and p==[[Sagazgamer]] then
- tfm.exec.newGame(np[math.random(#np)])
- tfm.exec.setUIMapName("<J> Treinamento Shaman V1.1")
- print("<J>Próximo mapa<n> Mapa carregado com sucesso!")
- elseif args[1]=="reset" and p==[[Sagazgamer]] then
- tfm.exec.newGame(tfm.get.room.currentMap)
- end
- end
- for i,command in ipairs({"skip","reset"}) do
- system.disableChatCommandDisplay(command)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement