Code
#include "ScriptPCH.h"
#include "ScriptMgr.h"
class low_lvl_die : public PlayerScript
{
public:
low_lvl_die() : PlayerScript("low_lvl_die") {}
void OnPVPKill(Player *killer, Player *killed)
{
//Check config
if (sWorld->getBoolConfig(CONFIG_CHECK_LVL_DIE))
{
//Check lvl
if (killed->getLevel() < 50)
{
if (killer->getLevel() > 60)
{
killer->CastSpell(killer,45317,true); //-10% прочности
killer->CastSpell(killer,45317,true); //-10% прочности
killer->CastSpell(killer,45317,true); //-10% прочности
killer->CastSpell(killer,45317,true); //-10% прочности
killer->CastSpell(killer,45317,true); //-10% прочности
killer->CastSpell(killer,2880,true); //Stun 5 sec
}
}
}
}
};
void AddSC_low_lvl_die()
{
new low_lvl_die;
}
В world.h
Code
m_bool_configs[CONFIG_CHECK_LVL_DIE] = sConfig->GetBoolDefault("CheckLvL.Die", false);
P.S. Автор патча очень суровый.
Quote
killer->getLevel()-1; // -1 lvl after killing