xResilienT Posted May 7, 2014 Posted May 7, 2014 Is good for post, but the "Server Discussion" isn't visible to registered users. Thanks. I send you PM check it
megahits Posted May 16, 2014 Posted May 16, 2014 Who can share with me the full mobius source and mby geo too for it,or any stable pack that i can work on lindvior.
DrachaVonDrachen Posted May 17, 2014 Posted May 17, 2014 you can find svn links and geo at first post ..
karolczuk Posted May 23, 2014 Posted May 23, 2014 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
xdem Posted May 23, 2014 Posted May 23, 2014 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?
karolczuk Posted May 26, 2014 Posted May 26, 2014 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.
xdem Posted May 27, 2014 Posted May 27, 2014 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?
Mobius Posted May 28, 2014 Author Posted May 28, 2014 Have some problems with forum host, I hope I will resolve it in the next days.
Tachini Posted May 31, 2014 Posted May 31, 2014 This project lindvior cannot play online, only play localhost... -.-
Mobius Posted May 31, 2014 Author Posted May 31, 2014 This project lindvior cannot play online, only play localhost... -.- No, you can use it for an online server as well, not just localhost.
Tachini Posted May 31, 2014 Posted May 31, 2014 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?
Mobius Posted May 31, 2014 Author Posted May 31, 2014 Made a new forum at http://mobius.great-forum.com Hopefully this one will not be banned for elegal activities :PIt kinda draft, will polish looks later.
Recommended Posts