All pastes #898254 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-02-10 05:06 UTC
rendered paste body
void OnKillPlayer(Player * pPlayer, Player * pVictim)
{
	if(pPlayer == pVictim) /* That fag! */
		return; 

	pPlayer->ModUInt32Value(PLAYER_FIELD_COINAGE, 10000);
	pPlayer->BroadcastMessage("You have killed %s and earned 1 gold.", pVictim->GetName());

	std::stringstream msg;
	msg << pVictim->GetName();
	msg << " has been slain by ";
	msg << pPlayer->GetName();
	sWorld.SendWorldWideScreenText(msg.str().c_str());

	if(pVictim->GetUInt32Value(PLAYER_FIELD_COINAGE) > 5000)
	{
		pVictim->ModUInt32Value(PLAYER_FIELD_COINAGE, -5000);
		pVictim->BroadcastMessage("You have been killed by %s and lost 50 silver.", pPlayer->GetName());
		//pPlayer->BroadcastMessage("You have been killed by %s and lost 50 silver.", pVictim->GetName());
	}
	else
	{
		pVictim->BroadcastMessage("You have been killed by %s.", pPlayer->GetName());
		//pPlayer->BroadcastMessage("You have been killed by %s.", pVictim->GetName());
	}
}