Skip to content

Instantly share code, notes, and snippets.

@lcanady
Last active June 3, 2021 17:43
Show Gist options
  • Save lcanady/d5c0eb515dbeea76bfac642fe489e83b to your computer and use it in GitHub Desktop.
Save lcanady/d5c0eb515dbeea76bfac642fe489e83b to your computer and use it in GitHub Desktop.
/*
#############################################################################
### Convenient mush-format #defines #########################################
This archive is my collection of shortcuts as a lazy MUSHCoder.
Mostly they are patterns I've run into over and over again through the
years that I finally got tired of typing.
Use anything you find here lightly. You don't want your code becoming
completely unreadable because it's full of #defines that noone can
look up a help for!
#############################################################################
*/
// Object creation shortcuts
#define @create (.*)=([^\,]+)(.*) {
@@ only create $1 if it doesn't exist.
@if not(isdbref(tags($2)) = {
@create $1;
@tag/add $1=lastcreate(me, t);
@if words($2) = {
@set #$2=$2;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment