Jump to content

Question

Posted (edited)

Βρήκα αυτόν τον κώδικα 

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(revision 173)
+++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(working copy)
@@ -27,6 +27,7 @@
 import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights;
 import net.sf.l2j.gameserver.datatables.MapRegionTable;
 import net.sf.l2j.gameserver.datatables.SkillTable;
+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;
@@ -38,6 +39,7 @@
 import net.sf.l2j.gameserver.model.L2World;
 import net.sf.l2j.gameserver.model.actor.L2Character;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.model.entity.Castle;
 import net.sf.l2j.gameserver.model.entity.ClanHall;
 import net.sf.l2j.gameserver.model.entity.Couple;
 import net.sf.l2j.gameserver.model.entity.Siege;
@@ -223,6 +225,11 @@
 			if (serverNews != null)
 				sendPacket(new NpcHtmlMessage(1, serverNews));
 		}
+		
+		if (Config.ANNOUNCE_CASTLE_LORDS)
+		{
+			notifyCastleOwner(activeChar);
+		}
 
 		PetitionManager.getInstance().checkPetitionMessages(activeChar);
 
@@ -321,4 +328,18 @@
 	{
 		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() + " Of " + castle.getName() + " Castle is now online!");
+			}
+		}
+	}
 }
\ No newline at end of file
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 173)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -80,6 +80,7 @@
     public static boolean ALT_GAME_NEW_CHAR_ALWAYS_IS_NEWBIE;
     public static boolean ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH;
 	public static boolean REMOVE_CASTLE_CIRCLETS;
+	public static boolean ANNOUNCE_CASTLE_LORDS;
 	
     /** Manor */
     public static int ALT_MANOR_REFRESH_TIME;
@@ -717,6 +718,7 @@
                 ALT_GAME_NEW_CHAR_ALWAYS_IS_NEWBIE = Boolean.parseBoolean(clans.getProperty("AltNewCharAlwaysIsNewbie", "False"));
                 ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH = Boolean.parseBoolean(clans.getProperty("AltMembersCanWithdrawFromClanWH", "False"));
                 REMOVE_CASTLE_CIRCLETS = Boolean.parseBoolean(clans.getProperty("RemoveCastleCirclets", "True"));
+                ANNOUNCE_CASTLE_LORDS = Boolean.parseBoolean(clans.getProperty("AnnounceCastleLords", "false"));
 
                 ALT_MANOR_REFRESH_TIME = Integer.parseInt(clans.getProperty("AltManorRefreshTime", "20"));
     	        ALT_MANOR_REFRESH_MIN = Integer.parseInt(clans.getProperty("AltManorRefreshMin", "00"));
Index: config/clans.properties
===================================================================
--- config/clans.properties	(revision 173)
+++ config/clans.properties	(working copy)
@@ -37,6 +37,9 @@
 #Remove Castle circlets after a clan lose its castle or a player leaves a clan? - default true
 RemoveCastleCirclets = True
 
+# Announce castle lords on enter game? - default false 
+AnnounceCastleLords = False
+
 #=============================================================
 #                         Manor Config
 #=============================================================

Και καθώς προσπαθούσα να τον περάσω στο  acis 367 μου έβγαζε έρρορ σε αυτά τα σημεία  

 

 clan.getHasCastle 

 εδώ

 Announcements.getInstance

και εδώ  ... 

Sorry αλλά είμαι λίγο newbie σαυτά ... 

Έχω αλλάξει το l2pcinstance σε player παρεπιπτόντως  

Αν κάποιος μπορεί να με βοηθήσει ! 

 

Here is the code at pastebin https://pastebin.com/TKzBDwk6 made by sweets Ο κώδικας στο πάστεμπιν από τον sweets

Edited by TEOGR_hItMaKeR

Recommended Posts

  • 0
Posted

μμ ναι ευχαριστώ πάρα πολύ :) Νομίζω όμως και το δικό μου σωστό είναι έτσι όπως το έχω κάνει 

:P

 

