Hello guyz.
Next feature published by me, (special thanks to Gesior).
Q: Łat dat doin'?
A: So, i wanna fix PvP at my server, but i dont wanna touch mobs, so if i increase armor, players will be OP against the monsters.
But hey, players deals 50% damage against player, and 100% against monsters, so it must be written somewhere, and yes, this is my feature.
combat.cpp
Lets look for that function:
and find that:
change = change / 2;
what does it mean? if target is player, then damage is divided by 2. (50% dmg to players).
So, lets change it:
Its pretty messed ,but it says, `if target have <= 100 lv, and u deal physical dmg, he recive /100*34 (so, 34%) dmg, if not physical, 45%.
But you must be careful, some spells use physical dmg, so if you dont wanna this, just delete it.
Have fun and enjoy,
Erexo.
Next feature published by me, (special thanks to Gesior).
Q: Łat dat doin'?
A: So, i wanna fix PvP at my server, but i dont wanna touch mobs, so if i increase armor, players will be OP against the monsters.
But hey, players deals 50% damage against player, and 100% against monsters, so it must be written somewhere, and yes, this is my feature.
combat.cpp
Lets look for that function:
Code:
bool Combat::CombatHealthFunc(Creature* caster, Creature* target, const CombatParams& params, void* data)
and find that:
Code:
if(change < 0 && caster && caster->getPlayer() && target->getPlayer() && target->getPlayer()->getSkull() != SKULL_BLACK)
{
[...]
}
change = change / 2;
what does it mean? if target is player, then damage is divided by 2. (50% dmg to players).
So, lets change it:
Code:
if(change < 0 && caster && caster->getPlayer() && target->getPlayer() && target->getPlayer()->getSkull() != SKULL_BLACK)
{
if(target->getPlayer()->getLevel() <= 100)
{
if(params.combatType == COMBAT_PHYSICALDAMAGE)
change = change / 100 * 34;
else
change = change / 100 * 45;
}
if(target->getPlayer()->getLevel() >= 101 && target->getPlayer()->getLevel() <= 300)
{
if(params.combatType == COMBAT_PHYSICALDAMAGE)
change = change / 100 * 28;
else
change = change / 100 * 40;
}
if(target->getPlayer()->getLevel() >= 301 && target->getPlayer()->getLevel() <= 499)
{
if(params.combatType == COMBAT_PHYSICALDAMAGE)
change = change / 100 * 25;
else
change = change / 100 * 38;
}
if(target->getPlayer()->getLevel() >= 500)
{
if(params.combatType == COMBAT_PHYSICALDAMAGE)
change = change / 100 * 23;
else
change = change / 100 * 36;
}
}
Its pretty messed ,but it says, `if target have <= 100 lv, and u deal physical dmg, he recive /100*34 (so, 34%) dmg, if not physical, 45%.
But you must be careful, some spells use physical dmg, so if you dont wanna this, just delete it.
Have fun and enjoy,
Erexo.
Last edited: