• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Where is bug?

Shiko Erye

LUA - Scripter
Joined
Dec 7, 2010
Messages
106
Reaction score
12
LUA:
function onUse(cid, item, frompos, item2, topos)
poke = getCreatureSummons(cid)[1]
	if isCreature(cid) and isCreature(poke) then
		if getDistanceBetween(getThingPos(poke), topos) <= 1 then
			doSendMagicEffect(topos, 3)
			doTransformItem(getTileItemById(topos, item2.itemid).uid, item2.itemid+1)
			addEvent(doTransformItem, 7000, getTileItemById(topos, item2.itemid+1).uid, item2.itemid)
			doCreatureSay(poke, "DIG!", TALKTYPE_MONSTER)
		else
			doCreatureMove(poke, topos)
		end
	end
end

[30/07/2011 09:57:32] In a timer event called from:
[30/07/2011 09:57:32] data/actions/scripts/tool/order.lua:onUse
[30/07/2011 09:57:32] Description:
[30/07/2011 09:57:32] (luaDoTransformItem) Item not found
 
Replace this line:
LUA:
addEvent(doTransformItem, 7000, getTileItemById(topos, item2.itemid+1).uid, item2.itemid)

for:
LUA:
addEvent(function(topos, id)
	doTransformItem(getTileItemById(topos, id+1).uid, id)
end, topos, item2.itemid)
 
Back
Top