×

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!
« ‹ 128 / 133 › »
[Lua] Peça scripts aqui!
Rambreout
1603786920000
    • Rambreout#8657
    • Profil
    • Derniers messages
    • Tribu
#2541
[Modéré par Ork, raison : Spam.]

Dernière modification le 1603787640000
Rambreout
« Citoyen »
1603787640000
    • Rambreout#8657
    • Profil
    • Derniers messages
    • Tribu
#2542
  0
preciso de ajuda com esse codigo lua, eu arrumei umas coisas nele e na questão da coloquei um pouco mais forte, e mais reta tambem, porém, só está atirando para la>> mesmo que meu rato esteja virado pra la<, pode corrigir isso? para disparar para o lado que eu virar, também, onde ajusto o tempo de "recarga" da cn? acho mt demorado o tempo que está, agradeço desde já.



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 players= {}
local cn= function()
for i in next, tfm.get.room.playerList do
system.bindKeyboard(i, 83, false, true)
system.bindKeyboard(i, 40, false, true)
table.insert(players, {
nome= i,
objeto= 0,
count= 0,
spawn= true
})
end
end
eventKeyboard= function(player, tecla)
if (tecla== 83 or 40) then
for i in next, tfm.get.room.playerList do
if (player== i and tfm.get.room.playerList[""..i].isFacingRight) then
for pos, _ in next, players do
if (player== players[pos].nome and players[pos].spawn) then
players[pos].objeto= tfm.exec.addShamanObject(17, tfm.get.room.playerList[""..i].x + 5, tfm.get.room.playerList[""..i].y + 5, 100, 40, 40, false)
players[pos].spawn= false
end
end
elseif (player== i) then
for pos, _ in next, players do
if (player== players[pos].nome and players[pos].spawn) then
players[pos].objeto= tfm.exec.addShamanObject(17, tfm.get.room.playerList[""..i].x + 5, tfm.get.room.playerList[""..i].y + 2, 100, 40, 40, false)
players[pos].spawn= false
end
end
end
end
end
end
eventNewPlayer= function() cn() end
eventPlayerLeft= function(player)
for pos, _ in next, players do
if (players[pos].nome== player) then
table.remove(players, pos)
end
end
end
eventLoop= function()
for pos, _ in next, players do
players[pos].count= players[pos].count + 500
if (players[pos].count>= 2000) then
players[pos].count= 0
players[pos].spawn= true
tfm.exec.removeObject(players[pos].objeto)
end
end
end
cn()

Dernière modification le 1603787940000
Jp_darkuss
1603803060000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2543
[Modéré par Ork, raison : Citação de comentário moderado.]
Jp_darkuss
« Citoyen »
1603804020000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2544
  0
Rambreout a dit :
preciso de ajuda com esse codigo lua, eu arrumei umas coisas nele e na questão da coloquei um pouco mais forte, e mais reta tambem, porém, só está atirando para la>> mesmo que meu rato esteja virado pra la<, pode corrigir isso? para disparar para o lado que eu virar, também, onde ajusto o tempo de "recarga" da cn? acho mt demorado o tempo que está, agradeço desde já.


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 players= {}
local cn= function()
for i in next, tfm.get.room.playerList do
system.bindKeyboard(i, 83, false, true)
system.bindKeyboard(i, 40, false, true)
table.insert(players, {
nome= i,
objeto= 0,
count= 0,
spawn= true
})
end
end
eventKeyboard= function(player, tecla)
if (tecla== 83 or 40) then
for i in next, tfm.get.room.playerList do
if (player== i and tfm.get.room.playerList[""..i].isFacingRight) then
for pos, _ in next, players do
if (player== players[pos].nome and players[pos].spawn) then
players[pos].objeto= tfm.exec.addShamanObject(17, tfm.get.room.playerList[""..i].x + 5, tfm.get.room.playerList[""..i].y + 5, 100, 40, 40, false)
players[pos].spawn= false
end
end
elseif (player== i) then
for pos, _ in next, players do
if (player== players[pos].nome and players[pos].spawn) then
players[pos].objeto= tfm.exec.addShamanObject(17, tfm.get.room.playerList[""..i].x + 5, tfm.get.room.playerList[""..i].y + 2, 100, 40, 40, false)
players[pos].spawn= false
end
end
end
end
end
end
eventNewPlayer= function() cn() end
eventPlayerLeft= function(player)
for pos, _ in next, players do
if (players[pos].nome== player) then
table.remove(players, pos)
end
end
end
eventLoop= function()
for pos, _ in next, players do
players[pos].count= players[pos].count + 500
if (players[pos].count>= 2000) then
players[pos].count= 0
players[pos].spawn= true
tfm.exec.removeObject(players[pos].objeto)
end
end
end
cn()


