View difference between Paste ID: 86dz2B1N and T2j9dagL
SHOW: | | - or go back to the newest paste.
1
### Eclipse Workspace Patch 1.0
2
#P L2jFrozen_GameServer
3
Index: head-src/com/l2jfrozen/gameserver/model/entity/event/CTF.java
4
===================================================================
5
--- head-src/com/l2jfrozen/gameserver/model/entity/event/CTF.java	(revision 1004)
6
+++ head-src/com/l2jfrozen/gameserver/model/entity/event/CTF.java	(working copy)
7
@@ -2016,11 +2016,11 @@
8
 		{
9
 			NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
10
 
11
-			TextBuilder replyMSG = new TextBuilder("<html><title>"+_eventName+"</title><body>");
12
-			replyMSG.append("<center><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32></center><br1>");
13
-			replyMSG.append("<center><font color=\"3366CC\">Current event:</font></center><br1>");
14
-			replyMSG.append("<center>Name:&nbsp;<font color=\"00FF00\">" + _eventName + "</font></center><br1>");
15
-			replyMSG.append("<center>Description:&nbsp;<font color=\"00FF00\">" + _eventDesc + "</font></center><br><br>");
16
+			TextBuilder replyMSG = new TextBuilder("<html><title>CTF</title><body>");
17
+			replyMSG.append("<center><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32></center><br1>");
18
+			replyMSG.append("<center><font color=\"LEVEL\">Current event:</font></center><br1>");
19
+			replyMSG.append("<center>Name: &nbsp;<font color=\"0066CC\">" + _eventName + "</font></center><br1>");
20
+			replyMSG.append("<center>Description:&nbsp;<font color=\"0066CC\">" + _eventDesc + "</font></center><br>");
21
 
22
 			if(!_started && !_joining)
23
 				replyMSG.append("<center>Wait till the admin/gm start the participation.</center>");
24
@@ -2028,14 +2028,14 @@
25
 			{
26
 				if(!_started)
27
 				{
28
-					replyMSG.append("Currently participated: <font color=\"00FF00\">" + _playersShuffle.size() + ".</font><br>");
29
-					replyMSG.append("Max players: <font color=\"00FF00\">" + _maxPlayers + "</font><br><br>");
30
-					replyMSG.append("<font color=\"FFFF00\">You can't participate to this event.</font><br>");
31
+					replyMSG.append("Currently participated: <font color=\"0066CC\">" + _playersShuffle.size() + ".</font><br>");
32
+					replyMSG.append("Max players: <font color=\"0066CC\">" + _maxPlayers + "</font><br>");
33
+					replyMSG.append("<font color=\"0066CC\">You can't participate to this event.</font><br>");
34
 				}
35
 			}
36
 			else if(eventPlayer.isCursedWeaponEquiped() && !Config.CTF_JOIN_CURSED)
37
 			{
38
-				replyMSG.append("<font color=\"FFFF00\">You can't participate to this event with a cursed Weapon.</font><br>");
39
+				replyMSG.append("<font color=\"0066CC\">You can't participate to this event with a cursed Weapon.</font><br>");
40
 			}
41
 			else if(!_started && _joining && eventPlayer.getLevel()>=_minlvl && eventPlayer.getLevel()<=_maxlvl)
42
 			{
43
@@ -2043,21 +2043,22 @@
44
 					if(_players.contains(eventPlayer) || _playersShuffle.contains(eventPlayer) || checkShufflePlayers(eventPlayer))
45
 					{
46
 						if(Config.CTF_EVEN_TEAMS.equals("NO") || Config.CTF_EVEN_TEAMS.equals("BALANCE"))
47
-							replyMSG.append("You participated already in team <font color=\"LEVEL\">" + eventPlayer._teamNameCTF + "</font><br><br>");
48
+							replyMSG.append("You participated already in team <font color=\"0066CC\">" + eventPlayer._teamNameCTF + "</font><br><br>");
49
 						else if(Config.CTF_EVEN_TEAMS.equals("SHUFFLE"))
50
-							replyMSG.append("<center><font color=\"3366CC\">You participated already!</font></center><br><br>");
51
-							
52
-						replyMSG.append("<center>Joined Players: <font color=\"00FF00\">" + _playersShuffle.size() + "</font></center><br>");
53
+							replyMSG.append("<center><font color=\"0066CC\">You participated already!.</font></center><br>");
54
+						
55
+						replyMSG.append("<center>Joined Players: <font color=\"0066CC\">" + _playersShuffle.size() + "</font></center><br>");
56
 
57
-						replyMSG.append("<center><font color=\"3366CC\">Wait till event start or remove your participation!</font><center>");
58
-						replyMSG.append("<center><button value=\"Remove\" action=\"bypass -h npc_" + objectId+ "_ctf_player_leave\" width=85 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center>");
59
+						replyMSG.append("<center><button value=\"Remove\" action=\"bypass -h npc_" + objectId+ "_ctf_player_leave\" width=140 height=21 back=\"L2UI_ch3.msnbutton_over\" fore=\"L2UI_ch3.msnbutton\"></center>");
60
+						replyMSG.append("<center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32></center><br1>");
61
+						replyMSG.append("<center><font color=\"111111\">By Excalibur</font></center>");				
62
 					}
63
 					else
64
 					{
65
-						replyMSG.append("<center><font color=\"3366CC\">You want to participate in the event?</font></center><br>");
66
-						replyMSG.append("<center><td width=\"200\">Min lvl: <font color=\"00FF00\">" + _minlvl + "</font></center></td><br>");
67
-						replyMSG.append("<center><td width=\"200\">Max lvl: <font color=\"00FF00\">" + _maxlvl + "</font></center></td><br><br>");
68
-						replyMSG.append("<center><font color=\"3366CC\">Teams:</font></center><br>");
69
+						replyMSG.append("<center><font color=\"LEVEL\">You want to participate in the event?</font></center><br>");
70
+						replyMSG.append("<center><td width=\"200\">Min. level: <font color=\"0066CC\">" + _minlvl + "</font></center></td><br>");
71
+						replyMSG.append("<center><td width=\"200\">Max. level: <font color=\"0066CC\">" + _maxlvl + "</font></center></td><br>");
72
+						replyMSG.append("<center><font color=\"LEVEL\">Teams: </font></center>");
73
 
74
 						if(Config.CTF_EVEN_TEAMS.equals("NO") || Config.CTF_EVEN_TEAMS.equals("BALANCE"))
75
 						{
76
@@ -2065,9 +2066,9 @@
77
 
78
 							for(String team : _teams)
79
 							{
80
-								replyMSG.append("<tr><td width=\"100\"><font color=\"LEVEL\">" + team + "</font>&nbsp;(" + teamPlayersCount(team) + " joined)</td>");
81
+								replyMSG.append("<tr><td width=\"100\"><font color=\"0066CC\">" + team + "</font>&nbsp;(" + teamPlayersCount(team) + " joined.)</td>");
82
 								replyMSG.append("<center><td width=\"60\"><button value=\"Join\" action=\"bypass -h npc_" + objectId + "_ctf_player_join " + team
83
-										+ "\" width=85 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center></td></tr>");
84
+										+ "\" width=140 height=21 back=\"L2UI_ch3.msnbutton_over\" fore=\"L2UI_ch3.msnbutton\"></center></td></tr>");
85
 							}
86
 							replyMSG.append("</table></center>");
87
 						}
88
@@ -2076,14 +2077,15 @@
89
 							replyMSG.append("<center>");
90
 
91
 							for(String team : _teams)
92
-								replyMSG.append("<tr><td width=\"100\"><font color=\"LEVEL\">" + team + "</font> &nbsp;</td>");
93
+								replyMSG.append("<tr><td width=\"100\"><font color=\"0066CC\">" + team + "</font> &nbsp;</td>");
94
 
95
 							replyMSG.append("</center><br>");
96
 
97
-							replyMSG.append("<center><button value=\"Join Event\" action=\"bypass -h npc_" + objectId + "_ctf_player_join eventShuffle\" width=85 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center>");
98
-							replyMSG.append("<center><font color=\"3366CC\">Teams will be reandomly generated!</font></center><br>");
99
-							replyMSG.append("<center>Joined Players:</font> <font color=\"LEVEL\">" + _playersShuffle.size() + "</center></font><br>");
100
+							replyMSG.append("<center><button value=\"Join Event\" action=\"bypass -h npc_" + objectId + "_ctf_player_join eventShuffle\" width=140 height=21 back=\"L2UI_ch3.msnbutton_over\" fore=\"L2UI_ch3.msnbutton\"></center>");
101
+							replyMSG.append("<center><font color=\"0066CC\">Teams will be reandomly generated!</font></center><br>");
102
+							replyMSG.append("<center>Joined Players: </font><font color=\"0066CC\">" + _playersShuffle.size() + "</center></font><br>");
103
 							replyMSG.append("<center>Reward: <font color=\"LEVEL\">" + _rewardAmount + " " + ItemTable.getInstance().getTemplate(_rewardId).getName()+ "</center></font>");
104
+							replyMSG.append("<center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32></center>");
105
 						}
106
 					}
107
 				}
108
@@ -2093,10 +2095,12 @@
109
 				replyMSG.append("<center>"+_eventName+" match is in progress.</center>");
110
 			else if(eventPlayer.getLevel() < _minlvl || eventPlayer.getLevel() > _maxlvl)
111
 			{
112
-				replyMSG.append("Your lvl: <font color=\"00FF00\">" + eventPlayer.getLevel() + "</font><br>");
113
-				replyMSG.append("Min lvl: <font color=\"00FF00\">" + _minlvl + "</font><br>");
114
-				replyMSG.append("Max lvl: <font color=\"00FF00\">" + _maxlvl + "</font><br><br>");
115
-				replyMSG.append("<font color=\"FFFF00\">You can't participate to this event.</font><br>");
116
+				replyMSG.append("<center>Your level: <font color=\"0066CC\">" + eventPlayer.getLevel() + "</font><br>");
117
+				replyMSG.append("<center>Min. level: <font color=\"0066CC\">" + _minlvl + "</font><br>");
118
+				replyMSG.append("<center>Max. level: <font color=\"0066CC\">" + _maxlvl + "</font><br><br>");
119
+				replyMSG.append("<center><font color=\"0066CC\">You can't participate to this event.</font><br>");
120
+				replyMSG.append("<center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=256 height=32></center><br1>");
121
+				replyMSG.append("<center><font color=\"111111\">By Excalibur</font></center>");
122
 			}
123
 
124
 			replyMSG.append("</body></html>");
125
Index: config/functions/physics.properties
126
===================================================================
127
--- config/functions/physics.properties	(revision 1004)
128
+++ config/functions/physics.properties	(working copy)
129
@@ -117,46 +117,6 @@
130
 #Send Skills Chance to Players
131
 SendSkillsChanceToPlayers = false
132
 
133
-#Disable Bow for classes: write here classes id 
134
-#that you dnt want allow to use BOW. Class id examples,
135
-#you can find others into char_templates database table
136
-#
137
-# classId	className
138
-#	88		Duelist
139
-#	89		DreadNought
140
-#	90		Phoenix Knight
141
-#	91		Hell Knight
142
-#	92		Sagittarius
143
-#	93		Adventurer
144
-#	94		Archmage
145
-#	95		Soultaker
146
-#	96		Arcana Lord
147
-#	97		Cardinal
148
-#	98		Hierophant
149
-#	99		Eva Templar
150
-#	100		Sword Muse
151
-#	101		Wind Rider
152
-#	102		Moonlight Sentinel
153
-#	103		Mystic Muse
154
-#	104		Elemental Master
155
-#	105		Eva Saint
156
-#	106		Shillien Templar
157
-#	107		Spectral Dancer
158
-#	108		Ghost Hunter
159
-#	109		Ghost Sentinel
160
-#	110		Storm Screamer
161
-#	111		Spectral Master
162
-#	112		Shillen Saint
163
-#	113		Titan
164
-#	114		Grand Khauatari
165
-#	115		Dominator
166
-#	116		Doomcryer
167
-#	117		Fortune Seeker
168
-#	118		Maestro
169
-#
170
-# e.g. DisableBowForClasses=107,110
171
-DisableBowForClasses =
172
-
173
 # When you change/add subclass the weapon is unequipped
174
 # Default: False
175
 RemoveWeaponSubclass = False
176
Index: head-src/com/l2jfrozen/gameserver/Restart.java
177
===================================================================
178
--- head-src/com/l2jfrozen/gameserver/Restart.java	(revision 0)
179
+++ head-src/com/l2jfrozen/gameserver/Restart.java	(working copy)
180
@@ -0,0 +1,120 @@
181
+/*
182
+* This program is free software: you can redistribute it and/or modify it under
183
+* the terms of the GNU General Public License as published by the Free Software
184
+* Foundation, either version 3 of the License, or (at your option) any later
185
+* version.
186
+*
187
+* This program is distributed in the hope that it will be useful, but WITHOUT
188
+* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
189
+* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
190
+* details.
191
+*
192
+* You should have received a copy of the GNU General Public License along with
193
+* this program. If not, see <http://www.gnu.org/licenses/>.
194
+*/
195
+package com.l2jfrozen.gameserver;
196
+
197
+import java.text.SimpleDateFormat;
198
+import java.util.Calendar;
199
+import java.util.logging.Logger;
200
+
201
+import com.l2jfrozen.Config;
202
+import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
203
+	
204
+/**
205
+* This Config for Auto Restart GameServer
206
+* Initialize class getInstance()
207
+* Set Time in Config File
208
+* Thank You L2JServer | L2JRussia
209
+*
210
+* @author L2JRussia
211
+*
212
+*/
213
+	public class Restart
214
+	{
215
+       //Variaveis globais
216
+       private static Restart _instance = null;
217
+       protected static final Logger _log = Logger.getLogger(Restart.class.getName());
218
+       private Calendar NextRestart;
219
+       private SimpleDateFormat format = new SimpleDateFormat("HH:mm");
220
+
221
+       //Singleton
222
+       public static Restart getInstance()
223
+       {
224
+               if(_instance == null)
225
+                       _instance = new Restart();
226
+               return _instance;
227
+       }
228
+
229
+       public String getRestartNextTime()
230
+       {
231
+       if(NextRestart.getTime() != null)
232
+               return format.format(NextRestart.getTime());
233
+               else
234
+                       return "Erro";
235
+       }
236
+
237
+       //Connstrutor
238
+       private Restart()
239
+       {
240
+     //:D
241
+       }
242
+
243
+       public void StartCalculationOfNextRestartTime()
244
+       {
245
+					_log.info("[Restart System]: Actived");
246
+               try
247
+               {
248
+                       Calendar currentTime = Calendar.getInstance();
249
+                       Calendar testStartTime = null;
250
+                       long flush2 = 0,timeL = 0;
251
+                       int count = 0;
252
+
253
+                       for (String timeOfDay : Config.RESTART_INTERVAL_BY_TIME_OF_DAY)
254
+                       {
255
+                               testStartTime = Calendar.getInstance();
256
+                               testStartTime.setLenient(true);
257
+                               String[] splitTimeOfDay = timeOfDay.split(":");
258
+                               testStartTime.set(Calendar.HOUR_OF_DAY, Integer.parseInt(splitTimeOfDay[0]));
259
+                               testStartTime.set(Calendar.MINUTE, Integer.parseInt(splitTimeOfDay[1]));
260
+                               testStartTime.set(Calendar.SECOND, 00);
261
+                               //Verifica a validade to tempo
262
+                               if (testStartTime.getTimeInMillis() < currentTime.getTimeInMillis())
263
+                               {
264
+                                       testStartTime.add(Calendar.DAY_OF_MONTH, 1);
265
+                               }
266
+
267
+                               //TimeL Recebe o quanto falta de milisegundos para o restart
268
+                               timeL = testStartTime.getTimeInMillis() - currentTime.getTimeInMillis();
269
+
270
+                               //Verifica qual horario sera o proximo restart
271
+                               if(count == 0){
272
+                               flush2 = timeL;
273
+                               NextRestart = testStartTime;
274
+                               }
275
+
276
+                               if(timeL <  flush2){
277
+                               flush2 = timeL;
278
+                               NextRestart = testStartTime;
279
+                               }
280
+
281
+                               count ++;
282
+                       }
283
+                       _log.info("[AutoRestart]: Next Restart Time: " + NextRestart.getTime().toString());
284
+           ThreadPoolManager.getInstance().scheduleGeneral(new StartRestartTask(), flush2);
285
+               }
286
+               catch (Exception e)
287
+               {
288
+                       System.out.println("[AutoRestart]: The restart automated server presented error in load restarts period config !");
289
+               }
290
+       }
291
+
292
+       class StartRestartTask implements Runnable
293
+       {
294
+               public void run()
295
+               {
296
+          _log.info("Start automated restart GameServer.");
297
+          Shutdown.getInstance().autoRestart(Config.RESTART_SECONDS);
298
+               }
299
+       }
300
+}
301
\ No newline at end of file
302
Index: head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminAio.java
303
===================================================================
304
--- head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminAio.java	(revision 1004)
305
+++ head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminAio.java	(working copy)
306
@@ -263,6 +263,8 @@
307
 			connection.close();
