Jump to content

Recommended Posts

  • 2 weeks later...
Posted

can some1 help me adapt this code to mobius? ill be glad 

### Eclipse Workspace Patch 1.0
#P aaEpilogue Core Synched
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 11)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -89,6 +89,7 @@
import com.l2jserver.gameserver.instancemanager.ItemsOnGroundManager;
import com.l2jserver.gameserver.instancemanager.QuestManager;
import com.l2jserver.gameserver.instancemanager.SiegeManager;
+import com.l2jserver.gameserver.instancemanager.SoundManager.Versus;
import com.l2jserver.gameserver.instancemanager.TerritoryWarManager;
import com.l2jserver.gameserver.model.BlockList;
import com.l2jserver.gameserver.model.Elementals;
@@ -5811,12 +5812,18 @@
}
}
 
+ Versus vs;
+
/**
* Increase the pvp kills count and send the info to the player
*
*/
public void increasePvpKills(L2Character target)
{
+ if (vs == null)
+ vs = new Versus(this);
+ else
+ vs.increaseKills();
if (target instanceof L2PcInstance
&& AntiFeedManager.getInstance().check(this, target))
{
Index: java/com/l2jserver/gameserver/instancemanager/SoundManager.java
===================================================================
--- java/com/l2jserver/gameserver/instancemanager/SoundManager.java (revision 0)
+++ java/com/l2jserver/gameserver/instancemanager/SoundManager.java (working copy)
@@ -0,0 +1,96 @@
+package com.l2jserver.gameserver.instancemanager;
+
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
+import com.l2jserver.gameserver.network.serverpackets.PlaySound;
+import com.l2jserver.util.Rnd;
+
+
+
+public class SoundManager //by xdem
+{
+ final static int MilisBetweenMultiKills = 5000;
+
+ public static enum SoundFile
+ {
+ DUMMY("null"),//1 kill, not used
+ DOUBLE_KILL("doublekill"),
+ TRIPLE_KILL("triplekill"),
+ QUADRA_KILL("quadrakill"),
+ PENTA_KILL("pentakill"),
+ LEGENDARY_KILL("legendary");
+
+ private final String FileName;
+
+ SoundFile(String FileName)
+ {
+ this.FileName = FileName;
+ }
+
+ public String getFileName()
+ {
+ return FileName;
+ }
+
+
+ public static SoundFile getSoundFile(int i)
+ {
+ return SoundFile.values()[i];
+ }
+ }
+
+ public static void playSound(Versus vs)
+ {
+ PlaySound sound;
+ int level = vs.getKillLevel();
+ level = level > 5 ? 5 : level;
+ String s = SoundFile.getSoundFile(level).getFileName()+Rnd.get(1, 3);
+ sound = new PlaySound(1, s, 0, 0, 0, 0, 0);
+ExShowScreenMessage msg = new ExShowScreenMessage(vs.getPlayer().getName() +" has scored a "+SoundFile.getSoundFile(level).toString().replace("_", " ")+"!", 4000);
+ vs.getPlayer().sendPacket(msg);
+ vs.getPlayer().sendPacket(sound);
+ for (L2Character ch : vs.getPlayer().getKnownList().getKnownCharacters())
+ {
+ if (ch instanceof L2PcInstance)
+ {
+ ch.sendPacket(msg);
+ ch.sendPacket(sound);
+ }
+ }
+ }
+
+ public static class Versus
+ {
+ private long _lastKillMs;
+ private int _killLevel;
+ final L2PcInstance _player;
+
+ public Versus(L2PcInstance player)
+ {
+ _player = player;
+ _lastKillMs = System.currentTimeMillis();
+ }
+
+ public void increaseKills()
+ {
+ if (_lastKillMs + MilisBetweenMultiKills > System.currentTimeMillis())
+ _killLevel++;
+ else
+ _killLevel = 0;
+ _lastKillMs = System.currentTimeMillis();
+ if (_killLevel > 0)
+ playSound(this);
+ }
+
+ public int getKillLevel()
+ {
+ return _killLevel;
+ }
+
+ public L2PcInstance getPlayer()
+ {
+ return _player;
+ }
+ }
+}
\ No newline at end of file
Posted

 

can some1 help me adapt this code to mobius? ill be glad 

### Eclipse Workspace Patch 1.0
#P aaEpilogue Core Synched
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 11)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -89,6 +89,7 @@
import com.l2jserver.gameserver.instancemanager.ItemsOnGroundManager;
import com.l2jserver.gameserver.instancemanager.QuestManager;
import com.l2jserver.gameserver.instancemanager.SiegeManager;
+import com.l2jserver.gameserver.instancemanager.SoundManager.Versus;
import com.l2jserver.gameserver.instancemanager.TerritoryWarManager;
import com.l2jserver.gameserver.model.BlockList;
import com.l2jserver.gameserver.model.Elementals;
@@ -5811,12 +5812,18 @@
}
}
 
