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.




  • Posts

    • imbadon.com If u deleted me from the content, it is your problem. This 200 euro is not money at all. But you... just scammer. People should know about you. I can share the whole conversation if you want, but it will not change that you are a scammer. 
    • For upcoming changes, You should consider making those 3 tabs (or whatever more You will have with new games) more visible and standing out, because right it looks like all topics hidden under those 3 tabs.
    • While not particularly active over the years, I've been around for as long as I could remember, so here are my 2 cents too. On top of what has already been said, I'd like to touch on a few thing that might be improved upon. While it is easy to notice and say "there's lack of engagement" or "community has outgrown the ganre", I've seen numerous forums get forgotten and die while others continue to thrive to this day. The main issue, in my humble opinion, is that the sector has been commercialised to an unsustainable extent. When nobody is willing to share anything, even if it is just a rework of an open-sourced or already-shared resource, the sense of "community" gets deminished. Now back on the pressing matter. From what I've seen, the lack of engagement could be circumvented with a redesign and functionality expansion that would/could/should include: - a built-in chat functionality. - incentives for engagement/interaction, ideas of which I'll list as separate pointers, as not to limit your creativity. But just as an example, from a more user/human perspective, having an easily identifiable way to get into "the club of the cool kids on the block", figuratively speaking, is an incentive on its own. - separation of the reputation into reactions and reputation. One to be used to posts, such as up-vote and what not, while the other to be awarded as means of appreciation. - automated ranks with actual benefits/perks, not like the current ones providing nothing. - the ability to hide text for user/group of users, not just premium/no premium. - increased visibility of the HOT topics and the RECENTLY ACTIVE threads/posts. Can be also expanded to most liked posts, etc. ps.: I'll update my post when I have some free time on my hands.
    • There was no way I didn't refunded or delivered files. I don't see You on my conrtact list on Discord, can You send me a message or at least tell me for what project was this updater? I always resolve if I can't deliver on time or customer bailes.
  • Topics

×
×
  • Create New...