Vwmc >
Note that scripting wasn’t implemented for 0.2
Table of Contents [hide]
Triggers ∞
Script::add_trigger_match(RegExpr_or_Regular_String) { code to do } Script::add_trigger_match(^%s tells you %s.) { $2, says $1. }
Macros / Aliases ∞
Script::add_macro(cmd_string) { code to do } Script::add_macro(k) { kill $0 }
Stuff ∞
If your script needs initialization, you just add:
def main; <do_initalize_stuff>; end;
-
I figure, there’ll be about 3 parameters for code blocks, that I’ll pass when
add_macro(), andadd_trigger(): |World, Socket, String|
Notes/ideas ∞
- Add and delete items.
-
Make the terms “macro” and “alias” interchangeable.
I’m probably going to maintain two lists.
- One list, will be placed on my Website, for scripts that are marked as safe, and there won’t be no way to Hop it. Probably a gems-style updater for them.
-
The other list, will be MU* Admin’s control system, which will do security approvals on Scripts, that they make. Their own way of confirming that their scripts haven’t been modified. These are automatically server-updated.
Client-side repositories will exist.
-
Add gagging functionality, so users can do a simple:
gag(RegExpr_or_Regular_String)
My requirements ∞
- Gagging lines
- Simple substituting
- Complex substitution (1000 gold => 1,000 gold)
- Colour in output, including in substitution
- Echoing to the console and not the mud
- Saving/loading variables across sessions.
- Deleting / clearing things en-mass (all triggers, all substitutions, all variables, etc..) either “all” or by regex.
-
Splitting my source files into multiple files
- main
— connection/reconnection - aliases
- speedwalks
- questing
- spellup
- substitutions / gagging
- main
Rough notes ∞
-
script v0.2 by Joel VanderWerf
- Allows the definition of Procs through Constants, for stuff like parsing ANSI Color Codes, Adding Text to the Output History, sending data to a MU*, and so on.

ported