Special Items

From SphereWiki
Revision as of 12:37, 6 June 2009 by MrSugarCube (talk | contribs)
Jump to: navigation, search

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.