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

    • Wtb full account or items on l2 warland 
    • https://discord.gg/k53SZ4DM5z   Interlude Client L2Old Pride is a L2 Pride Interlude Based All functional skills (Not archer/mage server)   L2Old Pride Helper (Works like Woundrous Cubic) https://imgur.com/iYqmHQY Farm Zones: Cave of Trials and Elven Ruins (Chaotic) Olympiads: Every 15 days Various Cosmetic Items https://imgur.com/uoeU6Jw https://imgur.com/oCS2Zed PvP Zone: Gludin Village (No-Parties, Disguised) More than 100 new Skills https://imgur.com/6RaPsQV Max Level: 90 https://imgur.com/z4QVJKZ Gaining Xp by PVP https://imgur.com/LRqI31T Purchasable S-grade items +10 or +20 with random chance to enchant +5 Purchasable Custom Items Depends on Tier Mysterious Merchants https://imgur.com/2ZwWyPH Auto Enchant Via PvPing (with low chance) Custom Raid Bosses Siege Every Weekend (Aden, Rune, Giran) Autofarm / Drop Tracker https://imgur.com/Vz3rha6   RATES: • Start Level 80 • Max level 90  • EXP: 5000x • SP: 5000x • ADENA 6000x   ENCHANT: • Maximum enchant S Grade Items: +35. • Maximum enchant Unique/Epic Items: +25. • Maximum enchant Legendary Items: +18. • Maximum enchant Relic Items: +14. •Descriptions for rate at scrolls!   EVENTS: • TEAMS vs TEAMS • CAPTURE THE FLAG • DOMINATION • DEATH MATCH • DICE OF DEATH • CHAOTIC ZONE   OTHERS: Assistance system in pvps. Where support classes are enabled to receive pvp with a low chance, for supporting a party member during pvp. •  /sit to regen HP/MP/CP • Custom Shots Glows https://imgur.com/FLK0DmR • Achievements System • Daily Tasks System • Monthly Tasks System   CUSTOM ARMORS SETS Dread Armor/Titanium Armor Pride Armor Rykros Armor https://imgur.com/SPxoQp1   CUSTOM WEAPONS SETS Unique Weapons Pride Weapons Legendary Weapons Relic Weapons https://imgur.com/kOHNXhS   CUSTOM ACCESSORIES Standard Superior Legendary https://imgur.com/zPqNiiX   CUSTOM JEWELS/TATTOO Legendary Nightmarish https://imgur.com/gcqS28P There are many more features that you will only understand by playing and following. Beta testing server is currently open. Follow us on our discord and join our server to test it.
    • You shouldn't use rev 382, not sure why everyone keep using that.   I don't make changesets for fun, I don't make new revisions for nothing.   Follow the revisions.
    • Your issue isn't related to geoengine at all (as always), rev 410 got improved water movement management.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock