ZMud Scripts

From LSWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 18:05, 5 March 2008 (edit)
Kilelen (Talk | contribs)

← Previous diff
Revision as of 18:17, 5 March 2008 (edit)
Kilelen (Talk | contribs)

Next diff →
Line 21: Line 21:
==Speedwalks== ==Speedwalks==
 +Alright, this is something I used when I played on another mud. It's a combonation/modification of a tf speedwalk script one player there used for directions (Conglomo), and the zMud way of doing things a seperate player used (Endy), with some of my own twists. The idea is this: You use a variable (in this case named "dirs", inside the class "Speedwalks") to hold a list of area names and directions to get to each area. You can then type
 + goto <area>
 +and walk there. You need to make this variable yourself. It should be of type "Data Record" should contain a list that looks something like this:
 + lhareaname | go xxn, xxw, xxwhatever
 + areanamelh | go xxwhateverbackwards, xxe, xxs
 +
 +with one for each area you'd like to speedwalk to. It should be located in the "Speedwalks" class. I like using lh[] as the central location for my directions. In order to return from the area you walked to, you need to go to the same exact spot your directions walked you to when arriving, then type:
 + goto lh
 +
 +Here's the class itself:
#CLASS {Speedwalks} #CLASS {Speedwalks}
#ALIAS goto {#IF (%1 == "lh") {Speedwalks/current_run = @Speedwalks/current_area; #ALIAS goto {#IF (%1 == "lh") {Speedwalks/current_run = @Speedwalks/current_area;
Line 29: Line 39:
#VAR current_area {} #VAR current_area {}
#CLASS 0 #CLASS 0
 +
 +I'm considering changing this to be intelligent, in that it will track your location and be able to extrapolate directions using basic math on the fly to go from place to place without using losthaven as a central spot to pass through, but am still thinking it through. Elegance is often in simplicity, and that might end up a little complex, with some gotchas for non-passable barriers. Anyways, enjoy the dumb version!

Revision as of 18:17, 5 March 2008

This is a place for people to post and share ZMud Scripts that might be of interest to others.

Simple Chat Capture

This script will properly capture long multi-line OOC channel chats to a seperate window. In order for this to work properly, you must execute the command:

switch depiction Quote Channel Text

so that OOC channel chats are bounded by double quotation marks.

Just copy and paste this into your command line, no spaces, and it should work:

#CLASS {OOCCap}
#TRIGGER {(*)~[OOC (%w) (*)~]$} {#CAP Chats}
#TRIGGER {(*)~[OOC (%w)~] ~"(*)} {
  #CAP Chats
  #C+ Chats
  }
#TRIGGER {^Capture text OFF$} {#GAG}
#TRIGGER {^Capture text ON$} {#GAG}
#TRIGGER {~"$} {#C-}
#CLASS 0

Speedwalks

Alright, this is something I used when I played on another mud. It's a combonation/modification of a tf speedwalk script one player there used for directions (Conglomo), and the zMud way of doing things a seperate player used (Endy), with some of my own twists. The idea is this: You use a variable (in this case named "dirs", inside the class "Speedwalks") to hold a list of area names and directions to get to each area. You can then type

goto <area>

and walk there. You need to make this variable yourself. It should be of type "Data Record" should contain a list that looks something like this:

lhareaname | go xxn, xxw, xxwhatever
areanamelh | go xxwhateverbackwards, xxe, xxs

with one for each area you'd like to speedwalk to. It should be located in the "Speedwalks" class. I like using lh[] as the central location for my directions. In order to return from the area you walked to, you need to go to the same exact spot your directions walked you to when arriving, then type:

goto lh

Here's the class itself:

#CLASS {Speedwalks}
 #ALIAS goto {#IF (%1 == "lh") {Speedwalks/current_run = @Speedwalks/current_area;
  #ADD Speedwalks/current_run lh;
  #EXEC %db( @Speedwalks/dirs, @current_run)} {Speedwalks/current_run = lh%1;Speedwalks/current_area = %1;
  #EXEC %db( @Speedwalks/dirs, @current_run)}}
#VAR current_run {}
#VAR current_area {}
#CLASS 0

I'm considering changing this to be intelligent, in that it will track your location and be able to extrapolate directions using basic math on the fly to go from place to place without using losthaven as a central spot to pass through, but am still thinking it through. Elegance is often in simplicity, and that might end up a little complex, with some gotchas for non-passable barriers. Anyways, enjoy the dumb version!

Personal tools