308
 
309
 			_player.lostAioSkills();
310
+	        if(Config.ALLOW_AIO_EFFECT)
311
+	            activeChar.stopAbnormalEffect(0x400000);
312
 			_player.getAppearance().setNameColor(0xFFFFFF);
313
 			_player.getAppearance().setTitleColor(0xFFFFFF);
314
 			_player.broadcastUserInfo();
315
Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
316
===================================================================
317
--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java	(revision 1004)
318
+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
319
@@ -239,6 +239,7 @@
320
 import com.l2jfrozen.util.Point3D;
321
 import com.l2jfrozen.util.database.L2DatabaseFactory;
322
 import com.l2jfrozen.util.random.Rnd;
323
+import com.l2jfrozen.gameserver.managers.PlayerKillsManager;
324
 
325
 /**
326
  * This class represents all player characters in the world.<br>
327
@@ -330,6 +331,25 @@
328
 		return _voteTimestamp;
329
 	}
330
 
331
+    public void ClanSkills()
332
+    {
333
+        for(Iterator i$ = Config.CLAN_SKILLS.keySet().iterator(); i$.hasNext(); broadcastUserInfo())
334
+        {
335
+            Integer skillid = (Integer)i$.next();
336
+            int skilllvl = ((Integer)Config.CLAN_SKILLS.get(skillid)).intValue();
337
+            L2Skill skill = SkillTable.getInstance().getInfo(skillid.intValue(), skilllvl);
338
+            if(skill != null)
339
+                addSkill(skill, true);
340
+            getClan().addNewSkill(skill);
341
+            sendSkillList();
342
+        }
343
+
344
+        L2Clan clan = getClan();
345
+        clan.setReputationScore(clan.getReputationScore() + Config.REPUTATION_QUANTITY, true);
346
+        sendMessage((new StringBuilder()).append("Admin give to you ").append(Config.REPUTATION_QUANTITY).append(" Reputation Points.").toString());
347
+        sendMessage("Admin give to you all Clan Skills");
348
+    }
349
+
350
 	/**
351
 	 * Sets the vote timestamp.
352
 	 *
353
@@ -7589,6 +7609,7 @@
354
 			final L2PcInstance pk = killer.getActingPlayer();
355
 			if (pk != null)
356
 			{
357
+				PlayerKillsManager.getInstance().onKill(this.getObjectId(), killer.getObjectId());
358
 				if (Config.ENABLE_PK_INFO)
359
 				{
360
 					doPkInfo(pk);
361
@@ -8068,11 +8089,11 @@
362
 						increasePvpKills();
363
 						if (target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL)
364
 						{
365
-							Announcements.getInstance().announceToAll("Player " + getName() + " hunted Player " + target.getName());
366
+							Announcements.getInstance().announceNormal("Player " + getName() + " hunted Player " + target.getName());
367
 						}
368
 						else if (target instanceof L2PcInstance && Config.ANNOUNCE_ALL_KILL)
369
 						{
370
-							Announcements.getInstance().announceToAll("Player " + getName() + " killed Player " + target.getName());
371
+							Announcements.getInstance().announceNormal("Player " + getName() + " killed Player " + target.getName());
372
 						}
373
 						addItemReward(targetPlayer);
374
 						return;
375
@@ -8092,7 +8113,7 @@
376
 					
377
 					if (target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL)
378
 					{
379
-						Announcements.getInstance().announceToAll("Player " + getName() + " hunted Player " + target.getName());
380
+						Announcements.getInstance().announceNormal("Player " + getName() + " hunted Player " + target.getName());
381
 					}
382
 				}
383
 				else if (targetPlayer.getPvpFlag() == 0) // Target player doesn't have karma
384
@@ -8100,14 +8121,14 @@
385
 					increasePkKillsAndKarma(targetPlayer.getLevel());
386
 					if (target instanceof L2PcInstance && Config.ANNOUNCE_PK_KILL)
387
 					{
388
-						Announcements.getInstance().announceToAll("Player " + getName() + " has assassinated Player " + target.getName());
389
+						Announcements.getInstance().announceNormal("Player " + getName() + " has assassinated Player " + target.getName());
390
 					}
391
 				}
392
 			}
393
 		}
394
 		if (target instanceof L2PcInstance && Config.ANNOUNCE_ALL_KILL)
395
 		{
396
-			Announcements.getInstance().announceToAll("Player " + getName() + " killed Player " + target.getName());
397
+			Announcements.getInstance().announceNormal("Player " + getName() + " killed Player " + target.getName());
398
 		}
399
 		
400
 		if (_inEventDM && DM.is_started())
401
Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java
402
===================================================================
403
--- head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java	(revision 1004)
404
+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java	(working copy)
405
@@ -26,6 +26,7 @@
406
 import com.l2jfrozen.Config;
407
 import com.l2jfrozen.crypt.nProtect;
408
 import com.l2jfrozen.crypt.nProtect.RestrictionType;
409
+import com.l2jfrozen.gameserver.Restart;
410
 import com.l2jfrozen.gameserver.communitybbs.Manager.RegionBBSManager;
411
 import com.l2jfrozen.gameserver.controllers.GameTimeController;
412
 import com.l2jfrozen.gameserver.datatables.CharSchemesTable;
413
@@ -281,10 +282,6 @@
414
 		
415
 		// Welcome to Lineage II
416
 		sendPacket(new SystemMessage(SystemMessageId.WELCOME_TO_LINEAGE));
417
-		
418
-		// Credits to L2jfrozen
419
-		activeChar.sendMessage("This server uses L2JFrozen, a project founded by L2Chef and");
420
-		activeChar.sendMessage("developed by the L2JFrozen Dev Team at l2jfrozen.com");
421
 
422
 		SevenSigns.getInstance().sendCurrentPeriodMsg(activeChar);
423
 		Announcements.getInstance().showAnnouncements(activeChar);
424
@@ -341,6 +338,21 @@
425
 
426
 		if (Config.ANNOUNCE_CASTLE_LORDS)
427
 				notifyCastleOwner(activeChar);
428
+
429
+		if(Config.ANNOUNCE_AIO_LOGIN && activeChar.isAio())
430
+            Announcements.getInstance().announceToAll((new StringBuilder()).append("Player Aio: ").append(activeChar.getName()).append(" logged in the game").toString());
431
+
432
+		if(Config.ANNOUNCE_HERO_LOGIN && activeChar.isHero())
433
+            Announcements.getInstance().announceToAll((new StringBuilder()).append("Player Hero: ").append(activeChar.getName()).append(" logged in the game").toString());
434
+
435
+		if(Config.ANNOUNCE_NOBLE_LOGIN && activeChar.isNoble())
436
+            Announcements.getInstance().announceToAll((new StringBuilder()).append("Player Noble: ").append(activeChar.getName()).append(" logged in the game").toString());
437
+
438
+		if(Config.ANNOUNCE_DONATOR_LOGIN && activeChar.isDonator())
439
+            Announcements.getInstance().announceToAll((new StringBuilder()).append("Player Donator: ").append(activeChar.getName()).append(" logged in the game").toString());
440
+
441
+		if(Config.ANNOUNCE_NEWBIE_LOGIN && activeChar.isNewbie())
442
+            Announcements.getInstance().announceToAll((new StringBuilder()).append("Welcome ").append(activeChar.getName()).append(" to server!").toString());
443
 		
444
 		if (Olympiad.getInstance().playerInStadia(activeChar))
445
 		{
446
@@ -472,6 +484,11 @@
447
 				}
448
 			}
449
 		}
450
+
451
+        if(Config.RESTART_BY_TIME_OF_DAY)
452
+        {
453
+                ShowNextRestart(activeChar);
454
+        }
455
 		
456
 		// NPCBuffer
457
 		if (PowerPakConfig.BUFFER_ENABLED)
458
@@ -610,12 +627,12 @@
459
 
460
 		if (Config.PM_MESSAGE_ON_START)
461
 		{
462
-			activeChar.sendPacket(new CreatureSay(2, Say2.HERO_VOICE,Config.PM_TEXT1,Config.PM_SERVER_NAME));
463
+			activeChar.sendPacket(new CreatureSay(2, Say2.TELL,Config.PM_TEXT1,Config.PM_SERVER_NAME));
464
 			activeChar.sendPacket(new CreatureSay(15, Say2.PARTYROOM_COMMANDER,activeChar.getName(),Config.PM_TEXT2));
465
 		}
466
 		
467
 		if (Config.SERVER_TIME_ON_START)
468
-			activeChar.sendMessage("SVR time is " + fmt.format(new Date(System.currentTimeMillis())));
469
+			activeChar.sendMessage("Server time:" + fmt.format(new Date(System.currentTimeMillis())));
470
 	}
471
 
472
 	private void ColorSystem(L2PcInstance activeChar)
473
@@ -709,6 +726,8 @@
474
     			activeChar.sendMessage("[Aio System]: Left " + (int)hour + " hours to Aio period ends.");
475
     		}
476
     	}
477
+        if(Config.ALLOW_AIO_EFFECT && activeChar.isAio())
478
+            activeChar.startAbnormalEffect(0x400000);
479
 	}
480
 
481
 	/**
482
@@ -820,12 +839,23 @@
483
 			{
484
 				Castle castle = CastleManager.getInstance().getCastleById(clan.getHasCastle());
485
 				if ((castle != null) && (activeChar.getObjectId() == clan.getLeaderId()))
486
-					Announcements.getInstance().announceToAll("Lord " + activeChar.getName() + " Ruler Of " + castle.getName() + " Castle is now Online!");
487
+	                Announcements.getInstance().announceToAll((new StringBuilder()).append("Lord ").append(activeChar.getName()).append(" ruler of ").append(castle.getName()).append(" Castle logged in the game.").toString());
488
 			}
489
 		}
490
 	}
491
 
492
-	@Override
493
+	/**
494
+     * Envia mensagem para o player do proximo restart
495
+     * NOTE: RESTART_BY_TIME_OF_DAY = TRUE
496
+     *
497
+     * @param activeChar
498
+     */
499
+    private void ShowNextRestart(L2PcInstance activeChar)
500
+    {
501
+            activeChar.sendMessage("Next Restart: " + Restart.getInstance().getRestartNextTime()); 
502
+    }
503
+
504
+    @Override
505
 	public String getType()
506
 	{
507
 		return "[C] 03 EnterWorld";
508
Index: head-src/com/l2jfrozen/gameserver/GameServer.java
509
===================================================================
510
--- head-src/com/l2jfrozen/gameserver/GameServer.java	(revision 1004)
511
+++ head-src/com/l2jfrozen/gameserver/GameServer.java	(working copy)
512
@@ -564,6 +564,14 @@
513
 		
514
 		if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS)
515
 			OfflineTradeTable.restoreOfflineTraders();
516
+
517
+		Util.printSection("Restart Manager");
518
+        if(Config.RESTART_BY_TIME_OF_DAY)
519
+                Restart.getInstance().StartCalculationOfNextRestartTime();
520
+        else
521
+                _log.info("# Auto Restart System is Disabled #");
522
+       
523
+        System.gc();
524
 		
525
 		Util.printSection("Info");
526
 		_log.info("Operating System: " + Util.getOSName() + " " + Util.getOSVersion() + " " + Util.getOSArch());
527
Index: head-src/com/l2jfrozen/FService.java
528
===================================================================
529
--- head-src/com/l2jfrozen/FService.java	(revision 1004)
530
+++ head-src/com/l2jfrozen/FService.java	(working copy)
531
@@ -92,6 +92,9 @@
532
 	public static final String LOG_CONF_FILE = "./config/others/log.cfg";
533
 	public static final String BANNED_IP = "./config/others/banned_ip.cfg";
534
 	public static final String SERVER_NAME_FILE = "./config/others/servername.xml";
535
+
536
+	// By Excalibur
537
+	public static final String EXCALIBUR_FILE = "./config/Excalibur/Custom.properties";
538
 	
539
 	// Legacy others position
540
 	public static final String LEGACY_LOG_CONF_FILE = "./log.cfg";
