×

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!
« ‹ 113 / 133 › »
[Lua] Peça scripts aqui!
Jp_darkuss
« Citoyen »
1577731080000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2241
  0
Annye a dit :
Também queria um script, aonde eu pudesse fazer aparecer caixas com mensagens pop up na tela dos jogadores que estão no cafofo da tribo

Tipo, eu usaria o comando

!msg blá blá blá

E apareceria bem no meio da tela do jogador assim:

[Annye#8612] blá blá blá


(Se possível, também queria que desse para mudar a cor das letras)

Script

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
local adm= {"Annye#8612"}
local color="#DDDDDD"
eventChatCommand= function(player, c)
cmd= {}
for i in string.gmatch(c, "%S+") do
table.insert(cmd, i)
end
if (string.sub(c, 1, 3)=="msg" and player== adm[1]) then
ui.addTextArea(0, "<b><font color='#DDDDDD' size='14'>["..adm[1].."]</font></b> <font size='12' color='"..color.."'>"..string.sub(c, 4, #c).."<br/><br/><p align='center'><font color='#66FF66' size='16'><a href='event:a'>Ok</a></font></p>", nil, 200, 100, 400, 0, nil, nil, 0.8, true)
elseif (cmd[1]=="color" and player== adm[1]) then
color= cmd[2]
print("<font color='#DDDDDD'>A cor da fonte agora é <font color='"..color.."'>"..color.."</font>.</font>")
end
end
eventTextAreaCallback= function(id, player, event)
ui.removeTextArea(0, player)
end


Comandos:

!msg mensagem: posta a mensagem
!color #000000: muda a cor da fonte, se quiser vê-la olhe no chat #lua. O código a ser digitado em #000000 precisa ser em formato Hexadecimal.

Caso queira mudar quem comanda o script troque o nome em local adm={"Annye#8612"} mantendo as aspas.

Dernière modification le 1577731320000
Felidbr
« Citoyen »
1577731200000
    • Felidbr#0000
    • Profil
    • Derniers messages
    • Tribu
#2242
  0
Bolodefchoco a dit :
Seria mais fácil editar o quiz pra ler mensagens em vez de olhar o lado que o jogador foi

Seria ótimo! Mas não tenho conhecimento o suficiente de Lua para isso. Se alguém puder fazer ficaria muito agradecido!
Annye
« Citoyen »
1577731380000
    • Annye#8612
    • Profil
    • Derniers messages
#2243
  0
Jp_darkuss a dit :
Annye a dit :
Também queria um script, aonde eu pudesse fazer aparecer caixas com mensagens pop up na tela dos jogadores que estão no cafofo da tribo

Tipo, eu usaria o comando

!msg blá blá blá

E apareceria bem no meio da tela do jogador assim:

[Annye#8612] blá blá blá


(Se possível, também queria que desse para mudar a cor das letras)

Script

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
local adm= {"Annye#8612"}
local color="#DDDDDD"
eventChatCommand= function(player, c)
cmd= {}
for i in string.gmatch(c, "%S+") do
table.insert(cmd, i)
end
if (string.sub(c, 1, 3)=="msg" and player== adm[1]) then
ui.addTextArea(0, "<b><font color='#DDDDDD' size='14'>["..adm[1].."]</font></b> <font size='12' color='"..color.."'>"..string.sub(c, 4, #c).."<br/><br/><p align='center'><font color='#66FF66' size='16'><a href='event:a'>Ok</a></font></p>", nil, 200, 100, 400, 0, nil, nil, 0.8, true)
elseif (cmd[1]=="color" and player== adm[1]) then
color= cmd[2]
print("<font color='#DDDDDD'>A cor da fonte agora é <font color='"..color.."'>"..color.."</font>.</font>")
end
end
eventTextAreaCallback= function(id, player, event)
ui.removeTextArea(0, player)
end


Comandos:

!msg mensagem: posta a mensagem
!color #000000: muda a cor da fonte, se quiser vê-la olhe no chat #lua. O código a ser digitado em #000000 precisa ser em formato Hexadecimal.

Caso queira mudar quem comanda o script troque o nome em local adm={"Annye#8612"} mantendo as aspas.

Muito obrigada mesmo ^^
Fly
« Citoyen »
1577756700000
    • Fly#8215
    • Profil
    • Derniers messages
    • Tribu
#2244
  0
Isabel79135 a dit :
sera que poderia fazer um script tipo o breno perguntas? vou explicar

é meio o siguinte uma pessoa aleatoria sera escolhida e entao podera fazer a pergunta e junto com a pergunta colocar a resposta correspondente.
a primeira pessoa que acertar/digitar mais rapido a resposta avançara 1 casa (obs : sao 5 casa) quem chegar na ultima casa tem o direito de fazer a pergunta que quiser o "admin" podera dar skip se ver se a pessoa estiver off (ira ter um timer se a pessoa n conseguir fazer a pergunta a tempo é passado pra outra pessoa aleatoria)

bem se puderem fazer

./sala #bolodefchoco0perguntas

Funciona exatamente como você pediu
Isabel79135
« Citoyen »
1577987880000
    • Isabel79135#8040
    • Profil
    • Derniers messages
#2245
  0
Fly a dit :
Isabel79135 a dit :
sera que poderia fazer um script tipo o breno perguntas? vou explicar

é meio o siguinte uma pessoa aleatoria sera escolhida e entao podera fazer a pergunta e junto com a pergunta colocar a resposta correspondente.
a primeira pessoa que acertar/digitar mais rapido a resposta avançara 1 casa (obs : sao 5 casa) quem chegar na ultima casa tem o direito de fazer a pergunta que quiser o "admin" podera dar skip se ver se a pessoa estiver off (ira ter um timer se a pessoa n conseguir fazer a pergunta a tempo é passado pra outra pessoa aleatoria)

bem se puderem fazer

./sala #bolodefchoco0perguntas

Funciona exatamente como você pediu

a mais n exatamente a sala eu queria o script;-;
Isabel79135
« Citoyen »
1577987940000
    • Isabel79135#8040
    • Profil
    • Derniers messages
#2246
  0
Script que quando eu clico na tela eu me teleporto mais só eu tenho o direito do comando
Helpersgoguega
« Citoyen »
1578001740000
    • Helpersgoguega#7409
    • Profil
    • Derniers messages
#2247
  0
um script que consiga me botar em uma historia e no final tenha BOSS FIGHT
Annye
« Citoyen »
1578078840000
    • Annye#8612
    • Profil
    • Derniers messages
#2248
  0
Um script aonde eu possa dar 'admin' de !draw (Igual em utility) para os jogadores que eu quiser (Inclusive eu)

No !draw pode ter como mudar a cor e tamanho para desenhar. Se possivel, também queria um borrachinha rs
Gamedroit
« Citoyen »
1578098700000
    • Gamedroit#3347
    • Profil
    • Derniers messages
    • Tribu
#2249
  0
Isabel79135 a dit :
Script que quando eu clico na tela eu me teleporto mais só eu tenho o direito do comando

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
do
-- serve para coletar o nome de quem carregou o script
local _, message = pcall(function()
return assert(xpcall(error))
end)

-- "message:match('.-[.]'):sub(1,-2)" é equivalente ao nome + tag do jogador que carregou o script
-- chamar "system.bindMouse" com o segundo parâmetro igual a true(verdadeiro) ativa a captura de cliques e com false(falso) desativa
system.bindMouse(message:match('.-[.]'):sub(1,-2), true)
end

function eventMouse(playerName, x, y)
tfm.exec.movePlayer(playerName, x, y)
end

Basta carregar o script, não é necessário alterar variável alguma.

Dernière modification le 1578098880000
Jp_darkuss
« Citoyen »
1578153960000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2250
  0
Helpersgoguega a dit :
um script que consiga me botar em uma historia e no final tenha BOSS FIGHT

É necessário um mapa e explicação detalhada para fazer este tipo de coisa.

Annye a dit :
Um script aonde eu possa dar 'admin' de !draw (Igual em utility) para os jogadores que eu quiser (Inclusive eu)

No !draw pode ter como mudar a cor e tamanho para desenhar. Se possivel, também queria um borrachinha rs

Desculpe, isto por hora está fora dos meus alcances.
Helpersgoguega
« Citoyen »
1578180420000
    • Helpersgoguega#7409
    • Profil
    • Derniers messages
#2251
  0
tipo e uma historia onde um Mago e rapitado pelo outro mago e preso e eu vou la e tenho que salvar ai eu passo por obstaculos ou seja magos de pouco aprendizado e no final eu batalho com o mago chefe que tem poderes tipo GELO BOLA DE FOGO AGUA TERRA TERREMOTO TUDO ISSO ai depois eu viro um mago e derroto ele
Victorck6
« Citoyen »
1578317160000
    • Victorck6#6662
    • Profil
    • Derniers messages
    • Tribu
#2252
  0
Jp_darkuss a dit :
Victorck6 a dit :
Script pra fazer amigo secreto

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
local adm= "Victorck6#6662"
local gaming= {} --Jogadores que estão jogando no momento
local play= false --verifica se está ou não ocorrendo um jogo
local lobby= {""} --coloque aqui um mapa se quiser com o @
eventNewPlayer= function(player)
ui.addTextArea(0, "<p align='center'><font size='20' color='#1AA7DD'>Secret</font> <font size='20' color='#11B9A3'>Friend!</font></p>", player, 200, 30, 400, 30, 0xDFB4D5, 0xCFA4C5, 1, true)
ui.addTextArea(1, "<p align='center'><font size='18' color='#07CB2A'><b><a href='event:getInGame'>Participar</a></b></font></p>", nil, 245, 75, 310, 30, nil, nil, 0.5, true)
end
ui.addTextArea(0, "<p align='center'><font size='20' color='#1AA7DD'>Secret</font> <font size='20' color='#11B9A3'>Friend!</font></p>", nil, 200, 30, 400, 30, 0xDFB4D5, 0xCFA4C5, 1, true)
ui.addTextArea(1, "<p align='center'><font size='18' color='#07CB2A'><b><a href='event:getInGame'>Participar</a></b></font></p>", nil, 245, 75, 310, 30, nil, nil, 0.5, true)
eventTextAreaCallback= function(id, player, event)
if (event=="getInGame") then
if (play== false) then
ui.updateTextArea(1, "<p align='center'><font size='18' color='#07CB2A'><b>Você está participando!</b></font></p>", player)
else
ui.updateTextArea(1, "<p align='center'><font size='18' color='#FF6666'><b>Espere está partida acabar!</b></font></p>", player)
end
table.insert(gaming, player)
end
if (event=="close") then
ui.removeTextArea(4, player)
end
end
eventChatCommand= function(player, c)
local cmd= {}
for i in string.gmatch(c, "%S+") do
table.insert(cmd, i)
end
if (cmd[1]=="iniciar" and player== adm) then
for i in ipairs(gaming) do
ui.addPopup(2, 2, "<p align='center'><font color='#98E2EB'>Escreva o que você quer enviar (<b>uma palavra apenas</b>), depois o jogador com a #.</font></p>", gaming[i], 325, 150, 150, true)
end
play= true
end
if (cmd[1]=="reset" and player== adm) then
ui.addTextArea(0, "<p align='center'><font size='20' color='#1AA7DD'>Secret</font> <font size='20' color='#11B9A3'>Friend!</font></p>", nil, 200, 30, 400, 30, 0xDFB4D5, 0xCFA4C5, 1, true)
ui.addTextArea(1, "<p align='center'><font size='18' color='#07CB2A'><b><a href='event:getInGame'>Participar</a></b></font></p>", nil, 245, 75, 310, 30, nil, nil, 0.5, true)
play= false
for i in ipairs(gaming) do
table.remove(gaming, i)
end

end
end
eventPopupAnswer= function(id, player, res)
local send= {}
for i in string.gmatch(res, "%S+") do
table.insert(send, i)
end
local permil= false
for i in ipairs(gaming) do
if (send[2]== gaming[i]) then
permil= true
end
end
if (permil== true) then
ui.addTextArea(4, "<p align='center'><font size='20' color='#00CDCA'>Veja só, alguém te deu: <b>"..send[1].."</b>!</font>".."<br/><br/><p align='center'><font size='16' color='#CCFFCD'><a href='event:close'>Ok</a></font></p>", send[2], 250, 120, 300, 0, nil, nil, 1, true)
else
ui.addPopup(2, 2, "<p align='center'><font color='#FF6666' size='16'>Este jogador não está jogando!</font></p><br/><p align='center'><font color='#98E2EB'>Escreva o que você quer enviar (<b>uma palavra apenas</b>), depois o jogador com a #.</font></p>", player, 325, 150, 150, true)
end
end
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.newGame(lobby[1], nil)


Coloque seu nome em local adm= "" entre as aspas.
Coloque o mapa que quiser em local lobby= {""} entre as aspas com o @.

Comandos do adm:

!iniciar (use para iniciar o game)
!reset (use para resetar o game.)

OBS: procure seguir bem as orientações das popups e textareas.

Não pegou amigo
Victorck6
« Citoyen »
1578318360000
    • Victorck6#6662
    • Profil
    • Derniers messages
    • Tribu
#2253
  0
Fly a dit :
Noobloops a dit :
Um script competição de firsts, com mapas que posso selecionar e com uma tabela de pontos, onde cada jogador que firstar um mapa pontua individualmente, vence quem possuir mais pontos no fim da exibição de todos os mapas, e com uma mensagem parabenizando o vencedor final.

Acredito que seja muita coisa, mas seria possível?

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
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
local admin = {
['Noobloops#0000'] = true
}

local players = { }

--[[
• Insira mapas na tabela maps sem o caractere '@':
maps = { 123, 654321, 61 }
]]
local maps = { }

local game_is_started = false
local round_first_win = false

local player_list_text = "<p align='center'><font size='14'><j>Participantes</j></font>\n\n"

local current_map_index = 1

local function init()
for _, v in next, {'AutoShaman', 'AutoNewGame', 'AutoTimeLeft', 'AutoScore', 'PhysicalConsumables'} do
tfm.exec['disable' .. v]()
end

players = { }

current_map_index = 1

tfm.exec.newGame(0)
end

local function display_player_list(target)
ui.addTextArea(1, player_list_text, target, 5, 25, 200, 365, nil, 0, .8)
end

local function update_player_list(target)
local text = player_list_text

for k, v in next, players do
local score_str = ''

local tag = (target == k) and '<v>' or '<n>'

if (game_is_started) then
score_str = score_str .. string.format(': <j>%s ponto(s)', v)
end

text = text .. string.format('%s%s%s', tag, k, score_str) .. '\n'
end

ui.updateTextArea(1, text, target)
end

local function get_next_map()
_next = maps[current_map_index]
if (_next) then
return _next
end

return false
end

local function start_game()
game_is_started = true

tfm.exec.newGame(get_next_map())
end

function eventNewPlayer(player)
if (not game_is_started) then
display_player_list(target)

table.foreach(tfm.get.room.playerList, update_player_list)
end
end

function eventNewGame()
round_first_win = false

if (game_is_started) then
tfm.exec.setGameTime(62, false)

current_map_index = (current_map_index + 1)

for k in next, tfm.get.room.playerList do
if (players[k]) then
tfm.exec.setNameColor(k, 0xFFFFFF)
else
tfm.exec.killPlayer(k)
end
end

for i = -1, 1 do
ui.removeTextArea(i)
end

return
end

for k in next, tfm.get.room.playerList do
tfm.exec.setPlayerScore(k, 0)

if (admin[k]) then
ui.addTextArea(-1, "<p align='center'><a href='event:start'><j>Começar", k, 645, 25, 150, 20, 0x324650, 0, .8)
end
end

ui.addTextArea(0, "<p align='center'><a href='event:entry'><j>Participar", nil, 325, 25, 150, 20, 0x324650, 0, .8)

display_player_list()
end

function eventLoop(elapsed, remaining)
if (remaining <= 0) then
if (game_is_started) then
if (round_first_win) then
tfm.exec.newGame(get_next_map())
else
tfm.exec.newGame(tfm.get.room.currentMap)
end
end
end
end

function eventPlayerWon(player)
if (game_is_started) then
if (not round_first_win) then
round_first_win = true

tfm.exec.setGameTime(4, false)

local player_score = players[player]
if (player_score) then
players[player] = (player_score + 1)
tfm.exec.setPlayerScore(player, (player_score + 1))

if (not get_next_map()) then
game_is_started = false

for k in next, admin do
ui.addTextArea(-1, "<p align='center'><a href='event:restart'><j>Reiniciar", k, 645, 25, 150, 20, 0x324650, 0, .8)
end

local t = { };for k, v in next, players do t[#t + 1] = { k, v } end
table.sort(t, function(a, b) return a[2] > b[2] end)

return ui.addTextArea(1, string.format("<p align='center'><font size='37'>%s É O VENCEDOR. GG</font></font></p>", t[1]), nil, 5, 170, 800, nil, 0, 0, 0, true)
end
end

display_player_list()
table.foreach(tfm.get.room.playerList, update_player_list)
end
end
end

function eventPlayerDied(player)
local a = 0

for _, v in next, tfm.get.room.playerList do
if (not v.isDead) then
a = (a + 1)
end
end

if (game_is_started) then
if (a == 0) then
tfm.exec.setGameTime(4, false)
end
end
end

function eventPlayerLeft(player)
players[player] = nil

table.foreach(tfm.get.room.playerList, update_player_list)
end

function eventTextAreaCallback(_, player, callback)
if (callback == 'entry') then
if (not players[player]) then
players[player] = 0

ui.removeTextArea(0, player)

table.foreach(tfm.get.room.playerList, update_player_list)
end
elseif (callback == 'start') then
if (#maps == 0) then
return ui.addPopup(0, 0, '[Erro] A tabela maps está vazia.', player)
end

start_game()
elseif (callback == 'restart') then
init()
end
end

init()

Kydex a dit :
Script eliminatória x1 racing

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
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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
-- Eliminatória (remake)
-- Versão original: Pidoninho#0000

local admin = { -- Admins
['Kydex#1755'] = true
}

local players = {}

local canFinish = false
local kicking = false
local startGame = false
local finishGame = false

local maxPlayers = 100
local playersInGame = 0

local mapName = '#Elimination'
local mapCode = '17'
local roundWinner = ''
local mapWinner = ''

-- [[ Disable ]] --
system.disableChatCommandDisplay(nil)

for _, v in next, {'AutoTimeLeft', 'AutoShaman', 'AutoNewGame', 'AutoScore', 'AfkDeath', 'PhysicalConsumables'} do
tfm.exec['disable' .. v]()
end

-- [[ Functions Lib ]] --
local split = function(str, s)
local res = {}
for part in string.gmatch(str, "[^" .. s .. "]+") do
table.insert(res, part)
end
return res
end

local showPlayers = function(name)
if (playersInGame > 0) then
local a = 1

local x, y = 20, 60

local id = 1
for k in next, players do
local nick, tag = k:match('(.-)#[0-9]+$'), "<g><font size='9'>" .. k:match('#[0-9]+$')

local text = nick .. tag
if (startGame) then
text = "<a href='event:" .. k .. "'>" .. nick .. tag

ui.addTextArea(0, "<p align='center'><font size='16'><b>Escolha quem eliminar <font size='9'>(ou seja eliminado):", name, 5, 25, 790, 25, 0x324650, 0, .8)
end

local f = function()
ui.addTextArea(id, "<p align='center'>" .. text, name, x, y, 100, 20, 0x324650, 0, .8)

if (a < 7) then
a = (a + 1)

x = (x + 110)
else
a = 1

x, y = 20, (y + 30)
end

id = (id + 1)
end

if (kicking and name ~= k) then
f()
elseif (not kicking) then
f()
end
end
end
end

local start = function()
playersInGame = 0

tfm.exec.newGame('<C><P /><Z><S><S L="800" H="40" X="400" Y="380" T="14" P="0,0,0.3,0.2,0,0,0,0" /><S L="800" X="780" H="40" Y="400" T="14" P="0,0,,,90,0,0,0" /><S L="800" H="40" X="20" Y="400" T="14" P="0,0,,,90,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="6a7495" X="400" c="4" N="" Y="200" T="12" H="400" /></S><D /><O /></Z></C>')

for k in next, admin do
ui.addTextArea(-1, "<p align='center'><a href='event:start'><j>Começar", k, 5, 25, 150, 20, 0x324650, 0, .8)
end

ui.addTextArea(0, "<p align='center'><a href='event:entry'><j>Participar", nil, 325, 25, 150, 20, 0x324650, 0, .8)

for k in next, tfm.get.room.playerList do
tfm.exec.setPlayerScore(k, 0)
end

showPlayers()
end

-- [[ API ]] --
function eventNewPlayer(name)
if (not startGame) then
local text = "<p align='center'><j>Você está participando."
if (not players[name]) then
text = "<p align='center'><a href='event:entry'><j>Participar"
end

ui.addTextArea(0, text, name, 325, 25, 150, 20, 0x324650, 0, .8)

showPlayers(name)
end

tfm.exec.bindKeyboard(name, 87, true)

tfm.exec.setPlayerScore(name, 0)
end
table.foreach(tfm.get.room.playerList, eventNewPlayer)

function eventNewGame()
canFinish = false
kicking = false

mapWinner = ''

if (startGame) then
ui.removeTextArea(0)

tfm.exec.addPhysicObject(0, 380, -325, {type = 14, width = 40, height = 10})
tfm.exec.addPhysicObject(1, 380, -365, {type = 14, width = 60, height = 10})
tfm.exec.addPhysicObject(2, 355, -340, {type = 14, width = 40, height = 10, angle = -90})
tfm.exec.addPhysicObject(3, 405, -340, {type = 14, width = 40, height = 10, angle = -90})

for k in next, tfm.get.room.playerList do
if (not players[k]) then
tfm.exec.movePlayer(k, 380, -340)
end
end

if (roundWinner ~= '') then
if (finishGame) then
if (players[roundWinner] and #players[roundWinner] > 0) then
local text = 'Eliminou: '

for i = 1, #players[roundWinner] do
local nick, tag = '<n>' .. players[roundWinner][i]:match('(.-)#[0-9]+$'), "<g><font size='9'>" .. players[roundWinner][i]:match('#[0-9]+$')
text = text .. nick .. tag .. (i < #players[roundWinner] and '<n>,</n> ' or '<n>.</n>')
print(i)
end

ui.addTextArea(0, text, nil, 5, 25, 200, 20, 0x324650)
end

tfm.exec.playEmote(roundWinner, 0)

tfm.exec.setGameTime(10)
else
tfm.exec.setGameTime(63)
end
else
tfm.exec.setGameTime(63)
end
else
players = {}

tfm.exec.setGameTime(99999)
end

mapName = (tfm.get.room.xmlMapInfo.author ~= '#Module' and tfm.get.room.xmlMapInfo.author or mapName)
mapCode = tfm.get.room.currentMap or mapCode
ui.setMapName('<j>' .. mapName .. ' <bl>- ' .. mapCode .. ' <g>| <n>Competidores : <v>' .. playersInGame .. '/' .. maxPlayers)
end

function eventLoop(elapsed, remaining)
local remaining = math.floor(remaining / 1000)

if (remaining < 0) then
if (finishGame) then
finishGame = false
startGame = false

start()

return
end

if (startGame) then
if (canFinish and roundWinner ~= '') then
finishGame = true

tfm.exec.newGame('<C><P /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="200" o="324650" X="400" Y="283" T="12" H="40" /><S L="100" o="324650" X="400" H="40" Y="243" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="40" o="324650" H="40" Y="203" T="12" X="400" /><S L="10" X="379" H="40" Y="160" T="14" P="0,0,0.3,0.2,0,0,0,0" /><S L="10" X="420" H="40" Y="160" T="14" P="0,0,0.3,0.2,0,0,0,0" /><S L="40" X="400" H="10" Y="137" T="14" P="0,0,0.3,0.2,0,0,0,0" /></S><D><DS Y="168" X="400" /></D><O /></Z></C>')
else
tfm.exec.newGame('#17')
end
else
ui.removeTextArea(0)

start()
end
end
end

function eventPlayerWon(name)
if (startGame) then
if (mapWinner == '') then
mapWinner = name

local a = 0
for k in next, players do
a = (a + 1)
end
if (a > 2) then
kicking = true

tfm.exec.setGameTime(10, false)

showPlayers(name)
else
for k in next, players do
if (k ~= name) then
players[k] = nil

break
end
end

canFinish = true

roundWinner = name

tfm.exec.setGameTime(4, false)
end

tfm.exec.setPlayerScore(name, tfm.get.room.playerList[name].score + 1)
end
end
end

function eventPlayerDied(name)
local a = 0
for k, v in next, tfm.get.room.playerList do
if (not v.isDead) then
a = (a + 1)
end
end
if (a == 0) then
if (startGame) then
tfm.exec.newGame('#17')
end
end
end

function eventPlayerLeft(name)
players[name] = nil

playersInGame = (playersInGame - 1)
ui.setMapName('<j>' .. mapName .. ' <bl>- ' .. mapCode .. ' <g>| <n>Competidores : <v>' .. playersInGame .. '/' .. maxPlayers)

if (not startGame) then
showPlayers()
end

if (kicking) then
showPlayers(mapWinner)
end
end

function eventChatCommand(name, cmd)
cmd = split(cmd, ' ')

-- [[ Adm Commands ]] --
if (admin[name]) then
if (cmd[1] == 'start') then
local a = 0
for k in next, players do
a = (a + 1)
end
if (a > 1) then
for i = -1, a do
ui.removeTextArea(i)
end

startGame = true

tfm.exec.newGame('#17')
end
end
end
end

function eventTextAreaCallback(id, name, cb)
if (cb == 'entry') then
if (not players[name]) then
players[name] = {}

playersInGame = (playersInGame + 1)
ui.setMapName('<j>' .. mapName .. ' <bl>- ' .. mapCode .. ' <g>| <n>Competidores : <v>' .. playersInGame .. '/' .. maxPlayers)
ui.updateTextArea(0, '<j>Você está participando.', name)

showPlayers()
end
elseif (cb == 'start') then
eventChatCommand(name, cb)
elseif (players[cb] and kicking) then
if (cb == roundWinner) then
roundWinner = ''
end

kicking = false
players[cb] = nil

playersInGame = (playersInGame - 1)

local a = 1
for k in next, players do
a = (a + 1)
end
for i = 1, a do
ui.removeTextArea(i)
end

players[name][#players[name] + 1] = cb

ui.addTextArea(0, "<p align='center'><font size='16'><b><v>" .. name .. " eliminou <r>" .. cb, nil, 5, 25, 790, 25, 0x324650, 0, .8)
ui.setMapName('<j>' .. mapName .. ' <bl>- ' .. mapCode .. ' <g>| <n>Competidores : <v>' .. playersInGame .. '/' .. maxPlayers)

tfm.exec.setGameTime(4, false)
end
end

start()

Depois que não tem mais mapas o script não diz quem fez mais pontos
Isabel79135
« Citoyen »
1578350640000
    • Isabel79135#8040
    • Profil
    • Derniers messages
#2254
  0
script que quando apertamos espaço atira um baiacu mais poderia ter tipo velocidade para jogar? (tipo eu poder mudar a velocidade do baiacu )
Luskmaps
« Citoyen »
1578351120000
    • Luskmaps#0200
    • Profil
    • Derniers messages
    • Tribu
#2255
  0
É possível fazer um script de sorteio que os próprios usuários clicam para participar do sorteio que tenha um designer legal ?
E que tipo o lider que esta gerenciando o script tenha uma mensagem diferenciada dos demais jogadores no chat.

Dernière modification le 1578351180000
Esthergames
« Citoyen »
1578531720000
    • Esthergames#0147
    • Profil
    • Derniers messages
#2256
  0
Como começar uma partida de #mestre por esse script do Rianmojang1 ?
ttps://pastebin.com/raw/icc9SnaB
Jp_darkuss
« Citoyen »
1578570960000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2257
  0
Victorck6 a dit :
Jp_darkuss a dit :
Victorck6 a dit :
Script pra fazer amigo secreto

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
local adm= "Victorck6#6662"
local gaming= {} --Jogadores que estão jogando no momento
local play= false --verifica se está ou não ocorrendo um jogo
local lobby= {""} --coloque aqui um mapa se quiser com o @
eventNewPlayer= function(player)
ui.addTextArea(0, "<p align='center'><font size='20' color='#1AA7DD'>Secret</font> <font size='20' color='#11B9A3'>Friend!</font></p>", player, 200, 30, 400, 30, 0xDFB4D5, 0xCFA4C5, 1, true)
ui.addTextArea(1, "<p align='center'><font size='18' color='#07CB2A'><b><a href='event:getInGame'>Participar</a></b></font></p>", nil, 245, 75, 310, 30, nil, nil, 0.5, true)
end
ui.addTextArea(0, "<p align='center'><font size='20' color='#1AA7DD'>Secret</font> <font size='20' color='#11B9A3'>Friend!</font></p>", nil, 200, 30, 400, 30, 0xDFB4D5, 0xCFA4C5, 1, true)
ui.addTextArea(1, "<p align='center'><font size='18' color='#07CB2A'><b><a href='event:getInGame'>Participar</a></b></font></p>", nil, 245, 75, 310, 30, nil, nil, 0.5, true)
eventTextAreaCallback= function(id, player, event)
if (event=="getInGame") then
if (play== false) then
ui.updateTextArea(1, "<p align='center'><font size='18' color='#07CB2A'><b>Você está participando!</b></font></p>", player)
else
ui.updateTextArea(1, "<p align='center'><font size='18' color='#FF6666'><b>Espere está partida acabar!</b></font></p>", player)
end
table.insert(gaming, player)
end
if (event=="close") then
ui.removeTextArea(4, player)
end
end
eventChatCommand= function(player, c)
local cmd= {}
for i in string.gmatch(c, "%S+") do
table.insert(cmd, i)
end
if (cmd[1]=="iniciar" and player== adm) then
for i in ipairs(gaming) do
ui.addPopup(2, 2, "<p align='center'><font color='#98E2EB'>Escreva o que você quer enviar (<b>uma palavra apenas</b>), depois o jogador com a #.</font></p>", gaming[i], 325, 150, 150, true)
end
play= true
end
if (cmd[1]=="reset" and player== adm) then
ui.addTextArea(0, "<p align='center'><font size='20' color='#1AA7DD'>Secret</font> <font size='20' color='#11B9A3'>Friend!</font></p>", nil, 200, 30, 400, 30, 0xDFB4D5, 0xCFA4C5, 1, true)
ui.addTextArea(1, "<p align='center'><font size='18' color='#07CB2A'><b><a href='event:getInGame'>Participar</a></b></font></p>", nil, 245, 75, 310, 30, nil, nil, 0.5, true)
play= false
for i in ipairs(gaming) do
table.remove(gaming, i)
end

end
end
eventPopupAnswer= function(id, player, res)
local send= {}
for i in string.gmatch(res, "%S+") do
table.insert(send, i)
end
local permil= false
for i in ipairs(gaming) do
if (send[2]== gaming[i]) then
permil= true
end
end
if (permil== true) then
ui.addTextArea(4, "<p align='center'><font size='20' color='#00CDCA'>Veja só, alguém te deu: <b>"..send[1].."</b>!</font>".."<br/><br/><p align='center'><font size='16' color='#CCFFCD'><a href='event:close'>Ok</a></font></p>", send[2], 250, 120, 300, 0, nil, nil, 1, true)
else
ui.addPopup(2, 2, "<p align='center'><font color='#FF6666' size='16'>Este jogador não está jogando!</font></p><br/><p align='center'><font color='#98E2EB'>Escreva o que você quer enviar (<b>uma palavra apenas</b>), depois o jogador com a #.</font></p>", player, 325, 150, 150, true)
end
end
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.newGame(lobby[1], nil)


Coloque seu nome em local adm= "" entre as aspas.
Coloque o mapa que quiser em local lobby= {""} entre as aspas com o @.

Comandos do adm:

!iniciar (use para iniciar o game)
!reset (use para resetar o game.)

OBS: procure seguir bem as orientações das popups e textareas.

Não pegou amigo

O que não está funcionando bem? Se me disser talvez ainda possa concertar.
Victorck6
« Citoyen »
1578603240000
    • Victorck6#6662
    • Profil
    • Derniers messages
    • Tribu
#2258
  0
Jp_darkuss a dit :
Victorck6 a dit :
Jp_darkuss a dit :
Victorck6 a dit :
Script pra fazer amigo secreto

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
local adm= "Victorck6#6662"
local gaming= {} --Jogadores que estão jogando no momento
local play= false --verifica se está ou não ocorrendo um jogo
local lobby= {""} --coloque aqui um mapa se quiser com o @
eventNewPlayer= function(player)
ui.addTextArea(0, "<p align='center'><font size='20' color='#1AA7DD'>Secret</font> <font size='20' color='#11B9A3'>Friend!</font></p>", player, 200, 30, 400, 30, 0xDFB4D5, 0xCFA4C5, 1, true)
ui.addTextArea(1, "<p align='center'><font size='18' color='#07CB2A'><b><a href='event:getInGame'>Participar</a></b></font></p>", nil, 245, 75, 310, 30, nil, nil, 0.5, true)
end
ui.addTextArea(0, "<p align='center'><font size='20' color='#1AA7DD'>Secret</font> <font size='20' color='#11B9A3'>Friend!</font></p>", nil, 200, 30, 400, 30, 0xDFB4D5, 0xCFA4C5, 1, true)
ui.addTextArea(1, "<p align='center'><font size='18' color='#07CB2A'><b><a href='event:getInGame'>Participar</a></b></font></p>", nil, 245, 75, 310, 30, nil, nil, 0.5, true)
eventTextAreaCallback= function(id, player, event)
if (event=="getInGame") then
if (play== false) then
ui.updateTextArea(1, "<p align='center'><font size='18' color='#07CB2A'><b>Você está participando!</b></font></p>", player)
else
ui.updateTextArea(1, "<p align='center'><font size='18' color='#FF6666'><b>Espere está partida acabar!</b></font></p>", player)
end
table.insert(gaming, player)
end
if (event=="close") then
ui.removeTextArea(4, player)
end
end
eventChatCommand= function(player, c)
local cmd= {}
for i in string.gmatch(c, "%S+") do
table.insert(cmd, i)
end
if (cmd[1]=="iniciar" and player== adm) then
for i in ipairs(gaming) do
ui.addPopup(2, 2, "<p align='center'><font color='#98E2EB'>Escreva o que você quer enviar (<b>uma palavra apenas</b>), depois o jogador com a #.</font></p>", gaming[i], 325, 150, 150, true)
end
play= true
end
if (cmd[1]=="reset" and player== adm) then
ui.addTextArea(0, "<p align='center'><font size='20' color='#1AA7DD'>Secret</font> <font size='20' color='#11B9A3'>Friend!</font></p>", nil, 200, 30, 400, 30, 0xDFB4D5, 0xCFA4C5, 1, true)
ui.addTextArea(1, "<p align='center'><font size='18' color='#07CB2A'><b><a href='event:getInGame'>Participar</a></b></font></p>", nil, 245, 75, 310, 30, nil, nil, 0.5, true)
play= false
for i in ipairs(gaming) do
table.remove(gaming, i)
end

end
end
eventPopupAnswer= function(id, player, res)
local send= {}
for i in string.gmatch(res, "%S+") do
table.insert(send, i)
end
local permil= false
for i in ipairs(gaming) do
if (send[2]== gaming[i]) then
permil= true
end
end
if (permil== true) then
ui.addTextArea(4, "<p align='center'><font size='20' color='#00CDCA'>Veja só, alguém te deu: <b>"..send[1].."</b>!</font>".."<br/><br/><p align='center'><font size='16' color='#CCFFCD'><a href='event:close'>Ok</a></font></p>", send[2], 250, 120, 300, 0, nil, nil, 1, true)
else
ui.addPopup(2, 2, "<p align='center'><font color='#FF6666' size='16'>Este jogador não está jogando!</font></p><br/><p align='center'><font color='#98E2EB'>Escreva o que você quer enviar (<b>uma palavra apenas</b>), depois o jogador com a #.</font></p>", player, 325, 150, 150, true)
end
end
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.newGame(lobby[1], nil)


Coloque seu nome em local adm= "" entre as aspas.
Coloque o mapa que quiser em local lobby= {""} entre as aspas com o @.

Comandos do adm:

!iniciar (use para iniciar o game)
!reset (use para resetar o game.)

OBS: procure seguir bem as orientações das popups e textareas.

Não pegou amigo

O que não está funcionando bem? Se me disser talvez ainda possa concertar.

Coloquei na mensagem: Oi, e o nick da pessoa e pegou.

Mas depois fui fazer outro teste: Oi novato, e o nick da pessoa e não pegou

Ou seja se nessa mensagem tive *espaço* não vai funciona, tem que enviar tudo junto... resolve isso

Print: https://prnt.sc/qlihh1

Dernière modification le 1578603300000
Victorck6
« Citoyen »
1578603660000
    • Victorck6#6662
    • Profil
    • Derniers messages
    • Tribu
#2259
  0
Fly a dit :
Isabel79135 a dit :
sera que poderia fazer um script tipo o breno perguntas? vou explicar

é meio o siguinte uma pessoa aleatoria sera escolhida e entao podera fazer a pergunta e junto com a pergunta colocar a resposta correspondente.
a primeira pessoa que acertar/digitar mais rapido a resposta avançara 1 casa (obs : sao 5 casa) quem chegar na ultima casa tem o direito de fazer a pergunta que quiser o "admin" podera dar skip se ver se a pessoa estiver off (ira ter um timer se a pessoa n conseguir fazer a pergunta a tempo é passado pra outra pessoa aleatoria)

bem se puderem fazer

./sala #bolodefchoco0perguntas

Funciona exatamente como você pediu

Como faço pra ter no cafofo ? Alguém diz ai
Bolodefchoco
« Sénateur »
1578604920000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#2260
  0
Victorck6 a dit :
Fly a dit :
Isabel79135 a dit :
sera que poderia fazer um script tipo o breno perguntas? vou explicar

é meio o siguinte uma pessoa aleatoria sera escolhida e entao podera fazer a pergunta e junto com a pergunta colocar a resposta correspondente.
a primeira pessoa que acertar/digitar mais rapido a resposta avançara 1 casa (obs : sao 5 casa) quem chegar na ultima casa tem o direito de fazer a pergunta que quiser o "admin" podera dar skip se ver se a pessoa estiver off (ira ter um timer se a pessoa n conseguir fazer a pergunta a tempo é passado pra outra pessoa aleatoria)

bem se puderem fazer

./sala #bolodefchoco0perguntas

Funciona exatamente como você pediu

Como faço pra ter no cafofo ? Alguém diz ai

Oi, você não pode... A menos que seja dono da sua tribo?
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Seção Editor de Mapas e Modules
  • /
  • [Lua] Peça scripts aqui!
« ‹ 113 / 133 › »
© Atelier801 2018

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

Version 1.27