×

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!
« ‹ 26 / 133 › »
[Lua] Peça scripts aqui!
Abctess
« Citoyen »
1516305180000
    • Abctess#0000
    • Profil
    • Derniers messages
#501
  0
quero um que faz falar no chat
fake so pra enganar sabe
Laylalinhhhhhh
« Citoyen »
1516305180000
    • Laylalinhhhhhh#0632
    • Profil
    • Derniers messages
#502
  0
e um script que faz o nyan cat gravity apertando o numero "5"

Dernière modification le 1516305720000
Bolodefchoco
« Sénateur »
1516306020000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#503
  0
Quemevc6 a dit :
eu, queria se for possivel o script do mestre mandou é um script que faz vc controla todo mundo da sala tipo mover eles todos.

Você quer um script que move todo mundo conforme você aperta as teclas?

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local controlador = "Quemevc6"
local poder_movimento = 50

-- HJKU = esquerda, baixo, direita, cima
local teclas = {string.byte("HJKU", 1, 4)}
for i, tecla in next, teclas do
system.bindKeyboard(controlador, tecla, true, true)
end

eventKeyboard = function(n, key)
for i, tecla in next, teclas do
if key == tecla then
i = ((i - 1) % 3 == 0) and -i or i
for k, v in next, tfm.get.room.playerList do
if k ~= n then
tfm.exec.movePlayer(k, 0, 0, false, math.fmod(i, 2) * poder_movimento, math.fmod(i + 1, 2) * poder_movimento)
end
end
break
end
end
end

Dernière modification le 1516306320000
Abctess
« Citoyen »
1516306320000
    • Abctess#0000
    • Profil
    • Derniers messages
#504
  0
Bolodefchoco a dit :
Quemevc6 a dit :
eu, queria se for possivel o script do mestre mandou é um script que faz vc controla todo mundo da sala tipo mover eles todos.

Você quer um script que move todo mundo conforme você aperta as teclas?

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
local controlador = "Bolodefchoco"
local poder_movimento = 50

local teclas = {string.byte("HJKU", 1, 4)}
for i, tecla in next, teclas do
system.bindKeyboard(controlador, tecla, true, true)
end

eventKeyboard = function(n, key)
for i, tecla in next, teclas do
if key == tecla then
i = ((i - 1) % 3 == 0) and -i or i
for k, v in next, tfm.get.room.playerList do
if k ~= n then
tfm.exec.movePlayer(k, 0, 0, false, math.fmod(i, 2) * poder_movimento, math.fmod(i + 1, 2) * poder_movimento)
end
end
end
end
end

teclas?
Bolodefchoco
« Sénateur »
1516306500000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#505
  0
Abctess a dit :
ainda n dar

Code Lua

1
2
3
eventNewGame = function()
print(tostring((tfm.get.room.xmlMapInfo or {}).xml):gsub("<", "&lt;"))
end

Dá sim, basta carregar um mapa com o /np:

https://image.prntscr.com/image/MabhsXxHT-qh41_wq_Ahzg.png




Abctess a dit :
Bolodefchoco a dit :
Quemevc6 a dit :
eu, queria se for possivel o script do mestre mandou é um script que faz vc controla todo mundo da sala tipo mover eles todos.

Você quer um script que move todo mundo conforme você aperta as teclas?

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
local controlador = "Bolodefchoco"
local poder_movimento = 50

local teclas = {string.byte("HJKU", 1, 4)}
for i, tecla in next, teclas do
system.bindKeyboard(controlador, tecla, true, true)
end

eventKeyboard = function(n, key)
for i, tecla in next, teclas do
if key == tecla then
i = ((i - 1) % 3 == 0) and -i or i
for k, v in next, tfm.get.room.playerList do
if k ~= n then
tfm.exec.movePlayer(k, 0, 0, false, math.fmod(i, 2) * poder_movimento, math.fmod(i + 1, 2) * poder_movimento)
end
end
end
end
end

teclas?

