Ratser
Retired // Making time for yoloswagmod
- Joined
- Feb 11, 2009
- Messages
- 482
- Reaction score
- 36
How can I use more than 1 itemid in a table?
I tried with this...and failed:
I tried with this...and failed:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local ITEMS =
{
[{8977, 9002}] = {"PUDDI PUDDI PUDDI PUDDI"}
}
local items = ITEMS[{item.itemid}]
if(not items) then
return false
end
doCreatureSay(cid, items[2], TALKTYPE_MONSTER, false, 0, fromPosition.x ~= CONTAINER_POSITION and fromPosition or getThingPos(cid))
return true
end