• 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 Simple script but does not work as I want to. Please help

luq14

Cookie Cotton Joe's
Joined
Apr 4, 2008
Messages
93
Reaction score
18
Location
Somewhere near sea.
Hello. This is my script:
function onStepIn(cid, item, pos)
pozycja = getPlayerPosition(cid)
pozycja1 = {x = pozycja.x, y = pozycja.y, z = pozycja.z+1}

if item.actionid == 25318 then
doCreateItem(3311, pozycja)
doTeleportThing(cid, pozycja1)
else
return 0
end
return 1
end

I want to set DoDecayItem for created item 3311 but I don't know how. Please help me

Thanks,
Luq
 
Solution
Lua:
function onStepIn(cid, item, pos)
    pozycja = getPlayerPosition(cid)
    pozycja1 = {x = pozycja.x, y = pozycja.y, z = pozycja.z+1}
   
    if item.actionid == 25318 then
        local item_1 = doCreateItem(3311, pozycja)
        doDecayItem(item_1)
        doTeleportThing(cid, pozycja1)
    else
        return false
    end
    return true
end
Lua:
function onStepIn(cid, item, pos)
    pozycja = getPlayerPosition(cid)
    pozycja1 = {x = pozycja.x, y = pozycja.y, z = pozycja.z+1}
   
    if item.actionid == 25318 then
        local item_1 = doCreateItem(3311, pozycja)
        doDecayItem(item_1)
        doTeleportThing(cid, pozycja1)
    else
        return false
    end
    return true
end
 
Solution
Back
Top