Search found 19 matches

by WillFa
Mon May 17, 2010 8:22 pm
Forum: Help Forum
Topic: Alias and Targeting in Achaea
Replies: 25
Views: 5921

Re: Alias and Targeting in Achaea

pattern: ^sst (\w+)$ you can substitute "sst" with whatever you want body: send(string.format("strike %s sternum",matches[2])) How is this different from: send("strike " .. matches[s] .. " sternum") is it better or quicker? it's really not different, except that using string.format makes things eas...
by WillFa
Thu May 13, 2010 10:55 pm
Forum: Mudlet Development
Topic: Debugging LuaGlobal.lua
Replies: 7
Views: 2662

Re: Debugging LuaGlobal.lua

That's what git and branching are for.
by WillFa
Thu May 13, 2010 4:33 pm
Forum: Mudlet Development
Topic: Debugging LuaGlobal.lua
Replies: 7
Views: 2662

Re: Debugging LuaGlobal.lua

Why is there a separate repository for a file that's included in the mudlet/mudlet repo on sourceforge??
by WillFa
Thu May 13, 2010 2:47 pm
Forum: Mudlet Development
Topic: Debugging LuaGlobal.lua
Replies: 7
Views: 2662

Debugging LuaGlobal.lua

Would it be possible to change Mudlet's behavior of trampling LuaGlobal.lua to recreating it if it doesn't exist? (Or more fancy, wrapping the dofile in a pcall and trample if it errors, and moving the file to a .bak extension) There's a lot of stuff in there that I was going to rewrite; functions t...
by WillFa
Wed May 12, 2010 6:46 pm
Forum: Mudlet Development
Topic: Requesting LPEG
Replies: 15
Views: 4787

Re: Requesting LPEG

By the way: would lpeg be a new match type for triggers? That'd be cool. You'd just use a Lua Function pattern type. Make a script leaf to define the grammar, and then a trigger leaf that does myLpeg:match(line) in the pattern. Oh, and yes it's another tool, and not the perfect tool for every job, ...
by WillFa
Wed May 12, 2010 5:38 am
Forum: Mudlet Development
Topic: Requesting LPEG
Replies: 15
Views: 4787

Re: Requesting LPEG

Thank you, Heiko! :) I'd like to chime in on the comments about making "the pattern do everything". LPEG is slightly different from what PCRE experts are used to dealing with... With each line of text the mud sends you, you want to do three things to it: 1. Identify it. 2. Extract data from it. 3. M...
by WillFa
Tue May 11, 2010 12:23 am
Forum: Mudlet Development
Topic: Requesting LPEG
Replies: 15
Views: 4787

Re: Requesting LPEG

Another example... In my finished Mushclient plugin, the lpeg behaves a bit more abstractly. The plugin checks the mud and gets the custom_hp variable in my guild which returns: You have custom_hp set to: HP: &$HP2$& K: &$K2$& SP: &$SP2$& V: @himagenta:&$V$&@%&$AS$& @hicyan:&$P$&@ @himagenta:&$C$&@ ...
by WillFa
Mon May 10, 2010 8:37 pm
Forum: Mudlet Development
Topic: Requesting LPEG
Replies: 15
Views: 4787

Requesting LPEG

Lua Pattern Expression Grammars is another pattern system that lends itself really well to mudding. Here's an introduction to LPEG by Roberto Ierusalimschy (the head Lua guy) which includes PCRE benchmarking (LPEG is generally faster in most mudding applications) As for a more mud-centric informatio...
by WillFa
Mon May 10, 2010 6:01 pm
Forum: General Forum
Topic: Mudlet features and API requests
Replies: 520
Views: 357352

Re: Mudlet API requests

With the Lua Function trigger patterns an ideal use for this would be for LPEG functions. Could you link to the LPEG library for cross platform ease of distribution of packages? :) Also, another +1 for onConnect and onDisconnect events. also, I am encountering a problem with my mud's version of ATCP...