You are viewing an old version of this page. Return to the latest version.
Version of 19:09, 13 August 2013 by I need to Update My Profile
No categories assigned
LUA:GetItemByID
- Last edited 12 years ago by I need to Update My Profile
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.