[CF-Devel] plugin and events

Todd Mitchell temitchell at sympatico.ca
Mon Sep 23 23:13:54 CDT 2002


Reading the python plugin code...
Local Events are:
ATTACK, APPLY, DEATH, DROP, PICKUP, SAY, STOP, TELL, TIME, THROW, TRIGGER,
CLOSE
these can have code linked to specific objects (by putting an event call in
the object)
Global events are:
BORN, CRASH, LOGIN, LOGOUT, REMOVE, SHOUT, MAPENTER, MAPLEAVE, CLOCK,
MAPRESET
these can not have code linked to specific objects

This did dash my hopes for putting in a map reset event call into certain
exits to have the object name and message read from a file on reset.
(although I am still thinking how to use one of the local event hooks...say
time) I don't know the wisdom of creating a local event hook for a map reset
but here are some things you could do if there was one:
-place statues that read in a players name as their name from an entry in
the highscore table
-have houses named after the current owner (like Bob's house)
-Since the plugin can override the event you could also have maps that did
not reset if there was a player on a linked map (this would let some maps
have a shorter default reset time as well I suppose...)
-have other objects in some maps that could change (or not change) based on
events external to the map reset cycle like a file (local or net), or a
condition (player count?) --this would be better than using unique floors
(and the associated files in Unique-items) for small object scale
semi-permanences.

probably a lot more I haven't thought of yet since I barely grok how the
server works yet.  The plugin.c side of the code looks to have a lot more
possible events that could be hooked (I think).

just some thoughts.





    
    


More information about the crossfire mailing list