Search found 19 matches

by WillFa
Wed Jul 28, 2010 7:14 am
Forum: Mudlet Development
Topic: LuaGlobal Improvements - help needed
Replies: 47
Views: 29383

Re: LuaGlobal Improvements - help needed

Vadi, when you announced Mudlet in the Mushclient forums, Nick wished ya all the best and said that MC's open source, steal what ya want...


Can you grab his tprint, so things like tprint(Geyser) doesn't go into an infinite loop and kill the client?
by WillFa
Tue Jul 20, 2010 4:18 am
Forum: Help Forum
Topic: Regex help.
Replies: 9
Views: 5632

Re: Regex help.

\w is any letter (any word character). It doesn't match spaces. ^(.*?) \[(.*?)\]$ is what you want. I'm assuming you're trying to match a room short desc + exits. Of the posted responses, this is the best one. It backtracks less, and unlike the others, will actually not break if there's more than o...
by WillFa
Tue Jul 20, 2010 1:55 am
Forum: Help Forum
Topic: Regex help.
Replies: 9
Views: 5632

Re: Regex help.

\w is any letter (any word character). It doesn't match spaces.
^(.*?) \[(.*?)\]$

is what you want.
by WillFa
Sun Jul 04, 2010 11:37 pm
Forum: Help Forum
Topic: counter
Replies: 11
Views: 8538

Re: counter

Vadi wrote:tbh I suspect / will work fine on windows as well
Lua does the conversion for you. If you want to use backslashes, you need to escape them with a backslash (i.e. C:\\Users\\Foo)
by WillFa
Fri Jul 02, 2010 10:55 pm
Forum: Help Forum
Topic: Lua and DLL's
Replies: 4
Views: 3526

Re: Lua and DLL's

If you're just referring to standard cdeclspec functions, you might consider a package called Alien. If you're new to Lua, I'd recommend getting the Lua for Windows installation. It installs what you may think of as a VM, an IDE, and lots of libs and provides documentation and a walkthru of the lang...
by WillFa
Wed Jun 02, 2010 9:27 pm
Forum: General Forum
Topic: Mudlet features and API requests
Replies: 535
Views: 707006

Re: Mudlet API requests

I keep seeing people use the term "shielded regexp" ... what's it mean? A regex further down a filter chain or something?
by WillFa
Fri May 28, 2010 6:50 pm
Forum: Howtos, FAQs and Tips & Tricks
Topic: How to send a random command
Replies: 17
Views: 24630

Re: How to send a random command

Vadi wrote:http://www.lua.org/manual/5.1/manual.html#2.5.5

for indexed tables, it's how many elements are there (holes are accounted for), for strings, it's usually how many characters

so #commands in this example is 3
No it doesn't count holes.
Code: [show] | [select all] lua
foo = {1,2,3,[5]=1}
print (#foo)  -->  3
by WillFa
Mon May 24, 2010 9:49 pm
Forum: Help Forum
Topic: Metatables
Replies: 4
Views: 3667

Re: Metatables

A metatable is a hidden table attached to a table. It several default keys that have a special behavior: __index -- is called when the key doesn't exist. __newidx -- is called when a new value is ADDED (not changed) __call -- is called when you try to use the table as a function. are the most common...
by WillFa
Mon May 24, 2010 6:42 pm
Forum: Help Forum
Topic: putting image in label
Replies: 14
Views: 10114

Re: putting image in label

In regular strings, Lua uses \ as an escape character. Like when concatenating "\n" in for a new line, it's reading the "\i" as a metacharacter. To fix it, you can either: 1. double up the backslashes in a regular string. "C:\\images" 2. Use Lua's long strings like Heik...
by WillFa
Tue May 18, 2010 6:28 pm
Forum: General Forum
Topic: What Mud do you play?!
Replies: 26
Views: 19780

Re: What Mud do you play?!

3 Kingdoms
3k.org:3000