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

C++ [TFS Master] The stacking of parcels & return of the pot

Demnish

Tibian Hero
Joined
Sep 28, 2011
Messages
402
Solutions
2
Reaction score
65
Location
Sweden
So, I'm going to get into some source code editing for the first time ever.

My goal is to take the latest TFS from git hub, then return the oldschool "stacked parcels/boxes/etc blocks creatures" & chests and pots being usable as a budget mwall for knights as it was before.

POT (FIXED)
Now I've tried a few different approaches:
1. I tried adding "blocking = 1" into the items.xml, while this did make pots block players from passing, it also didn't function the same way mwalls for example do.
When I mapclicked behind the pot, my character wouldn't walk around, it tried to walk through. If I continue to press against the pot, I will get kicked for sending too many packets in a short amount of time with a laggy animation of the character trying desperately to walk past.
2. I had the same result when I used an Item Editor and turned on the Unpassable flag on the pot in the items.otb.

None of these worked.
Now, if it is possible to script this in LUA to make it work the same way mwalls do, that would be gold.

PARCELS
Stack 2+ parcels(boxes or whatever item that has height) on each other, essentially makes them into walls. You can throw items on them and even fire bomb them to make it even more annoying, but you can't pass them unless you're 1 height below or less.


I've tried looking through the sources for the ID "2101" which is the Indoor Plant. The Indoor Plant works as the pots should.
Now I have no idea if any one of these is doable in the sources alone or if you need to edit the client aswell, hopefully not.

Any help would be appreciated, if you know where I can start editing in the source code for example that would be a huge help.
 
Last edited:
Just edit dat/items.otb - select there block path finding. Also, monsters have flag canpushitems, try to disable that flag.
@Edit: tested, just edit: <flag canpushitems="1" /> to <flag canpushitems="0" />.
 
Last edited:
Edit: I might have formulated that wrong, but what I mean is that the pot should work the same way as the Indoor Plant. Blocking creatures(creatures = players + monsters) from passing it while still being able to be pushed around and picked up. Editing the monster's canpushitems flag is not a good idea, not only can you easily trap all monsters, but it also doesn't make a difference for players.

The Block Pathfinder flag didn't change the outcome, it was still the same as with my other 2 tries. (I did both with and without the Unpassable flag)

pottest.png
 
Last edited:
How disabling canpushitems flag in MONSTER file, can affect players? Players still will be able to push that item.

+If you edit flags for items, you need to change it first in dat file and then in items.otb.
 
Last edited:
How disabling canpushitems flag in MONSTER file, can affect players? Players still will be able to push that item.
1. Changing the monster's canpushitems flag makes it possible for example a Lvl 8 Sorcerer to easily trap a Demon and go to town.
2. Over a 100 monster's needs to be edited.
3. It's not a solution to the most disastrous problem when using the Unpassable flag, which is that if you hold direction against the object, the client sends too many packets in a too short time which causes kicks, while also preventing map clicking. (which will guarantee frustrating deaths in war)
4. Even with the OTB edit, pushing/picking up the item was possible, it never became a problem.
5. I can't picture a scenario where this might actually solve the problem. It might make monsters not interact with the object, but players will still be unaffected.

+If you edit flags for items, you need to change it first in dat file and then in items.otb.
I've been trying to find a Dat Editor for 10.98 but haven't had any success.
At the very least, we know that changing only the OTB file, doesn't work.

Besides, I really doubt these things can even be changed outside of the source code. In the past this had to be done in the sources.
The problem with that is; I forgot where, lol. :cool:
 
Last edited:
1. Then what do you want to achieve? You don't have to change it for every monster (8lvl will surely die trying to trap Demon). If it is only for training purposes then set that flag just for few mobs.
2. Look 1st.
3. It is solution for that. If monster cannot push item, he will be stuck there. But players still will be able to step on it. (Uncheck unpassable flag).
Packet exceeding is because of mismatch between dat flags and otb flags.
 
Yeah, but the object actually needs to block players from passing, like a magic wall does.

Do you know where I can get a Dat Editor for 10.98?
That would be beast. :)
 
It worked, thanks a lot mate! :)
Now, I need to fix the parcels, do you think those can be changed with DAT and OTB changes aswell or is that strictly sources?

Also, since I changed the DAT and OTB.
What happens if a player doesn't use my custom client DAT file?

Will they get the packets problem as I did before I changed it?
Logic tells me yes, so is there something I can do to force people to use my custom client?
Make their client crash or something if they aren't using mine.
 
Back
Top