Difference between revisions of "Special Items"

From SphereWiki
Jump to: navigation, search
(Created page with 'Certain types of items have extended functionality, and therefore have additional properties, functions or references to the ones already listed on the Items page. The follow...')
 
Line 5: Line 5:
 
Multis have a TYPE t_multi, t_multi_custom or t_ship. These are multi-piece items that are usually stored in the client's multi.mul file, but are only considered to be one item to both the server and client (so when you approach a castle, there is a significant reduction in lag since the server doesn't have to tell the client to display thousands of wall pieces).
 
Multis have a TYPE t_multi, t_multi_custom or t_ship. These are multi-piece items that are usually stored in the client's multi.mul file, but are only considered to be one item to both the server and client (so when you approach a castle, there is a significant reduction in lag since the server doesn't have to tell the client to display thousands of wall pieces).
  
===Properties and Functions with a Return Value===
+
===Properties and Functions===
Here is a list of all multi properties and functions that can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.
+
Here is a list of all multi properties and functions. If a function is marked as readable then it can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.
  
 
{| border="1" cellspacing="4" cellpadding="4"
 
{| border="1" cellspacing="4" cellpadding="4"
Line 14: Line 14:
 
|-
 
|-
 
| [[COMP]]''.n.key''' || R || Gets the KEY (ID,DX,DY,DZ,D) of the nth component defined in the ITEMDEF.
 
| [[COMP]]''.n.key''' || R || Gets the KEY (ID,DX,DY,DZ,D) of the nth component defined in the ITEMDEF.
|}
 
 
 
===Properties and Function without a Return Value===
 
Here is a list of all multi properties and functions that do not return a value. Click on the name for more detailed information such as usage and examples.
 
 
{| border="1" cellspacing="4" cellpadding="4"
 
| '''Name''' || '''Description'''
 
 
|-
 
|-
| [[MULTICREATE]] ''owner_uid'' || When a multi is created via SERV.NEWITEM, this function must be used to initialise the multi-region.
+
| [[MULTICREATE]] ''owner_uid'' || W || When a multi is created via SERV.NEWITEM, this function must be used to initialise the multi-region.
 
|}
 
|}
  
