Page 1 of 1

Mudlet Manual, Lua & Regex Tutorials and References

Posted: Wed Sep 23, 2009 2:02 pm
by Heiko
Mudlet manual: http://mudlet.git.sourceforge.net/git/g ... ml;hb=HEAD

Geyser (Mudlet's layout manager) Howto: http://wiki.mudlet.org/w/Manual:Geyser

(best) Programming in Lua: http://www.lua.org/pil/index.html

Lua tutorial directory: http://lua-users.org/wiki/TutorialDirectory



PCRE regular expression tutorial & reference: http://www.regular-expressions.info/reference.html
PCRE manual: http://www.pcre.org/pcre.txt


list of additional Lua special purpose modules: http://lua-users.org/wiki/LibrariesAndBindings

help on compiling Mudlet from source code: here

Re: Mudlet Manual, Lua & Regex Tutorials and References

Posted: Fri Jan 21, 2011 12:56 am
by Vadi
Pattern for capturing negative numbers with regex: (-?\d+)

Re: Mudlet Manual, Lua & Regex Tutorials and References

Posted: Thu Feb 03, 2011 6:20 pm
by uti
Seems to me like the following sections are missing, and their links in the ToC are dead:
4. Advanced Learning From Selected Example Scripts
a. inlineMapExample
b. Auto Miner Bot Example - How to write a little Bot with Mudlet?

5. Custom GUI Elements
a. User Terminal Windows
b. Custom Mini Text Displays - Scripting Labels
c. Scripting Buttons
d. User Custom Graphics Windows

Re: Mudlet Manual, Lua & Regex Tutorials and References

Posted: Thu Feb 03, 2011 6:21 pm
by Vadi
Will be cleaned soon, thanks.

edit: done now.

Re: Mudlet Manual, Lua & Regex Tutorials and References

Posted: Thu Feb 03, 2011 9:54 pm
by Yetzederixx
Example, from another thread (which I can't find), of accounting for optional info/arguments/parameters in an alias. This same method works anywhere in a regex, but I find I use it only for alias' myself.

^qwerty(?: (\w+))?$

I do this for quite a few spell alias' which don't need targets if you are already in combat. Code is like:
Code: [show] | [select all] lua
if matches[2] then send("do_something to " .. matches[2]) else send("do_something") end

Re: Mudlet Manual, Lua & Regex Tutorials and References

Posted: Wed May 04, 2011 1:22 pm
by Yetzederixx
While trying to help someone else I found this other online regex tester: www.regextester.com/. This one will tell you what is in the matches table from your pattern.