getId
getId: (Player) -> numberThe player's index.
client:getLocalPlayer()
client:getHintArrowPlayer()
scene:players():nearest()| Method | Returns | Description |
|---|---|---|
getId() | number | The player's index. |
getPlayerComposition() | PlayerComposition? | The player's appearance (worn equipment, colours, gender), as it is now; nil before one is decoded. |
getTeam() | number | The team of the player's cape, 0 for none. |
isFriendsChatMember() | boolean | Whether the player is in the local player's friends chat. |
isFriend() | boolean | Whether the player is on the local player's friends list. |
isClanMember() | boolean | Whether the player is in the local player's clan. |
getOverheadIcon() | HeadIcon? | The protection prayer over the player's head, nil for none. |
getSkullIcon() | number | The skull over the player's head (SkullIcon), -1 for none. |
setSkullIcon(number) | () | Set the skull over the player's head. |
interact(string) | boolean | The player option named option ("Trade with", "Follow", "Attack"; any case, colour tags ignored) on this player. The option is matched wh… |
target() | boolean | Use what this plugin selected (player:inventory():select(id), player:magic():select(spell)) on this player. Once per selection, and onl… |
| Method | Returns | Description |
|---|---|---|
Client.getHintArrowPlayer | Player? | The player a player hint arrow points at; nil otherwise. |
Client.getLocalPlayer | Player? | The local player, or nil before the client has one. |
Client.getPlayers | {Player} | The players the client's player info lists. |
MenuEntry.getPlayer | Player? | The player the entry targets (a player option, a use on a player, a CLIENT_PLAYER entry) by index getIdentifier(); for WALK, the hove… |
PlayerChanged.getPlayer | Player | The player; never nil. From a legacy (differ) delivery read after the player left the map, the handle it had, with its last-known values. |
PlayerDespawned.getPlayer | Player | The player, readable for the length of the event; never nil. From a legacy (differ) delivery, made after it left the map, the handle it h… |
PlayerQuery.collect | { Player } | Every survivor, nearest first. Consumes the query. |
PlayerQuery.nearest | Player? | The nearest survivor. Consumes the query. |
PlayerSet.byIndex | Player? | The player at index, or nil. |
PlayerSpawned.getPlayer | Player | The player; never nil. From a legacy (differ) delivery read after the player left the map, the handle it had, with its last-known values. |
WorldPvp.threats | { kind: "safe" | "active" | "unknown", reason: PvpUnknownReason?, combatRange: { min: number, max: number }?, unreadableCandidates: number?, players: { Player }? } | Who can attack the local player right now. |
getIdgetId: (Player) -> numberThe player's index.
getPlayerCompositiongetPlayerComposition: (Player) -> PlayerComposition?The player's appearance (worn equipment, colours, gender), as it is now; nil before one is decoded.
getTeamgetTeam: (Player) -> numberThe team of the player's cape, 0 for none.
isFriendsChatMemberisFriendsChatMember: (Player) -> booleanWhether the player is in the local player's friends chat.
isFriendisFriend: (Player) -> booleanWhether the player is on the local player's friends list.
isClanMemberisClanMember: (Player) -> booleanWhether the player is in the local player's clan.
getOverheadIcongetOverheadIcon: (Player) -> HeadIcon?The protection prayer over the player's head, nil for none.
getSkullIcongetSkullIcon: (Player) -> numberThe skull over the player's head (SkullIcon), -1 for none.
setSkullIconsetSkullIcon: (Player, number) -> ()Set the skull over the player's head.
interactinteract: (Player, string) -> booleanThe player option named option ("Trade with", "Follow", "Attack"; any case, colour tags ignored) on this player. The option is matched when the click fires, against the options the client shows then (which op is "Trade with" varies), and nothing is clicked when none matches. false when the player is gone, or it is in another world view. Raises for an empty option.
targettarget: (Player) -> booleanUse what this plugin selected (player:inventory():select(id), player:magic():select(spell)) on this player. Once per selection, and only after a selection of this plugin's that admits a player (a spell that takes NPCs only does not), as inventory:target is for an item. inventory:useOnPlayer(itemId, player) and magic:castOnPlayer(spell, player) are the select and the use in one call. false when it has no such selection, or the player is gone or in another world view.