Manual:DIL Manual/findsymbolic()
Jump to navigation
Jump to search
unitptr findsymbolic ( s : string ) s : Symbolic name of the NPC or Object to find. return: A pointer to an instance of the unit, or null. Example: findsymbolic("bread@midgaard")
This routine supplements findroom and findunit. It comes in handy,if it is important to get a correct reference to a NPC in the world. If for example, Mary needs to send a message to John the Lumberjack, then she should NOT use the findunit() since it may locate a different John - even a player! If she instead locates him using findsymbolic("john@haon_dor") she will be certain that it is in fact her husband, and not the player John Dow from Norway. It will NOT locate rooms, for the only reason that findroom is a lot more efficient.
---~---~---~---~---~---~---~---~---
dilbegin zonelog (s:string); code { flog (self.zonidx+".log",s,"a"); return; } dilend
---~---~---~---~---~---~---~---~---
The previous DIL function will work in any zone to log to a file with that zones name each zone could use it to keep zone logs separate.
---~---~---~---~---~---~---~---~---