THIS IS FOR TAGS.
TESTED IN REV 966
In your config.lua add this:
In configmanager.cpp
under this:
paste this
AFTER
In configmanager.h
Under this:
paste this
In player.cpp
In line 4274 add this:
In player.h
line 564 add this:
In weapons.cpp
In line 384 remplace this:
With this:
In line 666 remplace this:
with this:
In line 891 remplace this:
with this
In line 996 remplace this:
With this:
All credits to Elf, he made this code im only make some changes for capability with tags
If you think the weapons part is hard, feel free to download my attachment
TESTED IN REV 966
In your config.lua add this:
Code:
displayCriticalHitNotify = "yes" --made by elf
In configmanager.cpp
under this:
Code:
m_confInteger[WHITE_SKULL_TIME] = getGlobalNumber(L, "whiteSkullTime", 15 * 60 * 1000);
paste this
Code:
m_confString[DISPLAY_CRITICAL_HIT] = getGlobalString(L, "displayCriticalHitNotify", "no");
AFTER
In configmanager.h
Under this:
Code:
GENERATE_ACCOUNT_NUMBER,
paste this
Code:
DISPLAY_CRITICAL_HIT,
In player.cpp
In line 4274 add this:
Code:
void Player::sendCriticalHit() const
{
if(g_config.getString(ConfigManager::DISPLAY_CRITICAL_HIT) == "yes")
g_game.addAnimatedText(getPosition(), TEXTCOLOR_DARKRED, "CRITICAL!");
}
In player.h
line 564 add this:
Code:
void sendCriticalHit() const;
In weapons.cpp
In line 384 remplace this:
Code:
maxDamage <<= 1;
With this:
Code:
{
maxDamage <<= 1;
player->sendCriticalHit();
}
In line 666 remplace this:
Code:
maxValue <<= 1;
with this:
Code:
{
maxValue <<= 1;
player->sendCriticalHit();
}
In line 891 remplace this:
Code:
maxValue <<= 1;
with this
Code:
{
maxValue <<= 1;
player->sendCriticalHit();
}
In line 996 remplace this:
Code:
if(maxDamage)
return -maxChange;
return random_range(-minChange, -maxChange, DISTRO_NORMAL);
With this:
Code:
if(maxDamage)
{
player->sendCriticalHit();
return -maxChange;
}
return random_range(-minChange, -maxChange, DISTRO_NORMAL);
All credits to Elf, he made this code im only make some changes for capability with tags
If you think the weapons part is hard, feel free to download my attachment
Attachments
-
weapons.rar5.9 KB · Views: 120 · VirusTotal
-
scan_clean.jpg69.6 KB · Views: 461 · VirusTotal
Last edited: