×

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
  • /
  • Script Requests
« ‹ 140 / 160 › »
Script Requests
Honorabilis
« Consul »
1520434860000
    • Honorabilis#0000
    • Profil
    • Derniers messages
    • Tribu
#2781
  0
Possitive_yt a dit :
What is all of these lua things? Please tell me im just new.

In game coding language for modules.
Thefrogplayer
« Citoyen »
1520445300000
    • Thefrogplayer#2537
    • Profil
    • Derniers messages
#2782
  0
make a script, the mouse have a sword and can atack others
Honorabilis
« Consul »
1520447880000
    • Honorabilis#0000
    • Profil
    • Derniers messages
    • Tribu
#2783
  0
Vmdsbdhkrgyi a dit :
make a script, the mouse have a sword and can atack others

You cannot add a sword (image) since you aren't a member of the module team.
Overjoy06
« Citoyen »
1520492220000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2784
  0
Is there a script that can add a item (furniture) from the map editor to the map
Bolodefchoco
« Sénateur »
1520527620000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#2785
  0
Overjoy06 a dit :
Is there a script that can add a item (furniture) from the map editor to the map

Yes, but you'll need to reload the map.
You have to edit the XML
Overjoy06
« Citoyen »
1520585520000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2786
  0
How about a script that has a message then when you click it the map changes to another map. But there's a time limit to changing it back to the normal map
Overjoy06
« Citoyen »
1520585640000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2787
  0
Bolodefchoco i meant it will update the text message every 5 seconds, and will end in like 50 seconds
Possitive_yt
« Citoyen »
1520681040000
    • Possitive_yt#0000
    • Profil
    • Derniers messages
#2788
  0
can you change the map every 50 seconds, to other maps (like 20 maps)
Heniyengui
« Citoyen »
1520683920000
    • Heniyengui#0000
    • Profil
    • Derniers messages
#2789
  0
Possitive_yt a dit :
can you change the map every 50 seconds, to other maps (like 20 maps)

Code Lua

1
2
3
4
5
6
7
8
9
maps = { 0 , 1 } -- table of maps

