Re: [CODE] Things todo...

From: Andrew (
Date: 12/21/98

>Instead of just getting into an "i'm right because i know what i'm talking
>about and you obviously don't" argument, how about providing some
>examples of things LPC can do that DG_Scripts cannot, so people
>such as myself can understand where you're coming from (and,
>possibly add some of the functionality to DG_Scripts)?

Well I'm not sure about LPC, but I know quite a bit about MUSH/MUSE/MUX
'softcoding'. There are some differences between DG Scripts and MUSE
programming. I'll give you some examples:

@va object $unhide:@switch has_flag(#2356, HIDDEN)=0,{@wait 1; pemote %# The
purple septre us already unhidden!},1,{@wait 1; pemote %# You unhide the
purple sceptre, which is located in room(#2356).; set_flag(#2356, HIDDEN)}

You can simply type this at the prompt, exchanging 'object' for an object
you want the command to attach itself. So now when anyone types the command
'unhide', whilst this particluar object is in their inventory or in the
same room as them, it runs the script. If object #2356 is visible, it
sends you a message saying so, and if it isn't visible it unhides it.

I'm not sure you can do this with DG_Scripts or not. But this is a fairly
simple piece of code. You can also set variables or attributes on objects,
so if you wish to save someone's vnum you would simply add '@vb object=%#'.
This can be handy for hard-coded commands, such as eat and drink. You could
add an @aeat variable on each mobile, so that when the mobile eats the
information in @aeat is triggered. There would also be an @oeat, which is
the information sent to the players in the room when that mobile eats.

@aeat mobile=@wait 1; burp; say Excuse me!;
@oeat mobile=Freddy the frog gobbles something down his throat.

This would then save permenantly. Of course, this would be extremely hard
to implement into circle because of the binary files you would need to
store the information in (or plaintext files, which might work better),
because your object files would soon become huge if you stored this type
of information in them.

In conclusion, I believe that there are some differences in style which
make MUX/MUSE/MUSH code more powerful, although DG Scripts is not a
long way off. Please feel free to disagree ;)

Andrew Ritchie,

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST