Difference between revisions of "LUA:GetItemByID"

(Created page with "This function will return an item pointer to an item with the item id used. For include bank 0 = false 1 = true. ==== Syntax ==== GetItemByID([Spawn] Player, [int32] item_id, [i...")
 
 
Line 14: Line 14:
  
  
[[LUA:SpawnFunctions|Back to LUA Spawn Functions Index]]
+
[[LUA:GetFunctions|Back to LUA Get Functions Index]]

Latest revision as of 19:09, 13 August 2013

This function will return an item pointer to an item with the item id used. For include bank 0 = false 1 = true.

Syntax

GetItemByID([Spawn] Player, [int32] item_id, [int8] count, [int8] include_bank)

Usage

function hailed(NPC, Spawn)
    GetItemByID(Spawn, 12345678, 1, 0)
end

When an npc with this function is hailed, the function will return the pointer from an item the player has with the id of 12345678, if they have the item. This will not check their bank.


Back to LUA Get Functions Index