Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local craftTable = {
- [9808] = {2464, 2465, 2483, 2463, 2476, 8891, 2487,2466, 2492, 2472}
- }
- function onUse(cid, item, fromPosition, itemEx, toPosition)
- local pos = {x = 1934, y = 1989, z = 8}
- if getTileItemById(pos, itemEx.uid) > 0 then
- if doRemoveItem(getTileItemById(pos, itemEx.uid), 1) then
- if item.itemid == 9825 then
- doTransformItem(item.uid, 9826)
- elseif item.itemid == 9826 then
- doTransformItem(item.uid, 9825)
- end
- local craftedItem = craftTable[itemEx.itemid][math.random(#craftTable[itemEx.itemid])]
- doPlayerAddItem(cid, craftedItem)
- return true
- end
- end
- doPlayerSendTextMessage(cid,MESSAGE_EVENT_ORANGE,"Wrong item on table.")
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement