Hello everyone, I am new to Achaea and am a Serpent. I want to code my own scripts so that I can begin to learn Mudlet. I literally have very minimal knowledge of it already except for making basic triggers, and aliases. My first goals are to:
1.) Code my own bashing script to utilize my rage abilities on top of my garroting.
2.) Code my own PvP combat
3.) Code my own curing system based off the use of server-side
I'm not a computer science major or anything, but am decent at math and thinking.. But I just don't know where to begin in learning Mudlet/Lua. Everyone just says they taught themselves. Is it really possible to teach myself? Where do I even begin? Sure I could learn how to code a "table" but I wouldn't know how to even utilize it.
Is there anybody that would be willing to help teach me as well? Thank you, it would be much appreciated.
- Aeacus
@Cesarina: I took your advice and began to look at some of the scripts I have downloaded but.. they made no sense. Do you mean look at the XML or what it puts in my Mudlet?
Comments
The mudlet manual is a good place to start.
The Mudlet Lua wiki is another good reference.
The Lua Wiki is another good resource.
and this also helped me quite a bit.
There are several youtube videos out there as well.
My videos are the only ones I happen to have the links readily available for.
Also, my website has a couple tutorials that might help.
edit: muldet ~= mudlet
When I got sick of writing 8 billion if statements in a script, I learned how to use tables. Since then, writing has been rather easy because of the sheer power of tables.
oh, also, I used Trevize's old RegEx tutorial and that helped a ton too. It's since disappeared, but I tried to make one as simple as his was to understand.
For building triggers: https://regex101.com/
Also, get into the habit of writing re-usable code. What do I mean by that? If you're constantly putting the same sections of code into your functions, separate it out into its own function and call that. A good example is a custom echo, instead of writing:
you could build a separate function:
then call it using
It'll save you time in the long-run.
https://ada-young.appspot.com/pastebin/d6b8ae2c
@Klendathu Thank you!
Just trying to understand so I can use it myself
@Andregor: http://wiki.mudlet.org/w/Manual:UI_Functions#moveCursorEnd
Essentially it makes sure that the cursor is pointed at the very end of your main window's output before it echoes new text, so you don't end up putting it in the wrong place if another script has moved the cursor to a different line.
Out of curiosity, did you look up what the moveCursorEnd function does before asking? If not, that's a really good habit to get in to: if you see something and you don't know how it works, look up the documentation for it. If that still doesn't make sense then ask for an explanation of those parts.
Results of disembowel testing | Knight limb counter | GMCP AB files
Buy this book. It is literally one of the best written programming books ever, by the creators of the Lua programming language. I have nothing against the myriad of free resources available to the aspiring Lua coder, but trust me - you will get more out of everything else available to you if you read this book first. It is easy to read, easy to follow, and not long. Pick it up, and the vast majority of your questions will be answered in the first 80 pages. These guys know how to get the most out of the language, and you should too!!
Best regards, and feel free to PM me with any Lua or Mudlet related questions you have.
You can also scroll down a few topics in this forum (go here: http://forums.achaea.com/discussion/3677/free-full-gui/p1) and get a pre-built GUI, by Zulah, that you can modify and experiment with rather than starting from scratch. That's what I intend to try.
Carry the Moon