Caduceus
Unknown Member
- Joined
- May 10, 2010
- Messages
- 321
- Solutions
- 2
- Reaction score
- 24
the player is supposed to place item (5943) on alter & use lever to remove item, then teleport to pos.
As of right now, the teleport works. However the Item is not removed from pos & Msg does not work.
As of right now, the teleport works. However the Item is not removed from pos & Msg does not work.
Code:
function doComparePositions(position, positionEx)
return position.x == positionEx.x and position.y == positionEx.y and position.z == positionEx.z
end
piece1pos = {x=1098, y=997, z=9, stackpos=2}
getpiece1 = getThingfromPos(piece1pos)
function onUse(cid, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 1945 then
if getpiece1.itemid == 5943 then
if doComparePositions(getPlayerPosition(cid), {x = 1100, y = 996, z = 9}) then
doRemoveItem(getThingfromPos(getpiece1.uid))
player:sendTextMessage(MESSAGE_INFO_DESCR, "MSG.")
end
end
doTeleportThing(cid, {x = 1100, y = 992, z = 9})
end
return true
end
Last edited: