×

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
« ‹ 6 / 33 › »
Lua Snippets
Zutto
« Citoyen »
1380319080000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#101
  0
I have the !help window but the commands don't work whit that
Lilyblol
« Citoyen »
1380320340000
    • Lilyblol#4443
    • Profil
    • Derniers messages
    • Tribu
#102
  0
How do I turn off /lua?
Tailtong
« Citoyen »
1380320340000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#103
  0
Lilyblol a dit :
How do I turn off /lua?

/module stop
Zutto
« Citoyen »
1380320340000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#104
  0
Lilyblol a dit :
How do I turn off /lua?

system.exit()
Lilyblol
« Citoyen »
1380320340000
    • Lilyblol#4443
    • Profil
    • Derniers messages
    • Tribu
#105
  0
Tailtong a dit :
/module stop

I meant so the names turn back to normal too

e: nvm, you just reset the tribe house code in tribe menu
Moesappel
« Citoyen »
1380358620000
    • Moesappel#0000
    • Profil
    • Derniers messages
    • Tribu
#106
  0
How to make a popup when a player joins te room , i dont get it
Zutto
« Citoyen »
1380358740000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#107
  0
Can someone help me??

function eventChatCommand (playerName, message)
if message == "comandos" then
ui.addPopup (9, 0, "<J><font color='#009D9D' size='15'><b>Comandos:</b> <b>!meep</b> - Activas el meep para ti. <b>!sham</b> - Te conviertes en chamán. <b>!vamp</b> - Te conviertes en vampiro. <b>!death</b> - Mueres. <b>!snow</b> - Empieza a nevar.", player, -100, 100, 200)
end
end

It don't work :c

When you say !comandos, that text, but don't work :C
Tailtong
« Citoyen »
1380358860000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#108
  0
Moesappel a dit :
How to make a popup when a player joins te room , i dont get it

eventNewPlayer(name)
ui.addPopup(yourpopupIDhere, 0, "Welcome, ".. (name).. "!", (name), yourXhere, yourYhere, yourWidthHere)
end
Moesappel
« Citoyen »
1380359280000
    • Moesappel#0000
    • Profil
    • Derniers messages
    • Tribu
#109
  0
Aritxy a dit :
Can someone help me??

function eventChatCommand (playerName, message)
if message == "comandos" then
ui.addPopup (9, 0, "<J><font color='#009D9D' size='15'><b>Comandos:</b> <b>!meep</b> - Activas el meep para ti. <b>!sham</b> - Te conviertes en chamán. <b>!vamp</b> - Te conviertes en vampiro. <b>!death</b> - Mueres. <b>!snow</b> - Empieza a nevar.", player, -100, 100, 200)
end
end
It don't work :c

When you say !comandos, that text, but don't work :C

Code is working fine here

http://prntscr.com/1txqlu
Cincle
« Citoyen »
1380361200000
    • Cincle#0000
    • Profil
    • Derniers messages
    • Tribu
#110
  0
The command script is not working for me :C
Jufaster
« Citoyen »
1380361200000
    • Jufaster#0000
    • Profil
    • Derniers messages
#111
  0
How to make FFA? :P

Thanks Cincle ^^
Cincle
« Citoyen »
1380361320000
    • Cincle#0000
    • Profil
    • Derniers messages
    • Tribu
#112
  0
Jufaster a dit :
How to make FFA? :P

You should copy this ^^:
mouse=function(name,x,y)
player=tfm.get.room.playerList[name]
local angle=math.atan2(y-player.y,x-player.x)
tfm.exec.addShamanObject(26,player.x,player.y-20,math.deg(angle),math.cos(angle)*40,math.sin(angle)*40)
end

function eventNewPlayer(name)
for i,key in ipairs({83,40,69}) do
tfm.exec.bindKeyboard(name,key,true,true)
end
end

function eventKeyboard(name,key,down,x,y)
if key==83 or key==40 or key==69 then
player=tfm.get.room.playerList[name]
local angle=math.atan2(y-player.y,x-player.x)
tfm.exec.addShamanObject(19,player.x,player.y-20,math.deg(angle),math.cos(angle)*40,math.sin(angle)*40)
end
end

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

tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoShaman(true)
tfm.exec.newGame(10)
function eventPlayerDied(name) tfm.exec.respawnPlayer(name) end
Moesappel
« Citoyen »
1380361800000
    • Moesappel#0000
    • Profil
    • Derniers messages
    • Tribu
#113
  0
is it possible to make a code like this make for only the player who typed the command?
a dit :

function eventChatCommand (playerName, message)
elseif message == "info" then
ui.addPopup (10, 3, "<J><font color='#009D9D' size='14'><b>Info:</b><br><b>Flying</b> - You can fly by pressing [SPACE] and turn it off/on whit !fly<br><br><b>Commands:</b> You can see the commands by typing !commands in chat.", player, 250, 100, 250)
end
end
Shamousey
« Consul »
1380361980000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#114
  0
Firstly, that code isn't valid Moesappel, you start with an elseif without a starting if statement.

a dit :
function eventChatCommand(name,command)
if playerName=="Shamousey" and command=="info" then
print("do stuff")
end
end

 
Moesappel
« Citoyen »
1380362100000
    • Moesappel#0000
    • Profil
    • Derniers messages
    • Tribu
#115
  0
Shamousey a dit :
Firstly, that code isn't valid Moesappel, you start with an elseif without a starting if statement.

 

Its falid it is the 2nd code in the command line: http://prntscr.com/1txwo5 c;

Btw you do print, i add a popup
Kirilkiril
« Citoyen »
1380362220000
    • Kirilkiril#0000
    • Profil
    • Derniers messages
#116
  0
Xxninjazxx a dit :
Updated:
!sham for shaman
!vamp for vampire
!death to die
!snow to make it snow
!meep to get meep
![color] to change name color where color is: black, white, red, orange, yellow, green, blue, or purple

Can u make a command for revive player

and

Fly command?
Ethanrockz
« Citoyen »
1380362340000
    • Ethanrockz#0000
    • Profil
    • Derniers messages
    • Tribu
#117
  0
Kirilkiril a dit :
Can u make a command for revive player

I thought you respawned in tribe houses e.e
Shamousey
« Consul »
1380362340000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#118
  0
Moesappel a dit :
Its falid it is the 2nd code in the command line: http://prntscr.com/1txwo5 c;

Btw you do print, i add a popup

You shouldn't post incomplete code if you're trying to get help with it. And I know that you had a popup there, but you should be smart enough to put it back there, it's just the if statement you wanted.
Tailtong
« Citoyen »
1380362460000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#119
  0
you don't add a space after ==
Shamousey
« Consul »
1380362880000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#120
  0
Tailtong a dit :
you don't add a space after ==

Lua doesn't really care about whitespace. These two lines will work exactly the same:

if 1<2 then print("Woo!") end
if 1 <2 then print ( "Woo!" )end
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Lua Snippets
« ‹ 6 / 33 › »
© Atelier801 2018

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

Version 1.27