Tutorials written by Pleedon

From Redwall MUCK Wiki

Written by Pleedon


An Object That Tells You The Time!

@create Clock

@desc Clock=A clock that reads, {time:me} MUCK Time.

The first command creates the Clock object. The second command describes the clock. It searches to see what time it is, and if the player has a timezone set on them it looks to see what timezone. Then it replaces {time:me} with the current time.

The Mirror!

Eeeek! What's that in the mirror looking back at me? It's hiddious! An Object That Shows What You Look Like!

@create Mirror

@desc mirror={exec:_/de,me}

The first command creates the mirror object. The second command describes it. The exex: bit searches to see what the player has as their desc, and shows it. Exec means execute so it will check that property and execute any MPI contained in the desc.


Ow! Ms. Pleedon, I Fell On One! A Midevil Pressure Releaver

@create Throwing Knives

@desc throwing knives=A pouch of small throwing knives. Try to 'throw at (something)'

@action throw at=throwing knives==$nothing

@succ throw at=You throw a knife at {&arg}.

The first command creates the object. The second describes it. The next command creates an action called 'throw at' that's set on the throwing knives, and linked to $nothing. The last command sets the action's success message. Whatever the player types after 'throw at' will appear where it says {&arg}, so if you typed 'throw at tree' the succ would show: You throw a knife at tree.


Con* An Object That Helps You Spy

@create camera

@set camera=_listen:3280

@set camera=/listen/power:on

@set camera=/listen/dest:yourdbref (no #)

@set camera=/listen/filter:on

@set camera=/listen/pre: The camera sees:

@set camera=/listen/recurse:off

This example is hard to explain, as it uses the MUF program of 3280. The destination can be a room or a person. If it's a room, it will broadcast to that room. If it's a player, the camera broadcasts only to the person. The pre: is what you see before the camera shows you what it sees. Be sure you don't have a number sign in front of the number. If you want, you can make it shorter...just put in some distinguishing character so you know it's what the CAMERA sees and not what YOU see.


Ohh...look at the colours... A cool toy that changes every time you look at it!

@create Light

@desc light= A colored light, that changes colors! Right now, it's {rand:colors,this}!

lsedit light=colors

red orange yellow green blue purple .end

The first command creates the light object. The second describes it, and puts in a rand: string. The rand string will take a list, made with lsedit, and randomly pick a line from it to show. {rand:colors,this} means it will randomly pick a line from a list called 'colors' that's set on 'this' or the Light object. lsedit light=colors opens up the lseditor to edit the colors list that's set on Light. The colors enter different lines into the editor...you probably won't see them as you type. .end exits the editor...don't forget the period before end!


Pleedon does not smell. Pleedon does not smell. Write a message for everyone to see!

@create Chalkboard

@desc chalkboard= A black chalkboard, with a white piece of chalk attached to it. 'Write (something)' on the board! Right now, the board reads: {nl}{nl} {prop:_message,this}{nl} Signed, {prop:_name,this}

@action write=chalkboard==$nothing

@succ write ={null:{store:{&arg},_message,chalkboard}{store:{name:me},_name,chalkboard}}You write\, {&arg} on the board.

The first command creates the board, and the second describes it. The {nl} things you see mean New Line. That skips a line, and is useful in formatting. The {prop:} things will show the properties set on the chalkboard. You'll set those properties a little later. The @action command creates the 'write' action on the chalkboard, and links it to $nothing. Then you'll set the succ. This will store whatever you write as the 'message' property. That's the store:{&arg} thing. It will store the {&arg} (whatever you write) as a property called _message on the chalkboard. The {null:} means it doesn't show that to the player...it just does it quietly. The storeÊ{name:me} command stores the name of the writer on the board, using a similar process.


5:32:61 An Object That Counts!

@create Stopwatch

@desc stopw=A stopwatch that you can 'start', 'stop', or 'check'.

@action start=stopw==$nothing

@action stop=stopw==$nothing

@action check=stopw==$nothing

@succ start=You start the watch. {null:{store:{secs},_{name:me},stopwatch}}

@succ stop={if:{prop:_{name:me},stopwatch},{delprop:_{name:me},stopwatch}You stop the watch.,The clock isn't ticking.}

@succ check={if:{prop:_{name:me},stopwatch},{subt:{secs},{prop:_{name:me},stopwatch}} seconds have passed.,The watch hasn't been started!}

Easy, huh? Okay...the first command creates the object, the second describes it. The next three create three different actions: start, stop, and check. All three actions are then set on the stopw, or Stopwatch, object, and linked to $nothing. The success message for start sets a property on the watch with the name of the character who's starting it. The property's value is set as the system time when the clock was started. Stop uses the if: command to check if the prop is set on the watch. If it is, it deletes it. If not, it just returns a message saying, "The clock isn't ticking." The check command checks for the prop as well, and if it is there, it subtracts the system time when you started the clock from the current time. It tells you the difference between the two, in seconds. If the prop isn't set, it returns the message of: The watch hasn't been started!


Hey, what's in here? A Room Withen A Barrel?

@create Barrel=me=$barrel

@dig Tunnel=$env/indoors=tunnel

@desc barrel={if:{prop:{name:me},barrel},A barrel with it's lid askew. In the darkness of the barrel\, there appears to be a passage that you could try to 'enter'\, or you can replace the lid to it's proper position.,A rather average wooden barrel. You can 'kick' it if you wish.}

@action lid=barrel==$nothing

@action kick=barrel==$nothing

@action enter=barrel==$tunnel

@succ lid={null:{delprop:{name:me},barrel}}You replace the barrel's lid carefully.

@succ enter=You gently lower yourself into the barrel.

@succ kick={null:{store:1,{name:me},barrel}}You kick the barrel, knocking the lid askew. In the darkness of the barrel/, there appears to be a passage that you could try to 'enter'\, or you can replace the 'lid' to it's proper position.

The first command creates a Barrel, sets you as it's home, and register's it's name as $barrel. That way, you can use $barrel instead of typing the Barrel object's number. The second digs a tunnel room, sets it as an indoors room, and registers it as 'tunnel' so you can type $tunnel instead of the room's number. The next command describes the barrel, and checks to see if your name is set as a property on the barrel. If it is, that means you've used the kick action, which sets that property. If the property isn't there, then you haven't kicked it. If you have kicked it, it shows the first message, saying that the barrel's lid is askew and you can 'enter' it. If you haven't kicked it, it shows an average barrel that you can 'kick'. The next three commands create the three actions of lid, kick, and enter on the barrel object, and links lid and kick to $nothing. The enter action is linked to your tunnel room, because you want the enter command to take you to that room. Then you set the success message for the kick action, which sets a property on the barrel saying you've kicked it. Next, the success for lid, which removes that property. Finally, the success for enter, which tells you that you climb into the barrel. Now, the second section!

Type 'enter' to enter the tunnel. You should find yourself in an empty room called Tunnel.

@desc here=A dark tunnel. If you'd like, you can 'climb' back out through the barrel.

@action climb=here==$xit

@set climb=destination:$barrel

The first command describes the room, the second creates an action set here and linked to the Xit program. This program takes whatever object you have in the destination: property and automatically takes you to that location. So, when you set destination with $barrel, you told the Xit program to make 'climb' lead back to wherever your barrel object is located. Like any room, this tunnel can be built onto. Best of all, wherever your barrel is, it will always lead back to where it's located. The only time problems may arise is when the barrel is in somebody's inventory. To prevent this, type: @lock barrel=me&!me .

See Also