walkingdragon
Advanced OT User
- Joined
- Sep 9, 2008
- Messages
- 3,620
- Reaction score
- 190
I need help to make people able to walk through pets/summons (as if they had /ghost on but visible)
bool Player::canWalkthrough(const Creature* creature) const
{
if(!creature)
return true;
if(creature == this)
return false;
const Player* player = creature->getPlayer();
if(!player)
return false;
if(g_game.getWorldType() == WORLD_TYPE_NO_PVP && player->getTile()->ground
&& player->getTile()->ground->getID() != ITEM_GLOWING_SWITCH)
return true;
return player->isGhost() && getGhostAccess() < player->getGhostAccess();
}
You have to edit source :/
player.cpp, this part:
Code:bool Player::canWalkthrough(const Creature* creature) const { if(!creature) return true; if(creature == this) return false; const Player* player = creature->getPlayer(); if(!player) return false; if(g_game.getWorldType() == WORLD_TYPE_NO_PVP && player->getTile()->ground && player->getTile()->ground->getID() != ITEM_GLOWING_SWITCH) return true; return player->isGhost() && getGhostAccess() < player->getGhostAccess(); }
Where do I put this?
I only showed you what part you need to editYou have to edit source :/
I only showed you what part you need to edit
BTW It's the source code, I don't think you know what is it or how to compile, try looking around for help ;S