search:

General



Rooms & Areas



Presence



Systems



Wiki Help



pmwiki.org



edit menu
Edit Page Upload Security

Here is the OLC code for a random room message. It creates the object and drops it in the room.

CREATE_OBJECT
CHANGE_OBJECT_NAME item - - random_event
CHANGE_OBJECT_SHORTDESC random_event random_event (do not touch)
CHANGE_OBJECT_FULLDESC random_event XXX
CHANGE_OBJECT_DATA1 random_event 0 0 0 392 14 0 0 0
CHANGE_OBJECT_DATA2 random_event 0 0 0 0 0 0 0 0
CHANGE_OBJECT_DATA3 random_event 0 1 YYY 0 0 0 0 0
CHANGE_OBJECT_SCRIPT random_event 9003
QDROP random_event

XXX = Random message to display.
YYY = Frequency where there is a 1 in YYY chance every 8 seconds of this message appearing. For example if YYY is 5 then there is a 1-in-5 chance (20% chance) of the message occuring every 8 seconds. YYY = 5 averages to 1 message every 40 seconds (8-second interval x 5 threshold = 40-second average).


Here is a working example:

CREATE_OBJECT
CHANGE_OBJECT_NAME item - - random_event
CHANGE_OBJECT_SHORTDESC random_event random_event (do not touch)
CHANGE_OBJECT_FULLDESC random_event A dragonfly zips across the path, displaying a colorful irridescent span of wing as it zooms off.
CHANGE_OBJECT_DATA1 random_event 0 0 0 392 14 0 0 0
CHANGE_OBJECT_DATA2 random_event 0 0 0 0 0 0 0 0
CHANGE_OBJECT_DATA3 random_event 0 1 8 0 0 0 0 0
CHANGE_OBJECT_SCRIPT random_event 9003
QDROP random_event

Recent Changes - Page History - Printable View
Page last modified on December 13, 2006, at 12:04 PM EST
PmWiki 2.20-beta16 - www.PmWiki.org