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

Fix/Patch [Fix/Patch]Player CanWalkThrough [TFS 1.0]

EvilSkillz

Back
Joined
Jul 12, 2012
Messages
1,810
Solutions
2
Reaction score
386
Location
Egypt - Cairo
because @imkingran , requested it <3
i fix this for you guys
if you wanna make real map tibia or server in in tfs 1.0

you all know that players under protection level can trap higher level and make friends kill him
so @imkingran , requested it

and i fixed it

all you need to change is
open your player.cpp
search for canWalkThrough
u will find two functions
canWalkThrough and canWalkThroughEx
what did i do .. ?
let's explain

and in canWalkThroughEx i changed this code
and change this
Code:
return playerTile && playerTile->hasFlag(TILESTATE_PROTECTIONZONE);
to this
Code:
return playerTile && playerTile->hasFlag(TILESTATE_NONE);

@Mark , u can added it to the new version u release or fix it <3 we need to get it like real tibia bro xD
what can this do
players who under protection level can't trap higher level to kill them
but in pzz every one can walk through each other
but ofc. in normal area who are higher than protection level can't walk through higher levels only who under protection

<3 hope u guys like it
 
Last edited:
Nice the free script and the break-down so we can learn as well!

Thanks a 1000000000x ! @EvilSkillz
 
I'm uploaded wrong code to github, but now i put the alright, he said that is a good idea.
 
Yes, i'm mistake in pull request, but now thats fine.
 
@EvilSkillz

Hey bro, the players who are below the protection level. Other players can walk onto them while they are on the glowing switch tile/ depot tile as well.
 
Actually bro it's getting the same result. Players still walking onto Players < Protection level while they are on the Depot Tile.

I was messing around for like 3 hours tonight and I am not giving up yet but I am turning back to you, maybe you can fix it faster than I can learn what i'm doing.

@EvilSkillz
 
don't add the first code :)
get a new clean player.cpp

and change in canWalkThroughEx
change PROTECTIONZONE to NONE
i tested it by my self
 
But bro if I do that then players can not walk through players below protection level anymore outside of the safe zone
@EvilSkillz
 
No works. I test it.
i change in player.cpp:
return playerTile && playerTile->hasFlag(TILESTATE_NONE);
 
Back
Top