×

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
« ‹ 23 / 160 › »
Script Requests
Safwanrockz
« Censeur »
1383592800000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#441
  0
Fuzzfire a dit :
When someone dances, they fall through grounds(I am thinking of impossible ones ;n;)

It's not possible to control the map running with lua.

Sandermr a dit :
Hi, I made a script which asks a question to all mice in the room and checks how many mice answered yes, then does an action depending on how many mice answered yes (in this case, half or more).

So it's working so far but I have a problem, if someone is afk or just not bothered to answer the question none of the actions are done so what I need added to the script is a way that if someone doesn't answer in X amount of time their answer becomes nil.

Didn't Issey already make a script for it? Or am I mistaken? :x
Aanguson
« Citoyen »
1383680100000
    • Aanguson#8461
    • Profil
    • Derniers messages
#442
  0
Could somebody write code that when a player wins a popup appears on 400x50.
I would like to have written the player ... 'won'.

a dit :
Sorry for my English

=)
Safwanrockz
« Censeur »
1383681000000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#443
  0
Aanguson a dit :
Could somebody write code that when a player wins a popup appears on 400x50.
I would like to have written the player ... 'won'.

=)

function eventPlayerWon(name)
ui.addTextArea(0, name.."has won", nil, 400, 50)
end
Aanguson
« Citoyen »
1383681120000
    • Aanguson#8461
    • Profil
    • Derniers messages
#444
  0
Safwanrockz a dit :
function eventPlayerWon(name)
ui.addTextArea(0, name.."has won", nil, 400, 50)
end

I can still ask to be removed the after 5 seconds
Bushmeister
« Consul »
1383727740000
    • Bushmeister#0000
    • Profil
    • Derniers messages
    • Tribu
#445
  0
Aanguson a dit :
I can still ask to be removed the after 5 seconds

script a dit :
i=1
function eventPlayerWon(name)
ui.addTextArea(0, name.. "has won", nil, 400, 50)
i=11
end
function eventLoop()
if i<=11 then
i=i-1
end
if i==0 then
ui.removeTextArea(0)
end
end

Guilherme
« Citoyen »
1383778680000
    • Guilherme#0368
    • Profil
    • Derniers messages
    • Tribu
#446
  0
repeating again:
script a dit :
function eventKeyboard(name, key, down, xPos, yPos)
if key == 32 then
local me = tfm.get.room.playerList[name]
for name,player in pairs(tfm.get.room.playerList) do
local victim = tfm.get.room.playerList[name]
if me.isShaman == true and victim ~= me then
if pythag(me.x, me.y, 20, victim.x, victim.y, 20) == true then
tfm.exec.killPlayer(victim.playerName)
tfm.exec.addShamanObject(tfm.enum.shamanObject.iceCube,victim.x,victim.y)
end
end
end
end
end

function eventNewPlayer(name)
tfm.exec.bindKeyboard(name,32,true)
end

function eventNewGame()
players = {}
for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end
end

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

main()

function eventChatCommand(name, message)
if message == "sh" then
tfm.exec.setShaman(name)
end
end
function pythag(x1,y1,x2,y2,r)
local x=x2-x1
local y=y2-y1
local r=r+r
return x*x+y*y&lt;r*r
end

As you can see in my script, a part is ready ...
I needed you to do with the shaman could only freeze the mice if the mice had at a distance close to him, and he froze only one at a time.
And not that crash.
Marcussuhr
« Citoyen »
1383838080000
    • Marcussuhr#0000
    • Profil
    • Derniers messages
#447
  0
Is it possible to get the shaman fly skill? Like the wings when you press up or w
Shamousey
« Consul »
1383844320000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#448
  0
Marcussuhr a dit :
Is it possible to get the shaman fly skill? Like the wings when you press up or w

Nope.
Splashclaweh
« Citoyen »
1383873780000
    • Splashclaweh#0000
    • Profil
    • Derniers messages
    • Tribu
#449
  0
A script for a ball spawn at the mouse hole every 7 seconds? And can the balls last 3 seconds long? :D
Issey
« Citoyen »
1383912780000
    • Issey#0000
    • Profil
    • Derniers messages
#450
  0
Splashclaweh a dit :
A script for a ball spawn at the mouse hole every 7 seconds? And can the balls last 3 seconds long? :D

a dit :

time=0

function eventNewGame()
n=tfm.get.room.xmlMapInfo.xml:match('<D><T[^/]+') or nil
if n then
holeX=n:match('X=.%d+.')
holeX=tonumber(holeX:match('%d+'))
holeY=n:match('Y=.%d+.')
holeY=tonumber(holeY:match('%d+'))
hole=true
end
end

function eventLoop()
if hole then
time=time+0.5
end
if time==7 then
ball=tfm.exec.addShamanObject(6,holeX,holeY)
end
if time>=10 and ball then
tfm.exec.removeObject(ball)
time=0
end
end

.
Woebegone
« Citoyen »
1383958260000
    • Woebegone#8377
    • Profil
    • Derniers messages
    • Tribu
#451
  0
