Jump to content
  • 0

[REQUEST] Lord Announce.


zec88

Question

Kalimera. Tha mporouse na voithisei kanenas me ti Java(code) wste otan mpainei enas Clan Lord Leader Na To leei se announce px. Announcements:Lord of Aden hus just logged in. ENdiaferomai Gia L2J Server Interlude Pack. Thanks.

 

EDIT:Lathos section nomizw, mperdeutika an mporei kapoios as to kanei move.

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Kalimera. Tha mporouse na voithisei kanenas me ti Java(code) wste otan mpainei enas  Clan Lord Leader Na To leei se announce px. Announcements:Lord of Aden hus just logged in. ENdiaferomai Gia L2J Server Interlude Pack. Thanks.

 

EDIT:Lathos section nomizw, mperdeutika an mporei kapoios as to kanei move.

 

nomizo oti exei sta properties kati tetia, an kai nomizo oti mono i gms,admins vlepoun se announce otan beni enas clan leder! tha to psakso :P

 

an xrisimopois Umrella Pack tote pigene umbrella.properties

 

# Announce it when a clan leader logs in

ShowClanLeaderLogin = True

Link to comment
Share on other sites

  • 0

To exw dei se arketous server auto pou sou lew :)

kati vrika sto forum tou l2jserver an leitourgisei tha to postarw kai edw na uparxei kai gia ta max cheaters member!!! :P

 

 

EDITED: Telika auto doulevei men.. alla oxi swta. An kapoios mporei na to "diothosi" as to kanei http://www.l2jserver.com/forum/thread.php?threadid=24690&hilight=lord+announce

Thanks.

Link to comment
Share on other sites

  • 0

To exw dei se arketous server auto pou sou lew  :)

kati vrika sto forum tou l2jserver an leitourgisei tha to postarw kai edw  na uparxei kai gia ta max cheaters member!!!  :P

 

 

EDITED: Telika auto doulevei men.. alla oxi swta. An kapoios mporei na to "diothosi" as to kanei http://www.l2jserver.com/forum/thread.php?threadid=24690&hilight=lord+announce

Thanks.

 

dld ti problem exei

Link to comment
Share on other sites

  • 0

Otan mpaineis o opoiosdipote character xwris na einai lord to leei... kai na exeis kastro leei lord of castle with nane nocastle logged in to the game.

Alla den kserw na to ftiaksw egw :-\ EGw exw dei   Otan mpainei kapoios Lord Leei Announcements: Lord of (castle) (name char) has just logged in.

 

EDIT: Den pisteva oti einai toso duskolo  sto na ftiaxtei to code gia lord announce. :P

Link to comment
Share on other sites

  • 0

1. English forum...speak english for the sake of god.

2. DutyKiller you spam...Your post is TOTALLY pointless and useless..Someone -1 pl0x

3. This is done by java, in the EnterWorld.java file.

 

Should look smth like this

 

If (activeChar.isCastleLord( x ))

{

AnnounceToAll("Castle lord " + activeChar.getname + " of castle " + castle(x).getname + " has logged in.")

}

Where x = the code of the castle...(1-9)

 

THIS IS NOT A CORRECT CODE! I have wrote the way how it should look like. If you wanna get it working and you dont know java let me know. I will make a share of this kind...

 

4. About "ShowClanLeaderLogin = True" that is for L2Emu only...

Link to comment
Share on other sites

  • 0

Check this  ;D

 

 

Index: D:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java
===================================================================
--- D:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java	(revision 933)
+++ D:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java	(working copy)
@@ -36,6 +36,7 @@
import net.sf.l2j.gameserver.communitybbs.Manager.RegionBBSManager;
import net.sf.l2j.gameserver.datatables.MapRegionTable;
import net.sf.l2j.gameserver.handler.AdminCommandHandler;
+import net.sf.l2j.gameserver.instancemanager.CastleManager;
import net.sf.l2j.gameserver.instancemanager.PetitionManager;
import net.sf.l2j.gameserver.model.L2Clan;
import net.sf.l2j.gameserver.model.L2Effect;
@@ -287,7 +288,15 @@
		}

		if (activeChar.getClan() != null)
+		{
			activeChar.sendPacket(new PledgeSkillList(activeChar.getClan()));
+			int castleId = CastleManager.getCharCastle(activeChar);
+			if (activeChar.isCastleLord(castleId) && castleId!=-1);
+			{
+				Announcements.getInstance().announceToAll("The Catle lord from "
+						+CastleManager.castleName(castleId)+", has Logged into the game.");
+			}
+		}

		RegionBBSManager.getInstance().changeCommunityBoard();

