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

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

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.



×
×
  • Create New...