×

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
  • /
  • Archives
  • /
  • Seção Editor de Mapas e Modules
  • /
  • [Lua] Peça scripts aqui!
« ‹ 43 / 133 › »
[Lua] Peça scripts aqui!
Bolodefchoco
« Sénateur »
1521867300000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#841
  0
Nenhum dos códigos abaixo foram testados. Desculpe se não funcionar.

Laylaaaaaaaahhh a dit :
eu quero um script que eu aperte espaço e solte bola de praia

Code Lua

1
2
3
4
5
6
7
8
9
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(6, x + (dir * 20), y - 20, 0, (dir * 20))
end


Cremosinha a dit :
Bolodefchoco como faço um script para o ratos obdecerem todos os comandos das emoçoes obg.

Um que você faz a emoção e todos fazem tbm?
Code Lua

1
2
3
4
5
eventEmotePlayed = function(n, i)
if n == "Cremosinha#9255" then
tfm.exec.playEmote(nil, i)
end
end


Escanor a dit :
script para fazer o rato de outra pessoa dar 2 pulos apertando espaço

Code Lua

1
2
3
4
5
6
7
8
9
10
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
if tfm.get.room.playerList[n].vy == 0 then
tfm.exec.movePlayer(n, 0, 0, false, 0, -30)
end
end


Juniorkener a dit :
Eu queria um script que quando voce aperta R Sai uma bola de neve (com efeito de empurrar)

Code Lua

1
2
3
4
5
6
7
8
9
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(34, x + (dir * 20), y - 20, 0, (dir * 20))
end


Joaopsan a dit :
Um Script no qual os jogadores digitassem !Crystal + Número e fosse teleportado pra um lugar, "Sem Morrer".
Exemplo : !Crystal 1
fosse teleportado para 100,200
!Crystal 2
fosse teleportado para 1500,250
!Crystal 3
... e assim por diante.
Obrigado. ^-^

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
local posicao = {
{100, 200},
{1500, 250}
}

eventChatCommand = function(n, c)
local int = c:match("Crystal (%d+)")
if tonumber(int) then
int = tonumber(int)
if posicao[int] then
tfm.exec.movePlayer(n, posicao[int][1], posicao[int][2])
end
end
end


Shianinja a dit :
quero um script q duas pessoa aleatoria 2 por partida possa controlar 2 ynhan cats q as 2 possam controlar individualmente cada

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
local teclas = {0, 3, 2, 1}

nyan = function()
return tfm.exec.addShamanObject(212, math.random(800), 100)
end

local jogadores = {}
eventNewGame = function()
jogadores = {}