541
Index: head-src/com/l2jfrozen/gameserver/managers/PlayerKillsManager.java
542
===================================================================
543
--- head-src/com/l2jfrozen/gameserver/managers/PlayerKillsManager.java	(revision 0)
544
+++ head-src/com/l2jfrozen/gameserver/managers/PlayerKillsManager.java	(working copy)
545
@@ -0,0 +1,342 @@
546
+package com.l2jfrozen.gameserver.managers;
547
+
548
+import java.util.Map.Entry;
549
+import java.util.logging.Logger;
550
+
551
+
552
+import com.l2jfrozen.gameserver.model.entity.Announcements;
553
+import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
554
+import com.l2jfrozen.gameserver.model.L2World;
555
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
556
+import com.l2jfrozen.gameserver.model.PcInventory;
557
+
558
+import javolution.util.FastList;
559
+import javolution.util.FastMap;
560
+
561
+/**
562
+ * Класс управляет выдачей наград за убийство определенного игрока 
563
+ * @author sednka
564
+ *
565
+ */
566
+public class PlayerKillsManager {
567
+	
568
+	/** allowedItem */
569
+	public FastMap<Integer, String> allowedItems;
570
+	
571
+	/** Max orders count */
572
+	public static final int TASKS_MAX_COUNT = 60;
573
+	
574
+	/** Orders delete interval (0 - not delete)*/
575
+	public static final int TASKS_DELETE_INTERVAL = 45;
576
+	
577
+	/** Max kills count (0 - Unlimited) */
578
+	public static final int MAX_KILLS_COUNT = 5;
579
+	
580
+	/** Announce */
581
+	public static final boolean ANNOUNCE_ON_ADD = true;
582
+	
583
+	/** Announce */
584
+	public static final String ADD_MESSAGE = "Player %playername% has appointed the award for the player's head %aimname% %itemcount% %itemname%";
585
+	
586
+	/** Announce */
587
+	public static final boolean ANNOUNCE_ON_KILL = true; 
588
+	
589
+	/** Announce */
590
+	public static final String KILL_MESSAGE = "Player %killer% has executed the order and has killed the player %aim%";
591
+	
592
+	/** Price (ID) */
593
+	public static final int PRICE_ITEMID = 4037;
594
+	
595
+	/** Price count; 0-off*/
596
+	public static final int PRICE_ITEMCOUNT = 1;
597
+	
598
+	public static final String PRICE_ITEMNAME = "Coin of Luck";
599
+	
600
+	private FastList<KillTask> _aims;
601
+	
602
+	private static final Logger _log = Logger.getLogger(PlayerKillsManager.class.getName());
603
+	private static PlayerKillsManager _instance;
604
+	
605
+	private static int lastTaskId;
606
+	
607
+	private PlayerKillsManager()
608
+	{
609
+		lastTaskId = 0;
610
+		
611
+		allowedItems = new FastMap<Integer, String>();
612
+		allowedItems.put(57, "Adena");
613
+		allowedItems.put(4037, "CoL");
614
+		allowedItems.put(6673, "FestivalAdena");
615
+		
616
+		_log.info("PlayerKillsManager: init (allowed items: " + allowedItems.keySet().size() + ", delete delay: " + TASKS_DELETE_INTERVAL + ", max tasks: " + TASKS_MAX_COUNT + ").");
617
+		
618
+		_aims = new FastList<KillTask>();
619
+		if(TASKS_DELETE_INTERVAL != 0)
620
+			ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new UpdateKillTasks(), TASKS_DELETE_INTERVAL*60*1000, TASKS_DELETE_INTERVAL*60*1000);
621
+	}
622
+	
623
+	/**
624
+	 * Добавить "жертву" в список
625
+	 * @param ownerObjId ObjectID того, кто создает заявку
626
+	 * @param aimObjectId ObjectID "жертвы"
627
+	 * @param killsCount Количество убийств
628
+	 * @param rewardItemId ID айтема (награда)
629
+	 * @param rewardItemCount Количество айтема
630
+	 * @return Реузльтат добавления
631
+	 */
632
+	public String addKillTask(int ownerObjId, int aimObjectId, int killsCount, int rewardItemId, int rewardItemCount)
633
+	{
634
+		if(getTasksCount() >= TASKS_MAX_COUNT)
635
+			return "There are currently too many orders, try again later.";
636
+		
637
+		if(getTaskForPlayer(aimObjectId) != null) return "This player has already ordered";
638
+		
639
+		if(MAX_KILLS_COUNT != 0 && killsCount > MAX_KILLS_COUNT) return "Limit is exceeded deaths for player";
640
+		
641
+		L2PcInstance owner = L2World.getInstance().getPlayer(ownerObjId);
642
+		PcInventory inv = owner.getInventory();
643
+		
644
+		if(checkItems(inv, killsCount, rewardItemId, rewardItemCount))
645
+		{
646
+			owner.destroyItemByItemId("l2killmanager", rewardItemId, (killsCount*rewardItemCount), null, true);
647
+			owner.destroyItemByItemId("l2killmanager", PRICE_ITEMID, PRICE_ITEMCOUNT, null, true);
648
+			
649
+			KillTask task = new KillTask(lastTaskId++, ownerObjId, aimObjectId, killsCount, rewardItemId, rewardItemCount, System.currentTimeMillis());
650
+			_aims.add(task);
651
+			if(ANNOUNCE_ON_ADD)
652
+			{
653
+				String itemName = getItemName(rewardItemId);
654
+				String playerName = owner.getName();
655
+				String aimName = L2World.getInstance().getPlayer(aimObjectId).getName();
656
+				Announcements.getInstance().announceToAll(ADD_MESSAGE.replace("%playername%", playerName).replace("%aimname%", aimName).replace("%itemcount%", String.valueOf(rewardItemCount)).replace("%itemname%", itemName));
657
+			}
658
+			return "Order has been successfully added!";
659
+		}
660
+		return "Insufficient items.";
661
+	}
662
+	
663
+	/**
664
+	 * Удаляет заказ из списка и возвращает деньги заказчику
665
+	 * @param player Игрок (заказчик)
666
+	 * @param taskId Номер заказа
667
+	 * @return Результат удаления
668
+	 */
669
+	public String removeKillTask(L2PcInstance player, int taskId)
670
+	{
671
+		KillTask task = getTaskOfPlayer(player.getObjectId());
672
+		if(task != null && player.getObjectId() == task.ownerObjectId)
673
+		{
674
+			player.addItem("l2killmanager", task.rewardItemId, task.count * task.rewardItemCount, null, true);
675
+			_aims.remove(task);
676
+			return "Заказ успешно удален.";
677
+		}
678
+		return "Order was successfully removed..";
679
+	}
680
+	
681
+	public void onKill(int aimObjectId, int killerObjectId)
682
+	{
683
+		L2PcInstance aim = L2World.getInstance().getPlayer(aimObjectId);
684
+		L2PcInstance killer = L2World.getInstance().getPlayer(killerObjectId);
685
+		
686
+		KillTask task = getTaskForPlayer(aimObjectId);
687
+		
688
+		if(task == null) return;
689
+		
690
+		if(task.count > 0)
691
+		{
692
+			task.updateKills(killer.getName());
693
+			
694
+			killer.addItem("l2killmanager", task.rewardItemId, task.rewardItemCount, null, true);
695
+			
696
+			if(ANNOUNCE_ON_KILL) Announcements.getInstance().announceToAll(KILL_MESSAGE.replace("%killer%", killer.getName()).replace("%aim%", aim.getName()));
697
+			
698
+		}
699
+	}
700
+	
701
+	/**
702
+	 * Проверяет наличее всех необходимых айтемов у чаров для оплаты
703
+	 * Т.к. проверка объемная вынесена в отдельный метод
704
+	 * @param inventory Инвентарь чара
705
+	 * @param killsCount Количество убийств
706
+	 * @param rewardItemId ID Айтема-награды за убийство
707
+	 * @param rewardItemCount Количество айтема
708
+	 */
709
+	public boolean checkItems(PcInventory inventory, int killsCount, int rewardItemId, int rewardItemCount)
710
+	{
711
+		if(!allowedItems.containsKey(rewardItemId)) 
712
+			return false;
713
+		if(inventory.getItemByItemId(rewardItemId) == null || (inventory.getItemByItemId(PRICE_ITEMID) == null))
714
+			return false;
715
+		if(rewardItemId == PRICE_ITEMID) 
716
+		{
717
+			if(inventory.getItemByItemId(rewardItemId).getCount() < (killsCount*rewardItemCount)+PRICE_ITEMCOUNT)
718
+				return false;
719
+		}
720
+		else
721
+		{
722
+			if(inventory.getItemByItemId(rewardItemId).getCount() < (killsCount*rewardItemCount))
723
+				return false;
724
+			if(inventory.getItemByItemId(PRICE_ITEMID).getCount() < PRICE_ITEMCOUNT)
725
+				return false;
726
+		}
727
+		return true;
728
+	}
729
+	
730
+	/**
731
+	 * Создает строку-список с разрешенными айтемами (для оплаты убийств)
732
+	 * @return Строку, названия в которой разделены ";"
733
+	 */
734
+	public String getPriceList()
735
+	{
736
+		StringBuilder res = new StringBuilder();
737
+		for(String name: allowedItems.values())
738
+		{
739
+			res.append(name).append(";");
740
+		}
741
+		return res.toString();
742
+	}
743
+	
744
+	/**
745
+	 * Ищет и возвращает название айтема по его ID.
746
+	 * Это нужно для сокращенных названий предметов
747
+	 * @param name Имя предмета
748
+	 * @return ID Предмета
749
+	 */
750
+	public int getItemId(String name)
751
+	{
752
+		name.trim();
753
+		for(Entry<Integer, String> entry: allowedItems.entrySet())
754
+		{
755
+			if(entry.getValue().equalsIgnoreCase(name))
756
+				return entry.getKey();
757
+		}
758
+		return 0;
759
+	}
760
+	
761
+	public String getItemName(int id)
762
+	{
763
+		return allowedItems.get(id);
764
+	}
765
+	
766
+	/**
767
+	 * Возвращает задачу по ObjectID жертвы
768
+	 * @param aimObjId
769
+	 * @return
770
+	 */
771
+	public KillTask getTaskForPlayer(int aimObjId)
772
+	{
773
+		for(KillTask task: _aims)
774
+		{
775
+			if(task.aimObjectId == aimObjId)
776
+				return task;
777
+		}
778
+		
779
+		return null;
780
+	}
781
+	
782
+	public KillTask getTaskOfPlayer(int ownerObjId)
783
+	{
784
+		for(KillTask task: _aims)
785
+		{
786
+			if(task.ownerObjectId == ownerObjId)
787
+				return task;
788
+		}
789
+		
790
+		return null;
791
+	}
792
+	
793
+	public KillTask getTaskById(int id)
794
+	{
795
+		for(KillTask task: _aims)
796
+		{
797
+			if(task.id == id)
798
+				return task;
799
+		}
800
+		return null;
801
+	}
802
+	
803
+	public int getTasksCount()
804
+	{
805
+		return _aims.size();
806
+	}
807
+	
808
+	public FastList<KillTask> getKillTasks()
809
+	{
810
+		return _aims;
811
+	}
812
+	
813
+	public static PlayerKillsManager getInstance()
814
+	{
815
+		if(_instance == null)
816
+			_instance = new PlayerKillsManager();
817
+		return _instance;
818
+	}
819
+	
820
+	public class KillTask
821
+	{
822
+		public int id;
823
+		public int ownerObjectId;
824
+		public int aimObjectId;
825
+		public String ownerName;
826
+		public String aimName;
827
+		public int count;
828
+		public int rewardItemId;
829
+		public int rewardItemCount;
830
+		public long startTime;
831
+		
832
+		private FastMap<String, Integer> killers;
833
+		
834
+		public KillTask(int id, int ownerObjectId, int aimObjectId, int count, int rewardItemId, int rewardItemCount, long startTime)
835
+		{
836
+			this.id = id;
837
+			this.ownerObjectId = ownerObjectId;
838
+			this.aimObjectId = aimObjectId;
839
+			this.count = count;
840
+			this.rewardItemId = rewardItemId;
841
+			this.rewardItemCount = rewardItemCount;
842
+			this.startTime = startTime;
843
+			killers = new FastMap<String, Integer>();
844
+			this.aimName = L2World.getInstance().getPlayer(aimObjectId).getName();
845
+			this.ownerName = L2World.getInstance().getPlayer(ownerObjectId).getName();
846
+		}
847
+		
848
+		protected void updateKills(String killerName)
849
+		{
850
+			count--;
851
+			if(killers.get(killerName) == null)
852
+				killers.put(killerName, 1);
853
+			else
854
+			{
855
+				int count =  killers.get(killerName);
856
+				killers.put(killerName, ++count);
857
+			}
858
+			if(count == 0) _aims.remove(this);
859
+		}
860
+		
861
+		public FastMap<String, Integer> getKillers()
862
+		{
863
+			return killers;
864
+		}
865
+	}
866
+	
867
+	class UpdateKillTasks implements Runnable
868
+	{
869
+		public UpdateKillTasks() {}
870
+		
871
+		@Override
872
+		public void run() 
873
+		{
874
+			int count = 0;
875
+			for(KillTask task: _aims)
876
+			{
877
+				if((task.startTime + TASKS_DELETE_INTERVAL * 60 * 1000) <= System.currentTimeMillis())
878
+				{
879
+					count++;
880
+					_aims.remove(task);
881
+				}
882
+			}
883
+			_log.info("PlayerKillsManager: " + count + " aims deleted (time limit)");
884
+		}
885
+		
886
+	}
887
+}
888
Index: config/Excalibur/Custom.properties
889
===================================================================
890
--- config/Excalibur/Custom.properties	(revision 0)
891
+++ config/Excalibur/Custom.properties	(working copy)
892
@@ -0,0 +1,102 @@
893
+# ---------------------------------------
894
+# Clan Full (Comand)                    -
895
+# ---------------------------------------
896
+# Enable and Disable Command //clanfull
897
+EnableClanSystem = True
898
+
899
+# Clan Skills reward
900
+# Format : skillid,skilllvl;skillid2,skilllvl2;....skillidn,skilllvln
901
+ClanSkills = 370,3;371,3;372,3;373,3;374,3;375,3;376,3;377,3;378,3;379,3;380,3;381,3;382,3;383,3;384,3;385,3;386,3;387,3;388,3;389,3;390,3;391,1;
902
+
903
+# Clan Level Reward
904
+ClanSetLevel = 8
905
+
906
+# Clan Reputation Points reward
907
+ReputationScore = 15000
908
+
909
+# ---------------------------------------
910
+# Npc Crest                             -
911
+# ---------------------------------------
912
+# Show clan, alliance crests for territory NPC's.
913
+# Default: False
914
+ShowNpcCrest = True
915
+
916
+# ---------------------------------------
917
+# All in One                            - 
918
+# ---------------------------------------
919
+# Enable Aio Effect
920
+AllowAioEffect = True
921
+
922
+# ---------------------------------------
923
+# Announces                             -
924
+# ---------------------------------------
925
+# Announce Castle Lords on enter game. default = false 
926
+AnnounceCastleLords = True
927
+
928
+# Announce character Aio on enter game. default = false 
929
+AnnounceAioLogin = True
930
+
931
+# Announce character Hero on enter game. default = false 
932
+AnnounceHeroLogin = True
933
+
934
+# Announce character Noble on enter game. default = false 
935
+AnnounceNobleLogin = False
936
+
937
+# Announce character Donator on enter game. default = false 
938
+AnnounceDonatorLogin = True
939
+
940
+# Announce new char on enter game. default = false 
941
+AnnounceNewbieLogin = True
942
+
943
+# ---------------------------------------
944
+# Auto Restart                         -
945
+# ---------------------------------------
946
+# Enable and Disable Auto Restart
947
+EnableRestartSystem = True
948
+	
949
+# If EnableRestartSystem = True Describe hours of the day
950
+# Example: 00:00,12:00 (hh:mm,hh:mm...)
951
+# NOTE: Separate ":" mm:hh and "," others restart time
952
+RestartByTimeOfDay = 00:00,12:00,08:00
953
+	
954
+# Seconds to restart the server ( 360 = 5 Minutes )
955
+# default = 360
956
+RestartSeconds = 360
957
+
958
+# ---------------------------------------
959
+# Disable Weapons for Classes           -
960
+# ---------------------------------------
961
+#Disable weapons for classes: write here classes id
962
+# classId              className
963
+# 88                   Duelist
964
+# 89                   DreadNought
965
+# 90                   Phoenix Knight
966
+#you can find others into char_templates database table
967
+# Example
968
+#DisableBowForClasses = 88, 89, 90
969
+AltDisableBow = True
970
+DisableBowForClasses = 88,89,90,91,99,105,112,113,114
971
+
972
+AltDisableDagger = True
973
+DisableDaggerForClasses = 
974
+
975
+AltDisableSword = True
976
+DisableSwordForClasses = 
977
+
978
+AltDisableBlunt = True
979
+DisableBluntForClasses = 
980
+
981
+AltDisableDual = True
982
+DisableDualForClasses = 
983
+
984
+AltDisablePole = True
985
+DisablePoleForClasses = 
986
+
987
+AltDisableBigSword = True
988
+DisableBigSwordForClasses = 
989
+
990
+AltDisableBigblunt = True
991
+DisableBigBluntForClasses = 
992
+
993
+AltDisableDualfist = True
994
+DisableDualFistForClasses = 
995
\ No newline at end of file
996
Index: head-src/com/l2jfrozen/gameserver/network/serverpackets/NpcInfo.java
997
===================================================================
998
--- head-src/com/l2jfrozen/gameserver/network/serverpackets/NpcInfo.java	(revision 1004)
999
+++ head-src/com/l2jfrozen/gameserver/network/serverpackets/NpcInfo.java	(working copy)
1000
@@ -19,12 +19,16 @@
1001
 package com.l2jfrozen.gameserver.network.serverpackets;
1002
 
1003
 import com.l2jfrozen.Config;
1004
+import com.l2jfrozen.gameserver.datatables.sql.ClanTable;
1005
+import com.l2jfrozen.gameserver.managers.TownManager;
1006
 import com.l2jfrozen.gameserver.model.L2Character;
1007
+import com.l2jfrozen.gameserver.model.L2Clan;
1008
 import com.l2jfrozen.gameserver.model.L2Summon;
1009
 import com.l2jfrozen.gameserver.model.actor.instance.L2MonsterInstance;
1010
 import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance;
1011
 import com.l2jfrozen.gameserver.model.actor.instance.L2PetInstance;
1012
 import com.l2jfrozen.gameserver.model.actor.instance.L2SummonInstance;
1013
+import com.l2jfrozen.gameserver.model.zone.type.L2TownZone;
1014
 
1015
 /**
1016
  * This class ...
1017
@@ -68,6 +72,11 @@
1018
 	
1019
 	/** The _title. */
1020
 	private String _title = "";
1021
+	
1022
+	int _clanCrest = 0;
1023
+	int _allyCrest = 0;
1024
+	int _allyId = 0;
1025
+	int _clanId = 0;
1026
 
1027
 	/**
1028
 	 * Instantiates a new npc info.
1029
@@ -126,7 +135,32 @@
1030
 
1031
 			_title = t;
1032
 		}
1033
-
1034
+        if(Config.SHOW_NPC_CREST)
1035
+        {
1036
+               if(cha instanceof L2NpcInstance && cha.isInsideZone(L2Character.ZONE_PEACE) && cha.getCastle().getOwnerId() != 0)
1037
+               {
1038
+                      int _x,_y,_z;
1039
+                      _x = cha.getX();
1040
+                      _y = cha.getY();
1041
+                      _z = cha.getZ();
1042
+                      L2TownZone Town;
1043
+                      Town = TownManager.getInstance().getTown(_x, _y, _z);
1044
+                      if(Town != null)
1045
+                      {
1046
+                         int townId = Town.getTownId();
1047
+                         if(townId != 33 && townId != 22)
1048
+                         {
1049
+                                L2Clan clan;
1050
+                                clan = ClanTable.getInstance().getClan(cha.getCastle().getOwnerId());
1051
+                                _clanCrest = clan.getCrestId();
1052
+                                _clanId = clan.getClanId();
1053
+                                _allyCrest = clan.getAllyCrestId();
1054
+                                _allyId = clan.getAllyId();
1055
+                         }
1056
+                      }
1057
+               }
1058
+        }
1059
+		
1060
 		_x = _activeChar.getX();
1061
 		_y = _activeChar.getY();
1062
 		_z = _activeChar.getZ();
1063
@@ -231,11 +265,21 @@
1064
 		}
1065
 		
1066
 		writeD(_activeChar.getAbnormalEffect()); // C2
1067
-		writeD(0000); // C2
1068
-		writeD(0000); // C2
1069
-		writeD(0000); // C2
1070
-		writeD(0000); // C2
1071
-		writeC(0000); // C2
1072
+        if(Config.SHOW_NPC_CREST)
1073
+        {
1074
+               writeD(_clanId);
1075
+               writeD(_clanCrest);
1076
+               writeD(_allyId);
1077
+               writeD(_allyCrest);
1078
+        }
1079
+        else
1080
+        {
1081
+               writeD(0000);
1082
+               writeD(0000);
1083
+               writeD(0000);
1084
+               writeD(0000);
1085
+               writeC(0000);
1086
+        }
1087
 
1088
 		writeC(0x00); // C3  team circle 1-blue, 2-red
1089
 		writeF(_collisionRadius);
1090
Index: head-src/com/l2jfrozen/gameserver/model/entity/event/DM.java
1091
===================================================================
1092
--- head-src/com/l2jfrozen/gameserver/model/entity/event/DM.java	(revision 1004)
1093
+++ head-src/com/l2jfrozen/gameserver/model/entity/event/DM.java	(working copy)
1094
@@ -1755,12 +1755,11 @@
1095
 		{
1096
 			NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
1097
 			
1098
-			TextBuilder replyMSG = new TextBuilder("<html><title>" + _eventName + "</title><body>");
1099
-			replyMSG.append("<center><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32></center><br1>");
1100
-			replyMSG.append("<center><font color=\"3366CC\">Current event:</font></center><br1>");
1101
-			replyMSG.append("<center>Name:&nbsp;<font color=\"00FF00\">" + _eventName + "</font></center><br1>");
1102
-			replyMSG.append("<center>Description:&nbsp;<font color=\"00FF00\">" + _eventDesc + "</font></center><br><br>");
1103
-			replyMSG.append("<center>Event Type:&nbsp;<font color=\"00FF00\"> Full Buff Event!!! </font></center><br><br>");
1104
+			TextBuilder replyMSG = new TextBuilder("<html><title>DM</title><body>");
1105
+			replyMSG.append("<center><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32></center><br1>");
1106
+			replyMSG.append("<center><font color=\"LEVEL\">Current event:</font></center><br1>");
1107
+			replyMSG.append("<center>Name: &nbsp;<font color=\"0066CC\">" + _eventName + "</font></center><br1>");
1108
+			replyMSG.append("<center>Description:&nbsp;<font color=\"0066CC\">" + _eventDesc + "</font></center><br>");
1109
 			
1110
 			// final Vector<L2PcInstance> players = getPlayers();
1111
 			synchronized (_players)
1112
@@ -1772,14 +1771,14 @@
1113
 				{
1114
 					if (!_started)
1115
 					{
1116
-						replyMSG.append("Currently participated: <font color=\"00FF00\">" + _players.size() + ".</font><br>");
1117
-						replyMSG.append("Max players: <font color=\"00FF00\">" + _maxPlayers + "</font><br><br>");
1118
-						replyMSG.append("<font color=\"FFFF00\">You can't participate to this event.</font><br>");
1119
+					replyMSG.append("Currently participated: <font color=\"0066CC\">" + _players.size() + ".</font><br>");
1120
+					replyMSG.append("Max players: <font color=\"0066CC\">" + _maxPlayers + "</font><br>");
1121
+					replyMSG.append("<font color=\"0066CC\">You can't participate to this event.</font><br>");
1122
 					}
1123
 				}
1124
 				else if (eventPlayer.isCursedWeaponEquiped() && !Config.DM_JOIN_CURSED)
1125
 				{
1126
-					replyMSG.append("<font color=\"FFFF00\">You can't participate to this event with a cursed Weapon.</font><br>");
1127
+				replyMSG.append("<font color=\"0066CC\">You can't participate to this event with a cursed Weapon.</font><br>");
1128
 				}
1129
 				else if (!_started && _joining && eventPlayer.getLevel() >= _minlvl && eventPlayer.getLevel() <= _maxlvl)
1130
 				{
1131
@@ -1787,31 +1786,33 @@
1132
 					{
1133
 						replyMSG.append("<center><font color=\"3366CC\">You participated already!</font></center><br><br>");
1134
 						
1135
-						replyMSG.append("<center>Joined Players: <font color=\"00FF00\">" + _players.size() + "</font></center><br>");
1136
-						replyMSG.append("<table border=\"0\"><tr>");
1137
-						replyMSG.append("<td width=\"200\">Wait till event start or</td>");
1138
-						replyMSG.append("<td width=\"60\"><center><button value=\"remove\" action=\"bypass -h npc_" + objectId + "_dmevent_player_leave\" width=50 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></center></td>");
1139
-						replyMSG.append("<td width=\"100\">your participation!</td>");
1140
-						replyMSG.append("</tr></table>");
1141
+						replyMSG.append("<center>Joined Players: <font color=\"0066CC\">" + _players.size() + "</font></center><br>");
1142
+
1143
+						replyMSG.append("<center><button value=\"Remove\" action=\"bypass -h npc_" + objectId+ "_dmevent_player_leave\" width=140 height=21 back=\"L2UI_ch3.msnbutton_over\" fore=\"L2UI_ch3.msnbutton\"></center>");
1144
+						replyMSG.append("<center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32></center><br1>");
1145
+						replyMSG.append("<center><font color=\"111111\">By Excalibur</font></center>");				
1146
 					}
1147
 					else
1148
 					{
1149
-						replyMSG.append("<center>Joined Players: <font color=\"00FF00\">" + _players.size() + "</font></center><br>");
1150
-						replyMSG.append("<center><font color=\"3366CC\">You want to participate in the event?</font></center><br>");
1151
-						replyMSG.append("<center><td width=\"200\">Min lvl: <font color=\"00FF00\">" + _minlvl + "</font></center></td><br>");
1152
-						replyMSG.append("<center><td width=\"200\">Max lvl: <font color=\"00FF00\">" + _maxlvl + "</font></center></td><br><br>");
1153
-						replyMSG.append("<center><button value=\"Join\" action=\"bypass -h npc_" + objectId + "_dmevent_player_join\" width=50 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></center><br>");
1154
-						
1155
+						replyMSG.append("<center><font color=\"LEVEL\">You want to participate in the event?</font></center><br>");
1156
+						replyMSG.append("<center><td width=\"200\">Min. level: <font color=\"0066CC\">" + _minlvl + "</font></center></td><br>");
1157
+						replyMSG.append("<center><td width=\"200\">Max. level: <font color=\"0066CC\">" + _maxlvl + "</font></center></td><br>");
1158
+						replyMSG.append("<center><button value=\"Join Event\" action=\"bypass -h npc_" + objectId + "_dmevent_player_join\" width=140 height=21 back=\"L2UI_ch3.msnbutton_over\" fore=\"L2UI_ch3.msnbutton\"></center>");
1159
+						replyMSG.append("<center>Joined Players: <font color=\"0066CC\">" + _players.size() + "</font></center><br>");
1160
+						replyMSG.append("<center>Reward: <font color=\"LEVEL\">" + _rewardAmount + " " + ItemTable.getInstance().getTemplate(_rewardId).getName()+ "</center></font>");
1161
+						replyMSG.append("<center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32></center>");
1162
 					}
1163
 				}
1164
 				else if (_started && !_joining)
1165
 					replyMSG.append("<center>" + _eventName + " match is in progress.</center>");
1166
 				else if (eventPlayer.getLevel() < _minlvl || eventPlayer.getLevel() > _maxlvl)
1167
 				{
1168
-					replyMSG.append("Your lvl: <font color=\"00FF00\">" + eventPlayer.getLevel() + "</font><br>");
1169
-					replyMSG.append("Min lvl: <font color=\"00FF00\">" + _minlvl + "</font><br>");
1170
-					replyMSG.append("Max lvl: <font color=\"00FF00\">" + _maxlvl + "</font><br><br>");
1171
-					replyMSG.append("<font color=\"FFFF00\">You can't participate to this event.</font><br>");
1172
+					replyMSG.append("<center>Your level: <font color=\"0066CC\">" + eventPlayer.getLevel() + "</font><br>");
1173
+					replyMSG.append("<center>Min. level: <font color=\"0066CC\">" + _minlvl + "</font><br>");
1174
+					replyMSG.append("<center>Max. level: <font color=\"0066CC\">" + _maxlvl + "</font><br><br>");
1175
+					replyMSG.append("<center><font color=\"0066CC\">You can't participate to this event.</font><br>");
1176
+					replyMSG.append("<center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32></center><br1>");
1177
+					replyMSG.append("<center><font color=\"111111\">By Excalibur</font></center>");
1178
 				}
1179
 				
1180
 			}
1181
Index: head-src/com/l2jfrozen/Config.java
1182
===================================================================
1183
--- head-src/com/l2jfrozen/Config.java	(revision 1004)
1184
+++ head-src/com/l2jfrozen/Config.java	(working copy)
1185
@@ -189,8 +189,203 @@
1186
 	public static boolean HIGH_RATE_SERVER_DROPS;
1187
 	
1188
 	public static boolean FORCE_COMPLETE_STATUS_UPDATE;
1189
-	
1190
+
1191
 	//============================================================
1192
+	public static boolean SHOW_NPC_CREST;
1193
+    public static boolean ALLOW_AIO_EFFECT;
1194
+    public static boolean ANNOUNCE_CASTLE_LORDS;
1195
+    public static boolean ANNOUNCE_AIO_LOGIN;
1196
+    public static boolean ANNOUNCE_HERO_LOGIN;
1197
+    public static boolean ANNOUNCE_NOBLE_LOGIN;
1198
+    public static boolean ANNOUNCE_DONATOR_LOGIN;
1199
+    public static boolean ANNOUNCE_NEWBIE_LOGIN;
1200
+    public static boolean RESTART_BY_TIME_OF_DAY;
1201
+    public static int RESTART_SECONDS;
1202
+    public static String[] RESTART_INTERVAL_BY_TIME_OF_DAY;
1203
+    public static boolean ENABLE_CLAN_SYSTEM;
1204
+    public static Map CLAN_SKILLS;
1205
+    public static byte CLAN_LEVEL;
1206
+    public static int REPUTATION_QUANTITY;
1207
+    public static String DISABLE_BOW_CLASSES_STRING;
1208
+    public static FastList DISABLE_BOW_CLASSES = new FastList();
1209
+    public static String DISABLE_DAGGER_CLASSES_STRING;
1210
+    public static FastList DISABLE_DAGGER_CLASSES = new FastList();
1211
+    public static String DISABLE_SWORD_CLASSES_STRING;
1212
+    public static FastList DISABLE_SWORD_CLASSES = new FastList();
1213
+    public static String DISABLE_BLUNT_CLASSES_STRING;
1214
+    public static FastList DISABLE_BLUNT_CLASSES = new FastList();
1215
+    public static String DISABLE_DUAL_CLASSES_STRING;
1216
+    public static FastList DISABLE_DUAL_CLASSES = new FastList();
1217
+    public static String DISABLE_POLE_CLASSES_STRING;
1218
+    public static FastList DISABLE_POLE_CLASSES = new FastList();
1219
+    public static String DISABLE_BIGSWORD_CLASSES_STRING;
1220
+    public static FastList DISABLE_BIGSWORD_CLASSES = new FastList();
1221
+    public static String DISABLE_BIGBLUNT_CLASSES_STRING;
1222
+    public static FastList DISABLE_BIGBLUNT_CLASSES = new FastList();
1223
+    public static String DISABLE_DUALFIST_CLASSES_STRING;
1224
+    public static FastList DISABLE_DUALFIST_CLASSES = new FastList();
1225
+
1226
+    
1227
+    //============================================================
1228
+	public static void loadCustomConfig()
1229
+	{
1230
+		final String BYEXCALIBUR = FService.EXCALIBUR_FILE;
1231
+
1232
+		try
1233
+		{
1234
+			Properties CustomSettings = new Properties();
1235
+			InputStream is = new FileInputStream(new File(BYEXCALIBUR));
1236
+			CustomSettings.load(is);
1237
+			is.close();
1238
+			
1239
+			SHOW_NPC_CREST = Boolean.parseBoolean(CustomSettings.getProperty("ShowNpcCrest", "False"));
1240
+            ALLOW_AIO_EFFECT = TypeFormat.parseBoolean(CustomSettings.getProperty("AllowAioEffect", "True"));
1241
+            ANNOUNCE_AIO_LOGIN = Boolean.parseBoolean(CustomSettings.getProperty("AnnounceAioLogin", "False"));
1242
+            ANNOUNCE_HERO_LOGIN = Boolean.parseBoolean(CustomSettings.getProperty("AnnounceHeroLogin", "False"));
1243
+            ANNOUNCE_NOBLE_LOGIN = Boolean.parseBoolean(CustomSettings.getProperty("AnnounceNobleLogin", "False"));
1244
+            ANNOUNCE_DONATOR_LOGIN = Boolean.parseBoolean(CustomSettings.getProperty("AnnounceDonatorLogin", "False"));
1245
+            ANNOUNCE_NEWBIE_LOGIN = Boolean.parseBoolean(CustomSettings.getProperty("AnnounceNewbieLogin", "False"));
1246
+            RESTART_BY_TIME_OF_DAY = Boolean.parseBoolean(CustomSettings.getProperty("EnableRestartSystem", "false"));
1247
+	        RESTART_SECONDS = Integer.parseInt(CustomSettings.getProperty("RestartSeconds", "360"));
1248
+	        RESTART_INTERVAL_BY_TIME_OF_DAY = CustomSettings.getProperty("RestartByTimeOfDay", "20:00").split(",");
1249
+
1250
+            ENABLE_CLAN_SYSTEM = Boolean.parseBoolean(CustomSettings.getProperty("EnableClanSystem", "True"));
1251
+            if(ENABLE_CLAN_SYSTEM)
1252
+            {
1253
+                String AioSkillsSplit[] = CustomSettings.getProperty("ClanSkills", "").split(";");
1254
+                CLAN_SKILLS = new FastMap(AioSkillsSplit.length);
1255
+                String arr$[] = AioSkillsSplit;
1256
+                int len$ = arr$.length;
1257
+                for(int i$ = 0; i$ < len$; i$++)
1258
+                {
1259
+                    String skill = arr$[i$];
1260
+                    String skillSplit[] = skill.split(",");
1261
+                    if(skillSplit.length != 2)
1262
+                    {
1263
+                        System.out.println((new StringBuilder()).append("[Clan System]: invalid config property in L2JDash.ini -> ClanSkills \"").append(skill).append("\"").toString());
1264
+                        continue;
1265
+                    }
1266
+                    try
1267
+                    {
1268
+                        CLAN_SKILLS.put(Integer.valueOf(Integer.parseInt(skillSplit[0])), Integer.valueOf(Integer.parseInt(skillSplit[1])));
1269
+                        continue;
1270
+                    }
1271
+                    catch(NumberFormatException nfe) { }
1272
+                    if(!skill.equals(""))
1273
+                        System.out.println((new StringBuilder()).append("[Clan System]: invalid config property in L2JDash.ini -> ClanSkills \"").append(skillSplit[0]).append("\"").append(skillSplit[1]).toString());
1274
+                }
1275
+
1276
+            }
1277
+            CLAN_LEVEL = Byte.parseByte(CustomSettings.getProperty("ClanSetLevel", "8"));
1278
+            REPUTATION_QUANTITY = Integer.parseInt(CustomSettings.getProperty("ReputationScore", "10000"));
1279
+
1280
+	        DISABLE_BOW_CLASSES_STRING = CustomSettings.getProperty("DisableBowForClasses", "");
1281
+            DISABLE_BOW_CLASSES = new FastList();
1282
+            String arr$[] = DISABLE_BOW_CLASSES_STRING.split(",");
1283
+            int len$ = arr$.length;
1284
+            for(int i$ = 0; i$ < len$; i$++)
1285
+            {
1286
+                String class_id = arr$[i$];
1287
+                if(!class_id.equals(""))
1288
+                    DISABLE_BOW_CLASSES.add(Integer.valueOf(Integer.parseInt(class_id)));
1289
+            }
1290
+
1291
+            DISABLE_DAGGER_CLASSES_STRING = CustomSettings.getProperty("DisableDaggerForClasses", "");
1292
+            DISABLE_DAGGER_CLASSES = new FastList();
1293
+            arr$ = DISABLE_DAGGER_CLASSES_STRING.split(",");
1294
+            len$ = arr$.length;
1295
+            for(int i$ = 0; i$ < len$; i$++)
1296
+            {
1297
+                String class_id = arr$[i$];
1298
+                if(!class_id.equals(""))
1299
+                    DISABLE_DAGGER_CLASSES.add(Integer.valueOf(Integer.parseInt(class_id)));
1300
+            }
1301
+
1302
+            DISABLE_SWORD_CLASSES_STRING = CustomSettings.getProperty("DisableSwordForClasses", "");
1303
+            DISABLE_SWORD_CLASSES = new FastList();
1304
+            arr$ = DISABLE_SWORD_CLASSES_STRING.split(",");
1305
+            len$ = arr$.length;
1306
+            for(int i$ = 0; i$ < len$; i$++)
1307
+            {
1308
+                String class_id = arr$[i$];
1309
+                if(!class_id.equals(""))
1310
+                    DISABLE_SWORD_CLASSES.add(Integer.valueOf(Integer.parseInt(class_id)));
1311
+            }
1312
+
1313
+            DISABLE_BLUNT_CLASSES_STRING = CustomSettings.getProperty("DisableBluntForClasses", "");
1314
+            DISABLE_BLUNT_CLASSES = new FastList();
1315
+            arr$ = DISABLE_BLUNT_CLASSES_STRING.split(",");
1316
+            len$ = arr$.length;
1317
+            for(int i$ = 0; i$ < len$; i$++)
1318
+            {
1319
+                String class_id = arr$[i$];
1320
+                if(!class_id.equals(""))
1321
+                    DISABLE_BLUNT_CLASSES.add(Integer.valueOf(Integer.parseInt(class_id)));
1322
+            }
1323
+
1324
+            DISABLE_DUAL_CLASSES_STRING = CustomSettings.getProperty("DisableDualForClasses", "");
1325
+            DISABLE_DUAL_CLASSES = new FastList();
1326
+            arr$ = DISABLE_DUAL_CLASSES_STRING.split(",");
1327
+            len$ = arr$.length;
1328
+            for(int i$ = 0; i$ < len$; i$++)
1329
+            {
1330
+                String class_id = arr$[i$];
1331
+                if(!class_id.equals(""))
1332
+                    DISABLE_DUAL_CLASSES.add(Integer.valueOf(Integer.parseInt(class_id)));
1333
+            }
1334
+
1335
+            DISABLE_POLE_CLASSES_STRING = CustomSettings.getProperty("DisablePoleForClasses", "");
1336
+            DISABLE_POLE_CLASSES = new FastList();
1337
+            arr$ = DISABLE_POLE_CLASSES_STRING.split(",");
1338
+            len$ = arr$.length;
1339
+            for(int i$ = 0; i$ < len$; i$++)
1340
+            {
1341
+                String class_id = arr$[i$];
1342
+                if(!class_id.equals(""))
1343
+                    DISABLE_POLE_CLASSES.add(Integer.valueOf(Integer.parseInt(class_id)));
1344
+            }
1345
+
1346
+            DISABLE_BIGSWORD_CLASSES_STRING = CustomSettings.getProperty("DisableBigSwordForClasses", "");
1347
+            DISABLE_BIGSWORD_CLASSES = new FastList();
1348
+            arr$ = DISABLE_BIGSWORD_CLASSES_STRING.split(",");
1349
+            len$ = arr$.length;
1350
+            for(int i$ = 0; i$ < len$; i$++)
1351
+            {
1352
+                String class_id = arr$[i$];
1353
+                if(!class_id.equals(""))
1354
+                    DISABLE_BIGSWORD_CLASSES.add(Integer.valueOf(Integer.parseInt(class_id)));
1355
+            }
1356
+
1357
+            DISABLE_BIGBLUNT_CLASSES_STRING = CustomSettings.getProperty("DisableBigBluntForClasses", "");
1358
+            DISABLE_BIGBLUNT_CLASSES = new FastList();
1359
+            arr$ = DISABLE_BIGBLUNT_CLASSES_STRING.split(",");
1360
+            len$ = arr$.length;
1361
+            for(int i$ = 0; i$ < len$; i$++)
1362
+            {
1363
+                String class_id = arr$[i$];
1364
+                if(!class_id.equals(""))
1365
+                    DISABLE_BIGBLUNT_CLASSES.add(Integer.valueOf(Integer.parseInt(class_id)));
1366
+            }
1367
+
1368
+            DISABLE_DUALFIST_CLASSES_STRING = CustomSettings.getProperty("DisableDualFistForClasses", "");
1369
+            DISABLE_DUALFIST_CLASSES = new FastList();
1370
+            arr$ = DISABLE_DUALFIST_CLASSES_STRING.split(",");
1371
+            len$ = arr$.length;
1372
+            for(int i$ = 0; i$ < len$; i$++)
1373
+            {
1374
+                String class_id = arr$[i$];
1375
+                if(!class_id.equals(""))
1376
+                    DISABLE_DUALFIST_CLASSES.add(Integer.valueOf(Integer.parseInt(class_id)));
1377
+            }
1378
+            
1379
+		}
1380
+		catch(Exception e)
1381
+		{
1382
+			e.printStackTrace();
1383
+			throw new Error("Failed to Load " + BYEXCALIBUR + " File.");
1384
+		}
1385
+	}			
1386
+	//============================================================
1387
 	public static void loadOptionsConfig()
1388
 	{
1389
 		final String OPTIONS = FService.OPTIONS_FILE;
1390
@@ -570,8 +765,7 @@
1391
 	public static int AIO_TCOLOR;
1392
 	public static boolean ALLOW_AIO_USE_GK;
1393
 	public static boolean ALLOW_AIO_USE_CM;
1394
-	public static boolean ANNOUNCE_CASTLE_LORDS;
1395
-	
1396
+
1397
 	/** Configuration to allow custom items to be given on character creation */
