View difference between Paste ID: y8pbzEv6 and FgEutmGP
SHOW: | | - or go back to the newest paste.
1
-- UNO
2
-- Escrito por Ninguem - Data 04/09/2015
3
4
-- Comandos
5
-- !start - inicia a partida
6
-- !new - começa uma nova partida
7
-- !skip - pula a vez do jogador atual
8
-- !ban nome - tira um jogador da partida
9-
autoStart = true -- inicia e encerra a partida sozinho sem precisar dar !start e !new
9+
10
-- VARIÁVEIS EDITÁVEIS
11
12
adm = "Ninguem" -- seu nick
13
gameName = "UNO!" -- nome do mapa
14
configTempo = 15000 -- tempo limite entre cada jogada
15
autoStart = false -- inicia e encerra a partida sozinho sem precisar dar !start e !new
16
17
mapa = [[<C><P /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="214a25" X="400" c="3" Y="135" T="12" H="40" /><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="214a25" X="400" N="" Y="370" T="12" H="60" /><S P="0,0,0,0.2,0,0,0,0" L="200" o="6a7495" X="900" c="3" N="" Y="200" T="12" H="3000" /><S H="3000" L="200" o="6a7495" X="-100" c="3" N="" Y="200" T="12" P="0,0,0,0.2,0,0,0,0" /><S H="100" L="800" o="6a7495" X="400" c="4" N="" Y="-41" T="12" P="0,0,0,0.2,0,0,0,0" /></S><D><P C="ffd800" Y="60" T="90" P="0,0" X="400" /><P C="ffd800" Y="60" T="90" X="606" P="0,0" /><P C="ffd800" Y="60" T="90" P="0,0" X="812" /><P C="ffd800" Y="60" T="90" X="194" P="0,0" /><P C="ffd800" Y="60" T="90" P="0,0" X="-12" /><P C="317c39" Y="125" T="34" X="0" P="0,0" /><P C="8a311b" Y="135" T="19" X="150" P="0,0" /><P C="8a311b" Y="135" T="19" P="0,0" X="250" /><P C="8a311b" Y="134" T="19" X="350" P="0,0" /><P C="8a311b" Y="134" T="19" P="0,0" X="450" /><P C="8a311b" Y="134" T="19" X="550" P="0,0" /><P C="8a311b" Y="134" T="19" P="0,0" X="650" /><P C="8a311b" Y="135" T="19" P="0,0" X="50" /><P C="8a311b" Y="134" T="19" X="750" P="0,0" /><DS Y="100" X="400" /></D><O /></Z></C>]]
18
19
-- cores das cartas
20
-- vermelho, azul, amarelo, verde, preto
21
corInt = {0xFF3232, 0x5365CC, 0xFFD800, 0x73D33B, 1}
22
corStr = {"FF3232", "5365CC", "FFD800", "73D33B", "000000"}
23
24
-- ícones das cartas especiais
25
rev="&#167;"
26
skip="&#216;"
27
d2="+2"
28
d4="+4"
29
wild="*"
30
31
-- baralho com 108 cartas
32
cartas = { -- {cor,valor}
33
	{1,"0"},{1,"1"},{1,"1"},{1,"2"},{1,"2"},{1,"3"},{1,"3"},{1,"4"},{1,"4"},{1,"5"},{1,"5"},{1,"6"},{1,"6"},{1,"7"},{1,"7"},{1,"8"},{1,"8"},{1,"9"},{1,"9"},{1,rev},{1,rev},{1,skip},{1,skip},{1,d2},{1,d2},
34
	{2,"0"},{2,"1"},{2,"1"},{2,"2"},{2,"2"},{2,"3"},{2,"3"},{2,"4"},{2,"4"},{2,"5"},{2,"5"},{2,"6"},{2,"6"},{2,"7"},{2,"7"},{2,"8"},{2,"8"},{2,"9"},{2,"9"},{2,rev},{2,rev},{2,skip},{2,skip},{2,d2},{2,d2},
35
	{3,"0"},{3,"1"},{3,"1"},{3,"2"},{3,"2"},{3,"3"},{3,"3"},{3,"4"},{3,"4"},{3,"5"},{3,"5"},{3,"6"},{3,"6"},{3,"7"},{3,"7"},{3,"8"},{3,"8"},{3,"9"},{3,"9"},{3,rev},{3,rev},{3,skip},{3,skip},{3,d2},{3,d2},
36
	{4,"0"},{4,"1"},{4,"1"},{4,"2"},{4,"2"},{4,"3"},{4,"3"},{4,"4"},{4,"4"},{4,"5"},{4,"5"},{4,"6"},{4,"6"},{4,"7"},{4,"7"},{4,"8"},{4,"8"},{4,"9"},{4,"9"},{4,rev},{4,rev},{4,skip},{4,skip},{4,d2},{4,d2},
37
	{5,wild},{5,wild},{5,wild},{5,wild},{5,d4},{5,d4},{5,d4},{5,d4},
38
}
39
40
-- TEXTOS
41
42
txtDraw = "Jogue um %s ou compre %d cartas."
43
txtSit = "Vá até uma cadeira e aperte espaço para pegar seu lugar!"
44
txtGameOver = "%s venceu o jogo!"
45
txtPass = "Passar a vez"
46
txtWarn = "Volte para sua cadeira!"
47
txtChoose = "Escolha uma cor"
48
txtRed = "VERMELHO"
49
txtBlue = "AZUL"
50
txtYellow = "AMARELO"
51
txtGreen = "VERDE"
52
53
-- VARIÁVEIS DE JOGO
54
55
comandos = {"ban", "kick", "new", "start"}
56
baralho = {}
57
pilha = {}
58
jogador = {}
59
nome = {}
60
timerTxt = {}
61
modo = "inicio"
62
duelo = false
63
atual = nil
64
vez = false
65
sel = true
66
draw = false
67
acumulo = 0
68
acumulo4 = 0
69
fluxo = 1
70
tempoJogada = os.time() + 15000
71
tempo = os.time()+1000
72
73
-- FUNÇÕES AUXILIARES -- podem funcionar em outros scripts
74
75
function split(t,s) -- retorna uma table com a string dividida
76
	local a={}
77
	for i,v in string.gmatch(t,string.format("[^%s]+",s or "%s")) do
78
		table.insert(a,i)
79
	end
80
	return a
81
end
82
83
function arrumaNick(p) -- retorna o nick com o formato padrão (inicial maiúscula e restante minúsculo)
84
	return p:sub(1,1):upper() .. p:sub(2):lower()
85
end
86
87
function embaralhar(b) -- embaralha uma table recebida
88
	local novo = {}
89
	local rand = {}
90
	for i=1, #b do
91
		rand[i] = i
92
	end
93
	for i=1, #b do
94
		local r = math.random(#rand)
95
		table.insert(novo, b[rand[r]])
96
		table.remove(rand, r)
97
	end
98
	return novo
99
end
100
101
function efeitoExplosao(id, x, y, vezes, vel) -- faz uma mini explosão de partículas
102
	for i=1, vezes do
103
		tfm.exec.displayParticle(id, x, y, math.random(-vel,vel)/10, math.random(-vel,vel)/10, 0, 0)
104
	end
105
end
106
107
function apagaText() -- procura textos pra apagar, requer uma table global timerTxt, preenchida com {id=idDaTextArea, p=JogadorAlvo, time=TempoDeDuracao}
108
	local apagar={}
109
	for i,v in pairs(timerTxt) do
110
		if v.time<os.time() then
111
			table.insert(apagar,i)
112
			ui.removeTextArea(v.id, v.p)
113
		end
114
	end
115
	for i=1,#apagar do
116
		timerTxt[apagar[i]]=nil
117
	end
118
end
119
120
function timerText(i, t, pp) -- auxilia no preenchimento da tabela timerTxt
121
	table.insert(timerTxt, {id=i, time=os.time()+t, p=pp})
122
end
123
124
-- FUNÇÕES DO SCRIPT
125
126
function novoJogo()
127
	for i=1, 50 do
128
		ui.removeTextArea(i)
129
	end
130
	for i=1, 8 do
131
		if jogador[i] then
132
			nome[jogador[i].nome] = nil
133
			jogador[i] = nil
134
		end
135
	end
136
	ui.removeTextArea(100)
137
	modo = "inicio"
138
	tfm.exec.newGame(mapa)
139
end
140
141
function desenhaCarta(i, c, p, x, y)
142
	ui.addTextArea(i, "\n<p align='center'><font size='23px' color='#ffffff'>"..c[2], p, x, y, 40, 60, corInt[c[1]], 0xffffff, 1,false)
143
end
144
145
function desenhaBaralho(p)
146
	ui.addTextArea(11, "", p, 330, 200, 40, 60, 1, 0xffffff, 1,false)
147
	ui.addTextArea(12, "<p align='center'><font size='12px' color='#FFD800'>UNO", p, 333, 223, 34, 16, 0xFF3232, 0xFF3232, 1,false)
148
end
149
150
function atualizaScore(n, p)
151
	ui.addTextArea(n, "<p align='center'>"..jogador[n].nome.."<b>\n<font size='18px'><j>"..(#jogador[n].mao~=1 and #jogador[n].mao or "UNO!"), p, (n-1)*100-50, 115, 200, 60, 0, 0, 0, false)
152
end
153
154
function atualizaMao(p)
155
	for i=20, 50 do
156
		ui.removeTextArea(i, p)
157
	end
158
	for i, v in pairs(jogador[nome[p]].mao) do
159
		desenhaCarta(i+20, v, p, 400-(#jogador[nome[p]].mao*25)+50*(i-1), 330)
160
	end
161
end
162
163
function atualizaFluxo(p)
164
	defFluxo = {
165
		"&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;",
166
		"&lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt; &lt;"
167
	}
168
	ui.addTextArea(14, string.format("<p align='center'><font size='20px' color='#214A25'><b>%s", defFluxo[fluxo]), p, 0, 160, 800, 120, 0, 0, 0, false)
169
end
170
171
function atualizaPonteiro(p)
172
	ui.addTextArea(13, "", p, 100*(vez-1), 30, 100, 120, -1, 0xffffff, 1, false)
173
end
174
175
function atualizaTimer()
176
	tempoJogada = os.time() + configTempo
177
end
178
179
function criaJogador(p, n)
180
	jogador[n] = {nome=p, mao={}, timer=os.time()+2000}
181
	atualizaScore(n)
182
	ui.removeTextArea(0, p)
183
	nome[p] = n
184
end
185
186
function removeJogadorUI(p, n)
187
	ui.removeTextArea(n)
188
	jogador[n] = nil
189
	nome[p] = nil
190
end
191
192
function removeJogador(p, n)
193
	if n == vez then
194
		autoPlay()
195
	end
196
	for i=1, #jogador[n].mao do
197
		table.insert(pilha, table.remove(jogador[n].mao))
198
	end
199
	removeJogadorUI(p, n)
200
end
201
202
function ordenar(b)
203
	table.sort(b, function(a, b)
204
		p = {["0"]=0,["1"]=1,["2"]=2,["3"]=3,["4"]=4,["5"]=5,["6"]=6,["7"]=7,["8"]=8,["9"]=9,[rev]=10,[skip]=11,[d2]=12,[wild]=13,[d4]=14,}
205
		if a[1] ~= b[1] then
206
			return a[1] < b[1]
207
		else
208
			return p[a[2]] < p[b[2]]
209
		end
210
	end)
211
end
212
213
function comprarCartas(p, qtd)
214
	ui.addTextArea(70+nome[p], "<p align='center'><font size='20px'><bv><b>+"..qtd, nil, (nome[p]-1)*100, 145, 100, 60, 0, 0, 0, false)
215
	timerText(70+nome[p], 2000)
216
	for i=1, qtd do
217
		if #baralho == 0 then
218
			baralho = embaralhar(pilha)
219
			pilha = {}
220
		end
221
		table.insert(jogador[nome[p]].mao, table.remove(baralho))
222
	end
223
	ordenar(jogador[nome[p]].mao)
224
	atualizaMao(p)
225
	atualizaScore(nome[p])
226
end
227
228
function pegaAnterior()
229
	local n = vez
230
	repeat
231
		n = fluxo == 1 and (n == 1 and 8 or n - 1) or (n == 8 and 1 or n + 1)
232
	until jogador[n]
233
	return n
234
end
235
236
function pegaProximo()
237
	local n = vez
238
	repeat
239
		n = fluxo == 1 and (n == 8 and 1 or n + 1) or (n == 1 and 8 or n - 1)
240
	until jogador[n]
241
	return n
242
end
243
244
function passarVez()
245
	vez = pegaProximo()
246
	draw = false
247
	atualizaPonteiro()
248
	atualizaTimer()
249
	ui.removeTextArea(15)
250
	ui.removeTextArea(16)
251
	ui.removeTextArea(17)
252
end
253
254
function estaNoLugar(p)
255
	local x = tfm.get.room.playerList[p].x
256
	return nome[p] and x > (nome[p]-1)*100+20 and x < (nome[p]-1)*100+80
257
end
258
259
function usaDraw4()
260
	acumulo4 = acumulo4 + 4
261
	ui.addTextArea(16, string.format("<p align='center'>"..txtDraw, d4, acumulo4), jogador[vez].nome, 250, 290, 300, 20, 1, 1, 0.4, true)
262
end
263
264
function autoPlay()
265
	local p = jogador[vez].nome
266
	n = acumulo > 0 and acumulo or acumulo4 > 0 and acumulo4 or 1
267
	acumulo = 0
268
	acumulo4 = 0
269
	if not draw then
270
		comprarCartas(p, n)
271
	end
272
	passarVez()
273
	if atual[1] == 5 then
274
		mudaCor()
275
		sel = true
276
		if atual[2] == d4 then
277
			usaDraw4()
278
		end
279
	end
280
end
281
282
function mudaCor(n)
283
	atual[1] = n or math.random(1,4)
284
	desenhaCarta(10, atual, nil, 420, 200)
285
	local b = {21, 23, 24, 22}
286
	efeitoExplosao(b[atual[1]], 445, 230, 30, 20)
287
end
288
289
function usaSkip()
290
	efeitoExplosao(35, pegaProximo()*100-50, 100, 50, 10)
291
	passarVez()
292
end
293
294
function usaReverse()
295
	fluxo = fluxo == 1 and 2 or 1
296
	atualizaFluxo()
297
	for i=20, 780, 10 do
298
		tfm.exec.displayParticle(3, i, 177, 0, 0, 0, 0)
299
	end
300
end
301
302
-- EVENTOS
303
304
function eventNewGame()
305
	tempo = os.time()+1000
306
	tfm.exec.setUIMapName(gameName)
307
	ui.addTextArea(0, "<font size='25px'><p align='center'>"..txtSit, nil, 0, 180, 800, 200, 0, 0, 0, false)
308
	for i, v in pairs(tfm.get.room.playerList) do
309
		tfm.exec.bindKeyboard(i, 32, true, true)
310
		system.bindMouse(i, true)
311
	end
312
end
313
314
function eventTextAreaCallback(id, p, cmd)
315
	if id == 15 and nome[p] == vez then
316
		mudaCor(tonumber(cmd))
317
		passarVez()
318
		sel = true
319
		if atual[2] == d4 then
320
			acumulo4 = acumulo4 + 4
321
			ui.addTextArea(16, string.format("<p align='center'>"..txtDraw, d4, acumulo4), jogador[vez].nome, 250, 290, 300, 20, 1, 1, 0.4, true)
322
		end
323
	end
324
end
325
326
function eventMouse(p, x, y)
327
	if modo == "start" then
328
		local xx =  tfm.get.room.playerList[p].x
329
		if jogador[nome[p]] and y > 325 and y < 400 and estaNoLugar(p) then
330
			local carta = math.ceil((x+5 - (400 - (#jogador[nome[p]].mao*25)))/50)
331
			local mao = jogador[nome[p]].mao
332
			if vez == nome[p] and sel then
333
				if mao[carta] and (acumulo == 0 or mao[carta][2] == d2) and (acumulo4 == 0 or mao[carta][2] == d4) and (mao[carta][1] == atual[1] or mao[carta][2] == atual[2] or mao[carta][2] == wild or mao[carta][2] == d4) then
334
					if atual[2] == d4 or atual[2] == wild then
335
						atual[1] = 5
336
					end
337
					table.insert(pilha, atual)
338
					atual = table.remove(mao, carta)
339
					atualizaMao(p)
340
					desenhaCarta(10, atual, nil, 420, 200)
341
					atualizaScore(nome[p])
342
					if #jogador[nome[p]].mao == 0 then
343
						ui.addTextArea(13, "", nil, 5, 5, 790, 400, 1, 1, 0.5, false)
344
						ui.addTextArea(14, string.format("<p align='center'><font size='60px' color='#ffffff'>"..txtGameOver, p), nil, 0, 170, 800, 400, 0, 0, 0, false)
345
						tfm.exec.setPlayerScore(p, 1, true)
346
						modo = "fim"
347
					else
348
						if atual[2] == wild or atual[2] == d4 then
349
							sel = false
350
							draw = true
351
							ui.addTextArea(15, string.format("<p align='center'>%s\n<a href='event:1'><font color='#FF3232'>%s</font></a> - <a href='event:2'><font color='#5365CC'>%s</font></a> - <a href='event:3'><font color='#FFD800'>%s</font></a> - <a href='event:4'><font color='#73D33B'>%s</font></a>", txtChoose, txtRed, txtBlue, txtYellow, txtGreen), p, 250, 290, 300, 30, 1, 1, 0.7, true)
352
						else
353
							if atual[2] == skip then
354
								usaSkip()
355
							elseif atual[2] == rev then
356
								if duelo then
357
									usaSkip()
358
								else
359
									usaReverse()
360
								end
361
							elseif atual[2] == d2 then
362
								acumulo = acumulo + 2
363
								ui.addTextArea(16, string.format("<p align='center'>"..txtDraw, d2, acumulo), jogador[pegaProximo()].nome, 250, 290, 300, 20, 1, 1, 0.4, true)
364
							end
365
							passarVez()
366
						end
367
					end
368
					for i=1, 10 do
369
						tfm.exec.displayParticle(3, 445, 230, math.random(-20,20)/10, math.random(-20,20)/10, 0, 0)
370
					end
371
				end
372
			elseif os.time() > jogador[nome[p]].timer and mao[carta] then
373
				desenhaCarta(nome[p]+200, mao[carta], nil, (nome[p]-1)*100+30, 30)
374
				timerText(200+nome[p], 1000)
375
				jogador[nome[p]].timer = os.time()+2000
376
			end
377
		elseif x > 325 and x < 375 and y > 195 and y < 245 and not draw and vez == nome[p] and sel then
378
			if acumulo > 0 or acumulo4 > 0 then
379
				comprarCartas(p, acumulo > 0 and acumulo or acumulo4)
380
				acumulo = 0
381
				acumulo4 = 0
382
				passarVez()
383
			else
384
				comprarCartas(p, 1)
385
				ui.addTextArea(16, "<p align='center'><a href='event:skip'>"..txtPass, p, 250, 290, 300, 20, 1, 1, 0.7, true)
386
				draw = true
387
			end
388
		end
389
	end
390
end
391
392
function eventChatCommand(p, cmd)
393
	local arg = split(cmd, " ")
394
	if p == adm then
395
		if arg[1] == "start" and modo == "inicio" then
396
			local r = {}
397
			modo = "start"
398
			sel = true
399
			fluxo = 1
400
			draw = false
401
			atual = nil
402
			atualizaTimer()
403
			baralho = embaralhar(cartas)
404
			pilha = {}
405
			ui.removeTextArea(0)
406
			for i, v in pairs(jogador) do
407
				comprarCartas(v.nome, 7)
408
				table.insert(r, i)
409
			end
410
			duelo = #r == 2
411
			repeat
412
				table.insert(pilha, atual)
413
				atual = table.remove(baralho)
414
			until atual[2] ~= d4 and atual[2] ~= wild and atual[2] ~= d2 and atual[2] ~= skip and atual[2] ~= rev
415
			desenhaCarta(10, atual, nil, 420, 200)
416
			desenhaBaralho()
417
			vez = r[math.random(#r)]
418
			atualizaPonteiro()
419
			atualizaFluxo()
420
		elseif arg[1] == "new" then
421
			novoJogo()
422
		elseif arg[1] == "skip" then
423
			autoPlay()
424
		elseif arg[1] == "ban" and arg[2] and nome[arrumaNick(arg[2])] then
425
			eventPlayerLeft(arrumaNick(arg[2]))
426
		end
427
	end
428
end
429
430
function eventKeyboard(p, t, d, x, y)
431
	if modo == "inicio" and os.time() > tempo and not nome[p] then
432
		if x > 20 and x < 80 and not jogador[1] then
433
			criaJogador(p, 1)
434
		elseif x > 120 and x < 180 and not jogador[2] then
435
			criaJogador(p, 2)
436
		elseif x > 220 and x < 280 and not jogador[3] then
437
			criaJogador(p, 3)
438
		elseif x > 320 and x < 380 and not jogador[4] then
439
			criaJogador(p, 4)
440
		elseif x > 420 and x < 480 and not jogador[5] then
441
			criaJogador(p, 5)
442
		elseif x > 520 and x < 580 and not jogador[6] then
443
			criaJogador(p, 6)
444
		elseif x > 620 and x < 680 and not jogador[7] then
445
			criaJogador(p, 7)
446
		elseif x > 720 and x < 780 and not jogador[8] then
447
			criaJogador(p, 8)
448
		end
449
	end
450
end
451
452
function eventLoop()
453
	for i, v in pairs(jogador) do
454
		if not estaNoLugar(v.nome) then
455
			ui.addTextArea(100, "<font size='50px' color='#ffffff'><p align='center'>"..txtWarn, v.nome, 5, 325, 790, 80, 0xff0000, 0xff0000, 1, true)
456
		else
457
			ui.removeTextArea(100, v.nome)
458
		end
459
	end
460
	if modo == "fim" then
461
		local b = {0, 1, 2, 4, 9, 11, 13}
462
		local x, y, id = math.random(800), math.random(400), b[math.random(#b)]
463
		for i=1, 40 do
464
			tfm.exec.displayParticle(id, x, y, math.random(-20,20)/10, math.random(-20,20)/10, 0, 0)
465
		end
466
		if os.time() > tempoJogada and autoStart then
467
			atualizaTimer()
468
			eventChatCommand(adm, "new")
469
		end
470
	end
471
	if modo == "start" then
472
		if os.time() > tempoJogada then
473
			autoPlay()
474
		elseif tempoJogada - os.time() < 10000 then
475
			ui.addTextArea(17, "<p align='center'><font size='25px' color='#214A25'>"..math.ceil((tempoJogada - os.time())/1000), nil, 350, 210, 90, 100, 0, 0, 0, false)
476
		else
477
			ui.removeTextArea(17)
478
		end
479
	elseif modo == "inicio" then
480
		if os.time() > tempoJogada and autoStart then
481
			atualizaTimer()
482
			eventChatCommand(adm, "start")
483
		end
484
	end
485
	apagaText()
486
end
487
488
function eventNewPlayer(p)
489
	if modo == "inicio" then
490
		ui.addTextArea(0, "<font size='25px'><p align='center'>"..txtSit, p, 0, 180, 800, 200, 0, 0, 0, false)
491
		tfm.exec.bindKeyboard(p, 32, true, true)
492
		system.bindMouse(p, true)
493
	elseif modo == "start" then
494
		desenhaCarta(10, atual, p, 420, 200)
495
		desenhaBaralho(p)
496
		atualizaPonteiro(p)
497
		atualizaFluxo(p)
498
	end
499
	for i, v in pairs(jogador) do
500
		atualizaScore(i, p)
501
	end
502
	tfm.exec.respawnPlayer(p)
503
	tfm.exec.setUIMapName(gameName)
504
end
505
506
function eventPlayerLeft(p)
507
	if modo == "inicio" then
508
		if nome[p] then
509
			removeJogadorUI(p, nome[p])
510
		end
511
	elseif modo == "start" then
512
		if nome[p] and jogador[nome[p]] then
513
			removeJogador(p, nome[p])
514
		end
515
	end
516
end
517
518
function eventPlayerDied(p)
519
	tfm.exec.respawnPlayer(p)
520
end
521
522
-- INICIO
523
524
tfm.exec.disableAutoScore(true)
525
tfm.exec.disableAutoShaman(true)
526
tfm.exec.disableAutoNewGame(true)
527
tfm.exec.disableAfkDeath(true)
528
for i, v in pairs(comandos) do
529
	system.disableChatCommandDisplay(v, true)
530
end
531
for i, v in pairs(tfm.get.room.playerList) do
532
	tfm.exec.setPlayerScore(i, 0, false)
533
end
534
tfm.exec.newGame(mapa)