Jump to content

[SHARE]AnnounceCastleLords&Members[FREYA]


Recommended Posts

Χαιρετώ όλα τα μέλη του MaxCheaters! Σήμερα αποφάσισα να κάνω rework έναν κώδικα ο ποιος όπως γράφω και στον τίτλο του τόπικ μου δεν ανακοινώνει μόνο τους Leaders από κάθε clan που έχει κάστρο αλλά και τα Members αυτής της clan!! Τα αρχικά credits πηγαίνουν στην L2JArchid που ήταν για IL και ο κώδικας ανακοίνωνε μόνο τους lords. Εγώ προσθεσα μερικά πραγματάκια και το εκανα να δουλευει σε Freya (L2jServer). Δεν είναι κάτι δύσκολο απλά το έκανα και ήθελα να το μοιραστώ μαζί σας.

 

ΕΔΩ ΕΙΝΑΙ Ο ΚΩΔΙΚΑΣ:

Index: java/config/l2jmods.properties
===================================================================
#DelayForNextReward in seconds
DelayForNextReward = 600

+#============================================
+#      Castle Lords & Members Announce      =
+#============================================
+#If you want to announce Castle Lords when they are online set
+#this option "True".
+AnnounceCastleLords = False
+#If you want to announce Members of clan with Castles when they  
+#are online, set this option "True"
+#ATTENTION:It works only if "AnnounceCastleLords" is "True"
+AnnounceCastleMembers = False
+#Min Level for Announce Castle Lords & Members of the clans.
+MinLevelForAnnounce = 7
+                                          

 


Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java
+++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java

import com.l2jserver.gameserver.model.entity.L2Event;
import com.l2jserver.gameserver.model.entity.Siege;
import com.l2jserver.gameserver.model.entity.TvTEvent;
+import com.l2jserver.gameserver.model.entity.Castle;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.network.SystemMessageId;

	TvTEvent.onLogin(activeChar);

+		if (Config.ANNOUNCE_CASTLE_LORDS)
+		{
+			notifyCastleOwner(activeChar);
+		}	

	if (Config.WELCOME_MESSAGE_ENABLED)
		activeChar.sendPacket(new ExShowScreenMessage(Config.WELCOME_MESSAGE_TEXT, Config.WELCOME_MESSAGE_TIME));

 


	return _C__03_ENTERWORLD;
}

+	private void notifyCastleOwner(L2PcInstance activeChar)
+	{
+		L2Clan clan = activeChar.getClan();
+		
+		if (clan != null && (activeChar.getClan().getLevel() >= Config.MIN_LEVEL_FOR_ANNOUNCE))
+		{
+			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 " + "Leader of "+ activeChar.getClan().getName() + "clan" + " is currently online!");
+				}
+				else if (activeChar.getObjectId() != clan.getLeaderId())
+				{
+					if ((Config.ANNOUNCE_CASTLE_MEMBERS) && (castle != null));
+					{
+						Announcements.getInstance().announceToAll(activeChar.getName()+ " Member " + " of "+ activeChar.getClan().getName() + " clan is currently online!");
+					}
+				}
+			}
+		}
+	}
@Override
protected boolean triggersOnActionRequest()
{

 

Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java
+++ java/com/l2jserver/Config.java

    public static int 			MAX_REWARD_COUNT_FOR_STACK_ITEM1;
    public static int 			MAX_REWARD_COUNT_FOR_STACK_ITEM2;
    public static int 			DELAY_FOR_NEXT_REWARD;
+	public static boolean		ANNOUNCE_CASTLE_LORDS;
+	public static boolean		ANNOUNCE_CASTLE_MEMBERS;
+   public static int 			MIN_LEVEL_FOR_ANNOUNCE;

//--------------------------------------------------
// NPC Settings

===================================================================================================================================

				MAX_REWARD_COUNT_FOR_STACK_ITEM1 = Integer.parseInt(L2JModSettings.getProperty("MaxRewardCountForStackItem1", "2000000000"));
				MAX_REWARD_COUNT_FOR_STACK_ITEM2 = Integer.parseInt(L2JModSettings.getProperty("MaxRewardCountForStackItem2", "2000000000"));
				DELAY_FOR_NEXT_REWARD = Integer.parseInt(L2JModSettings.getProperty("DelayForNextReward", "600"));
+					ANNOUNCE_CASTLE_LORDS 				 = Boolean.parseBoolean(L2JModSettings.getProperty("AnnounceCastleLords", "False"));
+					ANNOUNCE_CASTLE_MEMBERS 				 = Boolean.parseBoolean(L2JModSettings.getProperty("AnnounceCastleMembers", "False"));
+					MIN_LEVEL_FOR_ANNOUNCE = Integer.parseInt(L2JModSettings.getProperty("MinLevelForAnnounce", "7"));
			}
			catch (Exception e)
			{

 

 

Κάποιες φωτογραφίες:

 

leaderonline.jpg

 

 

width=343 height=185http://img692.imageshack.us/img692/4476/clanmemberonline.jpg[/img]

 

Reword Credits: GoldenBoy™

Link to comment
Share on other sites

efxaristw file GoldenBoy!

sinexise na perneis mods apo palia client kai na ta kaneis na doulevoun se freya!

me voi8as para poli k pistevw. oti 8a voi8iseis k polous alous! :D

Link to comment
Share on other sites

file pou mporw na brw to code gia interlude??

gia l2j server

alla thelw na leei mono tous lord pou kanoun join sto game

plz help

 

 

 

Index: /trunk/L2J-Archid-Game/config/mods/customs.properties

===================================================================

--- /trunk/L2J-Archid-Game/config/mods/customs.properties (revision 1045)

+++ /trunk/L2J-Archid-Game/config/mods/customs.properties (revision 1058)

@@ -304,5 +304,8 @@

# Gemstones Count For S Grade

AltGradeSGemstones = 25

-

+

+# Announce castle lords on enter game. default = false

+AnnounceCastleLords = False

+

#-------------------------------------------------------------

# Custom L2JArchid Commands                                           

Index: /trunk/L2J-Archid-Game/src/main/java/com/l2jarchid/gameserver/network/clientpackets/EnterWorld.java

===================================================================

--- /trunk/L2J-Archid-Game/src/main/java/com/l2jarchid/gameserver/network/clientpackets/EnterWorld.java (revision 1002)

+++ /trunk/L2J-Archid-Game/src/main/java/com/l2jarchid/gameserver/network/clientpackets/EnterWorld.java (revision 1058)

@@ -38,4 +38,5 @@

import com.l2jarchid.gameserver.datatables.MapRegionTable;

import com.l2jarchid.gameserver.datatables.PcColorTable;

+import com.l2jarchid.gameserver.instancemanager.CastleManager;

import com.l2jarchid.gameserver.instancemanager.ClanHallManager;

import com.l2jarchid.gameserver.instancemanager.CoupleManager;

@@ -62,4 +63,5 @@

import com.l2jarchid.gameserver.model.entity.events.TvT;

import com.l2jarchid.gameserver.model.entity.events.VIP;

+import com.l2jarchid.gameserver.model.entity.Castle;

import com.l2jarchid.gameserver.model.olympiad.Olympiad;

import com.l2jarchid.gameserver.model.quest.Quest;

@@ -436,4 +438,9 @@

    VIP.addPlayerNotVIP(activeChar);

 

+ if (L2Config.ANNOUNCE_CASTLE_LORDS)

+ {

+ notifyCastleOwner(activeChar);

+ }

+

PcColorTable.getInstance().process(activeChar);

        // NPCBuffer

@@ -689,3 +696,17 @@

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!");

+ }