1398
 	public static boolean CUSTOM_STARTER_ITEMS_ENABLED;
1399
 	public static List<int[]> STARTING_CUSTOM_ITEMS_F = new ArrayList<int[]>();
1400
@@ -674,7 +868,6 @@
1401
         	AIO_TCOLOR = Integer.decode("0x" + otherSettings.getProperty("AioTitleColor", "88AA88"));
1402
         	ALLOW_AIO_USE_GK = Boolean.parseBoolean(otherSettings.getProperty("AllowAioUseGk", "False"));
1403
         	ALLOW_AIO_USE_CM = Boolean.parseBoolean(otherSettings.getProperty("AllowAioUseClassMaster", "False"));
1404
-        	ANNOUNCE_CASTLE_LORDS = Boolean.parseBoolean(otherSettings.getProperty("AnnounceCastleLords", "False"));
1405
         	if(ENABLE_AIO_SYSTEM) //create map if system is enabled
1406
         	{
1407
         		String[] AioSkillsSplit = otherSettings.getProperty("AioSkills", "").split(";");
1408
@@ -1135,9 +1328,6 @@
1409
 	public static byte BASE_SUBCLASS_LEVEL;
1410
 	public static byte MAX_SUBCLASS_LEVEL;
1411
 	
1412
-	public static String DISABLE_BOW_CLASSES_STRING;
1413
-	public static FastList<Integer> DISABLE_BOW_CLASSES = new FastList<Integer>();
1414
-	
1415
 	public static boolean ALT_MOBS_STATS_BONUS;
1416
 	public static boolean ALT_PETS_STATS_BONUS;
1417
 	
1418
@@ -3642,14 +3832,6 @@
1419
 			REMOVE_WEAPON_SUBCLASS = Boolean.parseBoolean(PHYSICSSetting.getProperty("RemoveWeaponSubclass", "False"));
1420
 			REMOVE_CHEST_SUBCLASS = Boolean.parseBoolean(PHYSICSSetting.getProperty("RemoveChestSubclass", "False"));
1421
 			REMOVE_LEG_SUBCLASS = Boolean.parseBoolean(PHYSICSSetting.getProperty("RemoveLegSubclass", "False"));
1422
-			
1423
-			DISABLE_BOW_CLASSES_STRING = PHYSICSSetting.getProperty("DisableBowForClasses", "");
1424
-			DISABLE_BOW_CLASSES = new FastList<Integer>();
1425
-			for (String class_id : DISABLE_BOW_CLASSES_STRING.split(",")){
1426
-				if(!class_id.equals(""))
1427
-					DISABLE_BOW_CLASSES.add(Integer.parseInt(class_id));
1428
-			}
1429
-				
1430
 			LEAVE_BUFFS_ON_DIE = Boolean.parseBoolean(PHYSICSSetting.getProperty("LeaveBuffsOnDie", "True"));
1431
 		
1432
 		}
1433
@@ -4518,6 +4700,9 @@
1434
 			loadEnchantConfig();
1435
 			loadBossConfig();
1436
 
1437
+			// By Excalibur
1438
+			loadCustomConfig();
1439
+
1440
 			// Head functions
1441
 			loadL2JFrozenConfig();
1442
 			loadPHYSICSConfig();
1443
@@ -4581,6 +4766,14 @@
1444
 		}
1445
 	}
1446
 
1447
+	/**
1448
+	 * 
1449
+	 */
1450
+	private static void loadCustomOptions()
1451
+	{
1452
+		// TODO Auto-generated method stub
1453
+		
1454
+	}
1455
 	public static boolean setParameterValue(String pName, String pValue)
1456
 	{
1457
 		if(pName.equalsIgnoreCase("GmLoginSpecialEffect"))
1458
Index: head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminClanFull.java
1459
===================================================================
1460
--- head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminClanFull.java	(revision 0)
1461
+++ head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminClanFull.java	(working copy)
1462
@@ -0,0 +1,65 @@
1463
+package com.l2jfrozen.gameserver.handler.admincommandhandlers;
1464
+
1465
+import com.l2jfrozen.Config;
1466
+import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
1467
+import com.l2jfrozen.gameserver.model.L2Clan;
1468
+import com.l2jfrozen.gameserver.model.L2Object;
1469
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
1470
+import com.l2jfrozen.gameserver.network.SystemMessageId;
1471
+import com.l2jfrozen.gameserver.network.serverpackets.EtcStatusUpdate;
1472
+import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
1473
+
1474
+public class AdminClanFull
1475
+    implements IAdminCommandHandler
1476
+{
1477
+
1478
+    public AdminClanFull()
1479
+    {
1480
+    }
1481
+
1482
+    public boolean useAdminCommand(String command, L2PcInstance activeChar)
1483
+    {
1484
+        if(command.startsWith("admin_clanfull"))
1485
+            try
1486
+            {
1487
+                adminAddClanSkill(activeChar);
1488
+                activeChar.sendMessage("Sucessfull usage //clanfull !");
1489
+            }
1490
+            catch(Exception e)
1491
+            {
1492
+                activeChar.sendMessage("Usage: //clanfull");
1493
+            }
1494
+        return true;
1495
+    }
1496
+
1497
+    private void adminAddClanSkill(L2PcInstance activeChar)
1498
+    {
1499
+        L2Object target = activeChar.getTarget();
1500
+        if(target == null)
1501
+            target = activeChar;
1502
+        L2PcInstance player = null;
1503
+        if(target instanceof L2PcInstance)
1504
+        {
1505
+            player = (L2PcInstance)target;
1506
+        } else
1507
+        {
1508
+            activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
1509
+            return;
1510
+        }
1511
+        if(!player.isClanLeader())
1512
+            player.sendPacket((new SystemMessage(SystemMessageId.S1_IS_NOT_A_CLAN_LEADER)).addString(player.getName()));
1513
+        player.getClan().changeLevel(Config.CLAN_LEVEL);
1514
+        player.ClanSkills();
1515
+        player.sendPacket(new EtcStatusUpdate(activeChar));
1516
+    }
1517
+
1518
+    public String[] getAdminCommandList()
1519
+    {
1520
+        return ADMIN_COMMANDS;
1521
+    }
1522
+
1523
+    private static String ADMIN_COMMANDS[] = {
1524
+        "admin_clanfull"
1525
+    };
1526
+
1527
+}
1528
\ No newline at end of file
1529
Index: head-src/com/l2jfrozen/gameserver/Shutdown.java
1530
===================================================================
1531
--- head-src/com/l2jfrozen/gameserver/Shutdown.java	(revision 1004)
1532
+++ head-src/com/l2jfrozen/gameserver/Shutdown.java	(working copy)
1533
@@ -171,6 +171,18 @@
1534
 		}
1535
 	}
1536
 