Certo, tá que modificado:

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
local players= {}
local cn= function()
for i in next, tfm.get.room.playerList do
system.bindKeyboard(i, 83, false, true)
system.bindKeyboard(i, 40, false, true)
table.insert(players, {
nome= i,
count= 0,
spawn= true
})
end
end
eventKeyboard= function(player, tecla)
if (tecla== 83 or tecla== 40) then
for i in next, tfm.get.room.playerList do
if (player== i and tfm.get.room.playerList[""..i].isFacingRight) then
for pos, _ in next, players do
if (player== players[pos].nome and players[pos].spawn) then
tfm.exec.addShamanObject(17, tfm.get.room.playerList[""..i].x + 5, tfm.get.room.playerList[""..i].y + 5, 100, 30, 30, false)
players[pos].spawn= false
end
end
elseif (player== i) then
for pos, _ in next, players do
if (player== players[pos].nome and players[pos].spawn) then
tfm.exec.addShamanObject(17, tfm.get.room.playerList[""..i].x + 5, tfm.get.room.playerList[""..i].y + 5, 260, 30, 30, false)
players[pos].spawn= false
end
end
end
end
end
end
eventNewPlayer= function() cn() end
eventPlayerLeft= function(player)
for pos, _ in next, players do
if (players[pos].nome== player) then
table.remove(players, pos)
end
end
end
eventLoop= function()
for pos, _ in next, players do
players[pos].count= players[pos].count + 500
if (players[pos].count>= 1000) then
players[pos].count= 0
players[pos].spawn= true
end
end
end
cn()


Quando fiz esse script ainda estava apredendo, então meu códigos eram todos bagunçados. Às vezes nem entendo direito os antigos kkk

Dernière modification le 1603804080000
Rambreout
« Citoyen »
1603821180000
    • Rambreout#8657
    • Profil
    • Derniers messages
    • Tribu
#2545
  0
manito jp_darkus eu achei top o script, ta tudo mt foda, só um problema que o cn parece estar com um deley, e isso tbm no sei arrumar ;-; eu sei tipo o basico, virar o item, ajustar forçã. ond spawna, essas coisas mais simples :/ pode resolver esse deley pra mim manito? ^^" agradeço desde ja ;-;-b
Jp_darkuss
« Citoyen »
1603822020000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2546
  0
Rambreout a dit :
manito jp_darkus eu achei top o script, ta tudo mt foda, só um problema que o cn parece estar com um deley, e isso tbm no sei arrumar ;-; eu sei tipo o basico, virar o item, ajustar forçã. ond spawna, essas coisas mais simples :/ pode resolver esse deley pra mim manito? ^^" agradeço desde ja ;-;-b

É que no script original eu pus um delay devido ao pedido de um outro player. Agora estou ocupado, mas mais tarde eu tiro o delay.

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
local players= {}
local cn= function()
for i in next, tfm.get.room.playerList do
system.bindKeyboard(i, 83, false, true)
system.bindKeyboard(i, 40, false, true)
table.insert(players, {
nome= i
})
end
end
eventKeyboard= function(player, tecla)
if (tecla== 83 or tecla== 40) then
for i in next, tfm.get.room.playerList do
if (player== i and tfm.get.room.playerList[""..i].isFacingRight) then
for pos, _ in next, players do
if (player== players[pos].nome) then
tfm.exec.addShamanObject(17, tfm.get.room.playerList[""..i].x + 5, tfm.get.room.playerList[""..i].y + 5, 100, 30, 30, false)
players[pos].spawn= false
end
end
elseif (player== i) then
for pos, _ in next, players do
if (player== players[pos].nome) then
tfm.exec.addShamanObject(17, tfm.get.room.playerList[""..i].x + 5, tfm.get.room.playerList[""..i].y + 5, 260, 30, 30, false)
players[pos].spawn= false
end
end
end
end
end
end
eventNewPlayer= function() cn() end
eventPlayerLeft= function(player)
for pos, _ in next, players do
if (players[pos].nome== player) then
table.remove(players, pos)
end
end
end
cn()

Dernière modification le 1603833120000
Rambreout
« Citoyen »
1603843440000
    • Rambreout#8657
    • Profil
    • Derniers messages
    • Tribu
#2547
  0
manito, eu digo o deley em relação a: apertei o botão, e o dn demora pra nascer,essa demora no temos no deathmatch, pode tentar por o tempo de spawn em relação a ativação do botão um pouco mais rapido? vc tirou o deley no qual é permitido spawnar cn dnv ;-; a negada fez a zona kkkkkkkkkkk

vou explicar direitinho meu pedido, pra ver se facilita ksksksk

seguinte

-quanto apertar para baixo, ou apertar "s"(q eh a tecla para baixo de quem joga pelas letras), disparar um cn em baixo do rato, assim que apertar nascer o cn, com deley de 1s para poder atirar dnv,uma cn reta, para o lado que o rato estiver virado
se possivel, qnd começar o mapa ter a contagem no meio da tela, ou no chat,3, 2, 1, fihgt
espero q eu tenho explicado de um jeito entendivel kkkkkk
e espero q n esteja dando mt trabalho pra ti manito jp ;u;
Jp_darkuss
« Citoyen »
1603848480000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2548
  0