local p = {}
for k, v in next, tfm.get.room.playerList do
p[#p + 1] = k
p[k] = true
tfm.exec.killPlayer(k)
end

for i = 1, 2 do
local player
repeat
player = p[math.random(#p)]
until player and not jogadores[player]
jogadores[player] = nyan()

for i, tecla in next, teclas do
system.bindKeyboard(player, tecla, true, true)
end
end
end


eventKeyboard = function(n, key)
if jogadores[n] then
for i, tecla in next, teclas do
if key == tecla then
i = ((i - 1) % 3 == 0) and -i or i
tfm.exec.moveObject(jogadores[n], 0, 0, false, math.fmod(i, 2) * 50, math.fmod(i + 1, 2) * 50)
break
end
end
end
end

tfm.exec.disableAutoNewGame()
tfm.exec.newGame(0)


Juniorkener a dit :
Queria um script que voce virasse um fantasma e em quem voce tocasse ele iria morrer obs: o fantasma tem que ser invisivel

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
tfm.exec.newGame("#11")

local hasGhost = false
eventNewGame = function()
hasGhost = false
end

eventPlayerVampire = function(n)
if hasGhost then
tfm.exec.killPlayer(n)
else
hasGhost = true
tfm.exec.addImage("", "%" .. n) -- pelo menos fica invisível :v
end
end


Rataraiii a dit :
Sabendo que aqui e pra pedir script, to perguntando uma coisa......
Como faz para tirar o Text area por segundos?

Code Lua

1
2
3
4
5
6
7
8
9
10
local SEGUNDOS = 5
ui.addTextArea(0, "Vai desaparecer em " .. SEGUNDOS .. "s")

local tempo = 0
eventLoop = function()
tempo = tempo + .5
if tempo % SEGUNDOS == 0 then
ui.removeTextArea(0, nil)
end
end

Dernière modification le 1521867420000
Rataraiii
« Citoyen »
1521907980000
    • Rataraiii#0000
    • Profil
    • Derniers messages
#842
  0
Bolodefchoco a dit :
Nenhum dos códigos abaixo foram testados. Desculpe se não funcionar.

Laylaaaaaaaahhh a dit :
eu quero um script que eu aperte espaço e solte bola de praia

Code Lua

1
2
3
4
5
6
7
8
9
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(6, x + (dir * 20), y - 20, 0, (dir * 20))
end


Cremosinha a dit :
Bolodefchoco como faço um script para o ratos obdecerem todos os comandos das emoçoes obg.

Um que você faz a emoção e todos fazem tbm?
Code Lua

1
2
3
4
5
eventEmotePlayed = function(n, i)
if n == "Cremosinha#9255" then
tfm.exec.playEmote(nil, i)
end
end


Escanor a dit :
script para fazer o rato de outra pessoa dar 2 pulos apertando espaço

Code Lua

1
2
3
4
5
6
7
8
9
10
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
if tfm.get.room.playerList[n].vy == 0 then
tfm.exec.movePlayer(n, 0, 0, false, 0, -30)
end
end


Juniorkener a dit :
Eu queria um script que quando voce aperta R Sai uma bola de neve (com efeito de empurrar)

Code Lua

1
2
3
4
5
6
7
8
9
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(34, x + (dir * 20), y - 20, 0, (dir * 20))
end


Joaopsan a dit :
Um Script no qual os jogadores digitassem !Crystal + Número e fosse teleportado pra um lugar, "Sem Morrer".
Exemplo : !Crystal 1
fosse teleportado para 100,200
!Crystal 2
fosse teleportado para 1500,250
!Crystal 3
... e assim por diante.
Obrigado. ^-^

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
local posicao = {
{100, 200},
{1500, 250}
}

eventChatCommand = function(n, c)
local int = c:match("Crystal (%d+)")
if tonumber(int) then
int = tonumber(int)
if posicao[int] then
tfm.exec.movePlayer(n, posicao[int][1], posicao[int][2])
end
end
end


Shianinja a dit :
quero um script q duas pessoa aleatoria 2 por partida possa controlar 2 ynhan cats q as 2 possam controlar individualmente cada

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
local teclas = {0, 3, 2, 1}

nyan = function()
return tfm.exec.addShamanObject(212, math.random(800), 100)
end

local jogadores = {}
eventNewGame = function()
jogadores = {}

local p = {}
for k, v in next, tfm.get.room.playerList do
p[#p + 1] = k
p[k] = true
tfm.exec.killPlayer(k)
end

for i = 1, 2 do
local player
repeat
player = p[math.random(#p)]
until player and not jogadores[player]
jogadores[player] = nyan()

for i, tecla in next, teclas do
system.bindKeyboard(player, tecla, true, true)
end
end
end


eventKeyboard = function(n, key)
if jogadores[n] then
for i, tecla in next, teclas do
if key == tecla then
i = ((i - 1) % 3 == 0) and -i or i
tfm.exec.moveObject(jogadores[n], 0, 0, false, math.fmod(i, 2) * 50, math.fmod(i + 1, 2) * 50)
break
end
end
end
end

tfm.exec.disableAutoNewGame()
tfm.exec.newGame(0)


Juniorkener a dit :
Queria um script que voce virasse um fantasma e em quem voce tocasse ele iria morrer obs: o fantasma tem que ser invisivel

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
tfm.exec.newGame("#11")

local hasGhost = false
eventNewGame = function()
hasGhost = false
end

eventPlayerVampire = function(n)
if hasGhost then
tfm.exec.killPlayer(n)
else
hasGhost = true
tfm.exec.addImage("", "%" .. n) -- pelo menos fica invisível :v
end
end


Rataraiii a dit :
Sabendo que aqui e pra pedir script, to perguntando uma coisa......
Como faz para tirar o Text area por segundos?

Code Lua

1
2
3
4
5
6
7
8
9
10
local SEGUNDOS = 5
ui.addTextArea(0, "Vai desaparecer em " .. SEGUNDOS .. "s")

local tempo = 0
eventLoop = function()
tempo = tempo + .5
if tempo % SEGUNDOS == 0 then
ui.removeTextArea(0, nil)
end
end

mui obrigada tio
Joaopsan
« Citoyen »
1521910560000
    • Joaopsan#0000
    • Profil
    • Derniers messages
    • Tribu
#843
  0
Bolodefchoco a dit :
Nenhum dos códigos abaixo foram testados. Desculpe se não funcionar.

Laylaaaaaaaahhh a dit :
eu quero um script que eu aperte espaço e solte bola de praia

Code Lua

1
2
3
4
5
6
7
8
9
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(6, x + (dir * 20), y - 20, 0, (dir * 20))
end


Cremosinha a dit :
Bolodefchoco como faço um script para o ratos obdecerem todos os comandos das emoçoes obg.

Um que você faz a emoção e todos fazem tbm?
Code Lua

1
2
3
4
5
eventEmotePlayed = function(n, i)
if n == "Cremosinha#9255" then
tfm.exec.playEmote(nil, i)
end
end


Escanor a dit :
script para fazer o rato de outra pessoa dar 2 pulos apertando espaço

Code Lua

1
2
3
4
5
6
7
8
9
10
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
if tfm.get.room.playerList[n].vy == 0 then
tfm.exec.movePlayer(n, 0, 0, false, 0, -30)
end
end


Juniorkener a dit :
Eu queria um script que quando voce aperta R Sai uma bola de neve (com efeito de empurrar)

Code Lua

1
2
3
4
5
6
7
8
9
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(34, x + (dir * 20), y - 20, 0, (dir * 20))
end


Joaopsan a dit :
Um Script no qual os jogadores digitassem !Crystal + Número e fosse teleportado pra um lugar, "Sem Morrer".
Exemplo : !Crystal 1
fosse teleportado para 100,200
!Crystal 2
fosse teleportado para 1500,250
!Crystal 3
... e assim por diante.
Obrigado. ^-^

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
local posicao = {
{100, 200},
{1500, 250}
}

eventChatCommand = function(n, c)
local int = c:match("Crystal (%d+)")
if tonumber(int) then
int = tonumber(int)
if posicao[int] then
tfm.exec.movePlayer(n, posicao[int][1], posicao[int][2])
end
end
end


Shianinja a dit :
quero um script q duas pessoa aleatoria 2 por partida possa controlar 2 ynhan cats q as 2 possam controlar individualmente cada

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
local teclas = {0, 3, 2, 1}

nyan = function()
return tfm.exec.addShamanObject(212, math.random(800), 100)
end

local jogadores = {}
eventNewGame = function()
jogadores = {}

local p = {}
for k, v in next, tfm.get.room.playerList do
p[#p + 1] = k
p[k] = true
tfm.exec.killPlayer(k)
end

for i = 1, 2 do
local player
repeat
player = p[math.random(#p)]
until player and not jogadores[player]
jogadores[player] = nyan()

for i, tecla in next, teclas do
system.bindKeyboard(player, tecla, true, true)
end
end
end


eventKeyboard = function(n, key)
if jogadores[n] then
for i, tecla in next, teclas do
if key == tecla then
i = ((i - 1) % 3 == 0) and -i or i
tfm.exec.moveObject(jogadores[n], 0, 0, false, math.fmod(i, 2) * 50, math.fmod(i + 1, 2) * 50)
break
end
end
end
end

tfm.exec.disableAutoNewGame()
tfm.exec.newGame(0)


Juniorkener a dit :
Queria um script que voce virasse um fantasma e em quem voce tocasse ele iria morrer obs: o fantasma tem que ser invisivel

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
tfm.exec.newGame("#11")

local hasGhost = false
eventNewGame = function()
hasGhost = false
end

eventPlayerVampire = function(n)
if hasGhost then
tfm.exec.killPlayer(n)
else
hasGhost = true
tfm.exec.addImage("", "%" .. n) -- pelo menos fica invisível :v
end
end


Rataraiii a dit :
Sabendo que aqui e pra pedir script, to perguntando uma coisa......
Como faz para tirar o Text area por segundos?

Code Lua

1
2
3
4
5
6
7
8
9
10
local SEGUNDOS = 5
ui.addTextArea(0, "Vai desaparecer em " .. SEGUNDOS .. "s")

local tempo = 0
eventLoop = function()
tempo = tempo + .5
if tempo % SEGUNDOS == 0 then
ui.removeTextArea(0, nil)
end
end



Obrigadão <3
Rataraiii
« Citoyen »
1521911040000
    • Rataraiii#0000
    • Profil
    • Derniers messages
#844
  0
Outro pedido
O ultimo por hoje ;-
Alguem concerta esse script que to fazendo, fica toda hora recomeçando o mapa, e teria como alguem colocar igual Traitor, EX: Você e o ladrão de queijo, mate todos os inocentes para ganhar.
Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
local SEGUNDOS = 5
ui.addTextArea(0, "ALGUEM ROUBOU O PUDIM DA TRIBO, PROCURE O LADRÃO E MATE-O! " .. SEGUNDOS .. "s")

local tempo = 0
eventLoop = function()
tempo = tempo + .5
if tempo % SEGUNDOS == 0 then
ui.removeTextArea(0, nil)
end

tfm.exec.newGame('<C><P F="0" /><Z><S><S L="99" H="10" X="814" Y="346" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" X="172" H="10" Y="334" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" H="10" X="334" Y="173" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" H="10" X="399" Y="305" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" X="580" H="10" Y="222" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" X="97" H="10" Y="131" T="1" P="0,0,0,0.2,0,0,0,0" /></S><D><DS Y="130" X="328" /></D><O /></Z></C>')

table.foreach(tfm.get.room.playerList,tfm.exec.giveMeep)
end

Eun coloco os creditos depois ;-
Amethista1
« Citoyen »
1521913980000
    • Amethista1#0000
    • Profil
    • Derniers messages
    • Tribu
#845
  0
Rataraiii a dit :
Outro pedido
O ultimo por hoje ;-
Alguem concerta esse script que to fazendo, fica toda hora recomeçando o mapa, e teria como alguem colocar igual Traitor, EX: Você e o ladrão de queijo, mate todos os inocentes para ganhar.
Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
local SEGUNDOS = 5
ui.addTextArea(0, "ALGUEM ROUBOU O PUDIM DA TRIBO, PROCURE O LADRÃO E MATE-O! " .. SEGUNDOS .. "s")

local tempo = 0
eventLoop = function()
tempo = tempo + .5
if tempo % SEGUNDOS == 0 then
ui.removeTextArea(0, nil)
end

tfm.exec.newGame('<C><P F="0" /><Z><S><S L="99" H="10" X="814" Y="346" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" X="172" H="10" Y="334" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" H="10" X="334" Y="173" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" H="10" X="399" Y="305" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" X="580" H="10" Y="222" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" X="97" H="10" Y="131" T="1" P="0,0,0,0.2,0,0,0,0" /></S><D><DS Y="130" X="328" /></D><O /></Z></C>')

table.foreach(tfm.get.room.playerList,tfm.exec.giveMeep)
end

Eun coloco os creditos depois ;-

Obs: Inocentes tem que matar o ladrão
Sartori
« Citoyen »
1521914100000
    • Sartori#2723
    • Profil
    • Derniers messages
#846
  0
Tem como fazer algum script que deixe agente escolher nossos times no module football? E é possivel fazer a tempo da Copa 2018?

Obs: Na tribo obviamente rsrs

Dernière modification le 1521914160000
Shianinja
« Citoyen »
1521917160000
    • Shianinja#2005
    • Profil
    • Derniers messages
    • Tribu
#847
  0
quero um script q a pessoa tenha 2 opcoes escrever !verde solta particulas verdes !coracoes solta coracao !bolha solta particulas de bolha
e !remove para remover as particulas se n tiver como remover faz sem remover

Dernière modification le 1521917940000
Shianinja
« Citoyen »
1521917520000
    • Shianinja#2005
    • Profil
    • Derniers messages
    • Tribu
#848
  0
Bolodefchoco a dit :
Nenhum dos códigos abaixo foram testados. Desculpe se não funcionar.

Laylaaaaaaaahhh a dit :
eu quero um script que eu aperte espaço e solte bola de praia

Code Lua

1
2
3
4
5
6
7
8
9
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(6, x + (dir * 20), y - 20, 0, (dir * 20))
end


Cremosinha a dit :
Bolodefchoco como faço um script para o ratos obdecerem todos os comandos das emoçoes obg.

Um que você faz a emoção e todos fazem tbm?
Code Lua

1
2
3
4
5
eventEmotePlayed = function(n, i)
if n == "Cremosinha#9255" then
tfm.exec.playEmote(nil, i)
end
end


Escanor a dit :
script para fazer o rato de outra pessoa dar 2 pulos apertando espaço

Code Lua

1
2
3
4
5
6
7
8
9
10
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
if tfm.get.room.playerList[n].vy == 0 then
tfm.exec.movePlayer(n, 0, 0, false, 0, -30)
end
end


Juniorkener a dit :
Eu queria um script que quando voce aperta R Sai uma bola de neve (com efeito de empurrar)

Code Lua

1
2
3
4
5
6
7
8
9
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(34, x + (dir * 20), y - 20, 0, (dir * 20))
end


Joaopsan a dit :
Um Script no qual os jogadores digitassem !Crystal + Número e fosse teleportado pra um lugar, "Sem Morrer".
Exemplo : !Crystal 1
fosse teleportado para 100,200
!Crystal 2
fosse teleportado para 1500,250
!Crystal 3
... e assim por diante.
Obrigado. ^-^

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
local posicao = {
{100, 200},
{1500, 250}
}

eventChatCommand = function(n, c)
local int = c:match("Crystal (%d+)")
if tonumber(int) then
int = tonumber(int)
if posicao[int] then
tfm.exec.movePlayer(n, posicao[int][1], posicao[int][2])
end
end
end


Shianinja a dit :
quero um script q duas pessoa aleatoria 2 por partida possa controlar 2 ynhan cats q as 2 possam controlar individualmente cada

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
local teclas = {0, 3, 2, 1}

nyan = function()
return tfm.exec.addShamanObject(212, math.random(800), 100)
end

local jogadores = {}
eventNewGame = function()
jogadores = {}

local p = {}
for k, v in next, tfm.get.room.playerList do
p[#p + 1] = k
p[k] = true
tfm.exec.killPlayer(k)
end

for i = 1, 2 do
local player
repeat
player = p[math.random(#p)]
until player and not jogadores[player]
jogadores[player] = nyan()

for i, tecla in next, teclas do
system.bindKeyboard(player, tecla, true, true)
end
end
end


eventKeyboard = function(n, key)
if jogadores[n] then
for i, tecla in next, teclas do
if key == tecla then
i = ((i - 1) % 3 == 0) and -i or i
tfm.exec.moveObject(jogadores[n], 0, 0, false, math.fmod(i, 2) * 50, math.fmod(i + 1, 2) * 50)
break
end
end
end
end

tfm.exec.disableAutoNewGame()
tfm.exec.newGame(0)


Juniorkener a dit :
Queria um script que voce virasse um fantasma e em quem voce tocasse ele iria morrer obs: o fantasma tem que ser invisivel

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
tfm.exec.newGame("#11")

local hasGhost = false
eventNewGame = function()
hasGhost = false
end

eventPlayerVampire = function(n)
if hasGhost then
tfm.exec.killPlayer(n)
else
hasGhost = true
tfm.exec.addImage("", "%" .. n) -- pelo menos fica invisível :v
end
end


Rataraiii a dit :
Sabendo que aqui e pra pedir script, to perguntando uma coisa......
Como faz para tirar o Text area por segundos?

Code Lua

1
2
3
4
5
6
7
8
9
10
local SEGUNDOS = 5
ui.addTextArea(0, "Vai desaparecer em " .. SEGUNDOS .. "s")

local tempo = 0
eventLoop = function()
tempo = tempo + .5
if tempo % SEGUNDOS == 0 then
ui.removeTextArea(0, nil)
end
end

obrigado apesar de n ter funfado mais obrigado msm ass • [15:49] # [*FamilyZouyen'] Runtime Error : org.luaj.vm2.LuaError: Shianinja#2005.lua:21: Lua destroyed : Runtime can't exceed 40 ms in 4 seconds. /deu isso

Dernière modification le 1521917640000
Bolodefchoco
« Sénateur »
1521920700000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#849
  0
Rataraiii a dit :
Outro pedido

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local SEGUNDOS = 5
ui.addTextArea(0, "ALGUEM ROUBOU O PUDIM DA TRIBO, PROCURE O LADRÃO E MATE-O! ")

local tempo = 0
eventLoop = function()
tempo = tempo + .5
if tempo % SEGUNDOS == 0 then
ui.removeTextArea(0, nil)
end
end

tfm.exec.newGame('<C><P F="0" /><Z><S><S L="99" H="10" X="814" Y="346" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" X="172" H="10" Y="334" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" H="10" X="334" Y="173" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" H="10" X="399" Y="305" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" X="580" H="10" Y="222" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" X="97" H="10" Y="131" T="1" P="0,0,0,0.2,0,0,0,0" /></S><D><DS Y="130" X="328" /></D><O /></Z></C>')

eventNewGame = function()
tfm.exec.chatMessage('Você e o ladrão de queijo, mate todos os inocentes para ganhar.')
tempo = 0
ui.addTextArea(0, "ALGUEM ROUBOU O PUDIM DA TRIBO, PROCURE O LADRÃO E MATE-O! ")
table.foreach(tfm.get.room.playerList,tfm.exec.giveMeep)
end


Unilehh a dit :
Tem como fazer algum script que deixe agente escolher nossos times no module football? E é possivel fazer a tempo da Copa 2018?

Obs: Na tribo obviamente rsrs

n dá pra usar script em módulos que estão rodando :/


Shianinja a dit :
Bolodefchoco a dit :
Nenhum dos códigos abaixo foram testados. Desculpe se não funcionar.

Laylaaaaaaaahhh a dit :
eu quero um script que eu aperte espaço e solte bola de praia

Code Lua

1
2
3
4
5
6
7
8
9
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(6, x + (dir * 20), y - 20, 0, (dir * 20))
end


Cremosinha a dit :
Bolodefchoco como faço um script para o ratos obdecerem todos os comandos das emoçoes obg.

Um que você faz a emoção e todos fazem tbm?
Code Lua

1
2
3
4
5
eventEmotePlayed = function(n, i)
if n == "Cremosinha#9255" then
tfm.exec.playEmote(nil, i)
end
end


Escanor a dit :
script para fazer o rato de outra pessoa dar 2 pulos apertando espaço

Code Lua

1
2
3
4
5
6
7
8
9
10
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
if tfm.get.room.playerList[n].vy == 0 then
tfm.exec.movePlayer(n, 0, 0, false, 0, -30)
end
end


Juniorkener a dit :
Eu queria um script que quando voce aperta R Sai uma bola de neve (com efeito de empurrar)

Code Lua

1
2
3
4
5
6
7
8
9
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(34, x + (dir * 20), y - 20, 0, (dir * 20))
end


Joaopsan a dit :
Um Script no qual os jogadores digitassem !Crystal + Número e fosse teleportado pra um lugar, "Sem Morrer".
Exemplo : !Crystal 1
fosse teleportado para 100,200
!Crystal 2
fosse teleportado para 1500,250
!Crystal 3
... e assim por diante.
Obrigado. ^-^

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
local posicao = {
{100, 200},
{1500, 250}
}

eventChatCommand = function(n, c)
local int = c:match("Crystal (%d+)")
if tonumber(int) then
int = tonumber(int)
if posicao[int] then
tfm.exec.movePlayer(n, posicao[int][1], posicao[int][2])
end
end
end


Shianinja a dit :
quero um script q duas pessoa aleatoria 2 por partida possa controlar 2 ynhan cats q as 2 possam controlar individualmente cada

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
local teclas = {0, 3, 2, 1}

nyan = function()
return tfm.exec.addShamanObject(212, math.random(800), 100)
end

local jogadores = {}
eventNewGame = function()
jogadores = {}

local p = {}
for k, v in next, tfm.get.room.playerList do
p[#p + 1] = k
p[k] = true
tfm.exec.killPlayer(k)
end

for i = 1, 2 do
local player
repeat
player = p[math.random(#p)]
until player and not jogadores[player]
jogadores[player] = nyan()

for i, tecla in next, teclas do
system.bindKeyboard(player, tecla, true, true)
end
end
end


eventKeyboard = function(n, key)
if jogadores[n] then
for i, tecla in next, teclas do
if key == tecla then
i = ((i - 1) % 3 == 0) and -i or i
tfm.exec.moveObject(jogadores[n], 0, 0, false, math.fmod(i, 2) * 50, math.fmod(i + 1, 2) * 50)
break
end
end
end
end

tfm.exec.disableAutoNewGame()
tfm.exec.newGame(0)


Juniorkener a dit :
Queria um script que voce virasse um fantasma e em quem voce tocasse ele iria morrer obs: o fantasma tem que ser invisivel

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
tfm.exec.newGame("#11")

local hasGhost = false
eventNewGame = function()
hasGhost = false
end

eventPlayerVampire = function(n)
if hasGhost then
tfm.exec.killPlayer(n)
else
hasGhost = true
tfm.exec.addImage("", "%" .. n) -- pelo menos fica invisível :v
end
end


Rataraiii a dit :
Sabendo que aqui e pra pedir script, to perguntando uma coisa......
Como faz para tirar o Text area por segundos?

Code Lua

1
2
3
4
5
6
7
8
9
10
local SEGUNDOS = 5
ui.addTextArea(0, "Vai desaparecer em " .. SEGUNDOS .. "s")

local tempo = 0
eventLoop = function()
tempo = tempo + .5
if tempo % SEGUNDOS == 0 then
ui.removeTextArea(0, nil)
end
end

obrigado apesar de n ter funfado mais obrigado msm ass • [15:49] # [*FamilyZouyen'] Runtime Error : org.luaj.vm2.LuaError: Shianinja#2005.lua:21: Lua destroyed : Runtime can't exceed 40 ms in 4 seconds. /deu isso

querido vc pediu com 2 pessoas, tem que testar com um cafofo que tenha 2 pessoas ou mais né. Mágica lua n faz


Gente, para de citar o post porque ele é grande. Fica uma poluição horrível
Amethista1
« Citoyen »
1521921540000
    • Amethista1#0000
    • Profil
    • Derniers messages
    • Tribu
#850
  0
Bolodefchoco a dit :
Rataraiii a dit :
Outro pedido

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local SEGUNDOS = 5
ui.addTextArea(0, "ALGUEM ROUBOU O PUDIM DA TRIBO, PROCURE O LADRÃO E MATE-O! ")

local tempo = 0
eventLoop = function()
tempo = tempo + .5
if tempo % SEGUNDOS == 0 then
ui.removeTextArea(0, nil)
end
end

tfm.exec.newGame('<C><P F="0" /><Z><S><S L="99" H="10" X="814" Y="346" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" X="172" H="10" Y="334" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" H="10" X="334" Y="173" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" H="10" X="399" Y="305" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" X="580" H="10" Y="222" T="1" P="0,0,0,0.2,0,0,0,0" /><S L="99" X="97" H="10" Y="131" T="1" P="0,0,0,0.2,0,0,0,0" /></S><D><DS Y="130" X="328" /></D><O /></Z></C>')

eventNewGame = function()
tfm.exec.chatMessage('Você e o ladrão de queijo, mate todos os inocentes para ganhar.')
tempo = 0
ui.addTextArea(0, "ALGUEM ROUBOU O PUDIM DA TRIBO, PROCURE O LADRÃO E MATE-O! ")
table.foreach(tfm.get.room.playerList,tfm.exec.giveMeep)
end


Unilehh a dit :
Tem como fazer algum script que deixe agente escolher nossos times no module football? E é possivel fazer a tempo da Copa 2018?

Obs: Na tribo obviamente rsrs

n dá pra usar script em módulos que estão rodando :/


Shianinja a dit :
Bolodefchoco a dit :
Nenhum dos códigos abaixo foram testados. Desculpe se não funcionar.

Laylaaaaaaaahhh a dit :
eu quero um script que eu aperte espaço e solte bola de praia

Code Lua

1
2
3
4
5
6
7
8
9
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(6, x + (dir * 20), y - 20, 0, (dir * 20))
end


Cremosinha a dit :
Bolodefchoco como faço um script para o ratos obdecerem todos os comandos das emoçoes obg.

Um que você faz a emoção e todos fazem tbm?
Code Lua

1
2
3
4
5
eventEmotePlayed = function(n, i)
if n == "Cremosinha#9255" then
tfm.exec.playEmote(nil, i)
end
end


Escanor a dit :
script para fazer o rato de outra pessoa dar 2 pulos apertando espaço

Code Lua

1
2
3
4
5
6
7
8
9
10
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
if tfm.get.room.playerList[n].vy == 0 then
tfm.exec.movePlayer(n, 0, 0, false, 0, -30)
end
end


Juniorkener a dit :
Eu queria um script que quando voce aperta R Sai uma bola de neve (com efeito de empurrar)

Code Lua

1
2
3
4
5
6
7
8
9
eventNewPlayer = function(n)
system.bindKeyboard(n, 32, true, true)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(34, x + (dir * 20), y - 20, 0, (dir * 20))
end


Joaopsan a dit :
Um Script no qual os jogadores digitassem !Crystal + Número e fosse teleportado pra um lugar, "Sem Morrer".
Exemplo : !Crystal 1
fosse teleportado para 100,200
!Crystal 2
fosse teleportado para 1500,250
!Crystal 3
... e assim por diante.
Obrigado. ^-^

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
local posicao = {
{100, 200},
{1500, 250}
}

eventChatCommand = function(n, c)
local int = c:match("Crystal (%d+)")
if tonumber(int) then
int = tonumber(int)
if posicao[int] then
tfm.exec.movePlayer(n, posicao[int][1], posicao[int][2])
end
end
end


Shianinja a dit :
quero um script q duas pessoa aleatoria 2 por partida possa controlar 2 ynhan cats q as 2 possam controlar individualmente cada

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
local teclas = {0, 3, 2, 1}

nyan = function()
return tfm.exec.addShamanObject(212, math.random(800), 100)
end

local jogadores = {}
eventNewGame = function()
jogadores = {}

local p = {}
for k, v in next, tfm.get.room.playerList do
p[#p + 1] = k
p[k] = true
tfm.exec.killPlayer(k)
end

for i = 1, 2 do
local player
repeat
player = p[math.random(#p)]
until player and not jogadores[player]
jogadores[player] = nyan()

for i, tecla in next, teclas do
system.bindKeyboard(player, tecla, true, true)
end
end
end


eventKeyboard = function(n, key)
if jogadores[n] then
for i, tecla in next, teclas do
if key == tecla then
i = ((i - 1) % 3 == 0) and -i or i
tfm.exec.moveObject(jogadores[n], 0, 0, false, math.fmod(i, 2) * 50, math.fmod(i + 1, 2) * 50)
break
end
end
end
end

tfm.exec.disableAutoNewGame()
tfm.exec.newGame(0)


Juniorkener a dit :
Queria um script que voce virasse um fantasma e em quem voce tocasse ele iria morrer obs: o fantasma tem que ser invisivel

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
tfm.exec.newGame("#11")

local hasGhost = false
eventNewGame = function()
hasGhost = false
end

eventPlayerVampire = function(n)
if hasGhost then
tfm.exec.killPlayer(n)
else
hasGhost = true
tfm.exec.addImage("", "%" .. n) -- pelo menos fica invisível :v
end
end


Rataraiii a dit :
Sabendo que aqui e pra pedir script, to perguntando uma coisa......
Como faz para tirar o Text area por segundos?

Code Lua

1
2
3
4
5
6
7
8
9
10
local SEGUNDOS = 5
ui.addTextArea(0, "Vai desaparecer em " .. SEGUNDOS .. "s")

local tempo = 0
eventLoop = function()
tempo = tempo + .5
if tempo % SEGUNDOS == 0 then
ui.removeTextArea(0, nil)
end
end

obrigado apesar de n ter funfado mais obrigado msm ass • [15:49] # [*FamilyZouyen'] Runtime Error : org.luaj.vm2.LuaError: Shianinja#2005.lua:21: Lua destroyed : Runtime can't exceed 40 ms in 4 seconds. /deu isso

querido vc pediu com 2 pessoas, tem que testar com um cafofo que tenha 2 pessoas ou mais né. Mágica lua n faz


Gente, para de citar o post porque ele é grande. Fica uma poluição horrível

Obrigada tiuzin ;u;
(sou a Rataraiii
Juniorkener
« Citoyen »
1521932160000
    • Juniorkener#0000
    • Profil
    • Derniers messages
#851
  0
tem como botar 2 codigo lua no cafofo?
Rataraiii
« Citoyen »
1521934740000
    • Rataraiii#0000
    • Profil
    • Derniers messages
#852
  0
Juniorkener a dit :
tem como botar 2 codigo lua no cafofo?

Como assim? se for por exemplo colocar meep com text area, ai sim
Thefrogplayer
« Citoyen »
1521937440000
    • Thefrogplayer#2537
    • Profil
    • Derniers messages
#853
  0
fazer o shaman quando um item acabar ele recarrega sozinho
Bolodefchoco
« Sénateur »
1521948600000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#854
  0
Vmdsbdhkrgyi a dit :
fazer o shaman quando um item acabar ele recarrega sozinho

n da
Eistter
« Censeur »
1522000140000
    • Eistter#0000
    • Profil
    • Derniers messages
#855
  0
Uma sugestão:
https://www.youtube.com/watch?v=jAQNiL3o5lU
Não sei como poderia ser aplicado no LUA, mas achei interessante
Juniorkener
« Citoyen »
1522014000000
    • Juniorkener#0000
    • Profil
    • Derniers messages
#856
  0
Tem como fazer um script que: deixa o nome de um rato aleatorio azul
e nesse mesmo rato azul ele conseguisse ''atirar'' e nesse tiro ele matasse alguem
sei que deve ser dificil juntar 2 scripts mas sla ne vei se voces conseguissem
Rataraiii
« Citoyen »
1522016100000
    • Rataraiii#0000
    • Profil
    • Derniers messages
#857
  0
Juniorkener a dit :
Tem como fazer um script que: deixa o nome de um rato aleatorio azul
e nesse mesmo rato azul ele conseguisse ''atirar'' e nesse tiro ele matasse alguem
sei que deve ser dificil juntar 2 scripts mas sla ne vei se voces conseguissem

não é dificil, alguns são muito facil
Juniorkener
« Citoyen »
1522016880000
    • Juniorkener#0000
    • Profil
    • Derniers messages
#858
  0
faz ai ent ;-;
Bloonshack
« Sénateur »
1522019400000
    • Bloonshack#0000
    • Profil
    • Derniers messages
#859
  0
Fazer spanw de balões a cada 3 segundos em um lugar
Rataraiii
« Citoyen »
1522023780000
    • Rataraiii#0000
    • Profil
    • Derniers messages
#860
  0
Juniorkener a dit :
faz ai ent ;-;

Eu não consigo fazer esse tipo de script, (ou juntar ' -'
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Seção Editor de Mapas e Modules
  • /
  • [Lua] Peça scripts aqui!
« ‹ 43 / 133 › »
© Atelier801 2018

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

Version 1.27