GetName | ||
---|---|---|
Prototype | string GetName( srcChar, srcType ); | |
Purpose | Returns the name of the object srcChar. srcType == 0 indicates a character srcType == 1 indicates an item | |
Example of Usage | iName = GetName( srcChar, 0 ); |
SetName | ||
---|---|---|
Prototype | void SetName( srcChar, newName, srcType ); | |
Purpose | Sets the name of the object to newName. srcType == 0 indicates a character srcType == 1 indicates an item | |
Example of Usage | SetName( srcChar, "Abaddon", 0 ); |
GetTitle | ||
---|---|---|
Prototype | string GetTitle( srcChar ); | |
Purpose | Returns the title of srcChar | |
Example of Usage | sTitle = GetTitle( srcChar ); |
SetTitle | ||
---|---|---|
Prototype | void SetTitle( srcChar, newTitle ); | |
Purpose | Sets srcChar's title to newTitle | |
Example of Usage | SetTitle( srcChar, "Destroyer of Worlds" ); |
GetX | ||
---|---|---|
Prototype | short GetX( int trgChar, int type ); | |
Purpose | Returns the x location of trgChar Type == 0: Character Type == 1: Item | |
Example of Usage | trgX = GetX( srcChar, 0 ); |
GetY | ||
---|---|---|
Prototype | short GetY( int trgChar, int type ); | |
Purpose | Returns the y location of trgChar Type == 0: Character Type == 1: Item | |
Example of Usage | trgY = GetY( srcChar, 0 ); |
GetZ | ||
---|---|---|
Prototype | short GetZ( int trgChar, int type ); | |
Purpose | Returns the z location of trgChar Type == 0: Character Type == 1: Item | |
Example of Usage | stm = GetZ( srcChar, 0 ); |
SetLocation | ||
---|---|---|
Prototype | SetLocation( int trgChar, short targX, short targY, SCHAR targZ, int type ); | |
Purpose | Moves the character trgChar to (targX, targY, targZ ); Type == 0: Character Type == 1: Item | |
Example of Usage | SetLocation( srcChar, 1000, 1000, 0, 0 ); |
GetID | ||
---|---|---|
Prototype | short GetID( int trgItem, int type ); | |
Purpose | Returns the ID of the item type == 0: Char type == 1: Item | |
Example of Usage | iID = GetID( srcItem, 1 ); |
GetColour | ||
---|---|---|
Prototype | short GetColour( int trgItem, int type ); | |
Purpose | Returns the colour of trgItem type == 0: Char type == 1: Item | |
Example of Usage | iColour = GetColour( srcItem, 1 ); |
GetOwner | ||
---|---|---|
Prototype | int GetOwner( int trgItem, int type ); | |
Purpose | Returns the char (as index) that owns the item. -1 if no owner type == 0: Char type == 1: Item | |
Example of Usage | own = GetOwner( srcItem, 1 ); |
SetX | ||
---|---|---|
Prototype | SetX( trgObj, newXLoc, objType ); | |
Purpose | Sets trgObj's X location to newXLoc objType == 0: trgObj is a char objType == 1: trgObj is an item | |
Example of Usage | SetX( srcChar, 1000, 0 ); |
SetY | ||
---|---|---|
Prototype | SetY( trgObj, newYLoc, objType ); | |
Purpose | Sets trgObj's Y location to newYLoc objType == 0: trgObj is a char objType == 1: trgObj is an item | |
Example of Usage | SetY( srcChar, 1000, 0 ); |
SetZ | ||
---|---|---|
Prototype | SetZ( trgObj, newZLoc, objType ); | |
Purpose | Sets trgObj's Z location to newZLoc objType == 0: trgObj is a char objType == 1: trgObj is an item | |
Example of Usage | SetZ( srcChar, -8, 0 ); |
SetID | ||
---|---|---|
Prototype | SetID( trgObj, newID, objType ); | |
Purpose | Sets trgObj's ID to newID objType == 0: trgObj is a char objType == 1: trgObj is an item | |
Example of Usage | SetID( srcChar, 0x0190, 0 ); |
SetColour | ||
---|---|---|
Prototype | SetColour( trgObj, newColour, objType ); | |
Purpose | Sets trgObj's colour to newColour objType == 0: trgObj is a char objType == 1: trgObj is an item | |
Example of Usage | SetColour( srcChar, 0x0001, 0 ); |
SetOwner | ||
---|---|---|
Prototype | SetOwner( trgObj, newOwner, objType ); | |
Purpose | Set's trgObj's owner value to newOwner objType == 0: trgObj is a character objType == 1: trgObj is an item | |
Example of Usage | var nOwner = GetOwner( srcObj, 0 ); |
DoDamage | ||
---|---|---|
Prototype | DoDamage( trgObj, amtToDamage, objType ); | |
Purpose | Does amtToDamage amount of damage to trgObj objType == 0: trgObj is a char objType == 1 : trgObj is an item Doing a negative amount can heal | |
Example of Usage | DoDamage( trgObj, 5, 0 ); |
GetVisible | ||
---|---|---|
Prototype | int GetVisible( trgObj, objType ); | |
Purpose | Returns visibility of an object, varies depending on objType objType == 0: trgObj is a char, 0 indicates visible, 1 indicates hidden, 2 indicates stealth objType == 1: trgObj is an item, 0 indicates visible, 1 indicates owner/GM, 2 indicates GM only | |
Example of Usage | iVis = GetVisible( srcItem, 1 ); |
SetVisible | ||
---|---|---|
Prototype | SetVisible( trgObj, trgVis, objType ); | |
Purpose | Set's trgObj's visibility to trgVis objType == 0: trgObj is a char objType == 1: trgObj is an item | |
Example of Usage | SetVisible( srcChar, 0, 0 ); |
Delete | ||
---|---|---|
Prototype | Delete( trgObj, objType ); | |
Purpose | Delete's trgObj objType == 0: trgObj is a char objType == 1: trgObj is an item | |
Example of Usage | Delete( srcChar, 0 ); |
NewScriptTrigger | ||
---|---|---|
Prototype | NewScriptTrigger( trgObj, newTrigger, objType ); | |
Purpose | Sets trgObj's trigger to newTrigger objType == 0: trgObj is a character objType == 1: trgObj is an item | |
Example of Usage | NewScriptTrigger( trgChar, 0, 0 ); |
GetSerial | ||
---|---|---|
Prototype | int GetSerial( trgObj, objType ); | |
Purpose | Returns serial of an object objType == 0 indicates a character objType == 1 indicates an item | |
Example of Usage | iSerial = GetSerial( srcItem, 1 ); |
SetSerial | ||
---|---|---|
Prototype | SetSerial( trgObj, newSerial, objType ); | |
Purpose | Set's trgObj's serial to newSerial objType == 0: trgObj is a char objType == 1: trgObj is an item | |
Example of Usage | SetSerial( srcChar, 1, 0 ); |
GetHealth | ||
---|---|---|
Prototype | short GetHealth( trgChar, objType ); | |
Purpose | Returns the health of trgChar objType == 0 indicates a character objType == 1 indicates an item | |
Example of Usage | hp = GetHealth( srcChar, 0 ); |
SetHealth | ||
---|---|---|
Prototype | SetHealth( trgObj, newHealth, objType ); | |
Purpose | Sets the health of trgObj to newHealth objType == 0 indicates a character objType == 1 indicates an item | |
Example of Usage | SetHealth( srcChar, 0, 0 ); |
GetPrivateBit | ||
---|---|---|
Prototype | GetPrivateBit( tObj, objType, mWord, mBit ); | |
Purpose | Returns the mBit'th bit of the mWord'th word of tObj. If objType is 0, then tObj is a character, otherwise it's an item | |
Example of Usage | if( GetPrivateBit( iUsed, 1, 0, 0 ) ) // if first bit is set |
SetPrivateBit | ||
---|---|---|
Prototype | SetPrivateBit( tObj, objType, mWord, mBit, bOn ); | |
Purpose | Sets the mBit'th bit of the mWord'th word of tObj to 1 if bOn is true, otherwise 0. If objType is 0, then tObj is a character, otherwise it's an item | |
Example of Usage | SetPrivateBit( iUsed, 1, 0, 0, true ); |
GetPrivateWord | ||
---|---|---|
Prototype | GetPrivateBit( tObj, objType, mWord ); | |
Purpose | Returns the mWord'th word of tObj. If objType is 0, then tObj is a character, otherwise it's an item | |
Example of Usage | if( GetPrivateWord( iUsed, 1, 0 ) == 0 ) |
SetPrivateWord | ||
---|---|---|
Prototype | SetPrivateBit( tObj, objType, mWord, mVal ); | |
Purpose | Sets the mWord'th word of tObj to mVal. If objType is 0, then tObj is a character, otherwise it's an item | |
Example of Usage | SetPrivateWord( iUsed, 1, 0, 0 ); |
GetPrivateBitRange | ||
---|---|---|
Prototype | GetPrivateBitRange( tObj, objType, mWord, mLow, mHigh ); | |
Purpose | Returns the values of the bits mLow through mHigh of the mWord'th word of tObj. If objType is 0, then tObj is a character, otherwise it's an item | |
Example of Usage | if( GetPrivateBitRange( iUsed, 1, 0, 0, 7 ) == 0 ) |
SetPrivateBitRange | ||
---|---|---|
Prototype | SetPrivateBit( tObj, objType, mWord, mLow, mHigh, mVal ); | |
Purpose | Sets the bits mLow through mHigh of the mWord'th word of tObj to mVal. If objType is 0, then tObj is a character, otherwise it's an item | |
Example of Usage | SetPrivateBitRange( iUsed, 1, 0, 0, 7, 128 ); |
GetWorldNumber | ||
---|---|---|
Prototype | GetWorldNumber( tObj, objType ); | |
Purpose | Returns the world number that tObj is in. If objType is 0, then tObj is a char, otherwise it's an item. | |
Example of Usage | if( GetWorldNumber( pTalking, 0 ) == 2 ) |
©Copyright 2000-2001 WWW.UOX3.NET (Daniel Stratton/Matthew Randall)