Difference between revisions of "Manual:DIL Manual/findsymname()"

From DikuMUD Wiki
Jump to navigation Jump to search
(Created page with " unitptr findsymname ( u : unitptr, s : string, i : integer ) u : Search is relative to this unit. s : Symbolic name of the NPC or Object to find. i : FIND_UNIT_X...")
 
(Blanked the page)
Tag: Blanking
 
Line 1: Line 1:
  
unitptr findsymname ( u : unitptr, s : string, i : integer )
 
    u : Search is relative to this unit.
 
    s : Symbolic name of the NPC or Object to find.
 
    i : FIND_UNIT_XXX bit vector of places to search.
 
    return: A pointer to an instance of the unit, or null.
 
    Example: findsymbolic(self, "bread@midgaard", FIND_UNIT_INVEN)
 
 
    This routine supplements findroom, findunit and findsymbolic(#).  It comes in
 
    handy, if it is important to get a correct reference to a unit somewhere
 
    relative to 'u'.  If for example, Mary needs to check if she has her own
 
    cooking pot, then she should NOT use the findunit since it may locate a
 
    different pot, not belonging to Haon-Dor but to some other zone.  If she
 
    instead locates it using findsymbolic(self, "pot@haon_dor", FIND_UNIT_IN_ME)
 
    she would be certain that it is in fact her own cooking pot that she is
 
    carrying around, and not some other pot from a Joe Blow's zone.
 

Latest revision as of 19:35, 19 January 2021