×

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
« ‹ 132 / 160 › »
Script Requests
Hackinnzkt
« Citoyen »
1506375720000
    • Hackinnzkt#0000
    • Profil
    • Derniers messages
    • Tribu
#2621
  0
Onkei a dit :
Hackinnzkt a dit :
Hi! I need a script that can change the time of the room (in real time) with a TextArea, where i can enter the seconds. (when i typing a command " !changetime")

Please n.n


Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local Timer = {
change = function(time)
tfm.exec.setGameTime(tonumber(time))
end,

popup = function(n)
ui.addPopup(1, 2, "Please enter the time in seconds.", n, 20, 30, 200, true)
end,
}

function eventChatCommand(n, cmd)
if cmd == "changetime" then
Timer.popup(n)
end
end

function eventPopupAnswer(id, n, ans)
Timer.change(ans)
end

OMG, Thanks so much!!
Jwpdde
« Citoyen »
1506754560000
    • Jwpdde#0000
    • Profil
    • Derniers messages
#2622
  0
How to make this window have the option Close or disappear after 15s.?

Code Lua

1
2
3
4
5
function eventChatCommand(nick,komd)
if komd=="help" then
ui.addTextArea(0,"<J>Witaj w module #CHOCOLATE! Aby zamienić się w CZEKODESKĘ, kliknij W. Aby zamienić się w CHMURKĘ, X! Wersja: 0,2",nick,100,100,0,0,0x1c3c41,0x1c3c41)
end
end
Onkei
« Citoyen »
1506761040000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#2623
  0
Jwpdde a dit :
How to make this window have the option Close or disappear after 15s.?

This gives you the option to close the window.


Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
function eventChatCommand(nick, komd)
if komd == "help" then
ui.addTextArea(0, "<J>Witaj w module #CHOCOLATE! Aby zamienić się w CZEKODESKĘ, kliknij W. Aby zamienić się w CHMURKĘ, X! Wersja: 0,2", nick, 100, 100, 0, 0, 0x1c3c41, 0x1c3c41)
ui.addTextArea(1, "<p align='center'><font size='15'><rose><a href='event:close'>X", nick, 100, 75, 0, 0, 0x1c3c41, 0x1c3c41)
end
end

function eventTextAreaCallback(id, nick, callback)
if callback == "close" then
ui.removeTextArea(0, nick)
ui.removeTextArea(1, nick)
end
end
Dagaker
« Censeur »
1506859140000
    • Dagaker#3257
    • Profil
    • Derniers messages
#2624
  0
I don't know if this is possible to make, But i need a script that will allow me to remove objects and grounds on map!
Yionutz
« Citoyen »
1506973380000
    • Yionutz#0000
    • Profil
    • Derniers messages
    • Tribu
#2625
  0
Tukushii a dit :
I don't know if this is possible to make, But i need a script that will allow me to remove objects and grounds on map!

This script allows you to remove just objects by clicking in the center of them

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
admin = "Tukushii"

function eventNewPlayer(name)
system.bindMouse(name, true)
end

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

function eventMouse(playerName,xMousePosition,yMousePosition)
if playerName == admin then
del_obj = nil
for key in pairs(tfm.get.room.objectList) do
x = tfm.get.room.objectList[key].x y = tfm.get.room.objectList[key].y
if xMousePosition - x < 13 and xMousePosition - x > - 13 and yMousePosition - y > -22 and yMousePosition - y < 13 then
del_obj = tfm.get.room.objectList[key].id
end
end
if del_obj ~= nil then
tfm.exec.removeObject(del_obj)
end
end
end

Dernière modification le 1507378080000
Knight
« Citoyen »
1507056420000
    • Knight#5519
    • Profil
    • Derniers messages
#2626
  0
A league of legends module
Honorabilis
« Consul »
1507063920000
    • Honorabilis#0000
    • Profil
    • Derniers messages
    • Tribu
#2628
  0
Gamingknight23 a dit :
A League of Legends Module

Almost impossible.
Hackinnzkt
« Citoyen »
1507182480000
    • Hackinnzkt#0000
    • Profil
    • Derniers messages
    • Tribu
#2629
  0
a script that can change the map with a command !changemap

but when i change it, enable respawn (map house tribe) please!
Yionutz
« Citoyen »
1507316160000
    • Yionutz#0000
    • Profil
    • Derniers messages
    • Tribu
#2630
  1
Hackinnzkt a dit :
a script that can change the map with a command !changemap

but when i change it, enable respawn (map house tribe) please!

Yes, try this.

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
admins = {"Yionutz", "Hackinnzkt", "Anonmasq"}

function is_admin(name)
state = false
for i=1,table.getn(admins) do
if name == admins[i] then state = true end
end
return state == true and 1
end

