mushcode-mcp-server
Version:
A specialized Model Context Protocol server for MUSHCODE development assistance. Provides AI-powered code generation, validation, optimization, and examples for MUD development.
720 lines • 3.46 MB
JSON
[
{
"id": "basic-object-creation",
"title": "Basic Object Creation",
"description": "Demonstrates how to create simple objects in MUSHCODE",
"code": "@create sword=A sharp blade\n@desc sword=This is a very sharp sword that gleams in the light.\n@set sword=!NO_COMMAND",
"explanation": "This example shows the basic steps to create an object: use @create to make it, @desc to set its description, and @set to configure its properties.",
"difficulty": "beginner",
"category": "creation",
"tags": [
"object",
"creation",
"basic",
"@create",
"@desc"
],
"serverCompatibility": [
"PennMUSH",
"TinyMUSH",
"RhostMUSH",
"TinyMUX",
"MUX"
],
"relatedConcepts": [
"objects",
"descriptions",
"flags"
],
"learningObjectives": [
"Understand basic object creation syntax",
"Learn how to set object descriptions",
"Know how to set basic object flags"
],
"source": {
"url": "https://mushcode.com",
"author": "MUSHCode.com Community"
}
},
{
"id": "switch-conditional",
"title": "Switch Function for Conditionals",
"description": "Using switch() for conditional logic in MUSHCODE",
"code": "&CMD-GREET object=$greet *:@pemit %#=switch(%0, \n hello, Hi there %n!, \n goodbye, See you later %n!, \n hi, Hello %n!, \n I'm not sure what you mean by '%0'.)",
"explanation": "The switch() function evaluates an expression and matches it against multiple cases, executing the corresponding action. It's safer than eval() for user input.",
"difficulty": "beginner",
"category": "conditional",
"tags": [
"switch",
"conditional",
"logic",
"commands"
],
"serverCompatibility": [
"PennMUSH",
"TinyMUSH",
"RhostMUSH",
"TinyMUX",
"MUX"
],
"relatedConcepts": [
"conditionals",
"user-input",
"commands"
],
"learningObjectives": [
"Understand switch() function syntax",
"Learn conditional programming patterns",
"Practice safe user input handling"
]
},
{
"id": "comma-formatting",
"title": "Number Formatting with Commas",
"description": "Format large numbers with comma separators for better readability",
"code": "@create Comma Function\n&U-COMMA Comma Function=switch(1, gt(strlen(%0), 3), [u(u-comma, left(%0, sub(strlen(%0), 3)))],[right(%0, 3)], neq(strlen(%0), 0), %0)\n&FUNCTION-COMMA Comma Function=switch(1, and(or(strmatch(%0,-*), strmatch(%0,+*)), isnum(%0)), [left(%0,1)][u(me/u-comma, before(trim(abs(%0)), .))][switch(abs(%0), *.*, .[after(trim(abs(%0)), .)])], isnum(%0), [u(me/u-comma, before(trim(%0), .))][switch(%0, *.*, .[after(trim(%0), .)])], #-1 FUNCTION COMMA EXPECTS A NUMBER)\n&CMD-COMMATEST Comma Function=$commatest *:@pemit %#=Formatted with commas, %0 would be [u(me/function-comma,%0)]",
"explanation": "This function recursively adds commas to numbers for better readability. It handles negative numbers, decimals, and validates input.",
"difficulty": "intermediate",
"category": "utility",
"tags": [
"formatting",
"numbers",
"recursion",
"utility"
],
"serverCompatibility": [
"PennMUSH",
"TinyMUSH",
"RhostMUSH",
"TinyMUX",
"MUX"
],
"relatedConcepts": [
"recursion",
"string-manipulation",
"number-formatting"
],
"learningObjectives": [
"Understand recursive function design",
"Learn string manipulation techniques",
"Practice input validation"
],
"source": {
"url": "https://mushcode.com/File/Comma-Function",
"author": "FiranMUX Community"
}
},
{
"id": "room-parent-setup",
"title": "Standard Room Parent Implementation",
"description": "A comprehensive room parent with custom formatting",
"code": "@create Standard Room Parent\n@lock/Basic Standard Room Parent==me\n@set Standard Room Parent = LINK_OK HALT NO_COMMAND\n&CONFORMAT Standard Room Parent=if(%0,[ljust(Players:,30)]Objects:[setq(0,filter(IsPlayer,%0))][setq(1,filter(IsThing,%0))][iter(lnum(max(words(%q0),words(%q1))),%r[if(first(%q0),[ljust([ansi(y,name(first(%q0)))][u(Do_Flags,first(%q0))],30)][setq(0,rest(%q0))],space(30))][if(first(%q1),[u(Thing,first(%q1))][setq(1,rest(%q1))])])])\n@EXITFORMAT Standard Room Parent=if(%0,Obvious exits:%r[iter(%0,[ansi(g,name(##))] [ansi(hg,<[first(rest(fullname(##),;),;)]>)],,%b%b%b)])\n@NAMEFORMAT Standard Room Parent=[ansi(h,if(zone(me), [[name(zone(me))]] )[name(me)])][if(or(controls(%#, me), hasflag(%#, Royalty), haspower(%#, See_All), orflags(me,VJLAd)), (%![flags(me)]))]",
"explanation": "This room parent provides standardized formatting for room contents, exits, and names. It includes permission-based flag display and organized content listing.",
"difficulty": "advanced",
"category": "building",
"tags": [
"rooms",
"parent",
"formatting",
"building",
"advanced"
],
"serverCompatibility": [
"PennMUSH",
"TinyMUSH",
"RhostMUSH",
"TinyMUX",
"MUX"
],
"relatedConcepts": [
"room-parents",
"formatting",
"permissions",
"inheritance"
],
"learningObjectives": [
"Understand parent object concepts",
"Learn advanced formatting techniques",
"Practice permission-based display logic"
],
"source": {
"url": "https://mushcode.com/File/Standard-Room-Parent",
"author": "MUSHCode.com Community"
}
},
{
"id": "help-RhostMUSH-help",
"title": "help - RhostMUSH Help",
"description": "Help documentation for help command/function in RhostMUSH",
"code": "Topic: HELP SETUP\n \n The help.txt file is set up like the news.txt file. To see how this file\n is designed and updated, please refer to 'wizhelp news setup'.\n \n See Also: news setup...",
"explanation": "Topic: HELP SETUP\n \n The help.txt file is set up like the news.txt file. To see how this file\n is designed and updated, please refer to 'wizhelp news setup'.\n \n See Also: news setup",
"difficulty": "beginner",
"category": "utility",
"tags": [
"help",
"setup"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [],
"learningObjectives": [
"Understand the help command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhostwiz.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH--help",
"title": "+help - RhostMUSH Help",
"description": "Help documentation for +help command/function in RhostMUSH",
"code": "If enabled (please check @list options), this will work just like normal\n 'help' does, but for +help. This is intended for TINY/MUX compatibility\n and is disabled by default.\n \n The following swi...",
"explanation": "If enabled (please check @list options), this will work just like normal\n 'help' does, but for +help. This is intended for TINY/MUX compatibility\n and is disabled by default.\n \n The following switches work for +help:\n /search -- allow wildcard patterning for searches (Eg: help/search *@mail*)\n /query -- allow detailed searching and return (Eg: help/query *@mail*)\n \n See Also: help",
"difficulty": "beginner",
"category": "communication",
"tags": [
"help",
"mail"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"communication"
],
"learningObjectives": [
"Understand the +help command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-chidden",
"title": "chidden - RhostMUSH Help",
"description": "Help documentation for chidden command/function in RhostMUSH",
"code": "co \"Player With Spaces\" password\nch -- Wizards and anyone with the NOWHO @power (to @hide) can use this.\nThis option will auto-hide the player when connecting.\nch \"Player With Spaces\" password\ncd -- Wizards and higher can use this to connect dark to the game.\nThis effectively connects wiz-cloaked to the game.\ncd \"Player With Spaces\" password\ncr -- Allows creation of a player from the connect screen.\nSyntax: cr player password\ncr \"Player With Spaces\" password\nreg -- If offline registration is enabled, allows the player to register\na character with a supplied email that is then used to email them\nreg \"Player With Spaces\" email@address\nSee Also: @aconnect, @adisconnect, @hide, @register",
"explanation": "Command: co <name> <password> (short for connect)\n cd <name> <password> (short for cdark)\n ch <name> <password> (short for chidden)\n cr <name> <password> (short for create)\n reg <name> <password> (short for register)\n \n Note: If you intend to see registers (setq) please check help on\n 'REGISTERS'. It's plural.\n \n Note: To create/log in a character with spaces in their name, please use\n \"<name>\". Ergo, surround your name with double quotes.\n The 'register' command does not allow creation with spaces.\n \n These commands are only useful on the connect screen. They are used to\n create/connect to your account <name> with the provided <password>. \n These commands are not usable once you are connected to the mush.\n \n These commands are as follows:\n co -- This option is the default and normal method to connect.\n This option has no special conditions or privileges.\n Syntax: co player password\n co \"Player With Spaces\" password\n \n ch -- Wizards and anyone with the NOWHO @power (to @hide) can use this.\n This option will auto-hide the player when connecting.\n It defaults to the 'co' option if you can't @hide.\n Syntax: ch player password\n ch \"Player With Spaces\" password\n \n cd -- Wizards and higher can use this to connect dark to the game.\n This effectively connects wiz-cloaked to the game.\n Immortals get auto-added to supercloak.\n Syntax: cd player password\n cd \"Player With Spaces\" password\n \n cr -- Allows creation of a player from the connect screen.\n Syntax: cr player password\n cr \"Player With Spaces\" password\n \n reg -- If offline registration is enabled, allows the player to register\n a character with a supplied email that is then used to email them\n their password.\n Syntax: reg player email@address\n reg \"Player With Spaces\" email@address\n \n See Also: @aconnect, @adisconnect, @hide, @register",
"difficulty": "advanced",
"category": "communication",
"tags": [
"chidden",
"mail",
"wizard"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"communication",
"object-creation",
"commands"
],
"learningObjectives": [
"Understand the chidden command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-commands",
"title": "commands - RhostMUSH Help",
"description": "Help documentation for commands command/function in RhostMUSH",
"code": "@admin @aflags @api @apply_marked @areg\n@attribute @blacklist @boot @chown @chownall\n@clone @cmdquota @conncheck @convert @cut\n@dbck @dbclean @depower @destroy @disable\n@doing @dump @dynhelp @enable @fixdb\n@flag @flagdef @freeze @function @halt\n@hide @hook @icmd @kick @limit\n@list @list_file @listmotd @livewire @lock\n@log @logrotate @mark @mark_all @money\n@motd @newpassword @nuke @pcreate @poor\n@power @progreset @protect @ps @purge\n@quota @readcache @reboot @recover @reclist\n@remote @rwho @site @shutdown @snapshot\n@snoop @tag @thaw @timewarp @toad\n@toggledef @tor @totem @totemdef @turtle\n@wall +players\n@adesc2 @allowance @altname @badsite @comment\n@createdstamp @darkexitformat @goodsite @invtype @leveldefault\n@mailsmax @mailscur @mailtime @modifiedstamp @paylim\n@queuemax @receivelim @rsrvdesc2 @rxlevel @timeout\n@txlevel\n@create @dig @lock @open @pemit",
"explanation": "Help is available for the following RhostMUSH commands:\n \n DOING examine folder give SESSION \n slay WHO wizhelp mail wmail\n channel cd news newsdb\n \n @admin @aflags @api @apply_marked @areg \n @attribute @blacklist @boot @chown @chownall \n @clone @cmdquota @conncheck @convert @cut \n @dbck @dbclean @depower @destroy @disable \n @doing @dump @dynhelp @enable @fixdb \n @flag @flagdef @freeze @function @halt \n @hide @hook @icmd @kick @limit \n @list @list_file @listmotd @livewire @lock \n @log @logrotate @mark @mark_all @money \n @motd @newpassword @nuke @pcreate @poor \n @power @progreset @protect @ps @purge \n @quota @readcache @reboot @recover @reclist \n @remote @rwho @site @shutdown @snapshot \n @snoop @tag @thaw @timewarp @toad \n @toggledef @tor @totem @totemdef @turtle \n @wall +players\n \n @adesc2 @allowance @altname @badsite @comment\n @createdstamp @darkexitformat @goodsite @invtype @leveldefault\n @mailsmax @mailscur @mailtime @modifiedstamp @paylim\n @queuemax @receivelim @rsrvdesc2 @rxlevel @timeout\n @txlevel\n \n @create @dig @lock @open @pemit \n page whisper",
"difficulty": "advanced",
"category": "communication",
"tags": [
"commands",
"mail",
"channel",
"lock"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"permissions",
"communication",
"object-creation",
"functions",
"commands"
],
"learningObjectives": [
"Understand the commands command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhostwiz.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-commands2",
"title": "commands2 - RhostMUSH Help",
"description": "Help documentation for commands2 command/function in RhostMUSH",
"code": "@aahear @aclone @aconnect @adescribe @adfail @adisconnect\n@adrop @aefail @aenter @afail @agfail @ahear\n@akill @aleave @alfail @alias @amhear @amove\n@ansiname @apay @arfail @asfail @asuccess @atfail\n@atofail @atport @aufail @ause @away @caption\n@charges @conformat @cost @cpattr @describe @dfail\n@door @drop @ealias @efail @enter @exitformat\n@fail @filter @forwardlist @gfail @grep @guild\n@idesc @idle @infilter @inprefix @kill @lalias\n@leave @lfail @listen @move @mfail @nameformat\n@odescribe @odfail @odrop @oefail @oenter @ofail\n@ogfail @okill @oleave @olfail @omove @opay\n@orfail @osuccess @otfail @otofail @otport @oufail\n@ouse @oxenter @oxleave @oxtport @pay @prefix\n@race @reject @rfail @runout @salisten @sasmell\n@sataste @satouch @saystring @selfboot @sex @sfail\n@slisten @solisten @sosmell @sotaste @sotouch @ssmell\n@startup @staste @stouch @success @tfail @titlecaption\n@tofail @toggle @tport @ufail +uptime @use\n@whereall @whereis @zone",
"explanation": "Help available for RhostMUSH Commands (continued):\n \n @aahear @aclone @aconnect @adescribe @adfail @adisconnect\n @adrop @aefail @aenter @afail @agfail @ahear\n @akill @aleave @alfail @alias @amhear @amove\n @ansiname @apay @arfail @asfail @asuccess @atfail \n @atofail @atport @aufail @ause @away @caption \n @charges @conformat @cost @cpattr @describe @dfail\n @door @drop @ealias @efail @enter @exitformat\n @fail @filter @forwardlist @gfail @grep @guild \n @idesc @idle @infilter @inprefix @kill @lalias \n @leave @lfail @listen @move @mfail @nameformat \n @odescribe @odfail @odrop @oefail @oenter @ofail \n @ogfail @okill @oleave @olfail @omove @opay \n @orfail @osuccess @otfail @otofail @otport @oufail \n @ouse @oxenter @oxleave @oxtport @pay @prefix \n @race @reject @rfail @runout @salisten @sasmell \n @sataste @satouch @saystring @selfboot @sex @sfail \n @slisten @solisten @sosmell @sotaste @sotouch @ssmell \n @startup @staste @stouch @success @tfail @titlecaption\n @tofail @toggle @tport @ufail +uptime @use \n @whereall @whereis @zone \n \n See Also: @list",
"difficulty": "beginner",
"category": "utility",
"tags": [
"commands2"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"commands"
],
"learningObjectives": [
"Understand the commands2 command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-topics",
"title": "topics - RhostMUSH Help",
"description": "Help documentation for topics command/function in RhostMUSH",
"code": "Help available on the following Topics:\n \n ACCOUNT MEMBERSHIP ALT INVENTORIES ANCESTORS \n ATTRIB CONTLOCKS ATTRIB FORMATTING AUTOREGISTRATION \n API ...",
"explanation": "Help available on the following Topics:\n \n ACCOUNT MEMBERSHIP ALT INVENTORIES ANCESTORS \n ATTRIB CONTLOCKS ATTRIB FORMATTING AUTOREGISTRATION \n API CAUTIONS CLOAKING \n CONFIG PARAMETERS CONTROL CPU \n CUSTOMIZED CONNECT DEBUG FEATURES DEPOWER LIST \n ELSEFILE SETUP FILES FLAGS \n FLAG ALIAS FUNCTION OVERLOADING GLOBAL INHERITANCE \n GUEST SETUP HELPINC HELP SETUP \n HOOK SETUP HUH SETUP INHERITANCE \n LOGGING MAIL ALIASES MASTER ROOM \n MOGRIFY NEWS SETUP PERMISSIONS \n PLUSHELP SETUP POWER LIST PROXY SETUP \n REALITY LEVELS SEARCH CRITERIA SIGNALS \n SITE LISTS SPECIAL ATTRIBS SSL SETUP \n TAGS TOGGLES TOR \n TOTEMS",
"difficulty": "beginner",
"category": "communication",
"tags": [
"topics",
"mail",
"lock",
"permission"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"permissions",
"communication",
"functions"
],
"learningObjectives": [
"Understand the topics command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhostwiz.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-timezone",
"title": "timezone - RhostMUSH Help",
"description": "Help documentation for timezone command/function in RhostMUSH",
"code": "Config parameter: timezone [<valid timezone string>. Default: localtime\n \n This will specify the default timezone that the mush will use. All \n base timefunctions will be based on this timezone.\n...",
"explanation": "Config parameter: timezone [<valid timezone string>. Default: localtime\n \n This will specify the default timezone that the mush will use. All \n base timefunctions will be based on this timezone.\n \n See Also: TIMEZONE (in normal help)",
"difficulty": "beginner",
"category": "function",
"tags": [
"timezone"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"functions"
],
"learningObjectives": [
"Understand the timezone command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhostwiz.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-api",
"title": "API - RhostMUSH Help",
"description": "Help documentation for API command/function in RhostMUSH",
"code": "Topic: API RETURN\n \n When the mush responds to your API requests, it will do so with headers\n only. There is no data submitted. If there is header data it does not\n recognize or is malformed, it...",
"explanation": "Topic: API RETURN\n \n When the mush responds to your API requests, it will do so with headers\n only. There is no data submitted. If there is header data it does not\n recognize or is malformed, it will return an appropriate error message.\n \n The following return encoding can be expected\n POST:\n HTTP/1.1 <CODE> OK\n Content-type: text/plain\n Date: Thu Jul 6 14:37:52 2017\n Exec: <STRING>\n \n GET:\n HTTP/1.1 <CODE> OK\n Content-type: text/plain\n Date: Thu Jul 6 14:51:16 2017\n Exec: <STRING>\n Return: <VALUE>\n \n \n -- <CODE> may be any of the following with matching <STRING>\n 200 - OK <STRING>: Ok - Executed\n 400 - Bad Request <STRING>: Error - Invalid Headers Supplied\n 400 - Bad Request <STRING>: Error - Empty String\n 404 - Not Found <STRING>: Error - Invalid target\n 403 - Forbidden <STRING>: Error - Permission Denied\n 403 - Forbidden <STRING>: Error - IP not allowed\n 403 - Forbidden <STRING>: Error - Malformed User or Password\n \n -- <VALUE> is the actual return value for a GET fetch. This is what\n the evaluated string will have been.\n \n GET Examples (this is from a command line using the 'curl' application)\n> curl -X GET --user \"#12:ya\" -H \"Exec: [lnum(10)]\" --head http://localhost:2222\n \n POST Example: (this is from a command line using the 'curl' application)\n> curl -X POST --user \"#12:ya\" -H \"Exec: @emit hi.\" --head http://localhost:2222\n \n MIXED KeepAlive Example: (again from the curl application)\n> curl -X GET --user \"#12:ya\" -H \"Keep-Alive: 20\" -H \"Exec: [lnum(10)]\" \n --head http://localhost:2222 --next -X GET --user \"#12:ya\" \n -H \"Exec: [lnum(20)]\" --head http://localhost:2222 --next -X POST \n --user \"#12:ya\" -H \"Exec: @emit [lwho()]\" --head http://localhost:2222\n \n See Also: @api \n \n{ see 'wizhelp api setup' for steps on how to set up a dbref# for use }\n{ see 'wizhelp api processing' to see how to actually use the API system }\n{ see 'wizhelp api errorcodes' for HTTP error codes that it can respond with }",
"difficulty": "beginner",
"category": "communication",
"tags": [
"api",
"return",
"permission"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"commands"
],
"learningObjectives": [
"Understand the API command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhostwiz.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-coding",
"title": "CODING - RhostMUSH Help",
"description": "Help documentation for CODING command/function in RhostMUSH",
"code": "$foo*:@wait 10={@emit 1;@swi [trim(%0)]=bob,{@emit bob;@emit was;@emit here}}",
"explanation": "Topic: CODING NEST\n \n You may nest commands or functions with the use of {}'s, []'s, or ()'s. The\n previous is mostly used for command nesting, and the latter used for\n function nesting and declaration.\n \n Command Nesting: An example of command nesting\n $foo*:@wait 10={@emit 1;@swi [trim(%0)]=bob,{@emit bob;@emit was;@emit here}}\n \n In this example, if you specify 'bob' as the argument to foo, it will\n display '1', 'bob', 'was', 'here' on separate lines. Notice the trim()\n function around the argument (%0). This is trimming extra spaces around the\n argument so that you don't have ' bob', ' bob ', or 'bob ' as commands which\n based on comparisons may or may not work as expected. It's essentially one \n of the ways to control the data that you are being given.\n \n If you pass 'foo' anything but 'bob', all you will get is '1' and nothing\n else.\n \n Function Nesting: An example of function nesting \n > say [add(sub(1,1),2)]\n You say '2'\n \n You are, in this example, subtracting 1 and 1, passing that nested value to\n the 'add' function and then adding that result to the number '2'. So\n in this case, 1 - 1 is 0, and 0 + 2 is 2, so you will be returning '2'",
"difficulty": "beginner",
"category": "function",
"tags": [
"coding",
"nest"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"functions",
"commands"
],
"learningObjectives": [
"Understand the CODING command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-coding2",
"title": "CODING2 - RhostMUSH Help",
"description": "Help documentation for CODING2 command/function in RhostMUSH",
"code": "&ATTRIBUTE TARGET=$command *:COMMAND1;COMMAND2;...;COMMANDx\n&BOO #123=$boo *:@pemit %#=You have booed '%0'.\n&BOO #123=$boo*:@pemit %#=You have booed '%0'.",
"explanation": "Topic: CODING2\n \n When you start coding on a mush, each sequence usually starts with a\n command, which then uses functions to manipulate the data the command\n is calling. You may also make soft-coded commands ($-commands in help)\n by starting a command with a '$' and then any wildcards with '*' for\n 1 or more characters or '?' meaning one character only. You may use\n the ^ command for having objects listen for a word sequence. Please\n refer to 'help monitor' to explain a bit more on how ^ sequences work.\n \n When you establish a softcoded command, the sequence works as follows:\n &ATTRIBUTE TARGET=$command *:COMMAND1;COMMAND2;...;COMMANDx\n \n Example: (assuming you own an object 'Fred' with dbref #123)\n &BOO #123=$boo *:@pemit %#=You have booed '%0'.\n \n Breaking this down. #123 is the dbref# of 'Fred'. The dbref# will\n always be unique in a mush database. BOO is the attribute that you\n set with the '&' command. 'boo' is the command it will be looking\n for, identified with the '$' starter character. You have one argument\n being passed signified with the '*' character. The command it is\n executing is '@pemit', and it's using the percent substitutions '%#'\n which is specifying the dbref# of whatever is enacting the command,\n which in this case would be you. The '%0' at the end is the argument\n that aligns with the wildcard. All arguments start at '0' and go\n from 0-9. You can have more than 9 arguments but that becomes more\n complex code. So if you had two *'s and one ?, the first two *'s \n would be %0 and %1 respectively, and the ? would be %2.\n \n So, we have set our BOO attribute to the 'boo' command. Let's now\n execute the command:\n > boo\n Huh? (Type 'help' for help)\n \n Ok, wait a second. Why didn't it see the command? The answer if\n you look at the command makes sense. It's expecting an argument\n AFTER a space. If you wanted the argument to be optional you would\n instead set it like:\n &BOO #123=$boo*:@pemit %#=You have booed '%0'.\n \n Notice no space between 'boo' and '*'. So let's try it again:\n > boo\n You have booed ''\n > boo abc123\n You have booed 'abc123'\n \n{ help coding3 to learn how to nest commands }",
"difficulty": "intermediate",
"category": "function",
"tags": [
"coding2"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"functions",
"commands"
],
"learningObjectives": [
"Understand the CODING2 command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-coding3",
"title": "CODING3 - RhostMUSH Help",
"description": "Help documentation for CODING3 command/function in RhostMUSH",
"code": "$foo *:@switch %0=yes,{@emit 1;@emit 2;@emit 3},no,{@emit A;@emit B;@emit C}",
"explanation": "Topic: CODING3\n \n You may nest commands together with the ';' identifier. This will\n link commands together. If you with to 'cluster' commands together,\n you may use the {}'s characters to surround a list of commands you\n wish to link together.\n \n For example:\n $foo *:@switch %0=yes,{@emit 1;@emit 2;@emit 3},no,{@emit A;@emit B;@emit C}\n \n In this example, if you typed 'foo yes' it would display 1, 2, and 3.\n If you typed 'foo no' it would instead display A, B, and C.\n \n The @switch command (which you may shorten to @swi), executes a 'switch'\n or evaluation based on what you specified. In this case you are comparing\n '%0' (or what is typed after foo), to two expected arguments. 'yes' or\n 'no'. @switch allows multiple arguments, as well as a default value.\n Note with how it's set up above, if foo does not have a 'yes' or 'no' value\n you will get no output since @switch is expecting 'yes' or 'no' only and\n has no default case to fall back on.\n \n You may notice that you use {}'s to cluster the commands for each separate\n conditional. You may nest {}'s inside each other for nested @switches or\n other commands that allow arguments passed to them of commands. Such\n example commands are @switch, @ifelse, @skip, @sudo, @force, @wait, and\n so forth.",
"difficulty": "beginner",
"category": "utility",
"tags": [
"coding3"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"commands"
],
"learningObjectives": [
"Understand the CODING3 command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-globbing",
"title": "GLOBBING - RhostMUSH Help",
"description": "Help documentation for GLOBBING command/function in RhostMUSH",
"code": "Topic: WILDCARDS [* and ?] (also referred to as GLOBBING)\n \n Note: RhostMUSH also supports regular expressions. Please refer to \n 'help REGEXPS'\n \n Wildcards are the standard globbing me...",
"explanation": "Topic: WILDCARDS [* and ?] (also referred to as GLOBBING)\n \n Note: RhostMUSH also supports regular expressions. Please refer to \n 'help REGEXPS'\n \n Wildcards are the standard globbing mechanism for the mush engine. With the\n wildcards, the '*' character is considered 0 or more characters and the '?'\n character is considered a single character. These are used primarily in\n commands and functions that allow mulit-matching based on wild card support.\n \n Example:\n > say match(this is a test,?es*)\n You say \"4\"\n \n Wildcards, however, are most useful for $command substitution matching.\n When you create your own softcoded command, any argument you want\n substituted you would place a '*' or a '?' for that argument. Each argument\n is then matched up with a numerical argument for each wildcard used. The\n first argument being %0, second being %1, and so forth.\n \n Example:\n > &TEST1 me=$test1*:@emit Your First Test:%0\n > &TEST2 me=$test2?:@emit Your Second Test:%0\n > &TEST3 me=$test3 *:@emit Your Third Test:%0\n > test1\n Your First Test:\n > test1 abc\n Your First Test: abc [notice the space between ':' and 'a']\n > test2\n Huh? (Type 'help' for help) [Because ? requires 1 character exactly]\n > test2X\n Your Second Test:X\n > test2abc\n Huh? (Type 'help' for help) [Because ? required 1 character exactly]\n > test3\n Huh? (Type 'help' for help) [because you have a space in the command]\n > test3 abc\n Your Third Test:abc [notice no space between ':' and 'a']\n \n { See 'help wildcards2' for clarification and extended explanations }",
"difficulty": "beginner",
"category": "creation",
"tags": [
"globbing"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"object-creation",
"functions",
"commands"
],
"learningObjectives": [
"Understand the GLOBBING command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-wildcards2",
"title": "WILDCARDS2 - RhostMUSH Help",
"description": "Help documentation for WILDCARDS2 command/function in RhostMUSH",
"code": "Clarification:\n The difference between Test1 and Test3 is the fact there is a space in\n the command between the command (test1 and test3 respectively) and the\n wildcard. For test1, when you ...",
"explanation": "Clarification:\n The difference between Test1 and Test3 is the fact there is a space in\n the command between the command (test1 and test3 respectively) and the\n wildcard. For test1, when you did 'test1 abc' the space in ' abc' was\n part of the argument you passed to the command, thus it included the\n space. In test3, you had a space as part of the requirement argument\n so it required the space then saw 'abc' as the argument. \n \n Test2 required a single character after it. Anything less or more than\n 1 character exactly returned an error message.\n \n Additional matching:\n You may use regular expressions instead of globbing if you set the \n attribute in question REGEXP (help attribute flag). To use \n regular expressions instead, please check 'help REGEXPS'.\n \n See Also: ATTRIBUTE FLAG, REGEXP, $-command, ^-listens",
"difficulty": "beginner",
"category": "communication",
"tags": [
"wildcards2"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"commands"
],
"learningObjectives": [
"Understand the WILDCARDS2 command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-max",
"title": "MAX - RhostMUSH Help",
"description": "Help documentation for MAX command/function in RhostMUSH",
"code": "Topic: MAX ARGS\n \n Functions:\n The maximum number of arguments you can pass functions, by default, is 30.\n Anything over this tends to no longer be processed. \n \n You can extend this by s...",
"explanation": "Topic: MAX ARGS\n \n Functions:\n The maximum number of arguments you can pass functions, by default, is 30.\n Anything over this tends to no longer be processed. \n \n You can extend this by strfunc() to essentially turn any function into\n a list function, which then extends the maximum number of arguments\n to functions (that accept 1 to n as arguments) to a maximum of 1000.\n \n Functions that are hard-locked with strict arguments are not affected.\n \n Commands:\n Commands, by default, have 10 arguments you can pass to them. This is\n hard limited and immutable.\n \n See Also: strfunc(), @list functions, @list commands, commands, functions",
"difficulty": "beginner",
"category": "security",
"tags": [
"max",
"args",
"lock"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"permissions",
"functions",
"commands"
],
"learningObjectives": [
"Understand the MAX command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-attribute",
"title": "ATTRIBUTE - RhostMUSH Help",
"description": "Help documentation for ATTRIBUTE command/function in RhostMUSH",
"code": "Attribute Flag: REGEXP(R)\n Set by: @set #obj/attr=regexp\n \n This is only useful for listens or commands. It stipulates that wildcard\n matching is done through regular expression matching instead ...",
"explanation": "Attribute Flag: REGEXP(R)\n Set by: @set #obj/attr=regexp\n \n This is only useful for listens or commands. It stipulates that wildcard\n matching is done through regular expression matching instead of the default\n of glob pattern matching.",
"difficulty": "beginner",
"category": "utility",
"tags": [
"attribute",
"flag",
"regexp"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"commands"
],
"learningObjectives": [
"Understand the ATTRIBUTE command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-wanderer",
"title": "WANDERER - RhostMUSH Help",
"description": "Help documentation for WANDERER command/function in RhostMUSH",
"code": "Flag: WANDERER(^) (councilor and higher only) [bitlevel 0]\n \n Any player set wanderer can not build/create/dig no matter what their\n quota is set to. This flag is just like the GUEST flag except i...",
"explanation": "Flag: WANDERER(^) (councilor and higher only) [bitlevel 0]\n \n Any player set wanderer can not build/create/dig no matter what their\n quota is set to. This flag is just like the GUEST flag except it is seeable\n and changeable by COUNCILORS whereas the GUEST flag is seeable and\n changeable only by ROYALTY. The only other difference is those set\n WANDERER are able to set/unset attributes. Anyone bitted COUNCILOR and \n lower are effected by this flag. ROYALTY and higher are immune.\n \n The start_build @admin parameter will, if enabled, disable this flag from\n being set automatically on new players.",
"difficulty": "advanced",
"category": "creation",
"tags": [
"wanderer"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"object-creation"
],
"learningObjectives": [
"Understand the WANDERER command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhostwiz.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-sql",
"title": "SQL - RhostMUSH Help",
"description": "Help documentation for SQL command/function in RhostMUSH",
"code": "SQL is available in two flavors in RhostMUSH, both are built in and both can\n be ran at the same time. \n \n SQLITE: \n This is a 'lite' form of SQL. It has a good solid base, but doesn't offer\n ...",
"explanation": "SQL is available in two flavors in RhostMUSH, both are built in and both can\n be ran at the same time. \n \n SQLITE: \n This is a 'lite' form of SQL. It has a good solid base, but doesn't offer\n some of the more advanced features that MySQL/MariaDB has. The hosting\n server must have a working SQLITE library to successfully link to and use\n this database offering.\n \n MySQL/MariaDB:\n This is an advanced form of SQL. It allows all the feature-rich\n capabilities of a fully function SQL engine. The hosting server must have\n mysql or mariadb to be able to link to and use this offering.\n \n See Also: sqlite_query(), @sql, @sqlconnect, @sqldisconnect, sql(), sqlon,\n sqloff(), sqlping()",
"difficulty": "intermediate",
"category": "function",
"tags": [
"sql"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"functions"
],
"learningObjectives": [
"Understand the SQL command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-clusters",
"title": "CLUSTERS - RhostMUSH Help",
"description": "Help documentation for CLUSTERS command/function in RhostMUSH",
"code": "Clusters are a method to have 1 or more real dbref#'s defined as a single\n virtual 'container' or entity to house attributes. Using cluster related\n commands and functions, you can target any dbref...",
"explanation": "Clusters are a method to have 1 or more real dbref#'s defined as a single\n virtual 'container' or entity to house attributes. Using cluster related\n commands and functions, you can target any dbref# contained in a cluster\n and it will reference the cluster as a whole. This is useful for shared\n attribute storage, large data warehousing, or role play/player based\n statistical information where you need a large variety of attributes\n to be housed over a period of time. The attributes are written to\n the cluster in a weighted method and not a round robin where the item\n in the cluster chosen is always the one with the least number of \n attributes.\n \n Clusters require wizard access to create, but can be added to by the\n cluster themselves. You must control both the cluster and the item\n to be added to the cluster to add to the cluster.\n \n See Also: @cluster, cluster functions",
"difficulty": "advanced",
"category": "creation",
"tags": [
"clusters",
"wizard"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"object-creation",
"functions",
"commands"
],
"learningObjectives": [
"Understand the CLUSTERS command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-cluster",
"title": "cluster - RhostMUSH Help",
"description": "Help documentation for cluster command/function in RhostMUSH",
"code": "cluster_add() - Add new target into cluster.\n cluster_attrcnt() - Returns attribute count of cluster\n cluster_default() - Issues a default() on the cluster.\n cluster_edefault() - Iss...",
"explanation": "cluster_add() - Add new target into cluster.\n cluster_attrcnt() - Returns attribute count of cluster\n cluster_default() - Issues a default() on the cluster.\n cluster_edefault() - Issues an edefault() on the cluster.\n cluster_flags() - Return flags of cluster.\n cluster_get() - Issues a get() attribute on the cluster.\n cluster_get_eval() - Issues an evaluated get() attribute on the cluster.\n cluster_grep() - Greps the attribute on the cluster.\n cluster_hasattr() - Checks if attribute exists on the cluster.\n cluster_hasflag() - Check flag(s) of target cluster.\n cluster_lattr() - Lists all attributes on the cluster.\n cluster_regrep() - Regular expression grep for the cluster (case).\n cluster_regrepi() - Regular expression grep for the cluster (non-case).\n cluster_set() - Sets flags/attribute(s) on the cluster.\n cluster_stats() - Shows statistics for the cluster.\n cluster_u() - Issues a u() on the cluster.\n cluster_u2() - Issues a u2() on the cluster.\n cluster_u2default() - Issues a u2default() on the cluster.\n cluster_u2ldefault() - Issues a u2ldefault() on the cluster.\n cluster_u2local() - Issues a u2local() on the cluster.\n cluster_udefault() - Issues a udefault() on the cluster.\n cluster_ueval() - Issues a ueval() on the cluster.\n cluster_uldefault() - Issues a uldefault() on the cluster.\n cluster_ulocal() - Issues a ulocal() on the cluster.\n cluster_vattrcnt() - Lists the count of all user-defined attrs on cluster.\n cluster_wipe() - Wipe matching attributes from the cluster.\n cluster_xget() - Issues an xget() attribute get on the cluster.\n iscluster() - Returns '1' if target belongs to a cluster.",
"difficulty": "beginner",
"category": "function",
"tags": [
"cluster",
"functions"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [],
"learningObjectives": [
"Understand the cluster command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH--lambda",
"title": "#LAMBDA - RhostMUSH Help",
"description": "Help documentation for #LAMBDA command/function in RhostMUSH",
"code": "Object type: #lambda\n \n In any function that accepts #obj/attr pairs, you may substitute the\n object dbref# with '#lambda'. This basically says 'take the string after\n as a literal and not an att...",
"explanation": "Object type: #lambda\n \n In any function that accepts #obj/attr pairs, you may substitute the\n object dbref# with '#lambda'. This basically says 'take the string after\n as a literal and not an attribute'.\n \n For example:\n > @va #123=Testing\n Set.\n > say get(#123/va)\n You say \"Testing\"\n > say get(#lambda/va)\n You say \"va\"\n > say u(#lambda/Testing: %%0,Boo!)\n You say \"Testing: Boo!\"",
"difficulty": "beginner",
"category": "function",
"tags": [
"lambda"
],
"serverCompatibility": [
"RhostMUSH"
],
"relatedConcepts": [
"functions"
],
"learningObjectives": [
"Understand the #LAMBDA command/function",
"Learn RhostMUSH-specific syntax and usage",
"Apply help documentation in practical scenarios"
],
"source": {
"url": "file://rhosthelp.txt",
"author": "RhostMUSH Documentation"
}
},
{
"id": "help-RhostMUSH-singlethreading",
"title": "SINGLETHREADING - RhostMUSH Help",
"description": "Help documentation for SINGLETHREADING command/function in RhostMUSH",
"code": "You can accomplish 'single-threading' $commands by setting the attribute\n on the object SINGLETHREAD. Once set, you