1537
+    public void autoRestart(int time)
1538
+    {
1539
+            _secondsShut = time;
1540
+
1541
+            countdown();
1542
+           
1543
+            _shutdownMode = GM_RESTART;
1544
+           
1545
+            _instance.setMode(GM_RESTART);
1546
+            System.exit(2);
1547
+    }
1548
+	
1549
 	/**
1550
 	 * Default constructor is only used internal to create the shutdown-hook instance
1551
 	 */
1552
Index: head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminMassHero.java
1553
===================================================================
1554
--- head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminMassHero.java	(revision 0)
1555
+++ head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminMassHero.java	(working copy)
1556
@@ -0,0 +1,67 @@
1557
+/*
1558
+ * This program is free software; you can redistribute it and/or modify
1559
+ * it under the terms of the GNU General Public License as published by
1560
+ * the Free Software Foundation; either version 2, or (at your option)
1561
+ * any later version.
1562
+ *
1563
+ * This program is distributed in the hope that it will be useful,
1564
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1565
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1566
+ * GNU General Public License for more details.
1567
+ *
1568
+ * You should have received a copy of the GNU General Public License
1569
+ * along with this program; if not, write to the Free Software
1570
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1571
+ * 02111-1307, USA.
1572
+ *
1573
+ * http://www.gnu.org/copyleft/gpl.html
1574
+ */
1575
+package com.l2jfrozen.gameserver.handler.admincommandhandlers;
1576
+
1577
+import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
1578
+import com.l2jfrozen.gameserver.model.L2World;
1579
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
1580
+import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;
1581
+
1582
+/**
1583
+ * @author RedHoT
1584
+ */
1585
+public class AdminMassHero implements IAdminCommandHandler
1586
+{
1587
+	private static String[] ADMIN_COMMANDS =
1588
+	{
1589
+		"admin_masshero"
1590
+	};
1591
+	@Override
1592
+	public boolean useAdminCommand(String command, L2PcInstance activeChar)
1593
+	{
1594
+		if (activeChar == null)
1595
+			return false;
1596
+		
1597
+		if (command.startsWith("admin_masshero"))
1598
+		{
1599
+			for (L2PcInstance player : L2World.getInstance().getAllPlayers())
1600
+			{
1601
+				if (player == null)
1602
+					return false;
1603
+				
1604
+				/* Check to see if the player already is Hero and if aren't in Olympiad Mode */
1605
+				if (!player.isHero() || !player.isInOlympiadMode())
1606
+				{
1607
+					player.setHero(true);
1608
+					player.sendMessage("Admin is rewarding all online players with Hero Status.");
1609
+					player.broadcastPacket(new SocialAction(player.getObjectId(), 16));
1610
+					player.broadcastUserInfo();
1611
+				}
1612
+				player = null;
1613
+			}
1614
+		}
1615
+		return true;
1616
+	}
1617
+
1618
+	@Override
1619
+	public String[] getAdminCommandList()
1620
+	{
1621
+		return ADMIN_COMMANDS;
1622
+	}
1623
+}
1624
\ No newline at end of file
1625
Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java
1626
===================================================================
1627
--- head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java	(revision 1004)
1628
+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java	(working copy)
1629
@@ -475,12 +475,60 @@
1630
 				if (item.getItem() instanceof L2Weapon && ((L2Weapon) item.getItem()).getItemType() == L2WeaponType.BOW && !item.isCupidBow())
1631
 				{
1632
 					
1633
-					if (Config.DISABLE_BOW_CLASSES.contains(activeChar.getClassId().getId()))
1634
-					{
1635
-						activeChar.sendMessage("This item can not be equipped by your class");
1636
-						activeChar.sendPacket(ActionFailed.STATIC_PACKET);
1637
-						return;
1638
-					}
1639
+	                if((item.getItem() instanceof L2Weapon) && ((L2Weapon)item.getItem()).getItemType() == L2WeaponType.BOW && Config.DISABLE_BOW_CLASSES.contains(Integer.valueOf(activeChar.getClassId().getId())))
1640
+	                {
1641
+	                    activeChar.sendMessage("This item can not be equipped by your class");
1642
+	                    activeChar.sendPacket(ActionFailed.STATIC_PACKET);
1643
+	                    return;
1644
+	                }
1645
+	                if((item.getItem() instanceof L2Weapon) && ((L2Weapon)item.getItem()).getItemType() == L2WeaponType.DAGGER && Config.DISABLE_DAGGER_CLASSES.contains(Integer.valueOf(activeChar.getClassId().getId())))
1646
+	                {
1647
+	                    activeChar.sendMessage("This item can not be equipped by your class");
1648
+	                    activeChar.sendPacket(ActionFailed.STATIC_PACKET);
1649
+	                    return;
1650
+	                }
1651
+	                if((item.getItem() instanceof L2Weapon) && ((L2Weapon)item.getItem()).getItemType() == L2WeaponType.SWORD && Config.DISABLE_SWORD_CLASSES.contains(Integer.valueOf(activeChar.getClassId().getId())))
1652
+	                {
1653
+	                    activeChar.sendMessage("This item can not be equipped by your class");
1654
+	                    activeChar.sendPacket(ActionFailed.STATIC_PACKET);
1655
+	                    return;
1656
+	                }
1657
+	                if((item.getItem() instanceof L2Weapon) && ((L2Weapon)item.getItem()).getItemType() == L2WeaponType.BLUNT && Config.DISABLE_BLUNT_CLASSES.contains(Integer.valueOf(activeChar.getClassId().getId())))
1658
+	                {
1659
+	                    activeChar.sendMessage("This item can not be equipped by your class");
1660
+	                    activeChar.sendPacket(ActionFailed.STATIC_PACKET);
1661
+	                    return;
1662
+	                }
1663
+	                if((item.getItem() instanceof L2Weapon) && ((L2Weapon)item.getItem()).getItemType() == L2WeaponType.DUAL && Config.DISABLE_DUAL_CLASSES.contains(Integer.valueOf(activeChar.getClassId().getId())))
1664
+	                {
1665
+	                    activeChar.sendMessage("This item can not be equipped by your class");
1666
+	                    activeChar.sendPacket(ActionFailed.STATIC_PACKET);
1667
+	                    return;
1668
+	                }
1669
+	                if((item.getItem() instanceof L2Weapon) && ((L2Weapon)item.getItem()).getItemType() == L2WeaponType.POLE && Config.DISABLE_POLE_CLASSES.contains(Integer.valueOf(activeChar.getClassId().getId())))
1670
+	                {
1671
+	                    activeChar.sendMessage("This item can not be equipped by your class");
1672
+	                    activeChar.sendPacket(ActionFailed.STATIC_PACKET);
1673
+	                    return;
1674
+	                }
1675
+	                if((item.getItem() instanceof L2Weapon) && ((L2Weapon)item.getItem()).getItemType() == L2WeaponType.BIGSWORD && Config.DISABLE_BIGSWORD_CLASSES.contains(Integer.valueOf(activeChar.getClassId().getId())))
1676
+	                {
1677
+	                    activeChar.sendMessage("This item can not be equipped by your class");
1678
+	                    activeChar.sendPacket(ActionFailed.STATIC_PACKET);
1679
+	                    return;
1680
+	                }
1681
+	                if((item.getItem() instanceof L2Weapon) && ((L2Weapon)item.getItem()).getItemType() == L2WeaponType.BIGBLUNT && Config.DISABLE_BIGBLUNT_CLASSES.contains(Integer.valueOf(activeChar.getClassId().getId())))
1682
+	                {
1683
+	                    activeChar.sendMessage("This item can not be equipped by your class");
1684
+	                    activeChar.sendPacket(ActionFailed.STATIC_PACKET);
1685
+	                    return;
1686
+	                }
1687
+	                if((item.getItem() instanceof L2Weapon) && ((L2Weapon)item.getItem()).getItemType() == L2WeaponType.DUALFIST && Config.DISABLE_DUALFIST_CLASSES.contains(Integer.valueOf(activeChar.getClassId().getId())))
1688
+	                {
1689
+	                    activeChar.sendMessage("This item can not be equipped by your class");
1690
+	                    activeChar.sendPacket(ActionFailed.STATIC_PACKET);
1691
+	                    return;
1692
+	                }
1693
 					
1694
 				}
1695
 				