+ }

+ }

}

Index: /trunk/L2J-Archid-Game/src/main/java/com/l2jarchid/L2Config.java

===================================================================

--- /trunk/L2J-Archid-Game/src/main/java/com/l2jarchid/L2Config.java (revision 1055)

+++ /trunk/L2J-Archid-Game/src/main/java/com/l2jarchid/L2Config.java (revision 1058)

@@ -1403,4 +1403,5 @@

public static int          ALT_CRYSTAL_A_GEMSTONES;

public static int          ALT_CRYSTAL_S_GEMSTONES;

+ public static boolean ANNOUNCE_CASTLE_LORDS;

 

    /** Use rule of BossZone **/

@@ -1529,4 +1530,5 @@

ALT_CRYSTAL_A_GEMSTONES             = Integer.parseInt(CustomMod.getProperty("AltGradeAGemstones", "20"));

ALT_CRYSTAL_S_GEMSTONES             = Integer.parseInt(CustomMod.getProperty("AltGradeSGemstones", "25"));

+ ANNOUNCE_CASTLE_LORDS = Boolean.parseBoolean(CustomMod.getProperty("AnnounceCastleLords", "false"));

ALLOW_DUALBOX                        = Boolean.parseBoolean(CustomMod.getProperty("AllowDualBox", "True"));

DUAL_BOX_EXCEPTION                  = CustomMod.getProperty("DualBoxException", "");

Link to comment
Share on other sites

file mou poly kalh h douleia sou alla 8a itan protimotero na to ftiakseis etc oste na mn kanei announce ta apla members mias clan pou exei kastro alla tous leader ton royal guard and order of knights , gt to leo auto? fantasou mia clan pou exei kastro k exei 100+ online members tin imera , olo announce 8a blepame...

Link to comment
Share on other sites

file mou poly kalh h douleia sou alla 8a itan protimotero na to ftiakseis etc oste na mn kanei announce ta apla members mias clan pou exei kastro alla tous leader ton royal guard and order of knights , gt to leo auto? fantasou mia clan pou exei kastro k exei 100+ online members tin imera , olo announce 8a blepame...

 

poly swstos

Link to comment
Share on other sites

file mou poly kalh h douleia sou alla 8a itan protimotero na to ftiakseis etc oste na mn kanei announce ta apla members mias clan pou exei kastro alla tous leader ton royal guard and order of knights , gt to leo auto? fantasou mia clan pou exei kastro k exei 100+ online members tin imera , olo announce 8a blepame...

 

+φωνώ και το σκέφτηκα και εγώ αυτό!! Θα το δοκιμάσω και θα το postarw...

 

Ευχαριστώ για την ιδέα φίλε alexi !!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



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

×
×
  • Create New...