This is the script im working on.
It works where you step on a tile and it transforms an item on a different tile to another item. The object is to get the correct order of items.
My problem is that when i do /reloadmovements it works, i can step on all the 4 sqm (that are suppose to transform the items) and it does, but if i step on them again it wont transform the item.
It doesnt matter which item it is, it will work no matter what after i do /reload movements.
Code:
local tile1 = getThingFromPos({x=915, y=296, z=7, stackpos=1})
local tile2 = getThingFromPos({x=916, y=296, z=7, stackpos=1})
local tile3 = getThingFromPos({x=917, y=296, z=7, stackpos=1})
local tile4 = getThingFromPos({x=918, y=296, z=7, stackpos=1})
local item1 = (5616)
local item2 = (5953)
function onStepIn(cid, item, pos, fromPos)
if item.uid == 8561 then
if tile1.itemid == item1 then
doTransformItem(getThingFromPos({x=915, y=296, z=7, stackpos=1}).uid, item2)
elseif tile1.itemid == item2 then
doTransformItem(getThingFromPos({x=915, y=296, z=7, stackpos=1}).uid, item1)
end
elseif item.uid == 8562 then
if tile2.itemid == item1 then
doTransformItem(getThingFromPos({x=916, y=296, z=7, stackpos=1}).uid, item2)
elseif tile2.itemid == item2 then
doTransformItem(getThingFromPos({x=916, y=296, z=7, stackpos=1}).uid, item1)
return true
end
elseif item.uid == 8563 then
if tile3.itemid == item1 then
doTransformItem(getThingFromPos({x=917, y=296, z=7, stackpos=1}).uid, item2)
elseif tile3.itemid == item2 then
doTransformItem(getThingFromPos({x=917, y=296, z=7, stackpos=1}).uid, item1)
return true
end
elseif item.uid == 8564 then
if tile4.itemid == item1 then
doTransformItem(getThingFromPos({x=918, y=296, z=7, stackpos=1}).uid, item2)
elseif tile4.itemid == item2 then
doTransformItem(getThingFromPos({x=918, y=296, z=7, stackpos=1}).uid, item1)
return true
end
end
return true
end
It works where you step on a tile and it transforms an item on a different tile to another item. The object is to get the correct order of items.
My problem is that when i do /reloadmovements it works, i can step on all the 4 sqm (that are suppose to transform the items) and it does, but if i step on them again it wont transform the item.
It doesnt matter which item it is, it will work no matter what after i do /reload movements.