• 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] GMs can see invisible creatures! - by the Black Onix Team.

Pedro B.

OpenTibia Official Dev
Joined
Aug 8, 2007
Messages
127
Reaction score
2
Location
Brazil
A small code that the BlackOnix Team made :p
At player.h, public, add this:
Code:
virtual bool canSeeInvisibility() const {return hasFlag(PlayerFlag_CanSenseInvisibility) || getAccountType() >= ACCOUNT_TYPE_GAMEMASTER;}

Then, replace your function bool Player::canSeeCreature(const Creature* creature) const on player.cpp with this:
Code:
bool Player::canSeeCreature(const Creature* creature) const
{
	if(creature->isInvisible() && !creature->getPlayer() && !canSeeInvisibility())
		return false;
	return true;
}

Done =)
Hope you liked it.
 
hehe, cool.
But it's only to use cheats :p
Btw, what's the Black Onix Team?
 
Nice code, small and useful, added it in TheForgottenServer, but with a minor modification.
 
Is a team that will have a really nice RPG ot :O
We'll pwn, thats all you need to know :p

@Tala
what change? o0
I saw on the SVN... you used it on the Creature::canSee~
but this way using utana vid will be useless against monsters :O
 
Is a team that will have a really nice RPG ot :O
We'll pwn, thats all you need to know :p

@Tala
what change? o0
I saw on the SVN... you used it on the Creature::canSee~
but this way using utana vid will be useless against monsters :O

The modification I did was to use accessLevel instead of gamemaster account type, so gamemasters on their mortal characters can not see invisible monsters.
 
LoL and btw maybe I'm being dumb or stupid or rude but don't you all mean black ONYX? =]
 
Back
Top