Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Sistema de times v1.0.
- -- Criado por Contistente.
- -- Por favor não retire os créditos.
- vivos = 0
- blue = {}
- green = {}
- data={}
- jogadores = {}
- start=false
- for _,v in pairs ({'disableAutoNewGame','disableAutoShaman','disableAutoTimeLeft','disableAutoScore'}) do
- tfm.exec[v](true)
- end
- function eventNewPlayer(name)
- if not data[name] then
- data[name]={
- haveTeam=false,
- time_shoot=os.time()
- }
- table.insert(jogadores,{name,false})
- end
- ui.addTextArea(0, "\n\n\n\n<p align=\"center\"><N><font size=\"16\">Oieee , Sejam todos bem vindos ao <B>PokéViper</B> novo module , para jogar e muito simples você será de 1 time azul ou verde seu objetivo e pega a Pokébolla do outro lá do campo ... Mais cuidado lembre-se isso é 1 jogo de pokémon poderes vão ter !!!", name, 226, 126, 383, 201, 0x172a33, 0x000000, 1, true)ui.addTextArea(1, "<font color=\"#FFFFFF\">______________________________________________", name, 260, 145, 347, 22, 0x324650, 0x000000, 0, true)
- ui.addTextArea(1, "<font color=\"#FFFFFF\">______________________________________________", name, 260, 145, 347, 22, 0x324650, 0x000000, 0, true)
- ui.addTextArea(2, "<a href='event:close_help'><font size=\"15\"><B><font color=\"#b50909\">X", name, 587, 127, 21, 25, 0xb50909, 0x000000, 0, true)
- ui.addTextArea(3, "<font size=\"20\"><a href='event:open_credits'><font size=\"20\"><p align=\"center\">Creditos</a>", name, 260, 126, 100, 36, 0x1bd428, 0x000000, 0, true)
- ui.addTextArea(4, "<font size=\"20\"><a href='event:open_shop'><font size=\"20\"><p align=\"center\">Shop</a>", name, 475, 127, 100, 36, 0x1bd428, 0x000000, 0, true)
- ui.addTextArea(5, "<a href='event:open_help'><font size=\"20\"><p align=\"center\"><VP>Help</a>", name, 367, 126, 100, 47, 0x324650, 0x000000, 0, true)
- tfm.exec.chatMessage('Nossos comandos : !help , !shop , !credito', name)
- tfm.exec.bindKeyboard(name,32,true,true)
- for name in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(name,32,true,true)
- end
- end
- function eventNewGame()
- blue = '#'
- green = '#'
- blue = {}
- green = {}
- vivos = #jogadores
- start=false
- for i,v in pairs(jogadores) do
- data[v[1]].haveTeam=false
- tfm.exec.setNameColor(v[1], 0xFFFFFF)
- if v[2] then
- v[2] = false
- end
- end
- end
- function eventLoop(elapsed, remaining)
- if elapsed >= 2000 and not start then
- maxT = math.floor(vivos/2)
- if #blue < maxT then
- jogador = jogadores[math.random(#jogadores)]
- if not jogador[2] then
- table.insert(blue,jogador[1])
- jogador[2] = true
- data[jogador[1]].haveTeam=true
- end
- elseif #green < maxT then
- jogador = jogadores[math.random(#jogadores)]
- if not jogador[2] then
- table.insert(green,jogador[1])
- jogador[2] = true
- data[jogador[1]].haveTeam=true
- end
- end
- for all,v in pairs(tfm.get.room.playerList) do
- if not v.isDead then
- if not data[all].haveTeam then
- local teams={'blue','green'}
- local team=nil
- local jogador=nil
- for i,jogador in pairs(jogadores) do
- team=teams[math.random(#teams)]
- if i == all then
- if team == 'blue' then
- table.insert(blue,jogador[1])
- elseif team == 'green' then
- table.insert(green,jogador[1])
- end
- jogador[2] = true
- data[jogador[1]].haveTeam=true
- end
- end
- end
- end
- end
- end
- if elapsed >= 3000 and not start then
- start = true
- changeColor();
- end
- end
- function changeColor()
- for i,v in pairs(blue) do
- tfm.exec.setNameColor(v, 0x1E90FF)
- end
- for i,v in pairs(green) do
- tfm.exec.setNameColor(v, 0x1bd428)
- end
- end
- for all in pairs(tfm.get.room.playerList) do
- eventNewPlayer(all)
- end
- function eventTextAreaCallback(id, name, link)
- if link == "close_help" then
- for id = 0,6 do
- ui.removeTextArea(id, name)
- end
- end
- if link == "open_help" then
- ui.addTextArea(0, "\n\n\n\n<p align=\"center\"><N><font size=\"16\">Oieee , Sejam todos bem vindos ao <B>PokéViper</B> novo module , para jogar e muito simples você será de 1 time azul ou verde seu objetivo e pega a Pokébolla do outro lá do campo ... Mais cuidado lembre-se isso é 1 jogo de pokémon poderes vão ter !!!", name, 226, 126, 383, 201, 0x172a33, 0x000000, 1, true)ui.addTextArea(1, "<font color=\"#FFFFFF\">______________________________________________", name, 260, 145, 347, 22, 0x324650, 0x000000, 0, true)
- ui.addTextArea(1, "<font color=\"#FFFFFF\">______________________________________________", name, 260, 145, 347, 22, 0x324650, 0x000000, 0, true)
- ui.addTextArea(2, "<a href='event:close_help'><font size=\"15\"><B><font color=\"#b50909\">X", name, 587, 127, 21, 25, 0xb50909, 0x000000, 0, true)
- ui.addTextArea(3, "<font size=\"20\"><a href='event:open_credits'><font size=\"20\"><p align=\"center\">Creditos</a>", name, 260, 126, 100, 36, 0x1bd428, 0x000000, 0, true)
- ui.addTextArea(4, "<font size=\"20\"><a href='event:open_shop'><font size=\"20\"><p align=\"center\">Shop</a>", name, 475, 127, 100, 36, 0x1bd428, 0x000000, 0, true)
- ui.addTextArea(5, "<a href='event:open_help'><font size=\"20\"><p align=\"center\"><VP>Help</a>", name, 367, 126, 100, 47, 0x324650, 0x000000, 0, true)
- end
- if link == "open_credits" then
- ui.addTextArea(0, "\n\n\n\n<p align=\"center\"><font size=\"16\"><B>Donos(as)\n</B><CE>Sexfemm</CE>\n<B>Sub Donos(as)\n</B><CE>Rianmojang1</CE>\n<B>Avaliadores(as)</B>\n<CE>Julodinho, Onoratolima, Dudugontijo\n", name, 226, 126, 383, 220, 0x172a33, 0x000000, 1, true)
- ui.addTextArea(1, "<font color=\"#FFFFFF\">______________________________________________", name, 260, 145, 347, 22, 0x324650, 0x000000, 0, true)
- ui.addTextArea(2, "<a href='event:close_help'><font size=\"15\"><B><font color=\"#b50909\">X", name, 587, 127, 21, 25, 0xb50909, 0x000000, 0, true)
- ui.addTextArea(4, "<font size=\"20\"><a href='event:open_credits'><font size=\"20\"><p align=\"center\"><VP>Creditos</a>", name, 260, 126, 100, 36, 0x1bd428, 0x000000, 0, true)
- ui.addTextArea(5, "<font size=\"20\"><a href='event:open_shop'><font size=\"20\"><p align=\"center\">Shop</a>", name, 475, 127, 100, 36, 0x1bd428, 0x000000, 0, true)
- ui.addTextArea(6, "<a href='event:open_help'><font size=\"20\"><p align=\"center\">Help</a>", name, 367, 126, 100, 47, 0x324650, 0x000000, 0, true)
- end
- end
- function eventChatCommand(name, cmd)
- if cmd == "help" then
- ui.addTextArea(0, "\n\n\n\n<p align=\"center\"><N><font size=\"16\">Oieee , Sejam todos bem vindos ao <B>PokéViper</B> novo module , para jogar e muito simples você será de 1 time azul ou verde seu objetivo e pega a Pokébolla do outro lá do campo ... Mais cuidado lembre-se isso é 1 jogo de pokémon poderes vão ter !!!", name, 226, 126, 383, 201, 0x172a33, 0x000000, 1, true)ui.addTextArea(1, "<font color=\"#FFFFFF\">______________________________________________", name, 260, 145, 347, 22, 0x324650, 0x000000, 0, true)
- ui.addTextArea(1, "<font color=\"#FFFFFF\">______________________________________________", name, 260, 145, 347, 22, 0x324650, 0x000000, 0, true)
- ui.addTextArea(2, "<a href='event:close_help'><font size=\"15\"><B><font color=\"#b50909\">X", name, 587, 127, 21, 25, 0xb50909, 0x000000, 0, true)
- ui.addTextArea(3, "<font size=\"20\"><a href='event:open_credits'><font size=\"20\"><p align=\"center\">Creditos</a>", name, 260, 126, 100, 36, 0x1bd428, 0x000000, 0, true)
- ui.addTextArea(4, "<font size=\"20\"><a href='event:open_shop'><font size=\"20\"><p align=\"center\">Shop</a>", name, 475, 127, 100, 36, 0x1bd428, 0x000000, 0, true)
- ui.addTextArea(5, "<a href='event:open_help'><font size=\"20\"><p align=\"center\"><VP>Help</a>", name, 367, 126, 100, 47, 0x324650, 0x000000, 0, true)
- end
- end
- function eventKeyboard(name, key, down, x, y)
- if key == 32 and not tfm.get.room.playerList[name].isDead and data[name].time_shoot < os.time()-1000 then
- if tfm.get.room.playerList[name].isFacingRight then
- tfm.exec.addShamanObject(1704,x+20,y,90,-20)
- else
- tfm.exec.addShamanObject(1704,x-20,y,270,-20)
- end
- data[name].time_shoot=os.time();
- end
- end
- tfm.exec.newGame(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement