• 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 help with OTServ 9.10 r.6105 - players only walk through eachother in PZ

Rote Faust

New Member
Joined
Dec 24, 2010
Messages
16
Reaction score
1
hello, i have been searching in the sources, and in the forum for an idea of how to make players walk through other players outside of protection zones.

i have OTServ 9.10 r.6105 and as it is now, walkthrough only works in protection zones, i want it to work everywhere. i have spent days editing the source and trying different things, but nothing works. (i am no expert ^_^ )

what happens when you try to walk into the same square with another player, it just says "sorry, not possible" in the white text at the bottom of the game box. it doesn't even try to go in the square with them.

if someone could please help me, i would greatly appreciate it.
Thank you for your time.

===UPDATE===

My server is No-PVP so I should be able to walk through any other player anywhere but the depot tiles. I have the option "enablewalkthrough" set to "true" in config.lua also.
 
Last edited:
That's how the game is made to be. If people could walk through each other outside of the PZ then you couldn't have wars because every time you would trap someone they could just run away. So that's normal and I doubt there is a script for this. Hope this helped :D
 
thanks for the reply, but on no-pvp server you are supposed to be able to walk through other players. That's my fault for not specifying my server type.
I used to play tibia on Honera, and I walked through people all the time.
 
bump...

- - - Updated - - -


I have searched google for "walk through players otland" and everything that came up, either didn't work, or the c++ code wasn't compatible with OTserv 0.6.3 r6105 (compile errors, missing functions like "isGhost" and such)
 
Last edited:
Solved

Thanks for trying to help, but I fixed it myself.

in protocolgame.cpp i changed
[CPP]void ProtocolGame::sendCreatureWalkthrough(const Creature* creature, bool walkthrough)
{
if(canSee(creature)){
NetworkMessage_ptr msg = getOutputBuffer();
if(msg){
TRACK_MESSAGE(msg);
msg->AddByte(0x92);
msg->AddU32(creature->getID());
msg->AddByte(!walkthrough); // isBlocking = !walkthrough
}
}
}[/CPP]
to
[CPP]void ProtocolGame::sendCreatureWalkthrough(const Creature* creature, bool walkthrough)
{
if(canSee(creature)){
NetworkMessage_ptr msg = getOutputBuffer();
if(msg){
TRACK_MESSAGE(msg);
msg->AddByte(0x92);
msg->AddU32(creature->getID());
if (creature->getTile()->hasFlag(TILESTATE_PROTECTIONZONE)){
msg->AddByte(!walkthrough); // isBlocking = !walkthrough
}
else{
msg->AddByte(walkthrough);
}
}
}
}[/CPP] and in player.cpp I changed [CPP]bool Player::canWalkthrough(const Creature* creature) const
{
std::vector<uint32_t>::const_iterator it = std::find(forceWalkthrough.begin(), forceWalkthrough.end(), creature->getID());
if(it != forceWalkthrough.end()){
return true;
}

if(hasFlag(PlayerFlag_CanPassThroughAllCreatures)
|| (creature->getPlayer() && creature->getPlayer()->hasSomeInvisibilityFlag())){
return true;
}

if (creature->getTile() && creature->getTile()->ground
&& creature->getTile()->ground->getID() == ITEM_GLOWING_SWITCH){
return false;
}

if(creature->getPlayer() && creature->getTile()
&& creature->getTile()->hasFlag(TILESTATE_PROTECTIONZONE)){
return true;
}

return (Combat::checkPVPExtraRestrictions(this, creature, true) != RET_NOERROR);
}[/CPP] to [CPP]bool Player::canWalkthrough(const Creature* creature) const
{
std::vector<uint32_t>::const_iterator it = std::find(forceWalkthrough.begin(), forceWalkthrough.end(), creature->getID());
if(it != forceWalkthrough.end()){
return true;
}

if(hasFlag(PlayerFlag_CanPassThroughAllCreatures)
|| (creature->getPlayer() && creature->getPlayer()->hasSomeInvisibilityFlag())){
return true;
}

if (creature->getTile() && creature->getTile()->ground
&& creature->getTile()->ground->getID() == ITEM_GLOWING_SWITCH){
return false;
}

if(creature->getPlayer() && creature->getTile()
&& creature->getTile()->hasFlag(TILESTATE_PROTECTIONZONE)){
return true;
}

if(!creature->getPlayer())
{
return false;
}

return true;
}[/CPP] I can now walkthrough players in and out of PZ, and if I try to walk through a monster, it pushes me back and says "there is not enough room".
 
Back
Top