×

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
« ‹ 139 / 160 › »
Script Requests
Overjoy06
« Citoyen »
1519279800000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2761
  0
Overjoy06 a dit :
Now can it be a automatic spawner? no buttons needed (You need 100 score in the scorelist)

I just really suck at lua scipting and sentences

I meant it will spawn boxes every 5 seconds And disappears every 2 seconds.
Overjoy06
« Citoyen »
1519364220000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2762
  0
Yionutz a dit :
Overjoy06 a dit :
Sorry of my bad grammar, im not a american...

What if you click on a message then you need like 100 scores and when you have 100 scores it will automatically spawns a box in a loop.But i need it to be gone in a certain amount of time.

I hope it will be useful.

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
map = 7387332
toDespawn = {}

function main()
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.newGame(map)
end

eventNewPlayer = tfm.exec.respawnPlayer

function eventNewPlayer(name)
ui.addTextArea(123, "<a href='event:#'><p align='center'>Click me</p></a>", name, 738, 371, 56, 19, 0x131414, 0x000000, 0.9, true)
end

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


function eventTextAreaCallback(id, player, callback)
if id == 123 then
id=tfm.exec.addShamanObject(1, 400, 100)
table.insert(toDespawn,{os.time()+2000,id})
end
end

function eventLoop(time,remaining)
for i,box in ipairs (toDespawn) do
if box[1] <= os.time() then
tfm.exec.removeObject(box[2])
table.remove(toDespawn,i)
end
end
end

main()

That version but everytime you click the message you will get 1 point.
Vekout
« Citoyen »
1519370280000
    • Vekout#0000
    • Profil
    • Derniers messages
    • Tribu
#2763
  0
Hello!

I have a rotation maps I need a command like:

!r player1 player2

when I put this command, I want the next map to only respawn player1 and player2.
And the others can only look.

Please :)
Wazt
« Citoyen »
1519390680000
    • Wazt#0000
    • Profil
    • Derniers messages
    • Tribu
#2764
  0
Vekout a dit :
Hello!

I have a rotation maps I need a command like:

!r player1 player2

when I put this command, I want the next map to only respawn player1 and player2.
And the others can only look.

Please :)


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
local toRespawn = {}

function eventNewGame()
if #toRespawn > 0 then
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoTimeLeft(true)
for name, _ in pairs(tfm.get.room.playerList) do
tfm.exec.killPlayer(name)
end
for _, name in ipairs(toRespawn) do
if tfm.get.room.playerList[name] ~= nil then
tfm.exec.respawnPlayer(name)
end
end
toRespawn = {}
tfm.exec.disableAutoNewGame(false)
tfm.exec.disableAutoTimeLeft(false)
end
end

function eventChatCommand(name, cmd)
local args = {}
for word in cmd:gmatch("%S+") do
table.insert(args, word)
end
if args[1] == "r" then
table.remove(args, 1)
for _, name in ipairs(args) do
table.insert(toRespawn, name)
end
end
end

tfm.exec.newGame()


Overjoy06 a dit :
Yionutz a dit :
Overjoy06 a dit :
Sorry of my bad grammar, im not a american...

What if you click on a message then you need like 100 scores and when you have 100 scores it will automatically spawns a box in a loop.But i need it to be gone in a certain amount of time.

I hope it will be useful.

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
map = 7387332
toDespawn = {}

function main()
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.newGame(map)
end

eventNewPlayer = tfm.exec.respawnPlayer

function eventNewPlayer(name)
ui.addTextArea(123, "<a href='event:#'><p align='center'>Click me</p></a>", name, 738, 371, 56, 19, 0x131414, 0x000000, 0.9, true)
end

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


function eventTextAreaCallback(id, player, callback)
if id == 123 then
id=tfm.exec.addShamanObject(1, 400, 100)
table.insert(toDespawn,{os.time()+2000,id})
end
end

function eventLoop(time,remaining)
for i,box in ipairs (toDespawn) do
if box[1] <= os.time() then
tfm.exec.removeObject(box[2])
table.remove(toDespawn,i)
end
end
end

main()

That version but everytime you click the message you will get 1 point.


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
map = 7387332
toDespawn = {}
local currentTime = 0
local spawnerFlag = false

