#modules

1 messages Β· Page 4 of 1

fathom meadow
#

Like you derp

#

No

#

U nb

#

2 nbs right now

#

No

#

You and @chrome mulch

#

I'm so pro shades

#

Yes

#

Now 3 nbsderp

#

No @sharp portal so nb

#

4 nbs now πŸ˜‚ πŸ˜‚

#

Wlc bruno

#

Goodnight all

#

@sharp portal @mild sage @chrome mulch Guys I'm sorry about pings just I joking

mild sage
#

noo don't delete lua 😭

sterile sparrow
#

lets get back on the topic

for name, player in pairs(tfm.get.room.playerList) do
    tfm.exec.killPlayer(name)
end
fathom meadow
#

@chrome mulch

cloud prawn
#
function eventLoop()
    for name in next, tfm.get.room.playerList do
        tfm.exec.playEmote(name, 0)
    end
end
fathom meadow
#

@chrome mulch How are u today?

fathom meadow
mild sage
#

@sterile sparrowno

narrow jolt
#

@sterile sparrow yes

fathom meadow
sterile sparrow
#

and move ur pings to #cn pls its pretty ded there

sharp portal
#
     player(discord.tfm.lua.channel) do
     say("f")
 end```
timber pelican
#

Maybe it's the Naomi's Programming Language

narrow jolt
#

@sterile sparrow they migrated to the map channel instead lmao

fathom meadow
#

Lol

#

Shut up

sterile sparrow
#

😑

fathom meadow
#

Okay, sorry @sterile sparrow

sterile sparrow
#

no problem ^^

fathom meadow
#

Thank you ❀

narrow jolt
#

@sterile sparrow so what’s it like understanding moon code

sterile sparrow
#

i cant understand it cos i see no moon in the sky where i am

narrow jolt
#

Sounds depressing

charred pilot
#

πŸ€” Hey, to all who are good in lua, is it possible to make something like flipaclip in tfm? (Flipping animation maker, cuz i'm lazy)

mild sage
#

no

plucky tendon
#

you can

mild sage
#

wait wtf is flopaclip

#

@mild sage

mild sage
#

@chrome mulch

plucky bridge
sharp portal
#
if
     player(Melibellule#0001) do
     see messages(discord.tfm.lua.channel), status=online(read=TRUE); then
     player(execute.comand.self)do
     delete(offtopic.messages), and 
     order(body)
          NYOOOM
if 
     player(Melibellule#0001) do
     see messages(discord.tfm.lua.channel), status=offline(read=FALSE); then
     player(execute.comand.self)do
     write(repeat, 9999999)=true(ping.random.user)
 end
 end```
sharp portal
#

GUYS a module member hired me

#

now my life is completed

#

YES

#

look

spice root
#

I’m disowning you both

cursive wedge
#

LOL

sharp portal
#

TIMO NO

#

if msg.author.status ~= "offline" then
    for message in channel:getMessages():iter() do
        if not message.content:find("lua") then
            message:delete()
        end
    end
else
    for i = 1, 9999 do
        message.author:send("@/Melibellule#0001")
    end
end```
#

@cursive wedge look im crying

#

i love it

cursive wedge
#

LOL

timber pelican
#

It won’t work

#

Discord has limitations of 5 every 5 secs I think

sharp portal
#

its better than what zyu and me both made toghether tho

sterile sparrow
#

animations dont really work out in lua, especially if there r lots of ppl in the room...maybe only using eventLoop may not crash

plucky tendon
#

πŸ€”

fathom meadow
sharp portal
#

i agree

fathom meadow
#

Lol

#

Who pinged me? angry_ angry_ angry_

mild sage
#

@mild sagewtf

#

Not me bruh

fathom meadow
#

I think Xavier

mild sage
#

Lol ok

fathom meadow
#

Pinged me and bruno

#

Not uderp

#

OMG

#

Really?

#

Stop pinged me again angry_ angry_

mild sage
#

Who ping me

#

😑

fathom meadow
#

Not me

#

@chrome mulch Ping all peoples derp

mild sage
#

Xd

#

Lol

fathom meadow
solid solar
#

how I can do checkpoints?

mild sage
#

Wat

mild sage
#

who

#

ng

#

ping

#

md

#

me

cloud prawn
#

@solid solar shooooould work but no promises

local SPACE_KEY = 32
local checkpoints = {}

function eventKeyboard(name, key, down, x, y)
    checkpoints[name] = {x = x, y = y}
    ui.addTextArea(0, "<a href='event:checkpoint'>Checkpoint</a>", name, x, y, nil, 20, 0x324650, 0x000000, 0.5, false)
end

function eventNewGame()
    checkpoints = {}
    ui.removeTextArea(0, nil)
end

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

function eventPlayerRespawn(name)
    if checkpoints[name] then
        local coords = checkpoints[name]
        tfm.exec.movePlayer(name, coords.x, coords.y)
    end
end

function eventTextAreaCallback(id, name, callback)
    local coords = checkpoints[name]
    tfm.exec.movePlayer(name, coords.x, coords.y)
end

table.foreach(tfm.get.room.playerList, eventNewPlayer)

-- Spacebar to checkpoint!
pulsar condor
#

@cloud prawn good script its very nice πŸ˜„

fathom meadow
hasty sierra
#

Someone teaches me the LUA language.

#

Anyone who interests me calls me in private.

solid solar
#

@cloud prawn ok! I'll test, ty

#

Yay! It worked

cloud prawn
#

😁

woven haven
#

i saw a ghost ping

#

hmmm

paper niche
#

WHO GHOSTPING ME

sharp portal
#

@paper niche

paper niche
#

@sharp portal u want kiss?

sharp portal
#

w-wha

paper niche
#

😚

paper niche
#

OH COME ON

#

STOP

mild sage
#

to be used moderately

#

πŸ˜‚ I'd like a more detailed explanation

mild sage
#

😢

mild sage
#

πŸ˜‚

sterile sparrow
#

@ moderators why do u decrease the number of neutrons in me :(

last pagoda
#

So you cease to exist

paper niche
#

bakatat

narrow jolt
#

Restrain yourself

last pagoda
#

Kinky

fathom meadow
barren turret
#

hhi

last pagoda
#

Jfc 30 reactions what

fallen sand
#

respect2

#

my bird just fell face flat on the keyboard

#

that's the respect we need

sharp portal
#

34*

last pagoda
#

Can we get it pinned so I can stack reactions indefinitely ty

bronze flint
#

🌚

charred pilot
#

🌝

bronze flint
#

πŸŒ—

mild sage
#

M00n

fathom meadow
civic burrow
#

It's internet consuming because it sends a lot of packets if you use it in hacky way, but using it alone is just fine, however you have a limitation of 40 of them simultaneously.

#

However, Shamousey's doc is outdated. Check Pikashu's

narrow jolt
#

Oh my

#

It’s bolo

mild sage
#

When people will stop spamming moon things and really discuss about Lua

#

probably never :c

civic burrow
#

fun shit in #bolodefchoco0mastermind

faint egret
#

πŸŒ•

bronze flint
#

πŸŒ•

faint egret
#

too late xav, i already ate you

#

πŸ™ƒ

civic burrow
#

this channel is SO boring

sharp portal
#

always

civic burrow
#

Maybe if admins fixed LUA to Lua in the damn description

#

But abandoned it is

civic burrow
#

My OCD would be dead too, but it's not

sharp portal
#

i would be dead too, but i'm not

mild sage
fathom meadow
#

Sun

barren creek
#

SUN AND MOON

drowsy plover
#

Where is the lua event contest results? :C

paper niche
#

i feel summoned

civic burrow
#

We are still voting! Stay tuned in the Announcements forum section, they'll be released there

narrow jolt
#

❀

charred violet
#

lua>>>???

mild sage
#

@charred violetlua means moon

sterile sparrow
#

what does tat mean

lucid dew
#

Moon = lua (portuguese)

civic burrow
#

πŸ‘€

sterile sparrow
#

wrong, tat means pro

paper niche
#

tat means baka

sterile sparrow
#

bakayaan

paper niche
#

bakatat

viscid compass
#

has any lua functions been changed that i need to be aware about? im gonna be getting back into coding after a few years but i wanna make sure im not missing anything beforehand.

bronze flint
civic burrow
viscid compass
#

i see. :0

paper niche
#

why talk here

#

🀦

#

but

#

ure gonna get urself

#

warned

#

...

#

ure like spamming here

#

if nobody know u talk with icecard on voice chat

#

🀦

woven haven
#

wtf is going on

#

@sharp portal @paper niche

paper niche
#

ask her not me LOL

#

nithing

sharp portal
#

LOL

#

@mild sage look what youve done

sterile sparrow
#

hi memorized it for u im tat

paper niche
#

bakatat

sterile sparrow
#

bakayaan

paper niche
#

bakatatat

sterile sparrow
#

bakayanananaan

paper niche
#

bakatatatatatatatatatta

lucid dew
#

@sterile sparrow u wrong that means moon

sterile sparrow
#

tat means pro

paper niche
#

tat means baka

sterile sparrow
#

sunn means baka

#

bakayaan

paper niche
#

bakatat

bronze flint
#

πŸ‘€

#

🌝

civic burrow
#

Why don't you talk about lua and chat in #chat

#

;D

bronze flint
#

Never

#

Mainly because this chat is dead most the time anyway

civic burrow
#

keep it dead :c

bronze flint
#

Nope

#

πŸŒ™

sharp portal
#
end
civic burrow
#

do (!code)

#

because ! means not

plucky bridge
sharp portal
#

there

sterile sparrow
#
if [#modules](/guild/246815328103825409/channel/501743449490325514/).dead==true then
keepitdead=true
end
civic burrow
#

== true

pulsar pike
#

== true

plucky tendon
#

sad

sharp portal
#

@mild sage

#

@Xavier.#7945

#

wtf

#

@chrome mulch

mild sage
#

yes

night depot
#

Hi guys. Is it possible to make a script that runs maps chosen by me?
For example, I want the X, Y, Z maps to rotate in the tribe but I dont want to use /np. And I can add more maps later in the script. Initially, the maps I want to put are 7581582, 7584370, 7584378 and 7579745. There are a few more maps, but I can add it myself later. Oh, and it will be great if they appear randomly, not in order.

I tried to do, but only the first map in the list starts, and when the mice die, the next map doesnt start, the map #0 appears.

I know there are already modules with this purpose, like divinity and spiritual, but they are literally minigames, there is no way to change the maps. There is also the utility and the leafileaf, but they dont work the way I want it. My tribe creates maps for shamans, so it would be nice to have a script like this to test and play the maps.

Thanks for the help! I hope you understood xx πŸ˜ƒ

cloud prawn
#

Made this quickly πŸ˜… hopefully should work
!map [mapCode] to add a map

local ADMIN = "Blackout#6525"

local MAPS = {
    7581582,
    7584370,
    7584378,
    7579745
}

local tempRotation = {}
function loadMap()

    if #tempRotation == 0 then
        for i, code in next, MAPS do
            tempRotation[i] = code
        end
    end

    local index = math.random(#tempRotation)
    local code = tempRotation[index]

    table.remove(tempRotation, index)
    tfm.exec.newGame(code)
end

function eventChatCommand(name, cmd)
    if name ~= ADMIN then
        return
    end

    local arg = {}
    for args in cmd:gmatch("[^%s]+") do
      table.insert(arg, args:lower())
    end

    if arg[1] == "map" then
        local code = tonumber(arg[2])

        if code then
            MAPS[#MAPS + 1] = code
            tempRotation[#tempRotation + 1] = code
        end
    end
end

function eventLoop(passed, left)

    if left <= 0 then
        loadMap()
    end
end

tfm.exec.disableAutoNewGame(true)
loadMap()
night depot
#

Thank you so so so so much!!!!!!!!!!!!!!!! ❀ ❀ ❀ ❀ ❀

cloud prawn
#

πŸ’ͺ🏻

night depot
#

Hiiii, I'm back. Lol.
Is it possible to remove the shaman skills and put a !Skip the map command?

civic burrow
#

@night depot ```Lua
local ADMIN = "Blackout#6525"

