×

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
« ‹ 122 / 160 › »
Script Requests
Onkei
« Citoyen »
1483370280000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#2422
  0
piviw a dit :
Please make for me script:

Click L - give cheese
Click p - hole

Thanks!

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
local keys = {l = 76, p = 80}

for i, key in pairs(keys) do
tfm.exec.bindKeyboard("Piviw", key, true, true)
end

function eventKeyboard(n, key, down, x, y)
if key == keys.l then
tfm.exec.giveCheese(n)
elseif key == keys.p then
tfm.exec.playerVictory(n)
end
end
Bodykudo
« Censeur »
1483372140000
    • Bodykudo#0000
    • Profil
    • Derniers messages
    • Tribu
#2423
  0
piviw a dit :
Please make for me script:

Click L - give cheese
Click p - hole

Thanks!

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
function eventNewPlayer(n)
for key,k in pairs({76,80}) do
tfm.exec.bindKeyboard(n, k, true, true)
end
end
table.foreach(tfm.get.room.playerList,eventNewPlayer)

function eventKeyboard(n,k,d)
if k==76 then
tfm.exec.giveCheese(n)
elseif k==80 then
tfm.exec.playerVictory(n)
end
end
Dramacorn
« Consul »
1483522200000
    • Dramacorn#2857
    • Profil
    • Derniers messages
    • Tribu
#2424
  0
Which is the ID for that emotion with dice?
Rkubi
« Censeur »
1483534800000
    • Rkubi#0000
    • Profil
    • Derniers messages
    • Tribu
#2425
  0
dramatotala a dit :
Which is the ID for that emotion with dice?

Isn't id with dice.

Dernière modification le 1483535040000
Dramacorn
« Consul »
1483608240000
    • Dramacorn#2857
    • Profil
    • Derniers messages
    • Tribu
#2426
  0
There are some scripts that when you click on something to show a random number (like one from 1-6) when the 2nd time you will be shown another number??
Onkei
« Citoyen »
1483613700000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#2427
  0
dramatotala a dit :
There are some scripts that when you click on something to show a random number (like one from 1-6) when the 2nd time you will be shown another number??

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local player = "Dramatotala"
-- Range of numbers you'd like to set. e.g. {1, 100} if you want the random number to be between 1 and 100.
local range = {1, 6}

-- Showing the player the textArea that contains the 'click to get random number', I'll also be using this to show the number for simplicity sakes. :D
ui.addTextArea(0, "<p align='center'><a href='event:random'>Click for random number.", player, 10, 20, 780, 20, 0x324650, 0x000000, 1, true)

function eventTextAreaCallback(id, n, cb)
if cb == "random" then
-- Using the math.random function to get a number between the first range and the second range.
local randNum = math.random(range[1], range[2])
-- Updating the textArea with an additional text; ("..randNum..")
ui.addTextArea(0, "<p align='center'><a href='event:random'>Click for random number. <vp>("..randNum..")", n, 10, 20, 780, 20, 0x324650, 0x000000, 1, true)
end
end
Krymster
« Citoyen »
1483636740000
    • Krymster#0000
    • Profil
    • Derniers messages
    • Tribu
#2428
  0
I need a script so people who add certain songs be put in queue (something like on music1), and the songs be played in the order they were added. So basically the same script from music1 please

(And also a command for the admin to skip a video using !skip or something)

Dernière modification le 1483636860000
Sebafrancuz
« Consul »
1483637400000
    • Sebafrancuz#0000
    • Profil
    • Derniers messages
    • Tribu
#2429
  0
Krymster a dit :
I need a script so people who add certain songs be put in queue (something like on music1), and the songs be played in the order they were added. So basically the same script from music1 please

(And also a command for the admin to skip a video using !skip or something)

There isn't function which change music/set music.
Coolilagamer
« Citoyen »
1483927320000
    • Coolilagamer#0000
    • Profil
    • Derniers messages
    • Tribu
#2430
  0
Is it possible to hide someones username?
Shamousey
« Consul »
1483986000000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#2431
  0
coolilagamer a dit :
Is it possible to hide someones username?

Unfortunately not with a conventional method - you have to get creative in some way:
  • Move the player off-screen so they're hidden, then have an object on-screen represent the player and mimic their movement whenever they make a key press
  • Add a foreground object (ground or joint) in-front of the player's name
  • Make the entire map's background black, and then also set the player's name colour to black.
Coolilagamer
« Citoyen »
1484017680000
    • Coolilagamer#0000
    • Profil
    • Derniers messages
    • Tribu
#2432
  0
Shamousey a dit :
coolilagamer a dit :
Is it possible to hide someones username?

Unfortunately not with a conventional method - you have to get creative in some way:
  • Move the player off-screen so they're hidden, then have an object on-screen represent the player and mimic their movement whenever they make a key press
  • Add a foreground object (ground or joint) in-front of the player's name
  • Make the entire map's background black, and then also set the player's name colour to black.

Ok, but tysm anyway ^-^
Bad_ju_ju
« Citoyen »
1484139540000
    • Bad_ju_ju#0000
    • Profil
    • Derniers messages
    • Tribu
