×

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!
« ‹ 127 / 133 › »
[Lua] Peça scripts aqui!
Victorck6
« Citoyen »
1602550380000
    • Victorck6#6662
    • Profil
    • Derniers messages
    • Tribu
#2521
  0
Pedido de script para estudo
Nome: Seta
Descrição: Um script ao fazer uso da seta do shan ao mesmo momento vai uma cn naquele local e o shaman não aparece no mapa e o tempo por cada cn é 2 segundos, e um local pra por os mapas.
Jp_darkuss
« Citoyen »
1602606240000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2522
  0
Lightsuit a dit :
Jp_darkuss a dit :
Lightsuit a dit :
Olá, eu queria um script que possibilitasse um dos ratinhos a matar outras pessoas apertando espaço.

Se possivel com limite de tempo

Obrigado!

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
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
local _, adm= pcall(nil)
local killer
local data= {
maxCount= 10000,
allow= true
}
local count= 0
local update= function(player)
ui.removeTextArea(2, killer)
killer= player
ui.addTextArea(2, "Countdown: 0s", killer, 700, 370, nil, nil, nil, nil, 1, true)
end
local kill= function(player)
local x= tfm.get.room.playerList[player].x
local y= tfm.get.room.playerList[player].y
function distance(x1, y1, x2, y2)
local dist= {
x= math.abs(x1 - x2),
y= math.abs(y1 - y2)
}
return math.sqrt(dist.x ^ 2 + dist.y ^ 2)
end
for name, data in next, tfm.get.room.playerList do
if name~= player and distance(x, y, data.x, data.y)<= 30 then
tfm.exec.killPlayer(name)
break
end
end
end
eventKeyboard= function(player)
if player== killer and data.allow then
kill(player)
data.allow= false
end
end
eventPopupAnswer= function(id, _, answer)
if id== 0 then
update(answer)
elseif id== 1 then
data.maxCount= tonumber(answer) * 1000
end
end
eventLoop= function()
if not data.allow then
count= count + 500
if count % 1000== 0 then
ui.updateTextArea(2, "Countdown: "..((data.maxCount - count) / 1000).."s", killer)
end
if count>= data.maxCount then
count= 0
data.allow= true
end
end
end
eventTextAreaCallback= function(_, _, event)
if event=="killer" then
ui.addPopup(0, 2, "<p align='center'>Indique o nome do killer:</p>", adm, 300, 100, nil, true)
elseif event=="countdown" then
ui.addPopup(1, 2, "<p align='center'>Indique o countdown para cada kill (atual: "..(data.maxCount / 1000).."s):</p>", adm, 300, 100, nil, true)
end
end
eventNewPlayer= function(player)
system.bindKeyboard(player, 32, false, true)
end
do
adm= adm:match("(.-)%.")
killer= adm
update(killer)
tfm.exec.disableAfkDeath()
tfm.exec.disableMortCommand()
table.foreach(tfm.get.room.playerList, eventNewPlayer)
ui.addTextArea(0, "<a href='event:killer'>Killer</a>", adm, 20, 370, nil, nil, nil, nil, 1, true)
ui.addTextArea(1, "<a href='event:countdown'>Countdown</a>", adm, 70, 370, nil, nil, nil, nil, 1, true)
end


Por padrão, o killer será o adm, e o tempo máximo para cada kill é ser 10s.

Você pode alterar o killer (botão "Killer") e o tempo máximo para cada kill (botão "Countdown").

Para o killer aprecerá uma aba no canto lateral inferior mostrando a contagem, sendo que ele pode atacar quando estiver no 0.

Quaisquer bugs me notifique.

Bom, a intenção do pedido era ninguem saber quem era o Killer, mas tirando isso ficou ótimo o script parabens!

Obrigado, mas o script não diz quem é o killer. De padrão é o adm porque carregou o script, mas você pode alterar quando quiser, e ninguém saberá...
Jp_darkuss
« Citoyen »
1602612360000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2523
  0
