[Package Index | Mudlib Index | Effect Index]

File /w/apostle/graffiti/graffiti_handler.c

-*- LPC -*- A random graffiti handler

Written by Apostle

Started 5. April 2007

Includes

This class includes the following files /w/apostle/graffiti/graffiti.h

Method index

Public Functions

These are functions that everyone can access.

add_graffiti
varargs void add_graffiti(string str,
                          string area)

Adds a new graffiti message.

Parameters:
str - the text of the message
area - area in which message should appear (universal by default)


add_random_graffiti
varargs void add_random_graffiti(mixed where,
                                 string * area)
add_style
void add_style(string str)

Adds a new writing style.

Parameters:
str - the style in the format "written on", "carved into", etc


clean_graffiti
mixed clean_graffiti(mixed where)
delete_graffiti_room
void delete_graffiti_room(mixed where)
extra_look
string extra_look(mixed where)
format_graffiti
varargs string format_graffiti(string str,
                               mixed where)

Formats a message Mask this function on the room for non-generic formatting

Parameters:
str - text to format
where - object or filename that overrides this function, 0 by default


graffiti_hidden
varargs string graffiti_hidden(string * locs,
                               mixed langs,
                               string * area)

Returns a hidden graffiti message

Parameters:
locs - array of possible graffiti locations
langs - possible languages of message, morporkian by default
area - array of areas to select message from, universal by default

Returns:
returns (Random searching message) + random_graffiti() + random_style() + (Random loc)

Example:
 return graffiti_hidden( ({ "the wall", "the table", "the door" }) );
 Returns: 
 Looking around, you find "Wombles Say Bing!" carved into the wall.

 return graffiti_hidden( ({ "the floor", "the wall" }), "agatean",
   ({ "bes pelargic", "agatea" }) );
 Returns:
 Searching around, you find "Death to the Fang!" painted on the wall.

graffiti_message
varargs string graffiti_message(string * area)

Returns a random graffiti message.

Parameters:
area - areas for message (universal by default)


graffiti_style
string graffiti_style()

Returns a random writing style
query_areas
string * query_areas()

Returns the list of current areas.
query_graffiti
varargs string * query_graffiti(string area)

Returns the list of graffiti messages saved. * @param area the area of the graffiti, all by default
query_graffiti_room
varargs string query_graffiti_room(mixed where,
                                   string * langs)
query_rooms
mapping query_rooms()
query_styles
string * query_styles()

Returns the list of writing styles saved.
remove_graffiti
varargs int remove_graffiti(string str,
                            int all,
                            string area)

Deletes an unwanted graffiti message

Parameters:
str - the message to remove
all - will remove all copies of str if true
area - area from which to delete message, universal by default

Returns:
returns number of matches deleted


remove_style
varargs int remove_style(string str)

Deletes a writing style

Parameters:
str - the message to remove

Returns:
returns number of matches deleted