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
Difference between revisions of "LUA:AddLootItem"
(Created page with "= LUA Functions: AddLootItem() = Adds an item to the given spawns loot table. ==== Syntax ==== AddLootItem(param1, param2, [param3]) ==== Parameters ==== ; Required - ''param1...") |
|||
| Line 1: | Line 1: | ||
| − | = | + | {{LUAFunction |
| − | Adds an item to the given spawns loot table. | + | |Name = AddLootItem |
| − | + | |Description = Adds an item to the given spawns loot table. | |
| − | = | + | |Param1 = Spawn |
| − | + | |Param1Desc = is the spawn to add the item to | |
| − | + | |Param2 = int32 | |
| − | + | |Param2Desc = is the item id | |
| − | = | + | |OptionalParam1 = int16 |
| − | + | |OptionalParam1Desc = is the amount of the specified item to give, will default to 1 if left out | |
| − | + | |Example = | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
<pre> | <pre> | ||
function cast(Caster, Target) | function cast(Caster, Target) | ||
| Line 21: | Line 15: | ||
end | end | ||
</pre> | </pre> | ||
| − | + | |ExampleDesc = This would add a stack of 5 items with the id of 100 to the Target's loot table. | |
| − | This would add a stack of 5 items with the id of 100 to the Target's loot table. | + | |Notes = None |
| − | + | }} | |
| − | |||
| − | |||
| − | |||
Latest revision as of 12:01, 30 January 2021
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