Hello, this is a script that I have that removes the stone after pulling a lever and when someone steps on SQM with x action id, the stone appears again...
Here is my script:
Now here is an error that appears in my console when I step on the tile that should make the stone to appear... And the stone appears but the lever that should resets, does't get action id back so that it can remove the stone again
Here is an error that appears in my console:

Thank you
Btw, I found 1 thread with the same problem and even with the same script but the solutions given there didn't work at all
I also tried to change the script with my lua knowledge but no effects at all ;( I could make it so that the lever doesn't dissapear at all and everything seemed to work fine until I realized that another pushing of the lever doesn't remove the stone
Here is my script:
LUA:
function onStepIn(cid, item, position, fromPosition)
local stonePos = { x=32849, y=32282, z=10, stackpos=1 }
local getItem = getThingFromPos(stonePos)
local stoneId = 1304
local leverPos = { x=32850, y=32268, z=10, stackpos=1 } -- change to the lever id
local getLever = getThingFromPos(leverPos)
local LeverId = 1945
if(isPlayer(cid) == TRUE and getItem.itemid == stoneId) then
else
doPlayerSendTextMessage(cid,22, "You hear a rumbling from far away.")
doCreateItem(stoneId, 1, stonePos)
doRemoveItem(getThingfromPos(leverPos).uid, 1)
local cer = doCreateItem(LeverId, 1, leverPos)
doSetItemActionId(cer, 42880)
doSendMagicEffect(stonePos,2)
stonePos.stackpos = 253
if getThingFromPos(stonePos).itemid > 0 then
doMoveCreature(getThingFromPos(stonePos).uid, EAST)
end
return TRUE
end
end
Now here is an error that appears in my console when I step on the tile that should make the stone to appear... And the stone appears but the lever that should resets, does't get action id back so that it can remove the stone again
Here is an error that appears in my console:
Thank you
Btw, I found 1 thread with the same problem and even with the same script but the solutions given there didn't work at all
I also tried to change the script with my lua knowledge but no effects at all ;( I could make it so that the lever doesn't dissapear at all and everything seemed to work fine until I realized that another pushing of the lever doesn't remove the stone
Last edited: