Difference between revisions of "LUA:GiveLoot"

(Created page with "= LUA Functions: GiveLoot() = Gives the given loot to the given player ==== Syntax ==== GiveLoot(param1, param2, param3, param4, ...) ==== Parameters ==== ; Required - ''para...")
 
(No difference)

Latest revision as of 19:59, 11 September 2013

LUA Functions: GiveLoot()

Gives the given loot to the given player


Syntax

GiveLoot(param1, param2, param3, param4, ...)


Parameters

Required - param1 (Spawn), param2 (Spawn), param3 (int32), param4+ (int32)
param1 is the spawn giving the loot
param2 is the player receiving the loot
param3 is the amount of coins
param4+ are the item IDs


Usage

function hailed(NPC, Spawn)
    GiveLoot(NPC, Spawn, 0, 1, 2, 3, 4, 5)
end

When hailed the player will get 0 coins and the loot window will open for the player with item 1, 2, 3, 4, and 5 in it

Notes

You can given an unlimited number of items with this function