Como comentei no script, HJKU = esquerda, baixo, direita, cima
Você pode alterar as teclas substituindo para o que você quiser, mas na ordem que eu falei em cima.
A primeira letra vai pra esquerda, a segunda pra baixo, a terceira pra direita e a última pra cima

Abctess a dit :
quero um que faz falar no chat
fake so pra enganar sabe

Não é permitido.


Quemevc6 a dit :
e um script que faz o nyan cat gravity apertando o numero "5"

Suponho que seja atirar Nyan Cat...

Code Lua

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

eventKeyboard = function(n, k, d, x, y)
local facingValue = tfm.get.room.playerList[n].isFacingRight and 1 or -1
tfm.exec.addShamanObject(109, x + (15 * facingValue), y - 5, 0, 30 * facingValue)
end

Dernière modification le 1516306680000
Laylalinhhhhhh
« Citoyen »
1516307700000
    • Laylalinhhhhhh#0632
    • Profil
    • Derniers messages
#506
  0
Bolodefchoco a dit :
Quemevc6 a dit :
eu, queria se for possivel o script do mestre mandou é um script que faz vc controla todo mundo da sala tipo mover eles todos.

Você quer um script que move todo mundo conforme você aperta as teclas?

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local controlador = "Quemevc6"
local poder_movimento = 50

-- HJKU = esquerda, baixo, direita, cima
local teclas = {string.byte("HJKU", 1, 4)}
for i, tecla in next, teclas do
system.bindKeyboard(controlador, tecla, true, true)
end

eventKeyboard = function(n, key)
for i, tecla in next, teclas do
if key == tecla then
i = ((i - 1) % 3 == 0) and -i or i
for k, v in next, tfm.get.room.playerList do
if k ~= n then
tfm.exec.movePlayer(k, 0, 0, false, math.fmod(i, 2) * poder_movimento, math.fmod(i + 1, 2) * poder_movimento)
end
end
break
end
end
end

Obrigada
Laylalinhhhhhh
« Citoyen »
1516308060000
    • Laylalinhhhhhh#0632
    • Profil
    • Derniers messages
#507
  0
faz um que aperta uma um numero e aparecer o balão do sapo embaixo do rato
Bolodefchoco
« Sénateur »
1516308960000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#508
  0
Quemevc6 a dit :
faz um que aperta uma um numero e aparecer o balão do sapo embaixo do rato

Esses scripts são do Verdade ou desafio ou o quê?
Code Lua

1
2
3
4
5
6
7
8
9
10
eventNewPlayer = function(n)
for k, v in next, {48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105} do
system.bindKeyboard(n, v, true, true)
end
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

eventKeyboard = function(n, k, d, x, y)
tfm.exec.addShamanObject(2805, x, y + 30)
end
Laylalinhhhhhh
« Citoyen »
1516309440000
    • Laylalinhhhhhh#0632
    • Profil
    • Derniers messages
#509
  0
que não entendi?
Laylalinhhhhhh
« Citoyen »
1516309500000
    • Laylalinhhhhhh#0632
    • Profil
    • Derniers messages
#510
  0
QUAL tecla eu aperto pra solta o balão?
Bolodefchoco
« Sénateur »
1516309560000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#511
  0
Quemevc6 a dit :
QUAL tecla eu aperto pra solta o balão?

Você falou "aperta um número", então qualquer número que você apertar...
Abctess
« Citoyen »
1516315200000
    • Abctess#0000
    • Profil
    • Derniers messages
#512
  0
Abctess a dit :
quero um que faz falar no chat
fake so pra enganar sabe
Bolodefchoco
« Sénateur »
1516315740000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#513
  0
Abctess a dit :
Abctess a dit :
quero um que faz falar no chat
fake so pra enganar sabe


Não é permitido
Bloom
« Héliaste »
1516316580000
    • Bloom#6766
    • Profil
    • Derniers messages
#514
  0
