Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetGroupMemberStatusData

From RoR Wiki

UI Lua API · Group functions
Version: WAR 1.4.8

Returns the frequently changing status values (health, AP, morale, level, location…) of one member of the player's group.

status = GetGroupMemberStatusData(memberIndex)

Arguments

memberIndex
number – Groupmate slot, 1 to 5 (the player is not counted). Only the low 8 bits are used.

Returns

status
table – Status table (see below), or nothing if memberIndex is out of range or there is no player object.
Key Type Meaning
healthPercent number Health, 0–100.
petHealthPercent number Health of the member's pet.
actionPointPercent number Action points, 0–100.
moraleLevel number Morale rank, 0–4, derived from the member's morale percentage.
level number Character level.
battleLevel number Battle (bolstered) level. Equal to level when the stored battle level is 0.
isRVRFlagged boolean –
zoneNum number Zone id.
online boolean –
isDistant boolean –
worldObjNum number World object number of the member.

Details

  • The fields match those of the same name in the member tables of GetGroupData, except that the pet's health is a top-level petHealthPercent here instead of Pet.healthPercent.
  • The slot is read whether or not a groupmate is in it.
  • The stock UI calls this function only after GetAndClearPartyMemberDirtyFlag returned true for the same slot, and copies the values into its cached GetGroupData table.
  • The function needs at least one argument and only reads the last one.

Errors

None besides the generic Invalid Parameters message when the argument is missing or not a number.

Example

From default/easystem_utils/source/partyutils.lua (PartyUtils.GetPartyMember, shortened):

local member = PartyUtils.GetPartyData()[memberIndex]
if( GetAndClearPartyMemberDirtyFlag( memberIndex ) )
then
    local memberData = GetGroupMemberStatusData( memberIndex )
    member.healthPercent = memberData.healthPercent
    member.actionPointPercent = memberData.actionPointPercent
    member.moraleLevel = memberData.moraleLevel
    member.Pet.healthPercent = memberData.petHealthPercent
    ...
end
return member

See also