FindMulti | ||
---|---|---|
ProtoType | multiID FindMulti( ourObj ); multiID FindMulti( x, y, z, worldNumber ); multiID FindMulti( x, y, z, worldNumber, instanceID ); | |
Purpose | Finds the multi that is in the area of the coordinates (x, y, z) in world worldNumber (0 == Britannia, 2 == ilshenar) in instanceID (optional), or in the area of the specified object | |
Example of Usage | var iMulti = FindMulti( pChar ); if( iMulti ) { pChar.TextMessage( "You know, I'm standing in the same spot as a multi!" ); } var iMulti = FindMulti( myItem.x, myItem.y, myItem.z, myItem.worldnumber ); if( iMulti ) { myItem.TextMessage( "I am an item, in the same spot as a multi!" ); } |
IsInMulti | ||
---|---|---|
ProtoType | bool IsInMulti( ourObj ); | |
Purpose | Returns true if the object is in the multi. | |
Example of Usage | var iMulti = FindMulti( ourObj.x, ourObj.y, ourObj.z, pChar.worldnumber ); if( iMulti ) { if( iMulti.IsInMulti( ourObj ) ) { ourObj.TextMessage( "I am in a multi!" ); } { |
IsMulti | ||
---|---|---|
ProtoType | bool IsMulti(); | |
Purpose | Returns true if the item iToCheck is actually a multi | |
Example of Usage | if( iToCheck.IsMulti() ) { pUser.TextMessage( "Yep, it's definitely a multi." ); } |
IsBoat | ||
---|---|---|
ProtoType | bool IsBoat(); | |
Purpose | Returns true if the item iToCheck is actually a boat | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); if( iMulti.IsBoat() ) { pUser.TextMessage( "Yep, it's definitely a boat." ); } |
IsOwner | ||
---|---|---|
ProtoType | bool IsOwner( pUser ); | |
Purpose | Returns true if specified character is the owner of the multi | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); if( iMulti.IsOwner( pUser ) ) { pUser.TextMessage( "Yep, I'm the owner of this multi!." ); } |
IsOnBanList | ||
---|---|---|
ProtoType | bool IsOnBanList( pChar ); | |
Purpose | Returns true if the character pChar is on the multi's ban list | |
Example of Usage | var iMulti = FindMulti( ourObj.x, ourObj.y, ourObj.z, pChar.worldnumber ); if( iMulti.IsOnBanList( pChar )) { pChar.TextMessage( "Oops, I appear to be on the banlist of this house!" ); } |
IsOnOwnerList | ||
---|---|---|
ProtoType | bool IsOnOwnerList( pChar ); | |
Purpose | Returns true if the character pChar is an owner of the multi | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); if( iMulti.IsOnOwnerList( pChar )) { pChar.TextMessage( "Ahh, I appear to be on the owner-list of this house!" ); } |
IsOnFriendList | ||
---|---|---|
ProtoType | bool IsOnFriendList( pChar ); | |
Purpose | Returns true if the character pChar is on the friend list of the multi | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); if( iMulti.IsOnFriendList( pChar )) { pChar.TextMessage( "Ahh, I appear to be on the friend-list of this house!" ); } |
IsOnGuestList | ||
---|---|---|
ProtoType | bool IsOnGuestList( pChar ); | |
Purpose | Returns true if the character pChar is on the guest list of the multi | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); if( iMulti.IsOnGuestList( pChar )) { pChar.TextMessage( "Ahh, I appear to be on the guest-list of this house!" ); } |
AddToBanList | ||
---|---|---|
ProtoType | bool AddToBanList( pChar ); | |
Purpose | Adds the character pChar to the multi's ban list. Returns true if the parameters are valid. | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); pChar.TextMessage( "I'm getting banned from this house!" ); iMulti.AddToBanList( pChar ); |
AddToOwnerList | ||
---|---|---|
ProtoType | bool AddToOwnerList( pChar ); | |
Purpose | Adds the character pChar to the multi's owner list. Doesn't remove existing owners at all. Won't duplicate if already on the list. | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); pChar.TextMessage( "Awww, I'm being added as an owner of this house!" ); iMulti.AddToOwnerList( pChar ); |
AddToFriendList | ||
---|---|---|
ProtoType | bool AddToFriendList( pChar ); | |
Purpose | Adds the character pChar to the multi's friend list. Won't duplicate if already on the list. | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); pChar.TextMessage( "Awww, I'm being added as a friend of this house!" ); iMulti.AddToFriendList( pChar ); |
AddToGuestList | ||
---|---|---|
ProtoType | bool AddToGuestList( pChar ); | |
Purpose | Adds the character pChar to the multi's guest list. Won't duplicate if already on the list. | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); pChar.TextMessage( "Awww, I'm being added as a guest of this house!" ); iMulti.AddToGuestList( pChar ); |
RemoveFromBanList | ||
---|---|---|
ProtoType | bool RemoveFromBanList( pChar ); | |
Purpose | Removes pChar from the multi's ban list. Returns true on correct parameters. | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); pChar.TextMessage( "Yay! I've been removed from the ban-list of this house!" ); iMulti.RemoveFromBanList( pChar ); |
RemoveFromOwnerList | ||
---|---|---|
ProtoType | bool RemoveFromOwnerList( pChar ); | |
Purpose | Removes pChar from the multi's owner list. Returns true on correct parameters. | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); pChar.TextMessage( "Oops! I am being removed as owner of this house!" ); iMulti.RemoveFromOwnerList( pChar ); |
RemoveFromFriendList | ||
---|---|---|
ProtoType | bool RemoveFromFriendList( pChar ); | |
Purpose | Removes pChar from the multi's friend list. Returns true on correct parameters. | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); pChar.TextMessage( "Oops! I am being removed as a friend of this house!" ); iMulti.RemoveFromFriendList( pChar ); |
RemoveFromGuestList | ||
---|---|---|
ProtoType | bool RemoveFromGuestList( pChar ); | |
Purpose | Removes pChar from the multi's guest list. Returns true on correct parameters. | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); pChar.TextMessage( "Oops! I am being removed as a guest of this house!" ); iMulti.RemoveFromGuestList( pChar ); |
ClearOwnerList | ||
---|---|---|
ProtoType | bool ClearOwnerList( pChar ); | |
Purpose | Clears all players from multi's co-owner list | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); iMulti.ClearOwnerList( pChar ); |
ClearFriendList | ||
---|---|---|
ProtoType | bool ClearFriendList( pChar ); | |
Purpose | Clears all players from multi's friend list | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); iMulti.ClearFriendList( pChar ); |
ClearGuestList | ||
---|---|---|
ProtoType | bool ClearGuestList( pChar ); | |
Purpose | Clears all players from multi's guest list | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); iMulti.ClearGuestList( pChar ); |
ClearBanList | ||
---|---|---|
ProtoType | bool ClearBanList( pChar ); | |
Purpose | Clears all players from multi's banlist | |
Example of Usage | var iMulti = FindMulti( pChar.x, pChar.y, pChar.z, pChar.worldnumber ); iMulti.ClearBanList( pChar ); |
SecureContainer | ||
---|---|---|
ProtoType | bool SecureContainer( myTarget ); | |
Purpose | Turns specified container into a secure container | |
Example of Usage | var iMulti = FindMulti( myTarget.x, myTarget.y, myTarget.z, myTarget.worldnumber ); iMulti.SecureContainer( myTarget ); |
UnsecureContainer | ||
---|---|---|
ProtoType | bool UnsecureContainer( myTarget ); | |
Purpose | Turns specified container from a secure container to a regular container | |
Example of Usage | var iMulti = FindMulti( myTarget.x, myTarget.y, myTarget.z, myTarget.worldnumber ); iMulti.UnsecureContainer( myTarget ); |
IsSecureContainer | ||
---|---|---|
ProtoType | bool IsSecureContainer( myTarget ); | |
Purpose | Checks if specified item is a secure container in the multi | |
Example of Usage | var iMulti = FindMulti( myTarget.x, myTarget.y, myTarget.z, myTarget.worldnumber ); var isSecure = iMulti.IsSecureContainer( myTarget ); if( iSecure ) pChar.TextMessage( "Container is secure!" ); |
LockDownItem | ||
---|---|---|
ProtoType | bool LockDownItem( myTarget ); | |
Purpose | Locks down targeted item in multi | |
Example of Usage | var iMulti = FindMulti( myTarget.x, myTarget.y, myTarget.z, myTarget.worldnumber ); iMulti.LockDownItem( myTarget ); |
ReleaseItem | ||
---|---|---|
ProtoType | bool ReleaseItem( myTarget ); | |
Purpose | Releases targeted item in multi from lockdown | |
Example of Usage | var iMulti = FindMulti( myTarget.x, myTarget.y, myTarget.z, myTarget.worldnumber ); iMulti.ReleaseItem( myTarget ); |
KillKeys | ||
---|---|---|
ProtoType | bool KillKeys(); bool KillKeys( characterSerial ); | |
Purpose | Deletes ALL keys associated with a multi, or all keys owned by a specific character | |
Example of Usage | var iMulti = FindMulti( pUser.x, pUser.y, pUser.z, pUser.worldnumber ); // Kill all keys that match house iMulti.KillKeys(); // Kill all keys for this house owned by pUser iMulti.KillKeys( pUser ); |
AddTrashCont | ||
---|---|---|
ProtoType | bool AddTrashCont( trashContObj ); | |
Purpose | Add trash container to multi's list of trash containers | |
Example of Usage | var iMulti = FindMulti( trashContObj.x, trashContObj.y, trashContObj.z, trashContObj.worldnumber ); iMulti.AddTrashCont( trashContObj ); |
RemoveTrashCont | ||
---|---|---|
ProtoType | bool RemoveTrashCont( trashContObj ); | |
Purpose | Remove trash container from multi's list of trash containers | |
Example of Usage | var iMulti = FindMulti( trashContObj.x, trashContObj.y, trashContObj.z, trashContObj.worldnumber ); iMulti.RemoveTrashCont( trashContObj ); |
FirstChar | ||
---|---|---|
Prototype | void FirstChar(); | |
Purpose | Returns a handle to the first character in the multi. If it's null, then there are no characters inside. An optional parameter is supported by both FirstChar, NextChar and FinishedChar to specify the type of characters to look for... options are none (find all chars), "owner", "friend", "guest" or "banned". | |
Example of Usage | function onUseChecked( pUser, iUsed ) { var iMulti = pUser.multi; var mChar; for( mChar = iMulti.FirstChar(); !iMulti.FinishedChar(); mChar = iMulti.NextChar() ) { if( mChar != null ) { mChar.TextMessage( "I'm a character in this multi!" ); } } } function onUseChecked( pUser, iUsed ) { var iMulti = pUser.multi; var mChar; for( mChar = iMulti.FirstChar( "owner" ); !iMulti.FinishedChar( "owner" ); mChar = iMulti.NextChar( "owner" ) ) { if( mChar != null ) { mChar.TextMessage( "I'm one of the owners of this multi!" ); } } } |
NextChar | ||
---|---|---|
Prototype | void NextChar(); | |
Purpose | Returns the next item found in the container (or multi) | |
Example of Usage | SEE ABOVE FUNCTION |
FinishedChar | ||
---|---|---|
Prototype | bool FinishedChar(); | |
Purpose | Returns true if there are no more items left to look through in the container (or multi) | |
Example of Usage | SEE ABOVE FUNCTION |
GetMultiCorner | ||
---|---|---|
Prototype | bool GetMultiCorner( cornerID ); | |
Purpose | Gets coordinates for specified corner of multi ( 0 = NW corner, 1 = NE corner, 2 = SW corner, 3 = SE corner) | |
Example of Usage | var multiCornerCoords = (iMulti.GetMultiCorner( 3 )).split( "," ); var cornerX = parseInt(multiCornerCoords[0]); var cornerY = parseInt(multiCornerCoords[1]); |
CalcMultiFromSer | ||
---|---|---|
Prototype | bool CalcMultiFromSer( serial ); | |
Purpose | Calculates a multi object from a serial | |
Example of Usage | var iMultiSerial = parseInt(pUser.GetTag( "iMultiSerial" )); var iMultiSerial1 = ( iMultiSerial >> 24 ); var iMultiSerial2 = ( iMultiSerial >> 16 ); var iMultiSerial3 = ( iMultiSerial >> 8 ); var iMultiSerial4 = ( iMultiSerial % 256 ); var iMulti = CalcMultiFromSer( iMultiSerial1, iMultiSerial2, iMultiSerial3, iMultiSerial4 ); |