Mud/Mush/Moo
June 25, 2009
So I’ve started on a tinymush server, and its quite interesting scripting objects together, so here is my first object (which is actually version two of it) because the first version was a little cumbersome. Please note this is ready for copy and pasting into the mush (I’ve escaped the ; with backslashes)
@create Board
@desc Board=An oak framed chalk board ready to be written on. It contains the words of wisdom from the teachers, or doodles from the students.[ifelse([hasattr(me,text)],It currently reads: [eval(me,text)],It is currently blank)]. Feel free to "write on board z" or "erase board"
@lock Board==me
@set BOARD = COMMANDS
&C_WRITE Board=$write on board *:&text me=%0\;pose has just been written on
&C_ERASE Board=$erase board:&text me\;pose causes clouds of dust to rise as it is erasedIt has two commands “write on board x” and “erase board” which reset an attribute &text. I suspect I should change the pose lines to emit lines. But apart from that, I think its pretty cool.
changes here:
@desc board=An oak framed chalk board ready to be written on. It contains the words of wisdom from the teachers, or doodles from the students.[ifelse([hasattr(me,text)], It currently reads: [eval(me,text)],It is currently blank)]. Feel free to "write on board z" or "erase board"@lock Board==me
@set BOARD = COMMANDS
&C_WRITE Board=$write on board *:&text me=[escape([%0])]\;pose A scratchy sound fills the room as %n writes on the board. The phrase "[%0]" appears.
&C_ERASE Board=$erase board:&text me\;pose Clouds of dust appear from where %n has just erased the board.