Search found 28 matches
- Thu Jan 07, 2010 9:19 am
- Forum: Help Forum
- Topic: Registered Event Handlers
- Replies: 3
- Views: 4460
Re: Registered Event Handlers
Just a note for future reference, If you're passing arguments to an event handler (even more than one) you don't need ... as a parameter: function event(eventName, a, b, c) echo(a); echo(b); echo(c) end Then you can raiseEvent("myEvent", "wh", "a", "t") and ha...
- Thu Jan 07, 2010 2:14 am
- Forum: Help Forum
- Topic: Aaaaargh!
- Replies: 12
- Views: 8279
Re: Aaaaargh!
You will also want to check if matches[2] is actually in the table, for example: Pattern: ^1(\w+)$ Script: if venoms[matches[2]] != nil then if inforest==1 then send("blowpipe " .. venoms[matches[2]] .. " " .. target) else send("spit " .. venoms[matches[2]] .. " at...
- Tue Jan 05, 2010 5:44 am
- Forum: Mudlet Development
- Topic: Mudlet Mapper
- Replies: 139
- Views: 151143
Re: Mudlet Mapper
I'm generally agreeing with everything said here, but as for the storage why not use map,x,y,z coords instead of an arbitrary vnum? That way you can use a hash map for each room that lists a 'command' to send and its resultant modification to each of the exits. This way heuristics become one hell of...
- Mon Jan 04, 2010 12:49 pm
- Forum: Help Forum
- Topic: Best way to run lots of commands
- Replies: 12
- Views: 8571
Re: Best way to run lots of commands
I'll post this here as it's sort of related and I don't feel like making a new thread. I'd avoid loops as much as possible, atm they seem to block (preventing data from being received/triggered on), but if you're sending something that doesn't depend on any server-side data I suppose you could do so...
- Thu Dec 17, 2009 10:41 pm
- Forum: Scripts & Packages
- Topic: Echo with color.
- Replies: 30
- Views: 29660
Re: Echo with color.
Can we still optionally have the non-lrexlib dependent version available separately?
Lua already has pattern matching which is pretty similar to regular expressions anyway. That, and lrexlib wont work on my system and probably a couple of others
Lua already has pattern matching which is pretty similar to regular expressions anyway. That, and lrexlib wont work on my system and probably a couple of others
- Thu Dec 17, 2009 10:37 pm
- Forum: Help Forum
- Topic: executing a function that is a value in a table
- Replies: 5
- Views: 4530
Re: executing a function that is a value in a table
You could always save the .lua file in a relevant location and load it into others with dofile('path/to/file.lua').
You are right, though. It is a little awkward trying to keep them in order at the moment.
You are right, though. It is a little awkward trying to keep them in order at the moment.
- Wed Dec 16, 2009 8:31 am
- Forum: Scripts & Packages
- Topic: Achaea Fancy GUI 1.0
- Replies: 146
- Views: 122364
Re: Achaea Fancy GUI 0.4
Thanks for the script Vadi!
Just a note: You don't *have* to restart mudlet to get the images displaying; after updating the gfx path just click through each of the scripts under 'graphical user interface' to activate them.
Just a note: You don't *have* to restart mudlet to get the images displaying; after updating the gfx path just click through each of the scripts under 'graphical user interface' to activate them.
- Wed Dec 16, 2009 8:00 am
- Forum: Help Forum
- Topic: executing a function that is a value in a table
- Replies: 5
- Views: 4530
Re: executing a function that is a value in a table
It's been a while since I done any lua, but I think you can use anonymous (lamda) functions to do the same thing if you don't want to define axeHere. I think in you'd replace axehere = axeHere with axehere = function() echo("do stuff") end . Otherwise just define axeHere first like davidk ...
- Thu Jun 25, 2009 3:03 am
- Forum: Howtos, FAQs and Tips & Tricks
- Topic: Doing computer notifications from Mudlet
- Replies: 7
- Views: 10545
Re: Doing computer notifications from Mudlet
KDE3 users can do something like: os.execute("dcop knotify default notify eventname appname 'Hello world' '' '' 2 0") KDE4, though, will need to use DBus or Kdialog.. kdialog --title "This is a passive popup" --passivepopup "It will disappear in about 10 seconds" 2 Whic...
- Thu Jun 25, 2009 12:48 am
- Forum: Scripts & Packages
- Topic: Tabbed Chat [w/ screenshot+package]
- Replies: 38
- Views: 36113
Re: Tabbed Chat [w/ screenshot+package]
Yeah, it's Arch 64 with KDE4. Not the modular version and I'm having sound troubles (laptop suspend etc), but otherwise it's great. Also, thanks to whoever attached the screenshot. It wouldn't let me do it for some reason... Crap, wordwrap. I thought that was in there :P. Give me a minute, then. Edi...