Hi!
A script I'm working on to have at a specific place is a puzzle where you need to move two certain items (statues) to two specific locations in order to remove 4 stones. How do I add so that the stones will be removed if both statues are on the exact position they are supposed to be, and if one or both are removed the stones will reappear. Thanks!
Is this maybe a OnAddItem function in movements?
A script I'm working on to have at a specific place is a puzzle where you need to move two certain items (statues) to two specific locations in order to remove 4 stones. How do I add so that the stones will be removed if both statues are on the exact position they are supposed to be, and if one or both are removed the stones will reappear. Thanks!
Code:
local statue1pos = {x=1154, y=1102, z=11, stackpos=1}
local statue2pos = {x=1145, y=1106, z=11, stackpos=1}
local stone1pos = {x=1148, y=1110, z=11, stackpos=1}
local stone2pos = {x=1149, y=1110, z=11, stackpos=1}
local stone3pos = {x=1150, y=1110, z=11, stackpos=1}
local stone4pos = {x=1151, y=1110, z=11, stackpos=1}
function onUse(cid, item, fromPos, item2, toPos)
if item.itemid == 1442 and item.itemid == 1477 then
doRemoveItem(getThingfromPos(stone1pos, stone2pos, stone3pos, stone4pos).uid)
else
doCreateItem(1304, 1, stone1pos)
doCreateItem(1304, 1, stone2pos)
doCreateItem(1304, 1, stone3pos)
doCreateItem(1304, 1, stone4pos)
end
end
Is this maybe a OnAddItem function in movements?