Line 40: Line 32:
  
  
===Properties and Functions with a Return Value===
+
===Properties and Functions===
Here is a list of all custom multi properties and functions that can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.
+
Here is a list of all custom multi properties and functions. If a function is marked as readable then it can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.
  
 
{| border="1" cellspacing="4" cellpadding="4"
 
{| border="1" cellspacing="4" cellpadding="4"
 
| '''Name''' || '''Read/Write''' || '''Description'''
 
| '''Name''' || '''Read/Write''' || '''Description'''
 
|-
 
|-
| [[COMPONENTS]] || R || Gets the number of components in the house design.
+
| [[ADDITEM]] ''item_id, dx, dy, dz'' || W || Adds an item to the house design.
 
|-
 
|-
| [[DESIGN]]''.n.KEY'' || R || Gets a property (ID,DX,DY,DZ,D,FIXTURE) from the nth component in the house design.
+
| [[ADDMULTI]] ''multi_id, dx, dy, dz'' || W || Adds a multi to the house design.
 
|-
 
|-
| [[EDITAREA]] || R || Gets the designable area rectangle of the multi (left,top,right,bottom)
+
| [[CLEAR]] || W || Removes all items from the house design.
 
|-
 
|-
| [[FIXTURES]] || R || Gets the number of fixtures in the house design.
+
| [[COMMIT]] || W || Commits all changes that have been made to the house design, updating the state of the building.
 
|-
 
|-
| [[REVISION]] || R || Gets the revision number of the house design.
+
| [[COMPONENTS]] || R || Gets the number of components in the house design.
|}
 
 
 
 
 
===Properties and Function without a Return Value===
 
Here is a list of all custom multi properties and functions that do not return a value. Click on the name for more detailed information such as usage and examples.
 
 
 
{| border="1" cellspacing="4" cellpadding="4"
 
| '''Name''' || '''Description'''
 
 
|-
 
|-
| [[ADDITEM]] ''item_id, dx, dy, dz'' || Adds an item to the house design.
+
| [[CUSTOMIZE]] ''character_uid'' || W || Enters the building into edit mode for the specified character (or SRC).
 
|-
 
|-
| [[ADDMULTI]] ''multi_id, dx, dy, dz'' || Adds a multi to the house design.
+
| [[DESIGN]]''.n.KEY'' || R || Gets a property (ID,DX,DY,DZ,D,FIXTURE) from the nth component in the house design.
 
|-
 
|-
| [[CLEAR]] || Removes all items from the house design.
+
| [[EDITAREA]] || R || Gets the designable area rectangle of the multi (left,top,right,bottom)
 
|-
 
|-
| [[COMMIT]] || Commits all changes that have been made to the house design, updating the state of the building.
+
| [[ENDCUSTOMIZE]] || W || Exits the current designer from edit mode.
 
|-
 
|-
| [[CUSTOMIZE]] ''character_uid'' || Enters the building into edit mode for the specified character (or SRC).
+
| [[FIXTURES]] || R || Gets the number of fixtures in the house design.
 
|-
 
|-
| [[ENDCUSTOMIZE]] || Exits the current designer from edit mode.
+
| [[REMOVEITEM]] ''item_id, dx, dy, dz'' || W || Removes an item from the house design.
 
|-
 
|-
| [[REMOVEITEM]] ''item_id, dx, dy, dz'' || Removes an item from the house design.
+
| [[RESET]] || W || Resets the house design back to the house foundation.
 
|-
 
|-
| [[RESET]] || Resets the house design back to the house foundation.
+
| [[RESYNC]] ''character_uid'' || W || Resends the current building state to the specified character (or SRC).
 
|-
 
|-
| [[RESYNC]] ''character_uid'' || Resends the current building state to the specified character (or SRC).
+
| [[REVERT]] || W || Undoes all of the changes made to the house design since the last commit.
 
|-
 
|-
| [[REVERT]] || Undoes all of the changes made to the house design since the last commit.
+
| [[REVISION]] || R || Gets the revision number of the house design.
 
|}
 
|}
  