Rambreout a dit :
manito, eu digo o deley em relação a: apertei o botão, e o dn demora pra nascer,essa demora no temos no deathmatch, pode tentar por o tempo de spawn em relação a ativação do botão um pouco mais rapido? vc tirou o deley no qual é permitido spawnar cn dnv ;-; a negada fez a zona kkkkkkkkkkk

vou explicar direitinho meu pedido, pra ver se facilita ksksksk

seguinte

-quanto apertar para baixo, ou apertar "s"(q eh a tecla para baixo de quem joga pelas letras), disparar um cn em baixo do rato, assim que apertar nascer o cn, com deley de 1s para poder atirar dnv,uma cn reta, para o lado que o rato estiver virado
se possivel, qnd começar o mapa ter a contagem no meio da tela, ou no chat,3, 2, 1, fihgt
espero q eu tenho explicado de um jeito entendivel kkkkkk
e espero q n esteja dando mt trabalho pra ti manito jp ;u;

Esse tipo de delay é do servidor. E não dá pra tirar.
Rambreout
« Citoyen »
1603856340000
    • Rambreout#8657
    • Profil
    • Derniers messages
    • Tribu
#2549
  0
entendi, obrigado jp, tu é top <3 ja deu mó ajuda quanto a isso mano
Rambreout
« Citoyen »
1603857720000
    • Rambreout#8657
    • Profil
    • Derniers messages
    • Tribu
#2550
  0
um script pra quando apertar "p" spawnar uma caixa de abobora ;u;
Jp_darkuss
« Citoyen »
1604094120000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2551
  0
Rambreout a dit :
um script pra quando apertar "p" spawnar uma caixa de abobora ;u;

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local _, adm= pcall(nil)
eventKeyboard= function(player)
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
tfm.exec.addShamanObject(204, x + 70, y - 50)
else
tfm.exec.addShamanObject(204, x - 70, y - 50)
end
end
do
adm= adm:match("(.-)%.")
system.bindKeyboard(adm, 80, false, true)
end

A caixa irá spawnar na direção que você estiver olhando.
Rambreout
« Citoyen »
1604115840000
    • Rambreout#8657
    • Profil
    • Derniers messages
    • Tribu
#2552
  0
obrigado jp :/ tem algum lugar ond eu olhe, que tem o ID desses itens de skins da loja? :/ pesquisei e no achei, se puder ajudar

(depois eu apago a msg pa n bagunçar o tópico)
Rambreout
« Citoyen »
1604116080000
    • Rambreout#8657
    • Profil
    • Derniers messages
    • Tribu
#2553
  0
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

Dernière modification le 1604123820000
Jp_darkuss
« Citoyen »
1604193240000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2554
  0
Rambreout a dit :
obrigado jp :/ tem algum lugar ond eu olhe, que tem o ID desses itens de skins da loja? :/ pesquisei e no achei, se puder ajudar

(depois eu apago a msg pa n bagunçar o tópico)

Module FAQ

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

Se tiver tempo hoje eu faço, se não faço amanhã.
Jp_darkuss
« Citoyen »
1604276940000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2555
  0
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
62
63
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(player, 80, false, true)
end
eventChatCommand= function(player, c)
local cmd= {}
for data in c:gmatch("[^%s]+") do
cmd[#cmd + 1]= data
end
if player== adm then
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
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

  • Dernière modification le 1604328000000
    Rambreout
    « Citoyen »
    1604294340000
      • Rambreout#8657
      • Profil
      • Derniers messages
      • Tribu
    #2556
      0
    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 -;
    Jp_darkuss
    « Citoyen »
    1604327820000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2557
      0
    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.

    Dernière modification le 1604328240000
    Jp_darkuss
    « Citoyen »
    1604352900000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2558
      0
    Ah. O problema não foi nem nos comandos. Na linha que dava permissão só tava dando para o adm kkk
    Lewnyx
    « Censeur »
    1604445720000
      • Lewnyx#9435
      • Profil
      • Derniers messages
      • Tribu
    #2559
      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.

    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.
    Joaogamer2_0
    « Citoyen »
    1604446800000
      • Joaogamer2_0#5040
      • Profil
      • Derniers messages
      • Tribu
    #2560
      0
    ola eu qro um script que solte tabuas coloridas se tiver algum ai e puder me passar agradeco
    • Forums
    • /
    • Transformice
    • /
    • Archives
    • /
    • Seção Editor de Mapas e Modules
    • /
    • [Lua] Peça scripts aqui!
    « ‹ 128 / 133 › »
    © Atelier801 2018

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

    Version 1.27