Victorck6 a dit :
Pedido de script para estudo
Nome: Seta
Descrição: Um script ao fazer uso da seta do shan ao mesmo momento vai uma cn naquele local e o shaman não aparece no mapa e o tempo por cada cn é 2 segundos, e um local pra por os mapas.

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
33
34
35
36
37
38
39
local _, adm= pcall(nil)
local maps= {}
local count, shaman, allow= 0, "", false
eventTextAreaCallback= function(_, _, event)
if event=="random" then
tfm.exec.newGame(maps[math.random(1, #maps)])
tfm.exec.setShaman(shaman)
tfm.exec.setShamanMode(shaman, 2)
elseif event=="shaman" then
ui.addPopup(0, 2, "<p align='center'>Digite o nome do Shaman:</p>", adm, 300, 100, nil, true)
end
end
eventSummoningEnd= function(_, type, x, y, angle)
if type== 0 and allow then
local ang= ((angle + 180<= 360) and angle + 180 or (angle + 180) - 360)
tfm.exec.addShamanObject(17, x, y, ang, 10, 10)
allow= false
end
end
eventPopupAnswer= function(_, _, answer)
shaman= answer
end
eventLoop= function()
if not allow then
count= count + 500
if count== 2000 then
count, allow= 0, true
end
end
end
do
adm= adm:match("(.-)%.")
shaman= adm
for _, data in next, {"MortCommand", "AfkDeath", "AutoNewGame", "AutoShaman"} do
tfm.exec["disable"..data]();
end
ui.addTextArea(0, "<a href='event:random'>Random map</a>", adm, 20, 370, nil, nil, nil, nil, 1, true)
ui.addTextArea(1, "<a href='event:shaman'>Shaman</a>", adm, 115, 370, nil, nil, nil, nil, 1, true)
end


Por padrão o shaman é o adm. O shaman vai continuar no mapa, não tem como fazer desaparecer (a única alternativa seria matando-o, mas ele não poderia mais invocar objetos).

O botão "Random map" inicia um mapa de forma aleatória, e "Shaman" serve para determinar um novo shaman.

Dernière modification le 1602612420000
+Pluuuuuf
« Citoyen »
1602627360000
    • +Pluuuuuf#0000
    • Profil
    • Derniers messages
#2524
  0
Alguém poderia fazer um script que depois de alguns segundos ele ativa um outro script ?? se tiver como

Dernière modification le 1602627420000
Jp_darkuss
« Citoyen »
1602645900000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2525
  0
+Pluuuuuf a dit :
Alguém poderia fazer um script que depois de alguns segundos ele ativa um outro script ?? se tiver como

Olha, esse pedido é muito relativo. Mas podemos fazer...

Code Lua

1
2
3
4
5
6
7
8
9
10
11
local time= 2
local count= 0
local Do= function()
--ponha o script aqui...
end
eventLoop= function()
count= count + 500
if count>= time * 1000 then
Do()
end
end

Coloque o script onde foi indicado, e em time quantos segundos quer de espera.

O pedido é relativo porque dependendo da arquitetura do script, pode não funcionar.

Por exemplo, nos meus scripts só uso variáveis locais (tipo, que só funcionam em determinado bloco), então não iria funcionar o script... Mas é claro, há muitas outras coisas que podem fazer não funcionar.

Então caso o script não funcione, não há muito o que fazer. A não ser que pessa para o dono refazê-lo para você.
Mariobros
« Citoyen »
1602784320000
    • Mariobros#4213
    • Profil
    • Derniers messages
    • Tribu
#2526
  1
Eu queria um script de fazer todos os ratos da partida terem uma skin de Halloween, Porque quero fazer uma partida de Halloween

Obs: se a partida acabar ou alguém sair da sala ele não terá mais a skin, só se a partida Halloween aparecer de novo
Jp_darkuss
« Citoyen »
1602800280000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2527
  1
Mariobros a dit :
Eu queria um script de fazer todos os ratos da partida terem uma skin de Halloween, Porque quero fazer uma partida de Halloween

Obs: se a partida acabar ou alguém sair da sala ele não terá mais a skin, só se a partida Halloween aparecer de novo

Deu uma pesquisada na FAQ e não encontrei nada que possa te ajudar. Acho que não é possível.
Mariobros
« Citoyen »
1602951120000
    • Mariobros#4213
    • Profil
    • Derniers messages
    • Tribu
#2528
  0
ok, depois vou falar outro script
Lekow
« Citoyen »
1602953700000
    • Lekow#2550
    • Profil
    • Derniers messages
    • Tribu
#2529
  0
Oi queria um script que tivesse uns negosso escrito na tela pra voce clicar e ganhar speed soq desse pra editar a velocidade de cada 1 que clicasse

se der pra fazer vlw
Lekow
« Citoyen »
1602957300000
    • Lekow#2550
    • Profil
    • Derniers messages
    • Tribu
#2530
  1
Lekow a dit :
Oi queria um script que tivesse uns negosso escrito na tela pra voce clicar e ganhar speed soq desse pra editar a velocidade de cada 1 que clicasse

se der pra fazer vlw

Esqueci de falar se tiver como só dar pra clicar de perto e ficar 20 segundos funfando
Jp_darkuss
« Citoyen »
1603036500000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2531
  0
Lekow a dit :
Lekow a dit :
Oi queria um script que tivesse uns negosso escrito na tela pra voce clicar e ganhar speed soq desse pra editar a velocidade de cada 1 que clicasse

se der pra fazer vlw

Esqueci de falar se tiver como só dar pra clicar de perto e ficar 20 segundos funfando

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
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
local _, adm= pcall(nil)
local gaming= false
local players= {}
local speed= {}
local count= 0
local openned= false
local data= {
spawn_count= 20000, --tempo para spawnar
amount_spawn= 5, --quanidade spawnada
width= 800, --- | limines do mapa
height= 400, --- |
speed= 20 --speed vaalue
}
local spawn= function(id, x, y)
ui.addTextArea(id, "<font color='#66DD66' size='10'><a href='event:speed'>Speed</a></font>", nil, x, y, nil, nil, nil, nil, 0.9, false)
speed[id]= {x= x, y= y}
end
local display= function()
local text="<p align='center'><font size='14' color='#EEEEEE'>Settings</font></p><br/>"
local spawn="<b>Velocidade de spawn</b>: <a href='event:spawn'><font color='#66DD66'>"..(data.spawn_count / 1000).."s</font></a><br/>"
local amount="<b>Quantidade do spawn</b>: <a href='event:amount'><font color='#66DD66'>"..(data.amount_spawn).."</font></a><br/>"
local width="<b>Largura do mapa</b>: <a href='event:width'><font color='#66DD66'>"..(data.width).."px</font></a><br/>"
local height="<b>Altura do mapa</b>: <a href='event:height'><font color='#66DD66'>"..(data.height).."px</font></a><br/>"
local speed="<b>Velocidade do player</b>: <a href='event:Speed'><font color='#66DD66'>"..(data.speed).."</font></a><br/>"
ui.addTextArea(3, text..spawn..amount..width..height..speed, adm, 250, 100, 300, 100, nil, nil, 1, true)
end
local distance= function(player, id)
local x= tfm.get.room.playerList[player].x
local y= tfm.get.room.playerList[player].y
local dist= {
x= math.abs(x - speed[id].x),
y= math.abs(y - speed[id].y)
}
local h= math.sqrt(dist.x ^ 2 + dist.y ^ 2)
return h
end
eventKeyboard= function(player)
if players[player].activated then
local isFacingRight= tfm.get.room.playerList[player].isFacingRight
if isFacingRight then
tfm.exec.movePlayer(player, data.speed, 0, true)
else
tfm.exec.movePlayer(player, -data.speed, 0, true)
end
end
end
eventTextAreaCallback= function(id, player, event)
if player== adm then
if event=="play" then
if not gaming then
gaming= true
ui.updateTextArea(2, "<a href='event:play'><font color='#66DD66'>Play</font></a>", adm)
else
gaming= false
ui.updateTextArea(2, "<a href='event:play'><font color='#DD7766'>Play</font></a>", adm)
for i= 4, data.amount_spawn + 3 do
ui.removeTextArea(i, nil)
end
count= 0
end
elseif event=="config" then
if not openned and not gaming then
display()
openned= true
else
ui.removeTextArea(3, adm)
openned= false
end
elseif event=="spawn" then
ui.addPopup(0, 2, "<p align='center'>Tempo para o spawn de itens em segundos</p>", adm, 300, 100, nil, true)
elseif event=="amount" then
ui.addPopup(1, 2, "<p align='center'>Quantidade de spawn de power-ups</p>", adm, 300, 100, nil, true)
elseif event=="width" then
ui.addPopup(2, 2, "<p align='center'>Largura do mapa</p>", adm, 300, 100, nil, true)
elseif event=="height" then
ui.addPopup(3, 2, "<p align='center'>Altura do mapa</p>", adm, 300, 100, nil, true)
elseif event=="Speed" then
ui.addPopup(4, 2, "<p align='center'>Velocidade do speed do power up</p>", adm, 300, 100, nil, true)
end
end
if event=="speed" and not players[player].activated and distance(player, id)<= 50 then
ui.removeTextArea(id)
players[player].activated= true
end
end
eventPopupAnswer= function(id, _, answer)
if id== 0 then
data.spawn_count= tonumber(answer) * 1000
elseif id== 1 then
data.amount_spawn= tonumber(answer)
elseif id== 2 then
data.width= tonumber(answer)
elseif id== 3 then
data.height= tonumber(answer)
elseif id== 4 then
data.speed= tonumber(answer)
end
display()
end
eventNewPlayer= function(player)
players[player]= {
activated= false,
count= 0
}
system.bindKeyboard(player, 69, false, true);
end
eventLoop= function()
if gaming then
count= count + 500
if count>= data.spawn_count then
count= 0
for i= 4, data.amount_spawn + 3 do
local x= math.random(20, data.width)
local y= math.random(50, data.height)
spawn(i, x, y)
end
end
end
for player in next, players do
if players[player].activated then
players[player].count= players[player].count + 500
ui.updateTextArea(1, "Count: "..(math.floor((20000 - players[player].count) / 1000)).."s", player)
if players[player].count>= 20000 then
players[player].activated= false
players[player].count= 0
end
end
end
end
do
adm= adm:match("(.-)%.")
for player in next, tfm.get.room.playerList do
eventNewPlayer(player)
end
ui.addTextArea(0, "<a href='event:config'>Settings</a>", adm, 20, 370, nil, nil, nil, nil, 1, true)
ui.addTextArea(1, "Count: 0s", nil, 720, 370, nil, nil, nil, nil, 1, true)
ui.addTextArea(2, "<a href='event:play'><font color='#DD7766'>Play</font></a>", adm, 85, 370, nil, nil, nil, nil, 1, true)
end


Para iniciar/parar aperte play.

Boost de velocidade com a tecla E.

Tem um painél de confiurações também. Só isso, divirta-se! :)

Dernière modification le 1603037520000
Tonytonychopper
« Citoyen »
1603495380000
    • Tonytonychopper#9280
    • Profil
    • Derniers messages
#2532
  0
Um sistema de Moedas que inicia com 10 moedas e uma tabela onde voce clica em uma palavra gastando 1 moeda e ela adiciona ou remove 1 moeda aleatoriamente.

Dernière modification le 1603496340000
Jp_darkuss
« Citoyen »
1603509480000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2533
  0
Schiiss4 a dit :
Um sistema de Moedas que inicia com 10 moedas e uma tabela onde voce clica em uma palavra gastando 1 moeda e ela adiciona ou remove 1 moeda aleatoriamente.

Não entendi, poderia especificar o propósito?
Tonytonychopper
« Citoyen »
1603558680000
    • Tonytonychopper#9280
    • Profil
    • Derniers messages
#2534
  0
seria como um sistema de aposta onde vc clica e ganha mais pontos ou perde esses pontos
Tonytonychopper
« Citoyen »
1603587960000
    • Tonytonychopper#9280
    • Profil
    • Derniers messages
#2535
  0
já fiz sozinho podem esquecer mas vlw por tentarem
Lekow
« Citoyen »
1603736820000
    • Lekow#2550
    • Profil
    • Derniers messages
    • Tribu
#2536
  0
script simpliszin

uma textarea no meio da tela que aparece 1 a cada 10 segundos e some umas 10 texteara :(
Bigodinhouuu
1603765260000
    • Bigodinhouuu#0000
    • Profil
    • Derniers messages
    • Tribu
#2537
[Modéré par Adami, raison : Spam.]
Bigodinhouuu
1603765260000
    • Bigodinhouuu#0000
    • Profil
    • Derniers messages
    • Tribu
#2538
[Modéré par Ork, raison : Spam.]
Bigodinhouuu
1603765380000
    • Bigodinhouuu#0000
    • Profil
    • Derniers messages
    • Tribu
#2539
[Modéré par Ork, raison : Spam.]
Rambreout
« Citoyen »
1603779360000
    • Rambreout#8657
    • Profil
    • Derniers messages
    • Tribu
#2540
  0
pode fazer um codigo lua, que simule o deathmatch?
tipo, que faça atirar o cn em baixo do rato, para a posição que ele estiver virado
(a questão da força da cn, e a posição onde ela vai sair pode deixar em 0 que eu ajusto depois, minha dificuldade eh fazer sair para o lado que o rato está virado, pois o codigo que eu ""editei"" só lança pra la>)
espero que me ajude, obrigado.
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Seção Editor de Mapas e Modules
  • /
  • [Lua] Peça scripts aqui!
« ‹ 127 / 133 › »
© Atelier801 2018

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

Version 1.27