Jump to content

[Freya] Ctf Fully Configurable!


FFs

Recommended Posts

Capture the Flag - Freya - Last Rev

 

Freatures:

 

- Possibility to turn if ON/OFF into l2jmods.properties

- Time interval configurable into l2jmods.properties

- Red and blue glow for teams like during a party duel

- Commands

- Admin Commands

 

This code is based on the one here: http://www.l2jserver.com/forum/viewtopic.php?f=73&t=11576

 

Credits:

 

Nerimah - L2JServer

 

Download:

 

http://www.mediafire.com/?u5i7hswl57ffsla

 

Tested:

 

23/06/11 - Tested and Working!

 

Installation:

 

Read: "how_to_install.txt" into the .rar file.

 

Enjoy it!

 


 

Fix for old revisions - 25/06/11:

That code will fix errors on PcStat.java and L2PcInstance.java and add some lines at SystemMessageId.java

 

 

### Eclipse Workspace Patch 1.0
#P L2J_Server
Index: java/com/l2jserver/gameserver/model/actor/stat/PcStat.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/stat/PcStat.java	(revision 4668)
+++ java/com/l2jserver/gameserver/model/actor/stat/PcStat.java	(working copy)
@@ -21,6 +21,7 @@
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.actor.instance.L2PetInstance;
import com.l2jserver.gameserver.model.base.Experience;
+import com.l2jserver.gameserver.model.entity.CTF;
import com.l2jserver.gameserver.model.entity.RecoBonus;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.network.SystemMessageId;
@@ -235,6 +236,13 @@
			getActiveChar().sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_INCREASED_YOUR_LEVEL));

			L2ClassMasterInstance.showQuestionMark(getActiveChar());
+			
+			if (getActiveChar().isInFunEvent())
+			{
+				if (getActiveChar()._inEventCTF && CTF._maxlvl == getLevel() && !CTF._started)
+					CTF.removePlayer(getActiveChar());
+				getActiveChar().sendMessage("Your event sign up was canceled.");
+			}
		}

		getActiveChar().rewardSkills(); // Give Expertise skill of this level

### Eclipse Workspace Patch 1.0
#P L2J_Server
Index: java/com/l2jserver/gameserver/network/SystemMessageId.java
===================================================================
--- java/com/l2jserver/gameserver/network/SystemMessageId.java	(revision 4668)
+++ java/com/l2jserver/gameserver/network/SystemMessageId.java	(working copy)
@@ -14693,6 +14693,12 @@
	public static final SystemMessageId THOMAS_D_TURKEY_DISAPPEARED;

	/**
+	 * ID: 6506<br>
+	 * Message: You cannot mount a Steed while holding a flag!
+	 */	
+	public static SystemMessageId YOU_CANNOT_MOUNT_A_STEED_WHILE_HOLDING_A_FLAG = null;
+	
+	/**
	 * Array containing all SystemMessageIds<br>
	 * Important: Always initialize with a length of the highest SystemMessageId + 1!!!
	 */
@@ -17116,6 +17122,7 @@
		THOMAS_D_TURKEY_APPEARED = new SystemMessageId(6503);
		THOMAS_D_TURKEY_DEFETED = new SystemMessageId(6504);
		THOMAS_D_TURKEY_DISAPPEARED = new SystemMessageId(6505);
+		YOU_CANNOT_MOUNT_A_STEED_WHILE_HOLDING_A_FLAG = new SystemMessageId(6506);

		buildFastLookupTable();
	}
### Eclipse Workspace Patch 1.0
#P L2J_Server
Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 4668)
+++ java/config/l2jmods.properties	(working copy)
@@ -221,6 +242,62 @@

# ---------------------------------------------------------------------------
+# Setting for Capture The Flag
+# ---------------------------------------------------------------------------
+#This parameter is to turn on/off the auto CTF at server start .
+#If True, it writes into gameserver console: CTFEventEngine: Started.
+#If Flase, it writes into gameserver console: CTFEventEngine: Engine is disabled.
+
+CTFEventEnabled = True  
+
+#This is where you will chose the time where the CTF Event will take place automatically
+# Times CTF will occur (24h format)
+CTFEventInterval = 7:00,11:00,15:00,19:00,23:00,3:00
+
+# CTFEvenTeams = NO|BALANCE|SHUFFLE
+# NO means: not even teams.
+# BALANCE means: Players can only join team with lowest player count.
+# SHUFFLE means: Players can only participate to the event and not direct to a team. Teams will be shuffled on teams teleport.
+CTFEvenTeams = SHUFFLE
+
+# Allow voiced command on CTF Event?
+CTFAllowVoiceCommand = False
+
+# Players that are not participating in CTF can target ctf participants?
+CTFAllowInterference = False
+
+# CTF participants can use potions?
+CTFAllowPotions = False
+
+# CTF participants can summon by item?
+CTFAllowSummon = False
+
+# Remove all effects of CTF participants on event start?
+CTFOnStartRemoveAllEffects = True
+
+# Unsummon pet of CTF participants on event start?
+CTFOnStartUnsummonPet = True
+
+# On revive participants regain full HP/MP/CP?
+CTFReviveRecovery = False
+
+# Announce all team statistics
+CTFAnnounceTeamStats = False
+
+# Announce reward
+CTFAnnounceReward = False
+
+# Players with cursed weapon are allowed to join?
+CTFJoinWithCursedWeapon = True
+
+# Delay on revive when dead, NOTE: 20000 equals to 20 seconds, minimum 1000 (1 second)
+CTFReviveDelay = 20000
+
+# Would you like to have a base for the players to have first, then teleport into battle?
+# If True, You must set-up in CTF admin panel
+CTFTeleportToBaseFirst = True
+
+# ---------------------------------------------------------------------------
# L2J Banking System
# ---------------------------------------------------------------------------
# Enable/Disable Banking System

 

Fix by:

- FFs

 


 

New Update (28/06/11):

 

- Team color glow fixed

- CTF intervals fixed

 

Download:

 

http://www.mediafire.com/?okvxhauyctanbjd

Link to comment
Share on other sites

i don't think so i added patch in last rev and it giving me error in some lines

u wanna screen, huh ?

 

If to him works, that mean u're newbie and u're not able to add a shit like this.

Link to comment
Share on other sites

@BlackDevilDev - Thanx :)

@ss42ss - Tell me how its works for u :)

@serverl2 - Np, if you are happy, i'm happy

@marwan - I need a screen to belive it

@Legend™ - Tell me in what file gives you an error

Link to comment
Share on other sites

Gonna test and provide feedback if it works and maybe possible errors..... (Im sure that there are no problems about compiling...) ....

 

Thanks FFs for your share!

 

Np pipiou21, test it and tell us :), but what i said.... you will have no problems with the event, i tested it

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.




×
×
  • Create New...