Hhahah my third script!
:::NOT TESTED YET:::
Thank's Gelio he helped me a lot!
:::NOT TESTED YET:::
Code:
-- Script by Ates, [onStepIn_RemoveStone]
-- Edited by Zoriath
-- Help by Gelio
function onStepIn(cid, item, position, fromPosition)
local pos = {X=1000, Y=1000, Z=7} -- Pos
local stone = 1304 -- ID of stone
local tile = 426 -- ID of tile
local tile1 = 425 -- ID of tile (The one you stand on)
local stoneFromPos = getThingfromPos(pos) -- It get item uid
if item.itemid == tile and item.actionid == 5100 then -- Higher click on the tile and write ActionID 5100
doRemoveItem(stoneFromPos.uid, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You removed the Stone.")
doTransformItem(item.uid, tile1)
elseif item.itemid == tile1 and item.actionid == 5100 then
doCreateItem(stone, 1, pos)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You added the Stone.")
doTransformItem(item.uid, tile)
end
end
Thank's Gelio he helped me a lot!
Last edited: