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

getThingPos problem

Xyzyk

RudziutOTS Maker
Joined
Jun 14, 2008
Messages
39
Reaction score
0
Location
Poland
In my script:
Code:
function onAddItem(cid, moveitem, tileitem)
	if (moveitem.itemid == 2016 and moveitem.type == 2) then
		doRemoveItem(moveitem.uid,1)
		doSendMagicEffect(getThingPos(tileitem.uid),13)
		local newpos = {x=398, y=1385, z=9}
		doTeleportThing(cid,newpos)
		doSendMagicEffect(newpos,10)
	else
		doSendMagicEffect(getThingPos(tileitem.uid),2)
		doRemoveItem(moveitem.uid,1)
	end		
	return true
end

when I give pool of blood on ground script doesn't work and server print this error:
[07/03/2010 22:17:47] [Error - MoveEvents Interface]
[07/03/2010 22:17:47] data/movements/scripts/quest/poi/grave.lua:onAddItem
[07/03/2010 22:17:47] Description:
[07/03/2010 22:17:47] (luaGetThingPosition) Thing not found
 
Code:
function onAddItem(moveItem, tileItem, position, cid)
	if moveItem.itemid == 2016 and moveItem.type == 2 then
		doSendMagicEffect(position, CONST_ME_MAGIC_RED)
		doTeleportThing(cid, {x=398, y=1385, z=9})
		doSendMagicEffect({x=398, y=1385, z=9}, CONST_ME_TELEPORT)
	else
		doSendMagicEffect(position, CONST_ME_POFF)
	end
	doRemoveItem(moveItem.uid)
end
 
Back
Top