No categories assigned

LUA:AddLootItem


LUA:AllFunctions - AddLootItem

Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker


Adds an item to the given spawns loot table.

Syntax

AddLootItem(param1, param2, [opt param1])

Parameters

Required - param1 (Spawn), param2 (int32)
param1 is the spawn to add the item to
param2 is the item id
Optional - opt param1 (int16)
opt param1 is the amount of the specified item to give, will default to 1 if left out

Example

function cast(Caster, Target)
    -- Add a stack of 5 items with the id of 100
    AddLootItem(Target, 100, 5)
end

This would add a stack of 5 items with the id of 100 to the Target's loot table.

Notes

None