• 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 Problem with script

Bill3000

New Member
Joined
Jul 26, 2010
Messages
106
Reaction score
1
Guys, I'm doing a script that when you "use" the dead orc, you turn into a orc, but I have an error in my console:

Code:
[01/11/2011 16:19:10] [Error - Action Interface] 
[01/11/2011 16:19:10] data/actions/scripts/dead_orc.lua:onUse
[01/11/2011 16:19:10] Description: 
[01/11/2011 16:19:10] attempt to index a number value
[01/11/2011 16:19:10] stack traceback:
[01/11/2011 16:19:10] 	[C]: in function 'doSetCreatureOutfit'
[01/11/2011 16:19:10] 	data/actions/scripts/dead_orc.lua:7: in function <data/actions/scripts/dead_orc.lua:3>

And my script...
Code:
local orc = {x=31968, y=32152, z=7}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	
if (item.itemid == 3080) then
		
doSetCreatureOutfit(cid, 5,120)
doSendMagicEffect(orc, 3)
		
end
return true

end

So, what can I do to transform my outfit in a Orc for 120 seconds (2 minutes)?
 
Change this line to this

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
to
Code:
function onUse(cid, item, frompos, item2, topos)
 
Back
Top