|
Fang Xianfu |
Posted: Sun May 27, 2007 4:20 pm
Getting Lua to work in CMUD (or zMUD!) |
|
forren Novice
Joined: 26 Apr 2007 Posts: 44
|
Posted: Fri Jun 01, 2007 8:55 pm |
Zugg wrote: |
Just to finish the side-track on ATCP: I contacted the owner of IronRealms and have gotten the official go-ahead to put ATCP support into CMUD. I should be receiving the technical details from the Achaea manager soon. I'm sure all of the Achaea players will be happy to hear this.
When I implement this, I also plan to add more generic support for responding to other telnet option negotiation within CMUD. |
YES!
I play Lusternia and am currently building a new system for CMud - right now I'm using Mudbot for ATCP tracking, but having this in CMUD will be much more simple. |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Sat Jun 02, 2007 12:43 pm |
Awwwwesome! I think this new feature alone would give many people good reason to switch to CMUD. MudBot is nice, but it's an extra step to loading and connecting that I'd rather not have.
|
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Fri Jan 16, 2009 1:58 am |
Hey sorry to resurrect such an old thread
I was reading some of the features Mudbot has and I was thinking that it might allow you to treat lines like mushclient does (not line by line liek cmud), basically the MudInput function is very interesting to me, since I have to deal with lines w/o any newlines/cr cmud is kind of a pain atm to use. So basically I was wondering if you could offer some input on using mudbot. Specifically, what do you need to do to get triggers working? Ive tried:
Code: |
-- rex table, key = id, val = compiled rex.
trig_rex={}
-- trigger command table, key = id, val = func
trig_func={}
rex = require("rex_pcre")
re = rex.new ("#K(.*)")
-- trigger event handler
mb.server_line = function ()
for id in pairs(trig_rex) do
local match
_, _, match = trig_rex[id]:match(mb.line)
if match then
trig_func[id](match)
end
end
end
function mb.server_lines( )
for i = 1, mb.nr_of_lines do
set_line(i)
echo(mb.line)
end
end
|
to just get basic feel for it, all iw anted to do was double line lines received, and i can't even get this working. essentially I want to move up where I can get a line that has something like #K%28001123~F~232You hit mob hard! and be able to strip the #K%...part with mudbot and make the varibles from within there and only send the you hit mob hard, ect to cmud. THanks for anything you can offer |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|