×

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
« ‹ 131 / 160 › »
Script Requests
Onkei
« Citoyen »
1500895560000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#2601
  1
Unikalus a dit :

How to make economy? Or something like that

I made this a few pages ago. If this isn't what you want, please elaborate on what you want.

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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
--[[
How to add a new item to the shop;
Firstly, decide what name and cost you would like to give the item. Make sure the name is descriptive.

Secondly, decide what you want the item to give you once bought.

For this example, I'll choose Meep and 25 as the name and cost of the item, and I'll evoke tfm.exec.giveMeep whenever someone buys the item.

Now, follow this layout to create your item into the shop;
{n = "ItemName", cost = costOfItem, effect = function(n) InsertCodeToDoWhateverYouWantTheItemToDoOnceBought end},
{n = "Meep", cost = 25, effect = function(n) tfm.exec.giveMeep(n) end},

And that's it!
]]

local keys = {space = 32}
local places = 0
local players = {}

local shop = {
{n = "Meep (Spacebar to use)",
cost = 25,
effect = function(n)
tfm.exec.giveMeep(n)
end,
},
{n = "Speed (Spacebar to use)",
cost = 60,
effect = function(n)
tfm.exec.bindKeyboard(n, keys.space, true, true)
end,
},
}

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

function showShop(n)
if players[n].openShop then
local shopStr = ""
for i, item in pairs(shop) do
shopStr = "<a href='event:shop_"..i.."'>["..item.cost.."] "..item.n.."</a><br>"..shopStr
end

ui.addTextArea(0, "<font size='12' face='Wingdings'><p align='center'><a href='event:close'><rose><a href='event:close'>z <font size='12' face='Calibri'>"..players[n].coins, n, 10, 30, 60, 19, 0x212e35, 0x5d7d90, 0.5, true)
ui.addTextArea(1, "<br><br>"..shopStr, n, 250, 80, 300, 200, 0x324650, 0x5d7d90, 1, true)
ui.addTextArea(2, "<font size='14' face='Calibri'><p align='center'>Shop", n, 250, 80, 298, 20, 0x212e35, 0x5d7d90, 1, true)
ui.addTextArea(3, "<font size='16' face='Calibri'><p align='center'><a href='event:close'><v>X", n, 520, 78, 29, 29, 0x324650, 0x000000, 0, true)
else
ui.addTextArea(0, "<font size='12' face='Wingdings'><p align='center'><a href='event:close'><rose><a href='event:open'>z <font size='12' face='Calibri'>"..players[n].coins, n, 10, 30, 60, 19, 0x212e35, 0x5d7d90, 0.5, true)
end
end

function eventNewGame()
places = 0
end

function eventKeyboard(n, key, down, x, y)
local data = tfm.get.room.playerList[n]
if key == keys.space then
local dir = data.isFacingRight and 1 or -1

tfm.exec.movePlayer(n, 0, 0, false, 80 * dir, 0, false)
tfm.exec.bindKeyboard(n, keys.space, true, false)
end
end

function eventPlayerWon(n)
local player = players[n]

places = places + 1

if places == 1 then
player.coins = player.coins + 20
elseif places == 2 then
player.coins = player.coins + 15
elseif places == 3 then
player.coins = player.coins + 5
end
showShop(n)
end

function eventNewPlayer(n)
if not players[n] then
players[n] = {
coins = 0,
openShop = false,
}
end
showShop(n)
end

function eventTextAreaCallback(id, n, cb)
local player = players[n]

if cb == "close" then
for i = 0, 3, 1 do
ui.removeTextArea(i, n)
end
player.openShop = false
elseif cb == "open" then
player.openShop = true
elseif cb:sub(1, 4) == "shop" then
local i = tonumber(cb:sub(6))
local item = shop[i]
if item.cost <= player.coins then
player.coins = player.coins - item.cost
if item.effect then item.effect(n) end
end
end
showShop(n)
end

main()
Lalaweki
« Citoyen »
1500918420000
    • Lalaweki#0000
    • Profil
    • Derniers messages
    • Tribu
#2602
  0
