----- Original Message ----- From: Mark Wedel > There is probably some good reasons that global events can not be linked to > local objects. > > First, the number of objects that need to be examined for one of these events > could be prohibitive - even if only 20 objects currently in memory use it, all > objects in memory (thousands, or tens of thousands) would need to get examined. > > Second, the objects listening for these events may not be in memory when the > event happens. IF a map is reset, it is likely in most cases that the objects > for the map that is being reset is not in memory. > > Some, like mapenter and mapleave could be perhaps be tied to the specific > exits (although, apply can be used for that). It would perhaps be interesting > to have plugins based on the map's themselves. > > Eg, be able to say something like '/city/city' have mapenter and mapleave > plugins associated with it. > > As said, problem is these objects may not be in memory at the time of the > event.... Yes, I didn't want to be able to hook local objects to the global map reset event, I was thinking that a new local map refresh event could be useful (and not too prohibitive since it would only have to check objects on that map). Then you would not have a problem that objects would not be in memory since it would only be objects going into memory that could hook the event. I don't know if this is possible but it sounds (to the non-expert here) possible... (what is the CFWreadymapname wrapper?) (BTW - I also noticed one wrapper - GETARCHBYOBJNAME, is this why the plugin uses the object common name and not the arch name?) > In any case, what's the problem with using unique-item files? you can > make individual objects unique, and they will persist no matter where they are > dropped. no problem with using unique-item files, but for some things you wanted to do it would be more (dynamic? straightforward? simple?) if there was a local map refresh hook. Thinking more of non pickable objects - or intercepting the arch that is placed on a map (like creatures who are tougher depending on how many players are on the server when the map is created/refreshed.) > Now it would be useful to attach scripts to most unique objects - in > particular to the pickup and drop - if someone drops a unique item in a shop > (tries to sell it), it goes back to its starting location for example - pickup > could be used for it to store away where it was picked up. This is a good idea too, I remember on the Abermud there was a pit where you dumped quest items and other garbage and got some xp for them - presumably doing you could then return some items into circulation or kick off a refresh(?) of that quest. Again just an idea.