Hey folks. I am trying to pick up some Lua knowledge so I'm not completely helpless where scripting is concerned. Thanks to Google, I have found a few good resources and I thought it would be nice to share them here so other scripting newbies can find help.
Firstly-
Also, the Lua site itself has a ton of information
The Lua Users Wiki also hosts links to other resources
Recently translated into English, this site has a good 'walkthrough' style introduction to Lua, though the author refers to it as LUA for some reason
LuaForge hosts a ton of projects that seem interesting and/or useful
The Lua Reference Manual
Other useful things:
I personally am a huge fan of Notepad++ for Windows (
http://notepad-plus-plus.org/), which has support for Lua that can be further extended with language files/plugins
I hope someone else finds this to be useful. If anyone knows of other good resources, I would encourage them to share!
Also, a good tip I received - the best way to learn is by doing. An easy way to do that is to grab binaries from the LuaBinaries project and just start writing some scripts. good luck have fun!
"Under all that we think, lives all that we believe, like the ultimate veil of our spirits." --Antonio Machado
"The belief that becomes truth for me is that which allows me the best use of my strength, the best means of putting my virtues into action." --Andre Gide
"It is not enough to have a good mind; the main thing is to use it well." --Rene Descartes
Comments
Svof
Mudlet Discord join up
Also, Notepad++ is a lifesaver. For sharing, I highly recommend pastebin.com.
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
y and "yes" or "no"
If Y is true, returns 'yes', if false, returns 'no'. You can use that in a return, variable setting, or even in a text string. I often do things like... (just an example)
print ("System enabled: " .. (system.enabled and "yes" or "no"))
And I ran into this concept by noticing it in someone else's script.
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
Party right, party hard,
Sing and dance, perfect bard.
Prefarar loop, accentato whore,Buy a new rapier, get nerfed some more.
'and' looks at the left and right. If the left is false, it returns the left. If it's true, it returns the right side.
'or' looks at the left and right. If the left is true, it returns the left. If it's false, it returns the right side.
Keep this in mind, then keep in mind that anything other than false or nil is considered true.
Let's break it down in action...
true and "yes" or "no"
1) true and "yes" looks at the left - it's true, so it returns what's on the right. "yes". 2) We now have "yes" or "no". since "yes" is true, it returns that. We're left with "yes".
false and "yes" or "no"
1) false and "yes" looks at the left - it's false , so it returns false. 2) We now have false or "no". since false is false, it returns what's on the right. "no". We're left with the "no".
As stated above, it does what what normally take an if statement, which means five lines dropped to one, and if you surround it in parentheses, you can even place it inline like my first example, saving even more space.
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
→My Mudlet Scripts