1696
Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2SiegeRegisterInstance.java
1697
===================================================================
1698
--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2SiegeRegisterInstance.java	(revision 0)
1699
+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2SiegeRegisterInstance.java	(working copy)
1700
@@ -0,0 +1,128 @@
1701
+/* This program is free software; you can redistribute it and/or modify
1702
+* it under the terms of the GNU General Public License as published by
1703
+* the Free Software Foundation; either version 2, or (at your option)
1704
+* any later version.
1705
+*
1706
+* This program is distributed in the hope that it will be useful,
1707
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
1708
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1709
+* GNU General Public License for more details.
1710
+*
1711
+* You should have received a copy of the GNU General Public License
1712
+* along with this program; if not, write to the Free Software
1713
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1714
+* 02111-1307, USA.
1715
+*
1716
+* http://www.gnu.org/copyleft/gpl.html
1717
+*/
1718
+package com.l2jfrozen.gameserver.model.actor.instance;
1719
+
1720
+import com.l2jfrozen.gameserver.ai.CtrlIntention;
1721
+import com.l2jfrozen.gameserver.ai.L2CharacterAI;
1722
+import com.l2jfrozen.gameserver.managers.CastleManager;
1723
+import com.l2jfrozen.gameserver.model.entity.siege.Castle;
1724
+import com.l2jfrozen.gameserver.network.serverpackets.*;
1725
+import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
1726
+import javolution.text.TextBuilder;
1727
+
1728
+// Referenced classes of package com.l2jfrozen.gameserver.model.actor.instance:
1729
+//            L2FolkInstance, L2PcInstance
1730
+
1731
+public class L2SiegeRegisterInstance extends L2FolkInstance
1732
+{
1733
+
1734
+    public L2SiegeRegisterInstance(int objectId, L2NpcTemplate template)
1735
+    {
1736
+        super(objectId, template);
1737
+    }
1738
+
1739
+    public void onAction(L2PcInstance player)
1740
+    {
1741
+        if(!canTarget(player))
1742
+            return;
1743
+        player.setLastFolkNPC(this);
1744
+        if(this != player.getTarget())
1745
+        {
1746
+            player.setTarget(this);
1747
+            MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
1748
+            player.sendPacket(my);
1749
+            my = null;
1750
+            player.sendPacket(new ValidateLocation(this));
1751
+        } else
1752
+        if(!canInteract(player))
1753
+            player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
1754
+        else
1755
+            showHtmlWindow(player);
1756
+        player.sendPacket(ActionFailed.STATIC_PACKET);
1757
+    }
1758
+
1759
+    public void onBypassFeedback(L2PcInstance player, String command)
1760
+    {
1761
+        if(command.startsWith("gludio_castle"))
1762
+            showSiegeInfoWindow(player, 1);
1763
+        else
1764
+        if(command.startsWith("dion_castle"))
1765
+            showSiegeInfoWindow(player, 2);
1766
+        else
1767
+        if(command.startsWith("giran_castle"))
1768
+            showSiegeInfoWindow(player, 3);
1769
+        else
1770
+        if(command.startsWith("oren_castle"))
1771
+            showSiegeInfoWindow(player, 4);
1772
+        else
1773
+        if(command.startsWith("aden_castle"))
1774
+            showSiegeInfoWindow(player, 5);
1775
+        else
1776
+        if(command.startsWith("innadril_castle"))
1777
+            showSiegeInfoWindow(player, 6);
1778
+        else
1779
+        if(command.startsWith("goddard_castle"))
1780
+            showSiegeInfoWindow(player, 7);
1781
+        else
1782
+        if(command.startsWith("rune_castle"))
1783
+            showSiegeInfoWindow(player, 8);
1784
+        else
1785
+        if(command.startsWith("schuttgart_castle"))
1786
+            showSiegeInfoWindow(player, 9);
1787
+        else
1788
+            super.onBypassFeedback(player, command);
1789
+    }
1790
+
1791
+    public void showHtmlWindow(L2PcInstance activeChar)
1792
+    {
1793
+        NpcHtmlMessage nhm = new NpcHtmlMessage(5);
1794
+        TextBuilder replyMSG = new TextBuilder("");
1795
+        replyMSG.append("<html><body><center><title>Kratos</title>");
1796
+        replyMSG.append("<br><img src=\"l2font-e.replay_logo-e\" width=255 height=60>");
1797
+        replyMSG.append("<br><br>Welcome adventurer.");
1798
+        replyMSG.append("<br><br>Register your clan to conquer a castle and Good luck.");
1799
+        replyMSG.append("<br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32>");
1800
+        replyMSG.append("<table width=280><tr>");
1801
+        replyMSG.append((new StringBuilder()).append("<td><button value=Giran action=\"bypass -h npc_").append(getObjectId()).append("_giran_castle\" width=75 height=21 back=L2UI_ch3.Btn1_normalOn fore=L2UI_ch3.Btn1_normalOn></td>").toString());
1802
+        replyMSG.append((new StringBuilder()).append("<td><button value=Aden action=\"bypass -h npc_").append(getObjectId()).append("_aden_castle\" width=75 height=21 back=L2UI_ch3.Btn1_normalOn fore=L2UI_ch3.Btn1_normalOn></td>").toString());
1803
+        replyMSG.append((new StringBuilder()).append("<td><button value=Rune action=\"bypass -h npc_").append(getObjectId()).append("_rune_castle\" width=75 height=21 back=L2UI_ch3.Btn1_normalOn fore=L2UI_ch3.Btn1_normalOn></td>").toString());
1804
+        replyMSG.append("</tr></table>");
1805
+        replyMSG.append("<br><br>");
1806
+        replyMSG.append("<table width=280><tr>");
1807
+        replyMSG.append((new StringBuilder()).append("<td><button value=Goddard action=\"bypass -h npc_").append(getObjectId()).append("_goddard_castle\" width=75 height=21 back=L2UI_ch3.Btn1_normalOn fore=L2UI_ch3.Btn1_normalOn></td>").toString());
1808
+        replyMSG.append((new StringBuilder()).append("<td><button value=Dion action=\"bypass -h npc_").append(getObjectId()).append("_dion_castle\" width=75 height=21 back=L2UI_ch3.Btn1_normalOn fore=L2UI_ch3.Btn1_normalOn></td>").toString());
1809
+        replyMSG.append((new StringBuilder()).append("<td><button value=schuttgart action=\"bypass -h npc_").append(getObjectId()).append("_schuttgart_castle\" width=75 height=21 back=L2UI_ch3.Btn1_normalOn fore=L2UI_ch3.Btn1_normalOn></td>").toString());
1810
+        replyMSG.append("</tr></table>");
1811
+        replyMSG.append("<br><br>");
1812
+        replyMSG.append("<table width=280><tr>");
1813
+        replyMSG.append((new StringBuilder()).append("<td><button value=Innadril action=\"bypass -h npc_").append(getObjectId()).append("_innadril_castle\" width=75 height=21 back=L2UI_ch3.Btn1_normalOn fore=L2UI_ch3.Btn1_normalOn></td>").toString());
1814
+        replyMSG.append((new StringBuilder()).append("<td><button value=Oren action=\"bypass -h npc_").append(getObjectId()).append("_oren_castle\" width=75 height=21 back=L2UI_ch3.Btn1_normalOn fore=L2UI_ch3.Btn1_normalOn></td>").toString());
1815
+        replyMSG.append((new StringBuilder()).append("<td><button value=Gludio action=\"bypass -h npc_").append(getObjectId()).append("_gludio_castle\" width=75 height=21 back=L2UI_ch3.Btn1_normalOn fore=L2UI_ch3.Btn1_normalOn></td>").toString());
1816
+        replyMSG.append("</tr></table>");
1817
+        replyMSG.append("<br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32>");
1818
+        nhm.setHtml(replyMSG.toString());
1819
+        activeChar.sendPacket(nhm);
1820
+    }
1821
+
1822
+    public void showSiegeInfoWindow(L2PcInstance player, int castleId)
1823
+    {
1824
+        Castle c = CastleManager.getInstance().getCastleById(castleId);
1825
+        if(c != null)
1826
+            player.sendPacket(new SiegeInfo(c));
1827
+    }
1828
+}
1829
\ No newline at end of file
1830
Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PKManagerInstance.java
1831
===================================================================
1832
--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PKManagerInstance.java	(revision 0)
1833
+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PKManagerInstance.java	(working copy)
1834
@@ -0,0 +1,287 @@
1835
+package com.l2jfrozen.gameserver.model.actor.instance;
1836
+
1837
+import java.util.Map.Entry;
1838
+import java.util.StringTokenizer;
1839
+
1840
+import com.l2jfrozen.gameserver.managers.PlayerKillsManager;
1841
+import com.l2jfrozen.gameserver.managers.PlayerKillsManager.KillTask;
1842
+
1843
+import javolution.util.FastList;
1844
+
1845
+import com.l2jfrozen.gameserver.model.L2World;
1846
+import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
1847
+import com.l2jfrozen.gameserver.network.serverpackets.MyTargetSelected;
1848
+import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
1849
+import com.l2jfrozen.gameserver.network.serverpackets.ValidateLocation;
1850
+import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
1851
+
1852
+/**
1853
+ * @author sednka
1854
+ *
1855
+ */
1856
+public class L2PKManagerInstance extends L2FolkInstance {
1857
+
1858
+	public static final int TASKS_PER_PAGE = 5;
1859
+	
1860
+	public static final String HTML_FOLDER = "data/html/pkmanager/";
1861
+	public static final String INDEX_PAGE = HTML_FOLDER + "index.htm";
1862
+	public static final String AIM_PAGE = HTML_FOLDER + "makeaim.htm";
1863
+	public static final String SHOW_AIMS_PAGE = HTML_FOLDER + "showaims.htm";
1864
+	public static final String SHOW_AIM_PAGE = HTML_FOLDER + "showaim.htm";
1865
+	public static final String RESULT_PAGE = HTML_FOLDER + "result.htm";
1866
+	
1867
+	public L2PKManagerInstance(int objectId, L2NpcTemplate template) {
1868
+		super(objectId, template);
1869
+	}
1870
+	
1871
+	@Override
1872
+	public void onBypassFeedback(L2PcInstance player, String command)
1873
+	{
1874
+		StringTokenizer st = new StringTokenizer(command, " ");
1875
+		String curCommand = st.nextToken();
1876
+		if(curCommand.startsWith("openpage"))
1877
+		{
1878
+			
1879
+			String pageName = st.nextToken();
1880
+			if(pageName.equalsIgnoreCase("showaims"))
1881
+			{
1882
+				int pageId = Integer.parseInt(st.nextToken());
1883
+				showAimsPage(player, pageId);
1884
+			}
1885
+			else if(pageName.equalsIgnoreCase("showaim"))
1886
+			{
1887
+				int taskId = -1;
1888
+				if(st.countTokens() > 0) 
1889
+				{
1890
+					try
1891
+					{
1892
+						taskId = Integer.parseInt(st.nextToken());
1893
+					}
1894
+					catch(NumberFormatException e)
1895
+					{
1896
+						sendHtmlMessage(player, "Wrong order.");
1897
+						return;
1898
+					}
1899
+				}
1900
+				KillTask task = PlayerKillsManager.getInstance().getTaskById(taskId);
1901
+				
1902
+				if(task != null)
1903
+					showAimPage(player, task);
1904
+			}
1905
+			else
1906
+				openPage(player, pageName);
1907
+		}
1908
+		//TODO переписать этот ужас
1909
+		else if(curCommand.startsWith("addaim"))
1910
+		{
1911
+			String result;
1912
+			if(st.countTokens() >= 4)
1913
+			{
1914
+				try
1915
+				{
1916
+					int itemId = PlayerKillsManager.getInstance().getItemId(st.nextToken());
1917
+					int count = Integer.parseInt(st.nextToken());
1918
+					String aimName = st.nextToken();
1919
+					int aimObjId = L2World.getInstance().getPlayer(aimName) != null ? L2World.getInstance().getPlayer(aimName).getObjectId() : -1;
1920
+					int killsCount = Integer.parseInt(st.nextToken());
1921
+					if(count > 0 && killsCount > 0) 
1922
+					{
1923
+						if(aimObjId > 0)
1924
+							result = PlayerKillsManager.getInstance().addKillTask(player.getObjectId(), aimObjId, killsCount, itemId, count);
1925
+						else
1926
+							result = "Incorrectly specified target.";
1927
+					}
1928
+					else
1929
+					{
1930
+						result = "Incorrectly entered data.";
1931
+					}
1932
+				}
1933
+				catch(NumberFormatException e)
1934
+				{
1935
+					result = "Incorrectly entered data.";
1936
+				}
1937
+			}
1938
+			else
1939
+			{
1940
+				result = "You have specified not all data.";
1941
+			}
1942
+			sendHtmlMessage(player, result);
1943
+		}
1944
+		else if(curCommand.startsWith("delaim"))
1945
+		{
1946
+			if(st.countTokens() >= 1)
1947
+			{
1948
+				try
1949
+				{
1950
+					int taskId = Integer.parseInt(st.nextToken());
1951
+					String result = PlayerKillsManager.getInstance().removeKillTask(player, taskId);
1952
+					sendHtmlMessage(player, result);
1953
+				}
1954
+				catch(NumberFormatException e)
1955
+				{
1956
+					sendHtmlMessage(player, "You can't remove this order.");
1957
+				}
1958
+			}
1959
+		}
1960
+		
1961
+	}
1962
+	
1963
+	private void openPage(L2PcInstance player, String pageName)
1964
+	{
1965
+		NpcHtmlMessage html = new NpcHtmlMessage(1);
1966
+		if(pageName.equalsIgnoreCase("index"))
1967
+		{
1968
+			html.setFile(INDEX_PAGE);
1969
+		}
1970
+		else if(pageName.equalsIgnoreCase("makeaim"))
1971
+		{
1972
+			html.setFile(AIM_PAGE);
1973
+			html.replace("%serviceprice%", PlayerKillsManager.PRICE_ITEMCOUNT + " <font color=LEVEL>" + PlayerKillsManager.PRICE_ITEMNAME + "</font>");
1974
+			html.replace("%values%", PlayerKillsManager.getInstance().getPriceList());
1975
+		}
1976
+		// попытаемся прогрузить по имени htm
1977
+		else
1978
+		{
1979
+			html.setFile(HTML_FOLDER + pageName + ".htm");
1980
+		}
1981
+		
1982
+		sendHtmlMessage(player, html); 
1983
+	}
1984
+	
1985
+	/**
1986
+	 * Показывает страницу со списком "заказанных игроков".
1987
+	 * @param player Игрок
1988
+	 * @param pageId Номер страницы
1989
+	 */
1990
+	//TODO Переделать и этот ужас
1991
+	private void showAimsPage(L2PcInstance player, int pageId)
1992
+	{
1993
+		NpcHtmlMessage html = new NpcHtmlMessage(1);
1994
+		html.setFile(SHOW_AIMS_PAGE);
1995
+		
1996
+		StringBuilder sb = new StringBuilder();
1997
+		
1998
+		int tasksCount = PlayerKillsManager.getInstance().getTasksCount();
1999
+		
2000
+		FastList<KillTask> killTasks = PlayerKillsManager.getInstance().getKillTasks();
2001
+		
2002
+		int num = pageId*TASKS_PER_PAGE;
2003
+		if(num > tasksCount) num = tasksCount;
2004
+		if(tasksCount > 0)
2005
+		{
2006
+			sb.append("<table width=300>");
2007
+			for(int i = pageId*TASKS_PER_PAGE-TASKS_PER_PAGE;i < num;i++)
2008
+			{
2009
+				KillTask task = killTasks.get(i);
2010
+				sb.append("<tr><td align=center width=75>").append(task.ownerName).append("</td>").append("<td align=center width=75>").append(task.aimName).append("</td>");
2011
+				sb.append("<td align=center width=75>").append("<a action=\"bypass -h npc_%objectId%_openpage showaim ").append(task.id).append("\">");
2012
+				sb.append("More...").append("</a></td></tr>");
2013
+			}
2014
+			sb.append("</table><br><br><br>");
2015
+			int pg = getPagesCount(tasksCount);
2016
+			sb.append("Pages:&nbsp;");
2017
+			for(int i = 1;i <= pg;i++)
2018
+			{
2019
+				if(i == pageId)
2020
+					sb.append(i).append("&nbsp;");
2021
+				else
2022
+					sb.append("<a action=\"bypass -h npc_%objectId%_openpage showaims ").append(i).append("\">").append(i).append("</a>&nbsp;");
2023
+			}
2024
+		}
2025
+		else
2026
+			sb.append("Orders not found");
2027
+		html.replace("%data%", sb.toString());
2028
+		
2029
+		sendHtmlMessage(player, html);
2030
+	}
2031
+	
2032
+	private void showAimPage(L2PcInstance player, KillTask task)
2033
+	{
2034
+		NpcHtmlMessage html = new NpcHtmlMessage(1);
2035
+		html.setFile(SHOW_AIM_PAGE);
2036
+		html.replace("%owner%", task.ownerName);
2037
+		html.replace("%aim%", task.aimName);
2038
+		html.replace("%items%", task.rewardItemCount + "  <font color=LEVEL>" + PlayerKillsManager.getInstance().getItemName(task.rewardItemId) + "</font>");
2039
+		html.replace("%killscount%", String.valueOf(task.count));
2040
+		
2041
+		StringBuilder sb = new StringBuilder();
2042
+		
2043
+		if(task.getKillers().isEmpty()) 
2044
+			sb.append("No one kill");
2045
+		else
2046
+		{
2047
+			sb.append("<table width=150>");
2048
+			for(Entry<String, Integer> entry: task.getKillers().entrySet())
2049
+			{
2050
+				sb.append("<tr><td width=100 align=center>").append(entry.getKey()).append("</td>");
2051
+				sb.append("<td width=50 align=center>").append(entry.getValue()).append("</td></tr>");
2052
+			}
2053
+			sb.append("</table>");
2054
+		}
2055
+		if(player.getObjectId() == task.ownerObjectId)
2056
+		{
2057
+			sb.append("<center><a action=\"bypass -h npc_%objectId%_delaim ").append(task.id).append("\">Delete</a></center>");
2058
+		}
2059
+		
2060
+		html.replace("%killstable%", sb.toString());
2061
+		sendHtmlMessage(player, html);
2062
+	}
2063
+	
2064
+	//TODO уверен что это велосипед...
2065
+	public int getPagesCount(int tasksCount)
2066
+	{
2067
+		if(tasksCount % TASKS_PER_PAGE > 0)
2068
+			return tasksCount / TASKS_PER_PAGE + 1;
2069
+		return tasksCount / TASKS_PER_PAGE;
2070
+	}
2071
+	
2072
+	private void sendHtmlMessage(L2PcInstance player, NpcHtmlMessage html)
2073
+	{
2074
+		html.replace("%backlink%", "<a action=\"bypass -h npc_%objectId%_openpage index\">Back</a>");
2075
+		html.replace("%objectId%", String.valueOf(getObjectId()));
2076
+		html.replace("%npcId%", String.valueOf(getNpcId()));
2077
+		player.sendPacket(html);
2078
+	}
2079
+	
2080
+	/**
2081
+	 * Посылка HTM с заменой %text% на текст
2082
+	 * @param text Текст
2083
+	 */
2084
+	private void sendHtmlMessage(L2PcInstance player, String text)
2085
+	{
2086
+		NpcHtmlMessage html = new NpcHtmlMessage(1);
2087
+		html.setFile(RESULT_PAGE);
2088
+		html.replace("%text%", text);
2089
+		sendHtmlMessage(player, html);
2090
+	}
2091
+	
2092
+	@Override
2093
+	public void onAction(L2PcInstance player)
2094
+	{
2095
+		player.setLastFolkNPC(this);
2096
+		if(!canTarget(player))
2097
+			return;
2098
+		if(this != player.getTarget()) 
2099
+		{
2100
+			player.setTarget(this);
2101
+			MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
2102
+			player.sendPacket(my);
2103
+			player.sendPacket(new ValidateLocation(this));
2104
+		}
2105
+		else 
2106
+		{
2107
+			if(!canInteract(player))
2108
+			{
2109
+				
2110
+			}
2111
+			else
2112
+			{
2113
+				NpcHtmlMessage html = new NpcHtmlMessage(1);
2114
+				html.setFile(INDEX_PAGE);
2115
+				sendHtmlMessage(player, html);
2116
+			}
2117
+		}
2118
+		player.sendPacket(ActionFailed.STATIC_PACKET);
2119
+	}
2120
+
2121
+}
2122
Index: head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java
2123
===================================================================
2124
--- head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java	(revision 1004)
2125
+++ head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java	(working copy)
2126
@@ -312,4 +312,12 @@
2127
 				e.printStackTrace();
2128
 		}
2129
 	}
2130
+
2131
+	public void announceNormal(String message)
2132
+	{
2133
+		for (L2PcInstance player : L2World.getInstance().getAllPlayers())
2134
+		{
2135
+			player.sendMessage(message);
2136
+     	}
2137
+	}
2138
 }
