Search found 19 matches

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

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: 2187

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: 2187

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: 3323

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: 1575

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: 520
Views: 332804

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: 13739

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: 1461

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: 3906

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 Heiko suggested. [[C:\images]] 3. ...
by WillFa
Tue May 18, 2010 6:28 pm
Forum: General Forum
Topic: What Mud do you play?!
Replies: 26
Views: 8624

Re: What Mud do you play?!

3 Kingdoms
3k.org:3000