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

[Solved] Item to heavy depo

Solution
Lua:
CONTAINER_WEIGHT_CHECK = true -- true = enable / false = disable
CONTAINER_WEIGHT_MAX = 1000000 -- 1000000 = 10k = 10000.00 oz


Lua:
    -- No move if item count > 20 items
    local tile = Tile(toPosition)
    if tile and tile:getItemCount() > 20 then
        self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
        return false
    end

    -- No move parcel very heavy
    if CONTAINER_WEIGHT_CHECK and ItemType(item:getId()):isContainer()
    and...
Lua:
CONTAINER_WEIGHT_CHECK = true -- true = enable / false = disable
CONTAINER_WEIGHT_MAX = 1000000 -- 1000000 = 10k = 10000.00 oz


Lua:
    -- No move if item count > 20 items
    local tile = Tile(toPosition)
    if tile and tile:getItemCount() > 20 then
        self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
        return false
    end

    -- No move parcel very heavy
    if CONTAINER_WEIGHT_CHECK and ItemType(item:getId()):isContainer()
    and item:getWeight() > CONTAINER_WEIGHT_MAX then
        self:sendCancelMessage("Your cannot move this item too heavy.")
        return false
    end
 
Solution
Lua:
CONTAINER_WEIGHT_CHECK = true -- true = enable / false = disable
CONTAINER_WEIGHT_MAX = 1000000 -- 1000000 = 10k = 10000.00 oz


Lua:
    -- No move if item count > 20 items
    local tile = Tile(toPosition)
    if tile and tile:getItemCount() > 20 then
        self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
        return false
    end

    -- No move parcel very heavy
    if CONTAINER_WEIGHT_CHECK and ItemType(item:getId()):isContainer()
    and item:getWeight() > CONTAINER_WEIGHT_MAX then
        self:sendCancelMessage("Your cannot move this item too heavy.")
        return false
    end
Yeees!! Thanks bro God bless you!
 
Back
Top