Wut abut Err.... Make everyone's nametags Rainbow? T_T
Zyx
« Censeur »
1383967560000
    • Zyx#8690
    • Profil
    • Derniers messages
#452
  0
Juliantwofan a dit :
Wut abut Err.... Make everyone's nametags Rainbow? T_T

I don't think that's possible for the color..
Orb
« Censeur »
1383987060000
    • Orb#0095
    • Profil
    • Derniers messages
    • Tribu
#453
  0
Juliantwofan a dit :
Wut abut Err.... Make everyone's nametags Rainbow? T_T

Do you mean rainbow names?

Script a dit :
function randomColor()
return "0x" .. string.format("%X", math.random(0x000000, 0xFFFFFF))
end

function eventLoop (currentTime, timeRemaining)
for i=1,100 do
for p,_ in pairs(tfm.get.room.playerList) do
tfm.exec.setNameColor(p, randomColor());
end
end
end

This script changes the names in different colors
Ninzyaa
« Citoyen »
1384007160000
    • Ninzyaa#0000
    • Profil
    • Derniers messages
    • Tribu
#454
  1
http://pastebin.com/7bUUaZWn
How to make the heart could create only one person, such as I?
Sandermr
« Citoyen »
1384093260000
    • Sandermr#0000
    • Profil
    • Derniers messages
    • Tribu
#455
  0
Hi, I made a script which asks a question to all mice in the room and checks how many mice answered yes, then does an action depending on how many mice answered yes (in this case, half or more).

So it's working so far but I have a problem, if someone is afk or just not bothered to answer the question none of the actions are done because it waits for that afk to answer so what I need added to the script is a way that if someone doesn't answer in X amount of time their answer becomes nil or something like that.

Script:
a dit :
function CheckMice()
mice=0
for player, name in pairs(tfm.get.room.playerList) do
mice=mice+1
end
end
CheckMice()

function Question()
answered=0
yes=0
ui.addPopup(99, 1, "<p align='center'><b>Question</b></p>", nil, 250, 150, 250)
end
Question()

function eventPopupAnswer(id, name, ans)
if (id == 99) then
answered=answered+1
print(name.." answered: "..ans)
if (ans=="yes") then
yes=yes+1
end
print("Number of answers: "..answered)
print("Number of Yes: "..yes)

if (answered == mice) then
if (yes <= mice*0.5) then
-- Do something
else
-- Do something else
end
end
end
end

.
Woterek
« Citoyen »
1384093440000
    • Woterek#0000
    • Profil
    • Derniers messages
    • Tribu
#456
  0
Ninzyaa a dit :
http://pastebin.com/7bUUaZWn
How to make the heart could create only one person, such as I?

system.bindMouse ("Ninzyaa", true);

function eventMouse (playerName, mx, my)
local size = 5;
local x_position = mx;
local y_position = my;
for t=0,2*math.pi,0.1 do
x=(16*math.sin(t)^3)*size + x_position
y=(13*math.cos(t)-5*math.cos(2*t)-2*math.cos(3*t)-math.cos(4*t))*size
y=-y + y_position
tfm.exec.addShamanObject(0,x,y);
end
end
Woebegone
« Citoyen »
1384110540000
    • Woebegone#8377
    • Profil
    • Derniers messages
    • Tribu
#457
  0
Magicalorb a dit :
Do you mean rainbow names?


This script changes the names in different colors

Uh help... It doesn't work..
Adorablebaby
« Citoyen »
1384118400000
    • Adorablebaby#0000
    • Profil
    • Derniers messages
#458
  0
A script to soulmate and un-soulmate two people?
And a command to make text into a bubble in the upper right corner? http://prntscr.com/23brf8
Aaand one that blocks one person's screen (or something else that makes them leave the room)?

Yeah I have a lot of requests. :L
Shamousey
« Consul »
1384160760000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#459
  0
Adorablebaby a dit :
A script to soulmate and un-soulmate two people?

This isn't possible.

Adorablebaby a dit :
And a command to make text into a bubble in the upper right corner? http://prntscr.com/23brf8

Use ui.addTextArea(1,"Text") for this.

Adorablebaby a dit :
Aaand one that blocks one person's screen (or something else that makes them leave the room)?

You can use a large text area for this (check the documentation to find out how to change the size of it to make it cover the whole screen).
Ninzyaa
« Citoyen »
1384187880000
    • Ninzyaa#0000
    • Profil
    • Derniers messages
    • Tribu
#460
  0
Woterek a dit :
system.bindMouse ("Ninzyaa", true);

function eventMouse (playerName, mx, my)
local size = 5;
local x_position = mx;
local y_position = my;
for t=0,2*math.pi,0.1 do
x=(16*math.sin(t)^3)*size + x_position
y=(13*math.cos(t)-5*math.cos(2*t)-2*math.cos(3*t)-math.cos(4*t))*size
y=-y + y_position
tfm.exec.addShamanObject(0,x,y);
end
end

Thank you very much!!
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 23 / 160 › »
© Atelier801 2018

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

Version 1.27