View Single Post
Old 03-16-2009, 11:40 AM   #22
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: Revolutionary New OLC and Scripting

This one sends the message in addition to showing them the room as usual due to the return 0 at the top passing the input to the command interpreter in addition to anything the script is doing.

Note: I'm not trying to one up NIMSCript, I'm really mostly comparing because it piques my interest as well, to the best of my knowledge DG was what I'd always considered to be, by far, the most advanced scripting used in any DIKU derived codebase that wasn't just an existing language embedded into the MUD. (ie, I'm not comparing it non mud-specific languages like lua which can be embedded.)[/quote]


Is it mere coincidence that both languages use %variable% syntax? Probably not. NiMScripts have been made available as early as December 1993, so it's likely that parts of NiM's interpreter ended up as DG Scripts.

Here's an example of the mining script:
MUSHes are still easier to write code for, somewhat, because all objects in a MUSH are essentiall the same type. The split between actor/prop/scene is difficult to manage from the hardcode side because of the multiple types distinction on entities. It would probably take a week to fix this, with a lot of unknown consequences.

Here is an example of the script used to manage a pirate ship adventure:


The adventure begins when the player boards the ship. The player is then subject to the changes in the ship's state as set by the above script on a shipmate actor. The script digs an exit to a merchant vessel area with aggressive mobs during one of its random events. In another case, the player is transported to a lifeboat during a storm because the ship has wrecked. Several ancillary scripts are used: one to transport the player to the vessel Aelmon in the first place, another to manage the adventure from inside the Aelmon, and a script for effect during combat on the neighboring vessel, and a fourth script to handle the storm event once the player has been placed on the life boat.

Last edited by locke : 03-16-2009 at 10:25 PM.
locke is offline   Reply With Quote