Lua Commands and Codes

Tweiii

Mouse
hey people! i'm gonna to show you how to learn lua to learn other coding stuff go to #off-topic cause it's not related to lua/moudle's
so lets start with something basic like...
Markdown (GitHub flavored):
tfm.exec.snow()
should make it snow all over the room

so anyways lets get back to it so if you wanna do it the hard way too go to lua.com for docs to get the lua working in the chat do /lua then it should open up a little text editor then you enter the code click submit and then BOOM! the magic happens if your not the lua team you gotta do it in your trible cause it wouldn't affect any other rooms then.... so now we learned that lets find out some functions we need to use that are important to use while making your lua script
Markdown (GitHub flavored):
                                          Functions
                                exec
                                tfm
                                cheese
                                PlayerVampire (this function doesn't exist trying to fix my mistake)
                                snow
                                die
i'll be sure to update all the functions soon as i can to add more... so lets make something with these little functions
so let's say like...
Markdown (GitHub flavored):
tfm.exec.giveCheese("Your name")
then it should give you the cheese

and now we made two basic functions lets make commands with those functions we just learn heres an example
Code:
function eventChatCommand(name,command)
if command=="givemethecheese" then
tfm.exec.giveCheese(name)
end
end
now in the chat type !givemethecheese or whatever command you renamed it to the ! is important cause that's how the server is going to request the command
(i'm so sorry i've been editing this every night cause my hands need a break from typeing ;-;)
 
Last edited:

Jasbear

Cheesus
I mean I respect you put in this dedication and stuff but this isn't really the definition of learning LUA, this is more related towards giving out examples on what LUA is like, LUA the language itself take a time to to interpret and understand, you just gave a website that's does everything for you
 
Last edited:

Peachiie

Cheesus
I mean I respect you put in this dedication and stuff but this isn't really the definition of learning LUA, this is more related towards giving out examples on what LUA is like, LUA the language itself take a time to to interpret and understand, you just gave a website that's doesn't everything
 

Pineabble

Well-Known Mouse
Amazing thread!
 
Lovely
 
Top
"Dev-TR" theme by Soulzone