> To queue up events to be executed at a specified time in the future. This can > allow you to better optimize some of the update handlers (aggro update, mob > movement updates, repops, etc). It can also be used to implement some pretty > fun features, like casting time, and continuous skills like pick locks, etc. >
Yes exactly. For a different example, I am creating 'menus' in my MUD for many purposes (commands, communication with mobs ala Neverwinter Nights style, usage in a scripting system, other stuff): <20hp 10000m 100mv> list The bartender smiles and says, 'Here's what I'm selling:' 1. Lvl 0 'a bottle of beer', a drink, costs 5 silver. (infinite) 2. Lvl 0 'a barrel of beer', a drink, costs 82 silver. (infinite) You can buy items by their item number (the first number listed)--e.g. type in '1'. <20hp 10000m 100mv> Here, this creates a menu on you, which is given a call function of do_buy. Each of the options (items) has several text fields--in the case of do_list, the entire string (shown below) that is shown to the player, and another field that is a copy of the obj->name for that item. That way when you just type in '1' it more or less does 'buy bottle beer'. However, this is just one specific use of menus; they are much more flexible. ========================================== <20hp 10000m 100mv> report Your menus: ----------------------------------------------------------------- Menu: do_list Option 1: Lvl 0 'a bottle of beer', a drink, costs 5 silver. (infinite) Option 2: Lvl 0 'a barrel of beer', a drink, costs 82 silver. (infinite) ----------------------------------------------------------------- MUD's events: Ev action type: 5 <20hp 10000m 100mv> Killing menu do_list--menu expired. <20hp 10000m 100mv> report Your menus: MUD's events: <20hp 10000m 100mv> ========================================== And because I don't want certain menus to last forever, even though there are checks to see if you left the shopkeep's room, I have an event to kill off menus that expire. (note that "Killing menu..." is for debug purposes above :)). You can type in 'do_list' 21129129 times in an attempt to overload the MUD (I don't check your menu list to see if you have one named 'do_list' already at the moment, which I will do later), but regardless you'll only ever get about 20 at a time, because killmenu events are killing old ones off :) -- Jeremy ----- Original Message ----- From: "Chad Simmons" <[EMAIL PROTECTED]> To: "Chris Winston Litchfield" <[EMAIL PROTECTED]> Cc: <[email protected]> Sent: Sunday, August 31, 2003 3:29 PM Subject: Re: More describable event actions > > --- "Chris \"Winston\" Litchfield" <[EMAIL PROTECTED]> wrote: > > So what exactly is the purpose of these events? > > To queue up events to be executed at a specified time in the future. This can > allow you to better optimize some of the update handlers (aggro update, mob > movement updates, repops, etc). It can also be used to implement some pretty > fun features, like casting time, and continuous skills like pick locks, etc. > > > ~Kender > > ===== > -----BEGIN GEEK CODE BLOCK----- > Version 3.1 > GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$ > P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O > M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@ > b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++ > ------END GEEK CODE BLOCK------ > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > > -- > ROM mailing list > [email protected] > http://www.rom.org/cgi-bin/mailman/listinfo/rom