Line 103: Line 87:
  
  
===Properties and Functions with a Return Value===
+
===Properties and Functions===
Here is a list of all ship properties and functions that can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.
+
Here is a list of all ship properties and functions. If a function is marked as readable then it can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.
  
 
{| border="1" cellspacing="4" cellpadding="4"
 
{| border="1" cellspacing="4" cellpadding="4"
Line 111: Line 95:
 
| [[PLANKS]] || R || Gets the number of planks on the ship.
 
| [[PLANKS]] || R || Gets the number of planks on the ship.
 
|-
 
|-
| [[SHIPSPEED]].TILES || R || Gets the number of tiles that ths ship moves in one step.
+
| [[SHIPANCHORDROP]] || W || Drops the ship's anchor, preventing it from moving.
 +
|-
 +
| [[SHIPANCHORRAISE]] || W || Raises the ship's anchor, allowing it to move.
 +
|-
 +
| [[SHIPBACK]] || W || Begins moving the ship backwards.
 +
|-
 +
| [[SHIPBACKLEFT]] || W || Begins moving the ship backwards and to its left.
 +
|-
 +
| [[SHIPBACKRIGHT]] || W || Begins moving the ship backwards and to its right.
 +
|-
 +
| [[SHIPDOWN]] || W || Begins moving the ship downards, if ATTR_MAGIC is set.
 +
|-
 +
| [[SHIPDRIFTLEFT]] || W || Begins moving the ship to its left.
 
|-
 
|-
| [[SHIPSPEED]].PERIOD || R || Gets the length of time between each step, in tenths of a second.
+
| [[SHIPDRIFTRIGHT]] || W || Begins moving the ship to its right.
|}
 
 
 
 
 
===Properties and Function without a Return Value===
 
Here is a list of all ship properties and functions that do not return a value. Click on the name for more detailed information such as usage and examples.
 
 
 
{| border="1" cellspacing="4" cellpadding="4"
 
| '''Name''' || '''Description'''
 
 
|-
 
|-
| [[SHIPANCHORDROP]] || Drops the ship's anchor, preventing it from moving.
+
| [[SHIPFACE]] ''direction'' || W || Sets the direction of the ship.
 
|-
 
|-
| [[SHIPANCHORRAISE]] || Raises the ship's anchor, allowing it to move.
+
| [[SHIPFORE]] || W || Begins moving the ship forwards.
 
|-
 
|-
| [[SHIPBACK]] || Begins moving the ship backwards.
+
| [[SHIPFORELEFT]] || W || Begins moving the ship forwards and to its left.
 
|-
 
|-
| [[SHIPBACKLEFT]] || Begins moving the ship backwards and to its left.
+
| [[SHIPFORERIGHT]] || W || Begins moving the ship forwards and to its right.
 
|-
 
|-
| [[SHIPBACKRIGHT]] || Begins moving the ship backwards and to its right.
+
| [[SHIPGATE]] ''location'' || W || Moves the entire ship and its contents to a specified location.
 
|-
 
|-
| [[SHIPDOWN]] || Begins moving the ship downards, if ATTR_MAGIC is set.
+
| [[SHIPLAND]] || W || Moves the ship to ground level, if ATTR_MAGIC is set.
 
|-
 
|-
| [[SHIPDRIFTLEFT]] || Begins moving the ship to its left.
+
| [[SHIPMOVE]] ''direction'' || W || Begins moving the ship in the specified direction.
 
|-
 
|-
| [[SHIPDRIFTRIGHT]] || Begins moving the ship to its right.
+
| [[SHIPSPEED]].TILES || R || Gets the number of tiles that ths ship moves in one step.
 
|-
 
|-
| [[SHIPFACE]] ''direction'' || Sets the direction of the ship.
+
| [[SHIPSPEED]].PERIOD || R || Gets the length of time between each step, in tenths of a second.
 
|-
 
|-
| [[SHIPFORE]] || Begins moving the ship forwards.
+
| [[SHIPSTOP]] || W || Stops the ship.
 
|-
 
|-
| [[SHIPFORELEFT]] || Begins moving the ship forwards and to its left.
+
| [[SHIPTURN]] || W || Turns the ship to face the opposite direction.
 
|-
 
|-
| [[SHIPFORERIGHT]] || Begins moving the ship forwards and to its right.
+
| [[SHIPTURNLEFT]] || W || Rotates the ship to its left.
 
|-
 
|-
| [[SHIPGATE]] ''location'' || Moves the entire ship and its contents to a specified location.
+
| [[SHIPTURNRIGHT]] || W || Rotates the ship to its right.
 
|-
 
|-
| [[SHIPLAND]] || Moves the ship to ground level, if ATTR_MAGIC is set.
+
| [[SHIPUP]] || W || Begins moving the ship upwards, if ATTR_MAGIC is set.
 +
|}
 +
 
 +
 
 +
==Maps==
 +
The TYPEs t_map and t_map_blank are used to represent maps. These display a map to the player when used, that can be marked with a series of pins (markers) to plot a route.
 +
 
 +
===Properties and Functions===
 +
Here is a list of all map properties and functions. If a function is marked as readable then it can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.
 +
 
 +
{| border="1" cellspacing="4" cellpadding="4"
 +
| '''Name''' || '''Read/Write''' || '''Description'''
 +
|-
 +
| [[PIN]]''.n'' <br /> [[PIN]] ''x, y'' || RW || Gets the position of the ''nth'' pin (zero-based), or adds a pin to the map at the specified location.
 +
|}
 +
 
 +
 
 +
==Messages / Books==
 +
Messages (t_message) and books (t_book) possess a range of properties and functions that are used to store their title, author and body text.
 +
 
 +
===Properties and Functions===
 +
Here is a list of all message properties and functions. If a function is marked as readable then it can return a value when used as &lt;KEY&gt;. Click on the name for more detailed information such as usage and examples.
 +
 
 +
{| border="1" cellspacing="4" cellpadding="4"
 +
| '''Name''' || '''Read/Write''' || '''Description'''
 
|-
 
|-
| [[SHIPMOVE]] ''direction'' || Begins moving the ship in the specified direction.
+
| [[BODY]]''.n'' || RW || Gets the nth line of text from the message, or sets the entire message text.
 
|-
 
|-
| [[SHIPSTOP]] || Stops the ship.
+
| [[AUTHOR]] || RW || Gets or sets the author of the message.
 
|-
 
|-
| [[SHIPTURN]] || Turns the ship to face the opposite direction.
+
| [[ERASE]] ''page_num'' || W || Removes all lines of text from the message, or if a page number (one-based) if supplied erases just a single line.
 
|-
 
|-
| [[SHIPTURNLEFT]] || Rotates the ship to its left.
+
| [[PAGE]]''.n'' || W || Sets the text of the nth single line of the message. (zero-based)
 
|-
 
|-
| [[SHIPTURNRIGHT]] || Rotates the ship to its right.
+
| [[PAGES]] || R || Gets the number of lines of text in the message.
 
|-
 
|-
| [[SHIPUP]] || Begins moving the ship upwards, if ATTR_MAGIC is set.
+
| [[TITLE]] || RW || Gets or sets the title of message.
 
|}
 
|}
 +
  
 