function main()
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.newGame(map)
end

eventNewPlayer = tfm.exec.respawnPlayer

function eventNewPlayer(name)
ui.addTextArea(123, "<a href='event:#'><p align='center'>Click me</p></a>", name, 738, 371, 56, 19, 0x131414, 0x000000, 0.9, true)
end

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


function eventTextAreaCallback(id, player, callback)
if id == 123 and tfm.get.room.playerList[player].score < 100 then
tfm.exec.setPlayerScore(player, 1, true)
elseif id == 123 then
spawnerFlag = true
end
end

function eventLoop(time,remaining)
if spawnerFlag and currentTime <= os.time() then
id=tfm.exec.addShamanObject(1, 400, 100)
table.insert(toDespawn,{os.time()+2000,id})
currentTime = os.time() + 5000
end
for i,box in ipairs (toDespawn) do
if box[1] <= os.time() then
tfm.exec.removeObject(box[2])
table.remove(toDespawn,i)
end
end

end

main()

Dernière modification le 1519391460000
Honorabilis
« Consul »
1519395300000
    • Honorabilis#0000
    • Profil
    • Derniers messages
    • Tribu
#2765
  0
Could you please read the documentation first?
Vekout
« Citoyen »
1519416240000
    • Vekout#0000
    • Profil
    • Derniers messages
    • Tribu
#2766
  0
Wazt a dit :
Vekout a dit :
Hello!

I have a rotation maps I need a command like:

!r player1 player2

when I put this command, I want the next map to only respawn player1 and player2.
And the others can only look.

Please :)


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
local toRespawn = {}

function eventNewGame()
if #toRespawn > 0 then
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoTimeLeft(true)
for name, _ in pairs(tfm.get.room.playerList) do
tfm.exec.killPlayer(name)
end
for _, name in ipairs(toRespawn) do
if tfm.get.room.playerList[name] ~= nil then
tfm.exec.respawnPlayer(name)
end
end
toRespawn = {}
tfm.exec.disableAutoNewGame(false)
tfm.exec.disableAutoTimeLeft(false)
end
end

function eventChatCommand(name, cmd)
local args = {}
for word in cmd:gmatch("%S+") do
table.insert(args, word)
end
if args[1] == "r" then
table.remove(args, 1)
for _, name in ipairs(args) do
table.insert(toRespawn, name)
end
end
end

tfm.exec.newGame()


Overjoy06 a dit :
Yionutz a dit :
Overjoy06 a dit :
Sorry of my bad grammar, im not a american...

What if you click on a message then you need like 100 scores and when you have 100 scores it will automatically spawns a box in a loop.But i need it to be gone in a certain amount of time.

I hope it will be useful.

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
map = 7387332
toDespawn = {}

function main()
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.newGame(map)
end

eventNewPlayer = tfm.exec.respawnPlayer

function eventNewPlayer(name)
ui.addTextArea(123, "<a href='event:#'><p align='center'>Click me</p></a>", name, 738, 371, 56, 19, 0x131414, 0x000000, 0.9, true)
end

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


function eventTextAreaCallback(id, player, callback)
if id == 123 then
id=tfm.exec.addShamanObject(1, 400, 100)
table.insert(toDespawn,{os.time()+2000,id})
end
end

function eventLoop(time,remaining)
for i,box in ipairs (toDespawn) do
if box[1] <= os.time() then
tfm.exec.removeObject(box[2])
table.remove(toDespawn,i)
end
end
end

main()

That version but everytime you click the message you will get 1 point.


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
map = 7387332
toDespawn = {}
local currentTime = 0
local spawnerFlag = false

function main()
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.newGame(map)
end

eventNewPlayer = tfm.exec.respawnPlayer

function eventNewPlayer(name)
ui.addTextArea(123, "<a href='event:#'><p align='center'>Click me</p></a>", name, 738, 371, 56, 19, 0x131414, 0x000000, 0.9, true)
end

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


function eventTextAreaCallback(id, player, callback)
if id == 123 and tfm.get.room.playerList[player].score < 100 then
tfm.exec.setPlayerScore(player, 1, true)
elseif id == 123 then
spawnerFlag = true
end
end

