#modules
1 messages · Page 5 of 1
you can
you need to load the map xml
edit the attribute and load the xml edited as a new map
"yesn't"
So technically, you can't edit mao attributes directly
Only create an identical map with the parameter changed
lol i thought bout that, but it d be like very artificial
wat if u did all the gravity and wind.stuff programmatically 
thought*

đ
better than nothing X,D
Sarah ?
Sarah ?
Sarah!
samantha ?
some one can help me please: that is in C++
we can declared a function before, to be able to call it whene ever we want, and avoid the erreor: attempt to call nil
But i'm not sure we can do it in LUA , (because i think lua is an interpretation languadge...) But if some one know how to do, it will be great ^^'
What
No lol
foo = function ()
print ('bar')
end
foo ()```
Output: bar
foo ()
foo = function ()
print ('bar')
end``` This will give nil because
Youre trying to call foo()
But hasnt been declaref
That means youre trying to call something that doesnt exist
Who is foobar?
@glad mountain Lua is not an acronym* :P
In lua you can declare it before you set it a value
local func
func = function() end
But it isn't really useful depending on what you want to do
you can't do it without local, and if you use local the variable will only exist after that line
so
local b = function() print(a()) end
local a = function() return 1 end
b() - - error
there are its benefits too but it lies in other topics now :p
@sterile sparrow foo/bar are names that we use when coding something we don't know how to name
from now on there's a paradigm shift:
red = function ()
print ('panda')
end
red ()```
LUA is an acronym: Losers Unite Alliance
hmm yes of cours we can't call something who's not declared, but that's what I thinked, i juste want to know if there are something for doing this without just put the function before the calling line... uhu
But Bolodefchoco said to use local, but if i want to use it after more than just one line: it won't work, and i don't know if there are an other way...
If you create them without local they become global
aka an index of _G
I don't get the without just put the f before the calling line
what is a tfm lua exactly?
It's a programming language that allows you to make minigames in TFM
this is TFM Lua
Or the lua de queijo
Is the a LUA guide? :0
the moon is our guide
All praise the MOOON
đ đ
If Lua means moons, would that make the in-universe equivalents of Transformice Lua coders would be mice worshipping the cheese moon from the astrological event?
yes
@mild sage https://www.lua.org/manual/5.2/
In how many ways I can declare a function in Lua and what's the difference between all the ways
Luna, Lua and Moon are the same object in different languages
@mild sage technically, two, but actually five
Standard is the sugar syntax
function name(parameters)
end
Declaring as variable (my preference)
name = function(parameters)
end
What is the difference between that two
the sugar syntax gets translated to the second way during the compilation
nothing changes
Standard local (allows recursivity)
local function name(parameters)
end
Local variable (does not allow recursivity)
local name = function(parameters)
end
Local variable (allows recursivity)
local name
name = function(parameters)
end
If you're not familiar with Lua yet, go for the function name() end one. You can do anything with that one.
What?
can someone explain how to get XML from any map? i found this code but where do i put the map code?
xml=''
function eventNewGame()
xml=tfm.get.room.xmlMapInfo.xml
end
function printXML()
local m=math.ceil(xml:len()/2000)
print('<b><font color="#FF0000">'..tfm.get.room.currentMap..':</font></b>')
for i=0,math.ceil((xml:len()/2000))-1 do
print('<b><font color="#870087" >'..xml:sub(xml:len()(i/m)+1,xml:len()((i+1)/m)):gsub('<','<')..'</font></b>')
end
end
function eventChatCommand(name,cmd)
if cmd=='printxml' then printXML() end
end
system.disableChatCommandDisplay('printxml')
tfm.exec.newGame()
I guess you have to load the map yourself
what do you mean?
/np
Where you find this?
@mild sage
@night glen
adm="Muco#2311" --<-- Coloque seu nickname no lugar de
tfm.exec.newGame("#1")
eventKeyboard=table.foreach({32,80},function(_,k) system.bindKeyboard(adm,k,true,true) end) or function(n,k)
if k==80 then tfm.exec.newGame(tfm.get.room.currentMap) end
if k==32 then local xml,current=tfm.get.room.xmlMapInfo.xml,0
xml=xml:gsub("<",""):gsub(",0,",",,")
print("<R>"..tfm.get.room.currentMap.." XML:")
while #xml>current do current=current+3001
print("<R>"..xml:sub(current-3000,current):gsub("","<"))
end
end
end
cool
@mild sage
@fossil crag ?
what do you need? @mild sage
so âwhat do you need? (2)â 
what do you need? @mild sage
@charred dragon someone who understands lua
I know the language of the moon
@sterile sparrow are you there?
no
sorry
not forgiven
oh, no
@charred dragon ur pfp LMAO
@dense talon
Hi guys, i have an ask. Every time i use "local name= function() end", the script not function. So, i have to use the form "function name() end". Anyone can say me what happening?
Every Lua creators are sleeping kk
what does it show when you call the function? i did a simple function, but I didn't get any problems
moon
It not function, like it there's not.
Like, i use:
Local speak= function(p)
Print(p)
End
Speak(":)")
Nothing happening.
And, nothing appears on console #Lua
I don't know if that's what you want, but i did:
local fact = function (n)
n = 1
if (n == 1) then
local rand = math.floor(math.random() * (7 - 3 + 1) + 3)
print(rand)
else
print('the n is not 1')
end
end
fact()
Is it functioning to you?
I don't know if that's what you want, but i did:
local fact = function (n)
[..]
yeah
I have not a computer now to test again, it's a problem that i have a lot of time. Soon, i will try. Thank you.
Wait, i remember a app on my cellphone. I will try now.
you're welcome
It's functioning now đ§
But, when used event on tfm, it didn't function.
Like, eventChatCommand.
I always used: local eventChatCommand= function()
But, all of a sudden, it stopped to function.
I tested on command /lua, my code worked 
your code also works /lua
...
...
There's any error in my tfm i think...
I could to type something wrong.
When i get the computer i will try again.
Have a good day Cute#0513 đ
you too
what is this lua code?
It's a wedding script
Hang on maybe I can find it
This should be it
https://atelier801.com/topic?f=6&t=721417
thanksâ€ïž
@sick root
Os eventos do transformice usam _G
por isso usar local neles nĂŁo funcionarĂĄ
vc pode usar local onde quiser, exceto nos eventos do tfm
`function eventChatCommand() end
local eventChatCommand = function() end
print(_G.eventChatCommand == eventChatCommand) -- false`
Mas eu sempre usei, isso mudou desde quando?
Atualizou alguma vez?
Eu fazia isto normalmente kk
Mas ok, sĂł tirei o local e deu certo, obg.
Good evening, anyone know to create systems of gravity, colisions, impact, and physic? I already thought in many things, but nothing gave right.
I'm talking about any script language, not only Lua.
đ
VocĂȘ pode me dar umas dicas entĂŁo, depois?
Sobre o que eu tinha pensado, nĂŁo falei em inglĂȘs porque nĂŁo sou fluente e tava com medo de falar algp sem sentido kkkk
Era tipo assim: tinha table, que tinha os dados de um objeto, posição xy, tamanho. Daà eu detectava quando eles eram iguais ou quando uma parte encostava, de forma numérica.
Mas nunca deu certo.
Speak english mate ^^
for n in pairs(tfm.get.room.playerList) do
for _,k in pairs({40, 83}) do
tfm.exec.bindKeyboard(n, k, true, true)
end
end
function eventKeyboard(isim, key, eglmemi, x, y)
if key == 40 or key == 83 then
for pname,player in pairs(tfm.get.room.playerList) do
if pname == isim then
if player.isFacingRight then
tfm.exec.addShamanObject(19, (x+2), (y+8), 0, 30, 0, false)
else
tfm.exec.addShamanObject(20, (x-2), (y+8), 0, 0, 30, false)
end
end
end
end
end```
why is this not working
it should
but you're doing it the wrong way
First you add eventNewPlayer to assure it let's new people that join the room to use it
Then you remove the loop in keyboard
tfm.exec.disableAutoShaman(true)
function eventNewPlayer(n)
for _,k in pairs({40, 83}) do
tfm.exec.bindKeyboard(n, k, true, true)
end
end
for n in pairs(tfm.get.room.playerList) do
eventNewPlayer(n)
end
function eventKeyboard(isim, key, eglmemi, x, y)
if key == 40 or key == 83 then
local player = tfm.get.room.playerList[isim]
if player.isFacingRight then
tfm.exec.addShamanObject(19, (x+2), (y+8), 0, 30, 0, false)
else
tfm.exec.addShamanObject(20, (x-2), (y+8), 0, 0, 30, false)
end
end
end
if args[1]=="kill" then
if args[2]==tfm.get.room.playerList[noun] then
tfm.exec.killPlayer(args[2])
print(noun.." killed "..args[2]..".")
end
end
end```
what rpoblem
We can't guess what kind of error you're facing.
In order to get help, please be more specific.
system.disableChatCommandDisplay("kill",true)
system.disableChatCommandDisplay("kiss",true)
admins = { ["Egecanege#0000"] = true, ["Saysubio#0000"] = true, ["Umut#3377"] = true }
function eventChatCommand(noun,c)
local args={}
for arg in c:gmatch("%S+") do
table.insert(args,arg)
end
if admins[noun] then
if args[1]=="kill" then
tfm.exec.killPlayer(args[2] or noun)
end
end
if args[1]=="kiss" and args[2] then
if args[2] == tfm.get.room.playerList[args[2]] then
timer=5
for i=1,100 do
tfm.exec.displayParticle(5,math.random(400-300*4,400+300*4),math.random(200-200*2,200+200*2),0,0,0,0,args[2])
ui.addTextArea(802,"<font face='soopafresh' size='25'><p align='center'>Kissed "..args[2].." .</p></font>",noun,0,100,800,400,0x000000,0x000000,0,true)
ui.addTextArea(803,"<font face='soopafresh' size='25'><p align='center'>You have been kissed<br>by "..noun.." .</p></font>",args[2],0,100,800,400,0x000000,0x000000,0,true)
end
end
end
end```
@civic burrow !kiss not working
đ
ok
sorua={"a"}
sorub={"b"}
soruc={"c"}
sorud={"d"}
soru={sorua,sorub,soruc,sorud}
ui.addTextArea(3,soru[math.random(#soru)],nil,200,90,250,n,0x000000,0xF8FF00,500,true)
Where's the mistake?
any error message?
is n defined?
everything is ok
u can change
sorua={"a"}
sorub={"b"}
soruc={"c"}
sorud={"d"}
into
sorua="a"
sorub="b"
soruc="c"
sorud="d"
or
print soru[math.random(#soru)][1]
a yes i c wats the problem
@timber shuttle
@timber shuttle
The problem is that you have a table of tables
{ { "a" }, { "b" }, { "c" }, { "d" } }
it is working correctly, but not the way you expected
to fix that you'd remove { } from the other variables
and keep it in soru
đŠ
sorua={"a","a2","a3"}
sorub={"b","b2","b3"}
soruc={"c","c2","c3"}
sorud={"d","d2",",d3"}
soru={{sorua},{sorub},{soruc},{sorud}}
ui.addTextArea(3,soru[math.random(#soru)],nil,200,90,250,n,0x000000,0xF8FF00,500,true)
the problem continues
@vital slate @civic burrow
what?
but i told you to make completly the opposite :p
what do you want to be displayed??
which values??
You are using tables inside tables guy.
The right is: soru= {"sorua", "sorub", "soruc", "sorud"}.
What you wanna do?
How to disable respawn after 2 respawns ? please
local respawn= 1
eventPlayerDied= function(player)
if (respawn<= 2) then
tfm.exec.respawnPlayer(player)
respawn= respawn + 1
end
end
@mild sage
If you want that the players return to respawn, it's only change the variable respawn to 1.
Y e s
respawn<2
since the if will check if it's lower or equal to 2
meaning it will respawn at 0 < 2, 1 < 2 and 2 = 2
fixing to only respawn < 2 removes the equal condition
One quicky ask!! I need know advanced Lua to get in Lua Team? '-'
Depends on what you consider advanced Lua @sick root
you must understand all keywords of the language, understand how most of it and its functions work...
as long as you can develop modules without the need of copying or requesting snippets, you're ready to apply
yet the more "fluent" in the language you are, the higher your chances
pode falar em portuguĂȘs se preferir kk
O cara lĂĄ "reclamou" daquela vez entĂŁo preferi nĂŁo arriscar đ
SĂł porque alguĂ©m reclamou nĂŁo quer dizer que vocĂȘ nĂŁo possa
NinguĂ©m no servidor Ă© obrigado a saber inglĂȘs, ou usar ele na hora de pedir algum script Lua aqui
Ainda bem né, senão seria complicado kkkk
(a menos que vocĂȘ se sinta confortĂĄvel falando inglĂȘs)
Eu me sinto, sĂł preciso treinar mais. Quero ser um bom falante da lĂngua.
then don't use portuguese :p
Kkk
that was not a disaster at all @lofty steeple
is there troll maps Lua?
Troll maps Lua? đ€ . I've seen many maps where there's troll acts, but i don't know if it's Lua or no. ' -'
What does lua mean
scripts
lua means moon in portuguese
Lua is a brazilian Scripting Language. Lua (portuguese) >> Moon (english), translating.
what
Didn't you understand?
O-O
Someone have Ctmce's Lua?
Thanks! i have it now đ
Not lua, but does anyone know where i can find the swf/svg/vector files for the different grounds ? (wood, ice, trampoline, chocolate, cloud)
Chrome
excuse me what
they use browser đ
Basic DOM inspector
imagine not downloading tfm
Easy
yes
that what it does
the standalone does that
the swf has an id and request it to be downloaded and loaded inside the swf
no i mean on my version of chrome going to https://www.transformice.com/images/x_bibliotheques/x_pictos_editeur.swf just downloads the file
you need to open it with a decompiler
well yeah i did that but like i said i didn't find the grounds, are you sure they're there ?
oh ok thx đ
inside the main swf the objects
in the pictos, the map objects
you actually need to open it while the game is running
tools -> search swf in memory if you're using this decompiler
and find the correct swf that goes to the grounds
i knew this was the right place to ask :p
when you export it it looks terrifying
i think exporting the sprites as svg works
never tried
yep exporting these can be bad
it looks weird when i do it with some
maybe is my outdated version
oh
gimp can't actually load svg properly
kk
hi
@jovial sun hi
hi
@mods
@sullen seal @median bay can you do something about the person trying to cross trade and scam others in e2 when youâre free?
Why did you ping me in this channel
because you were choosen
Yea
.
..
...
....
Anyone know how to re-write the name of a topic?
I need change the name of my topic quick!
If a sentinel see it, he can lock the topic!!
;-;
Only sentinels can change topic titles.
You can report the OP of the topic and ask for a title change there
I need help. There is the function string:match(), string:gsub(), between other functions. I wanna know how to make this syntax: something:name(); I think it's possible, i saw it already inside a script of other person.
But i usually create classes so:
local tabela= {
["primeiro"]= 12
}
print(tabela.primeiro)
For an example... ' -'
How to make that format?
Can you teach me this?
local className
do
className = { }
className = setmetatable(className, {
__index = className,
__call = function(self, ...)
return setmetatable({
field = 0
}, self)
end
})
function className:add(x)
self.field = self.field + (x or 0)
end
end
local y = className()
y:add(10)
print(y.field)
However I recommend you using it this way
local className
do
className = { }
className.__index = className
function className:new()
return setmetatable({
field = 0
}, self)
end
function className:add(x)
self.field = self.field + (x or 0)
end
end
local y = className:new()
y:add(10)
print(y.field)
obj:method() is the sugar syntax for obj.method(obj) <- for extra knowledge :p
className.add = function(self, x) makes more sense to me, too, but eh

i have no idea whats that code for
Why I can't run Lua script?
Make sure you have 100 gathered cheese and necessary permissions to load lua in tribe houses
I have every permission. I have already ran lua script today, but It doesn't work now
Oh, there are some problems with module rooms too
Could be a problem with the server
Ok I can't run too ...
I can run script now
Oh nice
Transformice itself is made in Flash if that's what you mean
But it allows to run Lua scripts in-game
z
Ohh thx @ivory pilot
Oh sry, i edited post
does anyone has a vanilla lua ?
what is a sentinel
forum moderator
oh this isnt help ahaha, my bad
Anyone have Burlas Lua Racing script ?
Do you want a script that do burlas for you or that train you to learn burlas??
I think they mean mulodrome
No, go to #records or #utility and work hard
But how it will be look?
You practise the map, like everyone else did
Do you want a script that do burlas for you or that train you to learn burlas??
@sick root I mean like Elitecorn Lua with Dibbi burla maps
I know but it take some times to check all maps one by one on records google sheet, that's why I need Lua like on Elitecorn Lua where Dibbi made some burla maps
a
b
z
d
K
f
g
?
i
E
function eventChatCommand(name,command)
if command=="bigger" then
tfm.exec.changePlayerSize(name, 5)
end
if command=="big" then
tfm.exec.changePlayerSize(name, 3)
end
if command=="medium" then
tfm.exec.changePlayerSize(name, 2)
end
if command=="normal" then
tfm.exec.changePlayerSize(name, 1)
end
if command=="small" then
tfm.exec.changePlayerSize(name, 0.65)
end
if command=="smaller" then
tfm.exec.changePlayerSize(name, 0)
end
end
what code is this
for changing sizes
Eveyone that play TFM is mad omg kkkk
is there a lua that lets you be sham in the tribe house?
tfm.exec.setShaman("name")
tag too?
yes @frigid zephyr
tfm.exec.setShaman("krich165#9951")
tfm.exec.setShaman(krich165#9951)
tfm.exec.setShaman"krich165#9951"
which?
100 mice???
0:
whats did they win 0.o
Hello everyone, who have the Racing Lua Burlas script ?
if u guys wanna play, #tfmbday is now semi-official ^^
Oh nice !


So #tfmbday is like a reincarnation of #retro?
Please tell ne it will stay after the birthday
Please, I liked #retro so much and I hate that it's gone
retro is gone?!
Yes, sadly
whats retro?
#retro is a module that brings u back the experience of old transformice
Yeah, it plays old-styled vanilla maps and past event maps
What the better age of TFM for you? Today or past?
Wrong channel
oooh i am also tfm!!!
``toDespawn={}
--
function eventMouse(name,xco,yco)
ax = tfm.get.room.playerList[name].x
by = tfm.get.room.playerList[name].y
x = tfm.get.room.playerList[name].x - xco
y = tfm.get.room.playerList[name].y - yco
if ax < xco and by < yco then
xs = x/10
ys = y/10
elseif ax > 0 and by < 0 then
xs = x/10
ys = y/10
elseif ax < 0 and by > 0 then
xs = x/10
ys = y/10
elseif ax > 0 and by > 0 then
xs = x/10
ys = y/10
end
id = tfm.exec.addShamanObject(6, xco, yco, 0, xs, ys, false)
table.insert(toDespawn,{os.time(),id})
end
--
function eventLoop(time,remaining)
for i,cannon in ipairs(toDespawn) do
if cannon[1] <= os.time()-3000 then
tfm.exec.removeObject(cannon[2])
table.remove(toDespawn,i)
end
end
end
--
for name, player in pairs(tfm.get.room.playerList) do
system.bindMouse(name,true)
system.bindMouse(player,true)
tfm.exec.bindKeyboard(name, 67, true, false)
tfm.exec.bindKeyboard(player, 67, true, false)
end
--
function eventNewPlayer(name)
tfm.exec.bindKeyboard(name, 67, true, false)
system.bindMouse(name,true)
end``
wot is this
lua script
of wahT
It's not easy identify only by the image.
I think it's spawn a Shaman Object when we press a specific button...
Analyzing the script it's possible to see that it's a script to spawn a ball where the player clicks on the map screen. The ball should also disappear in approximately 3 seconds.
it's easier if you try it and see instead of asking :p
Really :v
wow this looks confusing
why?
{"Pixel 1", "165965055b2", 25, 34, "165965055b2", 25, 34};
what is "165965055b2"?
if you are working with images the "165965055b2" is the image ID, for the function tfm.exec.addImage in fact the right would be "165965055b2.png"
Who keeps ghost pinging me 

' -'
O frick she uses Elisah's powers
@jovial sun Which this Windows 7 Ultimate, Home Premium ... Which?
Huh?
alfie is in village 1 and everyone around them lol
Alguém tem script de vanilla? Urgente please
Tem esse de x1 que achei.
``--EditĂĄveis
p1="jogador1"--Primeiro jogador
p2="jogador2"--Segundo jogador
max=5--Limite de pontuação(vencer o jogo)
maps,score,winner={},{},""
score[p1]=0
score[p2]=0
scorebar_text,won="<p align='Center'>%s - %d X %d - %s\n","<p align='Center'>%s ganhou!\n"
function eventLoop(a,b)
local alive,UI=0,ui.setMapName
local txt1,txt2=scorebar_text:format(p1,score[p1],score[p2],p2),won:format(winner)
local txt=winner=="" and UI(txt1) or winner~="" and UI(txt2)
table.foreach(tfm.get.room.playerList, function(i,v) alive=not v.isDead and alive+1 or alive end)
alive=(alive==0 or b<=0) and tfm.exec.newGame(maps[math.random(#maps)])
end
function eventPlayerWon(p)
if p==p1 or p==p2 then
score[p]=score[p]+1
if score[p]==max then
winner=p
end
eventLoop(0,0)
end
end
for i=1,140 do
maps[i]=i
end
tfm.exec.disableAutoNewGame()
tfm.exec.disableAutoShaman()
eventLoop(0,0)``
?
What you mean by reset player's jump? '- ' you can't control the physics of the game
You can change player's jump using eventKeyboard event and function tfm.exec.movePlayer
i meant reset the jump trigger like fly uses
anyway, do you guys have any idea if this comand is funcorp/lua staff only?
for module team only i think
it may cause lag for players that's why it require a module member
yes, it's MT only
there's no jump trigger, fly is just adding Y velocity to the player
is there any way to check if a specific player is in a room (like with a name) without iterating through the list?
local PLAYER_NAME = "King_seniru#5890"
if tfm.get.room.playerList[PLAYER_NAME] then
print("player is in room :)")
end
this is just an example, you can use it like that @tawdry slate
you actually dont need to iterate
since the names are the keys in the playerList table
yes
anyone have a racing lua script
please dm me the pdf or the file i need one really badly
tfm.exec.newGame'#17'
tfm.exec.newGame'#17'
@civic burrow
what's the difference between categories 17 and 7?
(both categories from Racing Maps)
Got it! Ty for explaining
racing lua plss
I'll send for you in private.
I don't know how to use the script, so i will send the link too.
olaaaaa
You guys need to be more specific when requesting a script.
I can answer in a rude way with tfm.exec.newGame(0) that loads a vanilla map. That's what one can understand from your request.
Programming is an art that requires details. Many details.
And it's likely to get ignored when you don't provide them.
PROGRAMMING IS AN ART
it is :p
art is a programming
agreed. i once accidentally opened a picture as a text document and there was code everywhere
^
Dude, is possible to see who is changing the tribe house map using a script?
no
no
no
:^
is there a simon says script? i found a topic about a module one but it didnt give a script
There is somewhere
But since the forum's down right now
I can't really search for it right now
#anvilwar0mestre
thanks
@civic burrow Are you here?
yes
Does exist a surble lua?
Oh, that was the one with the surfing Pikachu, right?
I think it might have not even been a Lua thing? The room didn't have a # in the name
Yes it was that, but the room has been deleted since a long time.
So i have decided to ask if a player had a lua of this module
Yeah if I had to guess I'd say it wasn't Lua
I think it might have been an official thing
I remember it had different physics altogether or something
And the sprite is hosted on the official site
http://transformice.com/images/divers/pika_surf.png
If it was Lua it would probably be on images.atelier801.com instead
Yes it was an official module but all the modules have a script to work, and maybe a player created or had it. That's why i asked
.
yes, it was made by pikashu
it's hard because the map was weirdo, no idea how to recreate
otherwise it could be remade as a module
If i give you the map, can you recreate the script or is it very hard?
@jade schooner(i dont know a rip about a lua, but if you're talking about <C< <Z> thing, it's that) they would need the perms of each single item and find the 00,00,00,00 perm number and its exact position sory if it's not clear
Maybe I can recreate the map but the script it's hard, because the mouse seems using the "Foliage Consumable Effect" that limit the mouse movement to spin in your own axis
i've no idea about this module
if u have a video or more details about it, it'll be good
if it was a module so it's coded with lua
hmm no it's not coded by lua, you said u have the map, can u send it?
It can't be Lua, can?, it's impossible to create that physics used in Surble with only Lua API
The map is @1769843
Sure is that map
Hmm, I recall you could get to a room named surble with /mjj command, it was like a normal room though (removed at that point?)
Probably it wasn't lua then
Ah no sorry the map code change every time so i don't have it
it is possible to make something like this if there map
I don't think you can rotate images with lua though
you can use shaman/physic objects instead of mice
like hide the mice image using empty image and make object that follow the mouse
the object would have laggy motion, no?
since sync & stuff
not to mention, if it is teleported to the mouse, the eventloop limitations will help the choppy motion too
it'd probably be better if the object was moved independently with moveobject
in this case we can remove the mice, and make the objects move instead of mice with keyboards
hmm, that could work
what about the side effect of having the object roll over when not intended?
what do you mean?
actually it depends on the object
but for example, if you take a ball (the nearest hitbox of a mouse), it will roll and give you an upside down mouse sometimes
regarding map, what about animated sand dunes and those curved grounds?
we can add physic objects such as (Circle/Rectangle) in random axis it would be enough as map
about sand animation we can use newTimer and circle physic object or it's enough to use images
The image animation can be made with a "Sprite Image API" which allow to create "SpriteSheets" in Lua API
Copying the original game is more harder than creating a new one
the original game is still in game files, they can back it if they want
Yep
really
i found the sprite of "Pikashu in pink plank" in some image files from tfm site
Hi
how is a mouse position detector made
well
local system_bindKeyboard = system.bindKeyboard
local tfm_get_room_playerList = tfm.get.room.playerList
local playerList = {}
eventNewPlayer = function(playerName)
playerList[playerName] = {
x = tfm_get_room_playerList[playerName].x,
y = tfm_get_room_playerList[playerName].y
}
for _, keyCode in next, { 0, 1, 2, 3 } do
for _, isDown in next, { true, false } do
system_bindKeyboard(playerName, keyCode, isDown)
end
end
end
eventPlayerLeft = function(playerName)
playerList[playerName] = nil
end
eventLoop = function()
for playerName in next, playerList do
playerList[playerName].x = tfm_get_room_playerList[playerName].x
playerList[playerName].y = tfm_get_room_playerList[playerName].y
end
end
eventKeyboard = function(playerName, keyCode, isDown, xPlayerPosition, yPlayerPosition)
if playerList[playerName] then
playerList[playerName].x = xPlayerPosition
playerList[playerName].y = yPlayerPosition
end
end
for playerName in next, tfm_get_room_playerList do
eventNewPlayer(playerName)
end```
how i learn to code in lua in order to make it myself
that would give me more freedom
for _, keyCode in next, { 0, 1, 2, 3 } do
for _, isDown in next, { true, false } do
system_bindKeyboard(playerName, keyCode, isDown)
end
end
is terrible
should be
for k = 0, 3 do
for i = 1, 2 do
system_bindKeyboard(playerName, k, keyCode, i == 1)
end
end
also you'll want to use tfm.exec.lowerSyncDelay
learn â https://www.lua.org/manual/5.2/
learn â https://www.lua.org/manual/5.2/
The manual is good, if you doesn't understand you can google it for examples
Can someone pass me the wedding lua?
I think you can find it here https://atelier801.com/topic?f=6&t=721417&p=1
Thx! ^^
how do rat get bigger
11/10 english
how do rat get bigger
tfm.exec.changePlayerSize("PlayerName", size)
ha, played with that code a lot
feeling like a dev when i use that in thouse
hello!Does anyone have a script for a shaman?
@scenic pewter
tfm.exec.changePlayerSize(name,size)
yes thank you
hello!Does anyone have a script for a shaman?
@celest pond The simplest way would be just
tfm.exec.setShaman("Avavvavav#5296")
You could make something more advanced like a chat command for it or something but if you just want to become shaman in the tribe house that's enough
omg thaaaaaaaaaaank <33
yey
/ch also works
/ch also works
Technically it does but it makes you shaman in the next map that's loaded in the tribe house, whereas Lua allows you to become shaman instantly after running the script
can i have lua in utility?
No
Nope
Utility is its own script, meaning if one were to somehow run a script while Utility is active it would just overrun Utility
ohh, that makes sense
Can someone send a me vanilla script
ty
who has a better vanilla script the one that says "The player scored the last point"
what is 'the last point'
@woven minnow stalk the forum for a topic called vanilla x quarantine
Or something like that
It has it there
theres this lua thing where you can marry 2 different mice. when i press "i do" it breaks and nothing happens. why is that? (btw this lua was made by tat)
oops
idk why it did that
i guess the text was 2 long
ÂŻ_(ă)_/ÂŻ
Oh
Spawn 24
q
Lua's dead
f
f
f
f

f

ÂżAlguien tiene el cĂłdigo lua de un mapa para sorteos?
f
ÂżAlguien tiene el cĂłdigo lua de un mapa para sorteos?
@chrome marlin Tienes que hablar en ingles
Is there any Lua for giveaway out of tribehouse ?
i'm having issues with shamousey
@chrome marlin Tienes que hablar en ingles
@jolly zinc Em, no necesariamente.
@jolly zinc Em, no necesariamente.
@chrome marlin :0
What is Lua? xd
coding
Thank you
^^
is the star that orbits the Earth
moons are not stars lol
đ
you create ur own fur by drawing, simple @mild sage
moons are not stars lol
Now is
does anyone have a bootcamp script
Like what exactly?
can someone send me a giveway lua
lua de sorteo* lo lamento mi ingles no es perfecto
srry my english isnt perfect
@chrome chasm
admins = {
["Yourname#0000"] = true
}
players = {}
function giveaway()
for name , player in next, tfm.get.room.playerList do
table.insert(players,name)
if admins[name] then
ui.addTextArea(0, "<a href='event:start'><p align='center'>START",name, 743, 365, 52, 29, 0x05080a, 0x000000, 1, true)
end
end
end
giveaway()
function eventTextAreaCallback(id,name,callback)
if callback =="start" then
ui.addTextArea(1, "<font size='27'><p align='center'> Winner : " .. " " .. players[math.random(#players)], nil, 8, 25, 789, 54, 0x090d0f, 0x000000, 1, true)
end
end
coding
Does anyone here have a racing script with hacks? only hacks for which I started the lua
alguien aqui tiene un script de racing con hacks? solo hacks para el que inicio el lua
@pulsar condor ty xdE
@inner geode hacks ? like what
Alguien tiene el cĂłdigo de un module tutti frutti/stop que es br?
Manko?
does anyone of u guys knows how to make script 10+ mice follow you wherever u move !?
you can change their position
LMFAO
lol
This is the exact purpose Lua was added to Transformice for
@winged geyser do u know the lua to mlp
ok
Tinha q ser aki
roubo de conta?
n
Ded chat lol
3
does anyone have the hangman script
anyone here knows how to make a module?
coding lua
lol
no @winged geyser
ok @winged geyser il try
ok @winged geyser don't worry
@winged geyser ill dm u the lua @winged geyser
heavy ping conversation

Is it somehow possible to get the XML of a vanilla map like 85?
Since it doesnt work with a XML Printer
It works
Just convert the whole < char to [ for example
Copy it, open notepad++, Ctrl+H, reverse the conversion
Ah thanks!
If you want the xml of a vanilla, there is a French topic where you can find almost all of them
@sick obsidian can u send me the link? would be nice
ty
lua?
Programming language
Can someone give me a XML to make maps longer? I'm planning to do a mansion map.
<P L="---" H="---" />
its in the beginning of the xml and you can adjust width/height by filling in the dashes
thanks
Uhm why when i try loading the xml with the width and height changed it says map is invalid
can you paste the edited code here
@grim citrus <P L="7000" H="6000" />
im pretty sure that there's a width and height boundary but im not completely sure what is it, you can try making them a little smaller
i tried and... didnt work
it might be something else with your xml then
@grim citrus <C><P H="800" L="1600"/><Z><S /><D /><O /></Z></C>
The max length for a map without no défilante attribute is 1600x800
With défilante parameters you can reach 4800x800
thanks, i didnt know it wouldnt load without having defilante parameters
It can load but when you will test the map, it will be auto resized to the max height and length
You can have an infinite dimension if you run the xml with lua, btw.
It's not really infinite, if you exceed 32767x32767, the coordinates will break completely
Yes I didn't mean the true infinity.
This value can be just considered as infinite considering the time to move around ;)
lua
@sick obsidian tysm!
yw!
what does mean this?
function to add map joints
uhh, i gotta see wat it is by myself nvm
i need a lua which legit just changes the map
or just doesnt do much
like size change
what is the lua script's body? i was looking for this but i couldnt find it in the wikia or lua's site đ€·ââïž
Lua script's body?
If you are looking for the Transformice API documentation, you can find it here: https://atelier801.com/topic?f=5&t=451587&p=1#m3
If you are looking for Lua language documentation, you can find this here: https://www.lua.org/manual/5.2/
like html. how to build the script/code
Last update was in 2015 from 5.1 to 5.2, I think
welp i meant smth like this
if there is smth like that for lua bc i cant get the codes's row :')
thanks for sending me everything there tho but i didnt see that part^
Actually Transformice uses Lua Just-In-Time, this version mixes version 5.1 and 5.2 of Lua.
If they used the original version of Lua, we would have been awarded version 5.4 and its features.
welp i meant smth like this
HTML is not a programming language, this is a small example of the syntax of lua:
https://pastebin.pl/view/b7d9aad5
If you want to learn more about this just search for video classes or online programming courses.
Pastebin.pl is a website where you can store code/text online for a set period of time and share to anybody on earth
thanks ^^
what brought lua on tfm?
its embeddable characteristics
Hi, can someone explain me please how to use lua for bootcamp?
does anyone know how to make artistic maps with lua? (like the maps that Wec does which usually appear on utilities)
oh i thought it was just extended grounds, but is there any way to extend the grounds limit when map editing
L="1600" H="800"
Ăšyi
@cobalt saffron I did it but I dont know if it is correct so can I have screenshots with the uhh language?
good
but can I have screens?
screens of what
âą [17:11] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Script terminated : LUA on room [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] unloaded. Reason : No more player
coordinates, or facing?
ok I got
Does anyone have the flappy bird in tfm script
If anyone has it dm me
Isn't it on forums already?
Z
Anyone can help me with this script it gives me the following error:
Init Error : [string Name#0000.lua]:7: ')' expected (to close '(' at line 6)
who={["Name1#0000"]=true,["Name2#0000"]=true}
function eventTextAreaCallback(id,n,cb)
if cb=="anvil" then
for i = 1, 5 do
tfm.exec.addShamanObject(10, math.random(10,795),math.random(30,350)
end
end
end
for n in next, who do
ui.addTextArea(1, "<a href='event:anvil'>button",n,100,200)
end
tfm.exec.addShamanObject(10, math.random(10,795),math.random(30,350)
u forgot a ")" at the end of that line


Does any of u guys knows the lua code which control other mice?!
ah yes
i can controll my enemies
What is the code to put a map?
not @
but in lua
tfm.exec.newGame(map)
yeah me neither I think only funcorp members have it for now
but we'd appreciate it if you could give us <3
Anti-macro script?
nah is actually hard to make one
not sure how they got one but to make an anti-macro script you must create an algorithm
"algorithm"
not even that but i will show you an example of what you want
also i will make a system to avoid false positives
idk the script worked pretty well there were lots of players gettint detected
then it didn't worked
lots of false positives
there is something
when you press a key there is a pressed and released status
for _, keyCode in next, keyList do
system_bindKeyboard(playerName, keyCode, true, true)
system_bindKeyboard(playerName, keyCode, false, true)
end
a delay between this could be several ms
in human conditions of keyboards
a macro would erase to 0ms or 1ms the press-release status
and proceed to the next key press-release status
until the combo of the walljump is done
it also would lower the time between the key presses
and if even checking this is useless
there could be moments when this conditions happens
but that doesn't means you are using macro
to detect who is doing a macro and or filterkeys
one case at a time is nothing
a score system must be created
to record in time in round to detect when a player is detected more than 5 or x cases
then you can clearly confirm the user is cheating
rather than a false positive
but hey funcorps can have access to lua
but doesn't mean they could think a way of really implementing anticheats
this is a real job of an engineer
and some of these anticheat engineers usually have to cheat first or develop a cheat so they know how it works so it get patched
if im not wrong, its laggy
i know
like if you have a keyboard event binded, it wont even register properly if you spam it
so yes, really curious how
lol
what i would do is to make a record of the os_time when pressed a key and a release and a key press
put an initial ms value of barrier between who is macro filter and human keyboard
but also an score
there could be a condition of hey it looks macro
but over time is just one condition
the score would just sum over the round
and at certain score it is clearly a macro filterkey user rather than a false positive
the idea is that
i know how to develop it and the issue will be having human and macro users to test it
đ is natural i do not have a funcorp power to do whatever i want in the game
who knows maybe youre on an international blacklist
you could still make it and send to a funcorp member
nah
if i make such system i wouldn't never release it to the game but for other module members
only mt team and module creators would have access to it
it seems to give me nice values
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 331
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 6350
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 124
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 72
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 102
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 58
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 0
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 62
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 109
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 202
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 457
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 124
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 83
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 128
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 41
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 63
âą [13:59] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] 479
yes
that 0 tho
i need to see which one is the pressed and the released
yes that is why told you we need score system like an algorithm
to record in time until x score
so we can confirm is a cheater
and not the buggy system or the player lag
âą [14:04] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Is Pressed true Time 99
âą [14:04] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Is Pressed false Time 424
âą [14:04] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Is Pressed true Time 123
âą [14:04] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Is Pressed false Time 109
âą [14:04] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Is Pressed true Time 46
âą [14:04] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Is Pressed false Time 123
âą [14:04] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Is Pressed true Time 56
âą [14:04] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Is Pressed false Time 474```
you can see how people have human values by here
i need to check which keys are
same
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Up Is Pressed true Time 41
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Left Is Pressed false Time 114
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Up Is Pressed false Time 48
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Right Is Pressed true Time 102
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Right Is Pressed false Time 448
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Left Is Pressed true Time 67
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Up Is Pressed true Time 0
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Up Is Pressed false Time 159
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Left Is Pressed false Time 0
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Right Is Pressed true Time 102
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Right Is Pressed false Time 437
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Up Is Pressed true Time 123
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Left Is Pressed true Time 52
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Left Is Pressed false Time 73
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Right Is Pressed true Time 48
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Up Is Pressed false Time 0
âą [14:15] # [*51 32 68 68 62 33 4D 67 64 47 68 6C 62 33 4A 35] Which Key Right Is Pressed false Time 428
sample test walljumping
ÂŻ_(ă)_/ÂŻ
spam a button gives me always ~60ms
and i'm using double keyboard
0ms usually gets rejected
since is the dumb system
i need to test with the macro or filterkey to see values
if we can ever see the difference
we could make it like runtime checking
we collect the time during x seconds
and if it's lower than a certain value + the score is high = clearly macro
yes some funcorp member made a racing test room
@subtle widget Who did it? How did the member test it?
I don't remember who did it but I think it did well like the same players would get detected everytime
idk what they were using but I'm assuming either ahk or filters
I think it was fafee#0000 or something similar
but I'm not sure
I asked if he could share the script but didn't replied so
o/
pls send script
with the doll script how can i controll multiple rats
i want to controll my whole tribe
-- Editing the following code is not advised.
this sign cant stop me because i cant read
What is Lua? ;-;
scripting language
Bruh
Does someone have this new anti-macro script, please ?
I don't know where to find it
@coral vale anti macro?
send me your code
the only official working code is from the staff and sharing it is leaking which results in a ban
other prototypes also works
but we are not allowed to share the prototypes
the only official working code is from the staff and sharing it is leaking which results in a ban
@cobalt saffron that's not true
if you have access to it and you're not staff, then you're free to share it
and it's not from staff since faeeeeeidk is just a funcorp
and they can't ban you for that
the excuse is that cheaters will bypass the script
i wonder how since is just spam the same key in less than a second
staff must not use scripts to ban people
scripts aren't relyable
even worse when they weren't made by people from the module team
only if it's a tool provided by the company
we dont have any scripts for macros and funcorp isnt held hostage to not share one
they don't have to
With the haunted doll script, how can there be 2 dolls and 2 gods?
is very easy to create anti-macro
you need to know how macro works
so you can find a way to detect macro behaviour
nope
detect regedit and filterkeys it is
but a replay system can just erase that
we could watch player rounds easily
Does the staff have a replay system?
we can build one with what you know
đ€
b
help me i made a script and it crashed my game and my pc auto restarted xdddd
that's not impossible :p
i didnt said for tfm
@mild sage

:spray:
Only module team members can use it
FunCorps too
how to desable afk death?
tfm.exec.disableAfkDeath()
how to make rats auto spawn
like in bootcamp
when they /mort
they spawn
respawn*
eventPlayerDied = tfm.exec.respawnPlayer