#2433
  0
Can someone give me Hide'n'seek minigame script?
Kuyrukcuxd
« Citoyen »
1484499600000
    • Kuyrukcuxd#0000
    • Profil
    • Derniers messages
#2434
  0
Can someone give me dual shaman script? (Like #fight)
Rkubi
« Censeur »
1484503560000
    • Rkubi#0000
    • Profil
    • Derniers messages
    • Tribu
#2435
  0
Kuyrukcuxd a dit :
Can someone give me dual shaman script? (Like #fight)

Script
Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
quantity=2
p={}


function eventNewGame()
for i=1,quantity do
tfm.exec.setShaman(p[math.random(#p)])
end
end

for nick in pairs(tfm.get.room.playerList) do
table.insert(p,nick)
end


tfm.exec.disableAutoShaman(true)

Dernière modification le 1484507220000
Kuyrukcuxd
« Citoyen »
1484505960000
    • Kuyrukcuxd#0000
    • Profil
    • Derniers messages
#2436
  0
Rkubi a dit :
Kuyrukcuxd a dit :
Can someone give me dual shaman script? (Like #fight)

Script
Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
quantity=2
p={}


function eventNewGame()
for i=1,quantity do
tfm.exec.setShaman(p[math.random(#p)])
end
end


function eventLoop()
for nick in pairs(tfm.get.room.playerList) do
table.insert(p,nick)
end
end

tfm.exec.disableAutoShaman(true)

"only shamans can live" is it possible?
Onkei
« Citoyen »
1484520780000
    • Onkei#0000
    • Profil
    • Derniers messages
    • Tribu
#2437
  0
Kuyrukcuxd a dit :
"only shamans can live" is it possible?

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
function eventNewGame()
-- Creating a table to store all of the players in the room, the table will be used to randomize to select the two shamans.
local list_of_players = {}

-- Loops through everyone in the room and adds them into the table.
for n in pairs(tfm.get.room.playerList) do
table.insert(list_of_players, n)
end

-- Select a random 'key' number between 1 and the length of the table (depends on number of people in the room), this'll be stored in index1.
local index1 = math.random(#list_of_players)
-- list_of_players[index1] gives the value of the key 'index1', which is a random player's name.
tfm.exec.setShaman(list_of_players[index1])
-- Remove the value in the position of the key from the table so the player won't be used again.
table.remove(list_of_players, index1)

local index2 = math.random(#list_of_players)
tfm.exec.setShaman(list_of_players[index2])
table.remove(list_of_players, index2);

-- Loop through everyone in the list_of_players table and kill them all.
-- i = key, n = value. Key stores the position of something in a table, and value is that something.
for i, n in pairs(list_of_players) do
tfm.exec.killPlayer(n)
end
end

tfm.exec.disableAutoShaman(true)
eventNewGame()
Dannyhpy
« Citoyen »
1484759700000
    • Dannyhpy#7433
    • Profil
    • Derniers messages
    • Tribu
#2438
  0
Please? What is the error? Thx

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
autoNewGame = 1

function eventEmotePlayed(pseudo, id, emoteParam)
if id == 7 then
if autoNewGame == 0 then
tfm.exec.disableAutoNewGame(true)
autoNewGame = 1
end
if autoNewGame == 1 then
tfm.exec.disableAutoNewGame(false)
autoNewGame = 0
end
end
end
Tat
« Censeur »
1484842140000
    • Tat#0095
    • Profil
    • Derniers messages
    • Tribu
#2439
  0
Dannyiy a dit :
Please? What is the error? Thx

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
autoNewGame = 1

function eventEmotePlayed(pseudo, id, emoteParam)
if id == 7 then
if autoNewGame == 0 then
tfm.exec.disableAutoNewGame(true)
autoNewGame = 1
end
if autoNewGame == 1 then
tfm.exec.disableAutoNewGame(false)
autoNewGame = 0
end
end
end

Don't really see the point of toggling tfm.exec.disableAutoNewGame, but if u wanna do that then u can't have 2 if statements since autoNewGame will be checked if it's 0, then if it's 0 then it will be changed to 1, then the next if statement checks for autoNewGame==1, and since it's 1 from the previous if statement it will be converted back to 0, making the disabling always false. here's what should work:

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
autoNewGame = 1

function eventEmotePlayed(pseudo, id, emoteParam)
if id == 7 then
if autoNewGame == 0 then
tfm.exec.disableAutoNewGame(true)
autoNewGame = 1
elseif autoNewGame == 1 then
tfm.exec.disableAutoNewGame(false)
autoNewGame = 0
end
end
end

having "elseif" checks the first condition and then the second condition, but if the first condition is met the second condition is not checked, unlike your previous code where the 2nd condition is also checked.
Dramacorn
« Consul »
1485266160000
    • Dramacorn#2857
    • Profil
    • Derniers messages
    • Tribu
#2440
  0
looking for a good script to life bar when you hit the balls, objects and other things shaman to drop you a certain number of 0 to par of life and life is attempted die
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 122 / 160 › »
© Atelier801 2018

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

Version 1.27