Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.GetMappingItem


Name GetMappingItem
Type Method
Summary Gets one item from the auto-map sequence
Prototype VARIANT GetMappingItem(long Item);
Description

Returns one item from the auto-map sequence. You supply the item number that you want.

It should be in the range zero to the value returned by GetMappingCount, minus 1. If not, a NULL variant will be returned.

The item number is zero relative, so that if you have two items in the map sequence, they will be:

0: first item
1: second item

The returned value is a single string, with the forwards and reverse direction separated by a slash. For example:

north/south

VBscript example
world.note world.GetMappingItem (0)
Jscript example
world.note(world.GetMappingItem(0));
PerlScript example
$world->note($world->GetMappingItem(0));
Python example
world.note(world.GetMappingItem(0))
Lua example
Note(GetMappingItem(0))
Lua notes
Lua returns nil where applicable instead of an "empty variant" or "null variant".
Returns If the item number is less than zero, or greater than, or equal to, the number returned by GetMappingCount, then a NULL variant will be returned.

Otherwise, the contents of the appropriate map item will be returned. The forwards and reverse direction will be separated by the "/" character.

See also ...

Function Description
AddToMapper Adds a mapping direction to the auto-map sequence
DeleteAllMapItems Deletes the all items from the auto-mapper sequence.
DeleteLastMapItem Deletes the most recently-added item from the auto-mapper sequence.
GetMappingCount Gets a count of the number of items in the auto-map sequence
GetMappingString Returns the speedwalk string generated by the auto-mapper.
Mapping A flag to indicate whether we are mapping the world
RemoveMapReverses A flag to indicate whether we backtracks are removed during mapping

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.