[[Category: Reference Compendium]]
 
[[Category: Reference Compendium]]

Revision as of 12:37, 6 June 2009

Certain types of items have extended functionality, and therefore have additional properties, functions or references to the ones already listed on the Items page. The following sections describe what these are.


Multis

Multis have a TYPE t_multi, t_multi_custom or t_ship. These are multi-piece items that are usually stored in the client's multi.mul file, but are only considered to be one item to both the server and client (so when you approach a castle, there is a significant reduction in lag since the server doesn't have to tell the client to display thousands of wall pieces).

Properties and Functions

Here is a list of all multi properties and functions. If a function is marked as readable then it can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.

Name Read/Write Description
COMP R Gets the number of components defined in the ITEMDEF.
COMP.n.key' R Gets the KEY (ID,DX,DY,DZ,D) of the nth component defined in the ITEMDEF.
MULTICREATE owner_uid W When a multi is created via SERV.NEWITEM, this function must be used to initialise the multi-region.


Customizable Multis

Customizable multis are represented by the TYPE of t_multi_custom. These are designed to be used with the AOS House Designer tool that is present since the 4.0.0 series of UO clients.

References

References return pointers to other objects (e.g. the REGION reference allows you to access the REGION that an object is in). These can either be accessed by using <REFNAME> to return the UID (1 for object types that don't have UIDs) of the object or 0 if it doesn't exist, or by using <REFNAME.KEY> where KEY is a valid property/function/reference for the REFNAME object. Click on the name for more detailed information such as usage and examples.

Name Read/Write Description
DESIGNER R Gets the character currently modifying the house design.


Properties and Functions

Here is a list of all custom multi properties and functions. If a function is marked as readable then it can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.

Name Read/Write Description
ADDITEM item_id, dx, dy, dz W Adds an item to the house design.
ADDMULTI multi_id, dx, dy, dz W Adds a multi to the house design.
CLEAR W Removes all items from the house design.
COMMIT W Commits all changes that have been made to the house design, updating the state of the building.
COMPONENTS R Gets the number of components in the house design.
CUSTOMIZE character_uid W Enters the building into edit mode for the specified character (or SRC).
DESIGN.n.KEY R Gets a property (ID,DX,DY,DZ,D,FIXTURE) from the nth component in the house design.
EDITAREA R Gets the designable area rectangle of the multi (left,top,right,bottom)
ENDCUSTOMIZE W Exits the current designer from edit mode.
FIXTURES R Gets the number of fixtures in the house design.
REMOVEITEM item_id, dx, dy, dz W Removes an item from the house design.
RESET W Resets the house design back to the house foundation.
RESYNC character_uid W Resends the current building state to the specified character (or SRC).
REVERT W Undoes all of the changes made to the house design since the last commit.
REVISION R Gets the revision number of the house design.


Ships

Ships have the TYPE t_ship, and are another extended version of multis that are designed to be used to sail around the world.

References

References return pointers to other objects (e.g. the REGION reference allows you to access the REGION that an object is in). These can either be accessed by using <REFNAME> to return the UID (1 for object types that don't have UIDs) of the object or 0 if it doesn't exist, or by using <REFNAME.KEY> where KEY is a valid property/function/reference for the REFNAME object. Click on the name for more detailed information such as usage and examples.

Name Read/Write Description
HATCH R Gets the ship's hatch.
TILLER R Gets the ship's tiller.
PLANK.n R Gets the nth ship plank.


Properties and Functions

Here is a list of all ship properties and functions. If a function is marked as readable then it can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.

Name Read/Write Description
PLANKS R Gets the number of planks on the ship.
SHIPANCHORDROP W Drops the ship's anchor, preventing it from moving.
SHIPANCHORRAISE W Raises the ship's anchor, allowing it to move.
SHIPBACK W Begins moving the ship backwards.
SHIPBACKLEFT W Begins moving the ship backwards and to its left.
SHIPBACKRIGHT W Begins moving the ship backwards and to its right.
SHIPDOWN W Begins moving the ship downards, if ATTR_MAGIC is set.
SHIPDRIFTLEFT W Begins moving the ship to its left.
SHIPDRIFTRIGHT W Begins moving the ship to its right.
SHIPFACE direction W Sets the direction of the ship.
SHIPFORE W Begins moving the ship forwards.
SHIPFORELEFT W Begins moving the ship forwards and to its left.
SHIPFORERIGHT W Begins moving the ship forwards and to its right.
SHIPGATE location W Moves the entire ship and its contents to a specified location.
SHIPLAND W Moves the ship to ground level, if ATTR_MAGIC is set.
SHIPMOVE direction W Begins moving the ship in the specified direction.
SHIPSPEED.TILES R Gets the number of tiles that ths ship moves in one step.
SHIPSPEED.PERIOD R Gets the length of time between each step, in tenths of a second.
SHIPSTOP W Stops the ship.
SHIPTURN W Turns the ship to face the opposite direction.
SHIPTURNLEFT W Rotates the ship to its left.
SHIPTURNRIGHT W Rotates the ship to its right.
SHIPUP W Begins moving the ship upwards, if ATTR_MAGIC is set.


Maps

The TYPEs t_map and t_map_blank are used to represent maps. These display a map to the player when used, that can be marked with a series of pins (markers) to plot a route.

Properties and Functions

Here is a list of all map properties and functions. If a function is marked as readable then it can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.

Name Read/Write Description
PIN.n
PIN x, y
RW Gets the position of the nth pin (zero-based), or adds a pin to the map at the specified location.


Messages / Books

Messages (t_message) and books (t_book) possess a range of properties and functions that are used to store their title, author and body text.

Properties and Functions

Here is a list of all message properties and functions. If a function is marked as readable then it can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.

Name Read/Write Description
BODY.n RW Gets the nth line of text from the message, or sets the entire message text.
AUTHOR RW Gets or sets the author of the message.
ERASE page_num W Removes all lines of text from the message, or if a page number (one-based) if supplied erases just a single line.
PAGE.n W Sets the text of the nth single line of the message. (zero-based)
PAGES R Gets the number of lines of text in the message.
TITLE RW Gets or sets the title of message.