Index: D:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/instancemanager/CastleManager.java
===================================================================
--- D:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/instancemanager/CastleManager.java	(revision 933)
+++ D:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/instancemanager/CastleManager.java	(working copy)
@@ -26,6 +26,7 @@
import net.sf.l2j.L2DatabaseFactory;
import net.sf.l2j.gameserver.model.L2Clan;
import net.sf.l2j.gameserver.model.L2Object;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.Castle;


@@ -50,7 +51,7 @@
     
     // =========================================================
     // Data Field
-    private List<Castle> _Castles;
+    private static List<Castle> _Castles;
     
     // =========================================================
     // Constructor
@@ -91,7 +92,7 @@

     public void reload()
     {
-    	this.getCastles().clear();
+    	CastleManager.getCastles().clear();
     	this.load();
     }

@@ -266,9 +267,56 @@
         return -1;
     }

-    public final List<Castle> getCastles()
+    public final static List<Castle> getCastles()
     {
         if (_Castles == null) _Castles = new FastList<Castle>();
         return _Castles;
     }
+    
+    public static int getCharCastle(L2PcInstance activeChar)
+    {
+    	L2Clan clan = activeChar.getClan();
+    	if (clan == null) return -1;
+        Castle castle;
+        for (int i = 0; i < getCastles().size(); i++)
+        {
+            castle = getCastles().get(i);
+            if (castle != null && castle.getOwnerId() == clan.getClanId()) return i;
+        }
+        return -1;
+    	
+    }
+    
+    public static String castleName(int id)
+    {
+		String _castleName;
+    	if (id<1||id>9)
+    	{
+    		_castleName = "noCastle";
+    		return _castleName;
+    	}
+    	switch(id)
+    	{
+    	case 1:
+    		return _castleName = "Gludio";
+    	case 2:
+    		return _castleName ="Dion";
+    	case 3:
+    		return _castleName ="Giran";
+    	case 4:
+    		return _castleName ="Oren";
+    	case 5:
+    		return _castleName ="Aden";
+    	case 6:
+    		return _castleName ="Innadril";
+    	case 7:
+    		return _castleName ="Goddard";
+    	case 8:
+    		return _castleName ="Rune";
+    	case 9:
+    		return _castleName ="Schuttgart";
+    	default:
+    		return _castleName ="None";
+    	}
+    }
}
\ No newline at end of file

 

 

It's from L2J Forum !!!

Link to comment
Share on other sites

  • 0

Check this ;D

 

 

Index: D:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java
===================================================================
--- D:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java	(revision 933)
+++ D:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java	(working copy)
@@ -36,6 +36,7 @@
import net.sf.l2j.gameserver.communitybbs.Manager.RegionBBSManager;
import net.sf.l2j.gameserver.datatables.MapRegionTable;
import net.sf.l2j.gameserver.handler.AdminCommandHandler;
+import net.sf.l2j.gameserver.instancemanager.CastleManager;
import net.sf.l2j.gameserver.instancemanager.PetitionManager;
import net.sf.l2j.gameserver.model.L2Clan;
import net.sf.l2j.gameserver.model.L2Effect;
@@ -287,7 +288,15 @@
		}

		if (activeChar.getClan() != null)
+		{
			activeChar.sendPacket(new PledgeSkillList(activeChar.getClan()));
+			int castleId = CastleManager.getCharCastle(activeChar);
+			if (activeChar.isCastleLord(castleId) && castleId!=-1);
+			{
+				Announcements.getInstance().announceToAll("The Catle lord from "
+						+CastleManager.castleName(castleId)+", has Logged into the game.");
+			}
+		}

		RegionBBSManager.getInstance().changeCommunityBoard();

Index: D:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/instancemanager/CastleManager.java
===================================================================
--- D:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/instancemanager/CastleManager.java	(revision 933)
+++ D:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/instancemanager/CastleManager.java	(working copy)
@@ -26,6 +26,7 @@
import net.sf.l2j.L2DatabaseFactory;
import net.sf.l2j.gameserver.model.L2Clan;
import net.sf.l2j.gameserver.model.L2Object;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.Castle;


@@ -50,7 +51,7 @@

    // =========================================================
    // Data Field
-    private List<Castle> _Castles;
+    private static List<Castle> _Castles;

    // =========================================================
    // Constructor
@@ -91,7 +92,7 @@

    public void reload()
    {
-    	this.getCastles().clear();
+    	CastleManager.getCastles().clear();
    	this.load();
    }

