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

DoMoveCreature

SasirO

Banned User
Joined
Apr 30, 2009
Messages
559
Reaction score
0
How to add DoMoveCreature funcion into this script?

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    removals = {
        { item = 386, pos = { x = 32860 , y = 32313 , z = 11 } },   
    }
    
    if item.itemid == 1945 then
        for i = 1, #removals do
            removals[i].pos.stackpos = 1
            doRemoveItem(getThingfromPos(removals[i].pos).uid, 1)
        end
        doTransformItem(item.uid, item.itemid + 1)
    elseif item.itemid == 1946 then
        for i = 1, #removals do
            doCreateItem(removals[i].item, 1, removals[i].pos)
        end
        doTransformItem(item.uid, item.itemid - 1)
    end
    return TRUE
end

I've already tried it with
Code:
	if getThingfromPos(removals).itemid > 0 then
			doMoveCreature(getThingFromPos(removals).uid, SOUTH)

but isnt working :p
 
local destPos = {x=100, y=100, z=7, stackpos=253} -- Destination Position.

doTeleportThing(cid,destPos)

Add this, and change destPos to the destination.

:)
 
Last edited:
It's position in stack, for example: stackpos = 1, it's first item above ground, stackpos = 253, it's top creature.
 
Back
Top