Rina's Telepathy Device
Rina's Telepathy Device. A handy widget for roleplaying mental/psionic/telepathic communication. Includes help text and tutorial.
Commands:
@aclone,
@clone,
@create,
@describe,
@dolist,
@link,
@lock,
@parent,
@pemit,
@prefix,
@set,
@switch,
@vz.
Instructions
Copy and paste the below code into a compatible MUSH or MUX.
MUSHCode for Rina's Telepathy Device
@create Mental Communication Parent (MCP)=10
&LINK Mental Communication Parent (MCP)=$.psilink *:@vz me=[u(linkok,%0,%#)];@switch words(%vz)=0,{@pemit %#=PSI: Linked failed (no valid targets).},{@pemit %#=PSI: Linked to [switch(words(%vz),1,[name(%vz)],[u(more,%vz)])].}
&UNLINK Mental Communication Parent (MCP)=$.psiunlink:@vz me;@pemit %#=PSI: Unlinked.
&SEND Mental Communication Parent (MCP)=$.psi ?*:@switch words(%vz)=0,{@pemit %#=PSI: You're not linked to anyone.},{@dol %vz={@pemit ##=[switch(words(%vz),0,,1,,To [u(more,%vz)]:%b)][v(prefix)] [u(body,%N,%0,%1)]};@pemit %#=PSI: [switch(words(%vz),0,,1,To [name(%vz)],To [u(more,%vz)])]: [u(body,%N,%0,%1)]}
&SENDP Mental Communication Parent (MCP)=$.ppsi *=?*:@switch [setq(0,[u(linkok,%0,%#)])][words(r(0))]=0,{@pemit %#=PSI: Failed: `%0' is not a valid target.},{@dol r(0)={@pemit ##=[switch(words(r(0)),0,,1,,To [u(more,r(0))]:%b)][v(prefix)] [u(body,%N,%1,%2)]};@pemit %#=PSI: [switch(words(r(0)),0,,1,To [name(r(0))],To [u(more,r(0))])]: [u(body,%N,%1,%2)]}
&BODY Mental Communication Parent (MCP)=[switch(%1,:,%0%b%2,\;,%0%2,|,%2,",%0 [v(mindsay)] [u(say1)]%2[u(say2)],%0 [v(mindsay)] [u(say1)]%1%2[u(say2)])]
@set Mental Communication Parent (MCP)/BODY = no_command
@Prefix Mental Communication Parent (MCP)=You sense
@set Mental Communication Parent (MCP)/Prefix = no_command
&MORE Mental Communication Parent (MCP)=[setq(0,[edit(iter(%0,[edit(name(##),%b,_)]),%b,\,%b)])][edit([edit(rest(revwords(r(0))),$,%band [first(revwords(r(0)))])],_,%b)]
@set Mental Communication Parent (MCP)/MORE = no_command
&SAY1 Mental Communication Parent (MCP)=~
@set Mental Communication Parent (MCP)/SAY1 = no_command
@Desc Mental Communication Parent (MCP)=Welcome to the wonderful world of mental manipulation and communication. To begin your journey, type the following two commands:%r%r%t@set [num(me)]=inherit%r%t.psi/init%r%rAfter that, just type '.psihelp' for commands. Have fun, and remember: It's up to you to use this device in a responsible and IC manner. (I have to say that. It's called a 'disclaimer'.)%b%b%b-- Rinaen
&HELP Mental Communication Parent (MCP)=$.psihelp:@pemit %#={Rinaen's Mental Communication Widget commands%r%r[ljust(.psilink <list>,30)]Sets up a mental link between yourself and%r[space(30)]and <list>, which can be one name or a list%r[space(30)]of names.%r[ljust(.psiunlink,30)]Drops the mental link.%r[ljust(.psicheck,30)]Checks who's currently linked.%r[ljust(.psi <message>,30)]Sends <message> to everyone in your current%r[space(30)]link. : and ; substitution is supported, as%r[space(30)]well as | for emits.%r[ljust(.ppsi <name>=<message>,30)]Sends <message> to <name>, bypassing the current%r[space(30)]link. As in .psilink, <name> can be one name%r[space(30)]or many. Again, :, ;, and | supported.%r[ljust(.psiconfig <option>=<choice>,30)]Set the named Psi <option> to <choice>. See%r[space(30)]'.psihelp config' for details.%r%rFor message and option configuration, type '.psihelp config'. For examples, type '.psihelp examples'. For redundancy, type '.psihelp'. All questions, comments, or avgolemeno soup please +mail Rinaen.}
&SETUP Mental Communication Parent (MCP)=$.psi/init:@lock/use me=%#;@link me=%#;@set me=sticky;@set me=dark;@lock me=%#;@pemit %#=PSI: All initialized and ready to go. Type '.psihelp' for commands.
&HELP2 Mental Communication Parent (MCP)=$.psihelp examples:@pemit %#={Rinaen's Mental Communication Widget examples%r%rSometimes it's easiest to learn by example. Here are some common responses you'll get to commands you'll use. Commands you type are written like this:%r%t>This is what you type%rResponses will be like this:%r%tHuh?%b%b(Type "help" for help.)%rAs you can see, it's best to use actual commands. Ready? Here we go.%r%r>.psi/init%rPSI: All initialized and ready to go. Type '.psihelp' for commands.%r%r>.psilink Napoleon Confucious Thor%rPSI: Linked to Napoleon, Confucious, and Thor.%r(This will set up the link for Napoleon, Confucious, and Thor, so all messages \[until you unlink or change the link] will be broadcasted to these three. Note that you can use significant portions of the names, like 'Napol' for 'Napoleon'. You can also use the dbref# of a player or puppet. There is a configurable option which allows you to set just how much checking for valid targets the device does. See '.psihelp config' for details.) If the .psilink option is giving you problems, use the .psilink/force switch.%r%r==> Want to see more? type '.psihelp examples2'.}
&HELP3 Mental Communication Parent (MCP)=$.psihelp examples2:@pemit %#={Rinaen's Mental Communication Widget examples (continued)%r%r>.psi Hi guys. What's shakin'?%rPSI: To Napoleon, Confucious, and Thor: [name(owner(me))] [v(mindsay)] [v(say1)]Hi guys. What's shakin'?[v(say2)]%r%r%tAnd they will see:%rTo Napoleon, Confucious, and Thor: [v(prefix)] [name(owner(me))] [v(mindsay)] [v(say1)]Hi guys. What's shakin'?[v(say2)]%r%r>.psi :shakes like a leaf.%rPSI: To Napoleon, Confucious, and Thor: [name(owner(me))] shakes like a leaf.%r%r%tAnd they will see:%rTo Napoleon, Confucious, and Thor: [v(prefix)] [name(owner(me))] shakes like a leaf.%r%r>.psi ;'s thoughts are scattered.%rPSI: To Napoleon, Confucious, and Thor: [name(owner(me))]'s thoughts are scattered.%r%r%tAnd they will see:%rTo Napoleon, Confucious, and Thor: [v(prefix)] [name(owner(me))]'s thoughts are scattered.%r%r==> Want to see more? type '.psihelp examples3'.}
&HELP4 Mental Communication Parent (MCP)=$.psihelp examples3:@pemit %#={Rinaen's Mental Communication Widget examples (continued)%r%r>.psi |something whicker this way comes.%rPSI: To Napoleon, Confucious, and Thor: something whicker this way comes.%r%r%tAnd they will see:%rTo Napoleon, Confucious, and Thor: [v(prefix)] something whicker this way comes.%r%r(Note that this option has the potential for abuse. Please act responsibly. Also, know that there are ways to tell if you're being spoofed like this. See 'help nospoof' for details.)%r%rFor a more personal touch, without re-linking or disrupting a current link:%r%r>.ppsi Abigail=:gently probes your surface thoughts.%rPSI: To Abigail: [name(owner(me))] gently probes your surface thoughts.%r%r%tAnd Abigail would see:%r[v(prefix)] [name(owner(me))] gently probes your surface thoughts.%r%rFeel better now? If you're still confused, just experiment for a bit. :) Or +mail Rinaen.}
&HELP5 Mental Communication Parent (MCP)=$.psihelp config:@pemit %#={Rinaen's Mental Communication Widget: Configuration%r%rThere are a few options you can customize with this object, with the command '.psiconfig <option>=<choice>'. The following messages are changeable:%r%r[ljust(Message,10)][ljust(Default,15)][ljust(Current Setting,20)]What it means%r[ljust(=======,10)][ljust(=======,15)][ljust(===============,20)]=============%r%r[ljust(PREFIX,10)][ljust(You sense,15)][ljust(v(prefix),20)]The message they see just before%r[space(45)]the actual pose.%r[ljust(MINDSAY,10)][ljust(mindspeaks,15)][ljust(v(mindsay),20)]The pose of the mental speech.%r[ljust(SAY1,10)][ljust(~,15)][ljust(v(say1),20)]The beginning 'quote' of the%r[space(45)]mental speech.%r[ljust(SAY2,10)][ljust(~,15)][ljust(v(say2),20)]The ending 'quote' of the%r[space(45)]mental speech.%r[ljust(TARGET,10)][ljust(nocheck,15)][ljust(u(linkwhich),20)]Whether or not the device%r[space(45)]performs checks for valid targets%r[space(45)]or not. Options are `check' and%r[space(45)]`nocheck'.%r%r(More options may be added later, depending on demand and the niceness of said demands. :) Watch this space.)}
&CONFIG Mental Communication Parent (MCP)=$.psiconfig *=*:@switch member(v(valid),%0)=0,{@pemit %#=PSI: That's not a valid configuration option.},{@switch %0=target,{@switch %1=check,{&linkok me=[v(linkok-1)];@pemit %#=PSI: Option Target changed to `check'.},nocheck,{&linkok me=[v(linkok-2)];@pemit %#=PSI: Option Target changed to `nocheck'.},@pemit %#=PSI: `check' and `nocheck' are valid configurations for option Target.},{&[%0] me=%1;@pemit %#=PSI: Option [ucstr(%0)] changed.}}
&VALID Mental Communication Parent (MCP)=mindsay prefix say1 say2 target
@set Mental Communication Parent (MCP)/VALID = no_command
&CHECK Mental Communication Parent (MCP)=$.psicheck:@pemit %#=PSI: Currently linked to [switch(words(%vz),0,no one,1,[name(%vz)],[u(more,%vz)])].
&SAY2 Mental Communication Parent (MCP)=~
@set Mental Communication Parent (MCP)/SAY2 = no_command
&GOOD Mental Communication Parent (MCP)=[and(hasflag(owner(%0),connected),nearby(owner(me),%0))]
@set Mental Communication Parent (MCP)/GOOD = no_command
&MINDSAY Mental Communication Parent (MCP)=mindspeaks
@set Mental Communication Parent (MCP)/MINDSAY = no_command
@Aclone Mental Communication Parent (MCP)=@pemit %#=Sorry, @clone wastes DB-space. Please @parent instead. (Object destroyed);@dest/override me
&LINK2 Mental Communication Parent (MCP)=$.psilink/force *:@vz me=[u(linkok-2,%0,%#)];@switch words(%vz)=0,{@pemit %#=PSI: Linked failed (no valid targets).},{@pemit %#=PSI: Linked to [switch(words(%vz),1,[name(%vz)],[u(more,%vz)])].}
&LINKOK Mental Communication Parent (MCP)=[setdiff(setunion([iter(%0,[locate(%1,##,npP)])],[setunion([iter(%0,num(*##))],[iter(%0,num(##))])]),#-1 #-2)]
@set Mental Communication Parent (MCP)/LINKOK = no_command
&LINKOK-1 Mental Communication Parent (MCP)=[filter(me/good,[setdiff([iter(%0,[locate(%1,##,npP)])],#-1 #-2)])]
@set Mental Communication Parent (MCP)/LINKOK-1 = no_command
&LINKOK-2 Mental Communication Parent (MCP)=[setdiff(setunion([iter(%0,[locate(%1,##,npP)])],[setunion([iter(%0,num(*##))],[iter(%0,num(##))])]),#-1 #-2)]
@set Mental Communication Parent (MCP)/LINKOK-2 = no_command
&LINKWHICH Mental Communication Parent (MCP)=[switch(strlen(v(linkok)),strlen(v(linkok-1)),check,strlen(v(linkok-2)),nocheck)]
@set Mental Communication Parent (MCP)/LINKWHICH = no_command
@set Mental Communication Parent (MCP)=DARK
@set Mental Communication Parent (MCP)=STICKY
@set Mental Communication Parent (MCP)=PARENT_OK
@set Mental Communication Parent (MCP)=HALTED
@set Mental Communication Parent (MCP)=SAFE
&LINK Mental Communication Parent (MCP)=$.psilink *:@vz me=[u(linkok,%0,%#)];@switch words(%vz)=0,{@pemit %#=PSI: Linked failed (no valid targets).},{@pemit %#=PSI: Linked to [switch(words(%vz),1,[name(%vz)],[u(more,%vz)])].}
&UNLINK Mental Communication Parent (MCP)=$.psiunlink:@vz me;@pemit %#=PSI: Unlinked.
&SEND Mental Communication Parent (MCP)=$.psi ?*:@switch words(%vz)=0,{@pemit %#=PSI: You're not linked to anyone.},{@dol %vz={@pemit ##=[switch(words(%vz),0,,1,,To [u(more,%vz)]:%b)][v(prefix)] [u(body,%N,%0,%1)]};@pemit %#=PSI: [switch(words(%vz),0,,1,To [name(%vz)],To [u(more,%vz)])]: [u(body,%N,%0,%1)]}
&SENDP Mental Communication Parent (MCP)=$.ppsi *=?*:@switch [setq(0,[u(linkok,%0,%#)])][words(r(0))]=0,{@pemit %#=PSI: Failed: `%0' is not a valid target.},{@dol r(0)={@pemit ##=[switch(words(r(0)),0,,1,,To [u(more,r(0))]:%b)][v(prefix)] [u(body,%N,%1,%2)]};@pemit %#=PSI: [switch(words(r(0)),0,,1,To [name(r(0))],To [u(more,r(0))])]: [u(body,%N,%1,%2)]}
&BODY Mental Communication Parent (MCP)=[switch(%1,:,%0%b%2,\;,%0%2,|,%2,",%0 [v(mindsay)] [u(say1)]%2[u(say2)],%0 [v(mindsay)] [u(say1)]%1%2[u(say2)])]
@set Mental Communication Parent (MCP)/BODY = no_command
@Prefix Mental Communication Parent (MCP)=You sense
@set Mental Communication Parent (MCP)/Prefix = no_command
&MORE Mental Communication Parent (MCP)=[setq(0,[edit(iter(%0,[edit(name(##),%b,_)]),%b,\,%b)])][edit([edit(rest(revwords(r(0))),$,%band [first(revwords(r(0)))])],_,%b)]
@set Mental Communication Parent (MCP)/MORE = no_command
&SAY1 Mental Communication Parent (MCP)=~
@set Mental Communication Parent (MCP)/SAY1 = no_command
@Desc Mental Communication Parent (MCP)=Welcome to the wonderful world of mental manipulation and communication. To begin your journey, type the following two commands:%r%r%t@set [num(me)]=inherit%r%t.psi/init%r%rAfter that, just type '.psihelp' for commands. Have fun, and remember: It's up to you to use this device in a responsible and IC manner. (I have to say that. It's called a 'disclaimer'.)%b%b%b-- Rinaen
&HELP Mental Communication Parent (MCP)=$.psihelp:@pemit %#={Rinaen's Mental Communication Widget commands%r%r[ljust(.psilink <list>,30)]Sets up a mental link between yourself and%r[space(30)]and <list>, which can be one name or a list%r[space(30)]of names.%r[ljust(.psiunlink,30)]Drops the mental link.%r[ljust(.psicheck,30)]Checks who's currently linked.%r[ljust(.psi <message>,30)]Sends <message> to everyone in your current%r[space(30)]link. : and ; substitution is supported, as%r[space(30)]well as | for emits.%r[ljust(.ppsi <name>=<message>,30)]Sends <message> to <name>, bypassing the current%r[space(30)]link. As in .psilink, <name> can be one name%r[space(30)]or many. Again, :, ;, and | supported.%r[ljust(.psiconfig <option>=<choice>,30)]Set the named Psi <option> to <choice>. See%r[space(30)]'.psihelp config' for details.%r%rFor message and option configuration, type '.psihelp config'. For examples, type '.psihelp examples'. For redundancy, type '.psihelp'. All questions, comments, or avgolemeno soup please +mail Rinaen.}
&SETUP Mental Communication Parent (MCP)=$.psi/init:@lock/use me=%#;@link me=%#;@set me=sticky;@set me=dark;@lock me=%#;@pemit %#=PSI: All initialized and ready to go. Type '.psihelp' for commands.
&HELP2 Mental Communication Parent (MCP)=$.psihelp examples:@pemit %#={Rinaen's Mental Communication Widget examples%r%rSometimes it's easiest to learn by example. Here are some common responses you'll get to commands you'll use. Commands you type are written like this:%r%t>This is what you type%rResponses will be like this:%r%tHuh?%b%b(Type "help" for help.)%rAs you can see, it's best to use actual commands. Ready? Here we go.%r%r>.psi/init%rPSI: All initialized and ready to go. Type '.psihelp' for commands.%r%r>.psilink Napoleon Confucious Thor%rPSI: Linked to Napoleon, Confucious, and Thor.%r(This will set up the link for Napoleon, Confucious, and Thor, so all messages \[until you unlink or change the link] will be broadcasted to these three. Note that you can use significant portions of the names, like 'Napol' for 'Napoleon'. You can also use the dbref# of a player or puppet. There is a configurable option which allows you to set just how much checking for valid targets the device does. See '.psihelp config' for details.) If the .psilink option is giving you problems, use the .psilink/force switch.%r%r==> Want to see more? type '.psihelp examples2'.}
&HELP3 Mental Communication Parent (MCP)=$.psihelp examples2:@pemit %#={Rinaen's Mental Communication Widget examples (continued)%r%r>.psi Hi guys. What's shakin'?%rPSI: To Napoleon, Confucious, and Thor: [name(owner(me))] [v(mindsay)] [v(say1)]Hi guys. What's shakin'?[v(say2)]%r%r%tAnd they will see:%rTo Napoleon, Confucious, and Thor: [v(prefix)] [name(owner(me))] [v(mindsay)] [v(say1)]Hi guys. What's shakin'?[v(say2)]%r%r>.psi :shakes like a leaf.%rPSI: To Napoleon, Confucious, and Thor: [name(owner(me))] shakes like a leaf.%r%r%tAnd they will see:%rTo Napoleon, Confucious, and Thor: [v(prefix)] [name(owner(me))] shakes like a leaf.%r%r>.psi ;'s thoughts are scattered.%rPSI: To Napoleon, Confucious, and Thor: [name(owner(me))]'s thoughts are scattered.%r%r%tAnd they will see:%rTo Napoleon, Confucious, and Thor: [v(prefix)] [name(owner(me))]'s thoughts are scattered.%r%r==> Want to see more? type '.psihelp examples3'.}
&HELP4 Mental Communication Parent (MCP)=$.psihelp examples3:@pemit %#={Rinaen's Mental Communication Widget examples (continued)%r%r>.psi |something whicker this way comes.%rPSI: To Napoleon, Confucious, and Thor: something whicker this way comes.%r%r%tAnd they will see:%rTo Napoleon, Confucious, and Thor: [v(prefix)] something whicker this way comes.%r%r(Note that this option has the potential for abuse. Please act responsibly. Also, know that there are ways to tell if you're being spoofed like this. See 'help nospoof' for details.)%r%rFor a more personal touch, without re-linking or disrupting a current link:%r%r>.ppsi Abigail=:gently probes your surface thoughts.%rPSI: To Abigail: [name(owner(me))] gently probes your surface thoughts.%r%r%tAnd Abigail would see:%r[v(prefix)] [name(owner(me))] gently probes your surface thoughts.%r%rFeel better now? If you're still confused, just experiment for a bit. :) Or +mail Rinaen.}
&HELP5 Mental Communication Parent (MCP)=$.psihelp config:@pemit %#={Rinaen's Mental Communication Widget: Configuration%r%rThere are a few options you can customize with this object, with the command '.psiconfig <option>=<choice>'. The following messages are changeable:%r%r[ljust(Message,10)][ljust(Default,15)][ljust(Current Setting,20)]What it means%r[ljust(=======,10)][ljust(=======,15)][ljust(===============,20)]=============%r%r[ljust(PREFIX,10)][ljust(You sense,15)][ljust(v(prefix),20)]The message they see just before%r[space(45)]the actual pose.%r[ljust(MINDSAY,10)][ljust(mindspeaks,15)][ljust(v(mindsay),20)]The pose of the mental speech.%r[ljust(SAY1,10)][ljust(~,15)][ljust(v(say1),20)]The beginning 'quote' of the%r[space(45)]mental speech.%r[ljust(SAY2,10)][ljust(~,15)][ljust(v(say2),20)]The ending 'quote' of the%r[space(45)]mental speech.%r[ljust(TARGET,10)][ljust(nocheck,15)][ljust(u(linkwhich),20)]Whether or not the device%r[space(45)]performs checks for valid targets%r[space(45)]or not. Options are `check' and%r[space(45)]`nocheck'.%r%r(More options may be added later, depending on demand and the niceness of said demands. :) Watch this space.)}
&CONFIG Mental Communication Parent (MCP)=$.psiconfig *=*:@switch member(v(valid),%0)=0,{@pemit %#=PSI: That's not a valid configuration option.},{@switch %0=target,{@switch %1=check,{&linkok me=[v(linkok-1)];@pemit %#=PSI: Option Target changed to `check'.},nocheck,{&linkok me=[v(linkok-2)];@pemit %#=PSI: Option Target changed to `nocheck'.},@pemit %#=PSI: `check' and `nocheck' are valid configurations for option Target.},{&[%0] me=%1;@pemit %#=PSI: Option [ucstr(%0)] changed.}}
&VALID Mental Communication Parent (MCP)=mindsay prefix say1 say2 target
@set Mental Communication Parent (MCP)/VALID = no_command
&CHECK Mental Communication Parent (MCP)=$.psicheck:@pemit %#=PSI: Currently linked to [switch(words(%vz),0,no one,1,[name(%vz)],[u(more,%vz)])].
&SAY2 Mental Communication Parent (MCP)=~
@set Mental Communication Parent (MCP)/SAY2 = no_command
&GOOD Mental Communication Parent (MCP)=[and(hasflag(owner(%0),connected),nearby(owner(me),%0))]
@set Mental Communication Parent (MCP)/GOOD = no_command
&MINDSAY Mental Communication Parent (MCP)=mindspeaks
@set Mental Communication Parent (MCP)/MINDSAY = no_command
@Aclone Mental Communication Parent (MCP)=@pemit %#=Sorry, @clone wastes DB-space. Please @parent instead. (Object destroyed);@dest/override me
&LINK2 Mental Communication Parent (MCP)=$.psilink/force *:@vz me=[u(linkok-2,%0,%#)];@switch words(%vz)=0,{@pemit %#=PSI: Linked failed (no valid targets).},{@pemit %#=PSI: Linked to [switch(words(%vz),1,[name(%vz)],[u(more,%vz)])].}
&LINKOK Mental Communication Parent (MCP)=[setdiff(setunion([iter(%0,[locate(%1,##,npP)])],[setunion([iter(%0,num(*##))],[iter(%0,num(##))])]),#-1 #-2)]
@set Mental Communication Parent (MCP)/LINKOK = no_command
&LINKOK-1 Mental Communication Parent (MCP)=[filter(me/good,[setdiff([iter(%0,[locate(%1,##,npP)])],#-1 #-2)])]
@set Mental Communication Parent (MCP)/LINKOK-1 = no_command
&LINKOK-2 Mental Communication Parent (MCP)=[setdiff(setunion([iter(%0,[locate(%1,##,npP)])],[setunion([iter(%0,num(*##))],[iter(%0,num(##))])]),#-1 #-2)]
@set Mental Communication Parent (MCP)/LINKOK-2 = no_command
&LINKWHICH Mental Communication Parent (MCP)=[switch(strlen(v(linkok)),strlen(v(linkok-1)),check,strlen(v(linkok-2)),nocheck)]
@set Mental Communication Parent (MCP)/LINKWHICH = no_command
@set Mental Communication Parent (MCP)=DARK
@set Mental Communication Parent (MCP)=STICKY
@set Mental Communication Parent (MCP)=PARENT_OK
@set Mental Communication Parent (MCP)=HALTED
@set Mental Communication Parent (MCP)=SAFE