UOX3 Script Engine

API and Event handling

Multi Functions

FindMulti
ProtoType
multiID FindMulti( x, y, z, worldNumber );
PurposeFinds the multi that is in the area of the coordinates (x, y, z) in world worldNumber (0 == Britannia, 2 == ilshenar)
Example of Usage
var iMulti = FindMulti( GetX( pTalking, 0 ), GetY( pTalking, 0 ), GetZ( pTalking, 0 ) );

if( iMulti != -1 )
{
TextMessage( pTalking, "You know, I'm standing in a house!" );
}

 

IsInMulti
ProtoType
bool IsInMulti( multiID, object, objType );
PurposeReturns true if the object (objType == 0 indicates character, objType == 1 indicates item) is in the multi multiID.
Example of Usage
var iMulti = FindMulti( GetX( pTalking, 0 ), GetY( pTalking, 0 ), GetZ( pTalking, 0 ) );

if( IsInMulti( iMulti, pTalkingTo, 0 ) )
{
TextMessage( pTalking, "I can see you, you're in here with me!" );
}

 

IsOnBanList
ProtoType
bool IsOnBanList( multiID, pChar );
PurposeReturns true if the character pChar is on multiID's ban list
Example of Usage
var iMulti = FindMulti( GetX( pTalking, 0 ), GetY( pTalking, 0 ), GetZ( pTalking, 0 ) );

if( IsOnBanList( iMulti, pTalkingTo ) )
{
TextMessage( pTalking, "Out of my house, spawn of satan!" );
}

 

IsOnOwnerList
ProtoType
bool IsOnOwnerList( multiID, pChar );
PurposeReturns true if the character pChar is an owner of multiID
Example of Usage
var iMulti = FindMulti( GetX( pTalking, 0 ), GetY( pTalking, 0 ), GetZ( pTalking, 0 ) );

if( IsOnOwnerList( iMulti, pTalkingTo ) )
{
TextMessage( pTalking, "Welcome to my house, fellow owner" );
}

 

AddToBanList
ProtoType
bool AddToBanList( multiID, pChar );
PurposeAdds the character pChar to the multiID's ban list. Returns true if the parameters are valid.
Example of Usage
var iMulti = FindMulti( GetX( pTalking, 0 ), GetY( pTalking, 0 ), GetZ( pTalking, 0 ) );

TextMessage( pTalking, "Out of my house, now!" );
AddToBanList( iMulti, pTalkingTo );

 

AddToOwnerList
ProtoType
bool AddToOwnerList( multiID, pChar );
PurposeAdds pChar to the multiID's owner list. Doesn't remove existing owners at all. Won't duplicate if already on the list.
Example of Usage
var iMulti = FindMulti( GetX( pTalkingTo, 0 ), GetY( pTalkingTo, 0 ), GetZ( pTalkingTo, 0 ) );

TextMessage( pTalkingTo, "Awww, cause you spoke to me, I'll add you as an owner" );
AddToOwnerList( iMulti, pTalking );

 

RemoveFromBanList
ProtoType
bool RemoveFromBanList( multiID, pChar );
PurposeRemoves pChar from multiID's ban list. Returns true on correct parameters.
Example of Usage
var iMulti = FindMulti( GetX( pTalkingTo, 0 ), GetY( pTalkingTo, 0 ), GetZ( pTalkingTo, 0 ) );

TextMessage( pTalkingTo, "As you have repented, I shall allow thee to come back in" );
RemoveFromBanList( iMulti, pTalking );

 

RemoveFromOwnerList
ProtoType
bool RemoveFromOwnerList( multiID, pChar );
PurposeRemoves pChar from multiID's owner list. Returns true on correct parameters.
Example of Usage
var iMulti = FindMulti( GetX( pTalkingTo, 0 ), GetY( pTalkingTo, 0 ), GetZ( pTalkingTo, 0 ) );

TextMessage( pTalkingTo, "You have betrayed my trust, and so you must leave" );
RemoveFromOwnerList( iMulti, pTalking );

 

IsMulti
ProtoType
bool IsMulti( iToCheck );
PurposeReturns true if the item iToCheck is actually a multi
Example of Usage
if( IsMulti( GetCharPack( pTalking ) ) )

{
TextMessage( pTalkingTo, "Sir, do you realize you have a house on your back?" );
}
ęCopyright 2000-2001 WWW.UOX3.NET (Daniel Stratton/Matthew Randall)