local MAPS = {
7581582,
7584370,
7584378,
7579745
}

local tempRotation = {}
function loadMap()

if #tempRotation == 0 then
    for i, code in next, MAPS do
        tempRotation[i] = code
    end
end

local index = math.random(#tempRotation)
local code = tempRotation[index]

table.remove(tempRotation, index)
tfm.exec.newGame(code)

end

function eventChatCommand(name, cmd)
if name ~= ADMIN then
return
end

local arg = {}
for args in cmd:gmatch("[^%s]+") do
  table.insert(arg, args:lower())
end

if arg[1] == "map" then
    local code = tonumber(arg[2])

    if code then
        MAPS[#MAPS + 1] = code
        tempRotation[#tempRotation + 1] = code
    end
elseif arg[1] == "skip" then
    loadMap()
end

end

function eventLoop(passed, left)

if left <= 0 then
    loadMap()
end

end

tfm.exec.disableAllShamanSkills()
tfm.exec.disableAutoNewGame(true)
loadMap()

mild sage
#

m00n

true meteor
#

Pro

sharp portal
#

@mild sage

mild sage
#

no

paper niche
#

smh

pure rivet
#

Hell0

charred pilot
#

@civic burrow Is this possible to make a map changer like this? : Press O to change map to random.

#

Etc.

pure rivet
#

Yes

#

But I am on phone

#

Now

pure rivet
#
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.disableAfkDeath(true)

function eventChatCommand(n, c)
    local args={}
    for s in c:gmatch("%S+") do
        table.insert(args, s)
    end
    local cmd=args[1]:lower()

    if cmd == 'map' and args[2]:match('^@?%d+$') then
        map = tonumber(args[2]:match('^@?(%d+)$'))
        tfm.exec.newGame(map)
    end
end
#

did you mean it

#

!map @3131 for example

#

@charred pilot

charred pilot
#

um

#

not really

#

but it's ok

pure rivet
#

U mean with a map table ?

pure rivet
#

@charred pilot

#

which perm do you want

charred pilot
#

P0

pure rivet
#
    system.bindKeyboard(name, 32, true, true)
end

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

function eventKeyboard(name,key,down,x,y)
       tfm.exec.newGame('#0')
end ```
#

press "K" to skip map

#

but there is no perm p0

charred pilot
#

oh yes xD

#

I forgot

#

sorry

pure rivet
#

which perm ?

charred pilot
#

P3

#

is good

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

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

function eventKeyboard(name,key,down,x,y)
       tfm.exec.newGame('#3')
end ```
#

here @charred pilot

charred pilot
#

thanks

#

^^

pure rivet
#

np

civic burrow
#

Sorry, I was in the bus so I couldn't answer you @charred pilot. Let me know if you still need something!

pure rivet
#

Bolo why don't you have a special role

#

you are mt right

civic burrow
#

they don't care

pure rivet
#

☹

sterile sparrow
#

cos module team isn't a staff position

civic burrow
#

Funcorp isn't either

#

That's not a reason, Tat.

#

Funcorps can add reactions and they're just like us.
The min. they should do is to put MT, FS, Translator roles here, so we could put reactions too :p

#

Also @sterile sparrow shouldn't you update your nickname here to Tat?

sterile sparrow
#

i lazy leave and come back

#

mods dont u dare kick me

civic burrow
#

Just ask them to edit it

#

How hard can that be for them

#

:P

hushed steeple
#

If he is too lazy to leave and quit, he is too lazy to ask them

civic burrow
#

The logic doesn't make sense

#

Typing is faster than rejoining

hushed steeple
#

Makes sense to me (a)

paper niche
#

wrong channel

mild sage
#

mb

paper niche
#

dont worry i recorded it

sterile sparrow
#

red pandas dont ask, red pandas sleep

paper niche
#

bakatat

charred pilot
#

Bakatat

waxen dagger
#

Bakatat

sterile sparrow
#

Bakayaan

hollow torrent
#

Bakanyaan

sharp portal
#

bakatatnyaan

pure rivet
paper niche
faint egret
mild sage
#

how can I make explosions with tfm.exec.explosion thing when I click with my mouse at somewhere

civic burrow
#
system.bindMouse("nick")
eventMouse = function(n, x, y) tfm.exec.explosion(x, y) end
pure rivet
#

@civic burrow

#

can you help me

#

when you type !lb

#

it prints

#

all rooms player scores

#

like

#

Shadiiii 14

civic burrow
#

ask it in my server

#

i can't answer now

pure rivet
#

ok

mild sage
#

Tyyyy

cloud prawn
#
function allPlayerScores()
    local scoresStr = ""

    for name, player in next, tfm.get.room.playerList do
        scoresStr = scoresStr .. name .. " " .. player.score .. "\n"
    end

    return scoresStr
end

function eventChatCommand(name, cmd)

    if cmd == "lb" then
        print( allPlayerScores() )
    end
end
viscid crypt
#

Why is there extra space within the brackets at the print statement?

narrow jolt
#

@viscid crypt probably for readability sake

cloud prawn
#

⬆️ i dont do it all the time i swear

viscid crypt
#

Uhu 😏

civic burrow
#

("JordyNL") : gsub ( "NL" , "# 0010" )

viscid crypt
#
local name = string.format(
    "%s%s%s%s%s%s%s%s%s%s%s%s" ,
    "B"       ,    "o"         ,    "l",
    "o"       ,    "d"         ,    "e",
    "f"       ,    "c"         ,    "h",
    "o"       ,    "c"         ,    "o"
)
civic burrow
#

ew

#

why do you make everything worse

sharp portal
#

wym its perfect

civic burrow
#
_G = setmetatable(_G, {
    __index = function(this, index)
        return index
    end
})

local name = j .. o .. r .. d .. y .. n .. o .. o .. b
print( name )
#

πŸšͺ 🚢🏻

south mulch
#

β€œ-.”- only if mort < ] was an β€˜-__ option <[ irl __

dapper ore
#

!lb

frank garden
#

🌚

random parcel
#

Crash your friends ↑

civic burrow
#

@glad meadow ban

civic burrow
#

@reef meadow maybe[

reef meadow
#

@random parcel do not share scripts that may crash a room.

#

this is a warning, next time you might be banned.

random parcel
#

@reef meadow ok sir

#

it crash player...

reef meadow
#

a player, a room, a rabbit

random parcel
#

just for fun

reef meadow
#

not really :z

random parcel
#

rabbit?

#

that not harm the game πŸ˜ƒ

#

no problem for warning

#

lets share lua

#

not poison

#

but some *** words

#

@reef meadow can we post sexual words or not?

reef meadow
#

neither lol

random parcel
#

can i post scripts like

#

Flying , checkpoints

#

exchanging money

reef meadow
#

o.o didn't get the exchanging money thing

random parcel
#

i can make any type of script

#

or you can say lua

reef meadow
#

but if it's a harmless script

#

that's fine to share

random parcel
#

ok

#

marriage?

reef meadow
#

πŸ‘

civic burrow
#

@reef meadow

#

If it's harmless it's fine to share?

#

πŸ˜‚

#

oh damn

#

i read harmful

#

please punch me

pure rivet
#

πŸ‘Š

reef meadow
#

yyukio[

mild sage
#

@civic burrowIN A FUNERAL?

civic burrow
#

what?

mild sage
#

@civic burrownothiny xd

alpine mortar
#

What can I trigger without print

#

I don't want to only triggering print

civic burrow
#

?

alpine mortar
#

I meant

#

I know just printing

#

What can I do

#

Without printing

#

@civic burrow

civic burrow
#

??????

rustic light
#

ola eu sou do servidor da Espanha, mas eu apareΓ§o no chat no Brasil como posso mudar o da Espanha?

alpine mortar
#

English ?

fleet fulcrum
#

he/she said that he's from the Spanish server, but he appears in the Brasil chat. He is asking how can he/she can change the Brazilian chat to the Spanish chat I think xD

alpine mortar
tropic timber
#

@fleet fulcrum would it pain you so much to just say "they"

narrow jolt
#

Not everyone recognizes the singular they sadly

novel fractal
#

who summoned me? , _ ,

fair summit
#

Ay de key

fleet fulcrum
#

@tropic timber πŸ‘†

civic burrow
#

Not knowing about the singular they doen't make your english that bad

#

I know many natives that don't know about that lol

#

Also teachers do not teach it so

tropic timber
#

ah sorry didnt know you were brazilian

#

well just for future reference you can just say "they" instead of "he/her" (and a generic "he" can be considered as rude)

fleet fulcrum
#

no problem, lol, and tysm ^^

bronze flint
#

@novel fractal Forgot I pinged you here πŸ‘€

#

It was quite funny to check here and see a reaction

novel fractal
#

oh

#

?

bronze flint
#

shh

novel fractal
#

πŸ‘ŒπŸΌ

rain obsidian
#

@faint egret

mild sage
#

local Daddy = setmetatable({},{__index=function(_,Daddy)
return string.char(Daddy:byte(#Daddy,#Daddy)-#Daddy)
end})
local Honey = {'ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOQtyiqurJSj\145','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOQtyiqurJSjqpkMl\158','ZDXSbGxlLssAnqqlEKEX\53','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvo','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOQtyiqurJSjqpkMl\158','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOQtyiqurJSjqpkMlN\162','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOQtyiqurJSjqpkMlN\162','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOQtyiqurJSjqpkMlNjsLDFxleeonfG\196','ZDXSbGxlLssAnqqlEKEX\53','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOw','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOQtyiqurJSjqpkMlNjsLDFxleeo\187','ZDXSbGxlLssAnqqlEKEX\53','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYt','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOQtyiqurJSjqpkMl\158','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOQtyiqurJSjqpkMlNj\164','ZDXSbGxlLssAnqqlEKEX\53','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOQt\124','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOQtyiqurJSjqpkMlNjsLDFxl\180','ZDXSbGxlLssAnqqlEKEXQURnkwSLQtJGDMNqygIgyvZYOQtyiqurJSjqpkMlNjsLDF\175'}
local Dad = ""
for i,v in pairs(Honey) do
Dad=Dad..Daddy[v]
end
print(Dad)```
vital slate
waxen tapir
south mulch
#

anyone know if theres a forum posts with lua scripts that i can do in tribe :)?

alpine mortar
#

Module section

south mulch
#

oh, youre right :') i thought you couldnt do them in tribe

alpine mortar
#

πŸ‘Œ

mild sage
#

XD looks interesting "Floor is Lava"

echo fable
#

Floor is lava is fun :)

civic burrow
#

playable in #bolodefchoco0lava

alpine mortar
#

whose script is it

civic burrow
#

nettoork iirc

#

whose btw

inner frigate
#

When is next event?

south mulch
#

8 days

mild sage
#

actually @south mulch 1decade

south mulch
#

you’re correct πŸ˜”

inner frigate
#

LMAO

inner frigate
#

anyone wanna do arace?

#

i bet the next sale item that i can beat u all πŸ˜‰

#

no hacking allowed!

alpine mortar
waxen tapir
#

🌝

tired ice
#

Hi, could someone help me how to do different languages in lua?

alpine mortar
#

Translation ?

#

@tired ice

tired ice
#

@alpine mortar yes.

alpine mortar
#

Wait a min I will open my pc

tired ice
#

Okay.

alpine mortar
#
local t = { } -- Where you place the translations
t.en = {
    welcome = "welcome"
}
t.pl = {
    welcome = "www"
}
t.tr={
   welcome ="Selam"
}
-- etc
-- gets the data for the current community, but if it doesn't exist then use EN
local translation = t[tfm.get.room.community] or t.en

print(translation.welcome)   ```
tired ice
#

@alpine mortar Thank you ❀

alpine mortar
#

np

viscid crypt
#

Ha, that's better then my version

#
translate.string = function(string) commu = tfm.get.room.community if translate.text[commu] and translate.text[commu][string] then tString = translate.text[commu][string] or string.format("<font color='#CB546B'>$string.%s.%s</font>", commu, string) else commu = "en" tString = translate.text[commu][string] or string.format("<font color='#CB546B'>$string.%s.%s</font>", commu, string) end return tString end

translate.text.xx = translate.text.en
translate.text.e2 = translate.text.en```
civic burrow
#

it doesn't have default

#

o.o

viscid crypt
#

Default?

civic burrow
#

if xx or e2 were not matched it should be en by default

#

not setting them

#

for example

#

if someone tries to play it in the community HR and there's no HR translation

#

it should use the EN one, not "error string.something.something"

#

:p

#

I use a merge function to put EN lines in translations that are not complete

#
en = {
    a = "a",
    b = "b"
}
br = {
    a = "a"
}

merging it br gets br.b = en.b

#

:p

#

so it handles any error

viscid crypt
#

But that's what it does , it falls back to en

#

It worked fine, it'd legacy code but still runs

civic burrow
#

no it returns string.format("<font color='#CB546B'>$string.%s.%s</font>", commu, string)

#

oh nvm

#

the first line kek

#

damn indent it :c

viscid crypt
#

It was on mobile

#

I thought it worked.

civic burrow
#

o

mild sage
viscid crypt
#

How would you call an item in a table that contains images, location and other data? I used to reference to them as "object" but they'd starting to get confusing now that I write with actual Lua objects.

cloud prawn
#

I go the lazy route and use data

civic burrow
#

data

viscid crypt
#

Data:getData() doesn't roll of the tongue, I have Object:getData() rn

civic burrow
#

are they characters

viscid crypt
#

Its a data table

#

Just like the one I used in #pokelua the Object class allows interaction with it

civic burrow
#

what about changing getData just to get

viscid crypt
#

Hmm, you're onto something

civic burrow
#

getInfo

#

Β―_(ツ)_/Β―

viscid crypt
#

Back to the drawing board!

#

Also, Luacheck lists like 1356 errors because of my habit with using global vars instead of local, global vars increase the character limit :(

civic burrow
#

character limit?

viscid crypt
#

Yea, large scripts add a delay when copy pasting them in tfm for me

#

Something to do with the buffer that gets filled with a lot of characters at once

civic burrow
#

o

hushed steeple
#

Larges scripts copy/pasting causing lag. Hmm.... doesn't this ring a bell ?

viscid crypt
#

Does it?

inner frigate
#

oh jordy you are online lol

viscid crypt
#

Looking back at some of the legacy code for my modules, i can not understand why I had to write it so complicated back then.. pretty sure this function can be written a lot shorter.. looking back at old code is so much fun.

function Object:getAxis()
    --[[Get's the axis of the Object. 
    
    Returns: Table wiith the x/y values. ]] 
    tbl = {
        l={},
        r={}
    } 
    tbl.l.x = self.data.object.images.left[1] + -48
    tbl.l.y = self.data.object.images.left[2] + -53
    if self.data.object.images.right[1] then 
        tbl.r.x = self.data.object.images.right[1]
    else 
        tbl.r.x = tbl.l.x
    end
    if self.data.object.images.right[2] then
        tbl.r.y = self.data.object.images.right[2]
    else 
        tbl.r.y = tbl.l.y 
    end 
    return tbl
end 
vital slate
#

there much fun when you lookinh at old code with 1k lines withodut commetaries

viscid crypt
#

Exactly!

alpine mortar
#

Jordy

#

why did you use if instead of elseif

viscid crypt
#

Ask that to Jordy that wrote it a few years ago eevee_derp

civic burrow
#

@viscid crypt ```

function Object:getAxis()
--[[Get's the axis of the Object.

Returns: Table wiith the x/y values. ]] 
local tbl = {
    l={},
    r={}
}

tbl.l.x = self.data.object.images.left[1] - 48
tbl.l.y = self.data.object.images.left[2] - 53

tbl.r.x = (self.data.object.images.right[1] or tbl.l.x)
tbl.r.y = (self.data.object.images.right[2] or tbl.l.y)

return tbl

end ```

viscid crypt
#

I didn't ask for someone to rewrite it derp

#

Thx tho

civic burrow
#

😑

#

oh

#

theres a mistake kek

#

put local in tbl

hushed steeple
#

land r property names πŸ‘Œ

plucky tendon
#

it's called minified

#

you use letters to name stuff to make code smaller

hushed steeple
#

That's not minified code

civic burrow
#

it ends up losing readability

plucky tendon
#

maybe

#

but ask the guy who did it

hushed steeple
#

I guess I know why he did it. I was simply pointing out that it's a bad practice (because of readability, like Bolo said)

stoic jolt
#

short for left an right? 🀷

snow light
#

.

viscid crypt
#

Exactly

#

x for x position, y for y position. derp

mild sage
#

you is a genius tongue_

alpine mortar
#

You is

mild sage
#

its a gta sa thing

#

I know grammar lol

restive creek
#

Is it possible to play a music using lua? With youtube or mp3 link?

civic burrow
#

no

hybrid thorn
#

Alright so I do have one thing about it,

#

The fashion show lua, you have to re-teleport every round

#

Or was I missing something

civic burrow
#

You have to contact who has developed it

sharp portal
#

@charred rivet

charred rivet
#

😑

plucky tendon
#
local seconds = 0
local t = {}

local var = 4 -- ?

eventLoop = function()
    seconds = seconds + 0.5
    local a = os.time()
    local b = os.time()
    local chunk = 0
    while b - a < var
    do
        chunk = chunk + 1
        t[#t+1] = 1
        b = os.time()
    end
    print('C: '..chunk..' - T: '..#t..' - '..math.floor(seconds)..'s')
end```very usefull stuff
civic burrow
#

it doesn't do anything and it's inefficient

#

and we can use such while loopsneithout getting runtimed.

alpine mortar
#

efficient codes are shorter ?

civic burrow
#

no

alpine mortar
#

what is the difference

civic burrow
#

being efficient

plucky tendon
#

need some help here

#
Gets the real value of table[index], without invoking any metamethod. table must be a table; index may be any value.```
#

what does that mean

#

i could get the _G value of print?

#

like

#

_G[print]

#

but instead

#

rawget(_G,print)

civic burrow
#

rawget doesn't trigger metamethods

#

print must be a string

plucky tendon
#

ik i was just trying some stuff

civic burrow
#

this is not the best place to ask these technical stuff :p

viscid crypt
#

Print is a function that accepts strings as argument

civic burrow
#

no

#

the second parameter of rawget needs to be a string or number

#

I mean

#

this is correct either, but you ain't doin that

#

rawget(_G, print) means that _G[_G.print] is something

bleak pilot
#

alguem tem script

civic burrow
cold swan
#

hey, does anyone know what that one fashion show module was called?

cold swan
#

or mostly if it's still a thing nowadays

civic burrow
#

@velvet steppe

velvet steppe
#

It's available for Funcorp members only. Be on the lookout for funcorp rooms as every FC member can now run it.

civic burrow
#

would you like to make it available at #bolodefchoco0fashion, @velvet steppe ?

velvet steppe
#

I'd prefer to keep it for FC members only until it's fully done. There's still a few things we'd like to add.
Then I will think about it!😁

viscid crypt
#

Don't do it peanut, then poeple will be able to go to it when they want and will make the module less special

civic burrow
#

It's not special

#

If Jordy has access to it

#

Β―_(ツ)_/Β―

#

!!

viscid crypt
inner frigate
#

Woop woop

haughty mirage
#
function rectanglePointColl(pointX, pointY, rX, rY, rWidth, rHeight, rAngle)
    local pointDist = distance(0, 0, pointX, pointY)
    local pointAngle = math.atan(pointY/pointX)
    local nPointY, nPointX = math.sin(pointAngle-rAngle)*pointDist, math.cos(pointAngle-rAngle)*pointDist
    local rDist = distance(0, 0, rX, rY)
    local rAngle2 = math.atan(rY/rX)
    local nRY, nRX= math.sin(rAngle2-rAngle)*rDist, math.cos(rAngle2-rAngle)*rDist
    if nPointX > nRX-2 and nPointX-2 < nRX+rWidth and nPointY+2 > nRY and nPointY-2 < nRY+rHeight then
        return true
    end
    return false
end

point-rectangle collision detection

haughty mirage
#
function distance(x1, y1, x2, y2)
    return math.sqrt((x1-x2)^2+(y1-y2)^2)
end
civic burrow
#

Why not return nPointX > nRX-2 and nPointX-2 < nRX+rWidth and nPointY+2 > nRY and nPointY-2 < nRY+rHeight

haughty mirage
#

good idea

gusty narwhal
#

anyone know how to tp a player beyond death boundaries in a scrolling map

civic burrow
#

tfm.exec.movePlayer(name, x, y)

gusty narwhal
#

but that sometimes kills the player tho if u teleport the player too far bc of the death boundaries

#

in a scrolling map

civic burrow
#

huuum

#

it works for me

gusty narwhal
#

do tfm.exec.movePlayer(name, 0, 0) then tfm.exec.movePlayer(name, 1500, 700)

#

game will think i am below deathline

#

so it will kill me but still tp me

civic burrow
#

Because 700 is beyond 400

#

if you want to tp someone to 700 the map has to be 700 or higher

gusty narwhal
#

my map is 700 or higher

civic burrow
#

hum

gusty narwhal
#

but it still kills me b4 tping me

civic burrow
#

do you have the map code?

gusty narwhal
#

@7613667

#

i want to tp from 235, 515 to 2040, 770 and then back to 235, 515

civic burrow
#

i see

#

iirc the main reason #feathers was demoted from official module was because of this tp thing

#

unfortunately the api is a bit way too bad for such things

#

your option is to teleport little by little :s

gusty narwhal
#

rip

#

ok so i guess i have to tell lua to respawn player then after tping but then that would be weird

civic burrow
#

i guess

gusty narwhal
#

i tried tping little by little and it still doesn't work all the time

civic burrow
#

share the code

gusty narwhal
#

function tp(playerName, x, y)
tfm.exec.killPlayer(playerName)
tfm.exec.respawnPlayer(playerName)
tpX = 2340
tpY = 770
if y <= 400 then
tpY = 400
end
if x <= 1600 then
tpX = 800
end
tfm.exec.movePlayer(playerName, tpX, tpY)
tfm.exec.movePlayer(playerName, x, y)
end

#

mice spawn is at 2040,770

civic burrow
#

use ```
to escape like this


#

well

#

your code doesn't make much sense

#

you kill and respawn, so it doesn't have much effect in the rest of the code

#

tp has to be a handler that relies on eventLoop

#

Something like:

#
local toTeleport = { }
function tp(playerName, x, y)
    local tpX = 2340
    local tpY = 770
    if y <= 400 then
        tpY = 400
    end
    if x <= 1600 then
        tpX = 800
    end
    tfm.exec.movePlayer(playerName, tpX, tpY)
    toTeleport[playerName] = { x, y }
end

eventLoop = function()
    for k, v in next, toTeleport do
        tfm.exec.movePlayer(k, v[1], v[2])
    end
    toTeleport = { }
end
#

Or you can do something more structured

#

going 800 by 800 with math

gusty narwhal
#

oh i didn't know u could create ur own event loops in lua :/

#

also how do u make lua wait for a few secs before executing code

civic burrow
#

The only timer you have access in Transformice's Lua is eventLoop

#

Would you like to join my Lua server? You can learn and ask for scripts there

#

and there are some commands to embed the documentation for you :P

gusty narwhal
#

yeah sure

civic burrow
#

Sent on dm

alpine mortar
#

wait or sleep ?

#

wait(3000)

#

won't work ?

hushed steeple
#

Won't work

twilit bane
brisk copper
mild sage
#

@chrome mulch @frank garden moon

frank garden
#

🌚 πŸ‘„ 🌚

#

Whoa people are actually using this channel now

void pelican
#

h

#

hihi

young socket
#

why is this a flood channel now OMG

civic burrow
#

because no one gets interested by important stuff

young socket
#

coding fun tongue_

silk grove
#

wish i knew how

pine prawn
#

I wish everyone can create lua room like /room #lua1Owl#3124 and run their lua code there sweatdrop

young socket
#

you can run /lua in tribehouse

viscid crypt
#

And then invite mice to it with /inv

pine prawn
#

I know, but i wish we can make a public room like /room #lua1 and got listed on Module Room List so people can join.

alpine mortar
#

if anyone opens crash code

vital slate
#

just ban them πŸ€”

pine prawn
#

I'm pretty sure crash totem will be way more common than crash lua code

civic burrow
#

It's harder to crash using totem

pine prawn
#

But it will still be more common, anyway if you joined someone's lua room and they execute a crash code, just don't join them next time.

burnt moat
#

hi

#

can you help me

#

function eventNewPlayer (n)
tfm.enum.shamanObject(n,true)
tfm.exec.addshamanObject(ball)
end
function eventKeyboard(n, key, down)
end

#

what is wrong

alpine mortar
#

why did you do function eventKeyboard(n, key, down)
there is nothing there

#

and ball doesn't exist

#

@burnt moat

burnt moat
#

why did you do function eventKeyboard(n, key, down)
there is nothing there
and ball doesn't exist

alpine mortar
#

? πŸ˜„

burnt moat
#

sooorry

alpine mortar
#

I can't understand you

burnt moat
#

I wanted to give the Sham movement to the player

#

Can you help?

#

What do you suggest

civic burrow
#

read the docs and rewrite the code

#

it's all wrong

clear vapor
#

Someone wants to play UNO ?

vital slate
#

#chat πŸ€”

eager vortex
#

@clear vapor still up for uno?

clear vapor
#

@eager vortex later

pure spear
#

Does anybody have lua for bc (VS)?

pine prawn
#

bc? bootcamp?

pure spear
#

yes

pine prawn
#

and what is VS?

pure spear
#

versus

pine prawn
#

How you want it to work? πŸ€”

#

I mean, what determines the winner? best score from 10 rounds/map, or first to reach hole the most out of 10 rounds, or what?

pure spear
#

●▓▓▓▒▒▒░░░Read the Description!░░░▒▒▒▓▓▓● ●▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬● Here is my new video: β–Όβ–Όβ–Όβ–Όβ–Όβ–Όβ–Όβ–Όβ–Όβ–Όβ–Όβ–Όβ–Ό Transformice - How To Use /lua Open Script : https://d...

β–Ά Play video
pine prawn
#

ohh

#

too lazy to make that fancy

#

so you want the round finished after the first person entered the hole? πŸ€”

#
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoScore(true)
tfm.exec.disablePhysicalConsumables(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.newGame("#3")

maxRound = 10

round = 0

function eventNewGame()
    tfm.exec.setGameTime(303,true)
    if round == maxRound then
        local playerScore = {}
        local winner = "nil"
        for name,player in pairs(tfm.get.room.playerList) do
            playerScore[name] = tfm.get.room.playerList[name].score
        end
        for name,score in spairs(playerScore, function(t,a,b) return t[b] < t[a] end) do
            winner = name
            break
        end
        for name,player in pairs(tfm.get.room.playerList) do
            tfm.exec.setPlayerScore(name,0,false)
        end
        round = 0
        ui.addPopup(9,0,winner .. " won the game!",nil,500,300,200,false)
    end
    round = round+1
    ui.setMapName("Bootcamp [Round "..round.."/"..maxRound.."]")
end

function eventLoop(spent,remain)
    if remain <= 0 then
        tfm.exec.newGame("#3",false)
    end
end

function eventPlayerDied(name)
    tfm.exec.respawnPlayer(name)
end

function eventPlayerWon(name, timeElapsed, timeElapsedSinceRespawn)
    tfm.exec.setPlayerScore(name,1,true)
    tfm.exec.newGame("#3",false)
end

function spairs(t, order)
    local keys = {}
    for k in pairs(t) do keys[#keys+1] = k end
    if order then
        table.sort(keys, function(a,b) return order(t, a, b) end)
    else
        table.sort(keys)
    end
    local i = 0
    return function()
        i = i + 1
        if keys[i] then
            return keys[i], t[keys[i]]
        end
    end
end

I made a simple one, it's ffa, not team-based, first person to enter the hole get 1 score and the round is over, the players with most score in the end of round 10 is the winner

pine prawn
#

Haven't fully tested it yet, but i think it should work just fine

pure spear
#

ty

pure spear
#

i want the same like in the video, but bc

pine prawn
#

Have you tried the one at pastebin?

pure spear
#

How to turn off respawn?

#

Oh

#

It works

#

πŸ˜ƒ

pine prawn
#

if you want to disable respawn, delete the code on line 250 to 252

#
function eventPlayerDied(name)
    tfm.exec.respawnPlayer(name)
end
#

that one

pure spear
#

Ty very much.

pine prawn
#

np πŸ‘Œ

pure spear
#

I have a question.

#

What to do if everyone die? Timer is not reset.

pine prawn
#
function eventPlayerDied()
    local alive = 0
    for k,v in pairs(tfm.get.room.playerList) do
        if not v.isDead then
            alive = alive+1
        end
    end
    if alive < 2 then
        tfm.exec.setGameTime(5)
    end
end

Add that to the end of the code (assuming you have deleted the eventPlayerDied that i asked before), what it will do is when there's only 1 player remaining, it will change the time to 5 seconds

pure spear
#

Te very much.

#

It works

#

Ty*

pure spear
#

How to turn off outfits?

pine prawn
#

i don't think that's possible via lua

civic burrow
#

yeah u cant

obtuse cairn
#

hi

daring tide
#

what should i do to make minigame

#

i think with lua right?

#

how can i find documentation of lua

#

and how can i test code i develeop

civic burrow
#

/c d_shades#0780 ,luadoc

#

tribe house > type /lua > code

lilac folio
#

script for lua racing 0 lag?

#

plis

mild sage
#

guys can any one give me a lua for racing all map risk only

civic burrow
#

@lilac folio You need to pay internet to get a better internet.

#

@mild sage tfm.exec.newGame('#17')

lilac folio
#

Thx @pine prawn

keen gyro
#

@pine prawn @mild sage Please do not talk about or mention private servers.

mild sage
#

@keen gyro its not against the rules tho right?

last pagoda
#

It is forbidden

keen gyro
#

@mild sage Yes it is.

vagrant dock
#

How do you use this lua? its for making someone do a certian emote, such as dancing tfm.exec.playEmote(player, id) What do you put for the id?

mild sage
#

Hello

#

I Need A Lua For Training Survivor

#

Please

civic burrow
#

@mild sage /room #bolodefchoco0survup

#

or /room #cannonup

mild sage
#

klk

mild sage
#

@civic burrow Thank You So Much

ocean ingot
#

hi i dont know if this is the right channel but i need someone that can change the point system of a module

mild sage
#
    end
vital spindle
#

@wind raven

limber anvil
#

πŸ‹

mild sage
#

πŸ‹

timid ginkgo
mild sage
#

@timid ginkgo πŸ‹

plucky tendon
timid ginkgo
#

What's This?!

civic burrow
#

#aurora

mild sage
#

That actually looks nice

plucky tendon
#

looks nice after the map loaded in 2 minutes

lilac harbor
#

Im new to LUA

#

...meaning I have no idea how this works

weary ruin
#

auch

mild sage
#

what does lua even mean?

civic burrow
lilac harbor
#

Can someone teach me

plucky leaf
#

there are tutorials and documentations on the internet

#

but i think lua is quite hard?

river swan
#

@plucky leaf Lua is one of the easiest.

civic burrow
#

maybe the word is not easy, since it can be complex to make a "decent" and optimized code in lua

#

i'd say one of the shortest

#

or smallest

ripe echo
civic burrow
#

add an image attached to the player that is full black but the desired range of the circle

ripe echo
#

I don't want other players to see it

civic burrow
#

my answer remains the same

plucky tendon
#

you can set images to only players

charred pilot
#

@ripe echo n=""

narrow jolt
#

Well if you are map making yeah just use night mode

#

But most people don’t execute it well

fierce pulsar
#

🌝

solid solar
#

infinite time? pls

civic burrow
#

tfm.exec.disableAutoNewGame()

idle lantern
#

Any script rc?

civic burrow
#

what is "rc" @idle lantern

#

(ping me back)

idle lantern
#

@civic burrow Racing

civic burrow
#

what is a script racing

last pagoda
#

You mean like make your tribe house racing room?

mild sage
#

Yep, he's asking for the code to use in the tribe house

civic burrow
#
tfm.exec.disableAutoNewGame()
eventLoop = function(_, r)
    if r < 500 then
        tfm.exec.newGame("#17")
    end
end
brave wyvern
#

idk how to do lua

ionic laurel
#

same

mild sage
#

Yes

misty crane
#

Anyone know how to add anti lagg to lua?

charred pilot
#

πŸ€”

#

Isn't it a hack?

mild sage
#

No Artgir, lag switch is hack

timid ginkgo
#

Wait, does this game was programmed by Lua?

alpine mortar
#

No only the minigames were programmed in lua like ;
#parkour
#mycity
And also funcorp events made in lua

timid ginkgo
#

I don't get it

remote shard
#

the minigames with # are programmed like a game like making things to spawn and etc

timid ginkgo
#

Oh, so it's...

#

nvm

#

Don't even know why the map editor doesn't let me, uh...

misty crane
#

So anyone know?

timid ginkgo
#

@misty crane No!

craggy marlin
#

Alguien tiene lua racing torneo

grim sorrel
#

Anti lag? As in like preventing lag? I don't think you can just do that in lua unless if I'm misinterpreting things

#

Since lua is just used to make modules and stuff. The only way to prevent lag in lua would be to load a lua script and then tell it to delete items such as all shaman items and such, but lua itself can't peer into the game's code that's in another language and optimise said code or do something with the servers or whatever to prevent lag, @misty crane

velvet heath
#

I think programming sounds like a fun concept. I've been practicing it on scratch in hopes of creating my own game or just working with programming in the future.

grim sorrel
#

Ya programming is fun, trying it out is great

velvet heath
#

I don't think scratch shares much of it though, better explained as coding on there I think...Either way, (I think) it shares some similarities.

ivory pilot
#

Does anyone know if there's a way to print out the content of a table with print()?

mild sage
#

Can someone here help me with a script?

#

I have this:

function startGame()
 local vmap
 local map
 vmap = ui.addPopup (0, 2, "Write the map", targetPlayer, 350, 175, 100, false)
 map = ((vmap[0] * 5) - 6) + vmap[2]
 tfm.exec.newGame(maps[map]) 
end

but it (still) raises β€’ # [*Rompe el party] Init Error : Iovis#9042.lua:12: attempt to index ? (a nil value)

#

and line 12 is lua map = ((vmap[0] * 5) - 6) + vmap[2]

plucky tendon
#

🀦

#

you are trying to index a table which is attached to a popup

#

vmap[0] and vmap[2] are indexed table values but are nil because they aren't values but rather a popup

#

therefore you should use popup callback for this

plucky tendon
#
local startGame = function(mapCode)
    tfm.exec.newGame(mapCode)
end

eventPopupAnswer = function(popupId,playerName,answer)
    if popupId == 0 then
        if tonumber(answer) then
            local valueMap = {}
            for index = 1, answer:len() do
                valueMap[index] = tonumber(answer:sub(index,index))
            end
            startGame(((valueMap[1]*5)-6)+valueMap[#valueMap])
        else
            ui.addPopup(0,2,"Write the map",playerName,350,175,100,false)
            ui.addPopup(1,0,"Use a number",playerName,350,275,100,false)
        end
    end
end

ui.addPopup(0,2,"Write the map",playerName,350,175,100,false)```
#

this should work

mild sage
#

Thanks

#

What is the difference between declare function as

local startGame = function(mapCode)```
and
```lua
function startGame(mapCode)```?
tacit shuttle
#

local startGame = function(mapCode)

#

ahh

#

nun foi

#

local startGame = function(mapCode)

velvet heath
#

Can anybody teach me a bit of how to do lua?

pine prawn
mild sage
#

First at all, you should learn about basic programming, not only lua. Learn another languages, as C or Java can be useful to understart how does a computer works with code, in an easiest way.

cobalt saffron
#

But before all of that, you need to learn or be good at maths and physics

grim sorrel
#

Not really? I mean, physics and math is pretty helpful, and obviously having a base level of at least math is probably necessary, but i got into programming back before I was even a teen, with no physics knowledge and only elementary math knowledge.

That's not to say math and physics isn't helpful, as it sure is especially in a decent amount of programs like, say, trying to code a ball to move according to a specific angle, but it's probably best to just get into programming unless if ur math knowledge is extremely base level

#

In fact, a pretty fair share of physics concepts I learned too through programming, not by learning physics by itself

mild sage
#

If your proyects are just cmd scripts that do some kind of process automatic or only related to GUI, then it's not necessary to know physics, else, yes, it will be very useful, especially if you are working in a game that need physics to work

cobalt saffron
#

Transformice have physics

#

😏

grim sorrel
#

Ya ofc physics are still needed for some projects, I just feel as though it isn't necessary to not learn programming at all until you got a handle on some basic physics (even tho the physics is usually not that complex, tho it depends on the program)

narrow jolt
#

We had to replicate physics for the particles when working on the 2014 New Years event

#

It’s basic projectile motion but yeah we did have to do that to get it to work nicely lol

cobalt saffron
#

I'm using physics on #aurora

#

And maths

#

So they're highly needed for great modules

narrow jolt
#

Yup

#

I love math anyways

grim sorrel
#

Bleh I'm not trying to say physics math aren't needed at all, obviously they're important, Transformice itself with your examples plus the platforming with friction, restitution, etc. just being one clear example, I just think physics and math can be learned in tandem with programming or learned when you need to implement a physics or math concept into your code

#

as opposed to learning physics or math before learning programming (which isn't a bad idea, either, just depends on what you wanna do)

narrow jolt
#

You do know programming is basically just an applied form of math do you

grim sorrel
#

yeah

#

i mean i just learned the math and physics while learning programming

#

idk maybe i learned it the wrong order

narrow jolt
#

Nah in tandem is fine

#

But it’ll be weird to teach programming before math

#

Math is literally the building blocks for many of the sciences

#

So when someone tells me they hate math but like computer sciences

#

I get very confused

grim sorrel
#

that's true, math is the foundation for how our universe works as a whole technically

narrow jolt
#

Or people who like physics but hate math

grim sorrel
#

Hm i mean i used to not like math all that much but when i saw math through CS I learned that math was interesting, I just had to look at it through a different lens

narrow jolt
#

Yeah

#

The beauty of math is it’s varied uses

#

And I don’t find issue with you learning to like it after learning cs

grim sorrel
#

It still is a bit more fun to look at applied math, but math when it's not applied is honestly interesting

narrow jolt
#

To each their own

#

I guess I like to have some knowledge of the theory to figure how to apply it

grim sorrel
#

hm i mean part of the reason i disliked math in the past was bc i associated it with how it was taught in school, which didn't involve as much problem solving compared to computer science, at least for me

narrow jolt
#

You guys just had bad teachers then

#

I guess

#

Then again most of my math interest was self directed

#

@grim sorrel I don’t blame you

#

I hate biology because of how it was taught

grim sorrel
#

oh yeah true, i didn't like chemistry particularly at first just bc of how it was taught, but i really began to appreciate the science once i began to research it on my own

#

tbh many subjects end up being based on blatant and boring memorisation and it can quickly make an interesting subject be reduced to having several students lose interest in the subject.

narrow jolt
#

Problem is biology required the memorization before application could be put in

grim sorrel
#

hm my teacher often showed us videos and gave us actual specimen to look at (and sometimes dissect) before giving us the info we needed to memorise

#

And even then, sometimes we had to actually think about that info to get it, as opposed to just copy it down from a sheet of notes

#

so at least i had a good biology teacher

narrow jolt
#

My biology teachers were very passionate

#

I loved their classes but always failed the exams XD

sleek flare
cobalt saffron
#

@mild sage

cobalt saffron
fossil bane
#

vbfu d

fossil bane
#

nmbkml+

mild sage
#

is the new collector hat from dr. stone

gleaming egret
#

The hair is

#

Idk the hat

exotic sequoia
#

I have a simple question. I'm using ui.addPopup, where the script adm would type a word. Then, by using ui.addTextArea I want the word typed to appear on that text box. But how?

mild sage
#

use this like have tools about ui.AddPopup

cobalt saffron
#

Wow but that's not solving the main question

cobalt saffron
#
local adminList = {
    ['ADMIN#0000'] = true
}

eventPopupAnswer = function(popupId, playerName, answer)
    if popupId == 0 then
        ui.addPopup(0, 2, '', playerName, 300, 325, 200, true)
        ui.addTextArea (0, '<font size="15"><b/><R><a href="event:closeChat">X</a></R> <ROSE>ADMIN:</ROSE></b> '..answer..'</font>', nil, 10, 30, 780, 60, 0x122529, 0x122529, 1, true)
    end
end

eventTextAreaCallback = function(textAreaId, playerName, eventName)
    if eventName == "closeChat" then
        ui.removeTextArea(textAreaId, playerName)
    end
end

eventNewPlayer = function(playerName)
    if adminList[playerName] then
        ui.addPopup(0, 2, '', playerName, 300, 325, 200, true)
    end
end

for playerName, playerData in next, tfm.get.room.playerList do
    eventNewPlayer(playerName)
end```
exotic sequoia
#

Many thanks! I'll try it later.

sterile nexus
#

ΒΏAlguien que sepa de luas y hable espaΓ±ol y portugues?

mild sage
#

I speak both languages just not lua haha

mild sage
#

^ me too kkkkkshaiabauagahvw

fringe lily
#

How can I start making lua scripts?

cobalt saffron
#

β€’ [18:31] # [*Zurdos] Init Error : [string "Minstens#0000.lua"]:97: nesting of [[...]] is deprecated

pine prawn
#

@fringe lily assuming that you never learn how to code before:

  1. Learn basic algorithm with LUA, i found this and i think its pretty good https://www.tutorialspoint.com/lua/lua_overview.htm (Learn the Basic Tutorial), and if you want to try to execute code via online compiler, you can use this : https://www.jdoodle.com/execute-lua-online/
  2. Read Transformice LUA documentation for available Events and Functions here: https://atelier801.com/topic?f=5&t=451587 , and to help you understand better, try some Transformice LUA snippets from here https://atelier801.com/topic?f=6&t=451991 (learn what each snippet do and how is it working)

To run your LUA code in Transformice, you need to go to your tribe house and type /lua, then paste your script there.

shell apex
#

hello, can someone help me?

#

ping me

mild sage
#

@RandomGuy________#0003 Help with what?

sturdy cobalt
#

:P

mild sage
#

:p

misty crane
#

How can i make double admin?

grim sorrel
#

Hm, ik a decent amount of lua but what do u mean by that

#

@misty crane

misty crane
#

To use commands like

#

a 2 player

#

etc

wise patio
#

@misty crane that depends entirely on the rest of your code that'd be using it

#

You can implement it easily with a basic table if you want a hardcoded list

local admins = {
    "Shamousey#0015" = true,
    "Melibellule#0001" = true,
}

if (admins[playerName]) {
    -- `playerName` will always be an admin in this block
}
grim sorrel
#

If you want, you can also implement it with as the loader of the script being the first initial admin:

local scriptLoader
do
    local _, msg = pcall(nil)
    scriptLoader = string.match(msg, "^[%+A-Za-z0-9_#]+")
end
 
admins = {scriptLoader}

And then use chat commands later on down the line to add extra users to the admins table

civic burrow
#

(.-)%. is smoother though

#

i'd say admins = { [scriptLoader] = true } is better

grim sorrel
#

Ya that's

#

a lot less code

urban cliff
#

@sterile nexus ΒΏTodavΓ­a necesitas saber sobre luas?

sterile nexus
#

@urban cliff Siempre

urban cliff
#

@sterile nexus xd, ΒΏquΓ© necesitas saber?

sterile nexus
#

Ninguno hizo un lua sobre Stop

#

Yo lo traduce, pero solo partes, despues se fue daΓ±ando(?

#

Quiero traducirlo completamente

#

pero no se en que falla

misty crane
#

Thx this is helped

urban cliff
#

@sterile nexus Cogiste un lua en inglΓ©s y lo querΓ©s cambiar a espaΓ±ol?, solo le tienes que cambiar los pΓ‘rrafos xd, si se daΓ±a es porque cambiaste un ui.

sterile nexus
#

@urban cliff Ingles no, portugues

#

Feliz aΓ±o!

misty crane
#

can i make this color changer?

cobalt saffron
#

Is that from a retroserver?

misty crane
#

no

grim sorrel
#

ik you can change text colour in a lot of situations but to my knowledge, and after looking at the documentation, changing text colour for the timer isn't possible

#

but i'm not the biggest brain in lua so idk

#

Alternatively, you can display a separate timer with a ui and change the colour on that

civic burrow
#

yes you can @misty crane

#

by using the font html

#

or tfm color code

grim sorrel
#

Really you can? hm ig i'm not surprised considering u can change literally every other piece of text

#

colour that is

cobalt saffron
#

I tried but doesn't work

civic burrow
#

You can even rewrite the menu

cobalt saffron
#

ui.setMapName('<J>')

civic burrow
#

bad, old, code... but works

misty crane
#

Thx

misty crane
#

@civic burrow But its changed my hole system of my lua

#

They removed the points to win and other things too

mild sage
#

@misty crane you can give me your lua ? I saw racing map

misty crane
#

What rc map @mild sage ?

mild sage
#

In that screenshot

#

Is a map from racing

#

Soo you can give me your lua to play with my friends ?

#

I can edit admin name and put my name and it works

#

Ok πŸ™‚

#

Yes

austere turret
civic burrow
#

I don't

snow mirage
#

what ia lua based on tho?

#

is it close to a well know language?

civic burrow
#

similar to js, py

hearty flint
#

python?

civic burrow
#

yes

snow mirage
#

ok cool

hidden trail
cobalt saffron
cobalt saffron
#

A new way of crashing rooms is ongoing and there is no way to prevent it

#

But there is a way to filter it

mild sage
cobalt saffron
#
local dayFilter = 1000 * 60 * 60 * 24 * 7
local isPlayer = function(playerName)
    if playerName:sub(1, 1) ~= "*" then
        local playerTime = tfm.get.room.playerList[playerName].registrationDate
        playerTime = os.time() - playerTime
        if playerTime > dayFilter then
            return true
        end
    end
    return false
end

eventNewPlayer = function(playerName)
    if isPlayer(playerName) then
        --DO STUFF
    end
end

for playerName, playerData in next, tfm.get.room.playerList do
    eventNewPlayer(playerName)
end``` with this script you will be able to filter souris and new accounts
mild sage
#

can u crash me on u th lmao

#

ur*

#

i havent been crashed for long

civic burrow
#

Your code doesn't prevent anything

#

and the performance is bad

civic burrow
#

I made a few changes on my code now so that you can use it on eventNewPlayer as well

twin mango
#

consider me a kid and explain to me what is lua derpy also lua means moon on my country

twin mango
#

thanks

sterile sparrow
#

we are moon people

twin mango
#

XD

north wren
#

Can I do that the user name be invisible?

cobalt saffron
#

no

remote shard
#

Yes

#

Disable show user names on options

misty crane
#

Yes u can

#

You can make it to your script too

edgy jolt
#

ze lua pro villooom

misty crane
#

Ofc

#

Now in english?

edgy jolt
#

no me zpeak ze ziwenz

misty crane
#

Ok derpy

stray bane
#

does anyone know how to spawn an invisible cloud in utility

ivory pilot
#

@stray bane Invisible as in, ghost like shaman objects when you press space, or literally invisible?

stray bane
#

Literally invisble

#

There is a command for it

#

!spawn xxxx

ivory pilot
#

That would be !spawn 5701

#

You see, the way shaman object IDs work is that only IDs between 0-99 are for different objects

#

Any ID three digits or longer is a variant of an object

#

For examle, 1xx are various small boxes - 101 is the Valentine's one, 102 is the "mecha" one, 103 is the giftbox and so on

stray bane
#

Thank you

#

Yeah I know that

#

I just forgot the code for cloud

ivory pilot
#

When the game doesn't find a variant corresponding to that ID, the object turns up completely invisible

#

Alright then, just felt like typing this out

#

Maybe someone will find this useful

rancid chasm
#

How to insert images?

hidden trail
#

u have to use tfm.exec.addImage(imageId, target, xPosition, yPosition, targetPlayer) method to insert images through lua

#

note that the method is available only for module team

misty crane
#

how can i make imageId work?

hidden trail
#

imageid is the filename of the img

#

the docs specifies the usage clearly

misty crane
#

thx

#

but if i want it with xml

#

example i="-4,-398,picture.jpg"

hidden trail
#

ya u can do it with xml

#

u can use theImageId.png as the 3rd arg

#

(^if ur xml is right, cuz i cant remember tje syntax lol)

misty crane
#

and if i have the jpg where do i need to upload it

#

and i did it with tfm.exec.newgame

hidden trail
#

normal players cant upload imgs to the db

civic burrow
#

they can if they join my server

hidden trail
#

ye i already invited them πŸ˜›

glad mountain
#

hey, i need some help please X,D
i don't know if it's possible, to change attribu of the map with lua, for ex change the gravity, or add wind ..?