2139
Index: head-src/com/l2jfrozen/gameserver/model/entity/event/TvT.java
2140
===================================================================
2141
--- head-src/com/l2jfrozen/gameserver/model/entity/event/TvT.java	(revision 1004)
2142
+++ head-src/com/l2jfrozen/gameserver/model/entity/event/TvT.java	(working copy)
2143
@@ -1916,11 +1916,11 @@
2144
 		{
2145
 			NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
2146
 
2147
-			TextBuilder replyMSG = new TextBuilder("<html><title>"+_eventName+"</title><body>");
2148
-			replyMSG.append("<center><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32></center><br1>");
2149
-			replyMSG.append("<center><font color=\"3366CC\">Current event:</font></center><br1>");
2150
-			replyMSG.append("<center>Name:&nbsp;<font color=\"00FF00\">" + _eventName + "</font></center><br1>");
2151
-			replyMSG.append("<center>Description:&nbsp;<font color=\"00FF00\">" + _eventDesc + "</font></center><br><br>");
2152
+			TextBuilder replyMSG = new TextBuilder("<html><title>TvT</title><body>");
2153
+			replyMSG.append("<center><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32></center><br1>");
2154
+			replyMSG.append("<center><font color=\"LEVEL\">Current event:</font></center><br1>");
2155
+			replyMSG.append("<center>Name: &nbsp;<font color=\"0066CC\">" + _eventName + "</font></center><br1>");
2156
+			replyMSG.append("<center>Description:&nbsp;<font color=\"0066CC\">" + _eventDesc + "</font></center><br>");
2157
 
2158
 			if(!_started && !_joining)
2159
 				replyMSG.append("<center>Wait till the admin/gm start the participation.</center>");
2160
@@ -1928,14 +1928,14 @@
2161
 			{
2162
 				if(!_started)
2163
 				{
2164
-					replyMSG.append("Currently participated: <font color=\"00FF00\">" + _playersShuffle.size() + ".</font><br>");
2165
-					replyMSG.append("Max players: <font color=\"00FF00\">" + _maxPlayers + "</font><br><br>");
2166
-					replyMSG.append("<font color=\"FFFF00\">You can't participate to this event.</font><br>");
2167
+					replyMSG.append("Currently participated: <font color=\"0066CC\">" + _playersShuffle.size() + ".</font><br>");
2168
+					replyMSG.append("Max players: <font color=\"0066CC\">" + _maxPlayers + "</font><br>");
2169
+					replyMSG.append("<font color=\"0066CC\">You can't participate to this event.</font><br>");
2170
 				}
2171
 			}
2172
 			else if(eventPlayer.isCursedWeaponEquiped() && !Config.TVT_JOIN_CURSED)
2173
 			{
2174
-				replyMSG.append("<font color=\"FFFF00\">You can't participate to this event with a cursed Weapon.</font><br>");
2175
+				replyMSG.append("<font color=\"0066CC\">You can't participate to this event with a cursed Weapon.</font><br>");
2176
 			}
2177
 			else if(!_started && _joining && eventPlayer.getLevel()>=_minlvl && eventPlayer.getLevel()<=_maxlvl)
2178
 			{
2179
@@ -1943,21 +1943,22 @@
2180
 					if(_players.contains(eventPlayer) || _playersShuffle.contains(eventPlayer) || checkShufflePlayers(eventPlayer))
2181
 					{
2182
 						if(Config.TVT_EVEN_TEAMS.equals("NO") || Config.TVT_EVEN_TEAMS.equals("BALANCE"))
2183
-							replyMSG.append("You participated already in team <font color=\"LEVEL\">" + eventPlayer._teamNameTvT + "</font><br><br>");
2184
+							replyMSG.append("You participated already in team <font color=\"0066CC\">" + eventPlayer._teamNameTvT + "</font><br><br>");
2185
 						else if(Config.TVT_EVEN_TEAMS.equals("SHUFFLE"))
2186
-							replyMSG.append("<center><font color=\"3366CC\">You participated already!</font></center><br><br>");
2187
-							
2188
-						replyMSG.append("<center>Joined Players: <font color=\"00FF00\">" + _playersShuffle.size() + "</font></center><br>");
2189
+							replyMSG.append("<center><font color=\"0066CC\">You participated already!.</font></center><br>");
2190
+						
2191
+						replyMSG.append("<center>Joined Players: <font color=\"0066CC\">" + _playersShuffle.size() + "</font></center><br>");
2192
 
2193
-						replyMSG.append("<center><font color=\"3366CC\">Wait till event start or remove your participation!</font><center>");
2194
-						replyMSG.append("<center><button value=\"Remove\" action=\"bypass -h npc_" + objectId+ "_tvt_player_leave\" width=85 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center>");
2195
+						replyMSG.append("<center><button value=\"Remove\" action=\"bypass -h npc_" + objectId+ "_tvt_player_leave\" width=140 height=21 back=\"L2UI_ch3.msnbutton_over\" fore=\"L2UI_ch3.msnbutton\"></center>");
2196
+						replyMSG.append("<center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32></center><br1>");
2197
+						replyMSG.append("<center><font color=\"111111\">By Excalibur</font></center>");				
2198
 					}
2199
 					else
2200
 					{
2201
-						replyMSG.append("<center><font color=\"3366CC\">You want to participate in the event?</font></center><br>");
2202
-						replyMSG.append("<center><td width=\"200\">Min lvl: <font color=\"00FF00\">" + _minlvl + "</font></center></td><br>");
2203
-						replyMSG.append("<center><td width=\"200\">Max lvl: <font color=\"00FF00\">" + _maxlvl + "</font></center></td><br><br>");
2204
-						replyMSG.append("<center><font color=\"3366CC\">Teams:</font></center><br>");
2205
+						replyMSG.append("<center><font color=\"LEVEL\">You want to participate in the event?</font></center><br>");
2206
+						replyMSG.append("<center><td width=\"200\">Min. level: <font color=\"0066CC\">" + _minlvl + "</font></center></td><br>");
2207
+						replyMSG.append("<center><td width=\"200\">Max. level: <font color=\"0066CC\">" + _maxlvl + "</font></center></td><br>");
2208
+						replyMSG.append("<center><font color=\"LEVEL\">Teams: </font></center>");
2209
 
2210
 						if(Config.TVT_EVEN_TEAMS.equals("NO") || Config.TVT_EVEN_TEAMS.equals("BALANCE"))
2211
 						{
2212
@@ -1965,9 +1966,9 @@
2213
 
2214
 							for(String team : _teams)
2215
 							{
2216
-								replyMSG.append("<tr><td width=\"100\"><font color=\"LEVEL\">" + team + "</font>&nbsp;(" + teamPlayersCount(team) + " joined)</td>");
2217
+								replyMSG.append("<tr><td width=\"100\"><font color=\"0066CC\">" + team + "</font>&nbsp;(" + teamPlayersCount(team) + " joined.)</td>");
2218
 								replyMSG.append("<center><td width=\"60\"><button value=\"Join\" action=\"bypass -h npc_" + objectId + "_tvt_player_join " + team
2219
-										+ "\" width=85 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center></td></tr>");
2220
+										+ "\" width=140 height=21 back=\"L2UI_ch3.msnbutton_over\" fore=\"L2UI_ch3.msnbutton\"></center></td></tr>");
2221
 							}
2222
 							replyMSG.append("</table></center>");
2223
 						}
2224
@@ -1976,14 +1977,15 @@
2225
 							replyMSG.append("<center>");
2226
 
2227
 							for(String team : _teams)
2228
-								replyMSG.append("<tr><td width=\"100\"><font color=\"LEVEL\">" + team + "</font> &nbsp;</td>");
2229
+								replyMSG.append("<tr><td width=\"100\"><font color=\"0066CC\">" + team + "</font> &nbsp;</td>");
2230
 
2231
 							replyMSG.append("</center><br>");
2232
 
2233
-							replyMSG.append("<center><button value=\"Join Event\" action=\"bypass -h npc_" + objectId + "_tvt_player_join eventShuffle\" width=85 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center>");
2234
-							replyMSG.append("<center><font color=\"3366CC\">Teams will be reandomly generated!</font></center><br>");
2235
-							replyMSG.append("<center>Joined Players:</font> <font color=\"LEVEL\">" + _playersShuffle.size() + "</center></font><br>");
2236
+							replyMSG.append("<center><button value=\"Join Event\" action=\"bypass -h npc_" + objectId + "_tvt_player_join eventShuffle\" width=140 height=21 back=\"L2UI_ch3.msnbutton_over\" fore=\"L2UI_ch3.msnbutton\"></center>");
2237
+							replyMSG.append("<center><font color=\"0066CC\">Teams will be reandomly generated!</font></center><br>");
2238
+							replyMSG.append("<center>Joined Players: </font><font color=\"0066CC\">" + _playersShuffle.size() + "</center></font><br>");
2239
 							replyMSG.append("<center>Reward: <font color=\"LEVEL\">" + _rewardAmount + " " + ItemTable.getInstance().getTemplate(_rewardId).getName()+ "</center></font>");
2240
+							replyMSG.append("<center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32></center>");
2241
 						}
2242
 					}
2243
 				}
2244
@@ -1993,10 +1995,12 @@
2245
 				replyMSG.append("<center>"+_eventName+" match is in progress.</center>");
2246
 			else if(eventPlayer.getLevel() < _minlvl || eventPlayer.getLevel() > _maxlvl)
2247
 			{
2248
-				replyMSG.append("Your lvl: <font color=\"00FF00\">" + eventPlayer.getLevel() + "</font><br>");
2249
-				replyMSG.append("Min lvl: <font color=\"00FF00\">" + _minlvl + "</font><br>");
2250
-				replyMSG.append("Max lvl: <font color=\"00FF00\">" + _maxlvl + "</font><br><br>");
2251
-				replyMSG.append("<font color=\"FFFF00\">You can't participate to this event.</font><br>");
2252
+				replyMSG.append("<center>Your level: <font color=\"0066CC\">" + eventPlayer.getLevel() + "</font><br>");
2253
+				replyMSG.append("<center>Min. level: <font color=\"0066CC\">" + _minlvl + "</font><br>");
2254
+				replyMSG.append("<center>Max. level: <font color=\"0066CC\">" + _maxlvl + "</font><br><br>");
2255
+				replyMSG.append("<center><font color=\"0066CC\">You can't participate to this event.</font><br>");
2256
+				replyMSG.append("<center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32></center><br1>");
2257
+				replyMSG.append("<center><font color=\"111111\">By Excalibur</font></center>");
2258
 			}
2259
 
2260
 			replyMSG.append("</body></html>");
2261
Index: head-src/com/l2jfrozen/L2Frozen.java
2262
===================================================================
2263
--- head-src/com/l2jfrozen/L2Frozen.java	(revision 1004)
2264
+++ head-src/com/l2jfrozen/L2Frozen.java	(working copy)
2265
@@ -30,12 +30,37 @@
2266
 	public static void info()
2267
 
2268
 	{
2269
-		_log.info("                                                                            ");
2270
-		_log.info("         #     #####          ##### ##### ##### ##### ##### ##    #         ");
2271
-		_log.info("         #         #          #     #   # #   #     # #     # #   #         ");
2272
-		_log.info("         #      ###    ####   ###   #   # #   #   #   ###   #  #  #         ");
2273
-		_log.info("         #     #              #     ###   #   # #     #     #   # #         ");
2274
-		_log.info("         ##### #####          #     #  ## ##### ##### ##### #    ##         ");
2275
-		_log.info("                                                                            ");
2276
+        _log.info("############################################################################");
2277
+        _log.info("##                                                                        ##");
2278
+        _log.info("##                                                                        ##");
2279
+        _log.info("##                                                                        ##");
2280
+        _log.info("       #     #####   ###        ##### ##### ##### ##### ##### ##    #       ");
2281
+        _log.info("       #         #     #        #     #   # #   #     # #     # #   #       ");
2282
+        _log.info("       #      ###      #        ###   #   # #   #   #   ###   #  #  #       ");
2283
+        _log.info("       #     #     #   #        #     ###   #   # #     #     #   # #       ");
2284
+        _log.info("       ##### ##### #####        #     #  ## ##### ##### ##### #    ##       ");
2285
+        _log.info("                      Custom Edition By Excalibur                           ");
2286
+        _log.info("                          Skype: tasos4444                                  ");
2287
+        _log.info("##                                                                        ##");
2288
+        _log.info("##                                                                        ##");
2289
+        _log.info("##                                                                        ##");
2290
+        _log.info("############################################################################");
2291
 	}
2292
 }
2293
\ No newline at end of file
2294
Index: head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java
2295
===================================================================
2296
--- head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java	(revision 1004)
2297
+++ head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java	(working copy)
2298
@@ -37,6 +37,7 @@
2299
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminChangeAccessLevel;
2300
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCharSupervision;
2301
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminChristmas;
2302
+import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminClanFull;
2303
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCreateItem;
2304
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCursedWeapons;
2305
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminDMEngine;
2306
@@ -93,6 +94,7 @@
2307
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminVIPEngine;
2308
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminWho;
2309
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminZone;
2310
+import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminMassHero;
2311
 
2312
 /**
2313
  * This class ...
2314
@@ -144,6 +146,7 @@
2315
 		registerAdminCommandHandler(new AdminRepairChar());
2316
 		registerAdminCommandHandler(new AdminChangeAccessLevel());
2317
 		registerAdminCommandHandler(new AdminChristmas());
2318
+		registerAdminCommandHandler(new AdminClanFull());
2319
 		registerAdminCommandHandler(new AdminBan());
2320
 		registerAdminCommandHandler(new AdminPolymorph());
2321
 		// registerAdminCommandHandler(new AdminBanChat());
2322
@@ -186,6 +189,7 @@
2323
 		registerAdminCommandHandler(new AdminAio());
2324
 		registerAdminCommandHandler(new AdminCharSupervision());
2325
 		registerAdminCommandHandler(new AdminWho()); // L2OFF command
2326
+		registerAdminCommandHandler(new AdminMassHero());
2327
 		// ATTENTION: adding new command handlers, you have to change the
2328
 		// sql file containing the access levels rights
2329
 		
2330
Index: build.xml
2331
===================================================================
2332
--- build.xml	(revision 1004)
2333
+++ build.xml	(working copy)
2334
@@ -184,6 +184,12 @@
2335
 			</fileset>
2336
 		</copy>
2337
 
2338
+		<copy todir="${build.dist.game}/config/Excalibur">
2339
+			<fileset dir="config/Excalibur">
2340
+				<include name="*.properties" />
2341
+			</fileset>
2342
+		</copy>
2343
+
2344
 		<copy todir="${build.dist.game}/config/functions">
2345
 			<fileset dir="config/functions">
2346
 				<include name="*.properties" />
2347
Index: head-src/com/l2jfrozen/gameserver/model/entity/siege/Castle.java
2348
===================================================================
2349
--- head-src/com/l2jfrozen/gameserver/model/entity/siege/Castle.java	(revision 1004)
2350
+++ head-src/com/l2jfrozen/gameserver/model/entity/siege/Castle.java	(working copy)
2351
@@ -92,6 +92,7 @@
2352
 	private int _taxPercent = 0;
2353
 	private double _taxRate = 0;
2354
 	private int _treasury = 0;
2355
+	private boolean _showNpcCrest = false;
2356
 	private L2CastleZone _zone;
2357
 	private L2CastleTeleportZone _teleZone;
2358
 	private L2Clan _formerOwner = null;
2359
@@ -376,6 +377,7 @@
2360
 		}
2361
 
2362
 		updateOwnerInDB(clan); // Update in database
2363
+		setShowNpcCrest(false);
2364
 
2365
 		if(getSiege().getIsInProgress())
2366
 		{
2367
@@ -565,6 +567,7 @@
2368
 
2369
 				_taxPercent = rs.getInt("taxPercent");
2370
 				_treasury = rs.getInt("treasury");
2371
+				_showNpcCrest = rs.getBoolean("showNpcCrest");
2372
 			}
2373
 
2374
 			rs.close();
2375
@@ -867,6 +870,20 @@
2376
 		return _treasury;
2377
 	}
2378
 
2379
+	   public final boolean getShowNpcCrest()
2380
+	   {
2381
+	         return _showNpcCrest;
2382
+	   }
2383
+
2384
+	   public final void setShowNpcCrest(boolean showNpcCrest)
2385
+	   {
2386
+	         if(_showNpcCrest != showNpcCrest)
2387
+	         {
2388
+	                _showNpcCrest = showNpcCrest;
2389
+	                updateShowNpcCrest();
2390
+	         }
2391
+	   }
2392
+	   
2393
 	public FastList<SeedProduction> getSeedProduction(int period)
2394
 	{
2395
 		return period == CastleManorManager.PERIOD_CURRENT ? _production : _productionNext;
2396
@@ -1337,6 +1354,36 @@
2397
 		}
2398
 	}
2399
 
2400
+	   public void updateShowNpcCrest()
2401
+	   {
2402
+	         Connection con = null;
2403
+	         PreparedStatement statement;
2404
+	         try
2405
+	         {
2406
+	                con = L2DatabaseFactory.getInstance().getConnection();
2407
+
2408
+	                statement = con.prepareStatement("UPDATE castle SET showNpcCrest = ? WHERE id = ?");
2409
+	                statement.setString(1, String.valueOf(getShowNpcCrest()));
2410
+	                statement.setInt(2, getCastleId());
2411
+	                statement.execute();
2412
+	                statement.close();
2413
+	         }
2414
+	         catch (Exception e)
2415
+	         {
2416
+	                _log.info("Error saving showNpcCrest for castle " + getName() + ": " + e.getMessage());
2417
+	         }
2418
+	         finally
2419
+	         {
2420
+	                try
2421
+	                {
2422
+	                       con.close();
2423
+	                }
2424
+	                catch (Exception e)
2425
+	                {
2426
+	                }
2427
+	         }
2428
+	   }
2429
+	
2430
 	public boolean isNextPeriodApproved()
2431
 	{
2432
 		return _isNextPeriodApproved;