+ Versus vs;
+
/**
* Increase the pvp kills count and send the info to the player
*
*/
public void increasePvpKills(L2Character target)
{
+ if (vs == null)
+ vs = new Versus(this);
+ else
+ vs.increaseKills();
if (target instanceof L2PcInstance
&& AntiFeedManager.getInstance().check(this, target))
{
Index: java/com/l2jserver/gameserver/instancemanager/SoundManager.java
===================================================================
--- java/com/l2jserver/gameserver/instancemanager/SoundManager.java (revision 0)
+++ java/com/l2jserver/gameserver/instancemanager/SoundManager.java (working copy)
@@ -0,0 +1,96 @@
+package com.l2jserver.gameserver.instancemanager;
+
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
+import com.l2jserver.gameserver.network.serverpackets.PlaySound;
+import com.l2jserver.util.Rnd;
+
+
+
+public class SoundManager //by xdem
+{
+ final static int MilisBetweenMultiKills = 5000;
+
+ public static enum SoundFile
+ {
+ DUMMY("null"),//1 kill, not used
+ DOUBLE_KILL("doublekill"),
+ TRIPLE_KILL("triplekill"),
+ QUADRA_KILL("quadrakill"),
+ PENTA_KILL("pentakill"),
+ LEGENDARY_KILL("legendary");
+
+ private final String FileName;
+
+ SoundFile(String FileName)
+ {
+ this.FileName = FileName;
+ }
+
+ public String getFileName()
+ {
+ return FileName;
+ }
+
+
+ public static SoundFile getSoundFile(int i)
+ {
+ return SoundFile.values()[i];
+ }
+ }
+
+ public static void playSound(Versus vs)
+ {
+ PlaySound sound;
+ int level = vs.getKillLevel();
+ level = level > 5 ? 5 : level;
+ String s = SoundFile.getSoundFile(level).getFileName()+Rnd.get(1, 3);
+ sound = new PlaySound(1, s, 0, 0, 0, 0, 0);
+ExShowScreenMessage msg = new ExShowScreenMessage(vs.getPlayer().getName() +" has scored a "+SoundFile.getSoundFile(level).toString().replace("_", " ")+"!", 4000);
+ vs.getPlayer().sendPacket(msg);
+ vs.getPlayer().sendPacket(sound);
+ for (L2Character ch : vs.getPlayer().getKnownList().getKnownCharacters())
+ {
+ if (ch instanceof L2PcInstance)
+ {
+ ch.sendPacket(msg);
+ ch.sendPacket(sound);
+ }
+ }
+ }
+
+ public static class Versus
+ {
+ private long _lastKillMs;
+ private int _killLevel;
+ final L2PcInstance _player;
+
+ public Versus(L2PcInstance player)
+ {
+ _player = player;
+ _lastKillMs = System.currentTimeMillis();
+ }
+
+ public void increaseKills()
+ {
+ if (_lastKillMs + MilisBetweenMultiKills > System.currentTimeMillis())
+ _killLevel++;
+ else
+ _killLevel = 0;
+ _lastKillMs = System.currentTimeMillis();
+ if (_killLevel > 0)
+ playSound(this);
+ }
+
+ public int getKillLevel()
+ {
+ return _killLevel;
+ }
+
+ public L2PcInstance getPlayer()
+ {
+ return _player;
+ }
+ }
+}
\ No newline at end of file

 

thats my code and for your info its coded in a way that needs the least of adaption, could even work on a different mmo with 2-3 edits and you can't apply it by urself?

Posted

thats my code and for your info its coded in a way that needs the least of adaption, could even work on a different mmo with 2-3 edits and you can't apply it by urself?

Like i said i cant.  :(  

I just take this code from one spanish ( i think) forum posted by You. Unfortunately i dont have skills to adapt it :)) mby if i know actual and correct names of .java to import. 

Posted

Like i said i cant.   :(

I just take this code from one spanish ( i think) forum posted by You. Unfortunately i dont have skills to adapt it :)) mby if i know actual and correct names of .java to import. 

 

I dont have acc on spanish forums, probably a wannabe/leecher pretends my work as his, can you give me a link?

Posted

This project lindvior cannot play online, only play localhost... -.-

No, you can use it for an online server as well, not just localhost.

Posted

No, you can use it for an online server as well, not just localhost.

 

 

 

This is error that persisted from several days with external ip. In localhost not have problem.

 

 

 

 

Starting LoginServer.
 
[13:08:37]  INFO Loaded 127 server names
Exception in thread "main" java.net.BindException: Cannot assign requested addre
ss: JVM_Bind
        at java.net.DualStackPlainSocketImpl.bind0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
        at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
        at java.net.PlainSocketImpl.bind(Unknown Source)
        at java.net.ServerSocket.bind(Unknown Source)
        at java.net.ServerSocket.<init>(Unknown Source)
        at lineage2.loginserver.LoginServer.checkFreePorts(LoginServer.java:100)
 
        at lineage2.loginserver.LoginServer.main(LoginServer.java:127)
 
Server terminated abnormaly ...
 
 
Server terminated ...
 
Press any key to continue . . .
 
 
 
 
I've test other servers, HI5 and many datapack and working properly. if you say that can work online, can you help me please?
Guest
This topic is now closed to further replies.



  • 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..