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

TFS 1.X+ [TFS 1.3/4] Wrong SQM's/Tiles blocking?

Lording

Well-Known Member
Joined
Jan 9, 2008
Messages
802
Reaction score
78
I'm currently using TFS 1.3/4 Downgrade from Nekiro. Stock code from github and stock OTClient 1.0 from Mehah. This error happens with or without GM account.
I have no idea how to explain this, but I can leave some images. Hope someone can figure it out or has experience with something like this:




imagensz.pngxd.pngxd.png
The same goes to all area spells or magic walls.

I tried to play with canUseFar function in actions.cpp and looks like checkLineOfSight it's the right one(because it ignore all "blocking tiles"), but I wasn't able to fix it:
Lua:
ReturnValue Actions::canUseFar(const Creature* creature, const Position& toPos, bool checkLineOfSight, bool checkFloor)
{
if (toPos.x == 0xFFFF) {
return RETURNVALUE_NOERROR;
}

const Position& creaturePos = creature->getPosition();
if (checkFloor && creaturePos.z != toPos.z) {
    return creaturePos.z > toPos.z ? RETURNVALUE_FIRSTGOUPSTAIRS : RETURNVALUE_FIRSTGODOWNSTAIRS;
}

if (!Position::areInRange<7, 5>(toPos, creaturePos)) {
    return RETURNVALUE_TOOFARAWAY;
}

if (checkLineOfSight && !g_game.canThrowObjectTo(creaturePos, toPos, checkLineOfSight, checkFloor)) {
    return RETURNVALUE_CANNOTTHROW;
}

return RETURNVALUE_NOERROR;
}
Thanks for reading
 
Thank you :), ill check these commits in some minutes, way to home.


So this is the problem. There is also a problem in this code I posted now that I have run some more tests..

The gold coins represent here you can throw
The platinum represent where you cannot (but should be able to)

This is the outcome of Zbizu's code
103811524-e0bbc400-5011-11eb-92fe-c9f43b36a892.png

I compared Nekiro's files with TFS main branch (the ones with these commits) and they are 1:1 but looking in threads found this quote.. Is the actual tibia's behaviour? I can't believe.. is the image correct?
Didn't knew tibia changed their SQM throwable spots this way.. Im so confused you ain't supposed to be doing that in 7.x or 8.x+
So you can throw items like on my first image but not magic walls? I really doubt this. Hope someone can take me to the right way.
 
Last edited:
new.png
I throw all these MWALLS in the same spot
This is the result: It changed, it's the same for X(right) or Y(south). before that commit I was able to put 7 mwalls in the X-RIGHT position but only 1 in the Y-SOUTH one(Or viseversa). so Now it doesn't matter I can throw in both lines. I think it's getting to the right way, do you know any other commit I might be missing?. I'm currently looking for them myself too


I've tested more and these are the results for spells:

work1.png
work2.png

Spells are working as they should with this commit from nekiro that shared Zbizu in thread. This is the only thing left(Magic walls):


This is how It should works:



Is there a way to set a limit in walls ? like in the last video?
 
Last edited:
Back
Top