for i,command in ipairs({"changemap"}) do system.
disableChatCommandDisplay(command,true)
end

function eventChatCommand(name,msg)
if is_admin(name) == 1 then
tfm.exec.newGame(msg:sub(11))
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
end
end

function eventPlayerWon(playerName, timeElapsed, timeElapsedSinceRespawn)
tfm.exec.respawnPlayer(playerName)
end

function eventPlayerDied(playerName)
tfm.exec.respawnPlayer(playerName)
end

function eventNewPlayer(name)
tfm.exec.respawnPlayer(playerName)
end

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

Dernière modification le 1507381680000
Hackinnzkt
« Citoyen »
1507316820000
    • Hackinnzkt#0000
    • Profil
    • Derniers messages
    • Tribu
#2631
  0
Yionutz a dit :
Hackinnzkt a dit :
a script that can change the map with a command !changemap

but when i change it, enable respawn (map house tribe) please!

Yes, try this.

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
admins = {"Yionutz", "Hackinnzkt", "Anonmasq"}

function is_admin(name)
state = false
for i=1,table.getn(admins) do
if name == admins[i] then state = true end
end
return state == true and 1
end

for i,command in ipairs({"changemap"}) do system.
disableChatCommandDisplay(command,true)
end

function eventChatCommand(name,msg)
if is_admin(name) == 1 then
tfm.exec.newGame(msg:sub(11))
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
end
end

function eventPlayerWon(playerName, timeElapsed, timeElapsedSinceRespawn)
tfm.exec.respawnPlayer(playerName)
end

function eventPlayerDied(playerName)
tfm.exec.respawnPlayer(playerName)
end

function eventNewPlayer(name)
tfm.exec.respawnPlayer(playerName)
end

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

Thanks so much man!! Good job
Antonio
« Sénateur »
1507317240000
    • Antonio#9975
    • Profil
    • Derniers messages
    • Tribu
#2632
  1
Something to scare my tribe members
Jwpdde
« Citoyen »
1507564140000
    • Jwpdde#0000
    • Profil
    • Derniers messages
#2633
  0
What is the LUA code to call the appearance of a text on chat using the command? fe. !new

?

Dernière modification le 1507564260000
Onkei
« Citoyen »
1507627680000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#2634
  0
Jwpdde a dit :
What is the LUA code to call the appearance of a text on chat using the command? fe. !new

?


Code Lua

1
2
3
4
5
6
7
8
9
function eventChatCommand(n, cmd)
if cmd == "new" then
ui.addPopup(1, 2, "What would you like to say?", n, 20, 30, 200, true)
end
end

function eventPopupAnswer(id, n, ans)
ui.addTextArea(1, ans, nil, 20, 30, nil, 30, 0x324650, 0x89A7F5, 0.8, true)
end
Camila_cabello
« Citoyen »
1508044860000
    • Camila_cabello#0000
    • Profil
    • Derniers messages
    • Tribu
#2635
  1
Can someone make a LUA code that transforms you into a vampire each time you click a tombstone or any other consumable?
Kind of like when you make a campfire and your mouse does marshmallow animation but instead of the marshmallow animation it would make you into a vampire

Dernière modification le 1508698380000
Syrius
« Consul »
1508846340000
    • Syrius#8114
    • Profil
    • Derniers messages
    • Tribu
#2636
  0
Can I have code which makes person shaman with command?
And compatible with
Code Lua

1
admins = {}
(admin system)
Onkei
« Citoyen »
1508847840000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#2637
  0
Marciskris a dit :
Can I have code which makes person shaman with command?


Code Lua

1
2
3
4
5
6
7
8
9
admins = {Marciskris = true}

function eventChatCommand(n, cmd)
if admins[n] then
if cmd == "shaman" then
tfm.exec.setShaman(n)
end
end
end
Syrius
« Consul »
1508939820000
    • Syrius#8114
    • Profil
    • Derniers messages
    • Tribu
#2638
  0
Is there any way to force P0 rotation maps?
Code Lua

1
2
tfm.exec.newGame("#0")
-- This code runs P0 and P1 maps randomly
Honorabilis
« Consul »
1508955000000
    • Honorabilis#0000
    • Profil
    • Derniers messages
    • Tribu
#2639
  0
tfm.get.room.xmlMapInfo.permCode("")

Sorry I dont know which parameter u must use but u can learn with this code. (i guess)
Syrius
« Consul »
1509632160000
    • Syrius#8114
    • Profil
    • Derniers messages
    • Tribu
#2640
  0
nvm, found it.

Dernière modification le 1509632220000
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 132 / 160 › »
© Atelier801 2018

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

Version 1.27