571 B
571 B
Function: GetShardCharID(ShardID)
Description: Given a spirit shard’s ID, returns the character ID of the player who owns that shard.
Parameters:
npc
(Spawn) - Spawn object representingnpc
.
Returns: UInt32 char id of the shards player.
Example:
-- 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