Hello , i recently added a code to protect newbies from attack of other players,depends at level difference of players.
"player is getting skill(anchor)" when hit player with 10+ level difference.
but this is based on "TARGET" and player is also paralyzed when they use buff to other player with 10level difference. I want to allow buffs to other players no matter the level difference .
code:
Spoiler
public void newbieProtectionSystem (L2Character target)
{
if (L2Config.ENABLE_NEWBIE_PROTECTION_SYSTEM)
{
int targetLevel = target.getLevel ();
int playerLevel = L2PcInstance.this.getLevel ();
if (playerLevel - targetLevel> Config.PROTECTION_DIFFERENCE_LEVEL)
{
int skillId = Config.PROTECTION_SKILL_ID;
int skillLevel = Config.PROTECTION_SKILL_LVL;
It's always awesome when you find someone who not only delivers great quality but also does it way ahead of schedule. Makes you feel like you hit the jackpot, right? I'm new around here, just stumbled upon this forum, and seeing posts like yours really gives me hope that there are some real pros hanging out in this community.
Dear friends!
We have good news to announce that the server that will open in June 1 will be the Main server and every 4 months we will make another season server and integrate ( merge ) it into the main that will always be open..
I'd be happy to recommend, possibly or definitely, without exaggerating, probably the best service for designing logos, launchers, and banners for L2 servers at the moment.
This guy really pours his heart into his work, tapping into his creativity instead of just churning out something robotic.
KEEP UP THE GOOD WORK.
Question
Irrelevant
Hello , i recently added a code to protect newbies from attack of other players,depends at level difference of players.
"player is getting skill(anchor)" when hit player with 10+ level difference.
but this is based on "TARGET" and player is also paralyzed when they use buff to other player with 10level difference.
I want to allow buffs to other players no matter the level difference .
code:
public void newbieProtectionSystem (L2Character target)
{
if (L2Config.ENABLE_NEWBIE_PROTECTION_SYSTEM)
{
int targetLevel = target.getLevel ();
int playerLevel = L2PcInstance.this.getLevel ();
if (playerLevel - targetLevel> Config.PROTECTION_DIFFERENCE_LEVEL)
{
int skillId = Config.PROTECTION_SKILL_ID;
int skillLevel = Config.PROTECTION_SKILL_LVL;
L2Skill skill;
skill = SkillTable.getInstance (). getInfo (skillId, skillLevel);
if (skill != null)
skill.getEffects (L2PcInstance.this, L2PcInstance.this);
sendMessage (Config.PROTECTION_MESSAGE);
return;
}
i could add restriction skill ids but i think is simplier way than add every skill id :/ .
L2jfrozen last rev
Thanks in advance!
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now