Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admins={"Ilhaqjo","Ninguem"};
- data={};
- vivos=0;
- -- Dar data
- for player in pairs(tfm.get.room.playerList) do
- newData={
- ["vidas"]=3;
- };
- data[player] = newData;
- end
- -- Mapas
- mapas={[[0]],[[1]],[[2]],[[3]],[[4]],[[5]],[[6]],[[11]],[[12]],[[13]],[[14]],[[15]],[[16]],[[17]],[[18]],[[19]],[[20]],[[21]],[[22]],[[24]],[[25]],[[26]],[[28]],[[29]],[[30]],[[31]],[[32]],[[33]],[[34]],[[35]],[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]],[[44]],[[45]],[[46]],[[47]],[[48]],[[49]],[[50]],[[51]],[[52]],[[53]],[[54]],[[55]],[[56]],[[57]],[[58]],[[59]],[[60]],[[61]],[[62]],[[63]],[[64]],[[65]],[[66]],[[67]],[[68]],[[69]],[[70]],[[71]],[[72]],[[73]],[[74]],[[75]],[[76]],[[77]],[[78]],[[79]],[[80]],[[81]],[[82]],[[83]],[[84]],[[85]],[[86]],[[87]],[[88]],[[89]],[[90]],[[91]],[[92]],[[93]],[[95]],[[96]],[[97]],[[98]],[[99]],[[100]],[[110]],[[114]],[[115]],[[116]],[[117]],[[118]],[[119]],[[120]],[[121]],[[122]],[[123]],[[124]],[[125]],[[126]],[[127]],[[128]],[[129]],[[130]],[[131]],[[132]],[[133]],[[134]],[[136]],[[137]],[[138]],[[139]],[[140]],[[141]],[[142]],[[143]],[[200]],[[201]],[[202]],[[203]],[[204]],[[205]],[[206]],[[207]],[[208]],[[209]],[[210]]};
- -- Inicio do script
- function eventPlayerWon(player)
- nextRound()
- tfm.exec.setPlayerScore(player,10,true)
- end
- system.disableChatCommandDisplay("skip", true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.newGame(mapas[math.random(#mapas)])
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoScore(true)
- tfm.exec.disableAllShamanSkills(true)
- -- Novo round
- function nextRound()
- tfm.exec.newGame(mapas[math.random(#mapas)]);
- tfm.exec.disableAllShamanSkills(true)
- end
- -- NOVO JOGO se inicia
- function eventNewGame()
- vivo=0
- for player in pairs(tfm.get.room.playerList) do
- data[player].vidas = 3;
- vivo=vivo+1
- tfm.exec.setShaman(player)
- end
- tfm.exec.setUIShamanName("Todos são shaman!")
- tfm.exec.setUIMapName("Shaman Attack");
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAllShamanSkills(true)
- tfm.exec.setGameTime([[303]])
- end
- -- Jogador morre
- function eventPlayerDied(player)
- data[player].vidas=data[player].vidas-1;
- if data[player].vidas >= 1 then
- tfm.exec.respawnPlayer(player)
- end
- if data[player].vidas <= 0 then
- vivo=vivo-1;
- end
- end
- -- Loop
- function eventLoop(tempoFaltando, tempoPassado)
- if vivo == 0 or tempoFaltando < 1000 then
- nextRound();
- end
- for player in pairs(tfm.get.room.playerList) do
- if data[player].vidas == 3 then
- tfm.exec.displayParticle(5,30,35,0,0, 0, 0, player)
- tfm.exec.displayParticle(5,60,35,0,0, 0, 0, player)
- tfm.exec.displayParticle(5,90,35,0,0, 0, 0, player)
- end
- if data[player].vidas == 2 then
- tfm.exec.displayParticle(5,30,35,0,0, 0, 0, player)
- tfm.exec.displayParticle(5,60,35,0,0, 0, 0, player)
- end
- if data[player].vidas == 1 then
- tfm.exec.displayParticle(5,30,35,0,0, 0, 0, player)
- end
- end
- end
- -- Novo jogador entra na partida
- function eventNewPlayer(player)
- newData={
- ["vidas"]=0;
- };
- data[player] = newData;
- ui.addTextArea(2,"<p align='center'><a href='event:open'>Ajuda</a></p>",player,700,20,40,20,1,1,0.5,true)
- function eventTextAreaCallback(id, player, callback)
- if callback == "close" then
- ui.removeTextArea(2, player)
- ui.removeTextArea(4, player)
- ui.addTextArea(2,"<p align='center'><a href='event:open'>Abrir</a></p>",player,700,20,40,20,1,1,0.5,true)
- end
- if callback == "open" then
- ui.removeTextArea(4, player)
- ui.addTextArea(2,"<br><font size='18'>Ajuda</font><br><br>Nunca ninguém pensou isso. Todos neste mundo são shamans, e querem dominar o mundo. Tente matar todos os outros, ganhando a partida!<br><br>Envie o seu mapa agora no Forum, Subseção Modules, na Galeria do Ilhaqjo ou então /w Ilhaqjo<br><br>Rotação de mapas será melhorada em Breve<br><br>Shaman Attack & Company<br><br><b>Mini-game feito por: Ilhaqjo</b><br><br><b>Sistema de Vidas: Brenower</b><br>",player,50,60,700,300,1,1,0.8,true)
- ui.addTextArea(4,"<p align='center'><a href='event:close'>Fechar</a></p>",player,20,375,760,20,1,1,0.8,true)
- end
- end
- end
- -- Um item é invocado
- function eventSummoningEnd(player,id,x,y,ang,xs,ys,other)
- if id == 28 then
- tfm.exec.removeObject(other.id)
- if id == 2 then
- tfm.exec.removeObject(other.id)
- if id == 1 then
- tfm.exec.removeObject(other.id)
- end
- end
- end
- end
- -- Comandos
- function isAdm(nome)
- for i, v in pairs(admins) do
- if v == nome then
- return true
- end
- end
- return false
- end
- function eventChatCommand(nome, cmd)
- if cmd=="skip" and isAdm(nome) then
- tfm.exec.newGame(mapas[math.random(#mapas)])
- end
- end
- ui.addTextArea(2,"<p align='center'><a href='event:open'>Ajuda</a></p>",player,700,20,40,20,1,1,0.5,true)
- function eventTextAreaCallback(id, player, callback)
- if callback == "close" then
- ui.removeTextArea(2, player)
- ui.removeTextArea(4, player)
- ui.addTextArea(2,"<p align='center'><a href='event:open'>Abrir</a></p>",player,700,20,40,20,1,1,0.5,true)
- end
- if callback == "open" then
- ui.removeTextArea(4, player)
- ui.addTextArea(2,"<br><font size='18'>Ajuda</font><br><br>Nunca ninguém pensou isso. Todos neste mundo são shamans, e querem dominar o mundo. Tente matar todos os outros, ganhando a partida!<br><br>Envie o seu mapa agora no Forum, Subseção Modules, na Galeria do Ilhaqjo ou então /w Ilhaqjo<br><br>Rotação de mapas será melhorada em Breve<br><br>Shaman Attack & Company<br><br><b>Mini-game feito por: Ilhaqjo</b><br><br><b>Sistema de Vidas: Brenower</b><br>",player,50,60,700,300,1,1,0.8,true)
- ui.addTextArea(4,"<p align='center'><a href='event:close'>Fechar</a></p>",player,20,375,760,20,1,1,0.8,true)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment