×

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!
« ‹ 126 / 133 › »
[Lua] Peça scripts aqui!
Fox_fire
« Citoyen »
1600557900000
    • Fox_fire#8404
    • Profil
    • Derniers messages
    • Tribu
#2501
  0
Oii, eu gostaria de um script qnd vc clica em um lugar do mapa, vc teletransporta, porem so poderia fazer isso quem eu permitir admin
Victorck6
« Citoyen »
1600801080000
    • Victorck6#6662
    • Profil
    • Derniers messages
    • Tribu
#2502
  0
Alguém tem script de casamento em português?
Jp_darkuss
« Citoyen »
1601039100000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2503
  0
Patudo_games a dit :
Então Jp_darkuss, tem alguns erro no script que eu queria que vc resolvesse pra mim por favor: Quando alguem morre, um jogador ganha automaticamente,e quando dois entram na toca, os dois podem eliminar ou ate mais players podem eliminar, e quando alguem ganha, o tempo não acaba fica infinito, por enquanto foram esses erros que encontri, por favor me ajude, desde ja obg

Esses dias estou ocupado, se tiver tempo eu faço.
Jp_darkuss
« Citoyen »
1601080320000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2504
  0
Fox_fire a dit :
Oii, eu gostaria de um script qnd vc clica em um lugar do mapa, vc teletransporta, porem so poderia fazer isso quem eu permitir admin

Terceira vez que darei o mesmo script kkkk

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
local _, adm= pcall(nil)
adm= adm:match("(.-)%.")
local pos= {0, 0} --x, y
local can= {}
local dontRepeatCommand= 0
system.bindMouse(adm[1], true)
ui.addTextArea(0, ".", nil, 0, 0, 5, 5, 0xFF6666, 0xFF6666, 1, false)
eventChatCommand= function(player, c)
cmd= {}
leave= false
for i in ipairs(can) do
if (player== can[i]) then
leave= true
end
end
for i in string.gmatch(c, "%S+") do
table.insert(cmd, i)
end
if (cmd[1]=="can" and player== adm[1]) then
if (cmd[3]=="true") then
system.bindMouse(cmd[2], true)
table.insert(can, cmd[2])
print("[Aviso] O jogador "..cmd[2].." agora é capaz de usar o comando "..string.format("%q", "!tp playerName")..".")
else
system.bindMouse(cmd[2], false)
for i in ipairs(can) do
if (cmd[2]== can[i]) then
table.remove(can, i)
end
end
print("[Aviso] O jogador "..cmd[2].." não poderá mais usar o comando "..string.format("%q", "!tp playerName")..".")
end
dontRepeatCommand= 1
elseif (c=="tp all" and player== adm[1] and dontRepeatCommand== 0) then
for i in pairs(tfm.get.room.playerList) do
tfm.exec.movePlayer(i, pos[1], pos[2], false, 0, 0, false)
end
dontRepeatCommand= 1
elseif (cmd[1]=="tp" and player== adm[1] and dontRepeatCommand== 0) then
tfm.exec.movePlayer(cmd[2], pos[1], pos[2], false, 0, 0, false)
dontRepeatCommand= 1
elseif (leave== true and cmd[1]=="tp" and dontRepeatCommand== 0) then
tfm.exec.movePlayer(cmd[2], pos[1], pos[2], false, 0, 0, false)
dontRepeatCommand= 1
end
dontRepeatCommand= 0
end
eventMouse= function(player, x, y)
pos[1]= x
pos[2]= y
ui.addTextArea(0, ".", nil, x, y, 5, 5, 0xFF6666, 0xFF6666, 1, false)
end
system.disableChatCommandDisplay()


Veja o funcionamento aqui!
Jocoringaker
« Citoyen »
1601511840000
    • Jocoringaker#0000
    • Profil
    • Derniers messages
    • Tribu
#2505
  0
Se já existir um script assim por favor mande aqui, caso não tenha... Eu gostaria de um script para sorteio porém sem precisar estar na sala para participar, o próprio adm coloca os nomes que irão participar. Procurei e não achei desse modelo. :c
Jp_darkuss
« Citoyen »
1601736060000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2506
  1