Bolodefchoco a dit :
Erissinho a dit :
Bolodefchoco a dit :
Erissinho a dit :
Gostaria de um script que permitisse ver o XML do mapa que está rodando. Agradeço desde já.

Code Lua

1
2
3
eventNewGame = function()
print(tostring(tfm.get.room.xmlMapInfo or {}).xml):gsub("<", "&lt;"))
end

Obrigado, vou testar agora.

@Edit: Onde é para aparecer o código? Acho que não está funcionando.

Ops, desculpe. Faltou um "(" ali no código. Pode copiar/colar ele novamente no /lua que irá funcionar. Basta carregar um mapa novo e olhar ai no #lua

Sem problemas, vou testar assim que possível! De qualquer forma obrigado!
Bolodefchoco
« Sénateur »
1516317180000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#515
  0
Erissinho a dit :
Bolodefchoco a dit :
Erissinho a dit :
Bolodefchoco a dit :
Erissinho a dit :
Gostaria de um script que permitisse ver o XML do mapa que está rodando. Agradeço desde já.

Code Lua

1
2
3
eventNewGame = function()
print(tostring(tfm.get.room.xmlMapInfo or {}).xml):gsub("<", "&lt;"))
end

Obrigado, vou testar agora.

@Edit: Onde é para aparecer o código? Acho que não está funcionando.

Ops, desculpe. Faltou um "(" ali no código. Pode copiar/colar ele novamente no /lua que irá funcionar. Basta carregar um mapa novo e olhar ai no #lua

Sem problemas, vou testar assim que possível! De qualquer forma obrigado!

Disponha ^_^
Abctess
« Citoyen »
1516317540000
    • Abctess#0000
    • Profil
    • Derniers messages
#516
  0
Então, um que quando aperto algum botão sai coraçoes grandes
Proctons
« Citoyen »
1516318320000
    • Proctons#0000
    • Profil
    • Derniers messages
#517
  0
Quero um script que chova nyan cats em um mapa cheio de estrela e que eles andem
Bolodefchoco
« Sénateur »
1516319820000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#518
  0
Abctess a dit :
Então, um que quando aperto algum botão sai coraçoes grandes

https://pastebin.com/raw/Zzuxk5f2 : Clique ou aperte espaço
Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
heart=function(n,particle,X,Y)
local pi=math.pi
local sin=math.sin
local cos=math.cos
local particle=particle or 2
for size = 0,2*pi,.05 do
x = (8 * sin(size) ^ 3) * 10 + (not X and tfm.get.room.playerList[n].x or X)
y = - (7 * cos(size) - 4 * cos(2*size) - 2 * cos(3*size) - cos(4*size)) * 8 + (not Y and tfm.get.room.playerList[n].y or Y) - 30
tfm.exec.displayParticle(particle,x,y)
end
end

eventMouse=table.foreach(tfm.get.room.playerList,function(n) system.bindMouse(n,true) end) or function(n,x,y)
heart(n,particle,x,y)
end
eventKeyboard=table.foreach(tfm.get.room.playerList,function(n) system.bindKeyboard(n,32,true,true) end) or function(n,k)
if k == 32 then
heart(n,particle)
end
end


Proctons a dit :
Quero um script que chova nyan cats em um mapa cheio de estrela e que eles andem

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
table.copy = function(list)
local out = {}
for k, v in next, list do
out[k] = v
end
return out
end

objects = {}

start = false

eventNewGame = function()
objects = {}

for k,v in next,tfm.get.room.playerList do
tfm.exec.killPlayer(k)
end

start = true
end

eventLoop = function()
if start then
if #objects < 7 then
for i = 1, math.random(5) do
if math.random(0, 1) == 0 then
objects[#objects + 1] = {
[1] = tfm.exec.addShamanObject(math.random(0, 3) == 0 and 212 or 109, math.random(100, 700), math.random(150), math.random(360)),
[2] = os.time() + (math.random(3, 5) * 1000)
}
end
end
end