tfm.exec.newGame(maps[math.random(1,#maps)]) -- playing a random map

function eventLoop(currentTime,timeRemaining)
if currentTime >= 50000 then -- if currentTime is more than 50 seconds then
tfm.exec.newGame(maps[math.random(1,#maps)]) -- play a random map
end
end
Muutluerkek
« Citoyen »
1520960700000
    • Muutluerkek#0000
    • Profil
    • Derniers messages
    • Tribu
#2790
  0
help ?
new name system -.-

admins={['Muutluerkek#0000']=1}
bans={}
function eventChatCommand(name,cmd)
local args={}
for arg in cmd:gmatch("%S+") do
table.insert(args,arg)
end
if args[1]=="ban" and admins[name] then
bans[""..args[2]..""]=1
end
end
function eventLoop()
for name in pairs(bans) do
ui.addTextArea(1,""..name.."")
if bans[name] then
tfm.exec.killPlayer(name)
end
end
end

Dernière modification le 1521279180000
Bolodefchoco
« Sénateur »
1520961180000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#2791
  0
Muutluerkek a dit :
help ?

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
local True = true -- Technically faster than setting many true, true, true, true

admins={
['Muutluerkek#0000'] = True
}
bans={}

function eventChatCommand(name,cmd)
local args={}
for arg in cmd:gmatch("%S+") do
-- table.insert does not have a good performance. Do not use it if it is not really necessary
args[#args + 1] = arg
end

if args[1]=="ban" and admins[name] then
if args[2] then
-- BoLODefchocO#0000 = Bolodefchoco#0000
args[2] = args[2]:lower():gsub("%a", string.upper, 1)

-- There must be a player in the room
if tfm.get.room.playerList[args[2]] then
bans[args[2]] = True

-- Black textarea in the screen
ui.addTextArea(1, "", args[2], -1500, -1500, 3000, 3000, 1, 1, 1, true)
-- Kill
tfm.exec.killPlayer(args[2])
end
end
end
end

-- Event loop is not necessary. After a new game / player respawn you can do that and works perfectly.

function eventNewGame()
-- pairs returns "next, table, nil". It does not have a good performance, too.
for name in next, bans do
if bans[name] then
tfm.exec.killPlayer(name)
end
end
end

eventPlayerRespawn = function(name)
if bans[name] then
tfm.exec.killPlayer(name)
end
end

Dernière modification le 1520961240000
Muutluerkek
« Citoyen »
1520965140000
    • Muutluerkek#0000
    • Profil
    • Derniers messages
    • Tribu
#2792
  2
Bolodefchoco a dit :
Muutluerkek a dit :
help ?

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
local True = true -- Technically faster than setting many true, true, true, true

admins={
['Muutluerkek#0000'] = True
}
bans={}

function eventChatCommand(name,cmd)
local args={}
for arg in cmd:gmatch("%S+") do
-- table.insert does not have a good performance. Do not use it if it is not really necessary
args[#args + 1] = arg
end

if args[1]=="ban" and admins[name] then
if args[2] then
-- BoLODefchocO#0000 = Bolodefchoco#0000
args[2] = args[2]:lower():gsub("%a", string.upper, 1)

-- There must be a player in the room
if tfm.get.room.playerList[args[2]] then
bans[args[2]] = True

-- Black textarea in the screen
ui.addTextArea(1, "", args[2], -1500, -1500, 3000, 3000, 1, 1, 1, true)
-- Kill
tfm.exec.killPlayer(args[2])
end
end
end
end

-- Event loop is not necessary. After a new game / player respawn you can do that and works perfectly.

function eventNewGame()
-- pairs returns "next, table, nil". It does not have a good performance, too.
for name in next, bans do
if bans[name] then
tfm.exec.killPlayer(name)
end
end
end

eventPlayerRespawn = function(name)
if bans[name] then
tfm.exec.killPlayer(name)
end
end

:/ new name system bad !


and thanks my friend
Possitive_yt
« Citoyen »
1521021780000
    • Possitive_yt#0000
    • Profil
    • Derniers messages
#2793
  0
Is it possible to make everyone clap at the same time, but the time left is gonna be on like 1:00
Bolodefchoco
« Sénateur »
1521028560000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#2794
  1
Possitive_yt a dit :
Is it possible to make everyone clap at the same time, but the time left is gonna be on like 1:00

Think so...

Code Lua

1
2
3
4
5
eventLoop = function(current, left)
if left <= 60000 then
tfm.exec.playEmote(nil, 5)
end
end
Overjoy06
« Citoyen »
1521108540000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2795
  0
How about when the time is on 5:00 it will change the map then when the time is at 2:00 then it will change the map
Possitive_yt
« Citoyen »
1521109200000
    • Possitive_yt#0000
    • Profil
    • Derniers messages
#2796
  0
How do you add time like 15 minutes?
Possitive_yt
« Citoyen »
1521109260000
    • Possitive_yt#0000
    • Profil
    • Derniers messages
#2797
  0
also how do you disable the "mort" command?
Overjoy06
« Citoyen »
1521110160000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2798
  0
Possitive_yt a dit :
also how do you disable the "mort" command?

Oh you mean this?
Code Lua

1
tfm.exec.disableMortCommand(true)
Overjoy06
« Citoyen »
1521110220000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2799
  0
Read this, there's a lot of things to catch up on.

Documentation
Bolodefchoco
« Sénateur »
1521122640000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#2800
  0
Overjoy06 a dit :
How about when the time is on 5:00 it will change the map then when the time is at 2:00 then it will change the map

wtf? if it changes the map in 5s, it will never the 2s


Possitive_yt a dit :
How do you add time like 15 minutes?

tfm.exec.setGameTime(minutes * 60)


Possitive_yt a dit :
also how do you disable the "mort" command?

tfm.exec.disableMortCommand()
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 140 / 160 › »
© Atelier801 2018

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

Version 1.27