• 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 Need help with cookies (transform to two items)

Nyarl666

Member
Joined
Sep 25, 2022
Messages
63
Reaction score
8
Hello. I have problem with transform baking tray with cookies to cookies and empty baking tray when I use it on oven. Help please!
elseif moveitem:getId() == 8848 then
moveitem:transform(2561)
moveitem:transform(2687, 12)
position:sendMagicEffect(CONST_ME_HITBYFIRE)


ALL CODE WITH ANOTHER TRANSFORMS:
Lua:
function onAddItem(moveitem, tileitem, position)
    if moveitem:getId() == 2693 then
        moveitem:transform(2689)
        position:sendMagicEffect(CONST_ME_HITBYFIRE)
    elseif moveitem:getId() == 6277 then
        moveitem:transform(6278)
        position:sendMagicEffect(CONST_ME_HITBYFIRE)
    elseif moveitem:getId() == 8846 then
        moveitem:transform(8847)
        position:sendMagicEffect(CONST_ME_HITBYFIRE)
    elseif moveitem:getId() == 9113 then
        moveitem:transform(9111)
        position:sendMagicEffect(CONST_ME_HITBYFIRE)
    elseif moveitem:getId() == 8848 then
        moveitem:transform(2561)
        moveitem:transform(2687, 12)
        position:sendMagicEffect(CONST_ME_HITBYFIRE)
    end
    return true
end
 
@Nyarl666

Lua:
elseif moveitem:getId() == 8848 then
moveitem:remove()
Game.createItem(2561,1,position)
Game.createItem(2687,12,position)
position:sendMagicEffect(CONST_ME_HITBYFIRE)
 
Solution
Back
Top