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

{C++} PVP System (onTarget) and Only have skull when deal damage

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
665
Hello.
Anyone can give/make code for me:
1) When I target player i can only damage him from spell/melee (the player targeted) if someone is near targeted player he dont receive any damage (only person who I target);
2) Now we have something like that: if we target opponent we receive skull anyone know how to edit this to that: If we DEAL damage to opponent we receive skull (if we target we don't receive white skull only when we deal damage)
 
You are an example of persistence and perseverance, I really hope you get what you want, too bad programmers do not have a heart = (.

I have to comment this.

No one is getting anything out of making free scripts. So when someone sacrifices some of his free time, he's doing people a favor. But according to you, if those programmers don't make you a favor, they are heartless.

Some programmers (some popular ones) have a very bad attitude. I wont say any names but you might have recognized them. With their attitude they wipe off all the good things they have done by acting like ass-holes. And they have this "do it yourself you lazy noob" - way of talking. It's not the most polite way to talk to people. It's like they think we owe them something. I've contributed some to the OT community, maybe not as much as some other people have done, but I have contributed pretty much. I have never asked the get anything back, and I have never acted like an ass-hole because of my expectations. If I would want anything back I'd put a price-tag on my work. But as long as I release non-copyrighted scripts/free support to an open-source community I shouldn't expect anything back.

But we might ask ourselves, do these ass-holes and non-ass-holes deserve something for their work? The answer, even if it's not relevant, is yes. They do deserve something. But if I give you a present, I shouldn't be mean to you if you don't give me a present back. But unfortunately, some people have in mind that you should give them a present back. And don't get me wrong, programmers are not just after money, they also like to see people "like" their work. Getting attention is like food, if you are a massive consumer, you'll hurt yourself.

I know some people might disagree, so correct me if I'm wrong.
 
Last edited:
Although it's not a full help (not familiar with C++), you can see that in 'player.cpp':
Code:
	if(targetPlayer->getSkull() != SKULL_NONE || canRevenge(targetPlayer->getGUID()))
		targetPlayer->sendCreatureSkull(this);
	else if(!hasCustomFlag(PlayerCustomFlag_NotGainSkull))
	{
		setSkull(SKULL_WHITE);
		g_game.updateCreatureSkull(this);
	}

(Starting on line 3792) It gives them a skull in the Player::onTarget function, via. the setSkull function.

I'm not sure how to migrate this to "when player X does damage to player Y", but maybe you can figure it out (or someone else knows).
 
Back
Top