×

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!
« ‹ 129 / 133 › »
[Lua] Peça scripts aqui!
Rambreout
« Citoyen »
1604455380000
    • Rambreout#8657
    • Profil
    • Derniers messages
    • Tribu
#2561
  0
Jp_darkuss a dit :
Rambreout a dit :
Jp_darkuss a dit :
Rambreout a dit :
o objeto só está spawnando para mim, poderia colocar um jeito de que eu possa selecionar o nick de quem vai poder spawnar? deixando assim separado os que podem e os que n podem, colocar um delay de 2s, lugar pra poder mudar a força que a caixa eh spawnada, por final, que a caixa desapareça depois de 2s também, para n acumular no mapa, obrigado desde já pela ajuda ;3

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
local _, adm= pcall(nil)
local players= {}
local boxes= {}
local velX, velY= 0, 0
eventNewPlayer= function(player)
players[player]= {
count= 0,
id= 0,
allowed= false,
spawn= false
}
system.bindKeyboard(adm, 80, false, true)
end
eventChatCommand= function(player, c)
local cmd= {}
for data in c:gmatch("[^%s]+") do
cmd[#cmd + 1]= data
end
if cmd[1]=="allow" then
players[cmd[2]].allowed= true
elseif cmd[1]=="disallow" then
players[cmd[2]].allowed= false
elseif cmd[1]=="vel" then
if cmd[2]=="x" then
velX= tonumber(cmd[3])
elseif cmd[2]=="y" then
velY= tonumber(cmd[3])
end
end
end
eventKeyboard= function(player)
if players[player].allowed and players[player].spawn then
players[player].spawn= false
local isFacingRight= tfm.get.room.playerList[player].isFacingRight
local x= tfm.get.room.playerList[player].x
local y= tfm.get.room.playerList[player].y
if isFacingRight then
players[player].id= tfm.exec.addShamanObject(204, x + 70, y - 50, 0, velX, velY)
else
players[player].id= tfm.exec.addShamanObject(204, x - 70, y - 50, 0, velX, velY)
end
end
end
eventLoop= function()
for player in next, players do
if players[player].allowed then
players[player].count= players[player].count + 500
if players[player].count>= 2000 then
tfm.exec.removeObject(players[player].id)
players[player].count= 0
players[player].spawn= true
end
end
end
end
do
adm= adm:match("(.-)%.")
table.foreach(tfm.get.room.playerList, eventNewPlayer)
eventChatCommand(adm, "allow "..adm)
system.disableChatCommandDisplay()
end

  • !allow player#0000 => permite a invocação de uma caixa para player#0000
  • !disallow player#0000 => retira a permissão para invocar caixas de player#0000
  • !vel Eixo value => muda a velocidade da caixa no eixo Eixo ("x" para horizontal e "y" para vertical, pode ser negativo) para o valor value

  • ixi jp no sei o que deu, os comando n tão funcionando, eu dou o !allow nick#0000 e o jogador n ganha permissão
    tbm o !vel no pegou e o disallow nem deu pra testar pq o jogador no pegou permissão kkkkkk
    tbm as vezes qnd dou o comando eh como se "quebrasse" o script, qnd volta pro cafofo sabe? :/ no sei oq deu -;

    Aqui ainda tá funcionado, tente:

    - Certifique-se de que copiou e colou o script corretamente
    - Certifique-se de que usou os comandos de forma correta:

    Code De Exemplo

    1
    2
    3
    4
    !vel x 10
    !vel y 10
    !disallow Jp_darkuss#4806
    !allow Jp_darkuss#4806

    Quanto ao jogador entrar na sala e não poder usar o script já consertei, modifiquei na mensagem que te enviei.

    manito eu vi ali o vel y bota força vertical e o x horizontal, normal, porem a caixa só é atirada pra la> ela spawna pro lado q eu to virado mas só joga pra la> msm, se eu viro pra la< ela nasce la< e se joga pra la> mas n ta indo pra la< qnd poe mais velocidade nela só nasce msm e vai pra la> independente do lado q eu virar, o !allow n ta msm pegando ;-; eu dei ali por exemplo !allou naoity#0000 um carinha da minha tribo e ele n conseguiu atirar a caixa msm assim ;-;

    Dernière modification le 1604455620000
    +Pluuuuuf
    « Citoyen »
    1604493060000
      • +Pluuuuuf#0000
      • Profil
      • Derniers messages
    #2562
      0
    Joaogamer2_0 a dit :
    ola eu qro um script que solte tabuas coloridas se tiver algum ai e puder me passar agradeco

    local keys = {
    E = 401,
    F = 402,
    Z = 403,
    X = 404,
    G = 405,
    H = 408,
    }

    eventNewPlayer = function(n)
    for k, v in next, {string.byte("EFZXGH", 1, 6)} do
    system.bindKeyboard(n, v, true, true)
    end
    end
    table.foreach(tfm.get.room.playerList, eventNewPlayer)

    eventKeyboard = function(n, k, d, x, y)
    local o = keys[string.char(k)]
    if o then
    local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
    tfm.exec.addShamanObject(o, x + 150 * dir, y - 10)
    end
    end
    +Pluuuuuf
    « Citoyen »
    1604493120000
      • +Pluuuuuf#0000
      • Profil
      • Derniers messages
    #2563
      0
    +Pluuuuuf a dit :
    Joaogamer2_0 a dit :
    ola eu qro um script que solte tabuas coloridas se tiver algum ai e puder me passar agradeco

    local keys = {
    E = 401,
    F = 402,
    Z = 403,
    X = 404,
    G = 405,
    H = 408,
    }

    eventNewPlayer = function(n)
    for k, v in next, {string.byte("EFZXGH", 1, 6)} do
    system.bindKeyboard(n, v, true, true)
    end
    end
    table.foreach(tfm.get.room.playerList, eventNewPlayer)

    eventKeyboard = function(n, k, d, x, y)
    local o = keys[string.char(k)]
    if o then
    local dir = tfm.get.room.playerList[n].isFacingRight and 1 or -1
    tfm.exec.addShamanObject(o, x + 150 * dir, y - 10)
    end
    end

    usa as teclas E F G H Z X
    Jp_darkuss
    « Citoyen »
    1604494440000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2564
      0
    Rambreout a dit :
    Jp_darkuss a dit :
    Rambreout a dit :
    Jp_darkuss a dit :
    Rambreout a dit :
    o objeto só está spawnando para mim, poderia colocar um jeito de que eu possa selecionar o nick de quem vai poder spawnar? deixando assim separado os que podem e os que n podem, colocar um delay de 2s, lugar pra poder mudar a força que a caixa eh spawnada, por final, que a caixa desapareça depois de 2s também, para n acumular no mapa, obrigado desde já pela ajuda ;3

    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
    local _, adm= pcall(nil)
    local players= {}
    local boxes= {}
    local velX, velY= 0, 0
    eventNewPlayer= function(player)
    players[player]= {
    count= 0,
    id= 0,
    allowed= false,
    spawn= false
    }
    system.bindKeyboard(adm, 80, false, true)
    end
    eventChatCommand= function(player, c)
    local cmd= {}
    for data in c:gmatch("[^%s]+") do
    cmd[#cmd + 1]= data
    end
    if cmd[1]=="allow" then
    players[cmd[2]].allowed= true
    elseif cmd[1]=="disallow" then
    players[cmd[2]].allowed= false
    elseif cmd[1]=="vel" then
    if cmd[2]=="x" then
    velX= tonumber(cmd[3])
    elseif cmd[2]=="y" then
    velY= tonumber(cmd[3])
    end
    end
    end
    eventKeyboard= function(player)
    if players[player].allowed and players[player].spawn then
    players[player].spawn= false
    local isFacingRight= tfm.get.room.playerList[player].isFacingRight
    local x= tfm.get.room.playerList[player].x
    local y= tfm.get.room.playerList[player].y
    if isFacingRight then
    players[player].id= tfm.exec.addShamanObject(204, x + 70, y - 50, 0, velX, velY)
    else
    players[player].id= tfm.exec.addShamanObject(204, x - 70, y - 50, 0, velX, velY)
    end
    end
    end
    eventLoop= function()
    for player in next, players do
    if players[player].allowed then
    players[player].count= players[player].count + 500
    if players[player].count>= 2000 then
    tfm.exec.removeObject(players[player].id)
    players[player].count= 0
    players[player].spawn= true
    end
    end
    end
    end
    do
    adm= adm:match("(.-)%.")
    table.foreach(tfm.get.room.playerList, eventNewPlayer)
    eventChatCommand(adm, "allow "..adm)
    system.disableChatCommandDisplay()
    end

  • !allow player#0000 => permite a invocação de uma caixa para player#0000
  • !disallow player#0000 => retira a permissão para invocar caixas de player#0000
  • !vel Eixo value => muda a velocidade da caixa no eixo Eixo ("x" para horizontal e "y" para vertical, pode ser negativo) para o valor value

  • ixi jp no sei o que deu, os comando n tão funcionando, eu dou o !allow nick#0000 e o jogador n ganha permissão
    tbm o !vel no pegou e o disallow nem deu pra testar pq o jogador no pegou permissão kkkkkk
    tbm as vezes qnd dou o comando eh como se "quebrasse" o script, qnd volta pro cafofo sabe? :/ no sei oq deu -;

    Aqui ainda tá funcionado, tente:

    - Certifique-se de que copiou e colou o script corretamente
    - Certifique-se de que usou os comandos de forma correta:

    Code De Exemplo

    1
    2
    3
    4
    !vel x 10
    !vel y 10
    !disallow Jp_darkuss#4806
    !allow Jp_darkuss#4806

    Quanto ao jogador entrar na sala e não poder usar o script já consertei, modifiquei na mensagem que te enviei.

    manito eu vi ali o vel y bota força vertical e o x horizontal, normal, porem a caixa só é atirada pra la> ela spawna pro lado q eu to virado mas só joga pra la> msm, se eu viro pra la< ela nasce la< e se joga pra la> mas n ta indo pra la< qnd poe mais velocidade nela só nasce msm e vai pra la> independente do lado q eu virar, o !allow n ta msm pegando ;-; eu dei ali por exemplo !allou naoity#0000 um carinha da minha tribo e ele n conseguiu atirar a caixa msm assim ;-;

    Propagação do eixo X: esquerda > direita

    Propagação do eixo y: cima > baixo

    Para mudar a direção precisa usar números negativos.
    Sklag
    « Citoyen »
    1604517600000
      • Sklag#2552
      • Profil
      • Derniers messages
      • Tribu
    #2565
      0
    E Possivel faze algo acontecer repetidamente com tempo menos de 500 milegundos? se sim eu preciso
    Sklag
    « Citoyen »
    1604517720000
      • Sklag#2552
      • Profil
      • Derniers messages
      • Tribu
    #2566
      0
    ou opcional quando comeca a spawnar um certo item ele e removdo do mapa tipo cannon
    Joaogamer2_0
    « Citoyen »
    1604517900000
      • Joaogamer2_0#5040
      • Profil
      • Derniers messages
      • Tribu
    #2567
      0
    Script de MESTRE MANDOU em pt pra quem quiser
    admin="" -- Se estiver rodando este código em uma sala FunCorp, insira seu nickname aqui e digite !fc para habilitar algumas funções especiais.
    for _,f in next,{"AutoShaman","AutoNewGame","AutoTimeLeft","DebugCommand"} do
    tfm.exec["disable"..f](true)
    end
    tfm.exec.setRoomMaxPlayers(30)
    mapas={6788085,6788174,6788154,6788715,6788728,6789259,6789271,6790527,6791838,6789451,6792397,6793213,6793222,6799768,6789356,6789937,6822331,7290270,7290275,6892022,6754319,7686598,7750148,7616526,7429544,7688066,7692398,4514051,3821176,6790295,6790661,6833617,6788183,6784965,6789235,6789853,6790385,6791944,6801706,6792470,6806109,6821950,6866406,6866437,6885971,5328362,5957905,7055459,7525277,6981135,2684847,6835934,7252582,7214363,6799046,6792471,6792516,6825340,6838871,6788178,6788693,6788695,6789272,6799996,6799998,6808957,6803018,6809464,6859175,6907177,7404327,7382263,6885799,6885841,6886906,6790912,6833993,7721192,7309605,6514206,6481798,6730002,6532621,3171810,6800519,6803118,6830819,6788861,6789249,6790484,6790903,6792509,6792518,6792523,6794050,6789358,6830799,6866549,6834529,6812488,6876563,6888512,6893463,7431981,6879100,7146925,6937148,7252655,6356881,6789280,6789334,6790895,6793860,6799997,6789324,6803128,6900149,6943992,6888884,7279612,7252133,3832586,6791871,6802377,6811934,7631682,6876638,6892608,6982387,7404106,7405103,7400694,7400678,7412412,7412422,7491944,7755685,6843950,6788848,6789206,6789260,6790433,6790911,6790896,6792320,6790467,6798615,6810292,6809498,6822119,3110915,6983850,7711216,6958861,7250912,7253090,7254162,6863706,7469336,7659327,7563422,6481798,7350028,7053239,7285518,5298381,6992466,6870514,6830904,6789263,6790300,4411212,6781398,7394517,7354947,3398791,1347551,7201360,1429677,6897042,3766247,7296284,1852537,7712670,7748874,7712670,1564662,5549586,6832236,2267215,6809461}
    active=0; vivo=0; rato=0; dificuldade=1; rodadas=0; rodada=0; number=0; xpos=0; ypos=0; data={}; lang={}; tempo=10; counter=0; q=""; a=""; qtime=10; creator="";
    fc_cmds={1,2,4,5,6,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,28,30,31,32,33,34,35,36,40,41,42,43,45,46,47,48,49,50,51,53,57,58,59,61,62,65,66,67}
    spiderweb={type = 15,width = 80,height = 80}
    fc_mode=false
    unlocked=true
    xpos=0; xpos2=0;
    for _,f in next,{"command","mapa","pw","limit","run","fc","q","a","t","kill"} do
    system.disableChatCommandDisplay(f)
    end
    lang.br = {
    welcome = "<N><b>Bem-vindos ao novo Mestre Mandou!</b><br>O objetivo deste module é muito simples: Siga tudo o que o jogo mandar e teste seus limites até o fim!<br><VP>Tenha sempre cuidado com os comandos trolls!<br><br><J><b>Script desenvolvido por Rakan_raster#0000</b><br>Conceito original por Jessiewind26#2546<br><br><ROSE>Versão RTM 8249.045",
    dancar = "Dance!",
    sentar = "Sente!",
    confetar = "Atire 5 confetes!",
    mouse = "Clique na tela 10 vezes!",
    beijos = "Dê 10 beijos!",
    dormir = "Vocês estão com sono. Durmam para descansar.",
    raiva = "Tigrounette é do mal! Fiquem com raiva dele!",
    chorem = "Vocês não ganharam queijo :( Chorem!",
    nchorem = "Não chorem!",
    esquerda = "Não vá para a esquerda!",
    direita = "Não vá para a direita!",
    numero = "Digite o seguinte número: ",
    digitar = "Digite qualquer coisa e mande para mim.",
    falar = "Não falem nada!",
    pular = "Não pulem!",
    mexer = "Não se mexam!",
    bandeira = "Balance a bandeira de qualquer país!",
    ano = "Em que ano estamos?",
    vesquerda = "Fique virado para a esquerda!",
    vdireita = "Fique virado para a direita!",
    quadradoa = "Fique no quadrado azul!",
    quadradov = "Fique no quadrado vermelho!",
    quadrado = "Fique no quadrado branco!",
    nquadrado = "Não fique no quadrado branco!",
    retangulo = "Fique dentro do retângulo branco!",
    retangulov = "Fique dentro do retângulo vermelho!",
    nretangulo = "Não fique dentro do retângulo branco!",
    preesquerda15 = "Pressione 15 vezes a tecla para ESQUERDA!",
    predireita15 = "Pressione 15 vezes a tecla para DIREITA!",
    preesquerda30 = "Pressione 30 vezes a tecla para ESQUERDA!",
    predireita30 = "Pressione 30 vezes a tecla para DIREITA!",
    preesquerda60 = "Pressione 60 vezes a tecla para ESQUERDA!",
    predireita60 = "Pressione 60 vezes a tecla para DIREITA!",
    espaco = "Pressione a barra de espaço 20 vezes!",
    nome = "Digite o seu nome no jogo (com #número).",
    ndance = "Não dance!",
    key1 = "Pressione a tecla Delete!",
    action1 = "Dance, sente e durma!",
    laugh = "Agora RIAM!",
    laugh2 = "Quem rir agora vai morrer.",
    stone = "Olha a pedra!",
    noob = "Digite: EU SOU NOOB",
    action2 = "Chore depois ria!",
    jump = "Pulem!",
    number = "Digite o seguinte número: ",
    key = "Pressione qualquer tecla!",
    jump2 = "Pulem 5 vezes!",
    action3 = "Dê um beijo depois chore!",
    area = "Descubra onde está o texto escondido e clique nele!",
    dancing = "É hora da festa!",
    freeze = "Todo mundo parado!",
    transform = "Dance e durma!",
    down1 = "Abaixem 3 vezes!",
    kill = "Se matem!",
    mestre = "Mestre Mandou",
    map = "Mapa",
    time = "Tempo",
    mice = "Ratos",
    round = "Rodada",
    mices = "Esta sala requer pelo menos 4 ratos.",
    difficulty = "Dificuldade",
    segundos = "segundos.",
    fim = "Partida encerrada! Próxima partida iniciando em ",
    playingmap = "Rodando mapa",
    created = "criado por",
    abaixar = "Abaixem e se levantem!",
    action = "Façam qualquer ação!",
    naction = "Não façam nenhuma ação!",
    math = "Quanto é 1+1?",
    ds = "Dance e sente!",
    seq4 = "Dance, sente, durma e bata palmas!",
    spider = "Cuidado com as teias de aranha!",
    key2 = "Pressione F4!",
    clap = "Bata palmas 5 vezes!",
    completed = "Você completou o comando com sucesso!",
    rain = "Chuva de ovelhas!",
    catch = "Colete todos os '+1' do mapa!",
    skull = "Cuidado com as caveiras!",
    gravity = "A gravidade foi alterada!",
    }
    lang.tr = {
    welcome = "<N> Master Says'ýn senaryosuna hoþ geldiniz! Bu modülde ustanýn söylediði her þeyi yapmalýsýnýz. <br> <ROSE><b>Rakan_raster#0000</b> tarafýndan oluþturulan model. Tercüme eden Star#6725. Versiyon RTM 8249.045",
    dancar = "Dans!",
    sentar = "Sit!",
    confetar = "5 konfeti atýn!",
    mouse = "Ekranda 10 kez týklayýn!",
    beijos = "10 öpücük ver!",
    dormir = "Onlar uyuyor. Dinlenmek için uyu.",
    raiva = "Tigrounette evil! Girl for him!",
    chorem = "Senin için peynir yok. Aðla!",
    nchorem = "Aðlama!",
    esquerda = "SOLA gitme!",
    direita = "SAÐA gitme!",
    numero = "Bu numarayý yazýn: ",
    digitar = "Bir þey yazýn ve bana gönderin.",
    falar = "Hiçbir þey konuþma!",
    pular = "Atlama!",
    mexer = "Kýpýrdama!",
    bandeira = "Herhangi bir ülkenin bayraðýný dengeleyin!",
    ano = "Hangi yýldayýz?",
    vesquerda = "SOLA bakmaya devam edin!",
    vdireita = "SAÐA bakmaya devam edin!",
    quadradoa = "Mavi meydanda kalýn!",
    quadradov = "Kýzýl meydanda kalýn!",
    quadrado = "Beyaz meydanda kalýn!",
    nquadrado = "Beyaz meydanda kalmayın!",
    retangulo = "Stay on the white rectangle!",
    retangulov = "Kýrmýzý dikdörtgenin üzerinde kalýn!",
    nretangulo = "Beyaz dikdörtgenin üzerinde kalmayýn!",
    preesquerda15 = "SOL tuþa 15 kez basýn!",
    predireita15 = "SAÐ tuþa 15 kez basýn!",
    preesquerda30 = "SOL tuþa 30 kez basýn!",
    predireita30 = "SAÐ tuþa 30 kez basýn!",
    preesquerda60 = "SOL tuþa 60 kez basýn!",
    predireita60 = "SAÐ tuþa 60 kez basýn!",
    espaco = "Ara Çubuðu'na 20 kez basýn!",
    nome = "Takma adýnýzý yazýn (# sayý ile)!",
    ndance = "Dans etme!",
    vampire = "Rastgele bir oyuncu artýk bir vampir! Yakýn durma!",
    key1 = "DELETE tuþuna basýn!",
    action1 = "Dans et, otur ve uyu!",
    laugh = "Gülmek!",
    laugh2 = "Gülme!",
    stone = "Taþlarla dikkat!",
    noob = "Tür: BEN NOOB",
    action2 = "Aðla ve gül!",
    jump = "Atlama!",
    number = "Aþaðýdaki numarayý yazýn: ",
    key = "Herhangi bir tuþa basýn!",
    jump2 = "5 kez zýpla!",
    action3 = "Bir öpücük ver ve aðla!",
    area = "Gizli metnin nerede olduðunu keþfedin ve týklayýn!",
    dancing = "Parti zamaný!",
    freeze = "Dur!",
    transform = "Dans ve uyku!",
    down1 = "3 kez kapatýn!",
    kill = "Kendinizi öldürün!",
    mestre = "Usta Diyor",
    map = "Harita",
    time = "Zaman",
    mice = "fareler",
    round = "yuvarlak",
    mices = "Bu odada en az 4 oyuncu gerekmektedir.",
    difficulty = "zorluk",
    segundos = "saniye.",
    fim = "Maçýn sonu! Bir sonraki maç baþlayacak ",
    playingmap = "Harita çalýnýyor",
    created = "tarafýndan yaratýldý",
    abaixar = "Geri çekil ve kalk!",
    action = "Herhangi bir iþlem yapýn!",
    naction = "Hiçbir þey yapmayýn!",
    math = "1 + 1 ne kadar?",
    ds = "Dans ve sit!",
    seq4 = "Dans et, otur, uyu ve alkışla!",
    spider = "Örümcek ağlarına dikkat!",
    key2 = "F4 tuþuna basýn!",
    clap = "5 kez ellerini çırp !",
    completed = "Komutu tamamladın!",
    rain = "Koyunlara dikkat !",
    catch = "Haritanın '+1' tüm rozetlerini topla !",
    skull = "Kafataslarına dikkat edin!",
    gravity = "Yerçekimi değişti!",
    }
    if tfm.get.room.community == "br" or tfm.get.room.community == "pt" then
    text = lang.br
    elseif tfm.get.room.community == "fr" then
    text = lang.fr
    elseif tfm.get.room.community == "tr" then
    text = lang.tr
    else
    text = lang.br
    end
    function eventNewPlayer(name)
    rato=rato+1
    for k=17, 116 do
    tfm.exec.bindKeyboard(name,k,false,true)
    end
    system.bindMouse(name,true)
    newData={
    ["c"]=0;
    ["s"]=0;
    };
    data[name] = newData;
    tfm.exec.chatMessage("<br><br><br><p align='center'>"..text.welcome.."<br><p align='left'>",name)
    if string.find(tfm.get.room.name,name) then
    admin=name
    tfm.exec.chatMessage("You are the administrator of this room. Use !pw [password] to change the password of the room and !run [@code] to run a custom map.<br><br>If you are a FunCorp member, type !fc to enable the FunCorp mode.",admin)
    end
    end
    for name,player in pairs(tfm.get.room.playerList) do
    eventNewPlayer(name)
    end
    function eventPlayerDied(name)
    if active >= 0 and active <= 55 then
    vivo=vivo-1
    local i=0
    local name
    for pname,player in pairs(tfm.get.room.playerList) do
    if not player.isDead then
    i=i+1
    name=pname
    end
    end
    if i==0 then
    active=-1
    elseif i==1 then
    active=-1
    tfm.exec.giveCheese(name)
    tfm.exec.playerVictory(name)
    tfm.exec.setGameTime(10)
    end
    end
    if active == 56 then
    completeCommand(name)
    tfm.exec.respawnPlayer(name)
    end
    if active >= 57 then
    vivo=vivo-1
    local i=0
    local name
    for pname,player in pairs(tfm.get.room.playerList) do
    if not player.isDead then
    i=i+1
    name=pname
    end
    end
    if i==0 then
    active=-1
    elseif i==1 then
    active=-1
    tfm.exec.giveCheese(name)
    tfm.exec.playerVictory(name)
    tfm.exec.setGameTime(10)
    end
    end
    end
    function selectMap()
    tfm.exec.newGame(mapas[math.random(#mapas)])
    end
    function completeCommand(name)
    data[name].c=1
    tfm.exec.chatMessage(text.completed,name)
    end
    function eventNewGame()
    ui.removeTextArea(0,nil)
    ui.removeTextArea(1,nil)
    ui.removeTextArea(2,nil)
    ui.removeTextArea(250,nil)
    rodada=0
    active=0
    vivo=0
    rato=0
    dificuldade=1
    tfm.exec.setWorldGravity(0, 10)
    if unlocked == true then
    tfm.exec.setGameTime(15)
    else
    tfm.exec.setGameTime(36000)
    end
    for name,player in pairs(tfm.get.room.playerList) do
    vivo=vivo+1
    rato=rato+1
    if data[name] then
    data[name].c=0
    data[name].key=0
    end
    end
    rodadas=math.floor(20+(rato/3.5))
    if tfm.get.room.community == "br" then
    tfm.exec.chatMessage("<VP><b>Você pode ver todas as salas que compõem o module #anvilwar na /sala #anvilwar00rooms.</b><br><br><ROSE>Atenção: Nos próximos dias, o comando do Mestre Mandou será passado para outro usuário. Não aguardem grandes mudanças no module até lá.")
    end
    tfm.exec.setNameColor(admin,0xff0000)
    end
    function eventPlayerLeft()
    rato=rato-1
    end
    function sortearComandos()
    if fc_mode == false then
    active=math.random(1,71)
    else
    active=tonumber(fc_cmds[math.random(#fc_cmds)])
    end
    getCommand()
    end
    function eventChatCommand(name,message)
    if name == "Rakan_raster#0000" or name == "Forzaldenon#0000" or name == "Hecarimjhenx#0000" or name == admin then
    if(message:sub(0,7) == "command") then
    active=tonumber(message:sub(9))
    getCommand()
    end
    if(message:sub(0,4) == "mapa") then
    tfm.exec.newGame(message:sub(6))
    active=0
    end
    if(message:sub(0,1) == "q") then
    q=message:sub(3)
    end
    if(message:sub(0,1) == "a") then
    a=message:sub(3)
    end
    if(message:sub(0,4) == "kill") then
    tfm.exec.killPlayer(message:sub(6))
    end
    if(message:sub(0,1) == "t") then
    qtime=tonumber(message:sub(3))
    end
    if(message:sub(0,3) == "run") then
    tfm.exec.newGame(message:sub(5))
    active=0
    end
    if(message:sub(0,5) == "limit") then
    tfm.exec.setRoomMaxPlayers(tonumber(message:sub(7)))
    end
    if(message:sub(0,2) == "pw") then
    tfm.exec.setRoomPassword(tostring(message:sub(4)))
    if message:sub(4) == "" then
    tfm.exec.chatMessage("Password cleared.",name)
    else
    tfm.exec.chatMessage("Password changed to: "..message:sub(4).."",name)
    end
    end
    if message == "fc" then
    if fc_mode == false then
    fc_mode=true
    tfm.exec.chatMessage("<R>The FunCorp mode of this module is now enabled.")
    else
    fc_mode=false
    tfm.exec.chatMessage("<R>The FunCorp mode of this module is now disabled.")
    end
    end
    end
    end
    function showCommand(id,text)
    ui.addTextArea(0,"<font face='Arial Rounded MT Bold,Arial'><font color='#202020'><font size='17'><p align='center'><b>"..text.."",nil,25,26,750,24,0x999999,0x223024,0.85,true)
    end
    function whiteSquare(x)
    ui.addTextArea(1,"",nil,x,320,80,65,0xffffff,0xffffff,0.68,false)
    end
    function verticalRectangle(x)
    ui.addTextArea(1,"",nil,x,0,80,400,0xffffff,0xffffff,0.68,false)
    end
    function horizontalRectangle(y)
    ui.addTextArea(1,"",nil,0,y,1600,60,0xffffff,0xffffff,0.68,false)
    end
    function getCommand()
    rodada=rodada+1
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=0
    data[name].s=0
    end
    if active == 1 then
    showCommand(active,text.dancar)
    tfm.exec.setGameTime(5)
    end
    if active == 2 then
    showCommand(active,text.sentar)
    tfm.exec.setGameTime(5)
    end
    if active == 3 then
    showCommand(active,text.confetar)
    tfm.exec.setGameTime(6)
    end
    if active == 4 then
    showCommand(active,text.mouse)
    tfm.exec.setGameTime(5)
    end
    if active == 5 then
    showCommand(active,text.beijos)
    tfm.exec.setGameTime(15)
    end
    if active == 6 then
    showCommand(active,text.dormir)
    tfm.exec.setGameTime(5)
    end
    if active == 7 then
    showCommand(active,text.raiva)
    tfm.exec.setGameTime(5)
    end
    if active == 8 then
    showCommand(active,text.chorem)
    tfm.exec.setGameTime(5)
    end
    if active == 9 then
    showCommand(active,text.esquerda)
    tfm.exec.setGameTime(5)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    end
    if active == 10 then
    showCommand(active,text.direita)
    tfm.exec.setGameTime(5)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    end
    if active == 11 then
    showCommand(active,text.digitar)
    tfm.exec.setGameTime(7)
    end
    if active == 12 then
    showCommand(active,text.falar)
    tfm.exec.setGameTime(5)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    end
    if active == 13 then
    showCommand(active,text.pular)
    tfm.exec.setGameTime(5)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    end
    if active == 14 then
    showCommand(active,text.mexer)
    tfm.exec.setGameTime(5)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    end
    if active == 15 then
    showCommand(active,text.bandeira)
    tfm.exec.setGameTime(8)
    end
    if active == 16 then
    showCommand(active,text.ano)
    tfm.exec.setGameTime(5)
    end
    if active == 17 then
    showCommand(active,text.vesquerda)
    tfm.exec.setGameTime(5)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    end
    if active == 18 then
    showCommand(active,text.vdireita)
    tfm.exec.setGameTime(5)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    end
    if active == 19 then
    xpos=math.random(60,700)
    showCommand(active,text.quadrado)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    whiteSquare(xpos)
    end
    if active == 20 then
    xpos=math.random(60,700)
    showCommand(active,text.retangulo)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    verticalRectangle(xpos)
    end
    if active == 21 then
    xpos=math.random(60,700)
    showCommand(active,text.nretangulo)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    verticalRectangle(xpos)
    end
    if active == 22 then
    ypos=math.random(40,300)
    showCommand(active,text.retangulo)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    horizontalRectangle(ypos)
    end
    if active == 23 then
    ypos=math.random(40,300)
    showCommand(active,text.nretangulo)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    horizontalRectangle(ypos)
    end
    if active == 24 then
    showCommand(active,text.preesquerda30)
    tfm.exec.setGameTime(8)
    end
    if active == 25 then
    showCommand(active,text.predireita30)
    tfm.exec.setGameTime(8)
    end
    if active == 26 then
    showCommand(active,text.preesquerda60)
    tfm.exec.setGameTime(12)
    end
    if active == 27 then
    showCommand(active,text.predireita60)
    tfm.exec.setGameTime(12)
    end
    if active == 28 then
    showCommand(active,text.espaco)
    tfm.exec.setGameTime(8)
    end
    if active == 29 then
    showCommand(active,text.nome)
    tfm.exec.setGameTime(10)
    end
    if active == 30 then
    showCommand(active,text.ndance)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    end
    if active == 31 then
    xpos=math.random(60,700)
    local xpos2=math.random(60,700)
    showCommand(active,text.quadrado)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    whiteSquare(xpos)
    ui.addTextArea(2,"",nil,xpos2,320,80,65,0xff0000,0xff0000,0.62,false)
    end
    if active == 32 then
    xpos=math.random(60,700)
    local xpos2=math.random(60,700)
    showCommand(active,text.quadradov)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    ui.addTextArea(1,"",nil,xpos2,320,80,65,0xffffff,0xffffff,0.68,false)
    ui.addTextArea(2,"",nil,xpos,320,80,65,0xff0000,0xff0000,0.62,false)
    end
    if active == 33 then
    xpos=math.random(60,700)
    local xpos2=math.random(60,700)
    showCommand(active,text.retangulo)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    verticalRectangle(xpos)
    ui.addTextArea(2,"",nil,xpos2,0,80,400,0xff0000,0xff0000,0.62,false)
    end
    if active == 34 then
    xpos=math.random(60,700)
    local xpos2=math.random(60,700)
    showCommand(active,text.retangulov)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    ui.addTextArea(1,"",nil,xpos2,0,80,400,0xffffff,0xffffff,0.68,false)
    ui.addTextArea(2,"",nil,xpos,0,80,400,0xff0000,0xff0000,0.62,false)
    end
    if active == 35 then
    showCommand(active,text.abaixar)
    tfm.exec.setGameTime(7)
    end
    if active == 36 then
    showCommand(active,text.action)
    tfm.exec.setGameTime(8)
    end
    if active == 37 then
    showCommand(active,text.ds)
    tfm.exec.setGameTime(10)
    end
    if active == 38 then
    showCommand(active,text.key1)
    tfm.exec.setGameTime(8)
    end
    if active == 39 then
    showCommand(active,text.action1)
    tfm.exec.setGameTime(10)
    end
    if active == 40 then
    showCommand(active,text.laugh)
    tfm.exec.setGameTime(5)
    end
    if active == 41 then
    showCommand(active,text.laugh2)
    tfm.exec.setGameTime(5)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    end
    if active == 42 then
    showCommand(active,text.stone)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    for i=1,24 do
    tfm.exec.addShamanObject(85,(i*80)-20,64,0,0,0,false)
    end
    end
    if active == 43 then
    showCommand(active,text.noob)
    tfm.exec.setGameTime(10)
    end
    if active == 44 then
    showCommand(active,text.action2)
    tfm.exec.setGameTime(9)
    end
    if active == 45 then
    showCommand(active,text.jump)
    tfm.exec.setGameTime(5)
    end
    if active == 46 then
    xpos=math.random(60,700)
    local xpos2=math.random(60,700)
    showCommand(active,text.nretangulo)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    verticalRectangle(xpos)
    ui.addTextArea(2,"",nil,xpos2,0,80,400,0xff0000,0xff0000,0.62,false)
    end
    if active == 47 then
    number=math.random(10000000,99999999)
    showCommand(active,text.number..number)
    tfm.exec.setGameTime(11)
    end
    if active == 48 then
    showCommand(active,text.key)
    tfm.exec.setGameTime(5)
    end
    if active == 49 then
    showCommand(active,text.jump2)
    tfm.exec.setGameTime(9)
    end
    if active == 50 then
    showCommand(active,text.action3)
    tfm.exec.setGameTime(8)
    end
    if active == 51 then
    showCommand(active,text.area)
    ui.addTextArea(250,"<a href='event:command51'>CLICK HERE",nil,math.random(100,700),math.random(50,350),100,25,0,0,1.0,true)
    tfm.exec.setGameTime(10)
    end
    if active == 52 then
    showCommand(active,text.dancing)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    tfm.exec.playEmote(name,0)
    end
    tfm.exec.setGameTime(15)
    end
    if active == 53 then
    showCommand(active,text.freeze)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    tfm.exec.freezePlayer(name,true)
    end
    tfm.exec.setGameTime(5)
    end
    if active == 54 then
    showCommand(active,text.transform)
    tfm.exec.setGameTime(10)
    end
    if active == 55 then
    showCommand(active,text.down1)
    tfm.exec.setGameTime(9)
    end
    if active == 56 then
    showCommand(active,text.kill)
    tfm.exec.setGameTime(10)
    end
    if active == 57 then
    xpos=math.random(60,700)
    xpos2=math.random(60,700)
    showCommand(active,text.quadradoa)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    ui.addTextArea(1,"",nil,xpos2,320,80,65,0xff0000,0xff0000,0.68,false)
    ui.addTextArea(2,"",nil,xpos,320,80,65,0x0000ff,0x0000ff,0.62,false)
    end
    if active == 58 then
    showCommand(active,text.naction)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    tfm.exec.setGameTime(10)
    end
    if active == 59 then
    showCommand(active,text.nchorem)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    tfm.exec.setGameTime(7)
    end
    if active == 60 then
    showCommand(active,text.math)
    tfm.exec.setGameTime(8)
    end
    if active == 61 then
    showCommand(active,text.seq4)
    tfm.exec.setGameTime(13)
    end
    if active == 62 then
    showCommand(active,text.spider)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    tfm.exec.setGameTime(10)
    for i=1,6 do
    tfm.exec.addPhysicObject(i, math.random(100,700), math.random(50,350), spiderweb)
    end
    end
    if active == 63 then
    showCommand(active,text.key2)
    tfm.exec.setGameTime(10)
    end
    if active == 64 then
    xpos=math.random(60,700)
    xpos2=math.random(60,700)
    showCommand(active,text.quadradov)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    ui.addTextArea(2,"",nil,xpos,320,80,65,0xff0000,0xff0000,0.68,false)
    ui.addTextArea(1,"",nil,xpos2,320,80,65,0x0000ff,0x0000ff,0.62,false)
    end
    if active == 65 then
    showCommand(active,text.preesquerda15)
    tfm.exec.setGameTime(6)
    end
    if active == 66 then
    showCommand(active,text.predireita15)
    tfm.exec.setGameTime(6)
    end
    if active == 67 then
    showCommand(active,text.clap)
    tfm.exec.setGameTime(9)
    end
    if active == 68 then
    showCommand(active,text.rain)
    tfm.exec.setGameTime(8)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    for i=1,24 do
    tfm.exec.addShamanObject(40,(i*80)-20,64,0,0,0,false)
    end
    end
    if active == 69 then
    showCommand(active,text.catch)
    tfm.exec.setGameTime(math.random(16,25))
    for i=1,4 do
    tfm.exec.addBonus(0, math.random(120,680), math.random(90,290), i, 0)
    end
    end
    if active == 70 then
    showCommand(active,text.skull)
    tfm.exec.setGameTime(6)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    for i=5,9 do
    tfm.exec.addBonus(2, math.random(120,680), math.random(90,290), i, 0)
    end
    end
    if active == 71 then
    showCommand(active,text.gravity)
    tfm.exec.setGameTime(9)
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].c=1;
    end
    tfm.exec.setWorldGravity(0, math.random(-5,20))
    end
    if active == 99 then
    showCommand(active,q)
    tfm.exec.setGameTime(qtime)
    end
    end
    function eventPlayerBonusGrabbed(name, id)
    if active == 69 then
    data[name].s=data[name].s+1
    if data[name].s >= 4 then
    completeCommand(name)
    end
    end
    end
    function eventTextAreaCallback(id,name,callback)
    if callback == "command51" then
    completeCommand(name)
    ui.removeTextArea(250,name)
    end
    end
    function eventChatMessage(name,message)
    if active == 11 then
    if string.len(message) >= 2 then
    completeCommand(name)
    end
    end
    if active == 12 or active == 14 or active == 59 then
    tfm.exec.killPlayer(name)
    end
    if active == 16 then
    if message == "2020" then
    completeCommand(name)
    else
    tfm.exec.killPlayer(name)
    end
    end
    if active == 29 then
    if string.upper(message) == string.upper(name) then
    completeCommand(name)
    end
    end
    if active == 41 then
    if string.find(message,"k") or string.find(message,"K") or string.find(message,"ha") or string.find(message,"HA") then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 43 then
    if string.upper(message) == "EU SOU NOOB" or string.upper(message) == "I AM NOOB" or string.upper(message) == "BEN NOOB" then
    completeCommand(name)
    end
    if string.find(message,"PRO") or string.find(message,"pro") or string.find(message,"Pro") then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 47 then
    if message == tostring(number) then
    completeCommand(name)
    end
    end
    if active == 60 then
    if message == "2" then
    completeCommand(name)
    elseif message == "3" then
    tfm.exec.killPlayer(name)
    elseif message == "11" then
    tfm.exec.killPlayer(name)
    elseif message == "22" then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 99 then
    if string.upper(message) == string.upper(a) then
    completeCommand(name)
    end
    end
    end
    function eventEmotePlayed(name,id)
    if active == 1 then
    if id == 0 or id == 10 then
    completeCommand(name)
    end
    end
    if active == 2 then
    if id == 8 then
    completeCommand(name)
    end
    end
    if active == 3 then
    if id == 9 then
    data[name].s=data[name].s+1
    if data[name].s >= 5 then
    completeCommand(name)
    end
    end
    end
    if active == 5 then
    if id == 3 then
    data[name].s=data[name].s+1
    if data[name].s >= 10 then
    completeCommand(name)
    end
    end
    end
    if active == 6 then
    if id == 6 then
    completeCommand(name)
    end
    end
    if active == 7 then
    if id == 4 then
    completeCommand(name)
    end
    end
    if active == 8 then
    if id == 2 then
    completeCommand(name)
    end
    end
    if active == 14 or active == 53 or active == 58 then
    tfm.exec.killPlayer(name)
    end
    if active == 15 then
    if id == 10 then
    completeCommand(name)
    end
    end
    if active == 30 then
    if id == 0 or id == 10 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 36 then
    completeCommand(name)
    end
    if active == 37 then
    if id == 0 and data[name].s == 0 then
    data[name].s=1
    end
    if id == 8 and data[name].s == 1 then
    completeCommand(name)
    end
    end
    if active == 39 then
    if id == 0 and data[name].s == 0 then
    data[name].s=1
    end
    if id == 8 and data[name].s == 1 then
    data[name].s=2
    end
    if id == 6 and data[name].s == 2 then
    completeCommand(name)
    end
    end
    if active == 40 then
    if id == 1 then
    completeCommand(name)
    end
    end
    if active == 41 then
    if id == 1 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 44 then
    if id == 2 and data[name].s == 0 then
    data[name].s=1
    end
    if id == 1 and data[name].s == 1 then
    completeCommand(name)
    end
    end
    if active == 50 then
    if id == 3 and data[name].s == 0 then
    data[name].s=1
    end
    if id == 2 and data[name].s == 1 then
    completeCommand(name)
    end
    end
    if active == 54 then
    if id == 0 and data[name].s == 0 then
    data[name].s=1
    end
    if id == 6 and data[name].s == 1 then
    completeCommand(name)
    end
    end
    if active == 59 then
    if id == 2 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 61 then
    if id == 0 and data[name].s == 0 then
    data[name].s=1
    end
    if id == 8 and data[name].s == 1 then
    data[name].s=2
    end
    if id == 6 and data[name].s == 2 then
    data[name].s=3
    end
    if id == 5 and data[name].s == 3 then
    completeCommand(name)
    end
    end
    if active == 67 then
    if id == 5 then
    data[name].s=data[name].s+1
    if data[name].s >= 5 then
    completeCommand(name)
    end
    end
    end
    end
    function eventMouse(name,x,y)
    if active == 4 then
    data[name].s=data[name].s+1
    if data[name].s >= 10 then
    completeCommand(name)
    end
    end
    end
    function eventKeyboard(name,id,down,x,y)
    if active == 9 then
    if id == 37 or id == 65 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 10 then
    if id == 39 or id == 68 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 13 then
    if id == 38 or id == 87 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 14 then
    tfm.exec.killPlayer(name)
    end
    if active == 24 then
    if id == 37 or id == 65 then
    if data[name].key == 0 then
    data[name].key=id
    end
    data[name].s=data[name].s+1
    if data[name].s >= 30 then
    completeCommand(name)
    end
    end
    if data[name].key == 37 and id == 65 then
    tfm.exec.killPlayer(name)
    end
    if data[name].key == 65 and id == 37 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 25 then
    if id == 39 or id == 68 then
    if data[name].key == 0 then
    data[name].key=id
    end
    data[name].s=data[name].s+1
    if data[name].s >= 30 then
    completeCommand(name)
    end
    end
    if data[name].key == 39 and id == 68 then
    tfm.exec.killPlayer(name)
    end
    if data[name].key == 68 and id == 39 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 26 then
    if id == 37 or id == 65 then
    if data[name].key == 0 then
    data[name].key=id
    end
    data[name].s=data[name].s+1
    if data[name].s >= 60 then
    completeCommand(name)
    end
    end
    if data[name].key == 37 and id == 65 then
    tfm.exec.killPlayer(name)
    end
    if data[name].key == 65 and id == 37 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 27 then
    if id == 39 or id == 68 then
    if data[name].key == 0 then
    data[name].key=id
    end
    data[name].s=data[name].s+1
    if data[name].s >= 60 then
    completeCommand(name)
    end
    end
    if data[name].key == 39 and id == 68 then
    tfm.exec.killPlayer(name)
    end
    if data[name].key == 68 and id == 39 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 28 then
    if id == 32 then
    data[name].s=data[name].s+1
    if data[name].s >= 15 then
    completeCommand(name)
    end
    end
    end
    if active == 35 then
    if id == 40 or id == 83 then
    completeCommand(name)
    end
    if id == 38 or id == 87 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 38 then
    if id == 46 then
    completeCommand(name)
    end
    end
    if active == 45 then
    if id == 38 or id == 87 then
    completeCommand(name)
    end
    end
    if active == 48 then
    completeCommand(name)
    end
    if active == 49 then
    if id == 38 or id == 87 then
    data[name].s=data[name].s+1
    if data[name].s >= 5 then
    completeCommand(name)

    end
    end
    end
    if active == 55 then
    if id == 40 or id == 83 then
    data[name].s=data[name].s+1
    if data[name].s >= 1 then
    completeCommand(name)
    end
    end
    end
    if active == 59 then
    if id == 48 or id == 50 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 63 then
    if id == 115 then
    completeCommand(name)
    end
    end
    if active == 65 then
    if id == 37 or id == 65 then
    if data[name].key == 0 then
    data[name].key=id
    end
    data[name].s=data[name].s+1
    if data[name].s >= 15 then
    completeCommand(name)
    end
    end
    if data[name].key == 37 and id == 65 then
    tfm.exec.killPlayer(name)
    end
    if data[name].key == 65 and id == 37 then
    tfm.exec.killPlayer(name)
    end
    end
    if active == 66 then
    if id == 39 or id == 68 then
    if data[name].key == 0 then
    data[name].key=id
    end
    data[name].s=data[name].s+1
    if data[name].s >= 15 then
    completeCommand(name)
    end
    end
    if data[name].key == 39 and id == 68 then
    tfm.exec.killPlayer(name)
    end
    if data[name].key == 68 and id == 39 then
    tfm.exec.killPlayer(name)
    end
    end
    end
    function eventLoop(passado,faltando)
    local tempo=math.floor(faltando/1000)
    if active == -2 then
    ui.setMapName(" <N>"..text.mices.." <BL>| <VP><b>Versão RTM 8249.045</b><")
    elseif active == -1 then
    ui.setMapName(" <VP>"..text.fim.."<b>"..tempo.."</b> "..text.segundos.." <BL>| <VP><b>Versão RTM 8249.045</b><")
    elseif active >= 0 then
    ui.setMapName(" "..tfm.get.room.currentMap.." <BL>| <N>"..text.mice.." : <J>"..vivo.." / "..rato.." <BL>| <N>"..text.round.." : <J>"..rodada.." <BL>| <VP><b>Versão RTM 8249.045</b><")
    end
    if rato < 4 then
    if tfm.get.room.currentMap == "@2637755" and unlocked == true then
    active=-2
    tfm.exec.setGameTime(8000)
    else
    if passado > 4000 and unlocked == true then
    tfm.exec.newGame("@2637755")
    tfm.exec.setGameTime(8000)
    tfm.exec.chatMessage("<R>"..text.mices.."",nil)
    end
    end
    end
    if rato >= 4 and passado >= 4000 then
    if tfm.get.room.currentMap == "@2637755" and unlocked == true then
    selectMap()
    end
    end
    if active < 0 and faltando < 1 and unlocked == true then
    selectMap()
    end
    if active == 0 and faltando < 1000 then
    if rodada < rodadas then
    sortearComandos()
    else
    active=-1
    tfm.exec.setGameTime(10)
    for name,player in pairs(tfm.get.room.playerList) do
    tfm.exec.giveCheese(true)
    tfm.exec.playerVictory(true)
    end
    end
    end
    if active > 0 and faltando < 1 and rato >= 2 then
    if active == 17 then
    for name,player in pairs(tfm.get.room.playerList) do
    if tfm.get.room.playerList[name].isFacingRight == true then
    tfm.exec.killPlayer(name)
    end
    end
    end
    if active == 18 then
    for name,player in pairs(tfm.get.room.playerList) do
    if tfm.get.room.playerList[name].isFacingRight == false then
    tfm.exec.killPlayer(name)
    end
    end
    end
    if active == 19 or active == 31 or active == 32 or active == 57 or active == 64 then
    for name,player in pairs(tfm.get.room.playerList) do
    if player.y < 300 then
    tfm.exec.killPlayer(name)
    else
    if player.x < xpos-20 or player.x > xpos+100 then
    tfm.exec.killPlayer(name)
    end
    end
    end
    end
    if active == 32 then
    for name,player in pairs(tfm.get.room.playerList) do
    if player.y < 300 then
    tfm.exec.killPlayer(name)
    else
    if player.x < xpos-20 or player.x > xpos+100 then
    tfm.exec.killPlayer(name)
    end
    end
    end
    end
    if active == 20 or active == 33 or active == 34 then
    for name,player in pairs(tfm.get.room.playerList) do
    if player.x < xpos or player.x > xpos+80 then
    tfm.exec.killPlayer(name)
    end
    end
    end
    if active == 21 or active == 46 then
    for name,player in pairs(tfm.get.room.playerList) do
    if player.x > xpos and player.x < xpos+80 then
    tfm.exec.killPlayer(name)
    end
    end
    end
    if active == 22 then
    for name,player in pairs(tfm.get.room.playerList) do
    if player.y < ypos-10 or player.y > ypos+70 then
    tfm.exec.killPlayer(name)
    end
    end
    end
    if active == 23 then
    for name,player in pairs(tfm.get.room.playerList) do
    if player.y > ypos-10 and player.y < ypos+70 then
    tfm.exec.killPlayer(name)
    end
    end
    end
    if active == 52 then
    for name,player in pairs(tfm.get.room.playerList) do
    tfm.exec.setNameColor(name,math.random(1,16777215))
    end
    end
    if active == 53 then
    for name,player in pairs(tfm.get.room.playerList) do
    tfm.exec.freezePlayer(name,false)
    end
    end
    ui.removeTextArea(0,nil)
    ui.removeTextArea(1,nil)
    ui.removeTextArea(2,nil)
    ui.removeTextArea(250,nil)
    for i=1,6 do
    tfm.exec.removePhysicObject(i)
    end
    for i=1,4 do
    tfm.exec.removeBonus(i)
    end
    for i=5,9 do
    tfm.exec.removeBonus(i)
    end
    active=0
    if rodada == 3 or rodada == 6 or rodada == 9 or rodada == 12 or rodada == 15 or rodada == 18 then
    dificuldade=dificuldade+1
    end
    for name,player in pairs(tfm.get.room.playerList) do
    data[name].key=0
    if data[name].c == 0 then
    tfm.exec.killPlayer(name)
    end
    end
    if fc_mode == false then
    if vivo > 4 then
    tfm.exec.setGameTime(6-dificuldade)
    else
    tfm.exec.setGameTime(9-dificuldade)
    end
    else
    tfm.exec.setGameTime(6)
    end
    end
    for name,player in pairs(tfm.get.room.playerList) do
    if data[name] then
    if data[name].c == 1 then
    tfm.exec.setNameColor(name,0x00ff00)
    if completed == false then
    completed=true
    end
    else
    tfm.exec.setNameColor(name,0xc2c2da)
    end
    end
    end
    end
    tfm.exec.newGame("@2637755")
    Jp_darkuss
    « Citoyen »
    1604520000000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2568
      0
    Sklag a dit :
    ou opcional quando comeca a spawnar um certo item ele e removdo do mapa tipo cannon

    O countdown mínimo é de 500 ms, não tem menor. Você pode usar isso para remover, sabendo que 1000ms = 1s.

    O tfm.exec.addShamanObject invoca um objeto shaman, e retorna o id.

    Então depois de x tempo, você elimina o objeto com tfm.exec.removeObject.

    Code Lua

    1
    2
    3
    4
    5
    6
    7
    8
    local count= 0 --variável de contagem
    local id= tfm.exec.addShamanObject(2, 300, 100) --invoco o objeto e guardo seu id na variável "id"
    eventLoop= function()
    count= count + 500 --como cada loop é de 500ms, adiciona na variável de contagem
    if count>= 5000 then --se count bater 5000 (5 segundos), objeto desaparecerá
    tfm.exec.removeObject(id)
    end
    end

    Dernière modification le 1604798160000
    Jp_darkuss
    « Citoyen »
    1604520240000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2569
      0
    Lewnyx a dit :
    Jp_darkuss a dit :
    Lightsuit a dit :
    Olá, eu queria um script que possibilitasse um dos ratinhos a matar outras pessoas apertando espaço.

    Se possivel com limite de tempo

    Obrigado!

    Script

    Code Lua

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    local _, adm= pcall(nil)
    local killer
    local data= {
    maxCount= 10000,
    allow= true
    }
    local count= 0
    local update= function(player)
    ui.removeTextArea(2, killer)
    killer= player
    ui.addTextArea(2, "Countdown: 0s", killer, 700, 370, nil, nil, nil, nil, 1, true)
    end
    local kill= function(player)
    local x= tfm.get.room.playerList[player].x
    local y= tfm.get.room.playerList[player].y
    function distance(x1, y1, x2, y2)
    local dist= {
    x= math.abs(x1 - x2),
    y= math.abs(y1 - y2)
    }
    return math.sqrt(dist.x ^ 2 + dist.y ^ 2)
    end
    for name, data in next, tfm.get.room.playerList do
    if name~= player and distance(x, y, data.x, data.y)<= 30 then
    tfm.exec.killPlayer(name)
    break
    end
    end
    end
    eventKeyboard= function(player)
    if player== killer and data.allow then
    kill(player)
    data.allow= false
    end
    end
    eventPopupAnswer= function(id, _, answer)
    if id== 0 then
    update(answer)
    elseif id== 1 then
    data.maxCount= tonumber(answer) * 1000
    end
    end
    eventLoop= function()
    if not data.allow then
    count= count + 500
    if count % 1000== 0 then
    ui.updateTextArea(2, "Countdown: "..((data.maxCount - count) / 1000).."s", killer)
    end
    if count>= data.maxCount then
    count= 0
    data.allow= true
    end
    end
    end
    eventTextAreaCallback= function(_, _, event)
    if event=="killer" then
    ui.addPopup(0, 2, "<p align='center'>Indique o nome do killer:</p>", adm, 300, 100, nil, true)
    elseif event=="countdown" then
    ui.addPopup(1, 2, "<p align='center'>Indique o countdown para cada kill (atual: "..(data.maxCount / 1000).."s):</p>", adm, 300, 100, nil, true)
    end
    end
    eventNewPlayer= function(player)
    system.bindKeyboard(player, 32, false, true)
    end
    do
    adm= adm:match("(.-)%.")
    killer= adm
    update(killer)
    tfm.exec.disableAfkDeath()
    tfm.exec.disableMortCommand()
    table.foreach(tfm.get.room.playerList, eventNewPlayer)
    ui.addTextArea(0, "<a href='event:killer'>Killer</a>", adm, 20, 370, nil, nil, nil, nil, 1, true)
    ui.addTextArea(1, "<a href='event:countdown'>Countdown</a>", adm, 70, 370, nil, nil, nil, nil, 1, true)
    end


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

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

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

    Quaisquer bugs me notifique.

    Oie, esse script é muito bom, mas teria como mexer nele e fazer com que os ratinhos mortos não se ressucitassem até recarregar o script? c: desde já ficarei muito grata.

    Se você estiver usando outros mapas além do cafofo até dá. Se não teria que ficar matando os moros eternamente. Qual das duas acha melhor?

    @edit: fiz as modificações, olha aí se 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
    local _, adm= pcall(nil)
    local killed= {}
    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)
    killed[#killed + 1]= 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
    for _, player in next, killed do
    tfm.exec.killPlayer(player)
    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
    eventNewGame= function()
    killed= {}
    end
    do
    adm= adm:match("(.-)%.")
    killer= adm
    update(killer)
    for _, data in next, {"AfkDeath", "MortCommand", "AutoTimeLeft"} do
    tfm.exec["disable"..data]()
    end
    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

    Dernière modification le 1604602800000
    Sklag
    « Citoyen »
    1604611380000
      • Sklag#2552
      • Profil
      • Derniers messages
      • Tribu
    #2570
      0
    jp darkus eu gostaria de tira uma duvida cm usa o event summoning start eu ainda n entedi no topico do module faq poderia me mostra um exemplo?
    Jp_darkuss
    « Citoyen »
    1604797980000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2571
      0
    Sklag a dit :
    jp darkus eu gostaria de tira uma duvida cm usa o event summoning start eu ainda n entedi no topico do module faq poderia me mostra um exemplo?

    Esse evento ocorre quando um Shaman começa a invocar um item (ou seja, no momento em que ele começa a segurar o botão esquerdo).

    De aplicabilidade devem ter poucas.

    Depois edito e te mostro um exemplo, porque agora estou sem o notebook e ainda tenho que pensar em algo bem legal para exemplificar.

    Dernière modification le 1604798760000
    Joaogamer2_0
    « Citoyen »
    1604800020000
      • Joaogamer2_0#5040
      • Profil
      • Derniers messages
      • Tribu
    #2572
      0
    AE POVAUN EU QRO UM SCRIPT Q QND APERTA NA AÇAO DE RAIVA APAREÇE UMA PALAVRA ESCRITA "BODYBILD"
    Gabriel
    « Citoyen »
    1604802960000
      • Gabriel#8201
      • Profil
      • Derniers messages
    #2573
      0
    [url=]queria[/url] boms comandos para /lua
    Ishowspeed
    1604807640000
      • Ishowspeed#3286
      • Profil
      • Derniers messages
      • Tribu
    #2574
    [Modéré par Ork, raison : Spam.]

    Dernière modification le 1609195260000
    Yhiita
    « Citoyen »
    1604937960000
      • Yhiita#4240
      • Profil
      • Derniers messages
      • Tribu
    #2575
      0
    teleportar pra algum x y por meio de textarea
    Jp_darkuss
    « Citoyen »
    1605215400000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2576
      0
    Joaogamer2_0 a dit :
    AE POVAUN EU QRO UM SCRIPT Q QND APERTA NA AÇAO DE RAIVA APAREÇE UMA PALAVRA ESCRITA "BODYBILD"

    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
    local players= {}
    eventNewPlayer= function(player)
    players[player]= {count= 0, summoned= false}
    end
    eventLoop= function()
    for player in next, players do
    if (players[player].summoned) then
    players[player].count= players[player].count + 500
    if (players[player].count>= 2000) then
    ui.removeTextArea(0, player)
    players[player].summoned= false
    players[player].count= 0
    end
    end
    end
    end
    eventEmotePlayed= function(player, key)
    local data= tfm.get.room.playerList[player]
    if key== 4 then
    ui.addTextArea(0, "<font color='#FF0000'><b>Bodybuild!!!</b></font>", player, data.x - 40, data.y - 50, nil, nil, 0x999999, 0x999999, 0.9)
    players[player].summoned= true
    end
    end
    do
    table.foreach(tfm.get.room.playerList, eventNewPlayer)
    end

    Yhiita a dit :
    teleportar pra algum x y por meio de textarea

    Como assim por textArea?
    Yhiita
    « Citoyen »
    1605280980000
      • Yhiita#4240
      • Profil
      • Derniers messages
      • Tribu
    #2577
      0
    voce clica e vai pra tal x y
    Yhiita
    « Citoyen »
    1605456540000
      • Yhiita#4240
      • Profil
      • Derniers messages
      • Tribu
    #2578
      0
    pdc x200 y800
    Sklag
    « Citoyen »
    1605544560000
      • Sklag#2552
      • Profil
      • Derniers messages
      • Tribu
    #2579
      0
    Jp_darkuss a dit :
    Joaogamer2_0 a dit :
    AE POVAUN EU QRO UM SCRIPT Q QND APERTA NA AÇAO DE RAIVA APAREÇE UMA PALAVRA ESCRITA "BODYBILD"

    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
    local players= {}
    eventNewPlayer= function(player)
    players[player]= {count= 0, summoned= false}
    end
    eventLoop= function()
    for player in next, players do
    if (players[player].summoned) then
    players[player].count= players[player].count + 500
    if (players[player].count>= 2000) then
    ui.removeTextArea(0, player)
    players[player].summoned= false
    players[player].count= 0
    end
    end
    end
    end
    eventEmotePlayed= function(player, key)
    local data= tfm.get.room.playerList[player]
    if key== 4 then
    ui.addTextArea(0, "<font color='#FF0000'><b>Bodybuild!!!</b></font>", player, data.x - 40, data.y - 50, nil, nil, 0x999999, 0x999999, 0.9)
    players[player].summoned= true
    end
    end
    do
    table.foreach(tfm.get.room.playerList, eventNewPlayer)
    end

    Yhiita a dit :
    teleportar pra algum x y por meio de textarea

    Como assim por textArea?

    acho q quiz dizer tipo escrever e ir pro lugar mais isso n seria poup?
    Yhiita
    « Citoyen »
    1605545580000
      • Yhiita#4240
      • Profil
      • Derniers messages
      • Tribu
    #2580
      0
    nao, teria uma textarea em tal x y, ai vc clicou e teleportaria pra outra x y do mapa
    • Forums
    • /
    • Transformice
    • /
    • Archives
    • /
    • Seção Editor de Mapas e Modules
    • /
    • [Lua] Peça scripts aqui!
    « ‹ 129 / 133 › »
    © Atelier801 2018

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

    Version 1.27