Ascuas Funkeln
Rakkedo Game
- Joined
- Apr 14, 2013
- Messages
- 549
- Solutions
- 32
- Reaction score
- 305
- Location
- Poland
- GitHub
- AscuasFunkeln
Hello,
Someone can help me in this script? Im pretty retarded in tables xD
What i need is:
a = Trigger item, used on item
b = old item
c = new item which has item id (b+1)
Item "a" can be used only on items from "ITEMS" list, then script should remove "a" and "b" item, then create "c" item.
Thanks!
Someone can help me in this script? Im pretty retarded in tables xD
Lua:
local ITEMS = {26888, 26889, 26890}
function onUse(player, item, fromPosition, itemEx, toPosition)
local it = ItemType(itemEx.itemid)
for k in pairs(ITEMS) do
if it == (isInArray(k)) then
doRemoveItem(item.uid, 1)
doRemoveItem(itemEx.uid, 1)
player:addItem(k+1, 1)
end
end
return true
end
What i need is:
a = Trigger item, used on item
b = old item
c = new item which has item id (b+1)
Item "a" can be used only on items from "ITEMS" list, then script should remove "a" and "b" item, then create "c" item.
Thanks!