Jump to content
  • 0

[REQUEST] Lord Announce.


Question

Posted

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.

12 answers to this question

Recommended Posts

  • 0
Posted

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

  • 0
Posted

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.

  • 0
Posted

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

  • 0
Posted

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

  • 0
Posted

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

  • 0
Posted

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 !!!

  • 0
Posted

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;

  • 0
Posted

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.

Guest
This topic is now closed to further replies.
×
×
  • Create New...