Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = {X=32145, Y=32101, Z=11} -- The Pos [EDIT HERE][Example: X=1000, Y=1000, Z=7]
local stone = 1304-- ID of the stone [DO NOT EDIT]
local stoneFromPos = getThingfromPos(pos) -- It get item uid
if item.itemid == 1945 then
doRemoveItem(stoneFromPos.uid, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You removed the Stone.") -- DO NOT EDIT
doTransformItem(item.uid, 1946)
elseif item.itemid == 1946 then
doCreateItem(1304, 1, pos)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You added a Lever.")
doTransformItem(item.uid, 1945) -- It transform switch to id 1945
end
end
Any idea?
Last edited by a moderator: