No categories assigned

LUA:GetItemByID

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