I found this link from codex post somewhere last night http://www.tutorialspoint.com/lua
What link should i start at first on the webpage
What link should i start at first on the webpage
I think I'm also going to read all of those tutorials, I really need to learn it too.
Use smaller sentences.Well I think tutorial points better to look at then go to scripting guide again and relook but so far as I been learning Npcs createing are more common for any server and any scripter can solve. Im going to make a npc with exchangeing gear if i can but I want to see how long I can not post for help for any scripts only problem I struggle on is the stuff that need ( * if elseif which tutorialspoint will tell me what i can use which also I think after u learn tfs 1.2 scripting u can do it all from any other version basically im starting at hard version of learning scripting a little in a way.But in my head im always thinking scripts take 2-5 mins to be make honestly still trying to figure what take people so long scripting when u can copy or paste and edit the stuff you want to do.I never made a event but someone who makes em I would love to see how many people makes em and takes 1-4 hours to make I doubt i be able to do but more likely i thought event makeing scripts were like 5-10mins to make to me.
Use smaller sentences.
If your going to build a server and want to have custom scripts then you or anyone else on otland that claims to be a scripter needs to learn the core language, there is no way around it.
Do you know the basics of LUA?
It sounds like you want to learn, but starting with a huge (& messy) script might not be the best idea.
Once again, I don't know how much you already know about LUA, but the best way to start is to study some simple scripts that come packed in TFS by default - such as:
You can then go into the documentation and open the file called LUA_FUNCTIONS that is very helpful for beginners. It contains 90% of the functions in TFS and a lot of descriptions and small code snippets that describe how to use those functions.
- 6 sided dice roll & how it transforms the item and sends that effect to the position of the dice
- Study the machete script to learn a bit about arrays and how you can use and draw information from them.
- preventWalk / pushback in movement scripts that pushes the player back to the tile where he came from
- etc.
The next step would be to take a look at which options you have to trigger your functions.
You have actions (when something with an attached aid/uid is used), creaturescripts (when something dies, logs in, logs out, advances in skill, prepares to die, etc.), movements (when something moves, either an item or a player from a position/slot to another position/slot), spells (when someone casts a spell configured in spells.xml), talkactions (when someone says a configured word or command), globalevents (when the server is starting, closing, when time passes while the server is running, etc.).
Now when you know all the different kinds of triggers for your scripts, you can imagine something. For example, a doll that gives you an addon when you use it, and start creating such a simple script by looking at the functions in LUA_FUNCTIONS and modifying them to fit your requirements in your action script for the doll.
Here is a great website where you can read up on anything lua related if you're looking to learn some new tricks (now we're talking about the language, syntax and mechanics), for example how to use tables/arrays, how to use loops, conditions and whatnot:
http://www.lua.org/pil/contents.html#P1
Here are some neat posts by OTLand users that can help you learn more about scripting in lua:
https://otland.net/threads/list-of-tutorials.180156/
https://otland.net/threads/beginner-scripters-dummy-proof.233921/
https://otland.net/threads/lua-understanding-storages.189075/
https://otland.net/threads/how-to-using-addevent.225292/
Take note, various server engines operate with slightly different versions of these same functions.
In TFS 1.0, some things are written a bit different from TFS 0.2.x or TFS 0.3.x.
Once you learn more, you can even make your own functions and use them in your server.
If you're already experienced, then, I suppose, you may disregard what I said as you probably know all of that, but eh, leaving this out here for anyone who might find it helpful.
Literally one of the best out there.http://codecademy.com for web based coding^^
A shame they didn't add LUA...yet Anyway it really is great because you see results of what you are doing directly and can experiment and such^^ Pretty damn cool if you ask meLiterally one of the best out there.
I really like the website, http://codecademy.com.A shame they didn't add LUA...yet Anyway it really is great because you see results of what you are doing directly and can experiment and such^^ Pretty damn cool if you ask me
I also have alot of books but I use them for reference rather. They don't motivate me tbh.
It's pretty coolI really like the website, http://codecademy.com.
Yeah, I also need to learn web designing for my education next year, so this seems like a good site to begin learning on .It's pretty cool