Dilio
Owner of Project Thala
Well, this is just a very simple code I implemented to my server a while back and I no longer use. Before everyone says anything, I got the idea from Unline but made it after I realized Azi's did not show it on the characters name. Uhm, alright, here goes:
Note: Make sure you are not using storage value 2000
Combat.cpp:
Under -
Add -
Player.cpp:
Under -
Add -
Basically this shows on the persons name (PvP Disabled) or (PvP Enabled) and it works in game with the storage value 2000
2000 - 1 Disabled
2000 - 2 Enabled
Credits:
Coding - Me
Idea - Unline and Azi
Note: Make sure you are not using storage value 2000
Combat.cpp:
Under -
Code:
if(target->getLevel() < protectionLevel || attacker->getLevel() < protectionLevel)
return true;
Add -
Code:
std::string tar;
target->getStorage(2000, tar);
int32_t targ = atoi(tar.c_str());
std::string at;
attacker->getStorage(2000, at);
int32_t att = atoi(at.c_str());
if(targ == 1 || att == 1)
return true;
Player.cpp:
Under -
Code:
if(guildId)
{
if(lookDistance == -1)
s << " You are ";
else
s << " " << (sex % 2 ? "He" : "She") << " is ";
s << (rankName.empty() ? "a member" : rankName)<< " of the " << guildName;
if(!guildNick.empty())
s << " (" << guildNick << ")";
s << ".";
}
Add -
Code:
if(!hasCustomFlag(PlayerCustomFlag_HideLevel))
{
std::string strValue;
getStorage(2000, strValue);
int32_t value = atoi(strValue.c_str());
s << (value == 2 ? " (PvP Enabled)" : " (PvP Disabled)");
}
Basically this shows on the persons name (PvP Disabled) or (PvP Enabled) and it works in game with the storage value 2000
2000 - 1 Disabled
2000 - 2 Enabled
Credits:
Coding - Me
Idea - Unline and Azi