Universal Teleporter

A teleportation system that saves @tel locations and allows people to @tel to them.

Author: Mr.Q
Category: Other
Compatibility: PennMUSH, TinyBit, TinyMUX.

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Universal Teleporter

@@
@@ This is a Universal Teleporter that Saves @tel Locations and Allows
@@ People to tell to them. Any Suggestiosn for it end to Me.
@@ Mr.Q, E-MAIL: dg236@cleveland.freenet.edu
@@ Have Fun. To install it run TinyFugue. Then change worlds to the one
@@ you want then type: /quote -w '"teleporter"
@@
@create Teleport System=10
@lock Teleport System=#2
&TSTORE Teleport System=$@tstore *=*-*:@switch hasflag(v(1),J)={1},{@switch match(get(me/[v(#)]LIST),v(0))={0},{@switch [capstr(ucstr(v(0)))]={* *},{@pemit %#=Spaces aren't allowed in the alias},{&NUM[v(#)][capstr(ucstr(v(0)))] me=[v(1)];&N[v(#)][capstr(ucstr(v(0)))] me=[v(2)];&LIST[v(#)] me=[get(me/LIST[v(#)])] [v(0)];@pemit %#=Teleport Location Stored.}},{@pemit %#=You already are using that Alias.}},{@switch owner(v(1))=%#,{&NUM[v(#)][capstr(ucstr(v(0)))] me=[v(1)];&N[v(#)][capstr(ucstr(v(0)))] me=[v(2)];&LIST[v(#)] me=[get(me/LIST[v(#)])] [v(0)];@pemit %#=Teleport Location Stored.},{@pemit %#=Permission Denied}}
&TREMOVE Teleport System=$@tremove *:@switch match(get(me/LIST[v(#)]),v(0))={0},{@pemit %#=You Don't have any Stored Alias with that name.},{&N[v(#)][v(0)] me=;&NUM[v(#)][v(0)] me;@edit me/LIST[v(#)]={[capstr(lcstr(v(0)))]},{};@pemit %#=Teleport Location Removed.}
&TLIST Teleport System=$@tlist:@pemit %#=[repeat(-=,36)]%r[center(%N's Teleport List,72)]%r[repeat(-=,36)]%r[ljust(Alias,20)][ljust(Address,15)]Note%r[ljust(-----,20)][ljust(-------,15)]----;@dolist get(me/LIST[v(#)])={@pemit %#=[ljust(##,20)][ljust(get(me/NUM[v(#)]##),15)][switch(get(me/N[v(#)]##),,N,Y)]};@wait 1={@pemit %#=[repeat(-=,36)]}
&LIST#1 Teleport System=
&TSTORE2 Teleport System=$@tstore *=*:@switch hasflag(v(1),J)={1},{@switch match(get(me/[v(#)]LIST),v(0))={0},{@switch [capstr(ucstr(v(0)))]={* *},{@pemit %#=Spaces aren't allowed in the alias},{&NUM[v(#)][capstr(ucstr(v(0)))] me=[v(1)];&LIST[v(#)] me=[get(me/LIST[v(#)])] [v(0)];@pemit %#=Teleport Location Stored.}},{@pemit %#=You already are using that Alias.}},{@switch owner(v(1))=%#,{&NUM[v(#)][capstr(ucstr(v(0)))] me=[v(1)];&LIST[v(#)] me=[get(me/LIST[v(#)])] [v(0)];@pemit %#=Teleport Location Stored.},{@pemit %#=Permission Denied}}
&TNOTE Teleport System=$@tnote *:@switch match(get(me/LIST[v(#)]),v(0))={0},{@pemit %#=Sorry, There is no Alias with that name.},{@switch get(me/N[v(#)][v(0)])={},{@pemit %#=There is No Note for that Entry.},{@pemit %#=[repeat(-=,36)]%r[ljust(Alias:[v(0)],20)]Address:[get(me/NUM[v(#)][v(0)])]%r%rNOTE:[get(me/N[v(#)][v(0)])]%r[repeat(-=,36)]%r}}
&TEDNOTE Teleport System=$@tednote *=*,*:@switch match(get(me/LIST[v(#)]),v(0))={0},{@pemit %#=There is no Location Sotred with that Alias.},{@edit me/N[v(#)][v(0)]={[v(1)]},{[v(2)]};@pemit %#=[repeat(-=,36)]%r[ljust(Alias: [capstr(lcstr(v(0)))],20)]Address: [get(me/NUM[v(#)][v(0)])]%r%rNOTE:[get(me/N[v(#)][v(0)])]%r[repeat(-=,36)]%r}
&TADDNOTE Teleport System=$@taddnote *=*:@switch match(get(me/LIST[v(#)]),v(0))={0},{@pemit %#=There is no Location Stored with that alias.},{&N[v(#)][v(0)] me=[v(1)];@pemit %#=Note Set.}
&TEL Teleport System=$TEL *:@switch match(get(me/LIST[v(#)]),v(0))={0},{@pemit %#=There is no Location Stored with that Alias.},{@switch hasflag(get(me/NUM[v(#)][v(0)]),J)={0},{@switch owner(get(me/NUM[v(#)][v(0)]))={[v(#)]},{@pemit %#=You are whisked Away.;@oemit loc(v(#))=%N Opens a Door with one of %p keys and DisAppears.;@tel [v(#)]=[get(me/NUM[v(#)][v(0)])];@remit [get(me/NUM[v(#)][v(0)])]=%N drops out of Thin Air.},{@pemit %#=You are whisked Away.;@oemit loc(v(#))=%N Opens a Door with one of %p keys and Disappears.;@tel [v(#)]=[get(me/NUM[v(#)][v(0)];@remit [get(me/NUM[v(#)][v(0)]=%N drops out of Thin Air.}}
@Desc Teleport System=%rHere are the Commands to use the Universal Teleporter:%r%r@tstore <ALIAS>=<#dbrf>%[-<NOTES>]%t- Will add a Teleport Location.%r@tremove <ALIAS>%t%t%t- Will Remove a Teleport Location.%r@tednote <ALIAS>=<OLD TEXT>,<NEW TEXT>%t- Edits a Teleport Location's Note.%r@tnote <ALIAS>%t%t%t%t- Shows the Note of a Teleport Location.%r@tlist%t%t%t%t%t- Lists all Teleport Locations.%rtel <ALIAS>%t%t%t%t- Teleport the Person to Stored Location%r%rCoded by: Mr.Q
&THELP Teleport System=$@thelp:@pemit %#=%rHere are the Commands to use the Universal Teleporter:%r%r@tstore <ALIAS>=<#dbrf>%[-<NOTES>]%t- Will add a Teleport Location.%r@tremove <ALIAS>%t%t%t- Will Remove a Teleport Location.%r@tednote <ALIAS>=<OLD TEXT>,<NEW TEXT>%t- Edits a Teleport Location's Note.%r@tnote <ALIAS>%t%t%t%t- Shows the Note of a Teleport Location.%r@tlist%t%t%t%t%t- Lists all Teleport Locations.%rtel <ALIAS>%t%t%t%t- Teleport the Person to Stored Location%r%rCoded by: Mr.Q
@set Teleport System=INHERIT