Skip to content

GetPlayerItemQuality

The quality of the player’s item of a class - I to IV.

1 to 4 (the game’s I to IV; a masterwork forged at the anvil is the best its class can be). When they carry several items of the class, the one they wear answers, else the best they carry. The quality is the server’s record: the player’s game says each item’s quality when it arrives (a give, a pickup, a chest, the anvil), and a GivePlayerItem still on its way already answers with the quality it was given at. 0 while their game has not said it yet, or for an item the game keeps at its class’s own.

The id of one of the player’s tagged items (GivePlayerTaggedItem) in place of the class answers for that one item.

GetPlayerItemQuality(pid, item)
Parameter Type
pid number the player
item string | number the item’s name, id, English name or GUID - or a tagged item’s id

number - 0..4; nil when they carry none of it

if GetPlayerItemQuality(pid, "longSwordDuel") == 4 then
SendClientMessage(pid, -1, "A masterwork - the guild will pay double for it.")
end

SetPlayerItemQuality · GetPlayerInventory · GetPlayerItemHealth · the Items and inventory group of the index