1
0
EQ2Emu/docs/lua_functions/GetShardCharID.md

22 lines
571 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### Function: GetShardCharID(ShardID)
**Description:**
Given a spirit shards ID, returns the character ID of the player who owns that shard.
**Parameters:**
- `npc` (Spawn) - Spawn object representing `npc`.
**Returns:** UInt32 char id of the shards player.
**Example:**
```lua
-- From SpawnScripts/Generic/SpiritShard.lua
function spawn(NPC)
local DebtToRemovePct = GetRuleFlagFloat("R_Combat", "ShardDebtRecoveryPercent")
if GetRuleFlagBool("R_Combat", "ShardRecoveryByRadius") == true then
SetPlayerProximityFunction(NPC, 10.0, "recovershard")
end
```