benilla-re systems structs docs

Script::GetNumFriends

function · net · orchestration

Address
0x5ad000 · 81 bytes, up to 0x5ad050
Signature
int __fastcall (lua_State *L)
Meaning
Returns the friend count from 0x5ae490, or 0 when there is no friend list
Confidence
verified, proof one
Name from
the community database (idb)
Finding
net/friends#friend-script-functions

Finding: Friend script functions in net: friends

GetNumFriends (0x5ad000) returns the count of slots before the first empty one, 0 without a list. GetSelectedFriend (0x5ad260) returns the selected friend's 1-based index, 0 for none. GetFriendInfo(index) (0x5ad060) returns six values for a 1-based index: name, level, class name, area name, 1 or nil for online, and a status text. The text is CHAT_FLAG_DND for status flag 4, CHAT_FLAG_AFK for 2 and "" otherwise, and only for an online slot. A class or area with no row is UNKNOWN; the area name is the parent area's when the area row has a valid non-zero parent. An index outside 1 to 51 returns UNKNOWN, 1, UNKNOWN, UNKNOWN, nil and ""; index 51 reads the fields that follow the slots.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 2

Calls and jumps by a bare address, from tables/calls.tsv.