Laagaadoo a dit :
Lalaweki a dit :
Hey, I use to have access to a lua that I used but I lost it and would like to find a new one (or the same one)
Okay so, I sometimes have trouble with finding out who is playing a video in the tribe house and i used to use a lua that would tell me who clicks on the map (although it is not 100% saying who is changing the video, it helps find patterns in video changes and people's clicking habbits) and I would like a lua that says who is clicking on the map.
I know there is a chat command to play videos, but quite a few people just click that down arrow on the tv. Any help is appreciated.

Is this one that you want?

Yep! Thank you so much!
Unikalus
« Citoyen »
1500966780000
    • Unikalus#0000
    • Profil
    • Derniers messages
    • Tribu
#2603
  0
Onkei a dit :
Unikalus a dit :

How to make economy? Or something like that

I made this a few pages ago. If this isn't what you want, please elaborate on what you want.

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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
--[[
How to add a new item to the shop;
Firstly, decide what name and cost you would like to give the item. Make sure the name is descriptive.

Secondly, decide what you want the item to give you once bought.

For this example, I'll choose Meep and 25 as the name and cost of the item, and I'll evoke tfm.exec.giveMeep whenever someone buys the item.

Now, follow this layout to create your item into the shop;
{n = "ItemName", cost = costOfItem, effect = function(n) InsertCodeToDoWhateverYouWantTheItemToDoOnceBought end},
{n = "Meep", cost = 25, effect = function(n) tfm.exec.giveMeep(n) end},

And that's it!
]]

local keys = {space = 32}
local places = 0
local players = {}

local shop = {
{n = "Meep (Spacebar to use)",
cost = 25,
effect = function(n)
tfm.exec.giveMeep(n)
end,
},
{n = "Speed (Spacebar to use)",
cost = 60,
effect = function(n)
tfm.exec.bindKeyboard(n, keys.space, true, true)
end,
},
}

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

function showShop(n)
if players[n].openShop then
local shopStr = ""
for i, item in pairs(shop) do
shopStr = "<a href='event:shop_"..i.."'>["..item.cost.."] "..item.n.."</a><br>"..shopStr
end

ui.addTextArea(0, "<font size='12' face='Wingdings'><p align='center'><a href='event:close'><rose><a href='event:close'>z <font size='12' face='Calibri'>"..players[n].coins, n, 10, 30, 60, 19, 0x212e35, 0x5d7d90, 0.5, true)
ui.addTextArea(1, "<br><br>"..shopStr, n, 250, 80, 300, 200, 0x324650, 0x5d7d90, 1, true)
ui.addTextArea(2, "<font size='14' face='Calibri'><p align='center'>Shop", n, 250, 80, 298, 20, 0x212e35, 0x5d7d90, 1, true)
ui.addTextArea(3, "<font size='16' face='Calibri'><p align='center'><a href='event:close'><v>X", n, 520, 78, 29, 29, 0x324650, 0x000000, 0, true)
else
ui.addTextArea(0, "<font size='12' face='Wingdings'><p align='center'><a href='event:close'><rose><a href='event:open'>z <font size='12' face='Calibri'>"..players[n].coins, n, 10, 30, 60, 19, 0x212e35, 0x5d7d90, 0.5, true)
end
end

function eventNewGame()
places = 0
end

function eventKeyboard(n, key, down, x, y)
local data = tfm.get.room.playerList[n]
if key == keys.space then
local dir = data.isFacingRight and 1 or -1

tfm.exec.movePlayer(n, 0, 0, false, 80 * dir, 0, false)
tfm.exec.bindKeyboard(n, keys.space, true, false)
end
end

function eventPlayerWon(n)
local player = players[n]

places = places + 1

if places == 1 then
player.coins = player.coins + 20
elseif places == 2 then
player.coins = player.coins + 15
elseif places == 3 then
player.coins = player.coins + 5
end
showShop(n)
end

function eventNewPlayer(n)
if not players[n] then
players[n] = {
coins = 0,
openShop = false,
}
end
showShop(n)
end

function eventTextAreaCallback(id, n, cb)
local player = players[n]

if cb == "close" then
for i = 0, 3, 1 do
ui.removeTextArea(i, n)
end
player.openShop = false
elseif cb == "open" then
player.openShop = true
elseif cb:sub(1, 4) == "shop" then
local i = tonumber(cb:sub(6))
local item = shop[i]
if item.cost <= player.coins then
player.coins = player.coins - item.cost
if item.effect then item.effect(n) end
end
end
showShop(n)
end

main()

Yeah its good, but maybe its possible to change this

Code Lua

1
2
3
4
5
6
7
8
9
  if places == 1 then
player.coins = player.coins + 20
elseif places == 2 then
player.coins = player.coins + 15
elseif places == 3 then
player.coins = player.coins + 5
end
showShop(n)
end


to survived players?
If died last gets 20
2 - 15
3 - 5

Thank you.

Dernière modification le 1500966840000
Onkei
« Citoyen »
1500990600000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#2604
  1
Unikalus a dit :

to survived players?
If died last gets 20
2 - 15
3 - 5

Thank you.

This is untested (So might not work properly). I've only implemented it to give points to those who died, the surviving players will not get a point (Which is weird, so tell me if you want that added). The shaman by default will not be taken into account if they die.


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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
--[[
How to add a new item to the shop;
Firstly, decide what name and cost you would like to give the item. Make sure the name is descriptive.

Secondly, decide what you want the item to give you once bought.

For this example, I'll choose Meep and 25 as the name and cost of the item, and I'll evoke tfm.exec.giveMeep whenever someone buys the item.

Now, follow this layout to create your item into the shop;
{n = "ItemName", cost = costOfItem, effect = function(n) InsertCodeToDoWhateverYouWantTheItemToDoOnceBought end},
{n = "Meep", cost = 25, effect = function(n) tfm.exec.giveMeep(n) end},

And that's it!
]]

local diedList = {}
local keys = {space = 32}
local players = {}

local shop = {
{n = "Meep (Spacebar to use)",
cost = 25,
effect = function(n)
tfm.exec.giveMeep(n)
end,
},
{n = "Speed (Spacebar to use)",
cost = 60,
effect = function(n)
tfm.exec.bindKeyboard(n, keys.space, true, true)
end,
},
}

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

function showShop(n)
if players[n].openShop then
local shopStr = ""
for i, item in pairs(shop) do
shopStr = "<a href='event:shop_"..i.."'>["..item.cost.."] "..item.n.."</a><br>"..shopStr
end

ui.addTextArea(0, "<font size='12' face='Wingdings'><p align='center'><a href='event:close'><rose><a href='event:close'>z <font size='12' face='Calibri'>"..players[n].coins, n, 10, 30, 60, 19, 0x212e35, 0x5d7d90, 0.5, true)
ui.addTextArea(1, "<br><br>"..shopStr, n, 250, 80, 300, 200, 0x324650, 0x5d7d90, 1, true)
ui.addTextArea(2, "<font size='14' face='Calibri'><p align='center'>Shop", n, 250, 80, 298, 20, 0x212e35, 0x5d7d90, 1, true)
ui.addTextArea(3, "<font size='16' face='Calibri'><p align='center'><a href='event:close'><v>X", n, 520, 78, 29, 29, 0x324650, 0x000000, 0, true)
else
ui.addTextArea(0, "<font size='12' face='Wingdings'><p align='center'><a href='event:close'><rose><a href='event:open'>z <font size='12' face='Calibri'>"..players[n].coins, n, 10, 30, 60, 19, 0x212e35, 0x5d7d90, 0.5, true)
end
end

function eventNewGame()
diedList = {}

for n, data in pairs(players) do
data.awardedPoints = false
end
end

function eventPlayerDied(n)
if not tfm.get.room.playerList[n].isShaman then
table.insert(diedList, n)
end
end

function eventLoop(passed, left)
if left <= 0 then
if #diedList > 3 then
local players = #diedList

for i, n in pairs(diedList) do
-- Making sure that only the last 3 dead players are in the list
if players - i > 3 then
table.remove(diedList, i)
end
end
end

local count = 1
for i = #diedList, 1, -1 do
local n = diedList[i]
local coins = (count == 1 and 20 or count == 2 and 15 or 5)

if players[n] and not players[n].awardedPoints then
players[n].coins = players[n].coins + coins

players[n].awardedPoints = true

showShop(n)
end

count = count + 1
end
end
end

function eventKeyboard(n, key, down, x, y)
local data = tfm.get.room.playerList[n]
if key == keys.space then
local dir = data.isFacingRight and 1 or -1

tfm.exec.movePlayer(n, 0, 0, false, 80 * dir, 0, false)
tfm.exec.bindKeyboard(n, keys.space, true, false)
end
end

function eventNewPlayer(n)
if not players[n] then
players[n] = {
coins = 0,
openShop = false,
awardedPoints = false
}
end
showShop(n)
end

function eventTextAreaCallback(id, n, cb)
local player = players[n]

if cb == "close" then
for i = 0, 3, 1 do
ui.removeTextArea(i, n)
end
player.openShop = false
elseif cb == "open" then
player.openShop = true
elseif cb:sub(1, 4) == "shop" then
local i = tonumber(cb:sub(6))
local item = shop[i]
if item.cost <= player.coins then
player.coins = player.coins - item.cost
if item.effect then item.effect(n) end
end
end
showShop(n)
end

main()

Dernière modification le 1500995400000
Ticktoxic
« Citoyen »
1501036380000
    • Ticktoxic#0930
    • Profil
    • Derniers messages
    • Tribu
#2605
  0
Could you create a script in which all mice have invulnerability, meaning if you press space on any mouse you kill one, as well as people being able to kill you? (Kinda like what happens in traitor when your outvoted)
Laagaadoo
« Citoyen »
1501106160000
    • Laagaadoo#0000
    • Profil
    • Derniers messages
    • Tribu
#2606
  0
Zamzie789 a dit :
Could you create a script in which all mice have invulnerability, meaning if you press space on any mouse you kill one, as well as people being able to kill you? (Kinda like what happens in traitor when your outvoted)

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
local attackRadius = 50 -- radius to attack (in pixels)

function eventNewPlayer(name)
system.bindKeyboard(name, 32, true)
end

function eventKeyboard(name, key, down, x, y)
for target,tinfo in pairs(tfm.get.room.playerList) do
if ((tinfo.x-x)^2 + (tinfo.y-y)^2) <= attackRadius then
tfm.exec.killPlayer(target)
break
end
end
end

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

Dernière modification le 1501106640000
+Dannyiy
« Citoyen »
1501178460000
    • +Dannyiy#0000
    • Profil
    • Derniers messages
#2607
  0
(I no longer need help)

Dernière modification le 1501192200000
Syrius
« Consul »
1503321840000
    • Syrius#8114
    • Profil
    • Derniers messages
    • Tribu
#2608
  0
can you create a script, who does this: If I die, it respawns me in mouse spawn point.
Onkei
« Citoyen »
1503322980000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#2609
  0
Marciskris a dit :

can you create a script, who does this: If I die, it respawns me in mouse spawn point.


Code Lua

1
2
3
function eventPlayerDied(n)
tfm.exec.respawnPlayer(n)
end
Athesdrake
« Citoyen »
1503325260000
    • Athesdrake#0000
    • Profil
    • Derniers messages
    • Tribu
#2610
  1
Onkei a dit :
Marciskris a dit :

can you create a script, who does this: If I die, it respawns me in mouse spawn point.


Code Lua

1
2
3
function eventPlayerDied(n)
tfm.exec.respawnPlayer(n)
end

Better:
Code Lua

1
 eventPlayerDied = tfm.exec.respawnPlayer 
Honorabilis
1503328080000
    • Honorabilis#0000
    • Profil
    • Derniers messages
    • Tribu
#2611
[Modéré par Winjid, raison : Irrelevant]
Yaynede
« Citoyen »
1503709860000
    • Yaynede#1779
    • Profil
    • Derniers messages
    • Tribu
#2612
  0
lua code for paintball0mycity? Because I cant put password in the room and random people join Dx
Hypermousem
« Censeur »
1504089300000
    • Hypermousem#0000
    • Profil
    • Derniers messages
    • Tribu
#2613
  0
I would like to ask how to make the last mouse alive win the game.
(Also, if I ever used it in a script, would I have to credit the person who helps me?)
Onkei
« Citoyen »
1504093080000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#2614
  1
Hypermousem a dit :

I would like to ask how to make the last mouse alive win the game.
(Also, if I ever used it in a script, would I have to credit the person who helps me?)

You don't need to credit the person who helped you, but it's generally a good idea to do it (for respekt points)

With comments


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
--[[
This event is called when someone dies.
]]
function eventPlayerDied(died)
--[[
Creating a table to store the alive players.
]]
local alive = {}

--[[
Checking the room list via for loop, to see who's alive (not dead).
]]
for n, data in pairs(tfm.get.room.playerList) do
--[[
The key (n) is the name of the current player.
The value (data) contains info about the current player (n).

data.isDead tells us if a player is dead or alive.
]]
if not data.isDead then
--[[
If the player is alive, add them to the alive table.
]]
table.insert(alive, n)
end
end

--[[
The hashtag '#' gets the length of a table, or the number of things inside it.

If it has 1, this means there's only one player alive left.
]]
if #alive == 1 then
local player = alive[1]
tfm.exec.giveCheese(player)
tfm.exec.playerVictory(player)
end
end

Without comments


Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function eventPlayerDied(died)
local alive = {}

for n, data in pairs(tfm.get.room.playerList) do
if not data.isDead then
table.insert(alive, n)
end
end

if #alive == 1 then
local player = alive[1]
tfm.exec.giveCheese(player)
tfm.exec.playerVictory(player)
end
end
Hypermousem
« Censeur »
1504096620000
    • Hypermousem#0000
    • Profil
    • Derniers messages
    • Tribu
#2615
  0
Onkei a dit :
Hypermousem a dit :

I would like to ask how to make the last mouse alive win the game.
(Also, if I ever used it in a script, would I have to credit the person who helps me?)

You don't need to credit the person who helped you, but it's generally a good idea to do it (for respekt points)

With comments


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
--[[
This event is called when someone dies.
]]
function eventPlayerDied(died)
--[[
Creating a table to store the alive players.
]]
local alive = {}

--[[
Checking the room list via for loop, to see who's alive (not dead).
]]
for n, data in pairs(tfm.get.room.playerList) do
--[[
The key (n) is the name of the current player.
The value (data) contains info about the current player (n).

data.isDead tells us if a player is dead or alive.
]]
if not data.isDead then
--[[
If the player is alive, add them to the alive table.
]]
table.insert(alive, n)
end
end

--[[
The hashtag '#' gets the length of a table, or the number of things inside it.

If it has 1, this means there's only one player alive left.
]]
if #alive == 1 then
local player = alive[1]
tfm.exec.giveCheese(player)
tfm.exec.playerVictory(player)
end
end

Without comments


Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function eventPlayerDied(died)
local alive = {}

for n, data in pairs(tfm.get.room.playerList) do
if not data.isDead then
table.insert(alive, n)
end
end

if #alive == 1 then
local player = alive[1]
tfm.exec.giveCheese(player)
tfm.exec.playerVictory(player)
end
end

Thank you so much! ^^
This is just a script for the tribe, but I'll be sure to credit you!

Dernière modification le 1504096680000
Noonicknames
« Citoyen »
1505034180000
    • Noonicknames#0000
    • Profil
    • Derniers messages
    • Tribu
#2616
  0
I need a script that can time how fast you are from spawning to winning. I need it to be atleast at the nearest decisecond preferably to the nearest centisecond.

Also instead of from win time make it tell you the time from spawn to reaching a certain place without winning. So from the spawning point once your mouse runs past the x = 500px mark it will say how fast u are to get to 500px from spawning

Dernière modification le 1505625780000
Onkei
« Citoyen »
1505038380000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#2617
  0
Noonicknames a dit :

I need a script that can time how fast you are from spawning to winning. I need it to be atleast at the nearest decisecond preferably to the nearest centisecond.


Code Lua

1
2
3
function eventPlayerWon(n, elapsed)
print(n .. " has won. Time elapsed: " .. elapsed / 100)
end
Krenium
« Citoyen »
1505730900000
    • Krenium#0000
    • Profil
    • Derniers messages
    • Tribu
#2618
  0
Is there a way to limit what objects the shaman has access to, like in some vanilla maps?

I found a code example from Shamousey that could be used for mostly the same effect:

Code Lua

1
2
3
4
5
function eventSummoningEnd(name,objectType,x,y,angle,xSpeed,ySpeed,other)
if objectType~=0 then
tfm.exec.removeObject(other.id)
end
end

Is something like that the only way?

Dernière modification le 1505731980000
Hackinnzkt
« Citoyen »
1506322800000
    • Hackinnzkt#0000
    • Profil
    • Derniers messages
    • Tribu
#2619
  0
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
Onkei
« Citoyen »
1506325860000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#2620
  0
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
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 131 / 160 › »
© Atelier801 2018

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

Version 1.27