• 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!

How did you learn to script?

Apollos

Dude who does stuff
Joined
Apr 22, 2009
Messages
829
Solutions
123
Reaction score
655
Location
United States
Looking to find the best route to learn scripting for OT's wondering how you started and what tools you would suggest to use in order to learn how to create your own scripts. I'm curious as to how many are self taught through working on OT's and how many took some actual classes to learn.
 
Copy + paste someones scripts and then, modifying them a bit to match your needs.
This is the best way to learn, doesn't matter what you are going to learn. Such method is used in all schools around the world.

Useful programs and things:
1. Notepad++
2. auto-completion for Notepad++ with TFS functions and cons.
3. Knowledge how to search in google, I mean usage of special characters in search box. This helps with searching things on OTLand and elsewhere.

Be a programmer, scripter, mapper, tester and a gamer - this will make you the most complete game maker.
Simple programmer can't understand players' needs if he isn't playing his games. This is like Cipsoft with thier shit ideas, ex: magic wall behavior on non-pvp servers.
 
Last edited:
I think the best way to learn is to have motivation & fun :) This is the only thing you need as you will learn the rest along the way ;)
 
Last edited:
i first started by looking through datapacks and editing some scripts to see if they would work
then i tried creating my first server a month after doing so but i never actually looked up any lua tutorials at the time so i was horrible
about a year later i got back into learning lua, i mainly learned from lua tutorials from lua-users and lua.org + asking others
now i just make random shit to see if i can make it or not, if not i learn how to do it

some advice:
- don't get a program to create something for you (spellcreator, npc maker, etc), learn how to do it yourself
- keep a document of all the functions available (im sure im not the only one that keeps one open at all times, here's mine)
- ask others if you don't understand something or ask how to improve something you wrote
- you can learn the basics of tfs functions here
 
One of my first accounts on OtLand is quite embarrassing. I posted in bold text and begged for help. :D Eventually, I grew tired of getting nowhere with people ignoring my requests, so I decided to take things into my own hands. The foremost critical aspect to programming or coding is your ability to comprehend what you're looking at and identifying what you want to achieve. I learned by trial and error: reading through scripts, editing functions, trying to understand how they worked and figuring out what went wrong. Now I'm receiving 100% (or higher) in all programming courses at my University and am more than capable of handling data pack development for an entire server (not that I want to).

If it is important enough to you, you'll find a way. If not, you'll find an excuse. That's what life comes down to: a series of choices and decisions.

Good luck.
 
I learn seeing alot scripts trying to understand them so the most important thing is on the eyes, make some edits of other scripts and make your own scripts later starting from low to high in difficult!
 
One of my first accounts on OtLand is quite embarrassing. I posted in bold text and begged for help. :D Eventually, I grew tired of getting nowhere with people ignoring my requests, so I decided to take things into my own hands. The foremost critical aspect to programming or coding is your ability to comprehend what you're looking at and identifying what you want to achieve. I learned by trial and error: reading through scripts, editing functions, trying to understand how they worked and figuring out what went wrong. Now I'm receiving 100% (or higher) in all programming courses at my University and am more than capable of handling data pack development for an entire server (not that I want to).

If it is important enough to you, you'll find a way. If not, you'll find an excuse. That's what life comes down to: a series of choices and decisions.

Good luck.

Well said.
 
i dont know how properly but i have been learning reading others codes and from otservers and bots
 
Write a code from scratch. Keep expanding it. But you need to know what every line means before you add another line. Start with a single line, e.g. player:addItem(cid, 2160, 10) in a function onUse for example. You know what cid is? Know what 2160 is? Know what 10 is? And most importantly, did you test it? Okay, fine. Now write the next line. Send an effect perhaps? Next, limit it to level 100. Next, make sure player can only use it once. player:setStorageValue(2130, 1). Hey, what does that 2130 mean? And the 1? Mess with it. Etc......

My first script was a snow tile where you click it you obtain a snowball (which I actually copied entirely from another script and edited just the IDs). Next, I made it give you 5 snowballs. Next, random amount. Next, only works once per hour... Etc... At this point I pretty much knew nothing about scripting. You learn that way.
 
Write a code from scratch. Keep expanding it. But you need to know what every line means before you add another line. Start with a single line, e.g. player:addItem(cid, 2160, 10) in a function onUse for example. You know what cid is? Know what 2160 is? Know what 10 is? And most importantly, did you test it? Okay, fine. Now write the next line. Send an effect perhaps? Next, limit it to level 100. Next, make sure player can only use it once. player:setStorageValue(2130, 1). Hey, what does that 2130 mean? And the 1? Mess with it. Etc......

My first script was a snow tile where you click it you obtain a snowball (which I actually copied entirely from another script and edited just the IDs). Next, I made it give you 5 snowballs. Next, random amount. Next, only works once per hour... Etc... At this point I pretty much knew nothing about scripting. You learn that way.
Trial and error. Every mistake you make is a learning point.
And above, is basically how every script is born.
A bunch of simple ideas working together to create a bigger idea.
 
Trial and error. Every mistake you make is a learning point.
And above, is basically how every script is born.
A bunch of simple ideas working together to create a bigger idea.
Yes, but I notice most people who wish to learn take massive scripts and have no idea what to do, instead of starting small. When they ask me what does this line do? Even if I explain, they don't get it. Because it's still part of something too big for them. They need to see it work all on its own to fully understand it.
 
spammed support thread and grinded scripts.
At start spent like 12 hours per day trying to write random things for months.
When I got stuck with something I searched OTland, google and then made new support thread if didn't figure it out.
While I was waiting for answer I started making some other script.

Back then I didn't even know how to change item:getActionId() xD
old support thread

Conclusion: Write scripts.
 
Even tho I'm also a newb to coding:

I did some livestreams on livecoding.tv when I started with PHP, You don't need to be good at coding to livestream there I had like 20 viewers some streams. I got a lot of help with scripts which I was making and explanation on how things work and how to do them better. You should know what everything in your code does not just copy-paste things imo. I think it's really nice to get helped by people when you are just starting. Like having a programming mentor. The best way to learn programming is just to keep doing it. If you code once in 2 weeks that ain't going to help you.

Good luck.
 
Yes, but I notice most people who wish to learn take massive scripts and have no idea what to do, instead of starting small. When they ask me what does this line do? Even if I explain, they don't get it. Because it's still part of something too big for them. They need to see it work all on its own to fully understand it.
I was just flowing with the thread. I agree with you.
 
Here are a few tips:
  • Don't feel ashamed or scared about asking questions.
  • Remember that EVERYONE has been where you are right now. This will make (1) easier.
  • Motivation is very important.
  • Start off with solving easier problems to practice problem solving and advance from that. Use theory to complement your learning.
  • Remember that there's a lot of bad code on the internet.
  • DON'T BE IMPATIENT. Learning takes time.
 
Back
Top