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

step on and create item

Ussef

New Member
Joined
May 27, 2009
Messages
123
Reaction score
2
okay so i made a script that when u step on a certain position it creates
function onStepIn(cid, item, pos)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getPlayerPosition(cid), 5)
doCreateItem(5421, count, {x=660,y=354,z=9})
end
return TRUE
end
it works fine but i was wondering if you could make the item created get created with a unique id that u chose. im new to scripting so i dont really know
 
I'm not sure, but i do know for a fact that you can set an action id to it
Lua:
local item = doCreateItem(5421, count, {x=660,y=354,z=9})
doSetItemActionId(item, actionid)
Something like this, i'm pretty rusty
 
Last edited:
thanks guys

- - - Updated - - -

[09/02/2013 16:28:58] Lua Script Error: [MoveEvents Interface]
[09/02/2013 16:28:58] data/movements/scripts/kelp regrowth.lua:eek:nStepIn
[09/02/2013 16:28:58] data/movements/scripts/kelp regrowth.lua:6: attempt to call global 'doItemSetAttribute' (a nil value)
[09/02/2013 16:28:58] stack traceback:

okay so this means that its not in my system the command? using 0.2.13
 
Then use the doSetItemActionId like Milice said, I'm not sure if there is an alternative function for uid in 0.2.
 
Back
Top