Βασικά το πρόβλημα με το δικό μου είναι να το βάλω στα config και τα 2 δεν ξέρω αν θα δουλέψει με το δικό σου όμως το πρόβλημα θα είναι αν πχ είναι και hero και castle lord θα τον γράφει 2 φορές 

Κάνε αυτό που σου λέει ο Merlon. 

if (Config.ANNOUNCE_CASTLE_LORDS)
notifyCastleOwner(activeChar);

if (Config.ANNOUNCE_HEROES)
if (activeChar.isHero())
Broadcast.announceToOnlinePlayers("Hero "+ activeChar.getName() +" has been logged in.");

και στο τέλος βάλε την μέθοδο notifyCastleOwner.

  • 0
Posted (edited)

Που ακριβώς εννοείς;

Όπου θέλεις ρίξε το.. Απλά όχι μέσα σε άλλη υπάρχων μέθοδο ή κάπου που να κόβει κάποιον κώδικα..

Βάλτο κάτω από εκεί που κάνει load το welcome html. 

Θα είναι οκ.

Edited by 'Baggos'
  • 0
Posted (edited)

Αυτό εδώ έχω στο τέλος

private void notifyCastleOwner(Player activeChar)

{

L2Clan clan = activeChar.getClan();

if (clan != null)

{

if (clan.hasCastle())

{

Castle castle = CastleManager.getInstance().getCastleById(clan.getClanId());

if ((castle != null) && (activeChar.getObjectId() == clan.getLeaderId()))

Broadcast.announceToOnlinePlayers("Lord " + activeChar.getName() + " Of " + castle.getName() + " Castle is now online!");

}

}

}

Όπου θέλεις ρίξε το.. Απλά όχι μέσα σε άλλη υπάρχων μέθοδο ή κάπου που να κόβει κάποιον κώδικα..

Βάλτο κάτω από εκεί που κάνει load το welcome html.

Θα είναι οκ.

και δεν δουλεύει... Edited by TEOGR_hItMaKeR

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • I usually stick to legit ways to tweak my setup, since cheats can tank accounts fast. If you’re just looking to freshen up the game or try new builds without headaches, grabbing cheap keys or DLC from places I’ve used before, like https://www.cdkeysforgames.com/seller/, has been an easy win. Kept my runs smooth without putting my profile at risk.
    • If anyone needs coding services, such as community boards, buffers, auto-farm systems, or daily/weekly/monthly task systems, feel free to get in touch with me on Discord: gerardas1816   Please find attached examples of my work.
    • you cant add cloaks on interlude client if im not mistaken,the image you show us on login screen is from another chronicle and not interlude.
    • Hello!  I need help with two things if any one is willing to help! Im making an interlude server using l2jmobius interlude server pack. First i need help with adding viewable cloaks how can i  do that ??  Also i found this client https://www.gildor.org/smf/index.php?topic=8525.0 and when i launch it it logins and when im in the server selection phase i select my server and i click ok but it doesnt get in the game any possible solution ???  Thanks for helping!!! <3
    • Join the growing L2Genesis community: https://discord.gg/mcuHsQzNCm Also check our website: https://l2genesis.com/   Since the Genesis community is still very small, I decided to ask a larger Lineage 2 community for advice — so here I am, Redditors.   I’m coming back to you with the second version of the proposed changes regarding Destroyer balance in Interlude. You can read about the first proposal here: https://www.reddit.com/r/Lineage2/comments/1rb9da7/l2genesiscom_seek_for_feedback_destro_balance/   User DanPWN3D suggested a pretty interesting idea that we managed to implement for testing with our testers, but we’d like to get some outside opinions as well.     Do you think a Destroyer nerf in Interlude is needed to bring it in line with Warlord in AoE farming?   If yes, which approach would be better?   Option 1 – Frenzy + Guts blocked when using Polearms The skills would still work normally with all other weapons, so Destroyer wouldn’t lose its strength in PvP or single-target PvE farming. https://www.youtube.com/watch?v=tedOGNOeHQY     Option 2 – Splash damage nerf All mobs (except the main target) receive reduced damage by a percentage. (The exact value could be anything from 1 to 99 and would need to be defined.) https://www.youtube.com/watch?v=FDf4fdZ6Ik0
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..