Manual:DIL Manual/zoneptr

From DikuMUD Wiki
Jump to navigation Jump to search


Type:  zoneptr
Zone Pointer Fields


  next
         unitptr - pointer to next zoneptr
  previous
         unitptr - pointer to previous zone
  creators
         stringlist - list of creators
  name
         string - zone name (%zone)
  title
         string - zone title (title "")
  rooms
         unitptr - pointer to the base room
  objs
         unitptr - pointer to the base objects of the zone
  npcs
         unitptr - pointer to base NPCs of the zone
  resetmode
         integer- reset mode of zone in 'values.h'
  resettime
         integer - the reset time of the zone
  access
         integer - the access level of the zone
  loadlevel
         integer - the loadlevel of the zone
  payonly
         integer - the paystatus of the zone
  roomcount
         integer - the number of rooms in a zone
  objcount
         integer - the numbner of objects in a zone
  npccount
         integer - the number of npcs/mobiles in a zone
  fname
         string - the filename of a zone
  notes
         string - the Zone Notes
  help
         string - the Zone Help


  The 'zoneptr' works like a unitptr.  To get the first zoneptr in the global
list of zones you use 'zhead'.
Example: zoneptr := zhead();
Zone list command

---~---~---~---~---~---~---~---~---
dilbegin zonelist (arg:string);
var
 z:zoneptr;
 buf:string;
code
{
          z:=zhead();
          while (z)
          {
          buf:="Name:  "+z.name+"&n";
          buf:=buf+"Filename:  "+z.fname+"&n";
          buf:=buf+"Creator:  "+z.creators.[0]+"&n";
          buf:=buf+"Notes:  &n"+z.notes+"&n&n";
          z:=z.next;
          }
          pagestring (buf,self);
          quit;
}
dilend


---~---~---~---~---~---~---~---~---