Jump to content
  • 0

Question

Posted (edited)

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;

 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!

 

Edited by Irrelevant

2 answers to this question

Recommended Posts

  • 0
Posted

First of all when you compare level use Math.abs() to avoid negative values such as:

 

if (Math.abs(actor.getLevel() - target.getLevel()) > Config.PROTECTION_DIFFERENCE_LEVEL)
{
  //Executed code 
}

 

Second, i don't really get failed to do. Why don't you simply interrupt any attack/spell in L2Playable.java -> onIntentionCast() and onIntentionAttack() and you make it that way?

  • 0
Posted
2 minutes ago, Kara said:

First of all when you compare level use Math.abs() to avoid negative values such as:

 


if (Math.abs(actor.getLevel() - target.getLevel()) > Config.PROTECTION_DIFFERENCE_LEVEL)
{
  //Executed code 
}

 

Second, i don't really get failed to do. Why don't you simply interrupt any attack/spell in L2Playable.java -> onIntentionCast() and onIntentionAttack() and you make it that way?

i didnt even though about it :P ,i will try and tag you here if i cant or stacked :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • A widespread proxy service, operating through hijacked devices, has been shut down in a cross-industry effort led by Google. The network, known as IPIDEA, functioned by secretly converting millions of personal devices into proxies for malicious actors. The Mechanism of the Scheme The operation distributed hidden code within seemingly legitimate free apps and VPN services. Once installed, this code enrolled the user’s device into a pool of residential IP addresses. These addresses were then sold anonymously, primarily to cybercriminal and state-sponsored groups, to mask the origin of attacks, fraud, and espionage. Key impacts of the network included: Facilitating operations for more than 550 identified threat actors. Exposing unsuspecting device owners to potential legal and security risks by associating their IP addresses with criminal traffic. The Takedown Strategy Google and its partners disrupted the service by: Seizing core operational domains. Using Google Play Protect to detect and remove malicious applications. Coordinating with infrastructure providers to prevent the network from reestablishing itself. The action highlights the necessity of continuous user awareness, developer diligence in code reviews, and proactive industry cooperation to maintain cybersecurity. Front Companies Associated with IPIDEA IPIDEA masked its activities under various brand names, such as: Proxy Brands: 360 Proxy, 922 Proxy, Luna Proxy, IP2World, ABC Proxy. VPN Brands: Door VPN, Radish VPN, Galleon VPN. SDK Brands: PacketSDK, HexSDK (the toolkits used to embed proxy code).   Choosing Ethical Proxy Services Alternatives For lawful purposes like market research, ad verification, or data aggregation, selecting a transparent and consensual provider is essential. Reputable services obtain explicit user permission for their networks and enforce strict compliance measures. Examples of Established Providers: Bright Data: A leading, consent-based residential proxy network. Oxylabs: Provides large-scale proxy solutions for enterprise needs. MoMoProxy: Maintains a large pool of residential IPs for tasks like web scraping.   Only $850/1TB.  https://momoproxy.com   Identifying a Legitimate Provider: A trustworthy service will typically demonstrate: Informed Consent: Networks are built with the clear agreement of participants. Robust Compliance: Proactive systems to prevent abuse and respect website terms. Operational Transparency: Public-facing policies, identifiable corporate structure, and genuine customer support. Conduct thorough due diligence. Opt for providers that are clear about their IP sources and maintain strong anti-abuse policies, ensuring your legitimate activities do not inadvertently support harmful operations.
    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..