×

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
« ‹ 10 / 33 › »
Lua Snippets
Kirilkiril
« Citoyen »
1380454260000
    • Kirilkiril#0000
    • Profil
    • Derniers messages
#181
  0
Teleport a dit :
function eventNewPlayer(name)
tfm.exec.bindKeyboard(name,32,true,true)
end

for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

function eventKeyboard(name,key,down,x,y)
if key==32 then
tfm.exec.movePlayer(name,0,0,true,0,-50,false)
end
end

I don't get it it's the teleport script but what button should i press to teleport?
Tailtong
« Citoyen »
1380454260000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#182
  0
space since its id is 32
Kirilkiril
« Citoyen »
1380454500000
    • Kirilkiril#0000
    • Profil
    • Derniers messages
#183
  0
Tailtong a dit :
space since its id is 32

Im pressing space,but it just flies.
Tailtong
« Citoyen »
1380454500000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#184
  0
because
function eventKeyboard(name,key,down,x,y)
if key==32 then
tfm.exec.movePlayer(name,0,0,true,0,-50,false)
end
end
is a flying script
Kirilkiril
« Citoyen »
1380454620000
    • Kirilkiril#0000
    • Profil
    • Derniers messages
#185
  0
Tailtong a dit :
because
function eventKeyboard(name,key,down,x,y)
if key==32 then
tfm.exec.movePlayer(name,0,0,true,0,-50,false)
end
end
is a flying script

here it says that it'sa telepor scrpit http://lua.zz.mu/English%20Scripts/Teleport.lua

lua.zz.mu

If it isn't,then is there a teleport script?
Tailtong
« Citoyen »
1380454740000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#186
  0
for p,player in pairs(tfm.get.room.playerList) do
system.bindMouse(p,true)
end
function eventMouse(p,x,y)
tfm.exec.movePlayer(p,x,y)
end

©epicshawty
Kirilkiril
« Citoyen »
1380454740000
    • Kirilkiril#0000
    • Profil
    • Derniers messages
#187
  0
Tailtong a dit :
for p,player in pairs(tfm.get.room.playerList) do
system.bindMouse(p,true)
end
function eventMouse(p,x,y)
tfm.exec.movePlayer(p,x,y)
end

©epicshawty

on what button?
Tailtong
« Citoyen »
1380454740000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#188
  0
mouse click
Kirilkiril
« Citoyen »
1380454860000
    • Kirilkiril#0000
    • Profil
    • Derniers messages
#189
  0
Tailtong a dit :
mouse click

Thanks!
Bengalstar
« Citoyen »
1380455280000
    • Bengalstar#0000
    • Profil
    • Derniers messages
#190
  0
I was playing around with the script and I'm not sure if this would change the color of one's name

function eventChatCommand(name,command)
if command=="color" then
tfm.exec.setNameColor("Bengalstar", 0x6152BC) --Makes a player colored if !color
end
end


also I can't use tab here for the first end so you might want to get rid of the space bars and use tab.
also replace my name with yours and for the color you choose whichever one you want as long as you don't get rid of the "0x" thing I believe (or can you get rid of it?)
Tailtong
« Citoyen »
1380455280000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#191
  0
don't use an elseif, use an if
Bengalstar
« Citoyen »
1380455400000
    • Bengalstar#0000
    • Profil
    • Derniers messages
#192
  0
Tailtong a dit :
don't use an elseif, use an if

ok ty
Beachking
« Citoyen »
1380455520000
    • Beachking#0000
    • Profil
    • Derniers messages
    • Tribu
#193
  0
Kirilkiril a dit :
on what button?

You can also do it as a command if your making a game like that.

a dit :
function eventChatCommand(playerName, command)
if command == 'move' then
tfm.exec.movePlayer(playerName,x,y,0,0,0,0)
end
end

 
Abdeltif
« Citoyen »
1380456060000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#194
  0
haha look at this
a dit :
for name,player in pairs(tfm.get.room.playerList) do
system.bindMouse(name, true)
end
function eventMouse(playerName, x, y)
tfm.exec.explosion(x, y, -20, 200, false)
end

Anti spirit with shaman range work for all , i don't know how are u gonna make it for shaman only but try to click near you
Beachking
« Citoyen »
1380456660000
    • Beachking#0000
    • Profil
    • Derniers messages
    • Tribu
#195
  0
a dit :
function eventKeyboard(name,key,down,x,y)
if key==40 then
tfm.exec.movePlayer(name,xpos,ypos,false,A,B,true)
end
end

-- A= # = Number move to right
-- -A/-# = Left
-- B= # = Move down
-- -B/-#= Move up

-- A is xspeed
-- B is yspeed

Example:

function eventNewPlayer(name)
tfm.exec.bindKeyboard(name,40,true,true)
end

for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

function eventKeyboard(name,key,down,x,y)
if key==40 then
tfm.exec.movePlayer(name,10,360,false,0,-80,true)
end
end

-- Key 40 = Down

 
Tini
« Sénateur »
1380456660000
    • Tini#0095
    • Profil
    • Derniers messages
    • Tribu
#196
  0
Thank you, Beach pr0

♥
Bengalstar
« Citoyen »
1380456780000
    • Bengalstar#0000
    • Profil
    • Derniers messages
#197
  0
here's a command to become a shampire

function eventChatCommand(name,command)
if command=="shampire" then
tfm.exec.setShaman(name)
tfm.exec.setVampirePlayer(name)
end
end
Beachking
« Citoyen »
1380456960000
    • Beachking#0000
    • Profil
    • Derniers messages
    • Tribu
#198
  0
Bengalstar a dit :
here's a command to become a shampire

function eventChatCommand(name,command)
if command=="shampire" then
tfm.exec.setShaman(name)
tfm.exec.setVampirePlayer(name)
end

It's on first page if you didn't know.
Papero
« Citoyen »
1380456960000
    • Papero#9240
    • Profil
    • Derniers messages
    • Tribu
#199
  0
Bengalstar a dit :
here's a command to become a shampire

function eventChatCommand(name,command)
if command=="shampire" then
tfm.exec.setShaman(name)
tfm.exec.setVampirePlayer(name)
end

you're missing an end
Bengalstar
« Citoyen »
1380456960000
    • Bengalstar#0000
    • Profil
    • Derniers messages
#200
  0
Beachking a dit :
It's on first page if you didn't know.

I made it a command lol
Paperonaruto a dit :
you're missing and end

oops shall fix

it worked just fine with 1 end at my tribe house
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Lua Snippets
« ‹ 10 / 33 › »
© Atelier801 2018

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

Version 1.27