MARS Client Scripting Library - MarsGroup
From Multiverse
| MARS Client Scripting Library | |
|
MarsAbility
|
MarsQuest
|
| Additional Modules | |
| MarsStandardCommands | |
| Examples | |
| InstancePortal | |
MarsGroup is a module in the MARS Client Scripting Library that interacts with the MARS Group System.
Methods
CheckTarget
CheckTarget(target)
Method for checking whether a selected target is already in the group the player is in.
Returns
Returns true or false for if the person selected is already in the group or not.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| target | long | None | The OID of the targeted player. |
GetAutoJoinPartyChat
GetAutoJoinPartyChat()
Returns a value advising if the player is set to join group voice chat or not.
Returns
Returns true or false based on whether the player is set to join the group voice chat or not.
Parameters
None.
GetGroupLeaderOid
GetGroupLeaderOid()
Gets the current groups Leader Oid.
Returns
Returns the OID of the leader for the group the player is part of.
Parameters
None.
GetGroupMemberAllowedSpeaker
GetGroupMemberAllowedSpeaker(slotId)
Checks to see if the current member, based on their slot in the group list, is a allowed to speak in the voice system.
Returns
Returns true or false on whether the player at slotId is currently allowed to speak or not.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| slotId | int | None | The index of the member (1 is the first entry). |
GetGroupMemberHealth
health = GetGroupMemberHealth(slotId)
Returns the player's current health vaue at the given index.
Returns
Returns the current health value as an integer of the player at the given slot index.
Paremeters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| slotId | int | None | The index of the member (1 is the first entry). |
GetGroupMemberMaxHealth
maxHealth = GetGroupMemberMaxHealth(slotId)
Returns the current max health value as an integer of the player at the given slot index.
Returns
Returns the current max health value as an integer of the player at the given slot index.
Paremeters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| slotId | int | None | The index of the member (1 is the first entry). |
GetGroupMemberName
playerName = MarsGroup.GetGroupMemberName(slotId)
Returns
Name of the group member in the specified slot ID.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| slotId | int | None | The index of the member (1 is the first entry). |
GetNumGroupMembers
number = GetNumGroupMembers()
Returns the number of members in the group.
Returns
The number of members in the group.
Parameters
None.
GetGroupMemberOid
GetGroupMemberOid(slotId)
Returns
Returns the member's OID that is found at the slot given.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| slotId | int | None | The index of the member (1 is the first entry). |
GetGroupMemberSlotIndex
slotId = GetGroupMemberSlotIndex(groupMemberOid)
Retrieves a player's group index based on their OID
Returns
Returns the player's slot index in the group list.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| target | long | None | The OID of the player. |
GroupMemeberVoiceEnabled
GetGroupMemberVoiceEnabled(slotId)
Returns if a group member at a given index has their voice enabled
Returns
Returns true or false as to whether the given member at the slot id has their voice enabled.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| slotId | int | None | The index of the member (1 is the first entry). |
GetGroupOid
GetGroupOid()
Returns
Returns the long OID of the group the player is current in.
Parameters
None.
GetNumGroupMembers
count = GetNumGroupMembers()
Returns
Returns an int value with the number of members currently in the group.
Parameters
None.
LeaveGroup
LeaveGroup()
Removes the current player from the group they are apart of.
Returns
None.
Parameters
None.
MuteGroup
MuteGroup()
Mutes all group members except for the group leader
Returns
None.
Parameters
None.
MuteTarget
MuteTarget(slotId)
Mutes the player at the given index in the group.
Returns
None.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| slotId | int | None | The index of the member (1 is the first entry). |
RemoveGroupMember
RemoveGroupMember(slotId)
Removes player from the group at the given index.
Returns
None.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| slotId | int | None | The index of the member (1 is the first entry). |
SendGroupChatMessage
SendGroupChatMessage(message)
Sends a Group chat message to all group members.
Returns
None.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| message | String | None | The text of the message to be sent to the other group members. |
SendInviteRequestMessage
SendInviteRequestMessage(targetOid)
Sends message to the server to send the targeted player an invite message.
Returns
None.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| targetOid | long | None | The OID of the player to invite. |
SendInviteResponseMessage
SendInviteResponseMessage(groupLeaderOid, response)
Sends a message response advising if the group invite was accepted or not
Returns
None.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| groupLeaderOid | long | None | The OID of the leader for the group. |
| response | boolean | False | Whether or not they accepted the invite sent. |
SetAutoJoinPartyChat
SetAutoJoinPartyChat(value)
Sets system to join group voice chat if the voice client is enabled.
Returns
None.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| value | boolean | None | True or False for setting auto joining the party voice chat. |
Events
The MarsGroup module generates the following UI events:
-
CHAT_MSG_GROUP -
GROUP_INVITE_REQUEST -
GROUP_UPDATE -
GROUP_PROPERTY_UPDATE
Messages
The MarsGroup module registers for the following extension message types:
-
mv.GROUP_UPDATE -
mv.GROUP_PROPERTY_UPDATE -
mv.GROUP_INVITE_REQUEST
