• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lever - Stone remover

Diemorko

New Member
Joined
Jan 31, 2011
Messages
64
Reaction score
0
iveqle.jpg


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

In Server log i see:
18:50 You added a Lever.
And when use again
18:50 You removed the Stone.

but there is nothing changes...
Any idea?
 
Back
Top