PDA

View Full Version : [Core Patch] Free for All Pvp



EzMaN
17-01-09, 10:12 PM
Ever wanted your server to have unrestricted Free-For-All Pvp? It's quite simple, all you need is your own core from which you can compile. Here's what you need to do:

1. Go into your core and open the file Player.cpp
2. Search for the phrase "Player::PvPToggle()"
3. Highlight the entire PvpToggle() Function and replace it with this:


void Player::PvPToggle()
{
if(IsFFAPvPFlagged())
{
RemoveFFAPvPFlag();
}
else
{
SetFFAPvPFlag();
}
}

Usage: After compiling your server with this edited function, any player that uses /pvp will be thrown into the FFA state. Any player on their faction, or the opposite faction will be able to attack the player so long as they have the flag on as well.

Note:
I'm going to tell you off the bat that if a player is about to die, he can simply do /pvp again to leave FFA pvp. If you want to put in a check to see if players are in combat, by all means, add it in. I'm not going to hold your hand through this.Credits/Orginally Posted by "Gastricpenguin"