AddLootItem(Spawn: Entity, Int32: ItemID, Int16: Charges)
Pre-Requisite(s)
- Must be called before the death of the NPC
- Spawn Scripts “death” function and Zone Scripts “spawn_killed” function are called AFTER chest drop/loot assigned.
Parameter(s)
Spawn: Player - Spawn LUA Pointer of Player type only.
Int32: ItemID - Database Item ID to provide the Player.
Int16: Charges (OPTIONAL) - Allows creating stack/multiple of same item if not stackable, if not specified quantity is default 1.
Return(s)
- None
Example(s)
function Spawn(NPC, Spawn)
AddLootItem(NPC, 36419) – Adds a Kejaan's herbal biscuit to the npc loot
end
Result
Additional Notes