Jump to content
  • 0

[HELP]Announce Lord


Question

4 answers to this question

Recommended Posts

  • 0
Posted

1. Check all configs, maybe it is already implemented.

2. Otherwise use search and add it by your self.

3. If you dont know how to compile or how to add patch/diff -> use search too.

 

Everything is already explained.

  • 0
Posted

can anyone tell me how i can do Announce Lord in Dot Pack?

 

Thank you.

===================================================================
--- EnterWorld.java (revision 287)
+++ EnterWorld.java (revision 345)
@@ -35,8 +35,9 @@
import net.sf.l2j.gameserver.cache.HtmCache;
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.ClanHallManager;
import net.sf.l2j.gameserver.instancemanager.CoupleManager;
import net.sf.l2j.gameserver.instancemanager.DimensionalRiftManager;
import net.sf.l2j.gameserver.instancemanager.PetitionManager;
@@ -48,8 +49,9 @@
import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.ClanHall;
import net.sf.l2j.gameserver.model.entity.Couple;
+import net.sf.l2j.gameserver.model.entity.Castle;\
import net.sf.l2j.gameserver.model.entity.Hero;
import net.sf.l2j.gameserver.model.entity.L2Event;
import net.sf.l2j.gameserver.model.entity.Siege;
import net.sf.l2j.gameserver.model.entity.TvTEvent;
@@ -143,8 +145,13 @@
                 else if (activeChar.getAccessLevel() >= 75)
                     activeChar.getAppearance().setNameColor(Config.GM_NAME_COLOR);
             }
         }
+        
+        if (L2Config.ANNOUNCE_CASTLE_LORDS)
+        {
+			notifyCastleOwner(activeChar);
+        }

         if (Config.PLAYER_SPAWN_PROTECTION > 0)
             activeChar.setProtection(true);

@@ -474,8 +481,23 @@
	public String getType()
	{
		return _C__03_ENTERWORLD;
	}
+	
+	private void notifyCastleOwner(L2PcInstance activeChar)
+	{
+		L2Clan clan = activeChar.getClan();
+		
+		if (clan != null)
+		{
+			if (clan.getHasCastle() > 0)
+			{
+				Castle castle = CastleManager.getInstance().getCastleById(clan.getHasCastle());
+				if ((castle != null) && (activeChar.getObjectId() == clan.getLeaderId()))
+					Announcements.getInstance().announceToAll("Lord " + activeChar.getName() + " Ruler Of " + castle.getName() + " Castle is Now Online!");
+			}
+		}
+	}

	private void setPledgeClass(L2PcInstance activeChar)
	{
		int pledgeClass = 0;

Try to use search next time.

  • 0
Posted

i will try to compile. thenx m8.

Since you dont have compiled pack already, the thread is useless.

You cant compile your already existing pack, you compile a brand new pack.

 

Answer provided, locked.

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