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

Max x items on sqm (anti-trash system) how?

trans

New Member
Joined
Jul 4, 2007
Messages
115
Reaction score
0
Someone maybe know how i can make limit items on one sqm? Many players now have bot and can trash depo with 1000~ items. I see on one ots limit items on sqm. Please help if someone know how i can make it.
 
From config, 0.3.5:

maxItemsPerPZTile = 0
maxItemsPerHouseTile = 0

lol, I'm just writing everywhere that everything will be in 0.3.5, but well yes thats true, it will come with really a lot of features, be patient! ;)
 
From config, 0.3.5:

maxItemsPerPZTile = 0
maxItemsPerHouseTile = 0

lol, I'm just writing everywhere that everything will be in 0.3.5, but well yes thats true, it will come with really a lot of features, be patient! ;)

And how do we implant it into 0.3.4pl2?
__________________
klekSu.png

You are welcome on kleksoria.com!
Please visit new open tibia forum with it's own ots list. otservers.net!
 
Last edited:
Simply by editing sources... Just copy it from 0.3.5...

can you please name the functions that have changed, because i changed the HouseTile::__queryAdd at housetile.cpp anddddd added the new RET&the msg at player.cpp for pz zones but still getting crash for the same reason, was there another function changed?
 
In
Code:
ReturnValue Tile::__queryAdd(int32_t index, const Thing* thing, uint32_t count,
    uint32_t flags) const

below
Code:
        if(creatures && !creatures->empty() && item->isBlocking() && !hasBitSet(FLAG_IGNOREBLOCKCREATURE, flags))
        {
            for(CreatureVector::const_iterator cit = creatures->begin(); cit != creatures->end(); ++cit)
            {
                if(!(*cit)->isGhost())
                    return RET_NOTENOUGHROOM;
            }
        }

add
Code:
        if(hasFlag(TILESTATE_PROTECTIONZONE))
        {
            const uint32_t itemLimit = WHAT_SHOULD_BE_THE_LIMIT;
            if(itemLimit && getThingCount() > itemLimit)
                [COLOR=Blue]return RET_TILEISFULL;[/COLOR]
        }

If you cannot add RET_ by yourself, replace RET_TILEISFULL with RET_NOTPOSSIBLE (I mean the highlighted line)
 
I did limit = 20, recompiled, but still can put as many items as i want probably, i have put around 40 and no error. I also added
Code:
        if(hasFlag(TILESTATE_HOUSE))
        {
            const uint32_t itemLimit = WHAT_SHOULD_BE_THE_LIMIT;
            if(itemLimit && getThingCount() > itemLimit)
                return RET_NOTENOUGHROOM;
        }

And it's not working either in pz or house.
__________________
klekSu.png

You are welcome on kleksoria.com!
Please visit new open tibia forum with it's own ots list. otservers.net!
 
Last edited:
For house tiles edit

Code:
ReturnValue HouseTile::__queryAdd(int32_t index, const Thing* thing, uint32_t count, uint32_t flags) const

after

Code:
    if(const Creature* creature = thing->getCreature())
    {
        if(const Player* player = creature->getPlayer())
        {
            if(!house->isInvited(player))
                return RET_PLAYERISNOTINVITED;
        }
        else
            return RET_NOTPOSSIBLE;
    }

paste

Code:
    else if(thing->getItem())
    {
        const uint32_t itemLimit = PUT_LIMIT_HERE
        if(itemLimit && getThingCount() > itemLimit)
            return RET_TILEISFULL;
    }

The same about RET_ as in my previous post.
 
Back
Top