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

    • ??? error   https://ibb.co/Srn4LsX No support  :S   No support : S ? :S
    • I also think this feature would bring more harm than good... another example is a dwarf rushing against your mobs so he takes priority, then he plays fake death and proceeds to grief the shit out of you. A minimum damage threshold is necessary, which would basically converge to what is the default feature (i.e. biggest damage dealer)
    • I bought the premium to watch the video and it's private. 😢
    • For some Majestic reason OP can't edit their topics anymore?    Let me update the potential offers, I got up to 2 spots to fill.   CONTACT TELEGRAM ONLY: https://t.me/asupport_g1     A credible team that SGuard represents is looking for java developers.    These positions is full time only i.e. your time is mostly dedicated within the team and team tasks, side gigs are fine, as long as you are able to combine your gig and main.  All necessary tools are provided.  The team is consistent with > 10 team members and the team is looking to expand to meet various goals. A decent Lineage 2 Essense OR Main (GOD) knowledge is needed.  Experience with l2r/l2p/l2s. mobius is fine too for referrence only. The team is friendly and goal oriented, very active and resourceful.   Requirements are standard, java knowledge is optional.  Multi language is a plus but not necessary (English/Russian), any is accepted.   Terms and conditions including compensation are reasonable and considered to be up for the industry standards. Details are negotiable with suitable candidates.   You will need to have a headset and a mic just for the initial processing, there're no team meetings or conferences after that. There's a small 30min interview process to demonstrate knowledge and just to meet each other.   The team has decided it is in their best interest to not publish their information at this time. Details will be available only for suitable candidates.   CONTACT TELEGRAM ONLY: https://t.me/asupport_g1
    • Thanks for the detailed info. I also have some ideas in mind but the execution may be hard. Thanks again!
  • Topics

×
×
  • Create New...