Difference between revisions of "Manual:DIL Manual/zoneptr"

From DikuMUD Wiki
Jump to navigation Jump to search
(XML import)
 
Line 1: Line 1:
 +
==zoneptr==
 +
Type:  zoneptr
  
 +
A pointer to a zone.
  
<span id="zptr"></span>
+
===Zone Pointer Fields===
  
  '''Type: '''<i><!--CODE-->zoneptr</i><!--ENDCODE-->
+
  '''next'''
  '''Zone Pointer Fields'''
+
    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
  
  
<!--TERM-->  '''next'''
+
The 'zoneptr' works like a unitptr. To get the first zoneptr in the global list of zones you use 'zhead'.
<!--DEFINITION-->        unitptr - pointer to next zoneptr
 
<!--TERM-->  '''previous'''
 
<!--DEFINITION-->        unitptr - pointer to previous zone
 
<!--TERM-->  '''creators'''
 
<!--DEFINITION-->        stringlist - list of creators
 
<!--TERM-->  '''name'''
 
<!--DEFINITION-->        string - zone name (%zone)
 
<!--TERM-->  '''title'''
 
<!--DEFINITION-->        string - zone title (title "")
 
<!--TERM-->  '''rooms'''
 
<!--DEFINITION-->        unitptr - pointer to the base room
 
<!--TERM-->  '''objs'''
 
<!--DEFINITION-->        unitptr - pointer to the base objects of the zone
 
<!--TERM-->  '''npcs'''
 
<!--DEFINITION-->        unitptr - pointer to base NPCs of the zone
 
<!--TERM-->  '''resetmode'''
 
<!--DEFINITION-->        integer- reset mode of zone in 'values.h'
 
<!--TERM-->  '''resettime'''
 
<!--DEFINITION-->        integer - the reset time of the zone
 
<!--TERM-->  '''access'''
 
<!--DEFINITION-->        integer - the access level of the zone
 
<!--TERM-->  '''loadlevel'''
 
<!--DEFINITION-->        integer - the loadlevel of the zone
 
<!--TERM-->  '''payonly'''
 
<!--DEFINITION-->        integer - the paystatus of the zone
 
<!--TERM-->  '''roomcount'''
 
<!--DEFINITION-->        integer - the number of rooms in a zone
 
<!--TERM-->  '''objcount'''
 
<!--DEFINITION-->        integer - the numbner of objects in a zone
 
<!--TERM-->  '''npccount'''
 
<!--DEFINITION-->        integer - the number of npcs/mobiles in a zone
 
<!--TERM-->  '''fname'''
 
<!--DEFINITION-->        string - the filename of a zone
 
<!--TERM-->  '''notes'''
 
<!--DEFINITION-->        string - the Zone Notes
 
<!--TERM-->  '''help'''
 
<!--DEFINITION-->        string - the Zone Help
 
  
 
+
=== example ===
  The 'zoneptr' works like a unitptr.  To get the first zoneptr in the global
+
  dilbegin zonelist (arg:string);
list of zones you use 'zhead'.
+
  var
'''Example: '''<i><!--CODE-->zoneptr := zhead();</i><!--ENDCODE-->
+
    z:zoneptr;
'''Zone list command'''
+
    buf:string;
<i><!--CODE-->
+
  code
---~---~---~---~---~---~---~---~---
+
  {
 
+
    z:=zhead();
dilbegin zonelist (arg:string);
+
    while (z)
var
+
    {
  z:zoneptr;
+
      buf:="Name:  "+z.name+"&amp;n";
  buf:string;
+
      buf:=buf+"Filename:  "+z.fname+"&amp;n";
code
+
      buf:=buf+"Creator:  "+z.creators.[0]+"&amp;n";
{
+
      buf:=buf+"Notes:  &amp;n"+z.notes+"&amp;n&amp;n";
          z:=zhead();
+
      z:=z.next;
          while (z)
+
    }
          {
+
    pagestring (buf,self);
          buf:="Name:  "+z.name+"&amp;n";
+
    quit;
          buf:=buf+"Filename:  "+z.fname+"&amp;n";
 
          buf:=buf+"Creator:  "+z.creators.[0]+"&amp;n";
 
          buf:=buf+"Notes:  &amp;n"+z.notes+"&amp;n&amp;n";
 
          z:=z.next;
 
          }
 
 
 
          pagestring (buf,self);
 
          quit;
 
 
  }
 
  }
 
  dilend
 
  dilend
 
 
 
---~---~---~---~---~---~---~---~---
 
 
</i><!--ENDCODE-->
 

Revision as of 10:54, 29 November 2025

zoneptr

Type: zoneptr

A pointer to a zone.

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

 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