dream_for_room

Response Typescript
EntitiesRooms
Parametersroom1 [, room2 [, ...] ]

    You can use this trigger type to register a room dream. A room dream is a
dream that anyone in one of the rooms specified in the parameters can
receive when sleeping. The room must be specified by its ID.


Following is the current breakdown of dream probabilities for each dream
type given that a mobile is to receive one:

dream_for_world 50%
dream_for_continent 20%
dream_for_area 10%
dream_for_zone 10%
dream_for_room 10%

When a player is ready to dream these probabilities are used to order the
dream categories. This ordering is then used to find an actual dream for
the player. If a category contains no dreams then the engine moves on to
the next category. For each potential dream the engine runs the dream
script which can then determine if it the dream is applicable or not. If
the dream is not applicable then the script can return 0 to inform the
engine to try the next dream. If no dreams succeed for a category then
again the engine moves on to the next category. In a given category all
dreams have equal probability of running. If you wish to decrease the
probability of your dream running, you can return 0 after doing a simple
dice roll to accomodate the decreased odds. In contrast you cannot
increase the probability that your dream will run. Because the engine
requires a return value (no return value counts as success) you must place
your dream script in a protected block.

@dreamer - The player receiving the dream.

Example:

if( @dreamer->race != "troll" )
{
//
// Only trolls can receive this dream.
//
return 0
}
endif

#%dream(
\ "You dream that you are on the front lines of a great "
\ "battle between your mighty troll brethren and the weak "
\ "and pathetic elves. You scream your battle cry and "
\ "smoosh the head of a fallen elf under your foot.",
\ @dreamer )