Allynn
Well-Known Member
Hey, long time spend on this.. Is possible to make this working ?
Too newbie, to read source code.
Crafting system, put one item on anvil, put next item on anvil, and hit them with the hammer, to connect them.
Two different id.
Thanks for reading.
Too newbie, to read source code.
Crafting system, put one item on anvil, put next item on anvil, and hit them with the hammer, to connect them.
Two different id.
Thanks for reading.
LUA:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local tile = Tile(Position)
local AnvilPos = {x = 32112, y = 32202, z = 7, stackpos="1"}
local AxePos = {x = 32112, y = 32202, z = 7, stackpos="2"}
local tileAnvilPos = Tile{x = 32112, y = 32202, z = 7, stackpos="1"}
local tileAxePos = Tile{x = 32112, y = 32202, z = 7, stackpos="2"}
local getpos1 = getThingfromPos(AxePos)
local getpos2 = getThingfromPos(AnvilPos)
-- 26679 id Another axe, added to the game
if (getpos1.itemid == 26679) and (getpos2.itemid == 2555) then
local anvilPos = tileAnvilPos:getItemById(2555)
local axePos = tileAxePos:getItemById(26679)
position:sendMagicEffect(CONST_ME_POFF)
player:addItem(2386, 1)
end
end
return true
end