×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Lua] Peça scripts aqui!
« ‹ 5 / 9 › »
[Lua] Peça scripts aqui!
Gabriel
« Citoyen »
1633116300000
    • Gabriel#8201
    • Profil
    • Derniers messages
    • Tribu
#81
  1
Wenzw a dit :
Quero um script do modo racing porém com ranking e só conta status de rank com 6 ratos, e apenas quem chegar em primeiro receber ponto para o ranking

Ai amigo desculpa a demora para alguem fazer para vc!
Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoScore(true)
tfm.exec.disableMinimalistMode(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(false)
tfm.exec.disableMortCommand(true)
tfm.exec.setGameTime(120, true)
tfm.exec.setRoomMaxPlayers(6)
map={
1923785,
355769,
406881,
2048474,
169892,
321814,
444964
}
tfm.exec.newGame(map[math.random(#map)])

local tempo = 120
local atras = 2
adm = "Gabriel#8201" -- seu nick aqui

eventLoop = function()
atras = atras -1
if atras == 0 then
atras = 2
tempo = tempo -1
ui.setMapName('<VP> Tempo para reinicia: '..tempo..'<ROSE> |</ROSE> <R> By Gabriel#8201 não modifica meus creditos safado'..'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t')
elseif tempo == 0 then
tfm.exec.newGame(map[math.random(#map)])
end
end

eventPlayerWon = function(name)
tfm.exec.setPlayerScore(name, 10, true)
tempo = 3
end

eventChatCommand = function(name,c)
if name == adm then
if c=="restart" then
tfm.exec.newGame(map[math.random(#map)])
end
end
end

eventNewGame = function()
tempo = 120
end


Coloca o code do mapa no
map={}

Ex
map={
1234,
1234,
1234
}

Mude meu nick para o teu
!restart -- para reinicia o jogo

Versão 2.0
Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoScore(true)
tfm.exec.disableMinimalistMode(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(false)
tfm.exec.disableMortCommand(true)
tfm.exec.setGameTime(120, true)
tfm.exec.setRoomMaxPlayers(6)
map={
1923785,
355769,
406881,
2048474,
169892,
321814,
444964
}
tfm.exec.newGame(map[math.random(#map)])

local tempo = 120
local part = 1
local score = 0
local atras = 2
adm = "Gabriel#8201" -- seu nick aqui

eventLoop = function()
atras = atras -1
if atras == 0 then
atras = 2
tempo = tempo -1
ui.setMapName('<VP> Tempo para reinicia: '..tempo..'<ROSE> |</ROSE> <R> By Gabriel#8201 não modifica meus creditos safado'..'<G> | <N>Partida: '..part..'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t')
elseif tempo == 0 then
tfm.exec.newGame(map[math.random(#map)])
elseif score >= 100 then
part = part +1
score = 0
end
end

eventChatCommand = function(name,c)
if name == adm then
if c=="restart" then
tfm.exec.newGame(map[math.random(#map)])
end
end
end

data = {}

eventNewPlayer = function()
if not data[name] then
data[name] = {
score = 0
}
end
end
eventPlayerWon = function(name)
tfm.exec.setPlayerScore(name, 10, true)
score = score +10
tempo = 3
end

eventNewGame = function()
tempo = 120
end


Versão 3
è add


  • Sistema de rank
  • !rank



Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoScore(true)
tfm.exec.disableMinimalistMode(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(false)
tfm.exec.disableMortCommand(true)
tfm.exec.setGameTime(120, true)
tfm.exec.setRoomMaxPlayers(6)
map={
1923785,
355769,
406881,
2048474,
169892,
321814,
444964
}
tfm.exec.newGame(map[math.random(#map)])

local top1 = "" -- Não coloca nada
local top2 = "" -- Não coloca nada
local top3 = "" -- Não coloca nada


local tempo = 120
local part = 1
local score = 0
local atras = 2
adm = "Gabriel#8201" -- seu nick aqui

eventLoop = function()
ttop1()
ttop2()
ttop3()
atras = atras -1
if atras == 0 then
atras = 2
tempo = tempo -1
ui.setMapName('<VP> Tempo para reinicia: '..tempo..'<ROSE> |</ROSE> <R> By Gabriel#8201 não modifica meus creditos safado'..'<G> | <N>Partida: '..part..'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t')
elseif tempo == 0 then
tfm.exec.newGame(map[math.random(#map)])
elseif score >= 100 then
part = part +1
score = 0
end
end

eventChatCommand = function(name,c)
if name == adm then
if c=="restart" then
tfm.exec.newGame(map[math.random(#map)])
elseif c=="rank" then
ui.addPopup(-66, 3, "Top1:"..top1.." Top2:"..top2.." Top3:"..top3, nil, 400, 200, nil, true)
end
end
end

data = {}

eventNewPlayer = function()
if not data[name] then
data[name] = {
score = 0
}
end
end
eventPlayerWon = function(name)
tfm.exec.setPlayerScore(name, 10, true)
score = score +10
tempo = 3
end

function ttop1(name)
if score >= 100 then
top1 = ""
end
end
function ttop2(name)
if score >= 60 then
top2 = ""
end
end
function ttop3(name)
if score >= 30 then
top3 = ""
end
end

eventNewGame = function()
tempo = 120
end


Editado para coloca como spoiler!!!

Dernière modification le 1634398080000
Eloa
« Citoyen »
1633117020000
    • Eloa#6675
    • Profil
    • Derniers messages
#82
  0
entendi
Sklag
« Citoyen »
1633305780000
    • Sklag#2552
    • Profil
    • Derniers messages
    • Tribu
#83
  0
não preciso mais de ajuda por isso editei era um bug do mice.

Dernière modification le 1633373520000
Gabiella
« Citoyen »
1633556700000
    • Gabiella#3150
    • Profil
    • Derniers messages
    • Tribu
#84
  0
Gabriel a dit :
Gabiella a dit :
Oie gente, queria pedir um pedido de script

O script que eu queria pedir é uma pequena palavra no canto direito inferior dizendo "Painel" (Como isso: https://media.discordapp.net/attachments/859559933209083904/892145941933592596/wpmIzo2_-_Imgur.png), quando eu clicar vai abrir um Painel que vai ter varias configurações, alterar Gravidade, Matar o rato de alguém, reviver, banir, congelar, receber queijo, mudar tamanho do rato, teleport, entrar na toca, Meep, vampiro etc. (invocar objeto e/ou piso se possível)


Com opção para escolher as pessoas que vão ter uma dessas frações clicando em cima do nick. (dentro do painel)
Podendo escolher fulano, beltrano e quintano ou todos.

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local adm = "Gabriel#8201" -- seu nick aqui

ui.addTextArea(-2, "<a href='event:p'> Painel", adm, 755, 380, nil, 15, 0x0, 0xf, 1, true)

eventTextAreaCallback = function(id, name, event)
if event == "p" then
ui.addTextArea(-1,cmd, adm, 400, 200, adm, 15, 0x0, 0xf, 1, true)
elseif event == "qj" then
tfm.exec.giveCheese(adm)
elseif event == "v" then
tfm.exec.killPlayer(adm)
end
end

cmd=[[ Comandos

<a href='event:qj'> Queijo </a>
<a href='event:v'> Morrer </a>
]]


EU tentei tu pode cria mas função colocando e painel la oque tem ai vc muda os event para outra letra cria elseif event == 'a letra' then
e coloca oque vai acontece quando a pessoa clica no comando

Obgdd, e como fecha o painel?
Gabriel
« Citoyen »
1633571220000
    • Gabriel#8201
    • Profil
    • Derniers messages
    • Tribu
#85
  0
Gabiella a dit :
Gabriel a dit :
Gabiella a dit :
Oie gente, queria pedir um pedido de script

O script que eu queria pedir é uma pequena palavra no canto direito inferior dizendo "Painel" (Como isso: https://media.discordapp.net/attachments/859559933209083904/892145941933592596/wpmIzo2_-_Imgur.png), quando eu clicar vai abrir um Painel que vai ter varias configurações, alterar Gravidade, Matar o rato de alguém, reviver, banir, congelar, receber queijo, mudar tamanho do rato, teleport, entrar na toca, Meep, vampiro etc. (invocar objeto e/ou piso se possível)


Com opção para escolher as pessoas que vão ter uma dessas frações clicando em cima do nick. (dentro do painel)
Podendo escolher fulano, beltrano e quintano ou todos.

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local adm = "Gabriel#8201" -- seu nick aqui

ui.addTextArea(-2, "<a href='event:p'> Painel", adm, 755, 380, nil, 15, 0x0, 0xf, 1, true)

eventTextAreaCallback = function(id, name, event)
if event == "p" then
ui.addTextArea(-1,cmd, adm, 400, 200, adm, 15, 0x0, 0xf, 1, true)
elseif event == "qj" then
tfm.exec.giveCheese(adm)
elseif event == "v" then
tfm.exec.killPlayer(adm)
end
end

cmd=[[ Comandos

<a href='event:qj'> Queijo </a>
<a href='event:v'> Morrer </a>
]]


EU tentei tu pode cria mas função colocando e painel la oque tem ai vc muda os event para outra letra cria elseif event == 'a letra' then
e coloca oque vai acontece quando a pessoa clica no comando

Obgdd, e como fecha o painel?

Me mande o script atua como spoiler!!!
Gabiella
« Citoyen »
1633910580000
    • Gabiella#3150
    • Profil
    • Derniers messages
    • Tribu
#86
  0
Gabriel a dit :
Gabiella a dit :
Gabriel a dit :
Gabiella a dit :
Oie gente, queria pedir um pedido de script

O script que eu queria pedir é uma pequena palavra no canto direito inferior dizendo "Painel" (Como isso: https://media.discordapp.net/attachments/859559933209083904/892145941933592596/wpmIzo2_-_Imgur.png), quando eu clicar vai abrir um Painel que vai ter varias configurações, alterar Gravidade, Matar o rato de alguém, reviver, banir, congelar, receber queijo, mudar tamanho do rato, teleport, entrar na toca, Meep, vampiro etc. (invocar objeto e/ou piso se possível)


Com opção para escolher as pessoas que vão ter uma dessas frações clicando em cima do nick. (dentro do painel)
Podendo escolher fulano, beltrano e quintano ou todos.

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local adm = "Gabriel#8201" -- seu nick aqui

ui.addTextArea(-2, "<a href='event:p'> Painel", adm, 755, 380, nil, 15, 0x0, 0xf, 1, true)

eventTextAreaCallback = function(id, name, event)
if event == "p" then
ui.addTextArea(-1,cmd, adm, 400, 200, adm, 15, 0x0, 0xf, 1, true)
elseif event == "qj" then
tfm.exec.giveCheese(adm)
elseif event == "v" then
tfm.exec.killPlayer(adm)
end
end

cmd=[[ Comandos

<a href='event:qj'> Queijo </a>
<a href='event:v'> Morrer </a>
]]


EU tentei tu pode cria mas função colocando e painel la oque tem ai vc muda os event para outra letra cria elseif event == 'a letra' then
e coloca oque vai acontece quando a pessoa clica no comando

Obgdd, e como fecha o painel?

Me mande o script atua como spoiler!!!

aqui
local adm = "Gabriel#8201" -- seu nick aqui

ui.addTextArea(-2, "<a href='event:p'> Painel", adm, 755, 380, nil, 15, 0x0, 0xf, 1, true)

eventTextAreaCallback = function(id, name, event)
if event == "p" then
ui.addTextArea(-1,cmd, adm, 400, 200, adm, 15, 0x0, 0xf, 1, true)
elseif event == "qj" then
tfm.exec.giveCheese(adm)
elseif event == "v" then
tfm.exec.killPlayer(adm)
end
end

cmd=[[ Comandos

<a href='event:qj'> Queijo </a>
<a href='event:v'> Morrer </a>
]]
Gabriel
« Citoyen »
1633969440000
    • Gabriel#8201
    • Profil
    • Derniers messages
    • Tribu
#87
  0
Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
local adm = "Gabriel#8201" -- seu nick aqui

ui.addTextArea(-2, "<a href='event:p'> Painel", adm, 755, 380, nil, 15, 0x0, 0xf, 1, true)

eventTextAreaCallback = function(id, name, event)
if event == "p" then
ui.addTextArea(-1,cmd, adm, 400, 200, adm, 15, 0x0, 0xf, 1, true)
elseif event == "close" then
ui.removeTextArea(-1, adm)
elseif event == "qj" then
tfm.exec.giveCheese(adm)
elseif event == "v" then
tfm.exec.killPlayer(adm)
end
end

cmd=[[ <a href='event:close'> Close </a>

<a href='event:qj'> Queijo </a>
<a href='event:v'> Morrer </a>
]]


Pronto quando abri vai aparece close em cima dos comandos ai vc clica e pronto
Queenwalk
1634088480000
    • Queenwalk#8557
    • Profil
    • Derniers messages
    • Tribu
#88
[Modéré par Bolodefchoco, raison : spam]

Dernière modification le 1634089140000
Queenwalk
« Citoyen »
1634126580000
    • Queenwalk#8557
    • Profil
    • Derniers messages
    • Tribu
#89
  0
Ola gostaria de um script que quando sobra o shaman quando termina o tempo e mais 1 rato o shaman morre

Dernière modification le 1634179260000
Gabriel
« Citoyen »
1634232600000
    • Gabriel#8201
    • Profil
    • Derniers messages
    • Tribu
#90
  1
Queenwalk a dit :
Ola gostaria de um script que quando sobra o shaman quando termina o tempo e mais 1 rato o shaman morre

Eu tinha um assim mas eu o perdi vou tenta refazelo caso consigo eu volte aqui com ele!!
Queenwalk
« Citoyen »
1634251020000
    • Queenwalk#8557
    • Profil
    • Derniers messages
    • Tribu
#91
  0
tenho esse script de pvp survivor, esta faltando pouco pra terminar , peguei de varios script que encontrei na net e aki no forum, gostaria de saber se poderiam arrumar ele pra mim ?esta faltando só arrumar quando uma rato entra no cafofo depois que ja começou a partida ,colocar pra ele nao ganhar ponto porque se nao ele vira shaman e buga os pontos ,tambem esta faltando colocar tipo quando sobra 2 ratos quando termina o tempo ,o shaman morrer e contar ponto pro outro time, mais de resto o script esta bem legal :) , estou na pagina 75 do outro topico e ainda nao achei os scrip que faltam pra mim arrumar o meu :( ,agradeço se me ajudarem.


tfm.exec.disableAutoShaman(false)
tfm.exec.disableAutoNewGame()
tfm.exec.disableAutoTimeLeft()
tfm.exec.disableAllShamanSkills(true)

local ADMINISTRADOR = "Queenwalk#8557" -- CHANGE TO YOUR NICKNAME, SO YOU WILL BE GAME ADMIN
local WINS = 10 -- POINTS TO WIN THE GAME
system.disableChatCommandDisplay("np", true)
system.disableChatCommandDisplay("pause", true)

--[[
After running the script, use the command !time1 jogadores and !time2 jogadores to set both players in the specified team
Then you just need to press GO!
Type !np @mapcode to run the next map.
Type !p team1/team2 number to change its score.
Type !pause to pause/unpause the game.
]]

local teams = {
[1] = {},
[2] = {},
}
local points = {
[1] = 0,
[2] = 0,
}
local isfirst = false
local gameRunning = false
local winTime = false
local playersInGame = {}
local maps = {3107377,495880,305748,1539148,390649,495880,1463332,1492805,292678,305753,1545834,3175437,2964900,1812056,852617,799141,1794907,2939549,495880,1519483,1794873,811211,306360,489829,479091,290546,311496,802958}
local colors = {
[1] = "ff6347",
[2] = "19b5fe"
}
local queue = {}

function newMap()
local mapcode = maps[math.random(#maps)]
if #queue > 0 then
mapcode = queue[1]
table.remove(queue, 1)
end
tfm.exec.newGame(mapcode)
for player, data in pairs(tfm.get.room.playerList) do
if not playersInGame[player] then
tfm.exec.killPlayer(player)
end
end
tfm.exec.setGameTime(90)
end

function eventPlayerWon(player)
if not isfirst then
isfirst = false
tfm.exec.setGameTime(5)
if table.contains(teams[1], player) then
tfm.exec.setGameTime(5)
for i = 0, 3 do
defaultEffect(9, {13}, math.random(800), math.random(400), 20)
end
points[1] = points[1]+1
elseif table.contains(teams[2], player) then
tfm.exec.setGameTime(5)
for i = 0, 3 do
defaultEffect(9, {9}, math.random(800), math.random(400), 20)
end
points[2] = points[2]+1
else
isfirst = false
end
winner = false
if points[1] >= WINS then
winner = 1
elseif points[2] >= WINS then
winner = 2
end
if winner then
gameRunning = false
winTime = os.time()
local names = {
"Time1",
"Time2"
}
ui.addTextArea(20, string.format("<p align='center'><font size='37' color='#000000'>Time %s venceu!\nparabens!", names[winner]), nil, 0, 171, 800, 500, 0, 0, 0, true)
ui.addTextArea(21, string.format("<p align='center'><font size='37' color='#000000'>Time %s venceu!\nparabens!", names[winner]), nil, 1, 170, 800, 500, 0, 0, 0, true)
ui.addTextArea(22, string.format("<p align='center'><font size='37'><font color='#FFFFFF'>Time <font color='#%s'>%s</font> venceu!\nparabens!", colors[winner], names[winner]), nil, 1, 170, 800, 500, 0, 0, 0, true)
end
displayScore()
end
end

function eventLoop(elapsed, remain)
if gameRunning then
remain = remain/1000
if remain < 0 then
remain = 100
newMap()
end
else
if winTime then
if winTime > os.time()-30000 then
for i = 0, 2 do
defaultEffect(9, {11, 9, 0, 13}, math.random(800), math.random(400), 80)
end
else
winTime = false
ui.removeTextArea(20)
ui.removeTextArea(21)
ui.removeTextArea(22)
displayTeams()
teams = {
[1] = {},
[2] = {},
}
points = {
[1] = 0,
[2] = 0,
}
playersInGame = {}
end
end
end
end

function string.title(s)
return string.gsub(s, "%a", function(c)
return string.upper(c)
end, 1)
end

function eventChatCommand(player, command)
if player:lower() == ADMINISTRADOR:lower() then
args = string.split(command, " ")
if args[1] == "time1" then
table.remove(args, 1)
teams[1] = {}
points[1] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[1], player)
playersInGame[player] = true
end
displayTeams()

elseif args[1] == "time2" then
table.remove(args, 1)
teams[2] = {}
points[2] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[2], player)
playersInGame[player] = true
end
displayTeams()

elseif args[1] == "p" then
if args[2] and args[3] then
local team = tonumber(args[2]:match("team(%d+)") or 0)
if team > 0 and team < 3 then
local newScore = tonumber(args[3]) or points[team]
points[team] = newScore
displayScore()
end
end
elseif args[1] == "np" then
if args[2] then
table.insert(queue, args[2])
end
elseif args[1] == "pause" then
gameRunning = not gameRunning
if not gameRunning then
ui.addTextArea(90, "<p align='center'><font size='25'><R>P A U S E D", nil, 0, 200, 800, nil, 0, 0, 0, true)
tfm.exec.disableAutoTimeLeft(true)
else
ui.removeTextArea(90)
tfm.exec.disableAutoTimeLeft(false)
end
end
end
end

function eventNewGame()
if gameRunning then
isfirst = false
for i, p in pairs(teams[1]) do
tfm.exec.setNameColor(p, "0x"..colors[1])
end
for i, p in pairs(teams[2]) do
tfm.exec.setNameColor(p, "0x"..colors[2])
end
displayScore()
end
end

function displayScore()
ui.addTextArea(17, string.format("<p align='center'><font size='23' color='#000000'>%s x %s", points[1], points[2]), nil, 0, 21, 800, 30, 0, 0, 0, true)
ui.addTextArea(18, string.format("<p align='center'><font size='23' color='#000000'>%s x %s", points[1], points[2]), nil, 1, 20, 800, 30, 0, 0, 0, true)
ui.addTextArea(19, string.format("<p align='center'><font size='23'><font color='#%s'>%s<N> x <font color='#%s'>%s", colors[1], points[1], colors[2], points[2]), nil, 0, 20, 800, 30, 0, 0, 0, true)
end

function displayTeams()
ui.addTextArea(1, "", nil, 199, 69, 400, 260, 0x5A7A8B, 0x5A7A8B, 1, true)
ui.addTextArea(2, "", nil, 201, 71, 400, 260, 0x0E1417, 0x0E1417, 1, true)
ui.addTextArea(3, "", nil, 200, 70, 400, 260, 0x324650, 0x324650, 1, true)
ui.addTextArea(4, "", nil, 209, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
ui.addTextArea(5, "<p align='center'><V>Team 1", nil, 210, 80, 140, 20, 0x324650, 0x324650, 1, true)
ui.addTextArea(6, "", nil, 449, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
ui.addTextArea(7, "<p align='center'><V>Team 2", nil, 450, 80, 140, 20, 0x324650, 0x324650, 1, true)
ui.addTextArea(8, "<p align='center'><font color='#5A7A8B'>|</font>", nil, 210, 102, 140, 200, 0, 0, 0, true)
ui.addTextArea(9, "<p align='center'><font color='#5A7A8B'>|</font>", nil, 450, 102, 140, 200, 0, 0, 0, true)
ui.addTextArea(10, "", nil, 209, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
ui.addTextArea(11, "<p align='center'><font color='#"..colors[1].."'>"..table.concat(teams[1], "\n"), nil, 210, 121, 138, 198, 0x324650, 0x324650, 1, true)
ui.addTextArea(12, "", nil, 451, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
ui.addTextArea(13, "<p align='center'><font color='#"..colors[2].."'>"..table.concat(teams[2], "\n"), nil, 452, 121, 138, 198, 0x324650, 0x324650, 1, true)
ui.addTextArea(14, "<p align='center'><font color='#5A7A8B'>____ ____</font>", nil, 330, 200, 140, 200, 0, 0, 0, true)
ui.addTextArea(15, "", nil, 380, 202, 40, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
ui.addTextArea(16, "<p align='center'><V>VS", nil, 381, 203, 38, 18, 0x324650, 0x324650, 1, true)
ui.addTextArea(16, "<p align='center'><V><a href='event:iniciarJogo'>GO", ADMINISTRADOR, 381, 203, 38, 18, 0x324650, 0x324650, 1, true)
end

function eventTextAreaCallback(id, player, callback)
if callback == 'iniciarJogo' then
if #teams[2] > 0 and #teams[1] > 0 then
gameRunning = true
for i = 1, 16 do
ui.removeTextArea(i)
end
defaultEffect(9, {9}, 400, 212, 80)
newMap()
end
end
end

function string.split(s, pattern, n)
local st = {}
for sb in string.gmatch(s, "[^"..pattern.."]+") do
if not n or n > -1 then
table.insert(st,sb)
else
st[#st] = st[#st]..pattern..sb
end
n = n and n-1 or false
end
return st
end

function table.contains(tableT, element)
for _, value in pairs(tableT) do
if value == element then
return true
end
end
return false
end

defaultEffect=function(id,p,x,y,rand) -- thanks for the function santah
local minDist = 1
local outerBorder = 20
local maxDist = 30
local totalParticles = rand and 40 or (id == -1 and 35 or 75)
for i = 1, totalParticles do
if rand then
id = p[math.random(#p)]
end
local dist = math.min(math.random(minDist, maxDist), outerBorder)
local angle = math.random(0, 360)
local r = math.rad(angle)
local dx = math.cos(r)
local dy = math.sin(r)
local vx = dist * dx / 10
local vy = dist * dy / 10
local ax = -vx / dist / 15
local ay = (-vy / dist / 15) + 0.05
if id == -1 then
tfm.exec.displayParticle(9, x + dx, y + dy, vx, vy, ax, ay, nil)
tfm.exec.displayParticle(1, x + dx, y + dy, vx, vy, ax, ay, nil)
else
tfm.exec.displayParticle(id, x + dx, y + dy, vx, vy, ax, ay, nil)
end
end
end

displayTeams()

function eventPlayerDied(name)
local a = {}

for k, v in next, tfm.get.room.playerList do
if not v.isDead then
a[#a + 1] = k
end
end

local player = (#a == 1 and a[1] or nil)
if player then
tfm.exec.giveCheese(player)
tfm.exec.playerVictory(player)
end
end
Gabriel
« Citoyen »
1634254800000
    • Gabriel#8201
    • Profil
    • Derniers messages
    • Tribu
#92
  1
Queenwalk a dit :
tenho esse script de pvp survivor, esta faltando pouco pra terminar , peguei de varios script que encontrei na net e aki no forum, gostaria de saber se poderiam arrumar ele pra mim ?esta faltando só arrumar quando uma rato entra no cafofo depois que ja começou a partida ,colocar pra ele nao ganhar ponto porque se nao ele vira shaman e buga os pontos ,tambem esta faltando colocar tipo quando sobra 2 ratos quando termina o tempo ,o shaman morrer e contar ponto pro outro time, mais de resto o script esta bem legal :) , estou na pagina 75 do outro topico e ainda nao achei os scrip que faltam pra mim arrumar o meu :( ,agradeço se me ajudarem.


tfm.exec.disableAutoShaman(false)
tfm.exec.disableAutoNewGame()
tfm.exec.disableAutoTimeLeft()
tfm.exec.disableAllShamanSkills(true)

local ADMINISTRADOR = "Queenwalk#8557" -- CHANGE TO YOUR NICKNAME, SO YOU WILL BE GAME ADMIN
local WINS = 10 -- POINTS TO WIN THE GAME
system.disableChatCommandDisplay("np", true)
system.disableChatCommandDisplay("pause", true)

--[[
After running the script, use the command !time1 jogadores and !time2 jogadores to set both players in the specified team
Then you just need to press GO!
Type !np @mapcode to run the next map.
Type !p team1/team2 number to change its score.
Type !pause to pause/unpause the game.
]]

local teams = {
[1] = {},
[2] = {},
}
local points = {
[1] = 0,
[2] = 0,
}
local isfirst = false
local gameRunning = false
local winTime = false
local playersInGame = {}
local maps = {3107377,495880,305748,1539148,390649,495880,1463332,1492805,292678,305753,1545834,3175437,2964900,1812056,852617,799141,1794907,2939549,495880,1519483,1794873,811211,306360,489829,479091,290546,311496,802958}
local colors = {
[1] = "ff6347",
[2] = "19b5fe"
}
local queue = {}

function newMap()
local mapcode = maps[math.random(#maps)]
if #queue > 0 then
mapcode = queue[1]
table.remove(queue, 1)
end
tfm.exec.newGame(mapcode)
for player, data in pairs(tfm.get.room.playerList) do
if not playersInGame[player] then
tfm.exec.killPlayer(player)
end
end
tfm.exec.setGameTime(90)
end

function eventPlayerWon(player)
if not isfirst then
isfirst = false
tfm.exec.setGameTime(5)
if table.contains(teams[1], player) then
tfm.exec.setGameTime(5)
for i = 0, 3 do
defaultEffect(9, {13}, math.random(800), math.random(400), 20)
end
points[1] = points[1]+1
elseif table.contains(teams[2], player) then
tfm.exec.setGameTime(5)
for i = 0, 3 do
defaultEffect(9, {9}, math.random(800), math.random(400), 20)
end
points[2] = points[2]+1
else
isfirst = false
end
winner = false
if points[1] >= WINS then
winner = 1
elseif points[2] >= WINS then
winner = 2
end
if winner then
gameRunning = false
winTime = os.time()
local names = {
"Time1",
"Time2"
}
ui.addTextArea(20, string.format("<p align='center'><font size='37' color='#000000'>Time %s venceu!\nparabens!", names[winner]), nil, 0, 171, 800, 500, 0, 0, 0, true)
ui.addTextArea(21, string.format("<p align='center'><font size='37' color='#000000'>Time %s venceu!\nparabens!", names[winner]), nil, 1, 170, 800, 500, 0, 0, 0, true)
ui.addTextArea(22, string.format("<p align='center'><font size='37'><font color='#FFFFFF'>Time <font color='#%s'>%s</font> venceu!\nparabens!", colors[winner], names[winner]), nil, 1, 170, 800, 500, 0, 0, 0, true)
end
displayScore()
end
end

function eventLoop(elapsed, remain)
if gameRunning then
remain = remain/1000
if remain < 0 then
remain = 100
newMap()
end
else
if winTime then
if winTime > os.time()-30000 then
for i = 0, 2 do
defaultEffect(9, {11, 9, 0, 13}, math.random(800), math.random(400), 80)
end
else
winTime = false
ui.removeTextArea(20)
ui.removeTextArea(21)
ui.removeTextArea(22)
displayTeams()
teams = {
[1] = {},
[2] = {},
}
points = {
[1] = 0,
[2] = 0,
}
playersInGame = {}
end
end
end
end

function string.title(s)
return string.gsub(s, "%a", function(c)
return string.upper(c)
end, 1)
end

function eventChatCommand(player, command)
if player:lower() == ADMINISTRADOR:lower() then
args = string.split(command, " ")
if args[1] == "time1" then
table.remove(args, 1)
teams[1] = {}
points[1] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[1], player)
playersInGame[player] = true
end
displayTeams()

elseif args[1] == "time2" then
table.remove(args, 1)
teams[2] = {}
points[2] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[2], player)
playersInGame[player] = true
end
displayTeams()

elseif args[1] == "p" then
if args[2] and args[3] then
local team = tonumber(args[2]:match("team(%d+)") or 0)
if team > 0 and team < 3 then
local newScore = tonumber(args[3]) or points[team]
points[team] = newScore
displayScore()
end
end
elseif args[1] == "np" then
if args[2] then
table.insert(queue, args[2])
end
elseif args[1] == "pause" then
gameRunning = not gameRunning
if not gameRunning then
ui.addTextArea(90, "<p align='center'><font size='25'><R>P A U S E D", nil, 0, 200, 800, nil, 0, 0, 0, true)
tfm.exec.disableAutoTimeLeft(true)
else
ui.removeTextArea(90)
tfm.exec.disableAutoTimeLeft(false)
end
end
end
end

function eventNewGame()
if gameRunning then
isfirst = false
for i, p in pairs(teams[1]) do
tfm.exec.setNameColor(p, "0x"..colors[1])
end
for i, p in pairs(teams[2]) do
tfm.exec.setNameColor(p, "0x"..colors[2])
end
displayScore()
end
end

function displayScore()
ui.addTextArea(17, string.format("<p align='center'><font size='23' color='#000000'>%s x %s", points[1], points[2]), nil, 0, 21, 800, 30, 0, 0, 0, true)
ui.addTextArea(18, string.format("<p align='center'><font size='23' color='#000000'>%s x %s", points[1], points[2]), nil, 1, 20, 800, 30, 0, 0, 0, true)
ui.addTextArea(19, string.format("<p align='center'><font size='23'><font color='#%s'>%s<N> x <font color='#%s'>%s", colors[1], points[1], colors[2], points[2]), nil, 0, 20, 800, 30, 0, 0, 0, true)
end

function displayTeams()
ui.addTextArea(1, "", nil, 199, 69, 400, 260, 0x5A7A8B, 0x5A7A8B, 1, true)
ui.addTextArea(2, "", nil, 201, 71, 400, 260, 0x0E1417, 0x0E1417, 1, true)
ui.addTextArea(3, "", nil, 200, 70, 400, 260, 0x324650, 0x324650, 1, true)
ui.addTextArea(4, "", nil, 209, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
ui.addTextArea(5, "<p align='center'><V>Team 1", nil, 210, 80, 140, 20, 0x324650, 0x324650, 1, true)
ui.addTextArea(6, "", nil, 449, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
ui.addTextArea(7, "<p align='center'><V>Team 2", nil, 450, 80, 140, 20, 0x324650, 0x324650, 1, true)
ui.addTextArea(8, "<p align='center'><font color='#5A7A8B'>|</font>", nil, 210, 102, 140, 200, 0, 0, 0, true)
ui.addTextArea(9, "<p align='center'><font color='#5A7A8B'>|</font>", nil, 450, 102, 140, 200, 0, 0, 0, true)
ui.addTextArea(10, "", nil, 209, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
ui.addTextArea(11, "<p align='center'><font color='#"..colors[1].."'>"..table.concat(teams[1], "\n"), nil, 210, 121, 138, 198, 0x324650, 0x324650, 1, true)
ui.addTextArea(12, "", nil, 451, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
ui.addTextArea(13, "<p align='center'><font color='#"..colors[2].."'>"..table.concat(teams[2], "\n"), nil, 452, 121, 138, 198, 0x324650, 0x324650, 1, true)
ui.addTextArea(14, "<p align='center'><font color='#5A7A8B'>____ ____</font>", nil, 330, 200, 140, 200, 0, 0, 0, true)
ui.addTextArea(15, "", nil, 380, 202, 40, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
ui.addTextArea(16, "<p align='center'><V>VS", nil, 381, 203, 38, 18, 0x324650, 0x324650, 1, true)
ui.addTextArea(16, "<p align='center'><V><a href='event:iniciarJogo'>GO", ADMINISTRADOR, 381, 203, 38, 18, 0x324650, 0x324650, 1, true)
end

function eventTextAreaCallback(id, player, callback)
if callback == 'iniciarJogo' then
if #teams[2] > 0 and #teams[1] > 0 then
gameRunning = true
for i = 1, 16 do
ui.removeTextArea(i)
end
defaultEffect(9, {9}, 400, 212, 80)
newMap()
end
end
end

function string.split(s, pattern, n)
local st = {}
for sb in string.gmatch(s, "[^"..pattern.."]+") do
if not n or n > -1 then
table.insert(st,sb)
else
st[#st] = st[#st]..pattern..sb
end
n = n and n-1 or false
end
return st
end

function table.contains(tableT, element)
for _, value in pairs(tableT) do
if value == element then
return true
end
end
return false
end

defaultEffect=function(id,p,x,y,rand) -- thanks for the function santah
local minDist = 1
local outerBorder = 20
local maxDist = 30
local totalParticles = rand and 40 or (id == -1 and 35 or 75)
for i = 1, totalParticles do
if rand then
id = p[math.random(#p)]
end
local dist = math.min(math.random(minDist, maxDist), outerBorder)
local angle = math.random(0, 360)
local r = math.rad(angle)
local dx = math.cos(r)
local dy = math.sin(r)
local vx = dist * dx / 10
local vy = dist * dy / 10
local ax = -vx / dist / 15
local ay = (-vy / dist / 15) + 0.05
if id == -1 then
tfm.exec.displayParticle(9, x + dx, y + dy, vx, vy, ax, ay, nil)
tfm.exec.displayParticle(1, x + dx, y + dy, vx, vy, ax, ay, nil)
else
tfm.exec.displayParticle(id, x + dx, y + dy, vx, vy, ax, ay, nil)
end
end
end

displayTeams()

function eventPlayerDied(name)
local a = {}

for k, v in next, tfm.get.room.playerList do
if not v.isDead then
a[#a + 1] = k
end
end

local player = (#a == 1 and a[1] or nil)
if player then
tfm.exec.giveCheese(player)
tfm.exec.playerVictory(player)
end
end

Ai se n funciono me fala ae
Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
function eventNewPlayer(name)
tfm.exec.disableAutoShaman(false)
tfm.exec.disableAutoNewGame()
tfm.exec.disableAutoTimeLeft()
tfm.exec.disableAllShamanSkills(true)
end
tfm.exec.disableAutoShaman(false)
tfm.exec.disableAutoNewGame()
tfm.exec.disableAutoTimeLeft()
tfm.exec.disableAllShamanSkills(true)

local ADMINISTRADOR = "Gabriel#8201" -- CHANGE TO YOUR NICKNAME, SO YOU WILL BE GAME ADMIN
local WINS = 10 -- POINTS TO WIN THE GAME
system.disableChatCommandDisplay("np", true)
system.disableChatCommandDisplay("pause", true)

--[[
After running the script, use the command !time1 jogadores and !time2 jogadores to set both players in the specified team
Then you just need to press GO!
Type !np @mapcode to run the next map.
Type !p team1/team2 number to change its score.
Type !pause to pause/unpause the game.
]]

local teams = {
[1] = {},
[2] = {},
}
local points = {
[1] = 0,
[2] = 0,
}
local isfirst = false
local gameRunning = false
local winTime = false
local playersInGame = {}
local maps = {3107377,495880,305748,1539148,390649,495880,1463332,1492805,292678,305753,1545834,3175437,2964900,1812056,852617,799141,1794907,2939549,495880,1519483,1794873,811211,306360,489829,479091,290546,311496,802958}
local colors = {
[1] = "ff6347",
[2] = "19b5fe"
}
local queue = {}

function newMap()
local mapcode = maps[math.random(#maps)]
if #queue > 0 then
mapcode = queue[1]
table.remove(queue, 1)
end
tfm.exec.newGame(mapcode)
for player, data in pairs(tfm.get.room.playerList) do
if not playersInGame[player] then
tfm.exec.killPlayer(player)
end
end
tfm.exec.setGameTime(90)
end

function eventPlayerWon(player)
if not isfirst then
isfirst = false
tfm.exec.setGameTime(5)
if table.contains(teams[1], player) then
tfm.exec.setGameTime(5)
for i = 0, 3 do
defaultEffect(9, {13}, math.random(800), math.random(400), 20)
end
points[1] = points[1]+1
elseif table.contains(teams[2], player) then
tfm.exec.setGameTime(5)
for i = 0, 3 do
defaultEffect(9, {9}, math.random(800), math.random(400), 20)
end
points[2] = points[2]+1
else
isfirst = false
end
winner = false
if points[1] >= WINS then
winner = 1
elseif points[2] >= WINS then
winner = 2
end
if winner then
gameRunning = false
winTime = os.time()
local names = {
"Time1",
"Time2"
}
ui.addTextArea(20, string.format("<p align='center'><font size='37' color='#000000'>Time %s venceu!\nparabens!", names[winner]), nil, 0, 171, 800, 500, 0, 0, 0, true)
ui.addTextArea(21, string.format("<p align='center'><font size='37' color='#000000'>Time %s venceu!\nparabens!", names[winner]), nil, 1, 170, 800, 500, 0, 0, 0, true)
ui.addTextArea(22, string.format("<p align='center'><font size='37'><font color='#FFFFFF'>Time <font color='#%s'>%s</font> venceu!\nparabens!", colors[winner], names[winner]), nil, 1, 170, 800, 500, 0, 0, 0, true)
end
displayScore()
end
end

function eventLoop(elapsed, remain)
if gameRunning then
remain = remain/1000
if remain < 0 then
remain = 100
newMap()
end
else
if winTime then
if winTime > os.time()-30000 then
for i = 0, 2 do
defaultEffect(9, {11, 9, 0, 13}, math.random(800), math.random(400), 80)
end
else
winTime = false
ui.removeTextArea(20)
ui.removeTextArea(21)
ui.removeTextArea(22)
displayTeams()
teams = {
[1] = {},
[2] = {},
}
points = {
[1] = 0,
[2] = 0,
}
playersInGame = {}
end
end
end
end

function string.title(s)
return string.gsub(s, "%a", function(c)
return string.upper(c)
end, 1)
end

function eventChatCommand(player, command)
if player:lower() == ADMINISTRADOR:lower() then
args = string.split(command, " ")
if args[1] == "time1" then
table.remove(args, 1)
teams[1] = {}
points[1] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[1], player)
playersInGame[player] = true
end
displayTeams()

elseif args[1] == "time2" then
table.remove(args, 1)
teams[2] = {}
points[2] = 0
for index, player in pairs(args) do
player = string.title(player)
table.insert(teams[2], player)
playersInGame[player] = true
end
displayTeams()

elseif args[1] == "p" then
if args[2] and args[3] then
local team = tonumber(args[2]:match("team(%d+)") or 0)
if team > 0 and team < 3 then
local newScore = tonumber(args[3]) or points[team]
points[team] = newScore
displayScore()
end
end
elseif args[1] == "np" then
if args[2] then
table.insert(queue, args[2])
end
elseif args[1] == "pause" then
gameRunning = not gameRunning
if not gameRunning then
ui.addTextArea(90, "<p align='center'><font size='25'><R>P A U S E D", nil, 0, 200, 800, nil, 0, 0, 0, true)
tfm.exec.disableAutoTimeLeft(true)
else
ui.removeTextArea(90)
tfm.exec.disableAutoTimeLeft(false)
end
end
end
end

function eventNewGame()
if gameRunning then
isfirst = false
for i, p in pairs(teams[1]) do
tfm.exec.setNameColor(p, "0x"..colors[1])
end
for i, p in pairs(teams[2]) do
tfm.exec.setNameColor(p, "0x"..colors[2])
end
displayScore()
end
end

function displayScore()
ui.addTextArea(17, string.format("<p align='center'><font size='23' color='#000000'>%s x %s", points[1], points[2]), nil, 0, 21, 800, 30, 0, 0, 0, true)
ui.addTextArea(18, string.format("<p align='center'><font size='23' color='#000000'>%s x %s", points[1], points[2]), nil, 1, 20, 800, 30, 0, 0, 0, true)
ui.addTextArea(19, string.format("<p align='center'><font size='23'><font color='#%s'>%s<N> x <font color='#%s'>%s", colors[1], points[1], colors[2], points[2]), nil, 0, 20, 800, 30, 0, 0, 0, true)
end

function displayTeams()
ui.addTextArea(1, "", nil, 199, 69, 400, 260, 0x5A7A8B, 0x5A7A8B, 1, true)
ui.addTextArea(2, "", nil, 201, 71, 400, 260, 0x0E1417, 0x0E1417, 1, true)
ui.addTextArea(3, "", nil, 200, 70, 400, 260, 0x324650, 0x324650, 1, true)
ui.addTextArea(4, "", nil, 209, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
ui.addTextArea(5, "<p align='center'><V>Team 1", nil, 210, 80, 140, 20, 0x324650, 0x324650, 1, true)
ui.addTextArea(6, "", nil, 449, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
ui.addTextArea(7, "<p align='center'><V>Team 2", nil, 450, 80, 140, 20, 0x324650, 0x324650, 1, true)
ui.addTextArea(8, "<p align='center'><font color='#5A7A8B'>|</font>", nil, 210, 102, 140, 200, 0, 0, 0, true)
ui.addTextArea(9, "<p align='center'><font color='#5A7A8B'>|</font>", nil, 450, 102, 140, 200, 0, 0, 0, true)
ui.addTextArea(10, "", nil, 209, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
ui.addTextArea(11, "<p align='center'><font color='#"..colors[1].."'>"..table.concat(teams[1], "\n"), nil, 210, 121, 138, 198, 0x324650, 0x324650, 1, true)
ui.addTextArea(12, "", nil, 451, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
ui.addTextArea(13, "<p align='center'><font color='#"..colors[2].."'>"..table.concat(teams[2], "\n"), nil, 452, 121, 138, 198, 0x324650, 0x324650, 1, true)
ui.addTextArea(14, "<p align='center'><font color='#5A7A8B'>____ ____</font>", nil, 330, 200, 140, 200, 0, 0, 0, true)
ui.addTextArea(15, "", nil, 380, 202, 40, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
ui.addTextArea(16, "<p align='center'><V>VS", nil, 381, 203, 38, 18, 0x324650, 0x324650, 1, true)
ui.addTextArea(16, "<p align='center'><V><a href='event:iniciarJogo'>GO", ADMINISTRADOR, 381, 203, 38, 18, 0x324650, 0x324650, 1, true)
end

function eventTextAreaCallback(id, player, callback)
if callback == 'iniciarJogo' then
if #teams[2] > 0 and #teams[1] > 0 then
gameRunning = true
for i = 1, 16 do
ui.removeTextArea(i)
end
defaultEffect(9, {9}, 400, 212, 80)
newMap()
end
end
end

function string.split(s, pattern, n)
local st = {}
for sb in string.gmatch(s, "[^"..pattern.."]+") do
if not n or n > -1 then
table.insert(st,sb)
else
st[#st] = st[#st]..pattern..sb
end
n = n and n-1 or false
end
return st
end

function table.contains(tableT, element)
for _, value in pairs(tableT) do
if value == element then
return true
end
end
return false
end

defaultEffect=function(id,p,x,y,rand) -- thanks for the function santah
local minDist = 1
local outerBorder = 20
local maxDist = 30
local totalParticles = rand and 40 or (id == -1 and 35 or 75)
for i = 1, totalParticles do
if rand then
id = p[math.random(#p)]
end
local dist = math.min(math.random(minDist, maxDist), outerBorder)
local angle = math.random(0, 360)
local r = math.rad(angle)
local dx = math.cos(r)
local dy = math.sin(r)
local vx = dist * dx / 10
local vy = dist * dy / 10
local ax = -vx / dist / 15
local ay = (-vy / dist / 15) + 0.05
if id == -1 then
tfm.exec.displayParticle(9, x + dx, y + dy, vx, vy, ax, ay, nil)
tfm.exec.displayParticle(1, x + dx, y + dy, vx, vy, ax, ay, nil)
else
tfm.exec.displayParticle(id, x + dx, y + dy, vx, vy, ax, ay, nil)
end
end
end

displayTeams()

function eventPlayerDied(name)
local a = {}

for k, v in next, tfm.get.room.playerList do
if not v.isDead then
a[#a + 1] = k
end
end

local player = (#a == 1 and a[1] or nil)
if player then
tfm.exec.giveCheese(player)
tfm.exec.playerVictory(player)
end
end

Dernière modification le 1634255160000
Queenwalk
« Citoyen »
1634259960000
    • Queenwalk#8557
    • Profil
    • Derniers messages
    • Tribu
#93
  0
FUNCIONOOOOOOOOOOOOOO MDS NAO ACREDITO VOCE E MUITO BOM OBG PARABENS GABRIEL ,TO OLHANDO AKI VOCE ARRUMOU ATE OQ EU NAO TINHA PEDIDO OBG*_*s2
QUEM QUIZER JOGAR PESSOAL O SCRIPT ESTA AI FUNCIONANDO DA PRA TIRAR X1 SURVIVOR E DA PRA TIRAR PVP DE
TIME WAR
Gabriel
« Citoyen »
1634325480000
    • Gabriel#8201
    • Profil
    • Derniers messages
    • Tribu
#94
  0
Queenwalk a dit :
FUNCIONOOOOOOOOOOOOOO MDS NAO ACREDITO VOCE E MUITO BOM OBG PARABENS GABRIEL ,TO OLHANDO AKI VOCE ARRUMOU ATE OQ EU NAO TINHA PEDIDO OBG*_*s2
QUEM QUIZER JOGAR PESSOAL O SCRIPT ESTA AI FUNCIONANDO DA PRA TIRAR X1 SURVIVOR E DA PRA TIRAR PVP DE
TIME WAR

Obrigado S2 qual quer erro no script ou algo do tipo pode me fala ok.
Gabriel
« Citoyen »
1634398740000
    • Gabriel#8201
    • Profil
    • Derniers messages
    • Tribu
#95
  0
Queenwalk a dit :
Ola gostaria de um script que quando sobra o shaman quando termina o tempo e mais 1 rato o shaman morre

Tentei fazer para você ai :)
O poblema é que você vai ter que seleciona o shaman manualmente colocando em shaman = "nick" no script
Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-- Cabeça do script

tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoScore(true)
tfm.exec.disableMinimalistMode(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)

-- Corpo do script

local shaman = "Gabriel#8201" -- Nick da pessoa que vai ser shaman
local shaman2 = "Gabriel#8201" -- Nick do shaman 2, OBS: CASO QUEIRA 2 SHAMAN
time = 150 -- Tempo inicial pode ser alterado para qual quer valor

function eventLoop()
ui.setMapName('<VP> Time: <ROSE>'..time..'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t')
print(time)
if time > 1 then
time = time -1 -- Para o tempo abaixa
if time == 1 then
tfm.exec.killPlayer(shaman) -- Para o shaman morre
tfm.exec.killPlayer(shaman2) -- Para o shaman2 morre
time = 150 -- Reinicia o tempo
end
end
end

tfm.exec.newGame(math.random(1,100)) -- Pode ser removido
function eventNewGame()
tfm.exec.setShaman(shaman) -- Não mecha O-O
tfm.exec.setShaman(shaman2) -- Não mecha O-O
end

Dernière modification le 1634399160000
Opaitaon
« Citoyen »
1636051920000
    • Opaitaon#7979
    • Profil
    • Derniers messages
    • Tribu
#96
  0
Olá, como faço para que na partida não possua nenhum shamam. Obrigado!
Bolodefchoco
« Sénateur »
1636065660000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#97
  0
Opaitaon a dit :
Olá, como faço para que na partida não possua nenhum shamam. Obrigado!

tfm.exec.disableAutoShaman()
Tazq
« Citoyen »
1640525640000
    • Tazq#1342
    • Profil
    • Derniers messages
    • Tribu
#98
  0
por acaso vocês tem como recriar o script daquele jogo que tinha antigamente chamado baffbotballon agradeço desde ja.
Arthur107
« Consul »
1642385820000
    • Arthur107#1925
    • Profil
    • Derniers messages
    • Tribu
#99
  0
Lua
Code Lua

1
2
3
4
5
6
7
8
function  eventMouse(Name, posicaoX, posicaoY) 
if Name == system.bindMouse(Name, true)
then
tfm.exec.movePlayer(name, posicaoX, posicaoY, false, 0, 0, false)


end
end

Eu queria cria um quase script.
Quando eu clico com o mouse O rato teleporta.

Dernière modification le 1642386000000
Mkazim14
« Citoyen »
1642985520000
    • Mkazim14#0991
    • Profil
    • Derniers messages
    • Tribu
#100
  0
eu quero um script tipo da mycity mas com essas auteraçoes

a cidade ser muito diferente nao ter banco mais uma mina que fica fechada de noite e de dia abertade dia da pra trabalhar nela de noite nao a fazenda e onde voce nasse e o fazendeiro se chama clarck e o mineiro se chamar tody e voce poder guardar cuantos itens quiser e as coisas sejao mais baratas
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Lua] Peça scripts aqui!
« ‹ 5 / 9 › »
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27