×

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
  • /
  • Modules
  • /
  • Lua Snippets
« ‹ 30 / 33 › »
Lua Snippets
Bloonshack
1452191340000
    • Bloonshack#0000
    • Profil
    • Derniers messages
#581
[Modéré par Lemodile, raison : Double post]
Bloonshack
1452191460000
    • Bloonshack#0000
    • Profil
    • Derniers messages
#582
[Modéré par Shamousey, raison : Don't claim other people's code as your own.]
Yaerou
1454641020000
    • Yaerou#0000
    • Profil
    • Derniers messages
    • Tribu
#583
[Modéré par Shamousey, raison : Please speak English on the EN forums.]
Yaerou
« Citoyen »
1454682660000
    • Yaerou#0000
    • Profil
    • Derniers messages
    • Tribu
#585
  0
you guys know snippets of the ball that the shaman throws
Jimmyng
« Citoyen »
1455458280000
    • Jimmyng#0000
    • Profil
    • Derniers messages
    • Tribu
#588
  0
Why the shaman skills of lua made shams can't be used now? it was fine a version ago.
Pufucreepy
« Citoyen »
1456044060000
    • Pufucreepy#0000
    • Profil
    • Derniers messages
    • Tribu
#589
  0
how can i make the scripts work?I need to put a name or not?

for name,player in pairs(tfm.get.room.playerList) do
system.bindMouse(name, true)
end

function eventMouse(name, x, y)
tfm.exec.movePlayer(name, x, y, false, 0, 1, false)
end
Tat
« Censeur »
1456224480000
    • Tat#0095
    • Profil
    • Derniers messages
    • Tribu
#590
  0
pufucreepy a dit :
how can i make the scripts work?I need to put a name or not?

for name,player in pairs(tfm.get.room.playerList) do
system.bindMouse(name, true)
end

function eventMouse(name, x, y)
tfm.exec.movePlayer(name, x, y, false, 0, 1, false)
end

Nope, you do not have to put a name. Just load the script by doing the following:
Shamousey a dit :
How do I run a script?

In order to execute your own script, you need to fit a couple of requirements; be in your tribe house, have the appropriate permissions to use the "/np" command, have over 1,000 cheese, and never be banned for hacking.

You can then type the command "/lua" and a window will pop up with an area to type in or paste code. Pressing the "Submit" button will launch the script in your room

http://i.imgur.com/fRFAxZo.png

and when you click on anywhere on the map, you move to that place. Have fun! ^^
Sunflowers
« Censeur »
1456225200000
    • Sunflowers#3568
    • Profil
    • Derniers messages
#591
  0
Dear peoples. If you may use them on public rooms you can be reported..
Tat
« Censeur »
1456230900000
    • Tat#0095
    • Profil
    • Derniers messages
    • Tribu
#592
  0
skittlesuni a dit :
Dear peoples. If you may use them on public rooms you can be reported..

If I'm not mistaken only Lua members are able to use Lua in public rooms, public players cannot load lua scripts in public rooms, so reporting is pretty much redundant.
Error_404
« Consul »
1456247220000
    • Error_404#0000
    • Profil
    • Derniers messages
#593
  0
yeah why not report Shamo
ow o
Ratrollerz
« Citoyen »
1461844380000
    • Ratrollerz#0000
    • Profil
    • Derniers messages
    • Tribu
#594
  0
can someone help me?
well...
i need a script that...
ders 3 grounds,
the 2nd ground has 10 mice, the other's are lesser than 10
then the 2nd ground disappears,
3 mice left wins
and no respawns
Drgenius
« Citoyen »
1461895260000
    • Drgenius#0000
    • Profil
    • Derniers messages
    • Tribu
#595
  0
ratrollerz a dit :
can someone help me?
well...
i need a script that...
ders 3 grounds,
the 2nd ground has 10 mice, the other's are lesser than 10
then the 2nd ground disappears,
3 mice left wins
and no respawns

Your post is unclear, but I'd suggest this topic for script requests.
V_i_p
« Citoyen »
1463842800000
    • V_i_p#4704
    • Profil
    • Derniers messages
#596
  0
how can kick player?
Shamousey
« Consul »
1463845320000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#597
  0
ahmed12akaa a dit :
how can kick player?

You can't use Lua to kick a player from a room.
Sunflowers
« Censeur »
1463848260000
    • Sunflowers#3568
    • Profil
    • Derniers messages
#598
  0
How you can "ban" a player?
Onkei
« Citoyen »
1463850780000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#599
  0
skittlesuni a dit :
How you can "ban" a player?

You can't kick players out of your tribe house, but you can give them a black-screen. Here's a simple example;

a dit :
local admin = {Onkei = true, Skittlesuni = true}
local banned = {Etho = true}

function main()
for n in pairs(tfm.get.room.playerList) do
eventNewPlayer(n)
end
end

function eventNewPlayer(n)
if banned[n] then
ui.addTextArea(1, "", n, -2500, -2500, 5000, 5000, 0x0A0A0A, 0x0A0A0A, 1, true)
end
end

-- !ban name / !unban name
function eventChatCommand(n, cmd)
local arg = {}
for args in cmd:gmatch("[^%s]+") do
table.insert(arg, args:lower())
end
if admin[n] then
if arg[1] == "ban" and arg[2] then
local pn = arg[2]
banned[pn] = true
eventNewPlayer(pn)
elseif arg[1] == "unban" and arg[2] then
local pn = arg[2]
banned[pn] = false
ui.removeTextArea(1, pn)
end
end
end

main()

Pydlua
« Citoyen »
1464326280000
    • Pydlua#0000
    • Profil
    • Derniers messages
#600
  0


--[[Just hide the display using textarea.]]--

--[[ Sorry, I'm more familiar with C and that Python language, so I prefer a tabstop equal to 4
space
]]--

admin="your_name"
target="your_doll"


-- command list (!sdisp to hide your doll game display, usdisp to unhide your doll game display
-- Note: it's not hiding the chat interface
ban_shut_display = "sdisp"
unban_shut_display = "usdisp"

function eventChatCommand(admin, ban_shut_display)
ui.addTextArea(1,"",target,-400,0,2000,2000,000000,0x212F36,1,true)
if ban_shut_display == unban_shut_display then
ui.addTextArea(1,"",target,-400,0,2000,2000,000000,0x212F36,0,true)
end
end



Just a simple go to lua hide display script.

(hope this game support Perl someday, if this game still exist).


and a cruel snippet to kill player non-stop


target="your_doll"
function eventPlayerRespawn(target)
tfm.exec.killPlayer(target)
end


If you want above worked, you must kill the player first, by executing tfm.killPlayer(target) first.

Idea is credited to Mousetat.
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Lua Snippets
« ‹ 30 / 33 › »
© Atelier801 2018

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

Version 1.27