Hooks
Hooks provided by the NPC Drop module for managing item drops from NPCs.
Overview
The NPC Drop module adds npcs that drop items on death, droptable to define probabilities, encouragement for looting, editable drop tables per npc type, and weighted chances for rare items.. It provides comprehensive hook integration for customizing managing item drops from npcs and extending functionality.
NPCDropCheck
đ Purpose
Called when an NPC is killed and drop checking begins.
â° When Called
When an NPC dies, before checking for drop tables.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
ent |
NPC | The NPC entity that was killed |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The NPC Drop module adds npcs that drop items on death, droptable to define probabilities, encouragement for looting, editable drop tables per npc type, and weighted chances for rare items.. It provides comprehensive hook integration for customizing managing item drops from npcs and extending functionality.
NPCDropFailed
đ Purpose
Called when an NPC drop attempt fails.
â° When Called
When the drop roll completes but no item is selected.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
ent |
NPC | The NPC entity that was killed |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The NPC Drop module adds npcs that drop items on death, droptable to define probabilities, encouragement for looting, editable drop tables per npc type, and weighted chances for rare items.. It provides comprehensive hook integration for customizing managing item drops from npcs and extending functionality.
NPCDropNoItems
đ Purpose
Called when an NPC has a drop table but no valid items.
â° When Called
When the drop table exists but total weight is 0 or less.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
ent |
NPC | The NPC entity that was killed |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The NPC Drop module adds npcs that drop items on death, droptable to define probabilities, encouragement for looting, editable drop tables per npc type, and weighted chances for rare items.. It provides comprehensive hook integration for customizing managing item drops from npcs and extending functionality.
NPCDropNoTable
đ Purpose
Called when an NPC has no drop table configured.
â° When Called
When the NPC's class is not found in the drop table.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
ent |
NPC | The NPC entity that was killed |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The NPC Drop module adds npcs that drop items on death, droptable to define probabilities, encouragement for looting, editable drop tables per npc type, and weighted chances for rare items.. It provides comprehensive hook integration for customizing managing item drops from npcs and extending functionality.
NPCDroppedItem
đ Purpose
Called when an item is successfully dropped from an NPC.
â° When Called
After an item is spawned from the NPC.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
ent |
NPC | The NPC entity that dropped the item |
itemName |
string | The unique ID of the item that was dropped |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The NPC Drop module adds npcs that drop items on death, droptable to define probabilities, encouragement for looting, editable drop tables per npc type, and weighted chances for rare items.. It provides comprehensive hook integration for customizing managing item drops from npcs and extending functionality.
NPCDropRoll
đ Purpose
Called when the drop roll is performed.
â° When Called
After the random roll is generated but before item selection.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
ent |
NPC | The NPC entity |
choice |
number | The random roll value |
totalWeight |
number | The total weight of all items |
âŠī¸ Returns
nil
đ Realm
Server