Jump to content

Recommended Posts

Posted

Χαιρετώ όλα τα μέλη του 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™

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

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


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock