×

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!
« ‹ 130 / 133 › »
[Lua] Peça scripts aqui!
Lekow
« Citoyen »
1605710460000
    • Lekow#2550
    • Profil
    • Derniers messages
    • Tribu
#2581
  1
algm pode me ajudar

tfm.exec.disableAutoShaman(true)tfm.exec.newGame([[<C><P C="" MEDATA=";0,1;;;-0;0:::1-"/><Z><S><S T="13" X="420" Y="244" L="102" P="0,0,0,0.2,0,0,0,0" o="FFFFFF"/><S T="13" X="421" Y="267" L="108" P="0,0,0.3,0.2,0,0,0,0" o="000000"/></S><D><DS X="424" Y="136"/></D><O/><L/></Z></C>]]);

function eventChatCommand(player, command)
if (command == 'r') then
tfm.exec.respawnPlayer(player)
end
end

function eventChatCommand(player, command)
if (command == 's') then
tfm.exec.setShaman(player)
end
end

a fazer os dois comandos fucionar? so o de baixo fuciona :(
Jp_darkuss
« Citoyen »
1605900240000
    • Jp_darkuss#4806
    • Profil
    • Derniers messages
#2582
  0
Yhiita a dit :
nao, teria uma textarea em tal x y, ai vc clicou e teleportaria pra outra x y do mapa

Script

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
local _, adm= pcall(nil)
local allowed= {}
local ids= {}
local getId= function()
local id
for pos= 1, 100 do
if not ids[pos] then
ids[pos]= true
id= pos
break
end
end
return id
end
eventTextAreaCallback= function(_, player, event)
if allowed[player] then
local x= tonumber(event:match("(%d+), %d+"))
local y= tonumber(event:match("%d+, (%d+)"))
tfm.exec.movePlayer(player, x, y)
end
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
allowed[cmd[2]]= true
elseif cmd[1]=="disallow" then
allowed[cmd[2]]= false
end
end
if allowed[player] then
if cmd[1]=="add" then
local x= tonumber(cmd[2])
local y= tonumber(cmd[3])
local id= getId()
if id then
ui.addTextArea(id, "<a href='event:tp("..x..", "..y..")'><font color='#000000'>"..id.."</font></a>", nil, x, y, 13, 15, 0x66DD66, 0x33CC33)
end
elseif cmd[1]=="remove" then
local id= tonumber(cmd[2])
ui.removeTextArea(id)
ids[id]= false
end
end
end
do
adm= adm:match("(.-)%.")
allowed[adm]= true
system.disableChatCommandDisplay()
end


Aí, foi o que entendi.

  • !allow nome - dá permissão à alguém para teleportar e criar tokens de teleporte
  • !disallow nome - tira a permissão à alguém para teleportar e criar tokens de teleporte
  • !add x y - adiciona um token de teleporte na posição x e y
  • !remove id - remove um token através do seu id (o número escrito nele)

    Lekow a dit :
    algm pode me ajudar


    tfm.exec.disableAutoShaman(true)tfm.exec.newGame([[<C><P C="" MEDATA=";0,1;;;-0;0:::1-"/><Z><S><S T="13" X="420" Y="244" L="102" P="0,0,0,0.2,0,0,0,0" o="FFFFFF"/><S T="13" X="421" Y="267" L="108" P="0,0,0.3,0.2,0,0,0,0" o="000000"/></S><D><DS X="424" Y="136"/></D><O/><L/></Z></C>]]);

    function eventChatCommand(player, command)
    if (command == 'r') then
    tfm.exec.respawnPlayer(player)
    end
    end

    function eventChatCommand(player, command)
    if (command == 's') then
    tfm.exec.setShaman(player)
    end
    end


    a fazer os dois comandos fucionar? so o de baixo fuciona :(

    Code Lua

    1
    2
    3
    4
    5
    6
    7
    8
    9
    tfm.exec.disableAutoShaman(true)
    tfm.exec.newGame([[<C><P C="" MEDATA=";0,1;;;-0;0:::1-"/><Z><S><S T="13" X="420" Y="244" L="102" P="0,0,0,0.2,0,0,0,0" o="FFFFFF"/><S T="13" X="421" Y="267" L="108" P="0,0,0.3,0.2,0,0,0,0" o="000000"/></S><D><DS X="424" Y="136"/></D><O/><L/></Z></C>]]);
    function eventChatCommand(player, command)
    if (command == 'r') then
    tfm.exec.respawnPlayer(player)
    elseif (command == 's') then
    tfm.exec.setShaman(player)
    end
    end

  • Dernière modification le 1607468520000
    Sklag
    « Citoyen »
    1605905880000
      • Sklag#2552
      • Profil
      • Derniers messages
      • Tribu
    #2583
      0
    script q alguem aleatorio vira vampiro
    Jp_darkuss
    « Citoyen »
    1606003860000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2584
      0
    Sklag a dit :
    script q alguem aleatorio vira vampiro

    A cada x segundos com reiniciação ou só uma vez?
    Ratalinda99
    « Citoyen »
    1606085220000
      • Ratalinda99#0000
      • Profil
      • Derniers messages
      • Tribu
    #2585
      0
    podem criar um script tipo assim: se alguém morrer todos morrem

    tchauzinho ^^
    Jp_darkuss
    « Citoyen »
    1606131600000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2586
      0
    Ratalinda99 a dit :
    podem criar um script tipo assim: se alguém morrer todos morrem

    tchauzinho ^^

    Code Lua

    1
    2
    3
    eventPlayerDied= function()
    table.foreach(tfm.get.room.playerList, tfm.exec.killPlayer)
    end

    Cuidado, é possível de que se o respawn for muito rápido, os players fiquem morrendo infinitamente.
    Juyhjuyh
    1606142340000
      • Juyhjuyh#8284
      • Profil
      • Derniers messages
    #2587
    [Modéré par Ork, raison : Spam.]
    Lekow
    « Citoyen »
    1606407000000
      • Lekow#2550
      • Profil
      • Derniers messages
      • Tribu
    #2588
      1
    vlw darkinho
    +Pluuuuuf
    « Citoyen »
    1606574820000
      • +Pluuuuuf#0000
      • Profil
      • Derniers messages
    #2589
      0
    Alguém tem script ant-macro que congela o rato ??

    Dernière modification le 1606575060000
    Lekow
    « Citoyen »
    1606927620000
      • Lekow#2550
      • Profil
      • Derniers messages
      • Tribu
    #2590
      0
    darkzinho posso te pedir so mais 1 scriptzinho pequeneninho porfavozinho?
    +Pluuuuuf
    « Citoyen »
    1606944060000
      • +Pluuuuuf#0000
      • Profil
      • Derniers messages
    #2591
      0
    Alguém consegue fazer um script de sorteio de números de 1 a 100 ??
    Dariousda2
    « Citoyen »
    1606953180000
      • Dariousda2#6219
      • Profil
      • Derniers messages
      • Tribu
    #2592
      0
    tem algum script para que a pessoa que eu por o nome virar shaman?
    Pix
    1606958580000
      • Pix#0399
      • Profil
      • Derniers messages
      • Tribu
    #2593
    [Modéré par Ork, raison : Spam.]
    Jp_darkuss
    « Citoyen »
    1607090700000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2594
      0
    Lekow a dit :
    darkzinho posso te pedir so mais 1 scriptzinho pequeneninho porfavozinho?

    Sim, quanto aos outros acho que à tarde estou disponível para fazer.
    Jp_darkuss
    « Citoyen »
    1607122080000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2595
      0
    +Pluuuuuf a dit :
    Alguém consegue fazer um script de sorteio de números de 1 a 100 ??

    Code Lua

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    local _, adm= pcall(nil)
    eventTextAreaCallback= function(_, _, event)
    if event=="sort" then
    local number= math.random(1, 100)
    ui.updateTextArea(1, "<font size='18'><p align='center'>Número sorteado: "..number.."</p></font>")
    end
    end
    do
    adm= adm:match("(.-)%.")
    ui.addTextArea(0, "<a href='event:sort'>Sortear</a>", adm, 20, 370, nil, nil, nil, nil, 1, true)
    ui.addTextArea(1, "<font size='18'><p align='center'>Número sorteado: **</p></font>", nil, 250, 30, 300, nil, nil, nil, 0.8, true)
    end

    Dariousda2 a dit :
    tem algum script para que a pessoa que eu por o nome virar shaman?

    Script

    Code Lua

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    local _, adm= pcall(nil)
    local shaman
    eventPopupAnswer= function(_, _, answer)
    tfm.exec.setShaman(shaman, false)
    shaman= answer
    tfm.exec.setShaman(shaman)
    end
    eventTextAreaCallback= function(_, _, event)
    if event=="shaman" then
    ui.addPopup(0, 2, "<p align='center'>Digite o nome do shaman: </p>", adm, 300, 100, 200)
    end
    end
    do
    adm= adm:match("(.-)%.")
    ui.addTextArea(0, "<a href='event:shaman'>Set Shaman</a>", adm, 20, 370, nil, nil, nil, nil, 1, true)
    tfm.exec.disableAutoShaman()
    end
    +Pluuuuuf
    « Citoyen »
    1607171040000
      • +Pluuuuuf#0000
      • Profil
      • Derniers messages
    #2596
      0
    Jp_darkuss a dit :
    +Pluuuuuf a dit :
    Alguém consegue fazer um script de sorteio de números de 1 a 100 ??

    Code Lua

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    local _, adm= pcall(nil)
    eventTextAreaCallback= function(_, _, event)

    Valeu mano
    if event=="sort" then
    local number= math.random(1, 100)
    ui.updateTextArea(1, "<font size='18'><p align='center'>Número sorteado: "..number.."</p></font>")
    end
    end
    do
    adm= adm:match("(.-)%.")
    ui.addTextArea(0, "<a href='event:sort'>Sortear</a>", adm, 20, 370, nil, nil, nil, nil, 1, true)
    ui.addTextArea(1, "<font size='18'><p align='center'>Número sorteado: **</p></font>", nil, 250, 30, 300, nil, nil, nil, 0.8, true)
    end

    Dariousda2 a dit :
    tem algum script para que a pessoa que eu por o nome virar shaman?

    Script

    Code Lua

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    local _, adm= pcall(nil)
    local shaman
    eventPopupAnswer= function(_, _, answer)
    tfm.exec.setShaman(shaman, false)
    shaman= answer
    tfm.exec.setShaman(shaman)
    end
    eventTextAreaCallback= function(_, _, event)
    if event=="shaman" then
    ui.addPopup(0, 2, "<p align='center'>Digite o nome do shaman: </p>", adm, 300, 100, 200)
    end
    end
    do
    adm= adm:match("(.-)%.")
    ui.addTextArea(0, "<a href='event:shaman'>Set Shaman</a>", adm, 20, 370, nil, nil, nil, nil, 1, true)
    tfm.exec.disableAutoShaman()
    end
    +Pluuuuuf
    « Citoyen »
    1607171100000
      • +Pluuuuuf#0000
      • Profil
      • Derniers messages
    #2597
      0
    vlw man. Como eu faço pra fazer rodar uns 10 números antes do número final ?? pra n fica tão instantâneo tlgd

    Dernière modification le 1607203320000
    Jp_darkuss
    « Citoyen »
    1607218440000
      • Jp_darkuss#4806
      • Profil
      • Derniers messages
    #2598
      0
    +Pluuuuuf a dit :
    vlw man. Como eu faço pra fazer rodar uns 10 números antes do número final ?? pra n fica tão instantâneo tlgd

    Script melhorado.

    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
    local _, adm= pcall(nil)
    local sort= false
    local count= 0
    local times= 0
    eventLoop= function()
    if sort then
    count= count + 500
    if count== 1000 then
    local number= math.random(1, 100)
    local particles= {0, 1, 2, 9, 4}
    ui.updateTextArea(1, "<font size='18'><p align='center'>Número sorteado: "..number.."</p></font>")
    for k= 1, 100 do
    tfm.exec.displayParticle(particles[math.random(1, #particles)], math.random(250, 550), math.random(20, 50), 0, math.random(1, 2))
    end
    count= 0
    times= times + 1
    if times== 10 then
    ui.updateTextArea(1, "<font size='18'><p align='center'>Número sorteado: <font color='#66DD66'>"..number.."</font></p></font>")
    times= 0
    sort= false
    end
    end
    end
    end
    eventTextAreaCallback= function(_, _, event)
    if event=="sort" then
    sort= true
    end
    end
    do
    adm= adm:match("(.-)%.")
    ui.addTextArea(0, "<a href='event:sort'>Sortear</a>", adm, 20, 370, nil, nil, nil, nil, 1, true)
    ui.addTextArea(1, "<font size='18'><p align='center'>Número sorteado: **</p></font>", nil, 250, 30, 300, nil, nil, nil, 0.8, true)
    end
    +Pluuuuuf
    « Citoyen »
    1607264100000
      • +Pluuuuuf#0000
      • Profil
      • Derniers messages
    #2599
      1
    Muito Obg man
    Lekow
    « Citoyen »
    1607442900000
      • Lekow#2550
      • Profil
      • Derniers messages
      • Tribu
    #2600
      0
    Jp_darkuss a dit :
    Lekow a dit :
    darkzinho posso te pedir so mais 1 scriptzinho pequeneninho porfavozinho?

    Sim, quanto aos outros acho que à tarde estou disponível para fazer.

    se tem como melhorar aquele script de sorteio?
    • Forums
    • /
    • Transformice
    • /
    • Archives
    • /
    • Seção Editor de Mapas e Modules
    • /
    • [Lua] Peça scripts aqui!
    « ‹ 130 / 133 › »
    © Atelier801 2018

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

    Version 1.27