• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved PoI Stone Error

Keram

Member
Joined
Jan 8, 2012
Messages
491
Reaction score
12
Location
DUBLIN
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:
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:
xd.jpg

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:
omg, i swear i feel like im the stupidest person in the world now... in that other thread, this was the solution for that but it just didn't work omg...

well, they said to replace 2 lines and not just one... but ehhh

tgyoshi, as always u're just great...

thanks ;p now im gonna solve my other problem which is exactly the same thinng but with a wall tapestry ;p

repp ofc :)

aff :(
You must spread some Reputation around before giving it to TGYoshi again.
 
Back
Top