Jocoringaker a dit :
Se já existir um script assim por favor mande aqui, caso não tenha... Eu gostaria de um script para sorteio porém sem precisar estar na sala para participar, o próprio adm coloca os nomes que irão participar. Procurei e não achei desse modelo. :c

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
local _, adm= pcall(nil)
local players= {}
local sort= false
local winner= {state= false, target= 0}
local times= 0
local update= function()
local x= 0
local y= 80
for i= 1, #players do
x= x + 115
players[i].x= x
players[i].y= y
ui.addTextArea(i, "<font size='14' color='#DD6677'><p align='center'>"..(players[i].name:match("(.-)#")).."</p></font>", nil, x - 110, y, 100, 30, nil, nil, 0.9, true)
if (i % 7== 0) then
x= 0
y= y + 45
end
end
end
eventChatCommand= function(player, c)
local cmd= {}
for data in c:gmatch("%S+") do
table.insert(cmd, data)
end
if player== adm and not sort then
if cmd[1]=="add" then
table.insert(players, {
name= cmd[2],
x= 0,
y= 0
})
update()
winner.state= false
elseif cmd[1]=="remove" then
for pos= 1, #players do
ui.removeTextArea(pos, nil)
if players[pos] then
if players[pos].name== cmd[2] then
table.remove(players, pos)
end
end
end
update()
winner.state= false
elseif cmd[1]=="sortear" and #players>= 2 then
sort= true
times= 0
elseif cmd[1]=="clean" then
for pos= 1, #players do
ui.removeTextArea(pos, nil)
end
winner.state= false
players= {}
end
end
end
eventLoop= function()
if sort then
local target= math.random(1, #players)
local particles= {21, 21, 23, 24}
times= times + 1
update()
ui.updateTextArea(target, "<font size='14' color='#66DD66'><p align='center'>"..(players[target].name:match("(.-)#")).."</p></font>", nil)
for i= 1, 40 do
tfm.exec.displayParticle(particles[math.random(1, 4)], math.random(players[target].x, players[target].x + 100) - 110, math.random(players[target].y, players[target].y + 30), 0, math.random(1, 5))
end
if times== 20 then
sort= false
winner.target= target
winner.state= true
end
end
if winner.state then
local x= players[winner.target].x
local y= players[winner.target].y
local particles= {0, 1, 2, 4, 13}
tfm.exec.playEmote(players[winner.target].name, 0)
for i= 1, 40 do
tfm.exec.displayParticle(particles[math.random(1, 5)], math.random(x, x + 100) - 110, math.random(y, y + 30), 0, math.random(1, 3))
end
end
end
do
adm= adm:match("(.-)%.")
ui.addTextArea(0, "<font size='25' color='#66DD66'><p align='center'>Sorteio!</p></font>", nil, 300, 30, 200, nil, nil, nil, 0.8, true)
system.disableChatCommandDisplay()
end


Espero que goste.

Comandos:

  • !add playerName: adiciona um competidor no sorteio (precisa ter #, senão dá erro)
  • !remove playerName: remove um competidor no sorteio (precisa ter #, senão dá erro)
  • !clean: remove todos os players do sorteio
  • !sortear: inicia o sorteio (obrigatório 2 competidores cadastrados)

    Good game, God bless!

  • Dernière modification le 1601747700000
    Jp_darkuss
    « Citoyen »
    1601825280000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2507
      0
    Patudo_games a dit :
    eu quero um script de eliminatoria vanilla o mais rapido possivel

    Refiz o script do 0, veja se agora funciona:

    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
    local _, adm= pcall(nil)
    local time= {count= 0, max= 90000}
    local maps= {}
    local eliminated= {}
    local gaming, match= false, false
    local last=""
    local win_map=""
    local setMap= function()
    local map= maps[math.random(1, #maps)]
    tfm.exec.newGame(map)
    ui.setMapName("Eliminatória Vanilla!")
    end
    local inRoom= function()
    local reply= 0
    for _, _ in next, tfm.get.room.playerList do
    reply= reply + 1
    end
    return reply
    end
    local noOne= function()
    for _, data in next, tfm.get.room.playerList do
    if not data.isDead then
    return false
    end
    end
    return true
    end
    local verify= function()
    if inRoom() - #eliminated== 1 then
    gaming= false
    time.count= 0
    eliminated= {}
    tfm.exec.newGame(win_map)
    ui.setMapName("<font color='#66DD66'>"..last.."</font> has won the game!")
    else
    match= true
    time.count= 0
    setMap()
    for _, player in next, eliminated do
    tfm.exec.killPlayer(player)
    end
    end
    end
    local isEliminated= function(player)
    for _, data in next, eliminated do
    if data== player then
    return true
    end
    end
    return false
    end
    local list= function(target)
    local text="<p align='center'>Quem desejas eliminar?</p><br/><p align='center'>"
    for player, _ in next, tfm.get.room.playerList do
    if not isEliminated(player) and player~= target then
    text= text.."<a href='event:eliminate("..player..")'>"..(player:match("(.-)#")).."</a> "
    end
    end
    text= text.."</p>"
    ui.addTextArea(2, text, target, 200, 100, 400, 200, nil, nil, 1, true)
    end
    eventLoop= function()
    if gaming and match then
    time.count= time.count + 500
    tfm.exec.setGameTime((time.max / 1000) - (time.count / 1000))
    if time.count== time.max or noOne() then
    match= false
    verify()
    end
    end
    end
    eventPlayerLeft= function(player)
    for pos, data in next, eliminated do
    if data== player and gaming then
    table.remove(eliminated, pos)
    end
    end
    end
    eventTextAreaCallback= function(_, player, event)
    if player== adm and not gaming then
    if event=="start" then
    gaming= true
    match= true
    setMap()
    elseif event=="max" and not gaming then
    ui.addPopup(0, 2, "Insira o tempo máximo de cada partida em <br>minutos</br> (atual: <b>"..(time.max / 60000).."</b> min): ", adm, 300, 100, 200, true)
    end
    else
    if event:match("eliminate") then
    local target= event:match("eliminate%((.-)%)")
    ui.removeTextArea(2, player)
    ui.addTextArea(3, "<p align='center'><b>"..target.."</b> has been eliminated!</p><br/><a href='event:ok'>OK</a>", nil, 300, 50, 200, nil, nil, nil, 1, true)
    table.insert(eliminated, target)
    verify()
    end
    end
    if event=="ok" then
    ui.removeTextArea(3, player)
    end
    end
    eventPlayerWon= function(player)
    for _player, _ in next, tfm.get.room.playerList do
    if _player~= player then
    tfm.exec.killPlayer(_player)
    end
    end
    match= false
    last= player
    list(player)
    ui.setMapName("Match ended! "..player.." has won the match!")
    end
    eventPopupAnswer= function(_, _, answer)
    time.max= ((type(tonumber(answer))=="number") and tonumber(answer) * 60000 or time.max)
    end
    do
    adm= adm:match("(.-)%.")
    for _, data in next, {"AutoShaman", "AutoNewGame", "AutoTimeLeft", "MortCommand"} do
    tfm.exec["disable"..data]()
    end
    ui.addTextArea(0, "<a href='event:start'>Start</a>", adm, 20, 370, nil, nil, nil, nil, 1, true)
    ui.addTextArea(1, "<a href='event:max'>Max time match</a>", adm, 66, 370, nil, nil, nil, nil, 1, true)
    ui.setMapName("Eliminatória Vanilla!")
    end


    O tempo agora é gerenciado diretamente pelo script, impedindo bugs (é o que espero).

    Você pode modificar o tempo máximo de cada partida no botão ao lado de "Start", o que inicia o jogo.

    Se um jogador sair da sala, o sistema é otimizado para não haver bugs, mas não pude testar. Então evite a saída de pessoas da sala se conseguir.

    Só jogue com 2 ou mais pessoas

    Coloque seus mapas em maps= {}, igual no outro

    Em win_map, coloque um mapa que será iniciado quando alguém vencer, se quiser.

    Espero que agora funcione ;-;

    Dernière modification le 1601825700000
    Aygx
    « Citoyen »
    1602111540000
      • Aygx#8800
      • Profil
      • Derniers messages
      • Tribu
    #2508
      0
    vc pode fazer um script que se eu tacar uma bolinha de neve o rato que tocar morre, ou alguma coisa que eu possa lançar
    Jp_darkuss
    « Citoyen »
    1602179640000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2509
      0
    Aygx a dit :
    vc pode fazer um script que se eu tacar uma bolinha de neve o rato que tocar morre, ou alguma coisa que eu possa lançar

    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
    local _, adm= pcall(nil)
    local balls= {}
    local players= {}
    local count= 0
    local last=""
    local allow= function(player, b)
    system.bindKeyboard(player, 69, false, b)
    end
    local distancia= function(objX, objY, pX, pY)
    local dist= {
    x= math.abs(objX - pX),
    y= math.abs(objY - pY)
    }
    local h= math.sqrt(dist.y ^ 2 + dist.x ^ 2)
    return h
    end
    local collide= function()
    for _, object in next, tfm.get.room.objectList do
    for player, data in next, tfm.get.room.playerList do
    if distancia(object.x, object.y, data.x, data.y)<= 20 and player~= last then
    tfm.exec.killPlayer(player)
    end
    end
    end
    end
    eventChatCommand= function(player, c)
    local cmd= {}
    for i in c:gmatch("%S+") do
    table.insert(cmd, i)
    end
    if player== adm then
    if cmd[1]=="allow" then
    allow(cmd[2], true)
    elseif cmd[1]=="disallow" then
    allow(cmd[2], false)
    end
    end
    end
    eventNewPlayer= function(player)
    players[player]= {count= 0, shoot= true}
    end
    eventKeyboard= function(player)
    local x= tfm.get.room.playerList[player].x
    local y= tfm.get.room.playerList[player].y
    if players[player].shoot then
    players[player].shoot= false
    if tfm.get.room.playerList[player].isFacingRight then
    table.insert(balls, tfm.exec.addShamanObject(34, x + 20, y + 5, 0, 15, -5))
    else
    table.insert(balls, tfm.exec.addShamanObject(34, x - 20, y + 5, -180, -15, -5))
    end
    last= player
    end
    end
    eventLoop= function()
    count= count + 500
    if count== 5000 then
    for _, data in next, balls do
    tfm.exec.removeObject(data)
    end
    balls= {}
    count= 0
    end
    for pos in next, players do
    if not players[pos].shoot then
    players[pos].count= players[pos].count + 500
    if players[pos].count== 2000 then
    players[pos].count= 0
    players[pos].shoot= true
    end
    end
    end
    collide()
    end
    do
    adm= adm:match("(.-)%.")
    for player in next, tfm.get.room.playerList do
    eventNewPlayer(player)
    end
    allow(adm, true)
    system.disableChatCommandDisplay()
    end


    Como a API não tem tantos recursos, o resultado do script não terá os efeitos desejados, e tem várias falhas.

    Comandos:

  • !allow playerName - dá permissão a alguém para lançar a bolinha de neve
  • !disallow playerName - tira a permissão de alguém de lançar a bolinha de neve

    Maior parte do script e lógica foram feitos por Fofinhoppp#0000.
  • Poppy
    « Citoyen »
    1602214440000
      • Poppy#0331
      • Profil
      • Derniers messages
    #2510
      0
    Quero um script que permita você mudar o nome do mapa (substituindo o @ do mapa e o nome com a # de quem criou) e, no mesmo script quero um que permita colocar um mapa

    Desde já agradeço.
    Jp_darkuss
    « Citoyen »
    1602277140000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2511
      0
    Poppy a dit :
    Quero um script que permita você mudar o nome do mapa (substituindo o @ do mapa e o nome com a # de quem criou) e, no mesmo script quero um que permita colocar um mapa

    Desde já agradeço.

    Code Lua

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    local _, adm= pcall(nil)
    eventChatCommand= function(player, c)
    local cmd= {}
    for data in c:gmatch("%S+") do
    table.insert(cmd, data)
    end
    if c:sub(1, 7)=="mapName" then
    ui.setMapName(c:sub(9, #c))
    elseif cmd[1]=="setMap" then
    tfm.exec.newGame(cmd[2])
    if cmd[3] then
    ui.setMapName(c:sub(8 + #cmd[2], #c))
    end
    end
    end
    do
    adm= adm:match("(.-)%.")
    system.disableChatCommandDisplay()
    end

    Comandos:

  • !mapName name

    - Dá um nome ao mapa, sendo name o seu nome.

  • !setMap code [name]

    - Inicia um novo mapa, sendo code o seu código. A propriedade name é opcional, você pode usa-lo para dar um nome ao mapa logo após inicia-lo!
  • Victorck6
    « Citoyen »
    1602366720000
      • Victorck6#6662
      • Profil
      • Derniers messages
      • Tribu
    #2512
      0
    Alguém poderia ve esse script?

    Depois de um tempo o script é parado.

    https://pastebin.com/raw/CNC9FkSt
    Jp_darkuss
    « Citoyen »
    1602386460000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2513
      0
    Victorck6 a dit :
    Alguém poderia ve esse script?

    Depois de um tempo o script é parado.

    https://pastebin.com/raw/CNC9FkSt

    Queria poder ajudar, mas não consigo acessar nenhuma página do Pastebin. Poderia postar o script dentro de um [ code=lua][/code] dentro de um spoiler?
    Victorck6
    « Citoyen »
    1602387360000
      • Victorck6#6662
      • Profil
      • Derniers messages
      • Tribu
    #2514
      0
    Obrigado

    Dernière modification le 1602458460000
    Jp_darkuss
    « Citoyen »
    1602426540000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2515
      0
    Ok, vou ver. Mas pelo amor de Deus, coloca isso logo dentro de um Spoiler, senão a staff do Atelier vai te pegar kkkkk
    Jp_darkuss
    « Citoyen »
    1602427740000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2516
      0
    Victorck6 a dit :
    Jp_darkuss a dit :
    Victorck6 a dit :
    Alguém poderia ve esse script?

    Depois de um tempo o script é parado.

    https://pastebin.com/raw/CNC9FkSt

    Okay

    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
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
    922
    923
    924
    925
    926
    927
    928
    929
    930
    931
    932
    933
    934
    935
    936
    937
    938
    939
    940
    941
    942
    943
    944
    945
    946
    947
    948
    949
    950
    951
    952
    953
    954
    955
    956
    957
    958
    959
    960
    961
    962
    963
    964
    965
    966
    967
    968
    969
    970
    971
    972
    973
    974
    975
    976
    977
    978
    979
    980
    981
    982
    983
    984
    985
    986
    987
    988
    989
    990
    991
    992
    993
    994
    995
    996
    997
    998
    999
    1000
    1001
    1002
    1003
    1004
    1005
    1006
    1007
    1008
    1009
    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    1116
    1117
    1118
    1119
    1120
    1121
    1122
    1123
    1124
    1125
    1126
    1127
    1128
    1129
    1130
    1131
    1132
    1133
    1134
    1135
    1136
    1137
    1138
    1139
    1140
    1141
    1142
    1143
    1144
    1145
    1146
    1147
    1148
    1149
    1150
    1151
    1152
    1153
    1154
    1155
    1156
    1157
    1158
    1159
    1160
    1161
    1162
    1163
    1164
    1165
    1166
    1167
    1168
    1169
    1170
    1171
    1172
    1173
    1174
    1175
    1176
    1177
    1178
    1179
    1180
    1181
    1182
    1183
    1184
    1185
    1186
    1187
    1188
    1189
    1190
    1191
    1192
    1193
    1194
    1195
    1196
    1197
    1198
    1199
    1200
    1201
    1202
    1203
    1204
    1205
    1206
    1207
    1208
    1209
    1210
    1211
    1212
    1213
    1214
    1215
    1216
    1217
    1218
    1219
    1220
    1221
    1222
    1223
    1224
    1225
    1226
    1227
    1228
    1229
    1230
    1231
    1232
    1233
    1234
    1235
    1236
    1237
    1238
    1239
    1240
    1241
    1242
    1243
    1244
    1245
    1246
    1247
    1248
    1249
    1250
    1251
    1252
    1253
    1254
    1255
    1256
    1257
    1258
    1259
    1260
    1261
    1262
    1263
    1264
    1265
    1266
    1267
    1268
    1269
    1270
    1271
    1272
    1273
    1274
    1275
    1276
    1277
    1278
    1279
    1280
    1281
    1282
    1283
    1284
    1285
    1286
    1287
    1288
    1289
    1290
    1291
    1292
    1293
    1294
    1295
    1296
    1297
    1298
    1299
    1300
    1301
    1302
    1303
    1304
    1305
    1306
    1307
    1308
    1309
    1310
    1311
    1312
    1313
    1314
    1315
    1316
    1317
    1318
    1319
    1320
    1321
    1322
    1323
    1324
    1325
    1326
    1327
    1328
    1329
    1330
    1331
    1332
    1333
    1334
    1335
    1336
    1337
    1338
    1339
    1340
    1341
    1342
    1343
    1344
    1345
    1346
    1347
    1348
    1349
    1350
    1351
    1352
    1353
    1354
    1355
    1356
    1357
    1358
    1359
    1360
    1361
    1362
    1363
    1364
    1365
    1366
    1367
    1368
    1369
    1370
    1371
    1372
    1373
    1374
    1375
    1376
    1377
    1378
    1379
    1380
    1381
    1382
    1383
    1384
    1385
    1386
    1387
    1388
    1389
    1390
    -- Variables and Tables

    local keys = {70,76,77,81}

    local formedN = {'Rio de La Plata', 'Peru-Bolivian Confederation', 'Empire of Brazil', 'Patagonia', 'Gran-Colombia', 'Audiencia of Quito', 'Empire of Paraguay', 'Inca Empire', 'Oriental Kingdom', 'Bolivar Empire'}
    local formedNeed = {{1,2,3,4,5,6,7,8,15,18,27,32},{7,8,15,18,27,28,29,30,31}, {9,10,11,12,13,14,15,16,32}, {2,3,5,17,18,19,20}, {21,22,23,24,25,33,34,35}, {21,24,25,31} ,{4,5,12,26,27}, {17,18,24,25,28,29,30,31}, {1,32}, {7,8,15,21,22,23,24,25,27,28,29,30,31,33,34,35}}

    local game = {
    countries = {
    [1] = {n = 'Argentina', s = 'AR'},
    [2] = {n = 'Bolivia', s = 'BO'},
    [3] = {n = 'Brazil', s = 'BR'},
    [4] = {n = 'Chile', s = 'CL'},
    [5] = {n = 'Colombia', s = 'CO'},
    [6] = {n = 'Ecuador', s = 'EC'},
    [7] = {n = 'Paraguay', s = 'PY'},
    [8] = {n = 'Peru', s = 'PE'},
    [9] = {n = 'Uruguay', s = 'UY'},
    [10] = {n = 'Venezuela', s = 'VE'},

    removeCity = function(self, cityName)
    local removeValue
    for k,v in next, self.cities do
    if v[2] == cityName then
    removeValue = k
    end
    end
    table.remove(self.cities, removeValue)
    if #self.cities == 0 then
    notifyPlayer(nil, ('%s collapsed!'):format(self.n), false)
    end
    end,

    addCity = function(self, cityName, cityMousepower)
    local args = {cityMousepower, cityName}
    table.insert(self.cities, args)
    if #self.cities == 35 then
    notifyPlayer(nil, ('Parabéns! %s ganhou o jogo como %s!'):format(self.leader, self.n), false)
    won()
    end
    end,
    },

    cities = {
    [1] = {
    id = 10000,
    n = 'Buenos Aires',
    mousepower = 302.5,
    x = 622, y = 270, l = 46, h = 20
    },
    [2] = {
    id = 10001,
    n = 'Bariloche',
    mousepower = 10.1,
    x = 622, y = 270, l = 20, h = 50
    },
    [3] = {
    id = 10002,
    n = 'Comodoro Rivadavia',
    mousepower = 3.4,
    x = 622, y = 320, l = 12, h = 40
    },
    [4] = {
    id = 10003,
    n = 'Cordóba',
    mousepower = 44.5,
    x = 620, y = 210, l = 55, h = 55
    },
    [5] = {
    id = 10004,
    n = 'Posadas',
    mousepower = 9.1,
    x = 670, y = 238, l = 15, h = 15
    },
    [6] = {
    id = 10005,
    n = 'Ushuaia',
    mousepower = 1.4,
    x = 632, y = 375, l = 8, h = 8
    },
    [7] = {
    id = 20000,
    n = 'La Paz',
    mousepower = 52.5,
    x = 620, y = 148, l = 20, h = 55
    },
    [8] = {
    id = 20001,
    n = 'Santa Cruz',
    mousepower = 53.9,
    x = 640, y = 168, l = 40, h = 40
    },
    [9] = {
    id = 30000,
    n = 'Brasília',
    mousepower = 74.3,
    x = 670, y = 110, l = 65, h = 105
    },
    [10] = {
    id = 30001,
    n = 'Boa Vista',
    mousepower = 6,
    x = 640, y = 70, l = 20, h = 20
    },
    [11] = {
    id = 30002,
    n = 'Manaus',
    mousepower = 27.8,
    x = 610, y = 90, l = 90, h = 50
    },
    [12] = {
    id = 30003,
    n = 'Porto Alegre',
    mousepower = 31,
    x = 690, y = 215, l = 16, h = 36
    },
    [13] = {
    id = 30004,
    n = 'Porto Velho',
    mousepower = 9.1,
    x = 640, y = 130, l = 30, h = 30
    },
    [14] = {
    id = 30005,
    n = 'Recife',
    mousepower = 38.8,
    x = 740, y = 125, l = 36, h = 66
    },
    [15] = {
    id = 30006,
    n = 'Rio Branco',
    mousepower = 10.2,
    x = 600, y = 130, l = 20, h = 20
    },
    [16] = {
    id = 30007,
    n = 'São Paulo',
    mousepower = 275.1,
    x = 710, y = 175, l = 40, h = 40
    },
    [17] = {
    id = 40000,
    n = 'Santiago',
    mousepower = 160.4,
    x = 610, y = 220, l = 6, h = 60
    },
    [18] = {
    id = 40001,
    n = 'Antofagasta',
    mousepower = 9.7,
    x = 608, y = 190, l = 6, h = 30
    },
    [19] = {
    id = 40002,
    n = 'Concepción',
    mousepower = 8.6,
    x = 610, y = 280, l = 6, h = 80
    },
    [20] = {
    id = 40003,
    n = 'Punta Arenas',
    mousepower = 3.1,
    x = 620, y = 365, l = 10, h = 10
    },
    [21] = {
    id = 50000,
    n = 'Bogotá',
    mousepower = 275.3,
    x = 570, y = 80, l = 34, h = 20
    },
    [22] = {
    id = 50001,
    n = 'Barranquilla',
    mousepower = 40.1,
    x = 577, y = 45, l = 14, h = 30
    },
    [23] = {
    id = 50002,
    n = 'Bucaramanga',
    mousepower = 14.5,
    x = 597, y = 62, l = 20, h = 20
    },
    [24] = {
    id = 60000,
    n = 'Quito',
    mousepower = 60.4,
    x = 555, y = 95, l = 20, h = 10
    },
    [25] = {
    id = 60001,
    n = 'Guayaquil',
    mousepower = 57.3,
    x = 555, y = 110, l = 10, h = 10
    },
    [26] = {
    id = 70000,
    n = 'Asunción',
    mousepower = 65.5,
    x = 670, y = 218, l = 14, h = 14
    },
    [27] = {
    id = 70001,
    n = 'Pedro Juan Caballero',
    mousepower = 25.2,
    x = 653, y = 202, l = 16, h = 16},
    [28] = {
    id = 80000,
    n = 'Lima',
    mousepower = 232.5,
    x = 575, y = 135, l = 20, h = 30
    },
    [29] = {
    id = 80001,
    n = 'Cuzco',
    mousepower = 10.7,
    x = 587, y = 155, l = 25, h = 30
    },
    [30] = {
    id = 80002,
    n = 'Iquitos',
    mousepower = 11.4,
    x = 555, y = 125, l = 30, h = 20
    },
    [31] = {
    id = 80003,
    n = 'Trujillo',
    mousepower = 21,
    x = 573, y = 108, l = 30, h = 20
    },
    [32] = {
    id = 90000,
    n = 'Montevideo',
    mousepower = 74.5,
    x = 672, y = 256, l = 18, h = 18
    },
    [33] = {
    id = 100000,
    n = 'Caracas',
    mousepower = 102,
    x = 614, y = 48, l = 36, h = 22
    },
    [34] = {
    id = 100001,
    n = 'Maracaibo',
    mousepower = 57.3,
    x = 600, y = 45, l = 12, h = 12,
    },
    [35] = {
    id = 100002,
    n = 'Puerto Ayacucho',
    mousepower = 1.3,
    x = 625, y = 75, l = 10, h = 10,
    },

    recruit = function(self, amount)
    local amount = amount and amount or 10000
    self.tropas = self.tropas + amount
    end,

    cleartropas = function(self)
    self.tropas = 0
    end,

    transfer = function(self, countryID, cityID)
    local country = countries[countryID]
    self.country:removeCity(self.n)
    self.country = country
    country:addCity(self.n, self.mousepower)
    end,
    },
    }

    local playersList = {}

    local players = {
    new = function(name)
    return {
    name = name,

    firstID = nil,
    countryID = nil,
    selectedID = nil,

    borders = false,
    playing = false,
    countryOpen = false,
    rankingOpen = false,
    showingMap = false,

    warns = {},
    relatory = {},
    callbacks = {},

    lastrecruit = os.time()-250,
    lastwarn = os.time()-500

    }
    end,

    choosed = function(self, countryID)
    self.playing = true
    self.countryID = countryID

    countries[countryID].leader = self.name

    displayCountry(self.name, countryID)
    see(self.name)
    end,

    joinedWar = function(self)
    table.insert(countries[self.countryID].Inimigos, countries[self.selectedID])
    table.insert(countries[self.selectedID].Inimigos, countries[self.countryID])
    see(self.name)

    local remove = {}

    for k,v in next, countries[self.selectedID].Aliados do
    table.insert(v.Inimigos, countries[self.countryID])
    for n,m in next, countries[self.countryID].Aliados do

    if m.leader ~= m.n .. ' Bot' then
    addPopup(m.leader, sizeX, sizeY, ('%s declared war at %s!'):format(countries[self.countryID].n, countries[self.selectedID].n), 'Damn!')
    end

    if m.n == v.n then
    table.insert(remove, n)

    local remove2 = {}

    for x,y in next, v.Aliados do
    if y.n == countries[self.countryID].n then
    table.insert(remove2, x)
    end
    end

    for a,b in next, remove2 do
    table.remove(v.Aliados, b)
    end
    end
    end
    end

    for k,v in next, remove do
    table.remove(countries[self.countryID].Aliados, v)
    end
    end,

    leftWar = function(self, id)

    local removeKey, removeKey2 = nil, nil
    local enemyTbl = countries[id]

    for k,v in next, countries[self.countryID].Inimigos do
    if v.n == enemyTbl.n then
    removeKey = k
    break
    end
    end

    for k,v in next, enemyTbl.Inimigos do
    if v.n == countries[self.countryID].n then
    removeKey2 = k
    break
    end
    end

    table.remove(enemyTbl.Inimigos, removeKey2)
    table.remove(countries[self.countryID].Inimigos, removeKey)
    see(self.name)

    self:joinedTreguas(id)
    end,

    joinedTreguas = function(self, id)

    local playerCountry = countries[self.countryID]
    local otherCountry = countries[id]

    addTimer(function(i)
    if i == 1 then
    table.insert(otherCountry.Treguas, playerCountry)
    table.insert(playerCountry.Treguas, otherCountry)
    elseif i == 180 then
    if playersList[playerCountry.leader] then
    addPopup(playerCountry.leader, sizeX, sizeY, ('Our truce with %s has finished'):format(otherCountry.n), 'Okay')
    end
    if playersList[otherCountry.leader] then
    addPopup(otherCountry.leader, sizeX, sizeY, ('Our truce with %s has finished'):format(playerCountry.n), 'Okay')
    end
    table.remove(otherCountry.Treguas, 1)
    table.remove(playerCountry.Treguas, 1)
    end
    end, 1000, 180)
    end,

    joinedAlliance = function(self, id)
    table.insert(countries[self.countryID].Aliados, countries[id])
    table.insert(countries[id].Aliados, countries[self.countryID])
    see(self.name)
    end,

    leftAlliance = function(self)
    local playerCountry = countries[self.countryID]
    local allyTbl = countries[self.selectedID]

    local remove, remove2

    for k,v in next, playerCountry.Aliados do
    if v.n == allyTbl.n then
    remove = k
    break
    end
    end
    for k,v in next, allyTbl.Aliados do
    if v.n == playerCountry.n then
    remove2 = k
    break
    end
    end

    table.remove(playerCountry.Aliados, remove)
    table.remove(allyTbl.Aliados, remove2)

    self:joinedTreguas(self.selectedID)
    end,

    addBorders = function(self)
    self.borders = not self.borders
    end,

    forming = function(self)
    local id = self.countryID
    if #countries[id].Inimigos > 0 then
    return warnPlayer(self.name, 'Need be at peace!')
    end

    for k,v in next, formedNeed[id] do
    if cities[v].country.n ~= countries[id].n then
    return warnPlayer(self.name, 'Press M for info')
    end
    if k == #formedNeed[id] then
    countries[id].n = formedN[id]
    end
    end
    see(self.name)
    end,
    }

    local playersMeta = {
    __index = players
    }

    local citiesMeta = {
    __index = game.cities
    }

    local countriesMeta = {
    __index = game.countries
    }

    -- Timer

    do
    local List = {}
    function List.new ()
    return {first = 0, last = -1}
    end

    function List.pushleft (list, value)
    local first = list.first - 1
    list.first = first
    list[first] = value
    end

    function List.pushright (list, value)
    local last = list.last + 1
    list.last = last
    list[last] = value
    end

    function List.popleft (list)
    local first = list.first
    if first > list.last then
    return nil
    end
    local value = list[first]
    list[first] = nil -- to allow garbage collection
    list.first = first + 1
    return value
    end

    function List.popright (list)
    local last = list.last
    if list.first > last then
    return nil
    end
    local value = list[last]
    list[last] = nil -- to allow garbage collection
    list.last = last - 1
    return value
    end

    -- the lib
    local timerList = {}
    local timersPool = List.new()

    function addTimer(callback, ms, loops, label, ...)
    local id = List.popleft(timersPool)
    if id then
    local timer = timerList[id]
    timer.callback = callback
    timer.label = label
    timer.arguments = {...}
    timer.time = ms
    timer.currentTime = 0
    timer.currentLoop = 0
    timer.loops = loops or 1
    timer.isComplete = false
    timer.isPaused = false
    timer.isEnabled = true
    else
    id = #timerList+1
    timerList[id] = {
    callback = callback,
    label = label,
    arguments = {...},
    time = ms,
    currentTime = 0,
    currentLoop = 0,
    loops = loops or 1,
    isComplete = false,
    isPaused = false,
    isEnabled = true,
    }
    end
    return id
    end

    function getTimerId(label)
    local found
    for id = 1, #timerList do
    local timer = timerList[id]
    if timer.label == label then
    found = id
    break
    end
    end
    return found
    end

    function pauseTimer(id)
    if type(id) == 'string' then
    id = getTimerId(id)
    end

    if timerList[id] and timerList[id].isEnabled then
    timerList[id].isPaused = true
    return true
    end
    return false
    end

    function resumeTimer(id)
    if type(id) == 'string' then
    id = getTimerId(id)
    end

    if timerList[id] and timerList[id].isPaused then
    timerList[id].isPaused = false
    return true
    end
    return false
    end

    function removeTimer(id)
    if type(id) == 'string' then
    id = getTimerId(id)
    end

    if timerList[id] and timerList[id].isEnabled then
    timerList[id].isEnabled = false
    List.pushright(timersPool, id)
    return true
    end
    return false
    end

    function clearTimers()
    local timer
    repeat
    timer = List.popleft(timersPool)
    if timer then
    table.remove(timerList, timer)
    end
    until timer == nil
    end

    function timersLoop()
    for id = 1, #timerList do
    local timer = timerList[id]
    if timer.isEnabled and timer.isPaused == false then
    if not timer.isComplete then
    timer.currentTime = timer.currentTime + 500
    if timer.currentTime >= timer.time then
    timer.currentTime = 0
    timer.currentLoop = timer.currentLoop + 1
    if timer.loops > 0 then
    if timer.currentLoop >= timer.loops then
    timer.isComplete = true
    if eventTimerComplete ~= nil then
    eventTimerComplete(id, timer.label)
    end
    removeTimer(id)
    end
    end
    if timer.callback ~= nil then
    timer.callback(timer.currentLoop, table.unpack(timer.arguments))
    end
    end
    end
    end
    end
    end
    end

    -- Initializing game info

    addInfo = function()
    local colors = {'0x00FFF9', '0xFF8F00', '0x02FF00', '0x6B4A2C', '0x9100FF', '0xEB00FF', '0x002EFF', '0xFF006C', '0xFFF000', '0xFF0000'}
    for k,v in next, game.countries do
    if type(v) == 'table' then
    v.Treguas = {}
    v.Aliados = {}
    v.cities = {}
    v.Inimigos = {}

    v.ipower = 0
    v.power = 50000
    v.leader = ('%s Bot'):format(v.n)
    v.color = colors[k]
    v.capital = '?'

    setmetatable(v, countriesMeta)
    else
    break
    end
    end
    for k,v in next, game.cities do
    if type(v) == 'table' then
    countryID = math.floor(v.id/10000)
    v.country = game.countries[countryID]
    v.tropas = 0

    setmetatable(v, citiesMeta)
    local args = {v.mousepower, v.n}
    table.insert(game.countries[countryID].cities, args)

    if v.id%10000 == 0 then
    game.countries[countryID].capital = v.n
    v.mousepower = v.mousepower + 50
    v.tropas = 50000
    end
    else
    break
    end
    end
    end; addInfo()

    local gameSave

    loadGame = function(save)
    function copy(tbl)
    local new = {}
    for k, v in next, tbl do
    if type(v) == "table" then
    new[k] = copy(v)
    else
    new[k] = v
    end
    end
    return new
    end

    if save then
    gameSave = copy(game)
    else
    game = gameSave
    end

    countries = game.countries
    cities = game.cities

    end; loadGame(true)

    -- TextArea manipulation

    local buttonId = 0

    addCities = function(player)
    for i=1,#cities do
    for k,v in next, playersList do
    if type(v) == 'table' then
    local color = playersList[k].borders and 0x6A7495 or cities[i].country.color
    ui.addTextArea(cities[i].id, "<font size='80'>"..string.rep('\n', 20), k, cities[i].x, cities[i].y, cities[i].l, cities[i].h, cities[i].country.color, color, 1, true,
    function(player)
    displayCity(player, i)
    end)
    end
    end
    end
    end

    addCitiesWar = function(player)
    for i=1,#cities do
    ui.addTextArea(cities[i].id, "<font size='80'>"..string.rep('\n', 20), player, cities[i].x, cities[i].y, cities[i].l, cities[i].h , cities[i].country.color, 0x6A7495, 1, true,
    function(player)
    movetropas(player, i)
    end)
    end
    end

    showMapForming = function(player)
    for i=1,#cities do
    local alpha = 0
    local color
    for k,v in next, formedNeed[playersList[player].countryID] do
    if i == v then
    if cities[i].country.n == countries[playersList[player].countryID].n then
    color = 0x0FF000
    alpha = 1
    break
    elseif cities[i].country.n ~= countries[playersList[player].countryID].n then
    color = 0xFF0000
    alpha = 1
    break
    end
    else
    color = 0x6A7495
    end
    end
    ui.addTextArea(cities[i].id, "", player, cities[i].x, cities[i].y, cities[i].l, cities[i].h, color, color, alpha, true,
    function(player)
    addCities(player)
    end)
    end
    end

    loadMap = function(player)
    ui.addTextArea(110000, "", player, 660,70,32,13, 0xFFFFFF, 0xFFFFFF, 1, true)
    ui.addTextArea(110001, "", player, 655,60,15,10, 0xFFFFFF, 0xFFFFFF, 1, true)

    addCities(player)
    end

    local addTextArea = ui.addTextArea

    ui.addTextArea = function(id, text, player, x, y, width, height, color1, color2, alpha, followPlayer, callback, args)
    if callback and playersList[player] then
    playersList[player].callbacks[#playersList[player].callbacks+1] = {event = callback, callbacksx = args}
    text = '<a href="event:callback_'..#playersList[player].callbacks ..'">'..text
    end
    return addTextArea(id, text, player, x, y, width, height, color1, color2, alpha, followPlayer, callback)
    end

    -- #conquerors Important Functions

    cityIsSomething = function(player, id, name)
    local countryID = playersList[player].countryID
    local enemyName = cities[id].country.n
    for k,v in next, countries do
    if v.n == enemyName then
    return isSomething(name, countryID, k)
    end
    end
    end

    cityIsTrulyEnemy = function(player, id)
    local cityCountry = countries[math.floor(cities[id].id/10000)].n
    for k,v in next, cities[id].country.Inimigos do
    if v.n == cityCountry then
    return false
    elseif cityCountry == cities[id].country.n then
    return true
    end
    end
    return true
    end

    getLists = function(country)
    local total, returning = {}, {}
    for _,name in next, {'Aliados', 'Inimigos', 'Treguas'} do
    total[name] = {}
    for k,v in next, country[name] do
    table.insert(total[name], v.s)
    end
    local concat = table.concat(total[name], ", ")
    table.insert(returning, concat)
    end
    return table.unpack(returning)
    end

    isSomething = function(name, playerID, otherID)
    for k,v in next, countries[otherID][name] do
    if countries[playerID].n == v.n then
    return true
    end
    end
    return false
    end

    won = function()
    addTimer(function(i)
    if i == 10 then
    for k,v in next, playersList do
    tfm.exec.killPlayer(v.name)
    closeTextArea(v.name)
    v.firstID = nil
    v.countryID = nil
    v.selectedID = nil

    v.playing = false
    v.countryOpen = false
    v.rankingOpen = false
    v.showingMap = false

    v.warns = {}
    v.relatory = {}
    v.callbacks = {}
    end
    loadGame(false)
    table.foreach(tfm.get.room.playerList, eventNewPlayer)
    end
    end, 1000, 10)
    end

    -- #conquerors TextArea manipulation

    see = function(player)
    return displayCountriesList(player, '<N>', false,
    function(player)
    local id = playersList[player].selectedID
    displayCountry(player, id)
    end)
    end

    addPopup = function(player, sizeX, sizeY, text, textButton)
    closeTextArea(player)
    local sizeX = sizeX and sizeX or 200
    local sizeY = sizeY and sizeY or 120
    local initialX = 400 - sizeX/2
    local initialY = 200 - sizeY/2
    local decoSize = sizeX > sizeY and sizeX/10 or sizeY/10
    ui.addTextArea(1000, "", player, initialX, initialY, sizeX, sizeY, 0x324650, 0x324650, 1, true)
    ui.addTextArea(1001, "", player, initialX, initialY, decoSize, decoSize, 0x009D9D, 0x009D9D, 1, true)
    ui.addTextArea(1002, "", player, initialX + sizeX - decoSize, initialY, decoSize, decoSize, 0x009D9D, 0x009D9D, 1, true)
    ui.addTextArea(1003, "", player, initialX, initialY + sizeY - decoSize, decoSize, decoSize, 0x009D9D, 0x009D9D, 1, true)
    ui.addTextArea(1004, "", player, initialX + sizeX - decoSize, initialY + sizeY - decoSize, decoSize, decoSize, 0x009D9D, 0x009D9D, 1, true)
    if text then
    ui.addTextArea(1005, ("<p align='center'><b><font color='#324650'><font size='20'>Atenção!</font><font size='11'>\n\n%s</font>"):format(text), player, initialX + 5, initialY + 5, sizeX - 10, sizeY - 10, 0x9292AA, 0x9292AA, 1, true)
    if textButton then
    addButton(player, textButton, x, y, 120)
    end
    end
    end

    addButton = function(player, text, x, y, sizeX, sizeY, ...)
    buttonId = buttonId + 2
    local event = (...) and (...) or (function(player) closeTextArea(player) end)
    local sizeX = sizeX and sizeX or 60
    local sizeY = sizeY and sizeY or 18
    local x = x and x or 400 - sizeX/2
    local y = y and y or 240 - sizeY/2
    ui.addTextArea(1017 + buttonId, "", player, x+1, y+1, sizeX, sizeY, 0x0e1619, 0x0e1619, 1, true)
    ui.addTextArea(1018 + buttonId, ("<B><p align='center'>%s"):format(text), player, x, y, sizeX, sizeY, 0x324650, 0x324650, 1, true, event)
    end

    addRanking = function(player)
    addPopup(player, 400, 250)
    ui.addTextArea(1005, "<p align='center'><b><N><font size='20'><u>Ranking", player, 205, 80, 390, 240, 0x324650, 0x324650, 1, true)
    for i=1,10 do
    ui.addTextArea(1005+i, "", player, 260, 118 + i*17, countries[i].ipower/9, 2, countries[i].color, 0x324650, 1, true)
    end
    ui.addTextArea(1016, "<b><N><font size='14'>AR\nBO\nBR\nCL\nCO\nEC\nPY\nPE\nUY\nVE", player, 220, 125, 390, 240, 0x324650, 0x324650, 0, true)
    addButton(player, 'Interessante', x, 320, 120)
    end

    addRelatory = function(player)
    addPopup(player, 400, 250)
    --{cities[finishID].n, cities[startID].country.n, tropasLeft, cities[startID].country.leader, cities[finishID].country.leader, bonus, entrenchedtropas, starttropas, startDefend}
    local a,b,c,d,e,f,g,h,i = table.unpack(playersList[player].relatory[1])
    local bonus = f > 1 and ('Bonus: <VP>+%d%s'):format(f*100-100,'%') or ('Atrito: <R>-%d%s'):format(100-f*100,'%')
    local winner = c > 1 and d or e
    ui.addTextArea(1005, ("<p align='center'><b><N><font size='20'><u>Batalha de %s</u>\n\n\n\n\n\n\n<font size='15'>%s venceu a batalha!\n<BV><font size='15'>tropas restante: <J>%d"):format(a,winner,c), player, 205, 80, 390, 240, 0x324650, 0x324650, 1, true)
    ui.addTextArea(1006, ("<b><N><p align='center'><u>%s forças</u>\n\n<BV>tropas: <J>%s\n<BV>%s\n<BV>Total: <J>%s"):format(d,h,bonus,math.floor(h*f)), player, 205, 130, 185, 165, 0x9292AA, 0x9292AA, 0, true)
    ui.addTextArea(1007, ("<b><N><p align='center'><u>%s forças</u>\n\n<BV>tropas: <J>%s\n<BV>Civil tropas: <J>%s\n<BV>Total: <J>%s"):format(e,i,g,i+g), player, 410, 130, 185, 165, 0x9292AA, 0x9292AA, 0, true)

    ui.removeTextArea(2000000, player)
    ui.removeTextArea(2000001, player)

    addButton(player, 'Interessante', x, 320, 120)
    end

    addSettings = function(player)
    addPopup(player, 300, 200)
    ui.addTextArea(1005, "<p align='center'><b><font color='#324650'><font size='20'>Configurações</font>", player, 255, 105, 290, 190, 0x9292AA, 0x9292AA, 1, true)
    ui.addTextArea(1006, "<p align='center'><b><BV>[•] <font color='#324650'>Adicionar/remover bordas do mapa", player, 255, 145, 290, 20, 0, 0, 0, true,
    function(player)
    playersList[player]:addBorders()
    addCities(player)
    end)
    addButton(player, 'Pronto', x, 260, 120)
    end

    closeTextArea = function(player)
    buttonId = 0
    for i=0,25 do
    ui.removeTextArea(1000+i, player)
    end
    end

    warnPlayer = function(player, text)
    if playersList[player].lastwarn < os.time()-500 then
    local warns = playersList[player].warns
    table.insert(warns, #warns)
    addTimer(function(i)
    if i == 1 then
    ui.addTextArea(1000000+#warns, ("<p align='right'><b><font color='#000000'>%s"):format(text), player, 501, 371 - #warns * 20, 300, 20, 0, 0x324650, 0, true)
    ui.addTextArea(1000000-#warns, ("<p align='right'><b><R>%s"):format(text), player, 500, 370 - #warns * 20, 300, 20, 0, 0x324650, 0, true)
    elseif i == 3 then
    ui.removeTextArea(1000000+#warns, player)
    ui.removeTextArea(1000000-#warns, player)
    table.remove(warns, 1)
    end
    end, 1000, 3, 'warns')
    playersList[player].lastwarn = os.time()
    end
    end

    notifyPlayer = function(player, text, relatory)
    local relatory = relatory and function(player) addRelatory(player) end or function (player) closeTextArea(player) end
    addTimer(function(i)
    if i == 1 then
    ui.addTextArea(2000000, ("<p align='center'><b><font size='24' color='#000000'>%s"):format(text), player, 1, 341, 800, 60, 0, 0x324650, 0, true)
    ui.addTextArea(2000001, ("<p align='center'><b><font size='24'><J>%s"):format(text), player, 0, 340, 800, 60, 0, 0x324650, 0, true, relatory)
    elseif i == 10 then
    ui.removeTextArea(2000000, player)
    ui.removeTextArea(2000001, player)
    end
    end, 1000, 10, 'notifys')
    end

    -- #conquerors minor TextArea Functions

    displayCountriesList = function(player, color, cancel, ...)
    for k,v in next, countries do
    if type(k) == 'number' then
    ui.addTextArea(k+10, ("<b><font color='#324650'>%s"):format(v.n), player, 41, 111 + (k-1)*20, 140, 20, 0x324650, 0x324650, 0, true)
    ui.addTextArea(k, ("<b>%s%s"):format(color, v.n), player, 40, 110 + (k-1)*20, 140, 20, 0x324650, 0x324650, 0, true, (...))
    else
    break
    end
    end

    if cancel then
    ui.addTextArea(21, ("<b><font color='#324650'>Cancel"), player, 41, 311, 140, 20, 0x324650, 0x324650, 0, true)
    ui.addTextArea(22, ("<b>Cancel"), player, 40, 310, 140, 20, 0x324650, 0x324650, 0, true,
    function(player)
    see(player)
    ui.removeTextArea(21, player)
    ui.removeTextArea(22, player)
    end)
    else
    ui.removeTextArea(21, player)
    ui.removeTextArea(22, player)
    end
    end

    displayCity = function(player, id)
    local playerData = playersList[player]
    local city = cities[id]
    if playerData.playing and city.country.n == countries[playerData.countryID].n then
    addPopup(player, 200, 120)
    ui.addTextArea(1007, ("<p align='center'><b><font color='#324650'><font size='15'><u>%s</u><br><font size='13'>%s\n<font size='11'>\ntropas: %s\n+ %s</font>"):format(city.n, city.country.n, city.tropas, city.mousepower), player, 305, 145, 190, 110, 0x9292AA, 0x9292AA, 1, true)

    ui.addTextArea(1008, "<b><font color='#324650'><font size='16'>X", player, 470, 145, 40, 40, 0x606090, 0x9292AA, 0, true,
    function(player)
    closeTextArea(player)
    end)

    addButton(player, "<font size='10'>Move/Attack", 310, y, 80, sizeY,
    function(player)
    ui.updateTextArea(1007, ("<p align='center'><b><font color='#324650'><font size='20'>Atenção!</font><font size='11'>\n\nEscolha uma cidade para atacar/implantar as tropas de %s</font>"):format(city.n), player)
    addButton(player, 'No', 320)
    addButton(player, 'Ok', 420, nil, nil, nil,
    function(player)
    playerData.firstID = id
    closeTextArea(player)
    addCitiesWar(player, id)
    end)
    end)
    addButton(player, 'Recruta', 410, y, 80, sizeY,
    function(player)
    if playerData.lastrecruit < os.time()-250 then
    if countries[playerData.countryID].power >= 10000 then
    cities[id]:recruit()
    displayCity(player, id)
    playerData.lastrecruit = os.time()
    countries[playerData.countryID].power = countries[playerData.countryID].power - 10000
    else
    return warnPlayer(player, 'Need at least 10000 mousepower')
    end
    end
    end)
    else
    addPopup(player, 200, 120)
    ui.addTextArea(1007, ("<p align='center'><b><font color='#324650'><font size='15'><u>%s</u><br><font size='13'>%s\n<font size='11'>\ntropas: %s\n+ %s</font>"):format(city.n, city.country.n, city.tropas, city.mousepower), player, 305, 145, 190, 110, 0x9292AA, 0x9292AA, 1, true)
    addButton(player, 'Close')
    end
    buttonId = 0
    end

    displayCountry = function(player, id)
    addPopup(player, 400, 250)
    local playerData = playersList[player]
    local country = countries[id]

    ui.addTextArea(1005, ("<p align='center'><b><font color='#324650'><font size='20'>%s | %s\n<font size='14'>Capital: %s\n<font size='12'>Leader: %s"):format(country.s, country.n, country.capital, country.leader), player, 205, 80, 390, 240, 0x9292AA, 0x9292AA, 1, true)
    ui.addTextArea(1006, "<b><p align='center'><n><font size='11'><font color='#324650'>Declarar Guerra", player, 495, 160, 90, 20, 0xFF0000, 0x9292AA, 1, true,
    function(player)
    displayCountriesList(player, '<R>', true,
    function(player)

    local isAlly = isSomething('Aliados', playerData.countryID, playerData.selectedID)
    local isEnemy = isSomething('Inimigos', playerData.countryID, playerData.selectedID)
    local isTruce = isSomething('Treguas', playerData.countryID, playerData.selectedID)

    if isEnemy or isTruce or isAlly or playerData.selectedID == playerData.countryID then
    see(player)
    return warnPlayer(player, "Não posso declarar guerra!")
    end
    playerData:joinedWar()
    addPopup(player, sizeX, sizeY, ('Declaramos guerra em %s'):format(countries[playerData.selectedID].n), 'Parece bom')
    if playersList[countries[playerData.selectedID].leader] then
    addPopup(countries[playerData.selectedID].leader, sizeX, sizeY, ('%s Declarou guerra contra nós'):format(countries[playerData.countryID].n), 'Parece ruim,')
    end
    end)
    end)
    ui.addTextArea(1007, "<b><p align='center'><n><font size='11'><font color='#324650'>Conciliar", player, 495, 190, 90, 20, 0xFEB1FC, 0x9292AA, 1, true,
    function(player)
    displayCountriesList(player, '<CH2>', true,
    function(player)

    if not isSomething('Inimigos', playerData.countryID, playerData.selectedID) or playerData.selectedID == playerData.countryID then
    see(player)
    return warnPlayer(player, "Não consigo conciliar!")
    end
    addPopup(player, sizeX, sizeY, ('We sent a conciliate request to %s'):format(countries[playerData.selectedID].n), 'Parece bom')

    see(player)

    local playerTwo = countries[playerData.selectedID].leader ~= countries[playerData.selectedID].n .. ' Bot'
    local playerTwoName = countries[playerData.selectedID].leader

    if playerTwo and #countries[playerData.selectedID].cities ~= 0 then
    local playerTwoName = countries[playerData.selectedID].leader
    addPopup(playerTwoName, sizeX, sizeY, ('%s sent us a conciliate request, what we should do'):format(countries[playerData.countryID].n))
    addButton(playerTwoName, 'Recusar', 320, nil, nil, nil,
    function(player)
    closeTextArea(player)
    addPopup(playerData.name, sizeX, sizeY, ('%s recusou nosso pedido de conciliação!'):format(playerTwoName), 'Damn!')
    end)

    addButton(playerTwoName, 'Aceitar', 420, nil, nil, nil,
    function(player)
    closeTextArea(player)
    playerData:leftWar(playersList[playerTwoName].countryID)
    addPopup(playerData.name, sizeX, sizeY, ('%s aceitou nosso pedido de conciliação!'):format(playerTwoName), 'Yay!')
    end)
    else
    closeTextArea(player)
    playerData:leftWar(playerData.selectedID)
    addPopup(player, sizeX, sizeY, ('%s aceitou nosso pedido de conciliação!'):format(countries[playerData.selectedID].n), 'Yay!')
    if playerTwo then
    addPopup(playerData.name, sizeX, sizeY, ('Aceitamos o pedido de paz de %s!'):format(countries[playerData.selectedID].n), 'Yay!')
    end
    end
    end)
    end)
    ui.addTextArea(1008, "<b><p align='center'><n><font size='11'><font color='#324650'>Aliado com", player, 495, 220, 90, 20, 0x2ECF73, 0x9292AA, 1, true,
    function(player)
    displayCountriesList(player, '<VP>', true,
    function(player)
    local isEnemy = isSomething('Inimigos', playerData.countryID, playerData.selectedID)
    local isAlly = isSomething('Aliados', playerData.countryID, playerData.selectedID)

    if isEnemy or isAlly or playerData.selectedID == playerData.countryID then
    see(player)
    return warnPlayer(player, "Can't send alliance!")
    end

    addPopup(player, sizeX, sizeY, ('We sent a alliance request to %s'):format(countries[playerData.selectedID].n), 'Parece bom')
    see(player)

    local playerTwo = countries[playerData.selectedID].leader ~= countries[playerData.selectedID].n .. ' Bot'
    local playerTwoName = countries[playerData.selectedID].leader

    if playerTwo then
    addPopup(playerTwoName, sizeX, sizeY, ('%s nos enviou um pedido de aliança, devemos aceitar?'):format(countries[playerData.countryID].n))
    addButton(playerTwoName, 'Recusar', 320, nil, nil, nil,
    function(player)
    closeTextArea(player)
    addPopup(playerData.name, sizeX, sizeY, ('%s recusou nossa poderosa aliança!'):format(playerTwoName), 'Damn!')
    end)

    addButton(playerTwoName, 'Aceitar', 420, nil, nil, nil,
    function(player)
    closeTextArea(player)
    playerData:joinedAlliance(playersList[playerTwoName].countryID)
    addPopup(playerData.name, sizeX, sizeY, ('%s aceitou nossa aliança!'):format(playerTwoName), 'Yay!')
    end)
    else
    closeTextArea(player)
    addPopup(playerData.name, sizeX, sizeY, ('%s recusou nossa poderosa aliança!'):format(playerTwoName), 'Damn!')
    end
    end)
    end)
    ui.addTextArea(1009, "<b><p align='center'><n><font size='11'><font color='#324650'>Sair aliança", player, 495, 250, 90, 20, 0xA4CF9E, 0x9292AA, 1, true,
    function(player)
    displayCountriesList(player, '<T>', true,
    function(player)

    local isAlly = isSomething('Aliados', playerData.countryID, playerData.selectedID)

    see(player)
    if not isAlly then
    return warnPlayer(player, "Can't unally!")
    end

    playerData:leftAlliance()
    addPopup(player, sizeX, sizeY, ('We broke ties with %s'):format(countries[playerData.selectedID].n), 'Parece bom')
    if playersList[countries[playerData.selectedID].leader] then
    addPopup(countries[playerData.selectedID].leader, sizeX, sizeY, ('%s broke ties with us!'):format(countries[playerData.countryID].n), 'Looks Bad')
    end

    end)
    end)
    if playerData.countryID == id then
    ui.addTextArea(1010, ("<b><p align='center'><n><font size='7'><font color='#324650'>Form %s"):format(formedN[id]), player, 495, 290, 90, 20, 0x2F7FCC, 0x9292AA, 1, true,
    function(player)
    playersList[player]:forming()
    end)
    end
    ui.addTextArea(1011, "<b><font color='#324650'><font size='20'>X", player, 570, 80, 40, 40, 0x606090, 0x9292AA, 0, true,
    function(player)
    closeTextArea(player)
    end)

    Aliados, Inimigos, Treguas = getLists(country)

    ui.addTextArea(1012, ("<b><font color='#324650'>Aliados: %s"):format(Aliados), player, 220, 160, 250, 20, 0x9292AA, 0x324650, 1, true)
    ui.addTextArea(1013, ("<b><font color='#324650'>Inimigos: %s"):format(Inimigos), player, 220, 190, 250, 20, 0x9292AA, 0x324650, 1, true)
    ui.addTextArea(1014, ("<b><font color='#324650'>Treguas: %s"):format(Treguas), player, 220, 220, 250, 20, 0x9292AA, 0x324650, 1, true)
    end

    -- #conquerors gameFunctions

    movetropas = function(player, id)
    local playerData = playersList[player]
    local startID = playerData.firstID
    local finishID = id

    local tropas = cities[startID].tropas
    local defend = cities[finishID].tropas

    if tropas < 1 then
    addCities(player)
    return warnPlayer(player, "Can't move/attack without tropas")
    end

    local starttropas = tropas
    local startDefend = defend

    if cityIsSomething(player, id, 'Inimigos') then
    local entrenchedtropas = math.floor(math.random(25, 200) * cities[finishID].mousepower)
    local bonus = math.random(60,120)/100

    tropas = math.floor(tropas * bonus)
    defend = defend + entrenchedtropas

    local tropasLeft = tropas - defend

    cities[startID]:cleartropas()
    cities[finishID]:cleartropas()

    playerData.relatory = {}

    local args = {cities[finishID].n, cities[startID].country.n, tropasLeft, cities[startID].country.leader, cities[finishID].country.leader, bonus, entrenchedtropas, starttropas, startDefend}
    table.insert(playerData.relatory, args)

    local playerAttacked = playersList[cities[finishID].country.leader]
    if playerAttacked then
    table.insert(playerAttacked.relatory, args)
    end

    local winner = false

    if tropasLeft > 0 then
    winner = true
    cities[finishID]:recruit(tropasLeft)

    if cityIsTrulyEnemy(player, id) then
    cities[finishID]:transfer(playerData.countryID)
    else
    cities[finishID]:transfer(math.floor(cities[finishID].id/10000))
    end

    for k,v in next, playersList do
    addCities(k)
    end
    else
    local tropasLeftDefend = defend - tropas - entrenchedtropas > 0 and defend - tropas - entrenchedtropas or 0
    cities[finishID]:recruit(tropasLeftDefend)
    addCities(player)
    end

    if winner then
    notifyPlayer(player, ('%s ganhou a batalha de %s!'):format(cities[startID].country.n, cities[finishID].n), true)
    if playerAttacked then
    notifyPlayer(playerAttacked.name, ('%s ganhou a batalha de %s!'):format(cities[startID].country.n, cities[finishID].n), true)
    end
    else
    notifyPlayer(player, ('%s ganhou a batalha de %s!'):format(cities[finishID].country.n, cities[finishID].n), true)
    if playerAttacked then
    notifyPlayer(playerAttacked.name, ('%s ganhou a batalha de %s!'):format(cities[finishID].country.n, cities[finishID].n), true)
    end
    end
    elseif cityIsSomething(player, id, 'Aliados') or cities[id].country.n == countries[playerData.countryID].n then
    cities[startID]:cleartropas()
    cities[finishID]:recruit(tropas)
    addCities(player)
    else
    addCities(player)
    end
    displayCity(player, finishID)
    end

    -- TFM Functions

    eventKeyboard = function(player, key)
    if not playersList[player].playing then
    return
    end

    if key == 81 then -- Q
    if playersList[player].countryOpen then
    closeTextArea(player, 19)
    else
    displayCountry(player, playersList[player].countryID)
    end
    playersList[player].countryOpen = not playersList[player].countryOpen
    return
    elseif key == 70 then -- F
    tfm.exec.playEmote(player, 10, countries[playersList[player].countryID].s)
    return
    elseif key == 76 then
    if playersList[player].rankingOpen then
    closeTextArea(player, 19)
    else
    addRanking(player)
    end
    playersList[player].rankingOpen = not playersList[player].rankingOpen
    return
    elseif key == 77 then
    if playersList[player].showingMap then
    addCities(player)
    else
    showMapForming(player)
    end
    playersList[player].showingMap = not playersList[player].showingMap
    return
    end
    end

    eventLoop = function()
    timersLoop()
    end

    eventNewPlayer = function(player)
    tfm.exec.respawnPlayer(player)
    tfm.exec.setNameColor(player, 0xC2C2DA)
    if not playersList[player] then
    local playerTable = players.new(player)
    setmetatable(playerTable, playersMeta)

    playersList[player] = playerTable
    end
    displayCountriesList(player, '<N>', false,
    function(player)
    if not playersList[player].playing then
    local id = playersList[player].selectedID
    if countries[id].leader == countries[id].n .. ' Bot' then
    for k,v in next, keys do
    system.bindKeyboard(player, v, true, true)
    end

    tfm.exec.setNameColor(player, countries[id].color)
    tfm.exec.playEmote(player, 10, countries[id].s)

    playersList[player]:choosed(id)
    ui.addTextArea(-75, "<font size='11' color='#8C96B7' face='Lucida Console'><b>2<font size='16'>1<font size='8'>3", player, 30, 377.5, 300, 40, -1, -1, 0, true,
    function(player)
    addRanking(player)
    end)
    ui.addTextArea(-25, "", player, 250, 377.5, 300, 40, -1, -1, 0, true)
    ui.addTextArea(-50, "<font size='16' color='#8C96B7' ><b>|||</b>", player, 760, 374.5, 40, 40, -1, -1, 0 , true,
    function(player)
    addSettings(player)
    end)
    end
    end
    end)
    loadMap(player)

    for i=-10,-1,1 do
    ui.addTextArea(i, string.rep("<font size='20'>\n",2), player, 16, 114 + ((-i)-1)*20, 22, 10, 0x324650, 0xFFFFFF, 0, true,
    function(player)
    tfm.exec.playEmote(player, 10, countries[-i].s)
    end)
    end
    end; table.foreach(tfm.get.room.playerList, eventNewPlayer)

    eventPlayerDied = function(player)
    tfm.exec.respawnPlayer(player)
    if playersList[player] and playersList[player].playing then
    tfm.exec.setNameColor(player, countries[playersList[player].countryID].color)
    else
    tfm.exec.setNameColor(player, 0xC2C2DA)
    end
    end

    eventPlayerLeft = function(player)
    if playersList[player].playing then
    playersList[player].playing = false
    for i=1,#countries do
    if player == countries[i].leader then
    countries[i].leader = countries[i].n .. ' Bot'
    end
    end
    end
    end

    eventTextAreaCallback = function(id, player, callback)
    local playerData = playersList[player]

    if not (id > 1000 and id < 2000) then
    playerData.selectedID = id
    end

    local args = {}
    for i in callback:gmatch('[^_]+') do
    args[#args+1] = i
    end

    local event = table.remove(args, 1)
    if event == 'callback' then
    return playerData.callbacks[tonumber(args[1])].event(player, playerData.callbacks[tonumber(args[1])].callbacksx)
    end
    end

    local mousepower = addTimer(function(i)
    for i=1,#countries do
    local mousepower = 0
    for k,v in next, countries[i].cities do
    mousepower = mousepower + math.ceil(v[1])
    end
    countries[i].ipower = mousepower
    countries[i].power = countries[i].power + mousepower
    end
    for k,v in next, playersList do
    if v.playing then
    ui.updateTextArea(-25, ("<p align='center'><font color='#8C96B7' face='Lucida Console' size='16'>Mousepower: <b>%d"):format(countries[playersList[k].countryID].power), playersList[k].name)
    end
    end
    end, 500, 0)

    tfm.exec.disableAutoShaman()
    tfm.exec.disableAfkDeath()
    tfm.exec.disableAutoNewGame()
    tfm.exec.newGame('<C><P /><Z><S><S L="800" o="596384" H="80" X="400" Y="410" T="12" P="0,0,.3,.2,,0,0,0" /><S P="0,0,.3,.2,,0,0,0" Y="110" L="10" H="10" c="4" i=",,1715aac7ab3.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="130" L="10" H="10" c="4" i=",,1715a904a5b.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="150" L="10" H="10" c="4" i=",,1715aac9223.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="170" L="10" H="10" c="4" i=",,1715a9090aa.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="190" L="10" H="10" c="4" i=",,1715a9032e3.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="210" L="10" H="10" c="4" i=",,1715a90a81d.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="230" L="10" H="10" c="4" i=",,1715a907938.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="250" L="10" H="10" c="4" i=",,1715a90d6fd.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="270" L="10" H="10" c="4" i=",,1715a9061c5.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="270" L="10" H="10" c="4" i=",,1715a9061c5.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="290" L="10" H="10" c="4" i=",,1715a90bf8c.png" T="0" X="20" /></S><D /><O /></Z></C>')
    ui.setMapName('<J>ProdigioSS</J>')

    Queria poder ajudar, mas não consigo acessar nenhuma página do Pastebin. Poderia postar o script dentro de um [ code=lua][/code] dentro de um spoiler?


    Esse script originalmente pertence ao Module não-oficial #Conguerors, feito por Twistzaok#0000.

    O provável é que você tenha pego um script que foi alterado (notei isso pelo nome do mapa quando iniciei o script), então erros pode ocorrer.

    Tente usar a versão origina na galerial: [Galeria] Lucasrslv.

    Caso o error persista, vou tentar consertar. Se não conseguir, vou tentar contatar o criador, e se ele ainda estiver jogando/atualizando scripts, vou notificar o erro para ver se ele pode ajudar.
    Victorck6
    « Citoyen »
    1602432120000
      • Victorck6#6662
      • Profil
      • Derniers messages
      • Tribu
    #2517
      0
    Jp_darkuss a dit :
    Victorck6 a dit :
    Jp_darkuss a dit :
    Victorck6 a dit :
    Alguém poderia ve esse script?

    Depois de um tempo o script é parado.

    https://pastebin.com/raw/CNC9FkSt

    Okay

    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
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
    922
    923
    924
    925
    926
    927
    928
    929
    930
    931
    932
    933
    934
    935
    936
    937
    938
    939
    940
    941
    942
    943
    944
    945
    946
    947
    948
    949
    950
    951
    952
    953
    954
    955
    956
    957
    958
    959
    960
    961
    962
    963
    964
    965
    966
    967
    968
    969
    970
    971
    972
    973
    974
    975
    976
    977
    978
    979
    980
    981
    982
    983
    984
    985
    986
    987
    988
    989
    990
    991
    992
    993
    994
    995
    996
    997
    998
    999
    1000
    1001
    1002
    1003
    1004
    1005
    1006
    1007
    1008
    1009
    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    1116
    1117
    1118
    1119
    1120
    1121
    1122
    1123
    1124
    1125
    1126
    1127
    1128
    1129
    1130
    1131
    1132
    1133
    1134
    1135
    1136
    1137
    1138
    1139
    1140
    1141
    1142
    1143
    1144
    1145
    1146
    1147
    1148
    1149
    1150
    1151
    1152
    1153
    1154
    1155
    1156
    1157
    1158
    1159
    1160
    1161
    1162
    1163
    1164
    1165
    1166
    1167
    1168
    1169
    1170
    1171
    1172
    1173
    1174
    1175
    1176
    1177
    1178
    1179
    1180
    1181
    1182
    1183
    1184
    1185
    1186
    1187
    1188
    1189
    1190
    1191
    1192
    1193
    1194
    1195
    1196
    1197
    1198
    1199
    1200
    1201
    1202
    1203
    1204
    1205
    1206
    1207
    1208
    1209
    1210
    1211
    1212
    1213
    1214
    1215
    1216
    1217
    1218
    1219
    1220
    1221
    1222
    1223
    1224
    1225
    1226
    1227
    1228
    1229
    1230
    1231
    1232
    1233
    1234
    1235
    1236
    1237
    1238
    1239
    1240
    1241
    1242
    1243
    1244
    1245
    1246
    1247
    1248
    1249
    1250
    1251
    1252
    1253
    1254
    1255
    1256
    1257
    1258
    1259
    1260
    1261
    1262
    1263
    1264
    1265
    1266
    1267
    1268
    1269
    1270
    1271
    1272
    1273
    1274
    1275
    1276
    1277
    1278
    1279
    1280
    1281
    1282
    1283
    1284
    1285
    1286
    1287
    1288
    1289
    1290
    1291
    1292
    1293
    1294
    1295
    1296
    1297
    1298
    1299
    1300
    1301
    1302
    1303
    1304
    1305
    1306
    1307
    1308
    1309
    1310
    1311
    1312
    1313
    1314
    1315
    1316
    1317
    1318
    1319
    1320
    1321
    1322
    1323
    1324
    1325
    1326
    1327
    1328
    1329
    1330
    1331
    1332
    1333
    1334
    1335
    1336
    1337
    1338
    1339
    1340
    1341
    1342
    1343
    1344
    1345
    1346
    1347
    1348
    1349
    1350
    1351
    1352
    1353
    1354
    1355
    1356
    1357
    1358
    1359
    1360
    1361
    1362
    1363
    1364
    1365
    1366
    1367
    1368
    1369
    1370
    1371
    1372
    1373
    1374
    1375
    1376
    1377
    1378
    1379
    1380
    1381
    1382
    1383
    1384
    1385
    1386
    1387
    1388
    1389
    1390
    -- Variables and Tables

    local keys = {70,76,77,81}

    local formedN = {'Rio de La Plata', 'Peru-Bolivian Confederation', 'Empire of Brazil', 'Patagonia', 'Gran-Colombia', 'Audiencia of Quito', 'Empire of Paraguay', 'Inca Empire', 'Oriental Kingdom', 'Bolivar Empire'}
    local formedNeed = {{1,2,3,4,5,6,7,8,15,18,27,32},{7,8,15,18,27,28,29,30,31}, {9,10,11,12,13,14,15,16,32}, {2,3,5,17,18,19,20}, {21,22,23,24,25,33,34,35}, {21,24,25,31} ,{4,5,12,26,27}, {17,18,24,25,28,29,30,31}, {1,32}, {7,8,15,21,22,23,24,25,27,28,29,30,31,33,34,35}}

    local game = {
    countries = {
    [1] = {n = 'Argentina', s = 'AR'},
    [2] = {n = 'Bolivia', s = 'BO'},
    [3] = {n = 'Brazil', s = 'BR'},
    [4] = {n = 'Chile', s = 'CL'},
    [5] = {n = 'Colombia', s = 'CO'},
    [6] = {n = 'Ecuador', s = 'EC'},
    [7] = {n = 'Paraguay', s = 'PY'},
    [8] = {n = 'Peru', s = 'PE'},
    [9] = {n = 'Uruguay', s = 'UY'},
    [10] = {n = 'Venezuela', s = 'VE'},

    removeCity = function(self, cityName)
    local removeValue
    for k,v in next, self.cities do
    if v[2] == cityName then
    removeValue = k
    end
    end
    table.remove(self.cities, removeValue)
    if #self.cities == 0 then
    notifyPlayer(nil, ('%s collapsed!'):format(self.n), false)
    end
    end,

    addCity = function(self, cityName, cityMousepower)
    local args = {cityMousepower, cityName}
    table.insert(self.cities, args)
    if #self.cities == 35 then
    notifyPlayer(nil, ('Parabéns! %s ganhou o jogo como %s!'):format(self.leader, self.n), false)
    won()
    end
    end,
    },

    cities = {
    [1] = {
    id = 10000,
    n = 'Buenos Aires',
    mousepower = 302.5,
    x = 622, y = 270, l = 46, h = 20
    },
    [2] = {
    id = 10001,
    n = 'Bariloche',
    mousepower = 10.1,
    x = 622, y = 270, l = 20, h = 50
    },
    [3] = {
    id = 10002,
    n = 'Comodoro Rivadavia',
    mousepower = 3.4,
    x = 622, y = 320, l = 12, h = 40
    },
    [4] = {
    id = 10003,
    n = 'Cordóba',
    mousepower = 44.5,
    x = 620, y = 210, l = 55, h = 55
    },
    [5] = {
    id = 10004,
    n = 'Posadas',
    mousepower = 9.1,
    x = 670, y = 238, l = 15, h = 15
    },
    [6] = {
    id = 10005,
    n = 'Ushuaia',
    mousepower = 1.4,
    x = 632, y = 375, l = 8, h = 8
    },
    [7] = {
    id = 20000,
    n = 'La Paz',
    mousepower = 52.5,
    x = 620, y = 148, l = 20, h = 55
    },
    [8] = {
    id = 20001,
    n = 'Santa Cruz',
    mousepower = 53.9,
    x = 640, y = 168, l = 40, h = 40
    },
    [9] = {
    id = 30000,
    n = 'Brasília',
    mousepower = 74.3,
    x = 670, y = 110, l = 65, h = 105
    },
    [10] = {
    id = 30001,
    n = 'Boa Vista',
    mousepower = 6,
    x = 640, y = 70, l = 20, h = 20
    },
    [11] = {
    id = 30002,
    n = 'Manaus',
    mousepower = 27.8,
    x = 610, y = 90, l = 90, h = 50
    },
    [12] = {
    id = 30003,
    n = 'Porto Alegre',
    mousepower = 31,
    x = 690, y = 215, l = 16, h = 36
    },
    [13] = {
    id = 30004,
    n = 'Porto Velho',
    mousepower = 9.1,
    x = 640, y = 130, l = 30, h = 30
    },
    [14] = {
    id = 30005,
    n = 'Recife',
    mousepower = 38.8,
    x = 740, y = 125, l = 36, h = 66
    },
    [15] = {
    id = 30006,
    n = 'Rio Branco',
    mousepower = 10.2,
    x = 600, y = 130, l = 20, h = 20
    },
    [16] = {
    id = 30007,
    n = 'São Paulo',
    mousepower = 275.1,
    x = 710, y = 175, l = 40, h = 40
    },
    [17] = {
    id = 40000,
    n = 'Santiago',
    mousepower = 160.4,
    x = 610, y = 220, l = 6, h = 60
    },
    [18] = {
    id = 40001,
    n = 'Antofagasta',
    mousepower = 9.7,
    x = 608, y = 190, l = 6, h = 30
    },
    [19] = {
    id = 40002,
    n = 'Concepción',
    mousepower = 8.6,
    x = 610, y = 280, l = 6, h = 80
    },
    [20] = {
    id = 40003,
    n = 'Punta Arenas',
    mousepower = 3.1,
    x = 620, y = 365, l = 10, h = 10
    },
    [21] = {
    id = 50000,
    n = 'Bogotá',
    mousepower = 275.3,
    x = 570, y = 80, l = 34, h = 20
    },
    [22] = {
    id = 50001,
    n = 'Barranquilla',
    mousepower = 40.1,
    x = 577, y = 45, l = 14, h = 30
    },
    [23] = {
    id = 50002,
    n = 'Bucaramanga',
    mousepower = 14.5,
    x = 597, y = 62, l = 20, h = 20
    },
    [24] = {
    id = 60000,
    n = 'Quito',
    mousepower = 60.4,
    x = 555, y = 95, l = 20, h = 10
    },
    [25] = {
    id = 60001,
    n = 'Guayaquil',
    mousepower = 57.3,
    x = 555, y = 110, l = 10, h = 10
    },
    [26] = {
    id = 70000,
    n = 'Asunción',
    mousepower = 65.5,
    x = 670, y = 218, l = 14, h = 14
    },
    [27] = {
    id = 70001,
    n = 'Pedro Juan Caballero',
    mousepower = 25.2,
    x = 653, y = 202, l = 16, h = 16},
    [28] = {
    id = 80000,
    n = 'Lima',
    mousepower = 232.5,
    x = 575, y = 135, l = 20, h = 30
    },
    [29] = {
    id = 80001,
    n = 'Cuzco',
    mousepower = 10.7,
    x = 587, y = 155, l = 25, h = 30
    },
    [30] = {
    id = 80002,
    n = 'Iquitos',
    mousepower = 11.4,
    x = 555, y = 125, l = 30, h = 20
    },
    [31] = {
    id = 80003,
    n = 'Trujillo',
    mousepower = 21,
    x = 573, y = 108, l = 30, h = 20
    },
    [32] = {
    id = 90000,
    n = 'Montevideo',
    mousepower = 74.5,
    x = 672, y = 256, l = 18, h = 18
    },
    [33] = {
    id = 100000,
    n = 'Caracas',
    mousepower = 102,
    x = 614, y = 48, l = 36, h = 22
    },
    [34] = {
    id = 100001,
    n = 'Maracaibo',
    mousepower = 57.3,
    x = 600, y = 45, l = 12, h = 12,
    },
    [35] = {
    id = 100002,
    n = 'Puerto Ayacucho',
    mousepower = 1.3,
    x = 625, y = 75, l = 10, h = 10,
    },

    recruit = function(self, amount)
    local amount = amount and amount or 10000
    self.tropas = self.tropas + amount
    end,

    cleartropas = function(self)
    self.tropas = 0
    end,

    transfer = function(self, countryID, cityID)
    local country = countries[countryID]
    self.country:removeCity(self.n)
    self.country = country
    country:addCity(self.n, self.mousepower)
    end,
    },
    }

    local playersList = {}

    local players = {
    new = function(name)
    return {
    name = name,

    firstID = nil,
    countryID = nil,
    selectedID = nil,

    borders = false,
    playing = false,
    countryOpen = false,
    rankingOpen = false,
    showingMap = false,

    warns = {},
    relatory = {},
    callbacks = {},

    lastrecruit = os.time()-250,
    lastwarn = os.time()-500

    }
    end,

    choosed = function(self, countryID)
    self.playing = true
    self.countryID = countryID

    countries[countryID].leader = self.name

    displayCountry(self.name, countryID)
    see(self.name)
    end,

    joinedWar = function(self)
    table.insert(countries[self.countryID].Inimigos, countries[self.selectedID])
    table.insert(countries[self.selectedID].Inimigos, countries[self.countryID])
    see(self.name)

    local remove = {}

    for k,v in next, countries[self.selectedID].Aliados do
    table.insert(v.Inimigos, countries[self.countryID])
    for n,m in next, countries[self.countryID].Aliados do

    if m.leader ~= m.n .. ' Bot' then
    addPopup(m.leader, sizeX, sizeY, ('%s declared war at %s!'):format(countries[self.countryID].n, countries[self.selectedID].n), 'Damn!')
    end

    if m.n == v.n then
    table.insert(remove, n)

    local remove2 = {}

    for x,y in next, v.Aliados do
    if y.n == countries[self.countryID].n then
    table.insert(remove2, x)
    end
    end

    for a,b in next, remove2 do
    table.remove(v.Aliados, b)
    end
    end
    end
    end

    for k,v in next, remove do
    table.remove(countries[self.countryID].Aliados, v)
    end
    end,

    leftWar = function(self, id)

    local removeKey, removeKey2 = nil, nil
    local enemyTbl = countries[id]

    for k,v in next, countries[self.countryID].Inimigos do
    if v.n == enemyTbl.n then
    removeKey = k
    break
    end
    end

    for k,v in next, enemyTbl.Inimigos do
    if v.n == countries[self.countryID].n then
    removeKey2 = k
    break
    end
    end

    table.remove(enemyTbl.Inimigos, removeKey2)
    table.remove(countries[self.countryID].Inimigos, removeKey)
    see(self.name)

    self:joinedTreguas(id)
    end,

    joinedTreguas = function(self, id)

    local playerCountry = countries[self.countryID]
    local otherCountry = countries[id]

    addTimer(function(i)
    if i == 1 then
    table.insert(otherCountry.Treguas, playerCountry)
    table.insert(playerCountry.Treguas, otherCountry)
    elseif i == 180 then
    if playersList[playerCountry.leader] then
    addPopup(playerCountry.leader, sizeX, sizeY, ('Our truce with %s has finished'):format(otherCountry.n), 'Okay')
    end
    if playersList[otherCountry.leader] then
    addPopup(otherCountry.leader, sizeX, sizeY, ('Our truce with %s has finished'):format(playerCountry.n), 'Okay')
    end
    table.remove(otherCountry.Treguas, 1)
    table.remove(playerCountry.Treguas, 1)
    end
    end, 1000, 180)
    end,

    joinedAlliance = function(self, id)
    table.insert(countries[self.countryID].Aliados, countries[id])
    table.insert(countries[id].Aliados, countries[self.countryID])
    see(self.name)
    end,

    leftAlliance = function(self)
    local playerCountry = countries[self.countryID]
    local allyTbl = countries[self.selectedID]

    local remove, remove2

    for k,v in next, playerCountry.Aliados do
    if v.n == allyTbl.n then
    remove = k
    break
    end
    end
    for k,v in next, allyTbl.Aliados do
    if v.n == playerCountry.n then
    remove2 = k
    break
    end
    end

    table.remove(playerCountry.Aliados, remove)
    table.remove(allyTbl.Aliados, remove2)

    self:joinedTreguas(self.selectedID)
    end,

    addBorders = function(self)
    self.borders = not self.borders
    end,

    forming = function(self)
    local id = self.countryID
    if #countries[id].Inimigos > 0 then
    return warnPlayer(self.name, 'Need be at peace!')
    end

    for k,v in next, formedNeed[id] do
    if cities[v].country.n ~= countries[id].n then
    return warnPlayer(self.name, 'Press M for info')
    end
    if k == #formedNeed[id] then
    countries[id].n = formedN[id]
    end
    end
    see(self.name)
    end,
    }

    local playersMeta = {
    __index = players
    }

    local citiesMeta = {
    __index = game.cities
    }

    local countriesMeta = {
    __index = game.countries
    }

    -- Timer

    do
    local List = {}
    function List.new ()
    return {first = 0, last = -1}
    end

    function List.pushleft (list, value)
    local first = list.first - 1
    list.first = first
    list[first] = value
    end

    function List.pushright (list, value)
    local last = list.last + 1
    list.last = last
    list[last] = value
    end

    function List.popleft (list)
    local first = list.first
    if first > list.last then
    return nil
    end
    local value = list[first]
    list[first] = nil -- to allow garbage collection
    list.first = first + 1
    return value
    end

    function List.popright (list)
    local last = list.last
    if list.first > last then
    return nil
    end
    local value = list[last]
    list[last] = nil -- to allow garbage collection
    list.last = last - 1
    return value
    end

    -- the lib
    local timerList = {}
    local timersPool = List.new()

    function addTimer(callback, ms, loops, label, ...)
    local id = List.popleft(timersPool)
    if id then
    local timer = timerList[id]
    timer.callback = callback
    timer.label = label
    timer.arguments = {...}
    timer.time = ms
    timer.currentTime = 0
    timer.currentLoop = 0
    timer.loops = loops or 1
    timer.isComplete = false
    timer.isPaused = false
    timer.isEnabled = true
    else
    id = #timerList+1
    timerList[id] = {
    callback = callback,
    label = label,
    arguments = {...},
    time = ms,
    currentTime = 0,
    currentLoop = 0,
    loops = loops or 1,
    isComplete = false,
    isPaused = false,
    isEnabled = true,
    }
    end
    return id
    end

    function getTimerId(label)
    local found
    for id = 1, #timerList do
    local timer = timerList[id]
    if timer.label == label then
    found = id
    break
    end
    end
    return found
    end

    function pauseTimer(id)
    if type(id) == 'string' then
    id = getTimerId(id)
    end

    if timerList[id] and timerList[id].isEnabled then
    timerList[id].isPaused = true
    return true
    end
    return false
    end

    function resumeTimer(id)
    if type(id) == 'string' then
    id = getTimerId(id)
    end

    if timerList[id] and timerList[id].isPaused then
    timerList[id].isPaused = false
    return true
    end
    return false
    end

    function removeTimer(id)
    if type(id) == 'string' then
    id = getTimerId(id)
    end

    if timerList[id] and timerList[id].isEnabled then
    timerList[id].isEnabled = false
    List.pushright(timersPool, id)
    return true
    end
    return false
    end

    function clearTimers()
    local timer
    repeat
    timer = List.popleft(timersPool)
    if timer then
    table.remove(timerList, timer)
    end
    until timer == nil
    end

    function timersLoop()
    for id = 1, #timerList do
    local timer = timerList[id]
    if timer.isEnabled and timer.isPaused == false then
    if not timer.isComplete then
    timer.currentTime = timer.currentTime + 500
    if timer.currentTime >= timer.time then
    timer.currentTime = 0
    timer.currentLoop = timer.currentLoop + 1
    if timer.loops > 0 then
    if timer.currentLoop >= timer.loops then
    timer.isComplete = true
    if eventTimerComplete ~= nil then
    eventTimerComplete(id, timer.label)
    end
    removeTimer(id)
    end
    end
    if timer.callback ~= nil then
    timer.callback(timer.currentLoop, table.unpack(timer.arguments))
    end
    end
    end
    end
    end
    end
    end

    -- Initializing game info

    addInfo = function()
    local colors = {'0x00FFF9', '0xFF8F00', '0x02FF00', '0x6B4A2C', '0x9100FF', '0xEB00FF', '0x002EFF', '0xFF006C', '0xFFF000', '0xFF0000'}
    for k,v in next, game.countries do
    if type(v) == 'table' then
    v.Treguas = {}
    v.Aliados = {}
    v.cities = {}
    v.Inimigos = {}

    v.ipower = 0
    v.power = 50000
    v.leader = ('%s Bot'):format(v.n)
    v.color = colors[k]
    v.capital = '?'

    setmetatable(v, countriesMeta)
    else
    break
    end
    end
    for k,v in next, game.cities do
    if type(v) == 'table' then
    countryID = math.floor(v.id/10000)
    v.country = game.countries[countryID]
    v.tropas = 0

    setmetatable(v, citiesMeta)
    local args = {v.mousepower, v.n}
    table.insert(game.countries[countryID].cities, args)

    if v.id%10000 == 0 then
    game.countries[countryID].capital = v.n
    v.mousepower = v.mousepower + 50
    v.tropas = 50000
    end
    else
    break
    end
    end
    end; addInfo()

    local gameSave

    loadGame = function(save)
    function copy(tbl)
    local new = {}
    for k, v in next, tbl do
    if type(v) == "table" then
    new[k] = copy(v)
    else
    new[k] = v
    end
    end
    return new
    end

    if save then
    gameSave = copy(game)
    else
    game = gameSave
    end

    countries = game.countries
    cities = game.cities

    end; loadGame(true)

    -- TextArea manipulation

    local buttonId = 0

    addCities = function(player)
    for i=1,#cities do
    for k,v in next, playersList do
    if type(v) == 'table' then
    local color = playersList[k].borders and 0x6A7495 or cities[i].country.color
    ui.addTextArea(cities[i].id, "<font size='80'>"..string.rep('\n', 20), k, cities[i].x, cities[i].y, cities[i].l, cities[i].h, cities[i].country.color, color, 1, true,
    function(player)
    displayCity(player, i)
    end)
    end
    end
    end
    end

    addCitiesWar = function(player)
    for i=1,#cities do
    ui.addTextArea(cities[i].id, "<font size='80'>"..string.rep('\n', 20), player, cities[i].x, cities[i].y, cities[i].l, cities[i].h , cities[i].country.color, 0x6A7495, 1, true,
    function(player)
    movetropas(player, i)
    end)
    end
    end

    showMapForming = function(player)
    for i=1,#cities do
    local alpha = 0
    local color
    for k,v in next, formedNeed[playersList[player].countryID] do
    if i == v then
    if cities[i].country.n == countries[playersList[player].countryID].n then
    color = 0x0FF000
    alpha = 1
    break
    elseif cities[i].country.n ~= countries[playersList[player].countryID].n then
    color = 0xFF0000
    alpha = 1
    break
    end
    else
    color = 0x6A7495
    end
    end
    ui.addTextArea(cities[i].id, "", player, cities[i].x, cities[i].y, cities[i].l, cities[i].h, color, color, alpha, true,
    function(player)
    addCities(player)
    end)
    end
    end

    loadMap = function(player)
    ui.addTextArea(110000, "", player, 660,70,32,13, 0xFFFFFF, 0xFFFFFF, 1, true)
    ui.addTextArea(110001, "", player, 655,60,15,10, 0xFFFFFF, 0xFFFFFF, 1, true)

    addCities(player)
    end

    local addTextArea = ui.addTextArea

    ui.addTextArea = function(id, text, player, x, y, width, height, color1, color2, alpha, followPlayer, callback, args)
    if callback and playersList[player] then
    playersList[player].callbacks[#playersList[player].callbacks+1] = {event = callback, callbacksx = args}
    text = '<a href="event:callback_'..#playersList[player].callbacks ..'">'..text
    end
    return addTextArea(id, text, player, x, y, width, height, color1, color2, alpha, followPlayer, callback)
    end

    -- #conquerors Important Functions

    cityIsSomething = function(player, id, name)
    local countryID = playersList[player].countryID
    local enemyName = cities[id].country.n
    for k,v in next, countries do
    if v.n == enemyName then
    return isSomething(name, countryID, k)
    end
    end
    end

    cityIsTrulyEnemy = function(player, id)
    local cityCountry = countries[math.floor(cities[id].id/10000)].n
    for k,v in next, cities[id].country.Inimigos do
    if v.n == cityCountry then
    return false
    elseif cityCountry == cities[id].country.n then
    return true
    end
    end
    return true
    end

    getLists = function(country)
    local total, returning = {}, {}
    for _,name in next, {'Aliados', 'Inimigos', 'Treguas'} do
    total[name] = {}
    for k,v in next, country[name] do
    table.insert(total[name], v.s)
    end
    local concat = table.concat(total[name], ", ")
    table.insert(returning, concat)
    end
    return table.unpack(returning)
    end

    isSomething = function(name, playerID, otherID)
    for k,v in next, countries[otherID][name] do
    if countries[playerID].n == v.n then
    return true
    end
    end
    return false
    end

    won = function()
    addTimer(function(i)
    if i == 10 then
    for k,v in next, playersList do
    tfm.exec.killPlayer(v.name)
    closeTextArea(v.name)
    v.firstID = nil
    v.countryID = nil
    v.selectedID = nil

    v.playing = false
    v.countryOpen = false
    v.rankingOpen = false
    v.showingMap = false

    v.warns = {}
    v.relatory = {}
    v.callbacks = {}
    end
    loadGame(false)
    table.foreach(tfm.get.room.playerList, eventNewPlayer)
    end
    end, 1000, 10)
    end

    -- #conquerors TextArea manipulation

    see = function(player)
    return displayCountriesList(player, '<N>', false,
    function(player)
    local id = playersList[player].selectedID
    displayCountry(player, id)
    end)
    end

    addPopup = function(player, sizeX, sizeY, text, textButton)
    closeTextArea(player)
    local sizeX = sizeX and sizeX or 200
    local sizeY = sizeY and sizeY or 120
    local initialX = 400 - sizeX/2
    local initialY = 200 - sizeY/2
    local decoSize = sizeX > sizeY and sizeX/10 or sizeY/10
    ui.addTextArea(1000, "", player, initialX, initialY, sizeX, sizeY, 0x324650, 0x324650, 1, true)
    ui.addTextArea(1001, "", player, initialX, initialY, decoSize, decoSize, 0x009D9D, 0x009D9D, 1, true)
    ui.addTextArea(1002, "", player, initialX + sizeX - decoSize, initialY, decoSize, decoSize, 0x009D9D, 0x009D9D, 1, true)
    ui.addTextArea(1003, "", player, initialX, initialY + sizeY - decoSize, decoSize, decoSize, 0x009D9D, 0x009D9D, 1, true)
    ui.addTextArea(1004, "", player, initialX + sizeX - decoSize, initialY + sizeY - decoSize, decoSize, decoSize, 0x009D9D, 0x009D9D, 1, true)
    if text then
    ui.addTextArea(1005, ("<p align='center'><b><font color='#324650'><font size='20'>Atenção!</font><font size='11'>\n\n%s</font>"):format(text), player, initialX + 5, initialY + 5, sizeX - 10, sizeY - 10, 0x9292AA, 0x9292AA, 1, true)
    if textButton then
    addButton(player, textButton, x, y, 120)
    end
    end
    end

    addButton = function(player, text, x, y, sizeX, sizeY, ...)
    buttonId = buttonId + 2
    local event = (...) and (...) or (function(player) closeTextArea(player) end)
    local sizeX = sizeX and sizeX or 60
    local sizeY = sizeY and sizeY or 18
    local x = x and x or 400 - sizeX/2
    local y = y and y or 240 - sizeY/2
    ui.addTextArea(1017 + buttonId, "", player, x+1, y+1, sizeX, sizeY, 0x0e1619, 0x0e1619, 1, true)
    ui.addTextArea(1018 + buttonId, ("<B><p align='center'>%s"):format(text), player, x, y, sizeX, sizeY, 0x324650, 0x324650, 1, true, event)
    end

    addRanking = function(player)
    addPopup(player, 400, 250)
    ui.addTextArea(1005, "<p align='center'><b><N><font size='20'><u>Ranking", player, 205, 80, 390, 240, 0x324650, 0x324650, 1, true)
    for i=1,10 do
    ui.addTextArea(1005+i, "", player, 260, 118 + i*17, countries[i].ipower/9, 2, countries[i].color, 0x324650, 1, true)
    end
    ui.addTextArea(1016, "<b><N><font size='14'>AR\nBO\nBR\nCL\nCO\nEC\nPY\nPE\nUY\nVE", player, 220, 125, 390, 240, 0x324650, 0x324650, 0, true)
    addButton(player, 'Interessante', x, 320, 120)
    end

    addRelatory = function(player)
    addPopup(player, 400, 250)
    --{cities[finishID].n, cities[startID].country.n, tropasLeft, cities[startID].country.leader, cities[finishID].country.leader, bonus, entrenchedtropas, starttropas, startDefend}
    local a,b,c,d,e,f,g,h,i = table.unpack(playersList[player].relatory[1])
    local bonus = f > 1 and ('Bonus: <VP>+%d%s'):format(f*100-100,'%') or ('Atrito: <R>-%d%s'):format(100-f*100,'%')
    local winner = c > 1 and d or e
    ui.addTextArea(1005, ("<p align='center'><b><N><font size='20'><u>Batalha de %s</u>\n\n\n\n\n\n\n<font size='15'>%s venceu a batalha!\n<BV><font size='15'>tropas restante: <J>%d"):format(a,winner,c), player, 205, 80, 390, 240, 0x324650, 0x324650, 1, true)
    ui.addTextArea(1006, ("<b><N><p align='center'><u>%s forças</u>\n\n<BV>tropas: <J>%s\n<BV>%s\n<BV>Total: <J>%s"):format(d,h,bonus,math.floor(h*f)), player, 205, 130, 185, 165, 0x9292AA, 0x9292AA, 0, true)
    ui.addTextArea(1007, ("<b><N><p align='center'><u>%s forças</u>\n\n<BV>tropas: <J>%s\n<BV>Civil tropas: <J>%s\n<BV>Total: <J>%s"):format(e,i,g,i+g), player, 410, 130, 185, 165, 0x9292AA, 0x9292AA, 0, true)

    ui.removeTextArea(2000000, player)
    ui.removeTextArea(2000001, player)

    addButton(player, 'Interessante', x, 320, 120)
    end

    addSettings = function(player)
    addPopup(player, 300, 200)
    ui.addTextArea(1005, "<p align='center'><b><font color='#324650'><font size='20'>Configurações</font>", player, 255, 105, 290, 190, 0x9292AA, 0x9292AA, 1, true)
    ui.addTextArea(1006, "<p align='center'><b><BV>[•] <font color='#324650'>Adicionar/remover bordas do mapa", player, 255, 145, 290, 20, 0, 0, 0, true,
    function(player)
    playersList[player]:addBorders()
    addCities(player)
    end)
    addButton(player, 'Pronto', x, 260, 120)
    end

    closeTextArea = function(player)
    buttonId = 0
    for i=0,25 do
    ui.removeTextArea(1000+i, player)
    end
    end

    warnPlayer = function(player, text)
    if playersList[player].lastwarn < os.time()-500 then
    local warns = playersList[player].warns
    table.insert(warns, #warns)
    addTimer(function(i)
    if i == 1 then
    ui.addTextArea(1000000+#warns, ("<p align='right'><b><font color='#000000'>%s"):format(text), player, 501, 371 - #warns * 20, 300, 20, 0, 0x324650, 0, true)
    ui.addTextArea(1000000-#warns, ("<p align='right'><b><R>%s"):format(text), player, 500, 370 - #warns * 20, 300, 20, 0, 0x324650, 0, true)
    elseif i == 3 then
    ui.removeTextArea(1000000+#warns, player)
    ui.removeTextArea(1000000-#warns, player)
    table.remove(warns, 1)
    end
    end, 1000, 3, 'warns')
    playersList[player].lastwarn = os.time()
    end
    end

    notifyPlayer = function(player, text, relatory)
    local relatory = relatory and function(player) addRelatory(player) end or function (player) closeTextArea(player) end
    addTimer(function(i)
    if i == 1 then
    ui.addTextArea(2000000, ("<p align='center'><b><font size='24' color='#000000'>%s"):format(text), player, 1, 341, 800, 60, 0, 0x324650, 0, true)
    ui.addTextArea(2000001, ("<p align='center'><b><font size='24'><J>%s"):format(text), player, 0, 340, 800, 60, 0, 0x324650, 0, true, relatory)
    elseif i == 10 then
    ui.removeTextArea(2000000, player)
    ui.removeTextArea(2000001, player)
    end
    end, 1000, 10, 'notifys')
    end

    -- #conquerors minor TextArea Functions

    displayCountriesList = function(player, color, cancel, ...)
    for k,v in next, countries do
    if type(k) == 'number' then
    ui.addTextArea(k+10, ("<b><font color='#324650'>%s"):format(v.n), player, 41, 111 + (k-1)*20, 140, 20, 0x324650, 0x324650, 0, true)
    ui.addTextArea(k, ("<b>%s%s"):format(color, v.n), player, 40, 110 + (k-1)*20, 140, 20, 0x324650, 0x324650, 0, true, (...))
    else
    break
    end
    end

    if cancel then
    ui.addTextArea(21, ("<b><font color='#324650'>Cancel"), player, 41, 311, 140, 20, 0x324650, 0x324650, 0, true)
    ui.addTextArea(22, ("<b>Cancel"), player, 40, 310, 140, 20, 0x324650, 0x324650, 0, true,
    function(player)
    see(player)
    ui.removeTextArea(21, player)
    ui.removeTextArea(22, player)
    end)
    else
    ui.removeTextArea(21, player)
    ui.removeTextArea(22, player)
    end
    end

    displayCity = function(player, id)
    local playerData = playersList[player]
    local city = cities[id]
    if playerData.playing and city.country.n == countries[playerData.countryID].n then
    addPopup(player, 200, 120)
    ui.addTextArea(1007, ("<p align='center'><b><font color='#324650'><font size='15'><u>%s</u><br><font size='13'>%s\n<font size='11'>\ntropas: %s\n+ %s</font>"):format(city.n, city.country.n, city.tropas, city.mousepower), player, 305, 145, 190, 110, 0x9292AA, 0x9292AA, 1, true)

    ui.addTextArea(1008, "<b><font color='#324650'><font size='16'>X", player, 470, 145, 40, 40, 0x606090, 0x9292AA, 0, true,
    function(player)
    closeTextArea(player)
    end)

    addButton(player, "<font size='10'>Move/Attack", 310, y, 80, sizeY,
    function(player)
    ui.updateTextArea(1007, ("<p align='center'><b><font color='#324650'><font size='20'>Atenção!</font><font size='11'>\n\nEscolha uma cidade para atacar/implantar as tropas de %s</font>"):format(city.n), player)
    addButton(player, 'No', 320)
    addButton(player, 'Ok', 420, nil, nil, nil,
    function(player)
    playerData.firstID = id
    closeTextArea(player)
    addCitiesWar(player, id)
    end)
    end)
    addButton(player, 'Recruta', 410, y, 80, sizeY,
    function(player)
    if playerData.lastrecruit < os.time()-250 then
    if countries[playerData.countryID].power >= 10000 then
    cities[id]:recruit()
    displayCity(player, id)
    playerData.lastrecruit = os.time()
    countries[playerData.countryID].power = countries[playerData.countryID].power - 10000
    else
    return warnPlayer(player, 'Need at least 10000 mousepower')
    end
    end
    end)
    else
    addPopup(player, 200, 120)
    ui.addTextArea(1007, ("<p align='center'><b><font color='#324650'><font size='15'><u>%s</u><br><font size='13'>%s\n<font size='11'>\ntropas: %s\n+ %s</font>"):format(city.n, city.country.n, city.tropas, city.mousepower), player, 305, 145, 190, 110, 0x9292AA, 0x9292AA, 1, true)
    addButton(player, 'Close')
    end
    buttonId = 0
    end

    displayCountry = function(player, id)
    addPopup(player, 400, 250)
    local playerData = playersList[player]
    local country = countries[id]

    ui.addTextArea(1005, ("<p align='center'><b><font color='#324650'><font size='20'>%s | %s\n<font size='14'>Capital: %s\n<font size='12'>Leader: %s"):format(country.s, country.n, country.capital, country.leader), player, 205, 80, 390, 240, 0x9292AA, 0x9292AA, 1, true)
    ui.addTextArea(1006, "<b><p align='center'><n><font size='11'><font color='#324650'>Declarar Guerra", player, 495, 160, 90, 20, 0xFF0000, 0x9292AA, 1, true,
    function(player)
    displayCountriesList(player, '<R>', true,
    function(player)

    local isAlly = isSomething('Aliados', playerData.countryID, playerData.selectedID)
    local isEnemy = isSomething('Inimigos', playerData.countryID, playerData.selectedID)
    local isTruce = isSomething('Treguas', playerData.countryID, playerData.selectedID)

    if isEnemy or isTruce or isAlly or playerData.selectedID == playerData.countryID then
    see(player)
    return warnPlayer(player, "Não posso declarar guerra!")
    end
    playerData:joinedWar()
    addPopup(player, sizeX, sizeY, ('Declaramos guerra em %s'):format(countries[playerData.selectedID].n), 'Parece bom')
    if playersList[countries[playerData.selectedID].leader] then
    addPopup(countries[playerData.selectedID].leader, sizeX, sizeY, ('%s Declarou guerra contra nós'):format(countries[playerData.countryID].n), 'Parece ruim,')
    end
    end)
    end)
    ui.addTextArea(1007, "<b><p align='center'><n><font size='11'><font color='#324650'>Conciliar", player, 495, 190, 90, 20, 0xFEB1FC, 0x9292AA, 1, true,
    function(player)
    displayCountriesList(player, '<CH2>', true,
    function(player)

    if not isSomething('Inimigos', playerData.countryID, playerData.selectedID) or playerData.selectedID == playerData.countryID then
    see(player)
    return warnPlayer(player, "Não consigo conciliar!")
    end
    addPopup(player, sizeX, sizeY, ('We sent a conciliate request to %s'):format(countries[playerData.selectedID].n), 'Parece bom')

    see(player)

    local playerTwo = countries[playerData.selectedID].leader ~= countries[playerData.selectedID].n .. ' Bot'
    local playerTwoName = countries[playerData.selectedID].leader

    if playerTwo and #countries[playerData.selectedID].cities ~= 0 then
    local playerTwoName = countries[playerData.selectedID].leader
    addPopup(playerTwoName, sizeX, sizeY, ('%s sent us a conciliate request, what we should do'):format(countries[playerData.countryID].n))
    addButton(playerTwoName, 'Recusar', 320, nil, nil, nil,
    function(player)
    closeTextArea(player)
    addPopup(playerData.name, sizeX, sizeY, ('%s recusou nosso pedido de conciliação!'):format(playerTwoName), 'Damn!')
    end)

    addButton(playerTwoName, 'Aceitar', 420, nil, nil, nil,
    function(player)
    closeTextArea(player)
    playerData:leftWar(playersList[playerTwoName].countryID)
    addPopup(playerData.name, sizeX, sizeY, ('%s aceitou nosso pedido de conciliação!'):format(playerTwoName), 'Yay!')
    end)
    else
    closeTextArea(player)
    playerData:leftWar(playerData.selectedID)
    addPopup(player, sizeX, sizeY, ('%s aceitou nosso pedido de conciliação!'):format(countries[playerData.selectedID].n), 'Yay!')
    if playerTwo then
    addPopup(playerData.name, sizeX, sizeY, ('Aceitamos o pedido de paz de %s!'):format(countries[playerData.selectedID].n), 'Yay!')
    end
    end
    end)
    end)
    ui.addTextArea(1008, "<b><p align='center'><n><font size='11'><font color='#324650'>Aliado com", player, 495, 220, 90, 20, 0x2ECF73, 0x9292AA, 1, true,
    function(player)
    displayCountriesList(player, '<VP>', true,
    function(player)
    local isEnemy = isSomething('Inimigos', playerData.countryID, playerData.selectedID)
    local isAlly = isSomething('Aliados', playerData.countryID, playerData.selectedID)

    if isEnemy or isAlly or playerData.selectedID == playerData.countryID then
    see(player)
    return warnPlayer(player, "Can't send alliance!")
    end

    addPopup(player, sizeX, sizeY, ('We sent a alliance request to %s'):format(countries[playerData.selectedID].n), 'Parece bom')
    see(player)

    local playerTwo = countries[playerData.selectedID].leader ~= countries[playerData.selectedID].n .. ' Bot'
    local playerTwoName = countries[playerData.selectedID].leader

    if playerTwo then
    addPopup(playerTwoName, sizeX, sizeY, ('%s nos enviou um pedido de aliança, devemos aceitar?'):format(countries[playerData.countryID].n))
    addButton(playerTwoName, 'Recusar', 320, nil, nil, nil,
    function(player)
    closeTextArea(player)
    addPopup(playerData.name, sizeX, sizeY, ('%s recusou nossa poderosa aliança!'):format(playerTwoName), 'Damn!')
    end)

    addButton(playerTwoName, 'Aceitar', 420, nil, nil, nil,
    function(player)
    closeTextArea(player)
    playerData:joinedAlliance(playersList[playerTwoName].countryID)
    addPopup(playerData.name, sizeX, sizeY, ('%s aceitou nossa aliança!'):format(playerTwoName), 'Yay!')
    end)
    else
    closeTextArea(player)
    addPopup(playerData.name, sizeX, sizeY, ('%s recusou nossa poderosa aliança!'):format(playerTwoName), 'Damn!')
    end
    end)
    end)
    ui.addTextArea(1009, "<b><p align='center'><n><font size='11'><font color='#324650'>Sair aliança", player, 495, 250, 90, 20, 0xA4CF9E, 0x9292AA, 1, true,
    function(player)
    displayCountriesList(player, '<T>', true,
    function(player)

    local isAlly = isSomething('Aliados', playerData.countryID, playerData.selectedID)

    see(player)
    if not isAlly then
    return warnPlayer(player, "Can't unally!")
    end

    playerData:leftAlliance()
    addPopup(player, sizeX, sizeY, ('We broke ties with %s'):format(countries[playerData.selectedID].n), 'Parece bom')
    if playersList[countries[playerData.selectedID].leader] then
    addPopup(countries[playerData.selectedID].leader, sizeX, sizeY, ('%s broke ties with us!'):format(countries[playerData.countryID].n), 'Looks Bad')
    end

    end)
    end)
    if playerData.countryID == id then
    ui.addTextArea(1010, ("<b><p align='center'><n><font size='7'><font color='#324650'>Form %s"):format(formedN[id]), player, 495, 290, 90, 20, 0x2F7FCC, 0x9292AA, 1, true,
    function(player)
    playersList[player]:forming()
    end)
    end
    ui.addTextArea(1011, "<b><font color='#324650'><font size='20'>X", player, 570, 80, 40, 40, 0x606090, 0x9292AA, 0, true,
    function(player)
    closeTextArea(player)
    end)

    Aliados, Inimigos, Treguas = getLists(country)

    ui.addTextArea(1012, ("<b><font color='#324650'>Aliados: %s"):format(Aliados), player, 220, 160, 250, 20, 0x9292AA, 0x324650, 1, true)
    ui.addTextArea(1013, ("<b><font color='#324650'>Inimigos: %s"):format(Inimigos), player, 220, 190, 250, 20, 0x9292AA, 0x324650, 1, true)
    ui.addTextArea(1014, ("<b><font color='#324650'>Treguas: %s"):format(Treguas), player, 220, 220, 250, 20, 0x9292AA, 0x324650, 1, true)
    end

    -- #conquerors gameFunctions

    movetropas = function(player, id)
    local playerData = playersList[player]
    local startID = playerData.firstID
    local finishID = id

    local tropas = cities[startID].tropas
    local defend = cities[finishID].tropas

    if tropas < 1 then
    addCities(player)
    return warnPlayer(player, "Can't move/attack without tropas")
    end

    local starttropas = tropas
    local startDefend = defend

    if cityIsSomething(player, id, 'Inimigos') then
    local entrenchedtropas = math.floor(math.random(25, 200) * cities[finishID].mousepower)
    local bonus = math.random(60,120)/100

    tropas = math.floor(tropas * bonus)
    defend = defend + entrenchedtropas

    local tropasLeft = tropas - defend

    cities[startID]:cleartropas()
    cities[finishID]:cleartropas()

    playerData.relatory = {}

    local args = {cities[finishID].n, cities[startID].country.n, tropasLeft, cities[startID].country.leader, cities[finishID].country.leader, bonus, entrenchedtropas, starttropas, startDefend}
    table.insert(playerData.relatory, args)

    local playerAttacked = playersList[cities[finishID].country.leader]
    if playerAttacked then
    table.insert(playerAttacked.relatory, args)
    end

    local winner = false

    if tropasLeft > 0 then
    winner = true
    cities[finishID]:recruit(tropasLeft)

    if cityIsTrulyEnemy(player, id) then
    cities[finishID]:transfer(playerData.countryID)
    else
    cities[finishID]:transfer(math.floor(cities[finishID].id/10000))
    end

    for k,v in next, playersList do
    addCities(k)
    end
    else
    local tropasLeftDefend = defend - tropas - entrenchedtropas > 0 and defend - tropas - entrenchedtropas or 0
    cities[finishID]:recruit(tropasLeftDefend)
    addCities(player)
    end

    if winner then
    notifyPlayer(player, ('%s ganhou a batalha de %s!'):format(cities[startID].country.n, cities[finishID].n), true)
    if playerAttacked then
    notifyPlayer(playerAttacked.name, ('%s ganhou a batalha de %s!'):format(cities[startID].country.n, cities[finishID].n), true)
    end
    else
    notifyPlayer(player, ('%s ganhou a batalha de %s!'):format(cities[finishID].country.n, cities[finishID].n), true)
    if playerAttacked then
    notifyPlayer(playerAttacked.name, ('%s ganhou a batalha de %s!'):format(cities[finishID].country.n, cities[finishID].n), true)
    end
    end
    elseif cityIsSomething(player, id, 'Aliados') or cities[id].country.n == countries[playerData.countryID].n then
    cities[startID]:cleartropas()
    cities[finishID]:recruit(tropas)
    addCities(player)
    else
    addCities(player)
    end
    displayCity(player, finishID)
    end

    -- TFM Functions

    eventKeyboard = function(player, key)
    if not playersList[player].playing then
    return
    end

    if key == 81 then -- Q
    if playersList[player].countryOpen then
    closeTextArea(player, 19)
    else
    displayCountry(player, playersList[player].countryID)
    end
    playersList[player].countryOpen = not playersList[player].countryOpen
    return
    elseif key == 70 then -- F
    tfm.exec.playEmote(player, 10, countries[playersList[player].countryID].s)
    return
    elseif key == 76 then
    if playersList[player].rankingOpen then
    closeTextArea(player, 19)
    else
    addRanking(player)
    end
    playersList[player].rankingOpen = not playersList[player].rankingOpen
    return
    elseif key == 77 then
    if playersList[player].showingMap then
    addCities(player)
    else
    showMapForming(player)
    end
    playersList[player].showingMap = not playersList[player].showingMap
    return
    end
    end

    eventLoop = function()
    timersLoop()
    end

    eventNewPlayer = function(player)
    tfm.exec.respawnPlayer(player)
    tfm.exec.setNameColor(player, 0xC2C2DA)
    if not playersList[player] then
    local playerTable = players.new(player)
    setmetatable(playerTable, playersMeta)

    playersList[player] = playerTable
    end
    displayCountriesList(player, '<N>', false,
    function(player)
    if not playersList[player].playing then
    local id = playersList[player].selectedID
    if countries[id].leader == countries[id].n .. ' Bot' then
    for k,v in next, keys do
    system.bindKeyboard(player, v, true, true)
    end

    tfm.exec.setNameColor(player, countries[id].color)
    tfm.exec.playEmote(player, 10, countries[id].s)

    playersList[player]:choosed(id)
    ui.addTextArea(-75, "<font size='11' color='#8C96B7' face='Lucida Console'><b>2<font size='16'>1<font size='8'>3", player, 30, 377.5, 300, 40, -1, -1, 0, true,
    function(player)
    addRanking(player)
    end)
    ui.addTextArea(-25, "", player, 250, 377.5, 300, 40, -1, -1, 0, true)
    ui.addTextArea(-50, "<font size='16' color='#8C96B7' ><b>|||</b>", player, 760, 374.5, 40, 40, -1, -1, 0 , true,
    function(player)
    addSettings(player)
    end)
    end
    end
    end)
    loadMap(player)

    for i=-10,-1,1 do
    ui.addTextArea(i, string.rep("<font size='20'>\n",2), player, 16, 114 + ((-i)-1)*20, 22, 10, 0x324650, 0xFFFFFF, 0, true,
    function(player)
    tfm.exec.playEmote(player, 10, countries[-i].s)
    end)
    end
    end; table.foreach(tfm.get.room.playerList, eventNewPlayer)

    eventPlayerDied = function(player)
    tfm.exec.respawnPlayer(player)
    if playersList[player] and playersList[player].playing then
    tfm.exec.setNameColor(player, countries[playersList[player].countryID].color)
    else
    tfm.exec.setNameColor(player, 0xC2C2DA)
    end
    end

    eventPlayerLeft = function(player)
    if playersList[player].playing then
    playersList[player].playing = false
    for i=1,#countries do
    if player == countries[i].leader then
    countries[i].leader = countries[i].n .. ' Bot'
    end
    end
    end
    end

    eventTextAreaCallback = function(id, player, callback)
    local playerData = playersList[player]

    if not (id > 1000 and id < 2000) then
    playerData.selectedID = id
    end

    local args = {}
    for i in callback:gmatch('[^_]+') do
    args[#args+1] = i
    end

    local event = table.remove(args, 1)
    if event == 'callback' then
    return playerData.callbacks[tonumber(args[1])].event(player, playerData.callbacks[tonumber(args[1])].callbacksx)
    end
    end

    local mousepower = addTimer(function(i)
    for i=1,#countries do
    local mousepower = 0
    for k,v in next, countries[i].cities do
    mousepower = mousepower + math.ceil(v[1])
    end
    countries[i].ipower = mousepower
    countries[i].power = countries[i].power + mousepower
    end
    for k,v in next, playersList do
    if v.playing then
    ui.updateTextArea(-25, ("<p align='center'><font color='#8C96B7' face='Lucida Console' size='16'>Mousepower: <b>%d"):format(countries[playersList[k].countryID].power), playersList[k].name)
    end
    end
    end, 500, 0)

    tfm.exec.disableAutoShaman()
    tfm.exec.disableAfkDeath()
    tfm.exec.disableAutoNewGame()
    tfm.exec.newGame('<C><P /><Z><S><S L="800" o="596384" H="80" X="400" Y="410" T="12" P="0,0,.3,.2,,0,0,0" /><S P="0,0,.3,.2,,0,0,0" Y="110" L="10" H="10" c="4" i=",,1715aac7ab3.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="130" L="10" H="10" c="4" i=",,1715a904a5b.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="150" L="10" H="10" c="4" i=",,1715aac9223.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="170" L="10" H="10" c="4" i=",,1715a9090aa.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="190" L="10" H="10" c="4" i=",,1715a9032e3.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="210" L="10" H="10" c="4" i=",,1715a90a81d.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="230" L="10" H="10" c="4" i=",,1715a907938.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="250" L="10" H="10" c="4" i=",,1715a90d6fd.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="270" L="10" H="10" c="4" i=",,1715a9061c5.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="270" L="10" H="10" c="4" i=",,1715a9061c5.png" T="0" X="20" /><S P="0,0,.3,.2,,0,0,0" Y="290" L="10" H="10" c="4" i=",,1715a90bf8c.png" T="0" X="20" /></S><D /><O /></Z></C>')
    ui.setMapName('<J>ProdigioSS</J>')

    Queria poder ajudar, mas não consigo acessar nenhuma página do Pastebin. Poderia postar o script dentro de um [ code=lua][/code] dentro de um spoiler?


    Esse script originalmente pertence ao Module não-oficial #Conguerors, feito por Twistzaok#0000.

    O provável é que você tenha pego um script que foi alterado (notei isso pelo nome do mapa quando iniciei o script), então erros pode ocorrer.

    Tente usar a versão origina na galerial: [Galeria] Lucasrslv.

    Caso o error persista, vou tentar consertar. Se não conseguir, vou tentar contatar o criador, e se ele ainda estiver jogando/atualizando scripts, vou notificar o erro para ver se ele pode ajudar.

    Já usei esse e o erro é o mesmo e a última vez que o lucas entrou foi na data 16/09/2020
    Lightsuit
    « Citoyen »
    1602456660000
      • Lightsuit#7572
      • Profil
      • Derniers messages
      • Tribu
    #2518
      0
    Olá, eu queria um script que possibilitasse um dos ratinhos a matar outras pessoas apertando espaço.

    Se possivel com limite de tempo

    Obrigado!
    Jp_darkuss
    « Citoyen »
    1602509940000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2519
      1
    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.

    Dernière modification le 1602510060000
    Lightsuit
    « Citoyen »
    1602525840000
      • Lightsuit#7572
      • Profil
      • Derniers messages
      • Tribu
    #2520
      0
    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!
    • Forums
    • /
    • Transformice
    • /
    • Archives
    • /
    • Seção Editor de Mapas e Modules
    • /
    • [Lua] Peça scripts aqui!
    « ‹ 126 / 133 › »
    © Atelier801 2018

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

    Version 1.27