• 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!

Problem with a quest script

christiandb

Member
Joined
Feb 5, 2008
Messages
2,469
Reaction score
5
Location
010
Code:
local text = "Sorry you can't be teleported."
function onStepIn(cid, item, position, fromPosition)
 if item.actionid == 10070 and getThingfromPos({x=32478, y=31906, z=7, stackpos=1}).itemid == 2782 and getThingfromPos({x=32478, y=31902, z=7, stackpos=1}).itemid == 1304 then
	doTransformItem(getThingfromPos({x=32478, y=31902, z=7, stackpos=1}).uid, 1385)
else
doPlayerSendCancel(cid, text)
end
end

I get this error:
Code:
[20/11/2008 15:58:37] Lua Script Error: [MoveEvents Interface] 
[20/11/2008 15:58:37] data/movements/scripts/Paradox/CreateStair.lua:onStepIn

[20/11/2008 15:58:37] luaGetThingFromPos(). Tile not found

Coördinates all are fine.

I tried this too:
Code:
local text = "Sorry you can't be teleported."
function onStepIn(cid, item, position, fromPosition)
 if item.actionid == 10070 and getThingfromPos({x=32478, y=31906, z=7, stackpos=1}).itemid == 2782 and getThingfromPos({x=32478, y=31902, z=7, stackpos=1}).itemid == 1304 then
	doTransformItem(10069, 1385)	
else
doPlayerSendCancel(cid, text)
end
end
I gave the stone unique id 10069 now it says "Sorry you can't be teleported."

description:
It's a script of the paradox tower (the lowest floor). The script is supposed to check the sqm at the door if the grass growed there and then check if the stone is a stone (can be a stair too). If it is a stone then it has to transform it to stairs.
 
Last edited:
You told me that you just wanted it to transform the stone when stepping on a tile;

Code:
function onStepIn(cid, item, position, fromPosition)

     local stairID = '1337' -- The stair ID
	 
           doTransformItem(item.uid, stairID)
	 
	end

If you'd like the rock to appear again when moving away from the tile;
Code:
function onStepIn(cid, item, position, fromPosition)

     local stairID = '1337' -- The stair ID
	 
           doTransformItem(item.uid, stairID)
	 
	end
	 
function onStepOut (cid, item, position, fromPosition)

     local rockID  = '1337' -- The Rocks ID

         doTransformItem(item.uid, rockID)
  
   
 end

Change the stairID to the id of the stair you'd like it to transform into.

Same goes for the rockID if you're gonna use that one.
 
Last edited:
Thank you very much but as you know at the paradox quest you can only transform the rock into a stair when the grass already growed at the door. Is it possible to make that for you?

Thanks in advance,

Chris
 
Back
Top