function eventLoop(time,remaining)
if spawnerFlag and currentTime <= os.time() then
id=tfm.exec.addShamanObject(1, 400, 100)
table.insert(toDespawn,{os.time()+2000,id})
currentTime = os.time() + 5000
end
for i,box in ipairs (toDespawn) do
if box[1] <= os.time() then
tfm.exec.removeObject(box[2])
table.remove(toDespawn,i)
end
end

end

main()

Thanks!
Koruto
« Citoyen »
1519439400000
    • Koruto#2851
    • Profil
    • Derniers messages
    • Tribu
#2767
  1
Umm can anyone tell how to use screen using lua.
Uno and Chess uses screen so i want to know that how to use screen commands.
can anyone tell me all the screen commands.?

and is it possible that i can get the script of uno?

I don't know where is it in documentation
Bolodefchoco
« Sénateur »
1519474080000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#2768
  1
Hemant2002 a dit :
Umm can anyone tell how to use screen using lua.
Uno and Chess uses screen so i want to know that how to use screen commands.
can anyone tell me all the screen commands.?

and is it possible that i can get the script of uno?

I don't know where is it in documentation

ui.addTextArea(id, text, who_sees, x, y, width. height, background color, border color, alpha, fixed)

You can't have the source of modules, stop
Koruto
« Citoyen »
1519553820000
    • Koruto#2851
    • Profil
    • Derniers messages
    • Tribu
#2769
  0
Ok
Thank you
Overjoy06
« Citoyen »
1519628460000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2770
  0
Thank you also i really suck at english
Overjoy06
« Citoyen »
1519628760000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2771
  0
Can you change the current speed of the mouse?
Bolodefchoco
« Sénateur »
1519653180000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#2772
  0
Overjoy06 a dit :
Can you change the current speed of the mouse?

Use tfm.exec.movePlayer(name, 0, 0, false, x speed, y speed, (true if you want to add the value to the current speed))
Overjoy06
« Citoyen »
1520070960000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2773
  0
is there a script that when you click A to add a particle effect for everyone
Overjoy06
« Citoyen »
1520081940000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2774
  0
is there a module of snake and ladders?
Limy09
« Citoyen »
1520136240000
    • Limy09#0000
    • Profil
    • Derniers messages
    • Tribu
#2775
  1
is there a script that does this :

When someone joins the room there will be a text area saying Welcome to the room, playername
Acer
« Citoyen »
1520145300000
    • Acer#0095
    • Profil
    • Derniers messages
    • Tribu
#2776
  1
Overjoy06 a dit :
is there a module of snake and ladders?

No.


Limy09 a dit :
is there a script that does this :

When someone joins the room there will be a text area saying Welcome to the room, playername

Assuming you want everyone in the room to see the text-area.

1
2
3
4
function eventNewPlayer(name)
text = [[Welcome to the room, ]] .. name .. [[.]]
ui.addTextArea(1, text, nil, 10, 30, 200, 20)
end

If you just want the player who entered the room to see it then just change "nil" to "name"

Also, for such small scripts try challenging yourself to do it yourself. You can see the documentation here, it's pretty easy to understand and follow through.
Bolodefchoco
« Sénateur »
1520208000000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#2777
  0
Overjoy06 a dit :
is there a script that when you click A to add a particle effect for everyone

Make more detailed requests.

How does it add the particle? In the position you are when you pressed A?
What particle?
What does it?
Possitive_yt
« Citoyen »
1520409900000
    • Possitive_yt#0000
    • Profil
    • Derniers messages
#2778
  0
What is all of these lua things? Please tell me im just new.
Overjoy06
« Citoyen »
1520412420000
    • Overjoy06#0000
    • Profil
    • Derniers messages
    • Tribu
#2779
  0
Nevermind about the press A particles and stuffs.

But how do you update the text message every like 1 second?
Bolodefchoco
« Sénateur »
1520431680000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#2780
  0
Overjoy06 a dit :
Nevermind about the press A particles and stuffs.

But how do you update the text message every like 1 second?

Code Lua

1
2
3
4
5
6
7
local time = 0
eventLoop = function()
time = time + 1
if time % 2 == 0 then
-- update
end
end
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 139 / 160 › »
© Atelier801 2018

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

Version 1.27