• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Learn LUA

Bayzel

New Member
Joined
Mar 2, 2015
Messages
12
Reaction score
2
Hi, I have a short question. What's the best way to learn LUA (to open tibia) if I don't anything about programming?. I mean, is there any way to do it and don't make a lot of exercises, calculators, and other things not related to what I want to learn (scripts to tibia servers)? or is it necessary? I just want to know if there is a more direct way to learn "LUA to Open tibia" and not "LUA general", or not :p

Thanks you!
 
Well, as far as lua is concerned you just need to know 3-4 things, and you can pretty much do everything lua related within OT's.

Learn basic syntax / tabbing.
Code:
function a(param1, param2)
    -- do something
end

learn how arrays and tables work.
Code:
local array = {1, 2, 3}
local array_2 = {
    {1, 2},
    {1, 3}
}

learn how to use the different kinds of loops.
Code:
while loop
for loop
repeat loop
nested loops [intermediate]

and know basic math, as you'll use it quite frequently.

-----------
This is all coming from someone that has taught themselves how to code, exclusively through and around this community.

Give player infinite items from table, with 1 small function.

For a small example of something you can do with just the above information.
 
you can learn a lot yourself just by reading the PIL book here: Programming in Lua (first edition)
you're gonna end up having to learn lua in general, there's no such thing as just "lua for otservers"
to learn you're gonna actually have to put in the effort, there's no such thing as shortcuts to learn
 
What I advise is to start doing basic things, calculators and other things. For you to learn Lua even if it is for tibia, you have to learn Lua as a programming language and not just random words that perform things in tibia. If not, you can not create something good and your code will be bad.
To learn, you can get your ideas and start creating them and going over all the barriers you find with our friend Google (when I want to learn a new programming language I usually do this)
;)
 
Back
Top