for k, v in next, table.copy(objects) do
if os.time() > v[2] then
local o = tfm.get.room.objectList[v[1]]
if o.x < 0 or o.x > 800 or o.y > 400 then
table.remove(objects, k)
elseif math.random(0, 5) > 3 then
tfm.exec.moveObject(o.id, 0, 0, false, math.random(-50, 50), math.random(-70, 20), true, o.angle)
end
end
end

for i = 1, 20 do
tfm.exec.displayParticle(29, math.random(0, 800), math.random(30, 150))
end
end
end

tfm.exec.disableAutoNewGame()
tfm.exec.newGame('<C><P F="3" /><Z><S><S L="800" H="150" X="400" Y="450" T="6" P="0,0,0.3,0.2,0,0,0,0" /></S><D /><O /></Z></C>')
Proctons
« Citoyen »
1516384080000
    • Proctons#0000
    • Profil
    • Derniers messages
#519
  0
Bolodefchoco a dit :
Abctess a dit :
Então, um que quando aperto algum botão sai coraçoes grandes

https://pastebin.com/raw/Zzuxk5f2 : Clique ou aperte espaço
Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
heart=function(n,particle,X,Y)
local pi=math.pi
local sin=math.sin
local cos=math.cos
local particle=particle or 2
for size = 0,2*pi,.05 do
x = (8 * sin(size) ^ 3) * 10 + (not X and tfm.get.room.playerList[n].x or X)
y = - (7 * cos(size) - 4 * cos(2*size) - 2 * cos(3*size) - cos(4*size)) * 8 + (not Y and tfm.get.room.playerList[n].y or Y) - 30
tfm.exec.displayParticle(particle,x,y)
end
end

eventMouse=table.foreach(tfm.get.room.playerList,function(n) system.bindMouse(n,true) end) or function(n,x,y)
heart(n,particle,x,y)
end
eventKeyboard=table.foreach(tfm.get.room.playerList,function(n) system.bindKeyboard(n,32,true,true) end) or function(n,k)
if k == 32 then
heart(n,particle)
end
end


Proctons a dit :
Quero um script que chova nyan cats em um mapa cheio de estrela e que eles andem

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
table.copy = function(list)
local out = {}
for k, v in next, list do
out[k] = v
end
return out
end

objects = {}

start = false

eventNewGame = function()
objects = {}

for k,v in next,tfm.get.room.playerList do
tfm.exec.killPlayer(k)
end

start = true
end

eventLoop = function()
if start then
if #objects < 7 then
for i = 1, math.random(5) do
if math.random(0, 1) == 0 then
objects[#objects + 1] = {
[1] = tfm.exec.addShamanObject(math.random(0, 3) == 0 and 212 or 109, math.random(100, 700), math.random(150), math.random(360)),
[2] = os.time() + (math.random(3, 5) * 1000)
}
end
end
end

for k, v in next, table.copy(objects) do
if os.time() > v[2] then
local o = tfm.get.room.objectList[v[1]]
if o.x < 0 or o.x > 800 or o.y > 400 then
table.remove(objects, k)
elseif math.random(0, 5) > 3 then
tfm.exec.moveObject(o.id, 0, 0, false, math.random(-50, 50), math.random(-70, 20), true, o.angle)
end
end
end

for i = 1, 20 do
tfm.exec.displayParticle(29, math.random(0, 800), math.random(30, 150))
end
end
end

tfm.exec.disableAutoNewGame()
tfm.exec.newGame('<C><P F="3" /><Z><S><S L="800" H="150" X="400" Y="450" T="6" P="0,0,0.3,0.2,0,0,0,0" /></S><D /><O /></Z></C>')

obrigado
Proctons
« Citoyen »
1516384140000
    • Proctons#0000
    • Profil
    • Derniers messages
#520
  0
Ñ funciona
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Seção Editor de Mapas e Modules
  • /
  • [Lua] Peça scripts aqui!
« ‹ 26 / 133 › »
© Atelier801 2018

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

Version 1.27