local pos = {x=286, y=216, z=7}
function onUse(cid, item, fromPosition, itemEx, toPosition)
doTeleportThing(cid, pos)
return TRUE
end
<action itemid="1460" script="tpmino.lua"/>
local config =
{
wallPosition = {x=71, y=344, z=9},
getWall = getThingfromPos(wallPosition),
wallID = xxxx
}
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 1945 then
doRemoveItem(config.getWall.uid, 1)
doTransformItem(item.uid,item.itemid + 1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return TRUE
end
local config =
{
wallPosition = {x=71, y=344, z=9},
getWall = getThingfromPos(wallPosition),
wallID = xxxx
}
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 1945 then
doRemoveItem(config.getWall.uid, 1)
doTransformItem(item.uid,item.itemid + 1)
elseif item.itemid == 1946 then
doCreateItem(config.wallID, 1, config.wallPosition)
doTransformItem(item.uid,item.itemid - 1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return TRUE
end
<action uniqueid="xxxx" script="removewall.lua" />