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

Lua dosetitemActionID error.

Sweddy

Well-Known Member
Joined
Feb 14, 2009
Messages
2,907
Reaction score
93
Location
Sweden
I get an error about dosetitemActionId "(a nil value)" in this lua file that is an movement in POI to remove the stone blocking the way.

TFS 0.3.6 8.60

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(cid, 42880)
						doSendMagicEffect(stonePos,2)
						stonePos.stackpos = 253
		if getThingFromPos(stonePos).itemid > 0 then
		doMoveCreature(getThingFromPos(stonePos).uid, EAST)
		end
                return TRUE
        end 
		end
 
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
 
Lua:
function onStepIn(cid, item, position, fromPosition)
 
	local stonePos = {x = 32849, y = 32282, z = 10, stackpos = 253}
	local getItem = getThingFromPos(stonePos)
	local stoneId = 1304
	local leverPos = {x = 32850, y = 32268, z = 10, stackpos = 1}
	local getLever = getThingFromPos(leverPos)
	local LeverId = 1945
 
	if isPlayer(cid) and (getItem.itemid == stoneId) then
		return true
	else
		doPlayerSendTextMessage(cid, 22, "You hear a faint rumbling, it seems to come from afar.")
		doCreateItem(stoneId, 1, stonePos)
		doRemoveItem(getLever.uid, 1)
		doSetItemActionId(doCreateItem(LeverId, 1, leverPos), 42880)
		doSendMagicEffect(stonePos, 2)
	end
	
	if getThingFromPos(stonePos).itemid > 0 then
		doMoveCreature(getThingFromPos(stonePos).uid, EAST)
	end
	
	return true
end

:*
 
Back
Top