You are viewing an old version of this page. Return to the latest version.
Version of 22:13, 10 October 2012 by I need to Update My Profile
No categories assigned
LUA:AddLootItem
- Last edited 4 years ago by Vlash Nytefall
LUA Functions: AddLootItem()
Adds an item to the given spawns loot table.
Syntax
AddLootItem(param1, param2, [param3])
Parameters
- Required - param1 (Spawn), param2 (int32)
- param1 is the spawn to add the item to
- param2 is the item id
- Optional - param3 (int16)
- param3 is the amount of the specified item to give
Usage
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
If param3 is left out it will default to 1.