@@ -266,9 +267,56 @@
        return -1;
    }

-    public final List<Castle> getCastles()
+    public final static List<Castle> getCastles()
    {
        if (_Castles == null) _Castles = new FastList<Castle>();
        return _Castles;
    }
+    
+    public static int getCharCastle(L2PcInstance activeChar)
+    {
+    	L2Clan clan = activeChar.getClan();
+    	if (clan == null) return -1;
+        Castle castle;
+        for (int i = 0; i < getCastles().size(); i++)
+        {
+            castle = getCastles().get(i);
+            if (castle != null && castle.getOwnerId() == clan.getClanId()) return i;
+        }
+        return -1;
+    	
+    }
+    
+    public static String castleName(int id)
+    {
+		String _castleName;
+    	if (id<1||id>9)
+    	{
+    		_castleName = "noCastle";
+    		return _castleName;
+    	}
+    	switch(id)
+    	{
+    	case 1:
+    		return _castleName = "Gludio";
+    	case 2:
+    		return _castleName ="Dion";
+    	case 3:
+    		return _castleName ="Giran";
+    	case 4:
+    		return _castleName ="Oren";
+    	case 5:
+    		return _castleName ="Aden";
+    	case 6:
+    		return _castleName ="Innadril";
+    	case 7:
+    		return _castleName ="Goddard";
+    	case 8:
+    		return _castleName ="Rune";
+    	case 9:
+    		return _castleName ="Schuttgart";
+    	default:
+    		return _castleName ="None";
+    	}
+    }
}
\ No newline at end of file

 

 

It's from L2J Forum !!!

 

 

this is a problem and I can not correct it. Is it possible to create the code;

Link to comment
Share on other sites

  • 0

some1 convert it to Gracia Final? Does ti work?

 

Dont bump old topics. Its really small thing, so you shouldnt have any problem to add it.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • I can use this folder system for High Five offline server?   The folder does not have a l2.exe file.   Thank you very much if anyone can help me.   https://drive.google.com/file/d/13kU-g_4JJ-sP-kg2F7pqkUOVKmQdubFm/view
    • I know, but...every time I have problem with IP address setup 😞
    • ENGLISH As you know, we have always profiled in the development of Java emulators, we continue to do our favorite thing, and now we have the opportunity to provide you with services in the field of private development of L2 assemblies Essence, Classic and High Five, which we have been doing in recent years, we have not been working on basic builds for a long time and work only on contracts for the world's best projects. These are the best builds we can offer, we have test servers and we can show them to you on the test, and if you are very good at gameplay, you will see a big difference in the quality and detail of the official content compared to the basic builds. These are the best top solutions in the world, which are currently used to implement the largest projects in the world. We guarantee 100% implementation of all official content. If you have any questions about testing, discussions, etc., please contact our studio and we will discuss everything. At the moment, you can get acquainted with the preliminary information and prices for Private L2 contracts here: Private Server packs L2 Essence 464, 447, 388, 362, 286 protocols Private server packs L2Classic Private server pack High Five РУССКИЙ --------------------------------------------- Как вы знаете мы всегда профилировались на разработке в сфере Java эмуляторов, мы продолжаем заниматься своим любимым делом, и сейчас у нас появилась возможность предоставлять вам услуги в сфере приватных разработок L2 сборок Essence, Classic и High Five, которыми мы занимаемся последние годы, мы уже давно не работаем над базовыми сборками и работаем только на контрактах для лучших мировых проектов. Это лучшие сборки, которые мы можем предложить, у нас есть тестовые сервера, и мы можем показать их вам на тесте, и если вы очень хорошо разбираетесь в игровом процессе, вы увидите большую разницу в качестве и детализации официального контента по сравнению с базовыми сборками. Это лучшие топовые решения в мире, которые на данный момент используются для реализации крупнейших проектов в мире. Мы даем гарантии - 100% реализации всего официального контента. По вопросам тестирования, обсуждений и тд - пишите по контактам нашей студии и мы все обсудим. На данный момент вы можете ознакомиться с предварительной информацией и ценами на Приватные контракты L2 тут: Приватные Сборки L2 Essence 464, 447, 388, 362, 286 protocols Приватные Сборки L2Classic Приватная Сборка High Five -------------------------------------------------------------- Contacts: Telegram: https://t.me/L2scripts Whatsapp, Viber: +1 (916) 226 1910 С уважением, Администрация !
    • I can sell it. If you are interested just pm.
    • Its really not that hard to setup a server on a vps.
  • Topics

×
×
  • Create New...