· last year · Jan 22, 2024, 10:00 PM
1### Eclipse Workspace Patch 1.0
2#P aCis_gameserver
3diff --git config/Tournament.ini config/Tournament.ini
4new file mode 100644
5index 0000000..95364c3
6--- /dev/null
7+++ config/Tournament.ini
8@@ -0,0 +1,157 @@
9+# ================================================
10+# TOURNAMENT (by Rouxy)
11+# ================================================
12+# Tournament event duration in minutes
13+TournamentDuration = 5
14+# Tournament start times
15+TournamentStartTime = 12:00,20:00
16+
17+# Npc Register Id
18+TournamentNpcId = 50009
19+
20+# Npc register tournament coords
21+TournamentNpcLocation = 150086,46733,-3412
22+
23+# Debug enabled
24+Debug = True
25+
26+# List of restricted items in tournament
27+ItemRestrictedList = 57
28+
29+# List of restricted skills in tournament
30+SkillRestrictedList = 360
31+
32+# Time in seconds between search fights
33+TimeBetweenSearchFights = 5
34+
35+# Time that teams will be teleported to arena in seconds
36+TeleportFightTime = 10
37+
38+# Winner team rewards
39+# item1,count1;item2,count2;
40+WinnerRewards = 57,1000;3470,10
41+
42+# Looser team rewards
43+# item1,count1;item2,count2;
44+LooserRewards 57,500;3470,5
45+
46+# Start battle times in seconds
47+FightStartTime_1x1 = 10
48+FightStartTime_2x2 = 10
49+FightStartTime_3x3 = 10
50+FightStartTime_4x4 = 10
51+FightStartTime_5x5 = 10
52+FightStartTime_9x9 = 10
53+
54+# Battle duration in minutes
55+FightDuration_1x1 = 1
56+FightDuration_2x2 = 1
57+FightDuration_3x3 = 1
58+FightDuration_4x4 = 1
59+FightDuration_5x5 = 1
60+FightDuration_9x9 = 1
61+
62+# Fight classes restrictions
63+# ARCHERS
64+ArchersCountAllowed_1x1 = 1
65+ArchersCountAllowed_2x2 = 1
66+ArchersCountAllowed_3x3 = 1
67+ArchersCountAllowed_4x4 = 1
68+ArchersCountAllowed_5x5 = 1
69+ArchersCountAllowed_9x9 = 1
70+
71+# ARCHMAGES
72+ArchmagesCountAllowed_1x1 = 1
73+ArchmagesCountAllowed_2x2 = 1
74+ArchmagesCountAllowed_3x3 = 1
75+ArchmagesCountAllowed_4x4 = 1
76+ArchmagesCountAllowed_5x5 = 1
77+ArchmagesCountAllowed_9x9 = 1
78+
79+# DAGGERS
80+DaggersCountAllowed_1x1 = 1
81+DaggersCountAllowed_2x2 = 1
82+DaggersCountAllowed_3x3 = 1
83+DaggersCountAllowed_4x4 = 1
84+DaggersCountAllowed_5x5 = 1
85+DaggersCountAllowed_9x9 = 1
86+
87+# DOMINATORS
88+DominatorsCountAllowed_1x1 = 1
89+DominatorsCountAllowed_2x2 = 1
90+DominatorsCountAllowed_3x3 = 1
91+DominatorsCountAllowed_4x4 = 1
92+DominatorsCountAllowed_5x5 = 1
93+DominatorsCountAllowed_9x9 = 1
94+
95+# DOOMCRYERS
96+DoomcryersCountAllowed_1x1 = 1
97+DoomcryersCountAllowed_2x2 = 1
98+DoomcryersCountAllowed_3x3 = 1
99+DoomcryersCountAllowed_4x4 = 1
100+DoomcryersCountAllowed_5x5 = 1
101+DoomcryersCountAllowed_9x9 = 1
102+
103+# DREADNOUGHTS
104+DreadnoughtsCountAllowed_1x1 = 1
105+DreadnoughtsCountAllowed_2x2 = 1
106+DreadnoughtsCountAllowed_3x3 = 1
107+DreadnoughtsCountAllowed_4x4 = 1
108+DreadnoughtsCountAllowed_5x5 = 1
109+DreadnoughtsCountAllowed_9x9 = 1
110+
111+# DUELISTS
112+DuelistsCountAllowed_1x1 = 1
113+DuelistsCountAllowed_2x2 = 1
114+DuelistsCountAllowed_3x3 = 1
115+DuelistsCountAllowed_4x4 = 1
116+DuelistsCountAllowed_5x5 = 1
117+DuelistsCountAllowed_9x9 = 1
118+
119+# HEALERS
120+HealersCountAllowed_1x1 = 1
121+HealersCountAllowed_2x2 = 1
122+HealersCountAllowed_3x3 = 1
123+HealersCountAllowed_4x4 = 1
124+HealersCountAllowed_5x5 = 1
125+HealersCountAllowed_9x9 = 1
126+
127+# MYSTIC MUSES
128+MysticMusesCountAllowed_1x1 = 1
129+MysticMusesCountAllowed_2x2 = 1
130+MysticMusesCountAllowed_3x3 = 1
131+MysticMusesCountAllowed_4x4 = 1
132+MysticMusesCountAllowed_5x5 = 1
133+MysticMusesCountAllowed_9x9 = 1
134+
135+# SOULTAKERS
136+SoulTakersCountAllowed_1x1 = 1
137+SoulTakersCountAllowed_2x2 = 1
138+SoulTakersCountAllowed_3x3 = 1
139+SoulTakersCountAllowed_4x4 = 1
140+SoulTakersCountAllowed_5x5 = 1
141+SoulTakersCountAllowed_9x9 = 1
142+
143+# TITANS
144+TitansCountAllowed_1x1 = 1
145+TitansCountAllowed_2x2 = 1
146+TitansCountAllowed_3x3 = 1
147+TitansCountAllowed_4x4 = 1
148+TitansCountAllowed_5x5 = 1
149+TitansCountAllowed_9x9 = 1
150+
151+# STORMSCREAMERS
152+StormScreamersCountAllowed_1x1 = 1
153+StormScreamersCountAllowed_2x2 = 1
154+StormScreamersCountAllowed_3x3 = 1
155+StormScreamersCountAllowed_4x4 = 1
156+StormScreamersCountAllowed_5x5 = 1
157+StormScreamersCountAllowed_9x9 = 1
158+
159+# TANKERS
160+TankersCountAllowed_1x1 = 1
161+TankersCountAllowed_2x2 = 1
162+TankersCountAllowed_3x3 = 1
163+TankersCountAllowed_4x4 = 1
164+TankersCountAllowed_5x5 = 1
165+TankersCountAllowed_9x9 = 1
166diff --git config/character_memo_alt.sql config/character_memo_alt.sql
167new file mode 100644
168index 0000000..06ff8fc
169--- /dev/null
170+++ config/character_memo_alt.sql
171@@ -0,0 +1,11 @@
172+CREATE TABLE `character_memo_alt` (
173+ `obj_id` int(11) NOT NULL DEFAULT 0,
174+ `name` varchar(255) NOT NULL DEFAULT '0',
175+ `value` text NOT NULL,
176+ `expire_time` bigint(20) NOT NULL DEFAULT 0,
177+ UNIQUE KEY `prim` (`obj_id`,`name`),
178+ KEY `obj_id` (`obj_id`),
179+ KEY `name` (`name`),
180+ KEY `value` (`value`(333)),
181+ KEY `expire_time` (`expire_time`)
182+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
183diff --git config/tournament_player_data.sql config/tournament_player_data.sql
184new file mode 100644
185index 0000000..af4d429
186--- /dev/null
187+++ config/tournament_player_data.sql
188@@ -0,0 +1,12 @@
189+CREATE TABLE `tournament_player_data` (
190+ `obj_id` int(11) DEFAULT NULL,
191+ `fight_type` varchar(45) DEFAULT '',
192+ `fights_done` int(11) DEFAULT NULL,
193+ `victories` int(11) DEFAULT NULL,
194+ `defeats` int(11) DEFAULT NULL,
195+ `ties` int(11) DEFAULT NULL,
196+ `kills` int(11) DEFAULT NULL,
197+ `damage` int(11) DEFAULT NULL,
198+ `wdt` varchar(11) DEFAULT '',
199+ `dpf` varchar(11) DEFAULT ''
200+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
201diff --git java/Base/Instance/Instance.java java/Base/Instance/Instance.java
202new file mode 100644
203index 0000000..75d7118
204--- /dev/null
205+++ java/Base/Instance/Instance.java
206@@ -0,0 +1,48 @@
207+package Base.Instance;
208+
209+import java.util.ArrayList;
210+import java.util.List;
211+
212+import net.sf.l2j.gameserver.model.actor.instance.Door;
213+
214+/**
215+ * @author Anarchy
216+ */
217+public class Instance
218+{
219+ private int id;
220+ private List<Door> doors;
221+
222+ public Instance(int id)
223+ {
224+ this.id = id;
225+ doors = new ArrayList<>();
226+ }
227+
228+ public void openDoors()
229+ {
230+ for (Door door : doors)
231+ door.openMe();
232+ }
233+
234+ public void closeDoors()
235+ {
236+ for (Door door : doors)
237+ door.closeMe();
238+ }
239+
240+ public void addDoor(Door door)
241+ {
242+ doors.add(door);
243+ }
244+
245+ public List<Door> getDoors()
246+ {
247+ return doors;
248+ }
249+
250+ public int getId()
251+ {
252+ return id;
253+ }
254+}
255\ No newline at end of file
256diff --git java/Base/Instance/InstanceIdFactory.java java/Base/Instance/InstanceIdFactory.java
257new file mode 100644
258index 0000000..5aca326
259--- /dev/null
260+++ java/Base/Instance/InstanceIdFactory.java
261@@ -0,0 +1,17 @@
262+package Base.Instance;
263+
264+import java.util.concurrent.atomic.AtomicInteger;
265+
266+/**
267+ * @author Anarchy
268+ *
269+ */
270+public final class InstanceIdFactory
271+{
272+ private static AtomicInteger nextAvailable = new AtomicInteger(1);
273+
274+ public synchronized static int getNextAvailable()
275+ {
276+ return nextAvailable.getAndIncrement();
277+ }
278+}
279\ No newline at end of file
280diff --git java/Base/Instance/InstanceManager.java java/Base/Instance/InstanceManager.java
281new file mode 100644
282index 0000000..b9ecc59
283--- /dev/null
284+++ java/Base/Instance/InstanceManager.java
285@@ -0,0 +1,62 @@
286+package Base.Instance;
287+
288+import java.util.Map;
289+import java.util.concurrent.ConcurrentHashMap;
290+
291+import net.sf.l2j.gameserver.model.actor.instance.Door;
292+
293+/**
294+ * @author Anarchy
295+ *
296+ */
297+public class InstanceManager
298+{
299+ private Map<Integer, Instance> instances;
300+
301+ protected InstanceManager()
302+ {
303+ instances = new ConcurrentHashMap<>();
304+ instances.put(0, new Instance(0));
305+ }
306+
307+ public void addDoor(int id, Door door)
308+ {
309+ if (!instances.containsKey(id) || id == 0)
310+ return;
311+
312+ instances.get(id).addDoor(door);
313+ }
314+
315+ public void deleteInstance(int id)
316+ {
317+ if (id == 0)
318+ {
319+ System.out.println("Attempt to delete instance with id 0.");
320+ return;
321+ }
322+
323+ // delete doors
324+ }
325+
326+ public synchronized Instance createInstance()
327+ {
328+ Instance instance = new Instance(InstanceIdFactory.getNextAvailable());
329+ instances.put(instance.getId(), instance);
330+ return instance;
331+ }
332+
333+ public Instance getInstance(int id)
334+ {
335+ return instances.get(id);
336+ }
337+
338+ public static InstanceManager getInstance()
339+ {
340+ return SingletonHolder.instance;
341+ }
342+
343+ private static final class SingletonHolder
344+ {
345+ protected static final InstanceManager instance = new InstanceManager();
346+ }
347+}
348\ No newline at end of file
349diff --git java/Base/Tournament/Commands/AdminTournament.java java/Base/Tournament/Commands/AdminTournament.java
350new file mode 100644
351index 0000000..bb6e6cf
352--- /dev/null
353+++ java/Base/Tournament/Commands/AdminTournament.java
354@@ -0,0 +1,38 @@
355+package Base.Tournament.Commands;
356+
357+import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
358+import net.sf.l2j.gameserver.model.actor.Player;
359+
360+import Base.Tournament.Manager.TournamentManager;
361+
362+
363+/**
364+ * @author Rouxy
365+ */
366+public class AdminTournament implements IAdminCommandHandler
367+{
368+
369+ @Override
370+ public void useAdminCommand(String command, Player player)
371+ {
372+ if (command.startsWith("admin_tour"))
373+ {
374+ if (TournamentManager.getInstance().isRunning())
375+ TournamentManager.getInstance().finishEvent();
376+ else
377+ TournamentManager.getInstance().startEvent();
378+ }
379+
380+ }
381+
382+ @Override
383+ public String[] getAdminCommandList()
384+ {
385+
386+ return new String[]
387+ {
388+ "admin_tour"
389+ };
390+ }
391+
392+}
393\ No newline at end of file
394diff --git java/Base/Tournament/Commands/VoiceTournament.java java/Base/Tournament/Commands/VoiceTournament.java
395new file mode 100644
396index 0000000..1fb2697
397--- /dev/null
398+++ java/Base/Tournament/Commands/VoiceTournament.java
399@@ -0,0 +1,92 @@
400+package Base.Tournament.Commands;
401+
402+import java.util.StringTokenizer;
403+
404+import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
405+import net.sf.l2j.gameserver.model.World;
406+import net.sf.l2j.gameserver.model.actor.Player;
407+
408+import Base.Tournament.Enums.TournamentFightType;
409+import Base.Tournament.Manager.TournamentManager;
410+import Base.Tournament.Model.TournamentTeam;
411+
412+
413+/**
414+ * @author Rouxy
415+ */
416+public class VoiceTournament implements IVoicedCommandHandler
417+{
418+
419+ @Override
420+ public boolean useVoicedCommand(String command, Player player)
421+ {
422+ StringTokenizer st = new StringTokenizer(command, " ");
423+ st.nextToken();
424+ TournamentTeam team = player.getTournamentTeam();
425+ if (command.startsWith("mytour"))
426+ {
427+ TournamentManager.getInstance().showHtml(player, "myTour", TournamentFightType.NONE);
428+ }
429+ if (command.startsWith("tournamentinvite"))
430+ {
431+ if (!TournamentManager.getInstance().isRunning())
432+ {
433+ player.sendMessage("Tournament isn't Running!");
434+ return false;
435+ }
436+ if (TournamentManager.getInstance().isTournamentTeleporting())
437+ {
438+ player.sendMessage("Tournament is teleportind players, wait 30 seconds to invite someone.");
439+ return false;
440+ }
441+ String nextMemberName = st.nextToken();
442+ Player nextMember = World.getInstance().getPlayer(nextMemberName);
443+ if (nextMember == player)
444+ {
445+ player.sendMessage("You can't invite yourself!");
446+ return false;
447+ }
448+
449+ if (nextMember != null)
450+ {
451+ if (nextMember.isInTournamentTeam())
452+ {
453+ player.sendMessage("This player already in Tournament Team.");
454+ return false;
455+ }
456+ if (nextMember.isInParty())
457+ {
458+ player.sendMessage("You can't players in party. Don't worry, party will be automatically created!");
459+ return false;
460+ }
461+ if (team != null)
462+ {
463+ if (team.getLeader() != player)
464+ {
465+ player.sendMessage("Only Leaders can invite players.");
466+ return false;
467+ }
468+ }
469+ TournamentManager.getInstance().askJoinTeam(player, nextMember);
470+ }
471+ else
472+ {
473+ player.sendMessage("Player " + nextMemberName + " doesn't exists or is not online!");
474+ return false;
475+ }
476+ }
477+ return false;
478+ }
479+
480+ @Override
481+ public String[] getVoicedCommandList()
482+ {
483+
484+ return new String[]
485+ {
486+ "mytour",
487+ "tournamentinvite"
488+ };
489+ }
490+
491+}
492\ No newline at end of file
493diff --git java/Base/Tournament/Data/TournamentArenaParser.java java/Base/Tournament/Data/TournamentArenaParser.java
494new file mode 100644
495index 0000000..ec48ca8
496--- /dev/null
497+++ java/Base/Tournament/Data/TournamentArenaParser.java
498@@ -0,0 +1,135 @@
499+package Base.Tournament.Data;
500+
501+import java.nio.file.Path;
502+import java.util.ArrayList;
503+import java.util.List;
504+
505+import org.w3c.dom.Document;
506+import org.w3c.dom.NamedNodeMap;
507+
508+import Base.Tournament.Enums.TournamentFightType;
509+import Base.Tournament.Model.TournamentArena;
510+
511+import net.sf.l2j.commons.data.StatSet;
512+import net.sf.l2j.commons.data.xml.IXmlReader;
513+import net.sf.l2j.commons.random.Rnd;
514+
515+import net.sf.l2j.gameserver.model.location.Location;
516+
517+public class TournamentArenaParser implements IXmlReader
518+{
519+
520+ private List<TournamentArena> _arenas = new ArrayList<>();
521+ // private int _lastDynamicId = 0;
522+
523+ public TournamentArenaParser()
524+ {
525+ load();
526+ }
527+
528+ public void reload()
529+ {
530+ // Reset dynamic id.
531+ // _lastDynamicId = 0;
532+ _arenas.clear();
533+ load();
534+ }
535+
536+ public static TournamentArenaParser getInstance()
537+ {
538+ return SingleTonHolder._instance;
539+ }
540+
541+ private static class SingleTonHolder
542+ {
543+ protected static TournamentArenaParser _instance = new TournamentArenaParser();
544+ }
545+
546+ @Override
547+ public void load()
548+ {
549+ parseFile("./data/xml/TournamentData/Arenas.xml");
550+ LOGGER.info("Loaded {} Tournament Arenas.", _arenas.size());
551+ }
552+
553+ @Override
554+ public void parseDocument(Document doc, Path path)
555+ {
556+
557+ // StatsSet used to feed informations. Cleaned on every entry.
558+ final StatSet set = new StatSet();
559+ forEach(doc, "list", listNode -> forEach(listNode, "arena", arenaNode ->
560+ {
561+
562+ final NamedNodeMap attrs = arenaNode.getAttributes();
563+ // final Node attribute = attrs.getNamedItem("id");
564+ // final int arenaId = attribute == null ? _lastDynamicId++ : Integer.parseInt(attribute.getNodeValue());
565+
566+ // parse and feed attributes
567+ parseAndFeed(attrs, set);
568+
569+ final List<Location> teamOneLocs = new ArrayList<>();
570+ forEach(arenaNode, "team_one_loc", nodeNode ->
571+ {
572+ final NamedNodeMap nodeAttrs = nodeNode.getAttributes();
573+ teamOneLocs.add(new Location(parseInteger(nodeAttrs, "x"), parseInteger(nodeAttrs, "y"), parseInteger(nodeAttrs, "z")));
574+ });
575+
576+ final List<Location> teamTwoLocs = new ArrayList<>();
577+ forEach(arenaNode, "team_two_loc", nodeNode ->
578+ {
579+ final NamedNodeMap nodeAttrs = nodeNode.getAttributes();
580+ teamTwoLocs.add(new Location(parseInteger(nodeAttrs, "x"), parseInteger(nodeAttrs, "y"), parseInteger(nodeAttrs, "z")));
581+ });
582+ TournamentArena arena = new TournamentArena(set, teamOneLocs, teamTwoLocs);
583+ _arenas.add(arena);
584+
585+ }));
586+
587+ }
588+
589+ public List<TournamentArena> getArenasForType(TournamentFightType type)
590+ {
591+ List<TournamentArena> list = new ArrayList<>();
592+ for (TournamentArena arena : _arenas)
593+ {
594+ if (arena.getTypes().contains(type))
595+ {
596+ list.add(arena);
597+ }
598+ }
599+ return list;
600+ }
601+
602+ public TournamentArena getRandomArenaForType(TournamentFightType type)
603+ {
604+ return getArenasForType(type).get(Rnd.get(getArenasForType(type).size()));
605+ }
606+
607+ public TournamentArena getRandomArena()
608+ {
609+ return _arenas.get(Rnd.get(_arenas.size()));
610+ }
611+
612+ public TournamentArena getArena(int id)
613+ {
614+ return _arenas.get(id);
615+ }
616+
617+ /**
618+ * @return the arenas
619+ */
620+ public List<TournamentArena> getArenas()
621+ {
622+ return _arenas;
623+ }
624+
625+ /**
626+ * @param arenas the arenas to set
627+ */
628+ public void setArenas(List<TournamentArena> arenas)
629+ {
630+ this._arenas = arenas;
631+ }
632+
633+}
634\ No newline at end of file
635diff --git java/Base/Tournament/Enums/TournamentFightType.java java/Base/Tournament/Enums/TournamentFightType.java
636new file mode 100644
637index 0000000..4482a6a
638--- /dev/null
639+++ java/Base/Tournament/Enums/TournamentFightType.java
640@@ -0,0 +1,16 @@
641+package Base.Tournament.Enums;
642+
643+/**
644+ * @author Rouxy
645+ */
646+public enum TournamentFightType
647+{
648+ NONE,
649+ F1X1,
650+ F2X2,
651+ F3X3,
652+ F4X4,
653+ F5X5,
654+ F9X9;
655+
656+}
657\ No newline at end of file
658diff --git java/Base/Tournament/Manager/TournamentManager.java java/Base/Tournament/Manager/TournamentManager.java
659new file mode 100644
660index 0000000..3df8e6c
661--- /dev/null
662+++ java/Base/Tournament/Manager/TournamentManager.java
663@@ -0,0 +1,1247 @@
664+package Base.Tournament.Manager;
665+
666+import java.sql.Connection;
667+import java.sql.PreparedStatement;
668+import java.sql.ResultSet;
669+import java.text.SimpleDateFormat;
670+import java.util.ArrayList;
671+import java.util.Calendar;
672+import java.util.HashMap;
673+import java.util.LinkedList;
674+import java.util.List;
675+import java.util.Map;
676+import java.util.StringTokenizer;
677+import java.util.concurrent.ScheduledFuture;
678+import java.util.logging.Logger;
679+
680+import net.sf.l2j.commons.pool.ConnectionPool;
681+import net.sf.l2j.commons.pool.ThreadPool;
682+import net.sf.l2j.commons.random.Rnd;
683+
684+import net.sf.l2j.Config;
685+import net.sf.l2j.gameserver.data.manager.SpawnManager;
686+import net.sf.l2j.gameserver.data.sql.PlayerInfoTable;
687+import net.sf.l2j.gameserver.data.xml.NpcData;
688+import net.sf.l2j.gameserver.enums.SayType;
689+import net.sf.l2j.gameserver.handler.AdminCommandHandler;
690+import net.sf.l2j.gameserver.handler.VoicedCommandHandler;
691+import net.sf.l2j.gameserver.model.World;
692+import net.sf.l2j.gameserver.model.actor.Creature;
693+import net.sf.l2j.gameserver.model.actor.Player;
694+import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
695+
696+import net.sf.l2j.gameserver.model.location.Location;
697+import net.sf.l2j.gameserver.model.spawn.Spawn;
698+import net.sf.l2j.gameserver.network.SystemMessageId;
699+import net.sf.l2j.gameserver.network.serverpackets.ConfirmDlg;
700+import net.sf.l2j.gameserver.network.serverpackets.L2GameServerPacket;
701+import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
702+import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
703+import net.sf.l2j.util.Mysql;
704+import net.sf.l2j.util.PlayerVariables;
705+
706+import Base.Tournament.Commands.AdminTournament;
707+import Base.Tournament.Commands.VoiceTournament;
708+import Base.Tournament.Data.TournamentArenaParser;
709+import Base.Tournament.Enums.TournamentFightType;
710+import Base.Tournament.Model.TournamentTeam;
711+import Base.Tournament.Task.TournamentFight;
712+import Base.Tournament.Task.TournamentSearchFights;
713+
714+/**
715+ * @author Rouxy
716+ */
717+public class TournamentManager
718+{
719+ private static final Logger _log = Logger.getLogger(TournamentManager.class.getName());
720+ private Map<TournamentTeam, TournamentFightType> registeredTournamentTeams = new HashMap<>();
721+ private Map<Integer, TournamentFight> currentFights = new HashMap<>();
722+ private Calendar nextEvent;
723+ private final SimpleDateFormat format = new SimpleDateFormat("HH:mm");
724+ private Spawn _npcSpawn;
725+ private boolean running;
726+ private ScheduledFuture<?> finishEventTask = null;
727+ private boolean tournamentTeleporting;
728+ private int allTimeFights = 0;
729+
730+ public TournamentManager()
731+ {
732+ TournamentArenaParser.getInstance();
733+ ThreadPool.scheduleAtFixedRate(new TournamentSearchFights(TournamentFightType.F1X1), 0, Config.TOURNAMENT_TIME_SEARCH_FIGHTS * 1000);
734+ ThreadPool.scheduleAtFixedRate(new TournamentSearchFights(TournamentFightType.F2X2), 0, Config.TOURNAMENT_TIME_SEARCH_FIGHTS * 1000);
735+ ThreadPool.scheduleAtFixedRate(new TournamentSearchFights(TournamentFightType.F3X3), 0, Config.TOURNAMENT_TIME_SEARCH_FIGHTS * 1000);
736+ ThreadPool.scheduleAtFixedRate(new TournamentSearchFights(TournamentFightType.F4X4), 0, Config.TOURNAMENT_TIME_SEARCH_FIGHTS * 1000);
737+ ThreadPool.scheduleAtFixedRate(new TournamentSearchFights(TournamentFightType.F5X5), 0, Config.TOURNAMENT_TIME_SEARCH_FIGHTS * 1000);
738+ ThreadPool.scheduleAtFixedRate(new TournamentSearchFights(TournamentFightType.F9X9), 0, Config.TOURNAMENT_TIME_SEARCH_FIGHTS * 1000);
739+ VoicedCommandHandler.getInstance().registerHandler(new VoiceTournament());
740+ AdminCommandHandler.getInstance().registerHandler(new AdminTournament());
741+
742+ startCalculationOfNextEventTime();
743+ }
744+
745+ public static TournamentManager getInstance()
746+ {
747+ return SingleTonHolder._instance;
748+ }
749+
750+ private static class SingleTonHolder
751+ {
752+ protected static TournamentManager _instance = new TournamentManager();
753+ }
754+
755+ public String getNextTime()
756+ {
757+ if (nextEvent.getTime() != null)
758+ {
759+ return format.format(nextEvent.getTime());
760+ }
761+ return "Erro";
762+ }
763+
764+ public void startCalculationOfNextEventTime()
765+ {
766+ try
767+ {
768+ Calendar currentTime = Calendar.getInstance();
769+ Calendar testStartTime = null;
770+ long flush2 = 0L;
771+ long timeL = 0L;
772+ int count = 0;
773+ for (String timeOfDay : Config.TOURNAMENT_EVENT_INTERVAL_BY_TIME_OF_DAY)
774+ {
775+ testStartTime = Calendar.getInstance();
776+ testStartTime.setLenient(true);
777+ String[] splitTimeOfDay = timeOfDay.split(":");
778+ testStartTime.set(11, Integer.parseInt(splitTimeOfDay[0]));
779+ testStartTime.set(12, Integer.parseInt(splitTimeOfDay[1]));
780+ testStartTime.set(13, 0);
781+ if (testStartTime.getTimeInMillis() < currentTime.getTimeInMillis())
782+ {
783+ testStartTime.add(5, 1);
784+ }
785+ timeL = testStartTime.getTimeInMillis() - currentTime.getTimeInMillis();
786+ if (count == 0)
787+ {
788+ flush2 = timeL;
789+ nextEvent = testStartTime;
790+ }
791+ if (timeL < flush2)
792+ {
793+ flush2 = timeL;
794+ nextEvent = testStartTime;
795+ }
796+ count++;
797+ }
798+ _log.info("[Tournament]: Next Event time: " + nextEvent.getTime().toString());
799+ ThreadPool.schedule(new StartEventTask(), flush2);
800+ }
801+ catch (Exception e)
802+ {
803+ System.out.println("[Tournament]: " + e);
804+ }
805+ }
806+
807+ public static void toAllOnlinePlayers(L2GameServerPacket packet)
808+ {
809+ for (Player player : World.getInstance().getPlayers())
810+ {
811+ if (player.isOnline())
812+ player.sendPacket(packet);
813+ }
814+ }
815+
816+ public void announceToAllOnlinePlayers(String text)
817+ {
818+ for (Player player : World.getInstance().getPlayers())
819+ {
820+ if (player.isOnline())
821+ player.sendChatMessage(0, SayType.CRITICAL_ANNOUNCE, "", text);
822+ }
823+ }
824+
825+ class FinishEventTask implements Runnable
826+ {
827+ FinishEventTask()
828+ {
829+
830+ }
831+
832+ @Override
833+ public void run()
834+ {
835+ finishEvent();
836+
837+ }
838+
839+ }
840+
841+ public void finishEvent()
842+ {
843+ _log.info("----------------------------------------------------------------------------");
844+ _log.info("[Tournament]: Event Finished.");
845+ _log.info("----------------------------------------------------------------------------");
846+ announceToAllOnlinePlayers("[Tournament]: Event Finished");
847+ announceToAllOnlinePlayers("[Tournament]: All fights have been stored");
848+ announceToAllOnlinePlayers("[Tournament]: Next event: " + getNextTime());
849+ unspawnNpc();
850+ setRunning(false);
851+ if (getFinishEventTask() != null)
852+ {
853+ getFinishEventTask().cancel(true);
854+ finishEventTask = null;
855+ }
856+ }
857+
858+ public void startEvent()
859+ {
860+ _log.info("----------------------------------------------------------------------------");
861+ _log.info("[Tournament]: Event Started.");
862+ _log.info("----------------------------------------------------------------------------");
863+ spawnNpcEvent();
864+ setRunning(true);
865+ announceToAllOnlinePlayers("[Tournament]: Party and Non Event PvP");
866+ announceToAllOnlinePlayers("[Tournament]: Battles: 1x1 / 2x2 / 3x3 / 4x4 / 5x5 / 9x9");
867+ announceToAllOnlinePlayers("[Tournament]: Teleport in the GK to (Tournament) Zone");
868+ announceToAllOnlinePlayers("[Tournament]: Event duration: " + Config.TOURNAMENT_EVENT_DURATION + " minutes");
869+ setFinishEventTask(ThreadPool.schedule(new FinishEventTask(), Config.TOURNAMENT_EVENT_DURATION * 60 * 1000));
870+ // for (Player player : World.getInstance().getPlayers())
871+ // {
872+ // askTeleport(player);
873+ // }
874+ }
875+
876+ class StartEventTask implements Runnable
877+ {
878+ @Override
879+ public void run()
880+ {
881+ startEvent();
882+
883+ }
884+
885+ }
886+
887+ public void unspawnNpc()
888+ {
889+ if (_npcSpawn == null)
890+ {
891+ return;
892+ }
893+ _npcSpawn.getNpc().deleteMe();
894+
895+ SpawnManager.getInstance().deleteSpawn(_npcSpawn);
896+ }
897+
898+ public void spawnNpcEvent()
899+ {
900+
901+ NpcTemplate tmpl = NpcData.getInstance().getTemplate(Config.TOURNAMENT_NPC_ID);
902+ Location npcLoc = Config.TOURNAMENT_NPC_LOCATION;
903+ try
904+ {
905+ _npcSpawn = new Spawn(tmpl);
906+
907+ _npcSpawn.setLoc(npcLoc.getX(), npcLoc.getY(), npcLoc.getZ(), Rnd.get(65535));
908+ _npcSpawn.setRespawnDelay(1);
909+
910+ SpawnManager.getInstance().addSpawn(_npcSpawn, false);
911+
912+
913+ _npcSpawn.doSpawn(false);
914+ _npcSpawn.getNpc().getStatus().setHp(9.99999999E8D);
915+ _npcSpawn.getNpc().isAggressive();
916+ _npcSpawn.getNpc().decayMe();
917+ _npcSpawn.getNpc().spawnMe(_npcSpawn.getNpc().getX(), _npcSpawn.getNpc().getY(), _npcSpawn.getNpc().getZ());
918+ _npcSpawn.getNpc().broadcastPacket(new MagicSkillUse(_npcSpawn.getNpc(), _npcSpawn.getNpc(), 1034, 1, 1, 1));
919+ }
920+ catch (Exception e)
921+ {
922+ e.printStackTrace();
923+ }
924+
925+ }
926+
927+ public void askJoinTeam(Player leader, Player target)
928+ {
929+ ConfirmDlg confirm = new ConfirmDlg(SystemMessageId.S1.getId());
930+ confirm.addString("Do you wish to join " + leader.getName() + "'s Tournament Team?");
931+ confirm.addTime(30000);
932+ target.setTournamentTeamRequesterId(leader.getObjectId());
933+ target.setTournamentTeamBeingInvited(true);
934+ target.sendPacket(confirm);
935+ leader.sendMessage(target.getName() + " was invited to your team.");
936+
937+ }
938+
939+ public void askTeleport(Player player)
940+ {
941+ ConfirmDlg confirm = new ConfirmDlg(SystemMessageId.S1.getId());
942+ confirm.addString("Do you wish to teleport to Tournament Zone?");
943+ confirm.addTime(30000);
944+ setTournamentTeleporting(true);
945+ ThreadPool.schedule(new Runnable()
946+ {
947+ @Override
948+ public void run()
949+ {
950+ setTournamentTeleporting(false);
951+ }
952+ }, 30000);
953+ player.sendPacket(confirm);
954+ }
955+
956+ public void debugInfo(String text)
957+ {
958+ _log.info("[Tournament]: " + text);
959+ }
960+
961+ public List<TournamentFight> getCurrentFights(TournamentFightType type)
962+ {
963+ List<TournamentFight> list = new ArrayList<>();
964+ for (Map.Entry<Integer, TournamentFight> entry : currentFights.entrySet())
965+ {
966+ if (entry.getValue().getFightType() == type)
967+ list.add(entry.getValue());
968+ }
969+ return list;
970+ }
971+
972+ public TournamentFight getFight(int id)
973+ {
974+ return currentFights.get(id);
975+ }
976+
977+ public Map<Integer, TournamentFight> getCurrentFights()
978+ {
979+ return currentFights;
980+ }
981+
982+ public void setCurrentFights(Map<Integer, TournamentFight> currentFights)
983+ {
984+ this.currentFights = currentFights;
985+ }
986+
987+ public void onDisconnect(Player player)
988+ {
989+ if (player.isInTournamentTeam())
990+ {
991+ TournamentTeam team = player.getTournamentTeam();
992+ team.getMembers().remove(player);
993+ team.sendMessage(player.getName() + " left the Tournament Team.");
994+ if (team.getMembers().size() <= 1)
995+ {
996+ team.disbandTeam();
997+ return;
998+ }
999+ if (team.isLeader(player))
1000+ {
1001+ Player newLeader = team.getMembers().get(Rnd.get(team.getMembers().size()));
1002+ if (newLeader != null)
1003+ {
1004+ team.setLeader(newLeader);
1005+ newLeader.sendMessage("You has became the new Tournament Team Leader");
1006+ }
1007+ team.sendMessage(newLeader + " has became the new Team Leader");
1008+
1009+ }
1010+ }
1011+ }
1012+
1013+ public void onKill(Creature killer, Player killed)
1014+ {
1015+ if (killed.isInTournamentMatch())
1016+ {
1017+ if (killer instanceof Player)
1018+ {
1019+ Player killerPlayer = killer.getActingPlayer();
1020+ if (killerPlayer.isInTournamentMatch())
1021+ {
1022+ if (killerPlayer.getTournamentFightId() == killed.getTournamentFightId() && killed.getTournamentFightId() != 0)
1023+ {
1024+ TournamentFight fight = TournamentManager.getInstance().getFight(killed.getTournamentFightId());
1025+ if (fight != null)
1026+ {
1027+ // add single kill to killer
1028+ killerPlayer.addTournamentKill(killerPlayer.getTournamentFightType());
1029+ killerPlayer.sendMessage("Killed Tournament Enemy: " + killed.getName());
1030+
1031+ if (killed.getTournamentTeam() != null)
1032+ {
1033+ if (killed.getTournamentTeam().teamIsDefeated())
1034+ {
1035+ fight.finish();
1036+ }
1037+ }
1038+ }
1039+ }
1040+ }
1041+ }
1042+ }
1043+ }
1044+
1045+ public List<TournamentTeam> getRegisteredTeamsByType(TournamentFightType type)
1046+ {
1047+ List<TournamentTeam> teams = new ArrayList<>();
1048+ for (Map.Entry<TournamentTeam, TournamentFightType> entry : registeredTournamentTeams.entrySet())
1049+ {
1050+ if (entry.getValue().equals(type))
1051+ {
1052+ teams.add(entry.getKey());
1053+ }
1054+ }
1055+ return teams;
1056+ }
1057+
1058+ /**
1059+ * @return the tournamentTeams
1060+ */
1061+ public Map<TournamentTeam, TournamentFightType> getRegisteredTournamentTeams()
1062+ {
1063+ return registeredTournamentTeams;
1064+ }
1065+
1066+ /**
1067+ * @param tournamentTeams the tournamentTeams to set
1068+ */
1069+ public void setTournamentTeams(Map<TournamentTeam, TournamentFightType> tournamentTeams)
1070+ {
1071+ this.registeredTournamentTeams = tournamentTeams;
1072+ }
1073+
1074+ public boolean isInTournamentMode(Player player)
1075+ {
1076+ for (Map.Entry<TournamentTeam, TournamentFightType> entry : registeredTournamentTeams.entrySet())
1077+ {
1078+ if (entry.getKey().getMembers().contains(player))
1079+ {
1080+ return true;
1081+ }
1082+
1083+ }
1084+ return false;
1085+ }
1086+
1087+ // Npc html part
1088+
1089+ public void showHtml(Player player, String page, TournamentFightType type)
1090+ {
1091+ NpcHtmlMessage htm = new NpcHtmlMessage(0);
1092+ htm.setFile("data/html/en/mods/tournament/" + page + ".htm");
1093+
1094+ htm.replace("%missingMembers%", getMembersMessageForFightType(player, type));
1095+ htm.replace("%memberslist%", player.getTournamentTeam() != null ? generateMemberList(player.getTournamentTeam()) : "<br><font color=ff0000>You haven't a Tournament Team</font>");
1096+ htm.replace("%inviteBoxRegButton%", getInviteBoxOrRegisterButton(player, type));
1097+ htm.replace("%fightType%", type.equals(TournamentFightType.NONE) ? "" : type.name().substring(1).toLowerCase());
1098+
1099+ // Fight Data
1100+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentVictories().entrySet())
1101+ {
1102+ htm.replace("%victories" + entry.getKey().name() + "%", player.getTournamentVictories().get(entry.getKey()));
1103+ }
1104+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentDefeats().entrySet())
1105+ {
1106+ htm.replace("%defeats" + entry.getKey().name() + "%", player.getTournamentDefeats().get(entry.getKey()));
1107+ }
1108+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentTies().entrySet())
1109+ {
1110+ htm.replace("%ties" + entry.getKey().name() + "%", player.getTournamentTies().get(entry.getKey()));
1111+ }
1112+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentKills().entrySet())
1113+ {
1114+ htm.replace("%kills" + entry.getKey().name() + "%", player.getTournamentKills().get(entry.getKey()));
1115+ }
1116+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentDamage().entrySet())
1117+ {
1118+ htm.replace("%damage" + entry.getKey().name() + "%", player.getTournamentDamage().get(entry.getKey()));
1119+ }
1120+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentDamage().entrySet())
1121+ {
1122+ htm.replace("%dpf" + entry.getKey().name() + "%", getDamagePerFight(player, entry.getKey()));
1123+ }
1124+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentVictories().entrySet())
1125+ {
1126+ htm.replace("%fightsDone" + entry.getKey().name() + "%", player.getTournamentFightsDone(entry.getKey()));
1127+ }
1128+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentVictories().entrySet())
1129+ {
1130+ htm.replace("%teamsReg" + entry.getKey().name() + "%", registeredTournamentTeams.size());
1131+ }
1132+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentVictories().entrySet())
1133+ {
1134+ htm.replace("%activeFights" + entry.getKey().name() + "%", getCurrentFights(entry.getKey()).size());
1135+ }
1136+
1137+ htm.replace("%allTimeFights%", getAllTimeFights());
1138+ htm.replace("%tourPoints%", player.getTournamentPoints());
1139+ htm.replace("%killstotal%", player.getTotalTournamentKills());
1140+ htm.replace("%totalDmg%", player.getTournamentTotalDamage());
1141+ htm.replace("%playerName%", player.getName());
1142+ htm.replace("%dpfTotal%", getDamagePerFight(player));
1143+ htm.replace("%wdt%", getWinDefeatTie(player));
1144+ htm.replace("%totalFights%", player.getTotalTournamentFightsDone());
1145+
1146+ player.sendPacket(htm);
1147+ }
1148+
1149+ public String getInviteBoxOrRegisterButton(Player player, TournamentFightType type)
1150+ {
1151+ StringBuilder sb = new StringBuilder();
1152+ if (getMissingMembersForFightType(player, type) == 0)
1153+ {
1154+ sb.append("<table width=300>");
1155+ sb.append("<tr>");
1156+ sb.append("<td align=center><font color=LEVEL> Your team is ready!!</font></td>");
1157+ sb.append("</tr>");
1158+ sb.append("</table>");
1159+ }
1160+ else
1161+ {
1162+ sb.append("<center>");
1163+ sb.append("Type the name of your partner or use command: <br1><font color=994992>\".tournamentinvite playername\"</font>");
1164+ sb.append("</center>");
1165+ sb.append("<table width=300>");
1166+ sb.append("<tr>");
1167+ sb.append("<td>Player Name</td>");
1168+ sb.append("<td><edit var=\"playerName\" width=120 height=15></td>");
1169+ sb.append("<td><button value=\"Invite\" action=\"bypass -h bp_inviteTournamentMember $playerName\" width=45 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
1170+ sb.append("</tr>");
1171+ sb.append("</table>");
1172+ }
1173+
1174+ return sb.toString();
1175+ }
1176+
1177+ public String getMembersMessageForFightType(Player player, TournamentFightType type)
1178+ {
1179+ if (!player.isInTournamentTeam())
1180+ {
1181+ return "<br><font color=ff0000>You haven't a Tournament Team</font>";
1182+ }
1183+ if (type != TournamentFightType.NONE)
1184+ {
1185+ return "<br>You need to invite <font color=LEVEL>" + getMissingMembersForFightType(player, type) + "</font> to register " + type.name().substring(1).toLowerCase() + " fights.";
1186+ }
1187+ return "";
1188+ }
1189+
1190+ public int getMissingMembersForFightType(Player player, TournamentFightType type)
1191+ {
1192+ int membersCount = 0;
1193+ if (!player.isInTournamentTeam())
1194+ {
1195+ return -1;
1196+ }
1197+ membersCount = player.getTournamentTeam().getMembers().size();
1198+ switch (type)
1199+ {
1200+ case F1X1:
1201+ return 0;
1202+ case F2X2:
1203+ return 2 - membersCount;
1204+ case F3X3:
1205+ return 3 - membersCount;
1206+ case F4X4:
1207+ return 4 - membersCount;
1208+ case F5X5:
1209+ return 5 - membersCount;
1210+ case F9X9:
1211+ return 9 - membersCount;
1212+ default:
1213+ return -1;
1214+ }
1215+ }
1216+
1217+ public String generateMemberList(TournamentTeam team)
1218+ {
1219+ StringBuilder sb = new StringBuilder();
1220+ int bgcolor = 0;
1221+ for (Player member : team.getMembers())
1222+ {
1223+ sb.append("<img src=\"Sek.cbui371\" width=300 height=1>");
1224+ if (bgcolor % 2 == 0)
1225+ sb.append("<table width=315 bgcolor=090000>");
1226+ else
1227+ sb.append("<table width=315 bgcolor=000000>");
1228+
1229+ sb.append("<tr>");
1230+ sb.append("<td fixwidth=50></td>");
1231+ sb.append("<td align=center>");
1232+ sb.append("<font color=LEVEL>" + member.getName() + "</font>");
1233+ sb.append("</td>");
1234+ sb.append("<td fixwidth=50></td>");
1235+ sb.append("</tr>");
1236+ sb.append("</table>");
1237+ bgcolor++;
1238+ }
1239+
1240+ return sb.toString();
1241+ }
1242+
1243+ public void onPlayerEnter(Player player)
1244+ {
1245+ // catch data from memo
1246+ loadTournamentData(player);
1247+
1248+ // check data and insert if have no result for all types
1249+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentVictories().entrySet())
1250+ {
1251+ checkData(player, entry.getKey());
1252+ }
1253+ }
1254+
1255+ public void checkData(Player player, TournamentFightType type)
1256+ {
1257+
1258+ Connection con = null;
1259+ PreparedStatement offline = null;
1260+ ResultSet rs = null;
1261+ try
1262+ {
1263+ con = ConnectionPool.getConnection();
1264+ offline = con.prepareStatement("SELECT * FROM tournament_player_data WHERE obj_id=? AND fight_type=?");
1265+ offline.setInt(1, player.getObjectId());
1266+ offline.setString(2, type.name());
1267+ rs = offline.executeQuery();
1268+ boolean hasResult = rs.next();
1269+ if (!hasResult)
1270+ {
1271+ insertData(player, type);
1272+ }
1273+
1274+ }
1275+ catch (Exception e)
1276+ {
1277+ e.printStackTrace();
1278+ }
1279+ finally
1280+ {
1281+ Mysql.closeQuietly(con, offline, rs);
1282+ }
1283+
1284+ }
1285+
1286+ public void insertData(Player player, TournamentFightType type)
1287+ {
1288+
1289+ Connection con = null;
1290+ PreparedStatement offline = null;
1291+ ResultSet rs = null;
1292+ try
1293+ {
1294+ con = ConnectionPool.getConnection();
1295+ offline = con.prepareStatement("REPLACE INTO tournament_player_data (obj_id, fight_type, fights_done, victories, defeats, ties, kills, damage, wdt, dpf) VALUES (?,?,?,?,?,?,?,?,?,?)");
1296+ offline.setInt(1, player.getObjectId());
1297+ offline.setString(2, type.name());
1298+ offline.setInt(3, player.getTotalTournamentFightsDone());
1299+ offline.setInt(4, player.getTournamentVictories().get(type));
1300+ offline.setInt(5, player.getTournamentDefeats().get(type));
1301+ offline.setInt(6, player.getTournamentTies().get(type));
1302+ offline.setInt(7, player.getTournamentKills().get(type));
1303+ offline.setInt(8, player.getTournamentDamage().get(type));
1304+ offline.setString(9, "" + getWinDefeatTie(player, type));
1305+ offline.setInt(10, getDamagePerFight(player, type));
1306+ offline.execute();
1307+
1308+ }
1309+ catch (Exception e)
1310+ {
1311+ e.printStackTrace();
1312+ }
1313+ finally
1314+ {
1315+ Mysql.closeQuietly(con, offline, rs);
1316+ }
1317+
1318+ }
1319+
1320+ public void updateData(Player player, TournamentFightType type)
1321+ {
1322+
1323+ Connection con = null;
1324+ PreparedStatement offline = null;
1325+ ResultSet rs = null;
1326+ try
1327+ {
1328+ con = ConnectionPool.getConnection();
1329+ offline = con.prepareStatement("UPDATE tournament_player_data SET fights_done=?, victories=?, defeats=?, ties=?, kills=?, damage=?, wdt=?, dpf=? WHERE obj_id=? AND fight_type=?");
1330+ offline.setInt(1, player.getTotalTournamentFightsDone());
1331+ offline.setInt(2, player.getTournamentVictories().get(type));
1332+ offline.setInt(3, player.getTournamentDefeats().get(type));
1333+ offline.setInt(4, player.getTournamentTies().get(type));
1334+ offline.setInt(5, player.getTournamentKills().get(type));
1335+ offline.setInt(6, player.getTournamentDamage().get(type));
1336+ offline.setString(7, "" + getWinDefeatTie(player, type));
1337+ offline.setInt(8, getDamagePerFight(player, type));
1338+ offline.setInt(9, player.getObjectId());
1339+ offline.setString(10, type.name());
1340+ offline.execute();
1341+
1342+ }
1343+ catch (Exception e)
1344+ {
1345+ e.printStackTrace();
1346+ }
1347+ finally
1348+ {
1349+ Mysql.closeQuietly(con, offline, rs);
1350+ }
1351+
1352+ }
1353+
1354+ public void initializeTournamentMaps(Player player)
1355+ {
1356+ player.getTournamentDamage().put(TournamentFightType.F1X1, 0);
1357+ player.getTournamentDamage().put(TournamentFightType.F2X2, 0);
1358+ player.getTournamentDamage().put(TournamentFightType.F3X3, 0);
1359+ player.getTournamentDamage().put(TournamentFightType.F4X4, 0);
1360+ player.getTournamentDamage().put(TournamentFightType.F5X5, 0);
1361+ player.getTournamentDamage().put(TournamentFightType.F9X9, 0);
1362+
1363+ player.getTournamentDefeats().put(TournamentFightType.F1X1, 0);
1364+ player.getTournamentDefeats().put(TournamentFightType.F2X2, 0);
1365+ player.getTournamentDefeats().put(TournamentFightType.F3X3, 0);
1366+ player.getTournamentDefeats().put(TournamentFightType.F4X4, 0);
1367+ player.getTournamentDefeats().put(TournamentFightType.F5X5, 0);
1368+ player.getTournamentDefeats().put(TournamentFightType.F9X9, 0);
1369+
1370+ player.getTournamentVictories().put(TournamentFightType.F1X1, 0);
1371+ player.getTournamentVictories().put(TournamentFightType.F2X2, 0);
1372+ player.getTournamentVictories().put(TournamentFightType.F3X3, 0);
1373+ player.getTournamentVictories().put(TournamentFightType.F4X4, 0);
1374+ player.getTournamentVictories().put(TournamentFightType.F5X5, 0);
1375+ player.getTournamentVictories().put(TournamentFightType.F9X9, 0);
1376+
1377+ player.getTournamentTies().put(TournamentFightType.F1X1, 0);
1378+ player.getTournamentTies().put(TournamentFightType.F2X2, 0);
1379+ player.getTournamentTies().put(TournamentFightType.F3X3, 0);
1380+ player.getTournamentTies().put(TournamentFightType.F4X4, 0);
1381+ player.getTournamentTies().put(TournamentFightType.F5X5, 0);
1382+ player.getTournamentTies().put(TournamentFightType.F9X9, 0);
1383+
1384+ player.getTournamentKills().put(TournamentFightType.F1X1, 0);
1385+ player.getTournamentKills().put(TournamentFightType.F2X2, 0);
1386+ player.getTournamentKills().put(TournamentFightType.F3X3, 0);
1387+ player.getTournamentKills().put(TournamentFightType.F4X4, 0);
1388+ player.getTournamentKills().put(TournamentFightType.F5X5, 0);
1389+ player.getTournamentKills().put(TournamentFightType.F9X9, 0);
1390+ }
1391+
1392+ // store/load fights methods
1393+ public void loadTournamentData(Player player)
1394+ {
1395+ initializeTournamentMaps(player);
1396+ Connection con = null;
1397+ PreparedStatement offline = null;
1398+ ResultSet rs = null;
1399+ try
1400+ {
1401+ con = ConnectionPool.getConnection();
1402+ offline = con.prepareStatement("SELECT * FROM character_memo_alt WHERE obj_id =?");
1403+ offline.setInt(1, player.getObjectId());
1404+ rs = offline.executeQuery();
1405+
1406+ while (rs.next())
1407+ {
1408+ if (rs.getString("name").startsWith("Tournament"))
1409+ {
1410+ StringTokenizer st = new StringTokenizer(rs.getString("name"), "-");
1411+ st.nextToken(); // "Tournament"
1412+ switch (st.nextToken())
1413+ {
1414+ case "Victories":
1415+ if (st.hasMoreTokens())
1416+ {
1417+ player.getTournamentVictories().put(TournamentFightType.valueOf(st.nextToken()), rs.getInt("value"));
1418+ }
1419+ break;
1420+ case "Defeats":
1421+ if (st.hasMoreTokens())
1422+ {
1423+ player.getTournamentDefeats().put(TournamentFightType.valueOf(st.nextToken()), rs.getInt("value"));
1424+ }
1425+ break;
1426+ case "Ties":
1427+ if (st.hasMoreTokens())
1428+ {
1429+ player.getTournamentTies().put(TournamentFightType.valueOf(st.nextToken()), rs.getInt("value"));
1430+ }
1431+ break;
1432+ case "Kills":
1433+ if (st.hasMoreTokens())
1434+ {
1435+ player.getTournamentKills().put(TournamentFightType.valueOf(st.nextToken()), rs.getInt("value"));
1436+ }
1437+ break;
1438+
1439+ case "Damage":
1440+ if (st.hasMoreTokens())
1441+ {
1442+ player.getTournamentDamage().put(TournamentFightType.valueOf(st.nextToken()), rs.getInt("value"));
1443+ }
1444+ break;
1445+ case "Points":
1446+ player.setTournamentPoints(rs.getInt("value"));
1447+ break;
1448+ }
1449+
1450+ }
1451+
1452+ }
1453+
1454+ con.close();
1455+ }
1456+ catch (Exception e)
1457+ {
1458+ e.printStackTrace();
1459+ }
1460+ finally
1461+ {
1462+ Mysql.closeQuietly(con, offline, rs);
1463+ }
1464+ }
1465+
1466+ public int getTournamentPlayerFightsDone(int objectId, TournamentFightType type)
1467+ {
1468+ Connection con = null;
1469+ PreparedStatement offline = null;
1470+ ResultSet rs = null;
1471+ int fights = 0;
1472+ try
1473+ {
1474+ con = ConnectionPool.getConnection();
1475+ offline = con.prepareStatement("SELECT * FROM character_memo_alt WHERE obj_id =?");
1476+ offline.setInt(1, objectId);
1477+ rs = offline.executeQuery();
1478+
1479+ while (rs.next())
1480+ {
1481+ if (rs.getString("name").startsWith("Tournament"))
1482+ {
1483+ StringTokenizer st = new StringTokenizer(rs.getString("name"), "-");
1484+ st.nextToken(); // "Tournament"
1485+ switch (st.nextToken())
1486+ {
1487+ case "Victories":
1488+ case "Defeats":
1489+ case "Ties":
1490+ if (st.hasMoreTokens() && st.nextToken().startsWith(type.name()))
1491+ {
1492+ fights += rs.getInt("value");
1493+ }
1494+ break;
1495+
1496+ }
1497+
1498+ }
1499+
1500+ }
1501+
1502+ con.close();
1503+ }
1504+ catch (Exception e)
1505+ {
1506+ e.printStackTrace();
1507+ }
1508+ finally
1509+ {
1510+ Mysql.closeQuietly(con, offline, rs);
1511+ }
1512+ return fights;
1513+ }
1514+
1515+ public void showPlayerTournamentData(Player player, int targetObjectId, TournamentFightType type, Map<TournamentFightType, Integer> tournamentKills, Map<TournamentFightType, Integer> tournamentVictories, Map<TournamentFightType, Integer> tournamentDefeats, Map<TournamentFightType, Integer> tournamentTies, Map<TournamentFightType, Integer> tournamentDamage)
1516+ {
1517+ NpcHtmlMessage htm = new NpcHtmlMessage(0);
1518+ htm.setFile("data/html/en/mods/tournament/ranking/info/playerInfo" + type.name() + ".htm");
1519+
1520+ // Fight Data
1521+ for (Map.Entry<TournamentFightType, Integer> entry : tournamentVictories.entrySet())
1522+ {
1523+ htm.replace("%victories" + entry.getKey().name() + "%", tournamentVictories.get(entry.getKey()));
1524+ }
1525+ for (Map.Entry<TournamentFightType, Integer> entry : tournamentDefeats.entrySet())
1526+ {
1527+ htm.replace("%defeats" + entry.getKey().name() + "%", tournamentDefeats.get(entry.getKey()));
1528+ }
1529+ for (Map.Entry<TournamentFightType, Integer> entry : tournamentTies.entrySet())
1530+ {
1531+ htm.replace("%ties" + entry.getKey().name() + "%", tournamentTies.get(entry.getKey()));
1532+ }
1533+ for (Map.Entry<TournamentFightType, Integer> entry : tournamentKills.entrySet())
1534+ {
1535+ htm.replace("%kills" + entry.getKey().name() + "%", tournamentKills.get(entry.getKey()));
1536+ }
1537+ for (Map.Entry<TournamentFightType, Integer> entry : tournamentDamage.entrySet())
1538+ {
1539+ htm.replace("%damage" + entry.getKey().name() + "%", tournamentDamage.get(entry.getKey()));
1540+ }
1541+ for (Map.Entry<TournamentFightType, Integer> entry : tournamentDamage.entrySet())
1542+ {
1543+ htm.replace("%dpf" + entry.getKey().name() + "%", "Not Showing");
1544+ }
1545+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentVictories().entrySet())
1546+ {
1547+ htm.replace("%fightsDone" + entry.getKey().name() + "%", getTournamentPlayerFightsDone(targetObjectId, type));
1548+ }
1549+
1550+ htm.replace("%tourPoints%", player.getTournamentPoints());
1551+ htm.replace("%killstotal%", player.getTotalTournamentKills());
1552+ htm.replace("%totalDmg%", player.getTournamentTotalDamage());
1553+ htm.replace("%playerName%", player.getName());
1554+ htm.replace("%dpfTotal%", getDamagePerFight(player));
1555+ htm.replace("%wdt%", getWinDefeatTie(player));
1556+ htm.replace("%totalFights%", player.getTotalTournamentFightsDone());
1557+
1558+ player.sendPacket(htm);
1559+ }
1560+
1561+ public void showPlayerRankingData(Player player, int targetObjectId, TournamentFightType type)
1562+ {
1563+ Map<TournamentFightType, Integer> tournamentKills = new HashMap<>();
1564+ Map<TournamentFightType, Integer> tournamentVictories = new HashMap<>();
1565+ Map<TournamentFightType, Integer> tournamentDefeats = new HashMap<>();
1566+ Map<TournamentFightType, Integer> tournamentTies = new HashMap<>();
1567+ Map<TournamentFightType, Integer> tournamentDamage = new HashMap<>();
1568+
1569+ Connection con = null;
1570+ PreparedStatement offline = null;
1571+ ResultSet rs = null;
1572+ try
1573+ {
1574+ con = ConnectionPool.getConnection();
1575+ offline = con.prepareStatement("SELECT * FROM character_memo_alt WHERE obj_id =?");
1576+ offline.setInt(1, targetObjectId);
1577+ rs = offline.executeQuery();
1578+
1579+ while (rs.next())
1580+ {
1581+ if (rs.getString("name").startsWith("Tournament"))
1582+ {
1583+ StringTokenizer st = new StringTokenizer(rs.getString("name"), "-");
1584+ st.nextToken(); // "Tournament"
1585+ switch (st.nextToken())
1586+ {
1587+ case "Victories":
1588+ if (st.hasMoreTokens())
1589+ {
1590+ tournamentVictories.put(TournamentFightType.valueOf(st.nextToken()), rs.getInt("value"));
1591+ }
1592+ break;
1593+ case "Defeats":
1594+ if (st.hasMoreTokens())
1595+ {
1596+ tournamentDefeats.put(TournamentFightType.valueOf(st.nextToken()), rs.getInt("value"));
1597+ }
1598+ break;
1599+ case "Ties":
1600+ if (st.hasMoreTokens())
1601+ {
1602+ tournamentTies.put(TournamentFightType.valueOf(st.nextToken()), rs.getInt("value"));
1603+ }
1604+ break;
1605+ case "Kills":
1606+ if (st.hasMoreTokens())
1607+ {
1608+ tournamentKills.put(TournamentFightType.valueOf(st.nextToken()), rs.getInt("value"));
1609+ }
1610+ break;
1611+
1612+ case "Damage":
1613+ if (st.hasMoreTokens())
1614+ {
1615+ tournamentDamage.put(TournamentFightType.valueOf(st.nextToken()), rs.getInt("value"));
1616+ }
1617+ break;
1618+
1619+ }
1620+
1621+ }
1622+
1623+ }
1624+
1625+ con.close();
1626+ }
1627+ catch (Exception e)
1628+ {
1629+ e.printStackTrace();
1630+ }
1631+ finally
1632+ {
1633+ Mysql.closeQuietly(con, offline, rs);
1634+ }
1635+
1636+ showPlayerTournamentData(player, targetObjectId, type, tournamentKills, tournamentVictories, tournamentDefeats, tournamentTies, tournamentDamage);
1637+ }
1638+
1639+ class WDTRecord
1640+ {
1641+ String playerName;
1642+
1643+ }
1644+
1645+ public void storeTournamentData(Player player)
1646+ {
1647+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentVictories().entrySet())
1648+ {
1649+ PlayerVariables.setVar(player, "Tournament-Victories-" + entry.getKey().name(), entry.getValue(), -1);
1650+ }
1651+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentDefeats().entrySet())
1652+ {
1653+ PlayerVariables.setVar(player, "Tournament-Defeats-" + entry.getKey().name(), entry.getValue(), -1);
1654+ }
1655+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentTies().entrySet())
1656+ {
1657+ PlayerVariables.setVar(player, "Tournament-Ties-" + entry.getKey().name(), entry.getValue(), -1);
1658+ }
1659+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentKills().entrySet())
1660+ {
1661+ PlayerVariables.setVar(player, "Tournament-Kills-" + entry.getKey().name(), entry.getValue(), -1);
1662+ }
1663+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentDamage().entrySet())
1664+ {
1665+ PlayerVariables.setVar(player, "Tournament-Damage-" + entry.getKey().name(), entry.getValue(), -1);
1666+ }
1667+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentDamage().entrySet())
1668+ {
1669+ PlayerVariables.setVar(player, "Tournament-WDT-" + entry.getKey().name(), String.valueOf(getWinDefeatTie(player, entry.getKey())), -1);
1670+ }
1671+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentDamage().entrySet())
1672+ {
1673+ PlayerVariables.setVar(player, "Tournament-DPF-" + entry.getKey().name(), String.valueOf(getDamagePerFight(player, entry.getKey())), -1);
1674+ }
1675+
1676+ PlayerVariables.setVar(player, "Tournament-Points", player.getTournamentPoints(), -1);
1677+
1678+ }
1679+
1680+ /**
1681+ * @return the started
1682+ */
1683+ public boolean isRunning()
1684+ {
1685+ return running;
1686+ }
1687+
1688+ /**
1689+ * @param started the started to set
1690+ */
1691+ public void setRunning(boolean started)
1692+ {
1693+ this.running = started;
1694+ }
1695+
1696+ /**
1697+ * @return the finishEvent
1698+ */
1699+ public ScheduledFuture<?> getFinishEventTask()
1700+ {
1701+ return finishEventTask;
1702+ }
1703+
1704+ /**
1705+ * @param finishEvent the finishEvent to set
1706+ */
1707+ public void setFinishEventTask(ScheduledFuture<?> finishEvent)
1708+ {
1709+ this.finishEventTask = finishEvent;
1710+ }
1711+
1712+ /**
1713+ * @return the tournamentTeleporting
1714+ */
1715+ public boolean isTournamentTeleporting()
1716+ {
1717+ return tournamentTeleporting;
1718+ }
1719+
1720+ /**
1721+ * @param tournamentTeleporting the tournamentTeleporting to set
1722+ */
1723+ public void setTournamentTeleporting(boolean tournamentTeleporting)
1724+ {
1725+ this.tournamentTeleporting = tournamentTeleporting;
1726+ }
1727+
1728+ public double getDamagePerFight(int totalDamage, int totalFightsDone)
1729+ {
1730+ double dpf = 0;
1731+ if (totalFightsDone == 0)
1732+ {
1733+ return 0;
1734+ }
1735+ dpf = (totalDamage / totalFightsDone * 1000);
1736+ return dpf;
1737+ }
1738+
1739+ public int getDamagePerFight(Player player, TournamentFightType type)
1740+ {
1741+ int dpf = 0;
1742+ int totalDamage = player.getTournamentTotalDamage();
1743+ int totalFightsDone = player.getTournamentFightsDone(type);
1744+ if (totalFightsDone == 0)
1745+ {
1746+ return 0;
1747+ }
1748+ dpf = (totalDamage / totalFightsDone);
1749+ return dpf;
1750+ }
1751+
1752+ public double getWinDefeatTie(int totalFightsDone, int totalVictories, int totalDefeats, int totalTies)
1753+ {
1754+ int ratioByFight = 1;
1755+ double playerWDT = 0;
1756+ if (totalFightsDone == 0)
1757+ {
1758+ return 0;
1759+ }
1760+ playerWDT = ratioByFight * (((3) * totalVictories) + ((-3) * totalDefeats) + (totalTies)) / totalFightsDone;
1761+ return playerWDT;
1762+ }
1763+
1764+ public double getDamagePerFight(Player player)
1765+ {
1766+ double dpf = 0;
1767+ int totalDamage = player.getTournamentTotalDamage();
1768+ int totalFightsDone = player.getTotalTournamentFightsDone();
1769+ if (totalFightsDone == 0)
1770+ {
1771+ return 0;
1772+ }
1773+ dpf = (totalDamage / totalFightsDone);
1774+ return dpf;
1775+ }
1776+
1777+ public double getWinDefeatTie(Player player)
1778+ {
1779+ int ratioByFight = 1;
1780+ double playerWDT = 0;
1781+ int totalFightsDone = player.getTotalTournamentFightsDone();
1782+ int totalVictories = player.getTotalVictories();
1783+ int totalDefeats = player.getTotalDefeats();
1784+ int totalTies = player.getTotalTies();
1785+ if (totalFightsDone == 0)
1786+ {
1787+ return 0;
1788+ }
1789+ playerWDT = ratioByFight * (((3) * totalVictories) + ((-3) * totalDefeats) + (totalTies)) / totalFightsDone;
1790+ return playerWDT;
1791+ }
1792+
1793+ public double getWinDefeatTie(Player player, TournamentFightType type)
1794+ {
1795+ int ratioByFight = 1;
1796+ double playerWDT = 0;
1797+ int totalFightsDone = player.getTournamentFightsDone(type);
1798+ int totalVictories = player.getTournamentVictories().get(type);
1799+ int totalDefeats = player.getTournamentDefeats().get(type);
1800+ int totalTies = player.getTournamentTies().get(type);
1801+ if (totalFightsDone == 0)
1802+ {
1803+ return 0;
1804+ }
1805+ playerWDT = ratioByFight * (((3) * totalVictories) + ((-3) * totalDefeats) + (totalTies)) / totalFightsDone;
1806+ return playerWDT;
1807+ }
1808+
1809+ // RANKING
1810+ class TourRankRecord
1811+ {
1812+ int pos;
1813+ String playerName;
1814+ String recordVal;
1815+
1816+ public TourRankRecord(int pos, String playerName, String recordVal)
1817+ {
1818+ this.pos = pos + 1;
1819+ this.playerName = playerName;
1820+ this.recordVal = recordVal;
1821+ }
1822+ }
1823+
1824+ public String generateRankingRecords(Player player, TournamentFightType type, LinkedList<TourRankRecord> records, String rankType)
1825+ {
1826+ StringBuilder sb = new StringBuilder();
1827+ int bgColor = 1;
1828+ for (TourRankRecord record : records)
1829+ {
1830+ if (record == null)
1831+ continue;
1832+ if (bgColor % 2 == 0)
1833+ sb.append("<table width=300 bgcolor=000000>");
1834+ else
1835+ sb.append("<table width=300>");
1836+ sb.append("<tr>");
1837+ sb.append("<td align=center fixwidth=20>");
1838+ sb.append(record.pos);
1839+ sb.append("</td>");
1840+ sb.append("<td fixwidth=5></td>");
1841+ sb.append("<td align=center fixwidth=75>");
1842+ sb.append(record.playerName);
1843+ sb.append("</td>");
1844+ sb.append("<td align=center fixwidth=50>");
1845+ sb.append(record.recordVal);
1846+ sb.append("</td>");
1847+ sb.append("<td align=center fixwidth=50>");
1848+ sb.append("<a action=\"bypass bp_checkTournamentPlayer " + record.playerName + " " + type.name() + "\"><font color=LEVEL>Check</font></a>");
1849+ sb.append("</td>");
1850+ sb.append("</tr>");
1851+ sb.append("</table>");
1852+
1853+ }
1854+ return sb.toString();
1855+ }
1856+
1857+ public void showRanking(Player player, TournamentFightType fightType, String rankType)
1858+ {
1859+ NpcHtmlMessage htm = new NpcHtmlMessage(0);
1860+ htm.setFile("data/html/en/mods/tournament/ranking/" + rankType + "/" + fightType.name() + ".htm");
1861+
1862+ LinkedList<TourRankRecord> records = new LinkedList<>();
1863+ int pos = 0;
1864+ Connection con = null;
1865+ PreparedStatement offline = null;
1866+ ResultSet rs = null;
1867+ try
1868+ {
1869+ con = ConnectionPool.getConnection();
1870+ offline = con.prepareStatement("SELECT * FROM tournament_player_data WHERE fight_type=? ORDER BY " + rankType + " DESC LIMIT 10");
1871+ offline.setString(1, fightType.name());
1872+ rs = offline.executeQuery();
1873+ while (rs.next())
1874+ {
1875+
1876+ records.add(new TourRankRecord(pos, PlayerInfoTable.getInstance().getPlayerName(rs.getInt("obj_id")), String.valueOf(rs.getInt(rankType))));
1877+ pos++;
1878+
1879+ }
1880+
1881+ }
1882+ catch (Exception e)
1883+ {
1884+ e.printStackTrace();
1885+ }
1886+ finally
1887+ {
1888+ Mysql.closeQuietly(con, offline, rs);
1889+ }
1890+ for (Map.Entry<TournamentFightType, Integer> entry : player.getTournamentVictories().entrySet())
1891+ htm.replace("%ranking-" + rankType + entry.getKey() + "%", generateRankingRecords(player, fightType, records, rankType));
1892+ player.sendPacket(htm);
1893+ }
1894+
1895+ /**
1896+ * @return the allTimeFights
1897+ */
1898+ public int getAllTimeFights()
1899+ {
1900+ return allTimeFights;
1901+ }
1902+
1903+ /**
1904+ * @param allTimeFights the allTimeFights to set
1905+ */
1906+ public void setAllTimeFights(int allTimeFights)
1907+ {
1908+ this.allTimeFights = allTimeFights;
1909+ }
1910+}
1911\ No newline at end of file
1912diff --git java/Base/Tournament/Matches/TournamentMatch.java java/Base/Tournament/Matches/TournamentMatch.java
1913new file mode 100644
1914index 0000000..de22efc
1915--- /dev/null
1916+++ java/Base/Tournament/Matches/TournamentMatch.java
1917@@ -0,0 +1,16 @@
1918+package Base.Tournament.Matches;
1919+
1920+import Base.Tournament.Model.TournamentTeam;
1921+
1922+/**
1923+ * @author Rouxy
1924+ */
1925+public abstract class TournamentMatch
1926+{
1927+ public abstract boolean register(TournamentTeam team);
1928+
1929+ public abstract boolean unRegister(TournamentTeam team);
1930+
1931+ public abstract boolean checkConditions(TournamentTeam team);
1932+
1933+}
1934\ No newline at end of file
1935diff --git java/Base/Tournament/Matches/TournamentMatch1x1.java java/Base/Tournament/Matches/TournamentMatch1x1.java
1936new file mode 100644
1937index 0000000..9b90bc4
1938--- /dev/null
1939+++ java/Base/Tournament/Matches/TournamentMatch1x1.java
1940@@ -0,0 +1,187 @@
1941+package Base.Tournament.Matches;
1942+
1943+import java.util.ArrayList;
1944+import java.util.List;
1945+import java.util.concurrent.ScheduledFuture;
1946+
1947+import net.sf.l2j.Config;
1948+import net.sf.l2j.gameserver.enums.actors.ClassId;
1949+
1950+import Base.Tournament.Enums.TournamentFightType;
1951+import Base.Tournament.Manager.TournamentManager;
1952+import Base.Tournament.Model.TournamentTeam;
1953+
1954+
1955+/**
1956+ * @author Rouxy
1957+ */
1958+public class TournamentMatch1x1 extends TournamentMatch
1959+{
1960+ private List<TournamentTeam> registeredTeams = new ArrayList<>();
1961+ private ScheduledFuture<?> searchFightsTask = null;
1962+ private final TournamentFightType fightType = TournamentFightType.F1X1;
1963+
1964+ public static TournamentMatch1x1 getInstance()
1965+ {
1966+ return SingleTonHolder._instance;
1967+ }
1968+
1969+ private static class SingleTonHolder
1970+ {
1971+ protected static TournamentMatch1x1 _instance = new TournamentMatch1x1();
1972+ }
1973+
1974+ @Override
1975+ public boolean register(TournamentTeam team)
1976+ {
1977+ try
1978+ {
1979+ TournamentManager.getInstance().getRegisteredTournamentTeams().put(team, TournamentFightType.F1X1);
1980+ return true;
1981+ }
1982+ catch (Exception e)
1983+ {
1984+
1985+ e.printStackTrace();
1986+ return false;
1987+ }
1988+ }
1989+
1990+ @Override
1991+ public boolean unRegister(TournamentTeam team)
1992+ {
1993+ try
1994+ {
1995+ TournamentManager.getInstance().getRegisteredTournamentTeams().remove(team);
1996+ return true;
1997+ }
1998+ catch (Exception e)
1999+ {
2000+
2001+ e.printStackTrace();
2002+ return false;
2003+ }
2004+ }
2005+
2006+ public ScheduledFuture<?> getSearchFightsTask()
2007+ {
2008+ return searchFightsTask;
2009+ }
2010+
2011+ public void setSearchFightsTask(ScheduledFuture<?> searchFightsTask)
2012+ {
2013+ this.searchFightsTask = searchFightsTask;
2014+ }
2015+
2016+ public List<TournamentTeam> getRegisteredTeams()
2017+ {
2018+ return registeredTeams;
2019+ }
2020+
2021+ public void setRegisteredTeams(List<TournamentTeam> registeredTeams)
2022+ {
2023+ this.registeredTeams = registeredTeams;
2024+ }
2025+
2026+ @Override
2027+ public boolean checkConditions(TournamentTeam team)
2028+ {
2029+
2030+ if (team.getMembers().size() != 1)
2031+ {
2032+ team.sendMessage("Only 1 player allowed in this mode.");
2033+ team.screenMessage("Only 1 player allowed in this mode.");
2034+ return false;
2035+ }
2036+ if (team.getCountOfClass(ClassId.DUELIST) > Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F1X1))
2037+ {
2038+ team.sendMessage("Only " + Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F1X1) + " Duelist(s) are allowed in this mode.");
2039+ team.screenMessage("Only " + Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F1X1) + " Duelist(s) are allowed in this mode.");
2040+ return false;
2041+ }
2042+ if (team.getCountOfClass(ClassId.ARCHMAGE) > Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F1X1))
2043+ {
2044+ team.sendMessage("Only " + Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F1X1) + " Archmage(s) are allowed in this mode.");
2045+ team.screenMessage("Only " + Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F1X1) + " Archmage(s) are allowed in this mode.");
2046+ return false;
2047+ }
2048+ if (team.getCountOfClass(ClassId.SOULTAKER) > Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F1X1))
2049+ {
2050+ team.sendMessage("Only " + Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F1X1) + " Soultaker(s) are allowed in this mode.");
2051+ team.screenMessage("Only " + Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F1X1) + " Soultaker(s) are allowed in this mode.");
2052+ return false;
2053+ }
2054+
2055+ if (team.getCountOfClass(ClassId.STORM_SCREAMER) > Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F1X1))
2056+ {
2057+ team.sendMessage("Only " + Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F1X1) + " Storm Screamer(s) are allowed in this mode.");
2058+ team.screenMessage("Only " + Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F1X1) + " Storm Screamer(s) are allowed in this mode.");
2059+ return false;
2060+ }
2061+ if (team.getCountOfClass(ClassId.MYSTIC_MUSE) > Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F1X1))
2062+ {
2063+ team.sendMessage("Only " + Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F1X1) + " Mystic Muse(s) are allowed in this mode.");
2064+ team.screenMessage("Only " + Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F1X1) + " Mystic Muse(s) are allowed in this mode.");
2065+ return false;
2066+ }
2067+ if (team.getCountOfClass(ClassId.TITAN) > Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F1X1))
2068+ {
2069+ team.sendMessage("Only " + Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F1X1) + " Titan(s) are allowed in this mode.");
2070+ team.screenMessage("Only " + Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F1X1) + " Titan(s) are allowed in this mode.");
2071+ return false;
2072+ }
2073+ if (team.getCountOfClass(ClassId.DOMINATOR) > Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F1X1))
2074+ {
2075+ team.sendMessage("Only " + Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F1X1) + " Dominator(s) are allowed in this mode.");
2076+ team.screenMessage("Only " + Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F1X1) + " Dominator(s) are allowed in this mode.");
2077+ return false;
2078+ }
2079+ if (team.getCountOfClass(ClassId.DOOMCRYER) > Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F1X1))
2080+ {
2081+ team.sendMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F1X1) + " Doomcryer(s) are allowed in this mode.");
2082+ team.screenMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F1X1) + " Doomcryer(s) are allowed in this mode.");
2083+ return false;
2084+ }
2085+ if (team.getCountOfClass(ClassId.DOOMCRYER) > Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F1X1))
2086+ {
2087+ team.sendMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F1X1) + " Doomcryer(s) are allowed in this mode.");
2088+ team.screenMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F1X1) + " Doomcryer(s) are allowed in this mode.");
2089+ return false;
2090+ }
2091+ if (team.getArchersCount() > Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F1X1))
2092+ {
2093+ team.sendMessage("Only " + Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F1X1) + " Archer(s) are allowed in this mode.");
2094+ team.screenMessage("Only " + Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F1X1) + " Archer(s) are allowed in this mode.");
2095+ return false;
2096+ }
2097+ if (team.getTankersCount() > Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F1X1))
2098+ {
2099+ team.sendMessage("Only " + Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F1X1) + " Tanker(s) are allowed in this mode.");
2100+ team.screenMessage("Only " + Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F1X1) + " Tanker(s) are allowed in this mode.");
2101+ return false;
2102+ }
2103+ if (team.getHealersCount() > Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F1X1))
2104+ {
2105+ team.sendMessage("Only " + Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F1X1) + " Healer(s) are allowed in this mode.");
2106+ team.screenMessage("Only " + Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F1X1) + " Healer(s) are allowed in this mode.");
2107+ return false;
2108+ }
2109+ if (team.getDaggersCount() > Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F1X1))
2110+ {
2111+ team.sendMessage("Only " + Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F1X1) + " Dagger(s) are allowed in this mode.");
2112+ team.screenMessage("Only " + Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F1X1) + " Dagger(s) are allowed in this mode.");
2113+ return false;
2114+ }
2115+
2116+ return true;
2117+ }
2118+
2119+ /**
2120+ * @return the fightType
2121+ */
2122+ public TournamentFightType getFightType()
2123+ {
2124+ return fightType;
2125+ }
2126+
2127+}
2128\ No newline at end of file
2129diff --git java/Base/Tournament/Matches/TournamentMatch2x2.java java/Base/Tournament/Matches/TournamentMatch2x2.java
2130new file mode 100644
2131index 0000000..3fdc6cf
2132--- /dev/null
2133+++ java/Base/Tournament/Matches/TournamentMatch2x2.java
2134@@ -0,0 +1,187 @@
2135+package Base.Tournament.Matches;
2136+
2137+import java.util.ArrayList;
2138+import java.util.List;
2139+import java.util.concurrent.ScheduledFuture;
2140+
2141+import net.sf.l2j.Config;
2142+import net.sf.l2j.gameserver.enums.actors.ClassId;
2143+
2144+import Base.Tournament.Enums.TournamentFightType;
2145+import Base.Tournament.Manager.TournamentManager;
2146+import Base.Tournament.Model.TournamentTeam;
2147+
2148+
2149+/**
2150+ * @author Rouxy
2151+ */
2152+public class TournamentMatch2x2 extends TournamentMatch
2153+{
2154+ private List<TournamentTeam> registeredTeams = new ArrayList<>();
2155+ private ScheduledFuture<?> searchFightsTask = null;
2156+ private final TournamentFightType fightType = TournamentFightType.F2X2;
2157+
2158+ public static TournamentMatch2x2 getInstance()
2159+ {
2160+ return SingleTonHolder._instance;
2161+ }
2162+
2163+ private static class SingleTonHolder
2164+ {
2165+ protected static TournamentMatch2x2 _instance = new TournamentMatch2x2();
2166+ }
2167+
2168+ @Override
2169+ public boolean register(TournamentTeam team)
2170+ {
2171+ try
2172+ {
2173+ TournamentManager.getInstance().getRegisteredTournamentTeams().put(team, TournamentFightType.F2X2);
2174+ return true;
2175+ }
2176+ catch (Exception e)
2177+ {
2178+
2179+ e.printStackTrace();
2180+ return false;
2181+ }
2182+ }
2183+
2184+ @Override
2185+ public boolean unRegister(TournamentTeam team)
2186+ {
2187+ try
2188+ {
2189+ TournamentManager.getInstance().getRegisteredTournamentTeams().remove(team);
2190+ return true;
2191+ }
2192+ catch (Exception e)
2193+ {
2194+
2195+ e.printStackTrace();
2196+ return false;
2197+ }
2198+ }
2199+
2200+ public ScheduledFuture<?> getSearchFightsTask()
2201+ {
2202+ return searchFightsTask;
2203+ }
2204+
2205+ public void setSearchFightsTask(ScheduledFuture<?> searchFightsTask)
2206+ {
2207+ this.searchFightsTask = searchFightsTask;
2208+ }
2209+
2210+ public List<TournamentTeam> getRegisteredTeams()
2211+ {
2212+ return registeredTeams;
2213+ }
2214+
2215+ public void setRegisteredTeams(List<TournamentTeam> registeredTeams)
2216+ {
2217+ this.registeredTeams = registeredTeams;
2218+ }
2219+
2220+ @Override
2221+ public boolean checkConditions(TournamentTeam team)
2222+ {
2223+
2224+ if (team.getMembers().size() != 2)
2225+ {
2226+ team.sendMessage("Your team must contains 2 players.");
2227+ team.screenMessage("Your team must contains 2 players.");
2228+ return false;
2229+ }
2230+ if (team.getCountOfClass(ClassId.DUELIST) > Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F2X2))
2231+ {
2232+ team.sendMessage("Only " + Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F2X2) + " Duelist(s) are allowed in this mode.");
2233+ team.screenMessage("Only " + Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F2X2) + " Duelist(s) are allowed in this mode.");
2234+ return false;
2235+ }
2236+ if (team.getCountOfClass(ClassId.ARCHMAGE) > Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F2X2))
2237+ {
2238+ team.sendMessage("Only " + Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F2X2) + " Archmage(s) are allowed in this mode.");
2239+ team.screenMessage("Only " + Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F2X2) + " Archmage(s) are allowed in this mode.");
2240+ return false;
2241+ }
2242+ if (team.getCountOfClass(ClassId.SOULTAKER) > Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F2X2))
2243+ {
2244+ team.sendMessage("Only " + Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F2X2) + " Soultaker(s) are allowed in this mode.");
2245+ team.screenMessage("Only " + Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F2X2) + " Soultaker(s) are allowed in this mode.");
2246+ return false;
2247+ }
2248+
2249+ if (team.getCountOfClass(ClassId.STORM_SCREAMER) > Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F2X2))
2250+ {
2251+ team.sendMessage("Only " + Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F2X2) + " Storm Screamer(s) are allowed in this mode.");
2252+ team.screenMessage("Only " + Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F2X2) + " Storm Screamer(s) are allowed in this mode.");
2253+ return false;
2254+ }
2255+ if (team.getCountOfClass(ClassId.MYSTIC_MUSE) > Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F2X2))
2256+ {
2257+ team.sendMessage("Only " + Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F2X2) + " Mystic Muse(s) are allowed in this mode.");
2258+ team.screenMessage("Only " + Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F2X2) + " Mystic Muse(s) are allowed in this mode.");
2259+ return false;
2260+ }
2261+ if (team.getCountOfClass(ClassId.TITAN) > Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F2X2))
2262+ {
2263+ team.sendMessage("Only " + Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F2X2) + " Titan(s) are allowed in this mode.");
2264+ team.screenMessage("Only " + Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F2X2) + " Titan(s) are allowed in this mode.");
2265+ return false;
2266+ }
2267+ if (team.getCountOfClass(ClassId.DOMINATOR) > Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F2X2))
2268+ {
2269+ team.sendMessage("Only " + Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F2X2) + " Dominator(s) are allowed in this mode.");
2270+ team.screenMessage("Only " + Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F2X2) + " Dominator(s) are allowed in this mode.");
2271+ return false;
2272+ }
2273+ if (team.getCountOfClass(ClassId.DOOMCRYER) > Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F2X2))
2274+ {
2275+ team.sendMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F2X2) + " Doomcryer(s) are allowed in this mode.");
2276+ team.screenMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F2X2) + " Doomcryer(s) are allowed in this mode.");
2277+ return false;
2278+ }
2279+ if (team.getCountOfClass(ClassId.DOOMCRYER) > Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F2X2))
2280+ {
2281+ team.sendMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F2X2) + " Doomcryer(s) are allowed in this mode.");
2282+ team.screenMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F2X2) + " Doomcryer(s) are allowed in this mode.");
2283+ return false;
2284+ }
2285+ if (team.getArchersCount() > Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F2X2))
2286+ {
2287+ team.sendMessage("Only " + Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F2X2) + " Archer(s) are allowed in this mode.");
2288+ team.screenMessage("Only " + Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F2X2) + " Archer(s) are allowed in this mode.");
2289+ return false;
2290+ }
2291+ if (team.getTankersCount() > Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F2X2))
2292+ {
2293+ team.sendMessage("Only " + Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F2X2) + " Tanker(s) are allowed in this mode.");
2294+ team.screenMessage("Only " + Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F2X2) + " Tanker(s) are allowed in this mode.");
2295+ return false;
2296+ }
2297+ if (team.getHealersCount() > Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F2X2))
2298+ {
2299+ team.sendMessage("Only " + Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F2X2) + " Healer(s) are allowed in this mode.");
2300+ team.screenMessage("Only " + Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F2X2) + " Healer(s) are allowed in this mode.");
2301+ return false;
2302+ }
2303+ if (team.getDaggersCount() > Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F2X2))
2304+ {
2305+ team.sendMessage("Only " + Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F2X2) + " Dagger(s) are allowed in this mode.");
2306+ team.screenMessage("Only " + Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F2X2) + " Dagger(s) are allowed in this mode.");
2307+ return false;
2308+ }
2309+
2310+ return true;
2311+ }
2312+
2313+ /**
2314+ * @return the fightType
2315+ */
2316+ public TournamentFightType getFightType()
2317+ {
2318+ return fightType;
2319+ }
2320+
2321+}
2322\ No newline at end of file
2323diff --git java/Base/Tournament/Matches/TournamentMatch3x3.java java/Base/Tournament/Matches/TournamentMatch3x3.java
2324new file mode 100644
2325index 0000000..6702dbf
2326--- /dev/null
2327+++ java/Base/Tournament/Matches/TournamentMatch3x3.java
2328@@ -0,0 +1,187 @@
2329+package Base.Tournament.Matches;
2330+
2331+import java.util.ArrayList;
2332+import java.util.List;
2333+import java.util.concurrent.ScheduledFuture;
2334+
2335+import net.sf.l2j.Config;
2336+import net.sf.l2j.gameserver.enums.actors.ClassId;
2337+
2338+import Base.Tournament.Enums.TournamentFightType;
2339+import Base.Tournament.Manager.TournamentManager;
2340+import Base.Tournament.Model.TournamentTeam;
2341+
2342+
2343+/**
2344+ * @author Rouxy
2345+ */
2346+public class TournamentMatch3x3 extends TournamentMatch
2347+{
2348+ private List<TournamentTeam> registeredTeams = new ArrayList<>();
2349+ private ScheduledFuture<?> searchFightsTask = null;
2350+ private final TournamentFightType fightType = TournamentFightType.F3X3;
2351+
2352+ public static TournamentMatch3x3 getInstance()
2353+ {
2354+ return SingleTonHolder._instance;
2355+ }
2356+
2357+ private static class SingleTonHolder
2358+ {
2359+ protected static TournamentMatch3x3 _instance = new TournamentMatch3x3();
2360+ }
2361+
2362+ @Override
2363+ public boolean register(TournamentTeam team)
2364+ {
2365+ try
2366+ {
2367+ TournamentManager.getInstance().getRegisteredTournamentTeams().put(team, TournamentFightType.F3X3);
2368+ return true;
2369+ }
2370+ catch (Exception e)
2371+ {
2372+
2373+ e.printStackTrace();
2374+ return false;
2375+ }
2376+ }
2377+
2378+ @Override
2379+ public boolean unRegister(TournamentTeam team)
2380+ {
2381+ try
2382+ {
2383+ TournamentManager.getInstance().getRegisteredTournamentTeams().remove(team);
2384+ return true;
2385+ }
2386+ catch (Exception e)
2387+ {
2388+
2389+ e.printStackTrace();
2390+ return false;
2391+ }
2392+ }
2393+
2394+ public ScheduledFuture<?> getSearchFightsTask()
2395+ {
2396+ return searchFightsTask;
2397+ }
2398+
2399+ public void setSearchFightsTask(ScheduledFuture<?> searchFightsTask)
2400+ {
2401+ this.searchFightsTask = searchFightsTask;
2402+ }
2403+
2404+ public List<TournamentTeam> getRegisteredTeams()
2405+ {
2406+ return registeredTeams;
2407+ }
2408+
2409+ public void setRegisteredTeams(List<TournamentTeam> registeredTeams)
2410+ {
2411+ this.registeredTeams = registeredTeams;
2412+ }
2413+
2414+ @Override
2415+ public boolean checkConditions(TournamentTeam team)
2416+ {
2417+
2418+ if (team.getMembers().size() != 3)
2419+ {
2420+ team.sendMessage("Your team must contains 3 players.");
2421+ team.screenMessage("Your team must contains 3 players.");
2422+ return false;
2423+ }
2424+ if (team.getCountOfClass(ClassId.DUELIST) > Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F3X3))
2425+ {
2426+ team.sendMessage("Only " + Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F3X3) + " Duelist(s) are allowed in this mode.");
2427+ team.screenMessage("Only " + Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F3X3) + " Duelist(s) are allowed in this mode.");
2428+ return false;
2429+ }
2430+ if (team.getCountOfClass(ClassId.ARCHMAGE) > Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F3X3))
2431+ {
2432+ team.sendMessage("Only " + Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F3X3) + " Archmage(s) are allowed in this mode.");
2433+ team.screenMessage("Only " + Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F3X3) + " Archmage(s) are allowed in this mode.");
2434+ return false;
2435+ }
2436+ if (team.getCountOfClass(ClassId.SOULTAKER) > Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F3X3))
2437+ {
2438+ team.sendMessage("Only " + Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F3X3) + " Soultaker(s) are allowed in this mode.");
2439+ team.screenMessage("Only " + Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F3X3) + " Soultaker(s) are allowed in this mode.");
2440+ return false;
2441+ }
2442+
2443+ if (team.getCountOfClass(ClassId.STORM_SCREAMER) > Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F3X3))
2444+ {
2445+ team.sendMessage("Only " + Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F3X3) + " Storm Screamer(s) are allowed in this mode.");
2446+ team.screenMessage("Only " + Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F3X3) + " Storm Screamer(s) are allowed in this mode.");
2447+ return false;
2448+ }
2449+ if (team.getCountOfClass(ClassId.MYSTIC_MUSE) > Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F3X3))
2450+ {
2451+ team.sendMessage("Only " + Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F3X3) + " Mystic Muse(s) are allowed in this mode.");
2452+ team.screenMessage("Only " + Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F3X3) + " Mystic Muse(s) are allowed in this mode.");
2453+ return false;
2454+ }
2455+ if (team.getCountOfClass(ClassId.TITAN) > Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F3X3))
2456+ {
2457+ team.sendMessage("Only " + Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F3X3) + " Titan(s) are allowed in this mode.");
2458+ team.screenMessage("Only " + Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F3X3) + " Titan(s) are allowed in this mode.");
2459+ return false;
2460+ }
2461+ if (team.getCountOfClass(ClassId.DOMINATOR) > Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F3X3))
2462+ {
2463+ team.sendMessage("Only " + Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F3X3) + " Dominator(s) are allowed in this mode.");
2464+ team.screenMessage("Only " + Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F3X3) + " Dominator(s) are allowed in this mode.");
2465+ return false;
2466+ }
2467+ if (team.getCountOfClass(ClassId.DOOMCRYER) > Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F3X3))
2468+ {
2469+ team.sendMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F3X3) + " Doomcryer(s) are allowed in this mode.");
2470+ team.screenMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F3X3) + " Doomcryer(s) are allowed in this mode.");
2471+ return false;
2472+ }
2473+ if (team.getCountOfClass(ClassId.DOOMCRYER) > Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F3X3))
2474+ {
2475+ team.sendMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F3X3) + " Doomcryer(s) are allowed in this mode.");
2476+ team.screenMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F3X3) + " Doomcryer(s) are allowed in this mode.");
2477+ return false;
2478+ }
2479+ if (team.getArchersCount() > Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F3X3))
2480+ {
2481+ team.sendMessage("Only " + Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F3X3) + " Archer(s) are allowed in this mode.");
2482+ team.screenMessage("Only " + Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F3X3) + " Archer(s) are allowed in this mode.");
2483+ return false;
2484+ }
2485+ if (team.getTankersCount() > Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F3X3))
2486+ {
2487+ team.sendMessage("Only " + Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F3X3) + " Tanker(s) are allowed in this mode.");
2488+ team.screenMessage("Only " + Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F3X3) + " Tanker(s) are allowed in this mode.");
2489+ return false;
2490+ }
2491+ if (team.getHealersCount() > Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F3X3))
2492+ {
2493+ team.sendMessage("Only " + Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F3X3) + " Healer(s) are allowed in this mode.");
2494+ team.screenMessage("Only " + Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F3X3) + " Healer(s) are allowed in this mode.");
2495+ return false;
2496+ }
2497+ if (team.getDaggersCount() > Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F3X3))
2498+ {
2499+ team.sendMessage("Only " + Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F3X3) + " Dagger(s) are allowed in this mode.");
2500+ team.screenMessage("Only " + Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F3X3) + " Dagger(s) are allowed in this mode.");
2501+ return false;
2502+ }
2503+
2504+ return true;
2505+ }
2506+
2507+ /**
2508+ * @return the fightType
2509+ */
2510+ public TournamentFightType getFightType()
2511+ {
2512+ return fightType;
2513+ }
2514+
2515+}
2516\ No newline at end of file
2517diff --git java/Base/Tournament/Matches/TournamentMatch4x4.java java/Base/Tournament/Matches/TournamentMatch4x4.java
2518new file mode 100644
2519index 0000000..8643e28
2520--- /dev/null
2521+++ java/Base/Tournament/Matches/TournamentMatch4x4.java
2522@@ -0,0 +1,187 @@
2523+package Base.Tournament.Matches;
2524+
2525+import java.util.ArrayList;
2526+import java.util.List;
2527+import java.util.concurrent.ScheduledFuture;
2528+
2529+import net.sf.l2j.Config;
2530+import net.sf.l2j.gameserver.enums.actors.ClassId;
2531+
2532+import Base.Tournament.Enums.TournamentFightType;
2533+import Base.Tournament.Manager.TournamentManager;
2534+import Base.Tournament.Model.TournamentTeam;
2535+
2536+
2537+/**
2538+ * @author Rouxy
2539+ */
2540+public class TournamentMatch4x4 extends TournamentMatch
2541+{
2542+ private List<TournamentTeam> registeredTeams = new ArrayList<>();
2543+ private ScheduledFuture<?> searchFightsTask = null;
2544+ private final TournamentFightType fightType = TournamentFightType.F4X4;
2545+
2546+ public static TournamentMatch4x4 getInstance()
2547+ {
2548+ return SingleTonHolder._instance;
2549+ }
2550+
2551+ private static class SingleTonHolder
2552+ {
2553+ protected static TournamentMatch4x4 _instance = new TournamentMatch4x4();
2554+ }
2555+
2556+ @Override
2557+ public boolean register(TournamentTeam team)
2558+ {
2559+ try
2560+ {
2561+ TournamentManager.getInstance().getRegisteredTournamentTeams().put(team, TournamentFightType.F4X4);
2562+ return true;
2563+ }
2564+ catch (Exception e)
2565+ {
2566+
2567+ e.printStackTrace();
2568+ return false;
2569+ }
2570+ }
2571+
2572+ @Override
2573+ public boolean unRegister(TournamentTeam team)
2574+ {
2575+ try
2576+ {
2577+ TournamentManager.getInstance().getRegisteredTournamentTeams().remove(team);
2578+ return true;
2579+ }
2580+ catch (Exception e)
2581+ {
2582+
2583+ e.printStackTrace();
2584+ return false;
2585+ }
2586+ }
2587+
2588+ public ScheduledFuture<?> getSearchFightsTask()
2589+ {
2590+ return searchFightsTask;
2591+ }
2592+
2593+ public void setSearchFightsTask(ScheduledFuture<?> searchFightsTask)
2594+ {
2595+ this.searchFightsTask = searchFightsTask;
2596+ }
2597+
2598+ public List<TournamentTeam> getRegisteredTeams()
2599+ {
2600+ return registeredTeams;
2601+ }
2602+
2603+ public void setRegisteredTeams(List<TournamentTeam> registeredTeams)
2604+ {
2605+ this.registeredTeams = registeredTeams;
2606+ }
2607+
2608+ @Override
2609+ public boolean checkConditions(TournamentTeam team)
2610+ {
2611+
2612+ if (team.getMembers().size() != 4)
2613+ {
2614+ team.sendMessage("Your team must contains 4 players.");
2615+ team.screenMessage("Your team must contains 4 players.");
2616+ return false;
2617+ }
2618+ if (team.getCountOfClass(ClassId.DUELIST) > Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F4X4))
2619+ {
2620+ team.sendMessage("Only " + Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F4X4) + " Duelist(s) are allowed in this mode.");
2621+ team.screenMessage("Only " + Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F4X4) + " Duelist(s) are allowed in this mode.");
2622+ return false;
2623+ }
2624+ if (team.getCountOfClass(ClassId.ARCHMAGE) > Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F4X4))
2625+ {
2626+ team.sendMessage("Only " + Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F4X4) + " Archmage(s) are allowed in this mode.");
2627+ team.screenMessage("Only " + Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F4X4) + " Archmage(s) are allowed in this mode.");
2628+ return false;
2629+ }
2630+ if (team.getCountOfClass(ClassId.SOULTAKER) > Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F4X4))
2631+ {
2632+ team.sendMessage("Only " + Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F4X4) + " Soultaker(s) are allowed in this mode.");
2633+ team.screenMessage("Only " + Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F4X4) + " Soultaker(s) are allowed in this mode.");
2634+ return false;
2635+ }
2636+
2637+ if (team.getCountOfClass(ClassId.STORM_SCREAMER) > Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F4X4))
2638+ {
2639+ team.sendMessage("Only " + Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F4X4) + " Storm Screamer(s) are allowed in this mode.");
2640+ team.screenMessage("Only " + Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F4X4) + " Storm Screamer(s) are allowed in this mode.");
2641+ return false;
2642+ }
2643+ if (team.getCountOfClass(ClassId.MYSTIC_MUSE) > Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F4X4))
2644+ {
2645+ team.sendMessage("Only " + Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F4X4) + " Mystic Muse(s) are allowed in this mode.");
2646+ team.screenMessage("Only " + Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F4X4) + " Mystic Muse(s) are allowed in this mode.");
2647+ return false;
2648+ }
2649+ if (team.getCountOfClass(ClassId.TITAN) > Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F4X4))
2650+ {
2651+ team.sendMessage("Only " + Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F4X4) + " Titan(s) are allowed in this mode.");
2652+ team.screenMessage("Only " + Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F4X4) + " Titan(s) are allowed in this mode.");
2653+ return false;
2654+ }
2655+ if (team.getCountOfClass(ClassId.DOMINATOR) > Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F4X4))
2656+ {
2657+ team.sendMessage("Only " + Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F4X4) + " Dominator(s) are allowed in this mode.");
2658+ team.screenMessage("Only " + Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F4X4) + " Dominator(s) are allowed in this mode.");
2659+ return false;
2660+ }
2661+ if (team.getCountOfClass(ClassId.DOOMCRYER) > Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F4X4))
2662+ {
2663+ team.sendMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F4X4) + " Doomcryer(s) are allowed in this mode.");
2664+ team.screenMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F4X4) + " Doomcryer(s) are allowed in this mode.");
2665+ return false;
2666+ }
2667+ if (team.getCountOfClass(ClassId.DOOMCRYER) > Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F4X4))
2668+ {
2669+ team.sendMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F4X4) + " Doomcryer(s) are allowed in this mode.");
2670+ team.screenMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F4X4) + " Doomcryer(s) are allowed in this mode.");
2671+ return false;
2672+ }
2673+ if (team.getArchersCount() > Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F4X4))
2674+ {
2675+ team.sendMessage("Only " + Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F4X4) + " Archer(s) are allowed in this mode.");
2676+ team.screenMessage("Only " + Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F4X4) + " Archer(s) are allowed in this mode.");
2677+ return false;
2678+ }
2679+ if (team.getTankersCount() > Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F4X4))
2680+ {
2681+ team.sendMessage("Only " + Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F4X4) + " Tanker(s) are allowed in this mode.");
2682+ team.screenMessage("Only " + Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F4X4) + " Tanker(s) are allowed in this mode.");
2683+ return false;
2684+ }
2685+ if (team.getHealersCount() > Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F4X4))
2686+ {
2687+ team.sendMessage("Only " + Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F4X4) + " Healer(s) are allowed in this mode.");
2688+ team.screenMessage("Only " + Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F4X4) + " Healer(s) are allowed in this mode.");
2689+ return false;
2690+ }
2691+ if (team.getDaggersCount() > Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F4X4))
2692+ {
2693+ team.sendMessage("Only " + Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F4X4) + " Dagger(s) are allowed in this mode.");
2694+ team.screenMessage("Only " + Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F4X4) + " Dagger(s) are allowed in this mode.");
2695+ return false;
2696+ }
2697+
2698+ return true;
2699+ }
2700+
2701+ /**
2702+ * @return the fightType
2703+ */
2704+ public TournamentFightType getFightType()
2705+ {
2706+ return fightType;
2707+ }
2708+
2709+}
2710\ No newline at end of file
2711diff --git java/Base/Tournament/Matches/TournamentMatch5x5.java java/Base/Tournament/Matches/TournamentMatch5x5.java
2712new file mode 100644
2713index 0000000..49d14f7
2714--- /dev/null
2715+++ java/Base/Tournament/Matches/TournamentMatch5x5.java
2716@@ -0,0 +1,187 @@
2717+package Base.Tournament.Matches;
2718+
2719+import java.util.ArrayList;
2720+import java.util.List;
2721+import java.util.concurrent.ScheduledFuture;
2722+
2723+import net.sf.l2j.Config;
2724+import net.sf.l2j.gameserver.enums.actors.ClassId;
2725+
2726+import Base.Tournament.Enums.TournamentFightType;
2727+import Base.Tournament.Manager.TournamentManager;
2728+import Base.Tournament.Model.TournamentTeam;
2729+
2730+
2731+/**
2732+ * @author Rouxy
2733+ */
2734+public class TournamentMatch5x5 extends TournamentMatch
2735+{
2736+ private List<TournamentTeam> registeredTeams = new ArrayList<>();
2737+ private ScheduledFuture<?> searchFightsTask = null;
2738+ private final TournamentFightType fightType = TournamentFightType.F5X5;
2739+
2740+ public static TournamentMatch5x5 getInstance()
2741+ {
2742+ return SingleTonHolder._instance;
2743+ }
2744+
2745+ private static class SingleTonHolder
2746+ {
2747+ protected static TournamentMatch5x5 _instance = new TournamentMatch5x5();
2748+ }
2749+
2750+ @Override
2751+ public boolean register(TournamentTeam team)
2752+ {
2753+ try
2754+ {
2755+ TournamentManager.getInstance().getRegisteredTournamentTeams().put(team, TournamentFightType.F5X5);
2756+ return true;
2757+ }
2758+ catch (Exception e)
2759+ {
2760+
2761+ e.printStackTrace();
2762+ return false;
2763+ }
2764+ }
2765+
2766+ @Override
2767+ public boolean unRegister(TournamentTeam team)
2768+ {
2769+ try
2770+ {
2771+ TournamentManager.getInstance().getRegisteredTournamentTeams().remove(team);
2772+ return true;
2773+ }
2774+ catch (Exception e)
2775+ {
2776+
2777+ e.printStackTrace();
2778+ return false;
2779+ }
2780+ }
2781+
2782+ public ScheduledFuture<?> getSearchFightsTask()
2783+ {
2784+ return searchFightsTask;
2785+ }
2786+
2787+ public void setSearchFightsTask(ScheduledFuture<?> searchFightsTask)
2788+ {
2789+ this.searchFightsTask = searchFightsTask;
2790+ }
2791+
2792+ public List<TournamentTeam> getRegisteredTeams()
2793+ {
2794+ return registeredTeams;
2795+ }
2796+
2797+ public void setRegisteredTeams(List<TournamentTeam> registeredTeams)
2798+ {
2799+ this.registeredTeams = registeredTeams;
2800+ }
2801+
2802+ @Override
2803+ public boolean checkConditions(TournamentTeam team)
2804+ {
2805+
2806+ if (team.getMembers().size() != 5)
2807+ {
2808+ team.sendMessage("Your team must contains 5 players.");
2809+ team.screenMessage("Your team must contains 5 players.");
2810+ return false;
2811+ }
2812+ if (team.getCountOfClass(ClassId.DUELIST) > Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F5X5))
2813+ {
2814+ team.sendMessage("Only " + Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F5X5) + " Duelist(s) are allowed in this mode.");
2815+ team.screenMessage("Only " + Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F5X5) + " Duelist(s) are allowed in this mode.");
2816+ return false;
2817+ }
2818+ if (team.getCountOfClass(ClassId.ARCHMAGE) > Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F5X5))
2819+ {
2820+ team.sendMessage("Only " + Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F5X5) + " Archmage(s) are allowed in this mode.");
2821+ team.screenMessage("Only " + Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F5X5) + " Archmage(s) are allowed in this mode.");
2822+ return false;
2823+ }
2824+ if (team.getCountOfClass(ClassId.SOULTAKER) > Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F5X5))
2825+ {
2826+ team.sendMessage("Only " + Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F5X5) + " Soultaker(s) are allowed in this mode.");
2827+ team.screenMessage("Only " + Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F5X5) + " Soultaker(s) are allowed in this mode.");
2828+ return false;
2829+ }
2830+
2831+ if (team.getCountOfClass(ClassId.STORM_SCREAMER) > Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F5X5))
2832+ {
2833+ team.sendMessage("Only " + Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F5X5) + " Storm Screamer(s) are allowed in this mode.");
2834+ team.screenMessage("Only " + Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F5X5) + " Storm Screamer(s) are allowed in this mode.");
2835+ return false;
2836+ }
2837+ if (team.getCountOfClass(ClassId.MYSTIC_MUSE) > Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F5X5))
2838+ {
2839+ team.sendMessage("Only " + Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F5X5) + " Mystic Muse(s) are allowed in this mode.");
2840+ team.screenMessage("Only " + Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F5X5) + " Mystic Muse(s) are allowed in this mode.");
2841+ return false;
2842+ }
2843+ if (team.getCountOfClass(ClassId.TITAN) > Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F5X5))
2844+ {
2845+ team.sendMessage("Only " + Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F5X5) + " Titan(s) are allowed in this mode.");
2846+ team.screenMessage("Only " + Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F5X5) + " Titan(s) are allowed in this mode.");
2847+ return false;
2848+ }
2849+ if (team.getCountOfClass(ClassId.DOMINATOR) > Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F5X5))
2850+ {
2851+ team.sendMessage("Only " + Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F5X5) + " Dominator(s) are allowed in this mode.");
2852+ team.screenMessage("Only " + Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F5X5) + " Dominator(s) are allowed in this mode.");
2853+ return false;
2854+ }
2855+ if (team.getCountOfClass(ClassId.DOOMCRYER) > Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F5X5))
2856+ {
2857+ team.sendMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F5X5) + " Doomcryer(s) are allowed in this mode.");
2858+ team.screenMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F5X5) + " Doomcryer(s) are allowed in this mode.");
2859+ return false;
2860+ }
2861+ if (team.getCountOfClass(ClassId.DOOMCRYER) > Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F5X5))
2862+ {
2863+ team.sendMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F5X5) + " Doomcryer(s) are allowed in this mode.");
2864+ team.screenMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F5X5) + " Doomcryer(s) are allowed in this mode.");
2865+ return false;
2866+ }
2867+ if (team.getArchersCount() > Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F5X5))
2868+ {
2869+ team.sendMessage("Only " + Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F5X5) + " Archer(s) are allowed in this mode.");
2870+ team.screenMessage("Only " + Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F5X5) + " Archer(s) are allowed in this mode.");
2871+ return false;
2872+ }
2873+ if (team.getTankersCount() > Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F5X5))
2874+ {
2875+ team.sendMessage("Only " + Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F5X5) + " Tanker(s) are allowed in this mode.");
2876+ team.screenMessage("Only " + Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F5X5) + " Tanker(s) are allowed in this mode.");
2877+ return false;
2878+ }
2879+ if (team.getHealersCount() > Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F5X5))
2880+ {
2881+ team.sendMessage("Only " + Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F5X5) + " Healer(s) are allowed in this mode.");
2882+ team.screenMessage("Only " + Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F5X5) + " Healer(s) are allowed in this mode.");
2883+ return false;
2884+ }
2885+ if (team.getDaggersCount() > Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F5X5))
2886+ {
2887+ team.sendMessage("Only " + Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F5X5) + " Dagger(s) are allowed in this mode.");
2888+ team.screenMessage("Only " + Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F5X5) + " Dagger(s) are allowed in this mode.");
2889+ return false;
2890+ }
2891+
2892+ return true;
2893+ }
2894+
2895+ /**
2896+ * @return the fightType
2897+ */
2898+ public TournamentFightType getFightType()
2899+ {
2900+ return fightType;
2901+ }
2902+
2903+}
2904\ No newline at end of file
2905diff --git java/Base/Tournament/Matches/TournamentMatch9x9.java java/Base/Tournament/Matches/TournamentMatch9x9.java
2906new file mode 100644
2907index 0000000..ce03cd9
2908--- /dev/null
2909+++ java/Base/Tournament/Matches/TournamentMatch9x9.java
2910@@ -0,0 +1,187 @@
2911+package Base.Tournament.Matches;
2912+
2913+import java.util.ArrayList;
2914+import java.util.List;
2915+import java.util.concurrent.ScheduledFuture;
2916+
2917+import net.sf.l2j.Config;
2918+import net.sf.l2j.gameserver.enums.actors.ClassId;
2919+
2920+import Base.Tournament.Enums.TournamentFightType;
2921+import Base.Tournament.Manager.TournamentManager;
2922+import Base.Tournament.Model.TournamentTeam;
2923+
2924+
2925+/**
2926+ * @author Rouxy
2927+ */
2928+public class TournamentMatch9x9 extends TournamentMatch
2929+{
2930+ private List<TournamentTeam> registeredTeams = new ArrayList<>();
2931+ private ScheduledFuture<?> searchFightsTask = null;
2932+ private final TournamentFightType fightType = TournamentFightType.F9X9;
2933+
2934+ public static TournamentMatch9x9 getInstance()
2935+ {
2936+ return SingleTonHolder._instance;
2937+ }
2938+
2939+ private static class SingleTonHolder
2940+ {
2941+ protected static TournamentMatch9x9 _instance = new TournamentMatch9x9();
2942+ }
2943+
2944+ @Override
2945+ public boolean register(TournamentTeam team)
2946+ {
2947+ try
2948+ {
2949+ TournamentManager.getInstance().getRegisteredTournamentTeams().put(team, TournamentFightType.F9X9);
2950+ return true;
2951+ }
2952+ catch (Exception e)
2953+ {
2954+
2955+ e.printStackTrace();
2956+ return false;
2957+ }
2958+ }
2959+
2960+ @Override
2961+ public boolean unRegister(TournamentTeam team)
2962+ {
2963+ try
2964+ {
2965+ TournamentManager.getInstance().getRegisteredTournamentTeams().remove(team);
2966+ return true;
2967+ }
2968+ catch (Exception e)
2969+ {
2970+
2971+ e.printStackTrace();
2972+ return false;
2973+ }
2974+ }
2975+
2976+ public ScheduledFuture<?> getSearchFightsTask()
2977+ {
2978+ return searchFightsTask;
2979+ }
2980+
2981+ public void setSearchFightsTask(ScheduledFuture<?> searchFightsTask)
2982+ {
2983+ this.searchFightsTask = searchFightsTask;
2984+ }
2985+
2986+ public List<TournamentTeam> getRegisteredTeams()
2987+ {
2988+ return registeredTeams;
2989+ }
2990+
2991+ public void setRegisteredTeams(List<TournamentTeam> registeredTeams)
2992+ {
2993+ this.registeredTeams = registeredTeams;
2994+ }
2995+
2996+ @Override
2997+ public boolean checkConditions(TournamentTeam team)
2998+ {
2999+
3000+ if (team.getMembers().size() != 9)
3001+ {
3002+ team.sendMessage("Your team must contains 9 players.");
3003+ team.screenMessage("Your team must contains 9 players.");
3004+ return false;
3005+ }
3006+ if (team.getCountOfClass(ClassId.DUELIST) > Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F9X9))
3007+ {
3008+ team.sendMessage("Only " + Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F9X9) + " Duelist(s) are allowed in this mode.");
3009+ team.screenMessage("Only " + Config.TOURNAMENT_DUELIST_ALLOWED.get(TournamentFightType.F9X9) + " Duelist(s) are allowed in this mode.");
3010+ return false;
3011+ }
3012+ if (team.getCountOfClass(ClassId.ARCHMAGE) > Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F9X9))
3013+ {
3014+ team.sendMessage("Only " + Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F9X9) + " Archmage(s) are allowed in this mode.");
3015+ team.screenMessage("Only " + Config.TOURNAMENT_ARCHMAGE_ALLOWED.get(TournamentFightType.F9X9) + " Archmage(s) are allowed in this mode.");
3016+ return false;
3017+ }
3018+ if (team.getCountOfClass(ClassId.SOULTAKER) > Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F9X9))
3019+ {
3020+ team.sendMessage("Only " + Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F9X9) + " Soultaker(s) are allowed in this mode.");
3021+ team.screenMessage("Only " + Config.TOURNAMENT_SOULTAKER_ALLOWED.get(TournamentFightType.F9X9) + " Soultaker(s) are allowed in this mode.");
3022+ return false;
3023+ }
3024+
3025+ if (team.getCountOfClass(ClassId.STORM_SCREAMER) > Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F9X9))
3026+ {
3027+ team.sendMessage("Only " + Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F9X9) + " Storm Screamer(s) are allowed in this mode.");
3028+ team.screenMessage("Only " + Config.TOURNAMENT_STORMSCREAMER_ALLOWED.get(TournamentFightType.F9X9) + " Storm Screamer(s) are allowed in this mode.");
3029+ return false;
3030+ }
3031+ if (team.getCountOfClass(ClassId.MYSTIC_MUSE) > Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F9X9))
3032+ {
3033+ team.sendMessage("Only " + Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F9X9) + " Mystic Muse(s) are allowed in this mode.");
3034+ team.screenMessage("Only " + Config.TOURNAMENT_MYSTICMUSE_ALLOWED.get(TournamentFightType.F9X9) + " Mystic Muse(s) are allowed in this mode.");
3035+ return false;
3036+ }
3037+ if (team.getCountOfClass(ClassId.TITAN) > Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F9X9))
3038+ {
3039+ team.sendMessage("Only " + Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F9X9) + " Titan(s) are allowed in this mode.");
3040+ team.screenMessage("Only " + Config.TOURNAMENT_TITAN_ALLOWED.get(TournamentFightType.F9X9) + " Titan(s) are allowed in this mode.");
3041+ return false;
3042+ }
3043+ if (team.getCountOfClass(ClassId.DOMINATOR) > Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F9X9))
3044+ {
3045+ team.sendMessage("Only " + Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F9X9) + " Dominator(s) are allowed in this mode.");
3046+ team.screenMessage("Only " + Config.TOURNAMENT_DOMINATOR_ALLOWED.get(TournamentFightType.F9X9) + " Dominator(s) are allowed in this mode.");
3047+ return false;
3048+ }
3049+ if (team.getCountOfClass(ClassId.DOOMCRYER) > Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F9X9))
3050+ {
3051+ team.sendMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F9X9) + " Doomcryer(s) are allowed in this mode.");
3052+ team.screenMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F9X9) + " Doomcryer(s) are allowed in this mode.");
3053+ return false;
3054+ }
3055+ if (team.getCountOfClass(ClassId.DOOMCRYER) > Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F9X9))
3056+ {
3057+ team.sendMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F9X9) + " Doomcryer(s) are allowed in this mode.");
3058+ team.screenMessage("Only " + Config.TOURNAMENT_DOOMCRYER_ALLOWED.get(TournamentFightType.F9X9) + " Doomcryer(s) are allowed in this mode.");
3059+ return false;
3060+ }
3061+ if (team.getArchersCount() > Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F9X9))
3062+ {
3063+ team.sendMessage("Only " + Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F9X9) + " Archer(s) are allowed in this mode.");
3064+ team.screenMessage("Only " + Config.TOURNAMENT_ARCHER_ALLOWED.get(TournamentFightType.F9X9) + " Archer(s) are allowed in this mode.");
3065+ return false;
3066+ }
3067+ if (team.getTankersCount() > Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F9X9))
3068+ {
3069+ team.sendMessage("Only " + Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F9X9) + " Tanker(s) are allowed in this mode.");
3070+ team.screenMessage("Only " + Config.TOURNAMENT_TANKER_ALLOWED.get(TournamentFightType.F9X9) + " Tanker(s) are allowed in this mode.");
3071+ return false;
3072+ }
3073+ if (team.getHealersCount() > Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F9X9))
3074+ {
3075+ team.sendMessage("Only " + Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F9X9) + " Healer(s) are allowed in this mode.");
3076+ team.screenMessage("Only " + Config.TOURNAMENT_HEALER_ALLOWED.get(TournamentFightType.F9X9) + " Healer(s) are allowed in this mode.");
3077+ return false;
3078+ }
3079+ if (team.getDaggersCount() > Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F9X9))
3080+ {
3081+ team.sendMessage("Only " + Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F9X9) + " Dagger(s) are allowed in this mode.");
3082+ team.screenMessage("Only " + Config.TOURNAMENT_DAGGER_ALLOWED.get(TournamentFightType.F9X9) + " Dagger(s) are allowed in this mode.");
3083+ return false;
3084+ }
3085+
3086+ return true;
3087+ }
3088+
3089+ /**
3090+ * @return the fightType
3091+ */
3092+ public TournamentFightType getFightType()
3093+ {
3094+ return fightType;
3095+ }
3096+
3097+}
3098\ No newline at end of file
3099diff --git java/Base/Tournament/Model/TournamentArena.java java/Base/Tournament/Model/TournamentArena.java
3100new file mode 100644
3101index 0000000..c10b68c
3102--- /dev/null
3103+++ java/Base/Tournament/Model/TournamentArena.java
3104@@ -0,0 +1,78 @@
3105+package Base.Tournament.Model;
3106+
3107+import java.util.ArrayList;
3108+import java.util.List;
3109+
3110+import net.sf.l2j.commons.data.StatSet;
3111+
3112+import net.sf.l2j.gameserver.model.location.Location;
3113+
3114+import Base.Tournament.Enums.TournamentFightType;
3115+
3116+/**
3117+ * @author Rouxy
3118+ */
3119+
3120+public class TournamentArena
3121+{
3122+ private final int id;
3123+ private List<Location> teamOneLocation = new ArrayList<>();
3124+ private List<Location> teamTwoLocation = new ArrayList<>();
3125+ private int time;
3126+
3127+ private final List<TournamentFightType> types = new ArrayList<>();
3128+
3129+ public TournamentArena(StatSet set, List<Location> teamOneLocation, List<Location> teamTwoLocation)
3130+ {
3131+ String fTypes = set.getString("types");
3132+ for (String type : fTypes.split(";"))
3133+ {
3134+ if (TournamentFightType.valueOf(type) != null)
3135+ types.add(TournamentFightType.valueOf(type));
3136+ }
3137+ id = set.getInteger("id");
3138+ this.teamOneLocation = teamOneLocation;
3139+ this.teamTwoLocation = teamTwoLocation;
3140+ }
3141+
3142+ public List<Location> getTeamOneLocation()
3143+ {
3144+ return teamOneLocation;
3145+ }
3146+
3147+ public void setTeamOneLocation(List<Location> teamOneLocation)
3148+ {
3149+ this.teamOneLocation = teamOneLocation;
3150+ }
3151+
3152+ public List<Location> getTeamTwoLocation()
3153+ {
3154+ return teamTwoLocation;
3155+ }
3156+
3157+ public void setTeamTwoLocation(List<Location> teamTwoLocation)
3158+ {
3159+ this.teamTwoLocation = teamTwoLocation;
3160+ }
3161+
3162+ public int getTime()
3163+ {
3164+ return time;
3165+ }
3166+
3167+ public void setTime(int time)
3168+ {
3169+ this.time = time;
3170+ }
3171+
3172+ public int getId()
3173+ {
3174+ return id;
3175+ }
3176+
3177+ public List<TournamentFightType> getTypes()
3178+ {
3179+ return types;
3180+ }
3181+
3182+}
3183\ No newline at end of file
3184diff --git java/Base/Tournament/Model/TournamentTeam.java java/Base/Tournament/Model/TournamentTeam.java
3185new file mode 100644
3186index 0000000..f8e5acd
3187--- /dev/null
3188+++ java/Base/Tournament/Model/TournamentTeam.java
3189@@ -0,0 +1,458 @@
3190+package Base.Tournament.Model;
3191+
3192+import java.util.ArrayList;
3193+import java.util.List;
3194+
3195+import net.sf.l2j.Config;
3196+import net.sf.l2j.gameserver.enums.LootRule;
3197+import net.sf.l2j.gameserver.enums.MessageType;
3198+import net.sf.l2j.gameserver.enums.actors.ClassId;
3199+import net.sf.l2j.gameserver.model.actor.Player;
3200+
3201+
3202+import net.sf.l2j.gameserver.model.group.Party;
3203+import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
3204+import net.sf.l2j.util.RewardHolder;
3205+
3206+import Base.Instance.InstanceManager;
3207+import Base.Tournament.Enums.TournamentFightType;
3208+import Base.Tournament.Manager.TournamentManager;
3209+
3210+/**
3211+ * @author Rouxy
3212+ */
3213+public class TournamentTeam
3214+{
3215+ private Player leader;
3216+ private Player target;
3217+ private List<Player> members = new ArrayList<>();
3218+ private Party party;
3219+ private int teamFightId;
3220+
3221+ public TournamentTeam(Player leader, Player target)
3222+ {
3223+ this.leader = leader;
3224+ this.target = target;
3225+
3226+ members.add(0, leader);
3227+ leader.setTournamentTeam(this);
3228+ leader.sendMessage("Your Tournament fight has been created.");
3229+
3230+ if (target != null)
3231+ {
3232+ leader.sendMessage(target.getName() + " entered your Tournament Team.");
3233+ target.sendMessage(leader.getName() + " entered your Tournament Team.");
3234+ members.add(1, target);
3235+ target.setTournamentTeam(this);
3236+
3237+ }
3238+
3239+ }
3240+
3241+ public List<Player> getMembers()
3242+ {
3243+ return members;
3244+ }
3245+
3246+ public void setMembers(List<Player> members)
3247+ {
3248+ this.members = members;
3249+ }
3250+
3251+ public Player getLeader()
3252+ {
3253+ return leader;
3254+ }
3255+
3256+ public void setLeader(Player leader)
3257+ {
3258+ this.leader = leader;
3259+ }
3260+
3261+ public Player getTarget()
3262+ {
3263+ return target;
3264+ }
3265+
3266+ public void setTarget(Player target)
3267+ {
3268+ this.target = target;
3269+ }
3270+
3271+ public void sendMessage(String text)
3272+ {
3273+ for (Player player : getMembers())
3274+ {
3275+
3276+ player.sendMessage("[Tournament]: " + text);
3277+
3278+ }
3279+ }
3280+
3281+ public void screenMessage(String text)
3282+ {
3283+ for (Player player : getMembers())
3284+ {
3285+
3286+ player.sendPacket(new ExShowScreenMessage("[Tournament]: " + text, 4000));
3287+
3288+ }
3289+ }
3290+
3291+ public String getName()
3292+ {
3293+ return leader.getName() + "'s Team";
3294+ }
3295+
3296+ public void addMember(Player player)
3297+ {
3298+ if (player == null || getMembers().contains(player))
3299+ return;
3300+
3301+ getMembers().add(player);
3302+ player.setTournamentTeam(this);
3303+ player.sendMessage("You entered " + leader.getName() + "'s Tournament Team.");
3304+ sendMessage("Player " + player.getName() + " joined your Tournament Team.");
3305+
3306+ }
3307+
3308+ public Party getParty()
3309+ {
3310+ return party;
3311+ }
3312+
3313+ public void setParty(Party party)
3314+ {
3315+ this.party = party;
3316+ }
3317+
3318+ public int getCountOfClass(ClassId classId)
3319+ {
3320+ int count = 0;
3321+ for (Player player : getMembers())
3322+ {
3323+ if (player.getClassId() == classId)
3324+ {
3325+ count++;
3326+ }
3327+ }
3328+ return count;
3329+ }
3330+
3331+ public int getHealersCount()
3332+ {
3333+ int count = 0;
3334+ for (Player player : getMembers())
3335+ {
3336+ if (player.getClassId().isHealer())
3337+ {
3338+ count++;
3339+ }
3340+ }
3341+ return count;
3342+
3343+ }
3344+
3345+ public int getTankersCount()
3346+ {
3347+ int count = 0;
3348+ for (Player player : getMembers())
3349+ {
3350+ if (player.getClassId().isTanker())
3351+ {
3352+ count++;
3353+ }
3354+ }
3355+ return count;
3356+
3357+ }
3358+
3359+ public int getDaggersCount()
3360+ {
3361+ int count = 0;
3362+ for (Player player : getMembers())
3363+ {
3364+ if (player.getClassId().isDagger())
3365+ {
3366+ count++;
3367+ }
3368+ }
3369+ return count;
3370+
3371+ }
3372+
3373+ public int getArchersCount()
3374+ {
3375+ int count = 0;
3376+ for (Player player : getMembers())
3377+ {
3378+ if (player.getClassId().isArcher())
3379+ {
3380+ count++;
3381+ }
3382+ }
3383+ return count;
3384+
3385+ }
3386+
3387+ public void setInTournamentMatch(boolean val)
3388+ {
3389+ for (Player player : getMembers())
3390+ {
3391+ player.setInTournamentMatch(val);
3392+ }
3393+ }
3394+
3395+ public void setFightId(int id)
3396+ {
3397+ for (Player player : getMembers())
3398+ {
3399+ player.setTournamentFightId(id);
3400+ }
3401+ teamFightId = id;
3402+ }
3403+
3404+ public void paralyze()
3405+ {
3406+ for (Player player : getMembers())
3407+ {
3408+ player.setTarget(null);
3409+ player.setInvul(true);
3410+ player.setIsParalyzed(true);
3411+ player.broadcastUserInfo();
3412+ }
3413+ }
3414+
3415+ public void unparalyze()
3416+ {
3417+ for (Player player : getMembers())
3418+ {
3419+ player.setTarget(null);
3420+ player.setInvul(false);
3421+ player.setIsParalyzed(false);
3422+ player.broadcastUserInfo();
3423+
3424+ }
3425+ }
3426+
3427+ public boolean teamIsDefeated()
3428+ {
3429+ for (Player player : getMembers())
3430+ {
3431+ if (!player.isDead())
3432+ {
3433+ return false;
3434+ }
3435+ }
3436+ return true;
3437+ }
3438+
3439+ public int getAliveMembers()
3440+ {
3441+ int count = 0;
3442+ for (Player player : getMembers())
3443+ {
3444+ if (player.isDead())
3445+ continue;
3446+ else
3447+ count++;
3448+ }
3449+ return count;
3450+ }
3451+
3452+ public void reward(boolean winner)
3453+ {
3454+ String text = winner ? "Your team have won the Tournament Battle! =D" : "Your team lost won the Tournament Battle! =(";
3455+ screenMessage(text);
3456+ sendMessage(text);
3457+ for (Player player : getMembers())
3458+ {
3459+
3460+ for (RewardHolder reward : winner ? Config.TOURNAMENT_FIGHT_REWARD_WINNER : Config.TOURNAMENT_FIGHT_REWARD_LOOSER)
3461+ {
3462+ player.addItem("TournamentReward", reward.getItemId(), reward.getCount(), player, true);
3463+ }
3464+ }
3465+
3466+ }
3467+
3468+ public void teleportBack()
3469+ {
3470+ for (Player player : getMembers())
3471+ {
3472+ player.teleportTo(player.getLastX(), player.getLastY(), player.getLastZ(), 0);
3473+ }
3474+ }
3475+
3476+ public void removeTournamentTeam()
3477+ {
3478+ TournamentManager.getInstance().getRegisteredTournamentTeams().remove(this);
3479+ }
3480+
3481+ public void setTournamentFightType(TournamentFightType type)
3482+ {
3483+ for (Player player : getMembers())
3484+ {
3485+ player.setTournamentFightType(type);
3486+ }
3487+ }
3488+
3489+ public void removeMember(Player member)
3490+ {
3491+
3492+ if (!getMembers().contains(member))
3493+ return;
3494+ member.setTournamentFightId(0);
3495+ member.setTournamentFightType(TournamentFightType.NONE);
3496+ member.setTournamentTeam(null);
3497+ member.setTournamentTeamBeingInvited(false);
3498+ member.sendMessage("Your tournament Team has dispersed.");
3499+ if (party != null)
3500+ party.removePartyMember(member, MessageType.LEFT);
3501+ members.remove(member);
3502+ if (members.size() < 1)
3503+ {
3504+ disbandTeam();
3505+ }
3506+ }
3507+
3508+ public void prepareToFight()
3509+ {
3510+ // first disband a possible old party
3511+ Party party = null;
3512+ for (Player player : getMembers())
3513+ {
3514+ if (player.isInParty())
3515+ {
3516+ player.getParty().disband();
3517+ }
3518+ }
3519+ if (getMembers().size() > 1)
3520+ {
3521+ party = new Party(leader, getMembers().get(1), LootRule.ITEM_LOOTER);
3522+ }
3523+ for (Player player : getMembers())
3524+ {
3525+ if (party != null && !player.isInParty())
3526+ {
3527+ party.addPartyMember(player);
3528+ }
3529+ // revive dead players
3530+ if (player.isDead())
3531+ {
3532+ player.doRevive();
3533+ }
3534+ // heal players
3535+ player.getStatus().setCpHpMp(player.getStatus().getMaxCp(), player.getStatus().getMaxHp(), player.getStatus().getMaxMp());
3536+
3537+ // reset tournament match damages
3538+ player.setTournamentMatchDamage(0);
3539+ }
3540+
3541+ }
3542+
3543+ public void resetTeamMatchDamage()
3544+ {
3545+ for (Player player : getMembers())
3546+ {
3547+ player.setTournamentMatchDamage(0);
3548+ }
3549+ }
3550+
3551+ public void backInstance()
3552+ {
3553+ for (Player player : getMembers())
3554+ {
3555+ player.setInstance(InstanceManager.getInstance().getInstance(0), true);
3556+
3557+ }
3558+ }
3559+
3560+ public void doRevive()
3561+ {
3562+
3563+ for (Player player : getMembers())
3564+ {
3565+
3566+ player.doRevive();
3567+ player.getStatus().setCpHpMp(player.getStatus().getMaxCp(), player.getStatus().getMaxHp(), player.getStatus().getMaxMp());
3568+ }
3569+ }
3570+
3571+ public void disbandTeam()
3572+ {
3573+ if (TournamentManager.getInstance().getRegisteredTournamentTeams().containsKey(this))
3574+ {
3575+ TournamentManager.getInstance().getRegisteredTournamentTeams().remove(this);
3576+ }
3577+ for (Player member : getMembers())
3578+ {
3579+ member.setTournamentFightId(0);
3580+ member.setTournamentFightType(TournamentFightType.NONE);
3581+ member.setTournamentTeam(null);
3582+ member.setTournamentTeamBeingInvited(false);
3583+ member.sendMessage("Your tournament Team has dispersed.");
3584+ }
3585+ if (getParty() != null)
3586+ getParty().disband();
3587+ setParty(null);
3588+ }
3589+
3590+ public int getFightId()
3591+ {
3592+ return teamFightId;
3593+ }
3594+
3595+ public void setTeamFightId(int id)
3596+ {
3597+ teamFightId = id;
3598+ }
3599+
3600+ public boolean isLeader(Player player)
3601+ {
3602+ return player == leader;
3603+ }
3604+
3605+ public int getTotalDamage()
3606+ {
3607+ int damage = 0;
3608+ for (Player member : getMembers())
3609+ {
3610+ damage += member.getTournamentMatchDamage();
3611+ }
3612+ return damage;
3613+ }
3614+
3615+ public void addTeamDefeat(TournamentFightType type)
3616+ {
3617+ for (Player member : getMembers())
3618+ {
3619+ member.addTournamentDefeat(type);
3620+ }
3621+ }
3622+
3623+ public void addTeamVictory(TournamentFightType type)
3624+ {
3625+ for (Player member : getMembers())
3626+ {
3627+ member.addTournamentVictory(type);
3628+ }
3629+ }
3630+
3631+ public void addTeamTie(TournamentFightType type)
3632+ {
3633+ for (Player member : getMembers())
3634+ {
3635+ member.addTournamentTie(type);
3636+ }
3637+ }
3638+
3639+ public void addTotalDamageToPlayers(TournamentFightType type)
3640+ {
3641+ for (Player member : getMembers())
3642+ {
3643+ member.addTournamentDamage(type, member.getTournamentMatchDamage());
3644+ }
3645+ }
3646+
3647+}
3648\ No newline at end of file
3649diff --git java/Base/Tournament/Task/OutOfTheZoneTask.java java/Base/Tournament/Task/OutOfTheZoneTask.java
3650new file mode 100644
3651index 0000000..b3be70a
3652--- /dev/null
3653+++ java/Base/Tournament/Task/OutOfTheZoneTask.java
3654@@ -0,0 +1,135 @@
3655+package Base.Tournament.Task;
3656+
3657+import net.sf.l2j.gameserver.enums.ZoneId;
3658+import net.sf.l2j.gameserver.model.actor.Player;
3659+
3660+import Base.Tournament.Manager.TournamentManager;
3661+import Base.Tournament.Model.TournamentTeam;
3662+
3663+
3664+/**
3665+ * @author Rouxy
3666+ */
3667+public class OutOfTheZoneTask implements Runnable
3668+{
3669+ private TournamentTeam teamOne;
3670+ private int teamOneOutSideTimes;
3671+ private TournamentTeam teamTwo;
3672+ private int teamTwoOutSideTimes;
3673+
3674+ public OutOfTheZoneTask(TournamentTeam teamOne, TournamentTeam teamTwo)
3675+ {
3676+ this.teamOne = teamOne;
3677+ this.teamTwo = teamTwo;
3678+ }
3679+
3680+ public boolean isOutOfTheZone(TournamentTeam team)
3681+ {
3682+ for (Player member : team.getMembers())
3683+ {
3684+ if (member == null)
3685+ {
3686+ return true;
3687+ }
3688+ if (!member.isInsideZone(ZoneId.TOURNAMENT))
3689+ {
3690+ team.sendMessage(member.getName() + " is out side of the zone. Return to zone or lose battle.");
3691+ return true;
3692+ }
3693+
3694+ }
3695+ return false;
3696+ }
3697+
3698+ @Override
3699+ public void run()
3700+ {
3701+
3702+ if (teamOne.getFightId() != 0 && teamTwo.getFightId() != 0 && teamOne.getFightId() == teamTwo.getFightId())
3703+ {
3704+ TournamentFight fight = TournamentManager.getInstance().getCurrentFights().get(teamOne.getFightId());
3705+ if (fight != null && fight.isStarted())
3706+ {
3707+ if (isOutOfTheZone(teamOne))
3708+ teamOneOutSideTimes++;
3709+ else
3710+ teamOneOutSideTimes = 0;
3711+ if (isOutOfTheZone(teamTwo))
3712+ teamTwoOutSideTimes++;
3713+ else
3714+ teamTwoOutSideTimes = 0;
3715+
3716+ if (teamOneOutSideTimes >= 10)
3717+ fight.finish(teamTwo);
3718+ if (teamTwoOutSideTimes >= 10)
3719+ fight.finish(teamOne);
3720+ }
3721+ }
3722+
3723+ }
3724+
3725+ /**
3726+ * @return the teamOne
3727+ */
3728+ public TournamentTeam getTeamOne()
3729+ {
3730+ return teamOne;
3731+ }
3732+
3733+ /**
3734+ * @param teamOne the teamOne to set
3735+ */
3736+ public void setTeamOne(TournamentTeam teamOne)
3737+ {
3738+ this.teamOne = teamOne;
3739+ }
3740+
3741+ /**
3742+ * @return the teamTwo
3743+ */
3744+ public TournamentTeam getTeamTwo()
3745+ {
3746+ return teamTwo;
3747+ }
3748+
3749+ /**
3750+ * @param teamTwo the teamTwo to set
3751+ */
3752+ public void setTeamTwo(TournamentTeam teamTwo)
3753+ {
3754+ this.teamTwo = teamTwo;
3755+ }
3756+
3757+ /**
3758+ * @return the teamOneOutSideTimes
3759+ */
3760+ public int getTeamOneOutSideTimes()
3761+ {
3762+ return teamOneOutSideTimes;
3763+ }
3764+
3765+ /**
3766+ * @param teamOneOutSideTimes the teamOneOutSideTimes to set
3767+ */
3768+ public void setTeamOneOutSideTimes(int teamOneOutSideTimes)
3769+ {
3770+ this.teamOneOutSideTimes = teamOneOutSideTimes;
3771+ }
3772+
3773+ /**
3774+ * @return the teamTwoOutSideTimes
3775+ */
3776+ public int getTeamTwoOutSideTimes()
3777+ {
3778+ return teamTwoOutSideTimes;
3779+ }
3780+
3781+ /**
3782+ * @param teamTwoOutSideTimes the teamTwoOutSideTimes to set
3783+ */
3784+ public void setTeamTwoOutSideTimes(int teamTwoOutSideTimes)
3785+ {
3786+ this.teamTwoOutSideTimes = teamTwoOutSideTimes;
3787+ }
3788+
3789+}
3790\ No newline at end of file
3791diff --git java/Base/Tournament/Task/TournamentFight.java java/Base/Tournament/Task/TournamentFight.java
3792new file mode 100644
3793index 0000000..5e90a5f
3794--- /dev/null
3795+++ java/Base/Tournament/Task/TournamentFight.java
3796@@ -0,0 +1,442 @@
3797+package Base.Tournament.Task;
3798+
3799+import java.util.concurrent.ScheduledFuture;
3800+
3801+import net.sf.l2j.Config;
3802+import net.sf.l2j.commons.pool.ThreadPool;
3803+import net.sf.l2j.gameserver.model.actor.Player;
3804+
3805+
3806+import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
3807+import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage.SMPOS;
3808+
3809+import Base.Instance.Instance;
3810+import Base.Tournament.Enums.TournamentFightType;
3811+import Base.Tournament.Manager.TournamentManager;
3812+import Base.Tournament.Model.TournamentArena;
3813+import Base.Tournament.Model.TournamentTeam;
3814+
3815+/**
3816+ * @author Zaun
3817+ */
3818+public class TournamentFight
3819+{
3820+ private TournamentFightType fightType = TournamentFightType.NONE;
3821+ private Instance instance = null;
3822+
3823+ private TournamentArena tournamentArena;
3824+ private TournamentTeam teamOne;
3825+ private TournamentTeam teamTwo;
3826+ private int id;
3827+ private ScheduledFuture<?> finishTask = null;
3828+ private ScheduledFuture<?> timer = null;
3829+ private long fightBeginTime;
3830+ private ScheduledFuture<?> outOfTheZoneTask = null;
3831+ private boolean started;
3832+
3833+ public TournamentFight(int id, TournamentFightType fightType, Instance instance, TournamentTeam teamOne, TournamentTeam teamTwo, TournamentArena tournamentArena)
3834+ {
3835+
3836+ this.fightType = fightType;
3837+ this.id = id;
3838+ this.instance = instance;
3839+ this.teamOne = teamOne;
3840+ this.teamTwo = teamTwo;
3841+ this.tournamentArena = tournamentArena;
3842+
3843+ teamOne.setInTournamentMatch(true);
3844+ teamOne.setFightId(id);
3845+ teamOne.setTournamentFightType(fightType);
3846+ teamOne.screenMessage("Match found! You will be teleported in: " + Config.TOURNAMENT_TIME_TO_TELEPORT + " seconds.");
3847+ teamOne.screenMessage("Match found! You will be teleported in: " + Config.TOURNAMENT_TIME_TO_TELEPORT + " seconds.");
3848+ teamOne.prepareToFight();
3849+
3850+ teamTwo.setInTournamentMatch(true);
3851+ teamTwo.setFightId(id);
3852+ teamTwo.setTournamentFightType(fightType);
3853+ teamTwo.screenMessage("Match found! You will be teleported in: " + Config.TOURNAMENT_TIME_TO_TELEPORT + " seconds.");
3854+ teamTwo.screenMessage("Match found! You will be teleported in: " + Config.TOURNAMENT_TIME_TO_TELEPORT + " seconds.");
3855+ teamTwo.prepareToFight();
3856+
3857+ fightBeginTime = System.currentTimeMillis();
3858+ TournamentManager.getInstance().getCurrentFights().put(id, this);
3859+ TournamentManager.getInstance().setAllTimeFights(TournamentManager.getInstance().getAllTimeFights() + 1);
3860+ ThreadPool.schedule(new TournamentTeleport(this, tournamentArena, teamOne, teamTwo), Config.TOURNAMENT_TIME_TO_TELEPORT * 1000);
3861+ finishTask = ThreadPool.schedule(new FinishFight(), (Config.TOURNAMENT_FIGHT_DURATION.get(fightType)) * 60 * 1000 + (Config.TOURNAMENT_TIME_TO_TELEPORT + Config.TOURNAMENT_FIGHT_START_TIME.get(fightType) * 1000));
3862+ timer = ThreadPool.scheduleAtFixedRate(new Timer(), 1000, 1010);
3863+ setOutOfTheZoneTask(ThreadPool.scheduleAtFixedRate(new OutOfTheZoneTask(teamOne, teamTwo), 0, 1000));
3864+
3865+ }
3866+
3867+ class Timer implements Runnable
3868+ {
3869+
3870+ @Override
3871+ public void run()
3872+ {
3873+ if (isStarted())
3874+ broadCastTimer();
3875+ }
3876+
3877+ }
3878+
3879+ public void broadCastTimer()
3880+ {
3881+ int secondsLeft = (int) (((fightBeginTime + (1000 * 60 * Config.TOURNAMENT_FIGHT_DURATION.get(fightType) + (Config.TOURNAMENT_TIME_TO_TELEPORT + Config.TOURNAMENT_FIGHT_START_TIME.get(fightType) * 1000))) - System.currentTimeMillis()) / 1000);
3882+ int minutes = secondsLeft / 60;
3883+ int seconds = secondsLeft % 60;
3884+ ExShowScreenMessage packet = new ExShowScreenMessage(String.format("%02d:%02d", minutes, seconds), 1010, SMPOS.BOTTOM_RIGHT, false);
3885+ for (Player player : teamOne.getMembers())
3886+ player.sendPacket(packet);
3887+ for (Player player : teamTwo.getMembers())
3888+ player.sendPacket(packet);
3889+ }
3890+
3891+ private class FinishFight implements Runnable
3892+ {
3893+
3894+ @Override
3895+ public void run()
3896+ {
3897+
3898+ finish();
3899+ }
3900+
3901+ }
3902+
3903+ class TeleportBack implements Runnable
3904+ {
3905+ TournamentTeam team;
3906+
3907+ public TeleportBack(TournamentTeam team)
3908+ {
3909+ this.team = team;
3910+ }
3911+
3912+ @Override
3913+ public void run()
3914+ {
3915+ team.doRevive();
3916+ team.teleportBack();
3917+ team.backInstance();
3918+ }
3919+
3920+ }
3921+
3922+ public void finish()
3923+ {
3924+ try
3925+ {
3926+ if (getWinner() != null)
3927+ {
3928+ // reward victorious team
3929+ getWinner().reward(true);
3930+ // store +1 victory
3931+ getWinner().addTeamVictory(fightType);
3932+
3933+ if (getLooser() != null)
3934+ {
3935+ // reward looser team
3936+ getLooser().reward(false);
3937+ getLooser().addTeamDefeat(fightType);
3938+
3939+ }
3940+
3941+ }
3942+ else
3943+ {
3944+ teamOne.screenMessage("Fight ended in a tie!");
3945+ teamTwo.screenMessage("Fight ended in a tie!");
3946+ teamOne.addTeamTie(fightType);
3947+ teamTwo.addTeamTie(fightType);
3948+ }
3949+
3950+ // both teams code below
3951+
3952+ // Team One
3953+ teamOne.addTotalDamageToPlayers(fightType);
3954+ teamOne.resetTeamMatchDamage(); // reset damage
3955+ teamOne.setInTournamentMatch(false);
3956+ teamOne.setFightId(0);
3957+ ThreadPool.schedule(new TeleportBack(teamOne), 5000);
3958+ teamOne.removeTournamentTeam();
3959+ teamOne.setTournamentFightType(TournamentFightType.NONE);
3960+ // store fight
3961+ store(teamOne);
3962+
3963+ // Team Two
3964+ teamTwo.addTotalDamageToPlayers(fightType);
3965+ teamTwo.resetTeamMatchDamage();// reset damage
3966+ teamTwo.setInTournamentMatch(false);
3967+ teamTwo.setFightId(0);
3968+ ThreadPool.schedule(new TeleportBack(teamTwo), 5000);
3969+ teamTwo.removeTournamentTeam();
3970+ teamTwo.setTournamentFightType(TournamentFightType.NONE);
3971+ // store fight
3972+ store(teamTwo);
3973+
3974+ TournamentManager.getInstance().getCurrentFights().remove(id);
3975+
3976+ // cancel tasks
3977+ if (finishTask != null)
3978+ {
3979+ finishTask.cancel(true);
3980+ finishTask = null;
3981+ }
3982+
3983+ if (timer != null)
3984+ {
3985+ timer.cancel(true);
3986+ timer = null;
3987+ }
3988+
3989+ if (outOfTheZoneTask != null)
3990+ {
3991+ outOfTheZoneTask.cancel(true);
3992+ outOfTheZoneTask = null;
3993+ }
3994+
3995+ }
3996+ catch (Exception e)
3997+ {
3998+ TournamentManager.getInstance().debugInfo("[Tournament Fight]: Could not finish a fight: ");
3999+ e.printStackTrace();
4000+ }
4001+
4002+ }
4003+
4004+ public void finish(TournamentTeam winner)
4005+ {
4006+ try
4007+ {
4008+ TournamentTeam looser = null;
4009+ if (winner != null)
4010+ {
4011+ if (winner == teamOne)
4012+ {
4013+ looser = teamTwo;
4014+
4015+ }
4016+ else
4017+ {
4018+ looser = teamOne;
4019+ }
4020+ // reward victorious team
4021+ winner.reward(true);
4022+ // store +1 victory
4023+ winner.addTeamVictory(fightType);
4024+
4025+ }
4026+ if (looser != null)
4027+ {
4028+ looser.reward(false);
4029+ // reward looser team
4030+ looser.reward(false);
4031+ looser.addTeamDefeat(fightType);
4032+ }
4033+
4034+ winner.sendMessage("Your team has won the battle because, players of enemy team were out of tournament zone.");
4035+ looser.sendMessage("Your team has lost the battle because, players of your team were out of tournament zone.");
4036+
4037+ // both teams code below
4038+
4039+ // Team One
4040+ teamOne.addTotalDamageToPlayers(fightType);
4041+ teamOne.resetTeamMatchDamage(); // reset damage
4042+ teamOne.setInTournamentMatch(false);
4043+ teamOne.setFightId(0);
4044+ ThreadPool.schedule(new TeleportBack(teamOne), 5000);
4045+ teamOne.removeTournamentTeam();
4046+ teamOne.setTournamentFightType(TournamentFightType.NONE);
4047+ // store fight
4048+ store(teamOne);
4049+
4050+ // Team Two
4051+ teamTwo.addTotalDamageToPlayers(fightType);
4052+ teamTwo.resetTeamMatchDamage();// reset damage
4053+ teamTwo.setInTournamentMatch(false);
4054+ teamTwo.setFightId(0);
4055+ ThreadPool.schedule(new TeleportBack(teamTwo), 5000);
4056+ teamTwo.removeTournamentTeam();
4057+ teamTwo.setTournamentFightType(TournamentFightType.NONE);
4058+ // store fight
4059+ store(teamTwo);
4060+
4061+ TournamentManager.getInstance().getCurrentFights().remove(id);
4062+
4063+ // cancel tasks
4064+ if (finishTask != null)
4065+ {
4066+ finishTask.cancel(true);
4067+ finishTask = null;
4068+ }
4069+
4070+ if (timer != null)
4071+ {
4072+ timer.cancel(true);
4073+ timer = null;
4074+ }
4075+
4076+ if (outOfTheZoneTask != null)
4077+ {
4078+ outOfTheZoneTask.cancel(true);
4079+ outOfTheZoneTask = null;
4080+ }
4081+
4082+ }
4083+ catch (Exception e)
4084+ {
4085+ TournamentManager.getInstance().debugInfo("[Tournament Fight]: Could not finish a fight: ");
4086+ e.printStackTrace();
4087+ }
4088+
4089+ }
4090+
4091+ public TournamentTeam getLooser()
4092+ {
4093+ if (getWinner() != null)
4094+ {
4095+ if (getWinner() == teamOne)
4096+ {
4097+ return teamTwo;
4098+ }
4099+ else if (getWinner() == teamTwo)
4100+ {
4101+ return teamOne;
4102+ }
4103+ }
4104+ return null;
4105+ }
4106+
4107+ public TournamentTeam getWinner()
4108+ {
4109+ int teamOneLive = teamOne.getAliveMembers();
4110+ int teamTwoLive = teamTwo.getAliveMembers();
4111+ if (teamOneLive > teamTwoLive)
4112+ {
4113+ return teamOne;
4114+ }
4115+ else if (teamTwoLive > teamOneLive)
4116+ {
4117+ return teamTwo;
4118+ }
4119+ else if (teamOne.getTotalDamage() > teamTwo.getTotalDamage())
4120+ {
4121+ return teamOne;
4122+ }
4123+ else if (teamTwo.getTotalDamage() > teamOne.getTotalDamage())
4124+ {
4125+ return teamTwo;
4126+ }
4127+ return null;
4128+
4129+ }
4130+
4131+ public TournamentFightType getFightType()
4132+ {
4133+ return fightType;
4134+ }
4135+
4136+ public void setFightType(TournamentFightType fightType)
4137+ {
4138+ this.fightType = fightType;
4139+ }
4140+
4141+ public Instance getInstance()
4142+ {
4143+ return instance;
4144+ }
4145+
4146+ public void setInstance(Instance instance)
4147+ {
4148+ this.instance = instance;
4149+ }
4150+
4151+ public TournamentArena getTournamentArena()
4152+ {
4153+ return tournamentArena;
4154+ }
4155+
4156+ public void setTournamentArena(TournamentArena tournamentArena)
4157+ {
4158+ this.tournamentArena = tournamentArena;
4159+ }
4160+
4161+ public TournamentTeam getTeamTwo()
4162+ {
4163+ return teamTwo;
4164+ }
4165+
4166+ public void setTeamTwo(TournamentTeam teamTwo)
4167+ {
4168+ this.teamTwo = teamTwo;
4169+ }
4170+
4171+ public TournamentTeam getTeamOne()
4172+ {
4173+ return teamOne;
4174+ }
4175+
4176+ public void setTeamOne(TournamentTeam teamOne)
4177+ {
4178+ this.teamOne = teamOne;
4179+ }
4180+
4181+ public int getId()
4182+ {
4183+ return id;
4184+ }
4185+
4186+ public void setId(int id)
4187+ {
4188+ this.id = id;
4189+ }
4190+
4191+ public ScheduledFuture<?> getFinishTask()
4192+ {
4193+ return finishTask;
4194+ }
4195+
4196+ public void setFinishTask(ScheduledFuture<?> finishTask)
4197+ {
4198+ this.finishTask = finishTask;
4199+ }
4200+
4201+ /**
4202+ * @return the outOfTheZoneTask
4203+ */
4204+ public ScheduledFuture<?> getOutOfTheZoneTask()
4205+ {
4206+ return outOfTheZoneTask;
4207+ }
4208+
4209+ /**
4210+ * @param outOfTheZoneTask the outOfTheZoneTask to set
4211+ */
4212+ public void setOutOfTheZoneTask(ScheduledFuture<?> outOfTheZoneTask)
4213+ {
4214+ this.outOfTheZoneTask = outOfTheZoneTask;
4215+ }
4216+
4217+ /**
4218+ * @return the started
4219+ */
4220+ public boolean isStarted()
4221+ {
4222+ return started;
4223+ }
4224+
4225+ /**
4226+ * @param started the started to set
4227+ */
4228+ public void setStarted(boolean started)
4229+ {
4230+ this.started = started;
4231+ }
4232+
4233+ public void store(TournamentTeam team)
4234+ {
4235+ for (Player member : team.getMembers())
4236+ TournamentManager.getInstance().updateData(member, fightType);
4237+ }
4238+}
4239\ No newline at end of file
4240diff --git java/Base/Tournament/Task/TournamentSearchFights.java java/Base/Tournament/Task/TournamentSearchFights.java
4241new file mode 100644
4242index 0000000..88aea18
4243--- /dev/null
4244+++ java/Base/Tournament/Task/TournamentSearchFights.java
4245@@ -0,0 +1,92 @@
4246+package Base.Tournament.Task;
4247+
4248+import java.util.ArrayList;
4249+import java.util.List;
4250+
4251+import net.sf.l2j.commons.random.Rnd;
4252+
4253+import net.sf.l2j.Config;
4254+import net.sf.l2j.gameserver.idfactory.IdFactory;
4255+
4256+import Base.Instance.Instance;
4257+import Base.Instance.InstanceManager;
4258+import Base.Tournament.Data.TournamentArenaParser;
4259+import Base.Tournament.Enums.TournamentFightType;
4260+import Base.Tournament.Manager.TournamentManager;
4261+import Base.Tournament.Model.TournamentArena;
4262+import Base.Tournament.Model.TournamentTeam;
4263+
4264+public class TournamentSearchFights implements Runnable
4265+{
4266+
4267+ private List<TournamentTeam> teams = new ArrayList<>();
4268+
4269+ private TournamentFightType fightType;
4270+
4271+ public TournamentSearchFights(TournamentFightType fightType)
4272+ {
4273+ this.fightType = fightType;
4274+ }
4275+
4276+ @Override
4277+ public void run()
4278+ {
4279+ teams = TournamentManager.getInstance().getRegisteredTeamsByType(fightType);
4280+ if (teams.size() >= 2)
4281+ {
4282+ try
4283+ {
4284+ if (Config.TOURNAMENT_DEBUG)
4285+ {
4286+ TournamentManager.getInstance().debugInfo("Tournament is Searching for " + fightType.name() + " fights.");
4287+ }
4288+ boolean found = false;
4289+ // Search teams for a new fight
4290+ List<TournamentTeam> searchList = teams;
4291+ int teamOneIndex = Rnd.get(searchList.size());
4292+ TournamentTeam teamOne = searchList.get(teamOneIndex);
4293+ searchList.remove(teamOneIndex);
4294+ int teamTwoIndex = Rnd.get(searchList.size());
4295+ TournamentTeam teamTwo = searchList.get(teamTwoIndex);
4296+ searchList.clear();
4297+ if (teamOne != teamTwo)
4298+ {
4299+ found = true;
4300+ }
4301+
4302+ // Create a new tournament fight
4303+ if (found)
4304+ {
4305+ // remove teams from registered list
4306+ TournamentManager.getInstance().getRegisteredTournamentTeams().remove(teamOne);
4307+ TournamentManager.getInstance().getRegisteredTournamentTeams().remove(teamTwo);
4308+
4309+ // Select an arena properly
4310+ TournamentArena arena = TournamentArenaParser.getInstance().getRandomArenaForType(fightType);
4311+ // Create a instance to run the match
4312+ Instance instance = InstanceManager.getInstance().createInstance();
4313+
4314+ int fightId = IdFactory.getInstance().getNextId();
4315+ if (arena != null)
4316+ {
4317+ TournamentFight fight = new TournamentFight(fightId, fightType, instance, teamOne, teamTwo, arena);
4318+
4319+ if (Config.TOURNAMENT_DEBUG)
4320+ {
4321+ TournamentManager.getInstance().debugInfo("A new fight (ID: " + fight.getId() + ") [" + fightType.name() + "] started: " + teamOne.getName() + " vs " + teamTwo.getName());
4322+ }
4323+
4324+ }
4325+
4326+ }
4327+ }
4328+ catch (Exception e)
4329+ {
4330+ TournamentManager.getInstance().debugInfo("[Tournament Search Fights]: Could not start a fight: ");
4331+ e.printStackTrace();
4332+
4333+ }
4334+
4335+ }
4336+ }
4337+}
4338\ No newline at end of file
4339diff --git java/Base/Tournament/Task/TournamentTeleport.java java/Base/Tournament/Task/TournamentTeleport.java
4340new file mode 100644
4341index 0000000..1c7c392
4342--- /dev/null
4343+++ java/Base/Tournament/Task/TournamentTeleport.java
4344@@ -0,0 +1,177 @@
4345+package Base.Tournament.Task;
4346+
4347+import java.util.List;
4348+
4349+import net.sf.l2j.commons.pool.ThreadPool;
4350+
4351+import net.sf.l2j.Config;
4352+import net.sf.l2j.gameserver.model.actor.Player;
4353+
4354+import net.sf.l2j.gameserver.model.location.Location;
4355+
4356+import Base.Tournament.Model.TournamentArena;
4357+import Base.Tournament.Model.TournamentTeam;
4358+
4359+public class TournamentTeleport implements Runnable
4360+{
4361+
4362+ private TournamentArena arena;
4363+ private TournamentFight fight;
4364+ private TournamentTeam teamOne;
4365+ private TournamentTeam teamTwo;
4366+
4367+ public TournamentTeleport(TournamentFight fight, TournamentArena arena, TournamentTeam teamOne, TournamentTeam teamTwo)
4368+ {
4369+ this.fight = fight;
4370+ this.arena = arena;
4371+ this.teamOne = teamOne;
4372+ this.teamTwo = teamTwo;
4373+ }
4374+
4375+ @Override
4376+ public void run()
4377+ {
4378+ teleportTeamOne();
4379+ teleportTeamTwo();
4380+ teamOne.paralyze();
4381+ teamTwo.paralyze();
4382+ teamOne.screenMessage("Fight will start in " + Config.TOURNAMENT_FIGHT_START_TIME.get(fight.getFightType()) + " seconds");
4383+ teamTwo.screenMessage("Fight will start in " + Config.TOURNAMENT_FIGHT_START_TIME.get(fight.getFightType()) + " seconds");
4384+
4385+ ThreadPool.schedule(new Unparalyze(), Config.TOURNAMENT_FIGHT_START_TIME.get(fight.getFightType()) * 1000);
4386+
4387+ }
4388+
4389+ class Unparalyze implements Runnable
4390+ {
4391+
4392+ @Override
4393+ public void run()
4394+ {
4395+ teamOne.unparalyze();
4396+ teamTwo.unparalyze();
4397+ fight.setStarted(true);
4398+ teamOne.screenMessage("Battle Started!");
4399+ teamTwo.screenMessage("Battle Started!");
4400+
4401+ }
4402+
4403+ }
4404+
4405+ public void teleportTeamOne()
4406+ {
4407+ int locIndex = 0;
4408+ for (Player player : teamOne.getMembers())
4409+ {
4410+ if (!player.isOnline())
4411+ continue;
4412+
4413+ List<Location> locs = arena.getTeamOneLocation();
4414+ Location loc = locs.get(locIndex);
4415+ if (loc != null)
4416+ {
4417+ player.setLastX(player.getPosition().getX());
4418+ player.setLastY(player.getPosition().getY());
4419+ player.setLastZ(player.getPosition().getZ());
4420+ player.setInstance(fight.getInstance(), true);
4421+ player.teleToLocation(loc);
4422+ locIndex++;
4423+ }
4424+ else
4425+ {
4426+ fight.getTeamOne().sendMessage("Something goes wrong with locations of team one, please, contact and Admin.");
4427+ fight.getTeamTwo().sendMessage("Something goes wrong with locations of team one, please, contact and Admin.");
4428+ fight.finish();
4429+ }
4430+
4431+ }
4432+ }
4433+
4434+ public void teleportTeamTwo()
4435+ {
4436+ int locIndex = 0;
4437+ for (Player player : teamTwo.getMembers())
4438+ {
4439+ if (!player.isOnline())
4440+ continue;
4441+
4442+ List<Location> locs = arena.getTeamTwoLocation();
4443+ Location loc = locs.get(locIndex);
4444+ if (loc != null)
4445+ {
4446+ player.setLastX(player.getPosition().getX());
4447+ player.setLastY(player.getPosition().getY());
4448+ player.setLastZ(player.getPosition().getZ());
4449+ player.setInstance(fight.getInstance(), true);
4450+ player.teleToLocation(loc);
4451+ locIndex++;
4452+ }
4453+ else
4454+ {
4455+ fight.getTeamOne().sendMessage("Something goes wrong with locations of team two, please, contact and Admin.");
4456+ fight.getTeamTwo().sendMessage("Something goes wrong with locations of team two, please, contact and Admin.");
4457+ fight.finish();
4458+ }
4459+
4460+ }
4461+ }
4462+
4463+ /**
4464+ * @return the arena
4465+ */
4466+ public TournamentArena getArena()
4467+ {
4468+ return arena;
4469+ }
4470+
4471+ /**
4472+ * @param arena the arena to set
4473+ */
4474+ public void setArena(TournamentArena arena)
4475+ {
4476+ this.arena = arena;
4477+ }
4478+
4479+ /**
4480+ * @return the teamOne
4481+ */
4482+ public TournamentTeam getTeamOne()
4483+ {
4484+ return teamOne;
4485+ }
4486+
4487+ /**
4488+ * @param teamOne the teamOne to set
4489+ */
4490+ public void setTeamOne(TournamentTeam teamOne)
4491+ {
4492+ this.teamOne = teamOne;
4493+ }
4494+
4495+ /**
4496+ * @return the teamTwo
4497+ */
4498+ public TournamentTeam getTeamTwo()
4499+ {
4500+ return teamTwo;
4501+ }
4502+
4503+ /**
4504+ * @param teamTwo the teamTwo to set
4505+ */
4506+ public void setTeamTwo(TournamentTeam teamTwo)
4507+ {
4508+ this.teamTwo = teamTwo;
4509+ }
4510+
4511+ public TournamentFight getFight()
4512+ {
4513+ return fight;
4514+ }
4515+
4516+ public void setFight(TournamentFight fight)
4517+ {
4518+ this.fight = fight;
4519+ }
4520+
4521+}
4522\ No newline at end of file
4523diff --git java/net/sf/l2j/Config.java java/net/sf/l2j/Config.java
4524index 3f6cec4..be6925e 100644
4525--- java/net/sf/l2j/Config.java
4526+++ java/net/sf/l2j/Config.java
4527@@ -24,7 +24,11 @@
4528
4529 import net.sf.l2j.gameserver.enums.GeoType;
4530 import net.sf.l2j.gameserver.model.holder.IntIntHolder;
4531+import net.sf.l2j.gameserver.model.location.Location;
4532 import net.sf.l2j.gameserver.model.olympiad.enums.OlympiadPeriod;
4533+import net.sf.l2j.util.RewardHolder;
4534+
4535+import Base.Tournament.Enums.TournamentFightType;
4536
4537 /**
4538 * This class contains global server configuration.<br>
4539@@ -48,6 +52,320 @@
4540 public static final String RUS_ACIS_FILE = "./config/rus_acis.properties";
4541 public static final String SERVER_FILE = "./config/server.properties";
4542 public static final String SIEGE_FILE = "./config/siege.properties";
4543+ public static final String TOURNAMENT = "./config/Tournament.ini";
4544+
4545+
4546+ /** Tournament */
4547+
4548+ public static int TOURNAMENT_EVENT_DURATION;
4549+
4550+ public static String[] TOURNAMENT_EVENT_INTERVAL_BY_TIME_OF_DAY;
4551+ public static int TOURNAMENT_NPC_ID;
4552+ public static Location TOURNAMENT_NPC_LOCATION;
4553+ public static List<Integer> TOURNAMENT_RESTRICTED_SKILL_LIST = new ArrayList<>();
4554+ public static List<Integer> TOURNAMENT_RESTRICTED_ITEM_LIST = new ArrayList<>();
4555+ public static int TOURNAMENT_TIME_SEARCH_FIGHTS;
4556+ public static List<RewardHolder> TOURNAMENT_FIGHT_REWARD_WINNER = new ArrayList<>();
4557+ public static List<RewardHolder> TOURNAMENT_FIGHT_REWARD_LOOSER = new ArrayList<>();
4558+ public static Map<TournamentFightType, Integer> TOURNAMENT_FIGHT_START_TIME = new HashMap<>();
4559+ public static Map<TournamentFightType, Integer> TOURNAMENT_FIGHT_DURATION = new HashMap<>();
4560+ public static int TOURNAMENT_TIME_TO_TELEPORT;
4561+ public static boolean TOURNAMENT_DEBUG;
4562+
4563+ public static Map<TournamentFightType, Integer> TOURNAMENT_DUELIST_ALLOWED = new HashMap<>();
4564+ public static Map<TournamentFightType, Integer> TOURNAMENT_DREADNOUGHT_ALLOWED = new HashMap<>();
4565+ public static Map<TournamentFightType, Integer> TOURNAMENT_TANKER_ALLOWED = new HashMap<>();
4566+ public static Map<TournamentFightType, Integer> TOURNAMENT_DAGGER_ALLOWED = new HashMap<>();
4567+ public static Map<TournamentFightType, Integer> TOURNAMENT_ARCHER_ALLOWED = new HashMap<>();
4568+ public static Map<TournamentFightType, Integer> TOURNAMENT_HEALER_ALLOWED = new HashMap<>();
4569+ public static Map<TournamentFightType, Integer> TOURNAMENT_ARCHMAGE_ALLOWED = new HashMap<>();
4570+ public static Map<TournamentFightType, Integer> TOURNAMENT_SOULTAKER_ALLOWED = new HashMap<>();
4571+ public static Map<TournamentFightType, Integer> TOURNAMENT_MYSTICMUSE_ALLOWED = new HashMap<>();
4572+ public static Map<TournamentFightType, Integer> TOURNAMENT_STORMSCREAMER_ALLOWED = new HashMap<>();
4573+ public static Map<TournamentFightType, Integer> TOURNAMENT_TITAN_ALLOWED = new HashMap<>();
4574+ public static Map<TournamentFightType, Integer> TOURNAMENT_DOMINATOR_ALLOWED = new HashMap<>();
4575+ public static Map<TournamentFightType, Integer> TOURNAMENT_DOOMCRYER_ALLOWED = new HashMap<>();
4576+
4577+ private static final void loadTournament()
4578+ {
4579+ final ExProperties tournament = initProperties(TOURNAMENT);
4580+
4581+ String[] npcLoc = tournament.getProperty("TournamentNpcLocation", "150086,46733,-3412").split(",");
4582+ TOURNAMENT_NPC_ID = tournament.getProperty("TournamentNpcId", 50009);
4583+ TOURNAMENT_NPC_LOCATION = new Location(Integer.parseInt(npcLoc[0]), Integer.parseInt(npcLoc[1]), Integer.parseInt(npcLoc[2]));
4584+ TOURNAMENT_EVENT_INTERVAL_BY_TIME_OF_DAY = tournament.getProperty("TournamentStartTime", "20:00").split(",");
4585+ TOURNAMENT_EVENT_DURATION = tournament.getProperty("TournamentDuration", 5);
4586+ for (String item : tournament.getProperty("ItemRestrictedList", "").split(","))
4587+ {
4588+ TOURNAMENT_RESTRICTED_ITEM_LIST.add(Integer.parseInt(item));
4589+ }
4590+ for (String skill : tournament.getProperty("SkillRestrictedList", "").split(","))
4591+ {
4592+ TOURNAMENT_RESTRICTED_SKILL_LIST.add(Integer.parseInt(skill));
4593+ }
4594+ TOURNAMENT_TIME_SEARCH_FIGHTS = tournament.getProperty("TimeBetweenSearchFights", 5);
4595+ TOURNAMENT_DEBUG = tournament.getProperty("Debug", true);
4596+ TOURNAMENT_TIME_TO_TELEPORT = tournament.getProperty("TeleportFightTime", 10);
4597+ TOURNAMENT_FIGHT_REWARD_WINNER.clear();
4598+ for (String s : tournament.getProperty("WinnerRewards", "57,1000;3470,10").split(";"))
4599+ {
4600+ String[] reward = s.split(",");
4601+
4602+ RewardHolder simpleReward = new RewardHolder(Integer.parseInt(reward[0]), Integer.parseInt(reward[1]));
4603+ TOURNAMENT_FIGHT_REWARD_WINNER.add(simpleReward);
4604+ }
4605+ TOURNAMENT_FIGHT_REWARD_LOOSER.clear();
4606+ for (String s : tournament.getProperty("LooserRewards", "57,500;3470,5").split(";"))
4607+ {
4608+ String[] reward = s.split(",");
4609+
4610+ RewardHolder simpleReward = new RewardHolder(Integer.parseInt(reward[0]), Integer.parseInt(reward[1]));
4611+ TOURNAMENT_FIGHT_REWARD_LOOSER.add(simpleReward);
4612+ }
4613+
4614+ TOURNAMENT_FIGHT_START_TIME.clear();
4615+ int startTime1x1 = tournament.getProperty("FightStartTime_1x1", 10);
4616+ int startTime2x2 = tournament.getProperty("FightStartTime_2x2", 10);
4617+ int startTime3x3 = tournament.getProperty("FightStartTime_3x3", 10);
4618+ int startTime4x4 = tournament.getProperty("FightStartTime_4x4", 10);
4619+ int startTime5x5 = tournament.getProperty("FightStartTime_5x5", 10);
4620+ int startTime9x9 = tournament.getProperty("FightStartTime_9x9", 10);
4621+
4622+ TOURNAMENT_FIGHT_START_TIME.put(TournamentFightType.F1X1, startTime1x1);
4623+ TOURNAMENT_FIGHT_START_TIME.put(TournamentFightType.F2X2, startTime2x2);
4624+ TOURNAMENT_FIGHT_START_TIME.put(TournamentFightType.F3X3, startTime3x3);
4625+ TOURNAMENT_FIGHT_START_TIME.put(TournamentFightType.F4X4, startTime4x4);
4626+ TOURNAMENT_FIGHT_START_TIME.put(TournamentFightType.F5X5, startTime5x5);
4627+ TOURNAMENT_FIGHT_START_TIME.put(TournamentFightType.F9X9, startTime9x9);
4628+
4629+ TOURNAMENT_FIGHT_DURATION.clear();
4630+ int fightTime1x1 = tournament.getProperty("FightDuration_1x1", 1);
4631+ int fightTime2x2 = tournament.getProperty("FightDuration_2x2", 1);
4632+ int fightTime3x3 = tournament.getProperty("FightDuration_3x3", 1);
4633+ int fightTime4x4 = tournament.getProperty("FightDuration_4x4", 1);
4634+ int fightTime5x5 = tournament.getProperty("FightDuration_5x5", 1);
4635+ int fightTime9x9 = tournament.getProperty("FightDuration_9x9", 1);
4636+
4637+ TOURNAMENT_FIGHT_DURATION.put(TournamentFightType.F1X1, fightTime1x1);
4638+ TOURNAMENT_FIGHT_DURATION.put(TournamentFightType.F2X2, fightTime2x2);
4639+ TOURNAMENT_FIGHT_DURATION.put(TournamentFightType.F3X3, fightTime3x3);
4640+ TOURNAMENT_FIGHT_DURATION.put(TournamentFightType.F4X4, fightTime4x4);
4641+ TOURNAMENT_FIGHT_DURATION.put(TournamentFightType.F5X5, fightTime5x5);
4642+ TOURNAMENT_FIGHT_DURATION.put(TournamentFightType.F9X9, fightTime9x9);
4643+
4644+ TOURNAMENT_DUELIST_ALLOWED.clear();
4645+ TOURNAMENT_DREADNOUGHT_ALLOWED.clear();
4646+ TOURNAMENT_TANKER_ALLOWED.clear();
4647+ TOURNAMENT_DAGGER_ALLOWED.clear();
4648+ TOURNAMENT_ARCHER_ALLOWED.clear();
4649+ TOURNAMENT_HEALER_ALLOWED.clear();
4650+ TOURNAMENT_ARCHMAGE_ALLOWED.clear();
4651+ TOURNAMENT_SOULTAKER_ALLOWED.clear();
4652+ TOURNAMENT_MYSTICMUSE_ALLOWED.clear();
4653+ TOURNAMENT_STORMSCREAMER_ALLOWED.clear();
4654+ TOURNAMENT_TITAN_ALLOWED.clear();
4655+ TOURNAMENT_DOMINATOR_ALLOWED.clear();
4656+ TOURNAMENT_DOOMCRYER_ALLOWED.clear();
4657+ // ARCHERS
4658+ int archer1x1 = tournament.getProperty("ArchersCountAllowed_1x1", 1);
4659+ int archer2x2 = tournament.getProperty("ArchersCountAllowed_2x2", 1);
4660+ int archer3x3 = tournament.getProperty("ArchersCountAllowed_3x3", 1);
4661+ int archer4x4 = tournament.getProperty("ArchersCountAllowed_4x4", 1);
4662+ int archer5x5 = tournament.getProperty("ArchersCountAllowed_5x5", 1);
4663+ int archer9x9 = tournament.getProperty("ArchersCountAllowed_9x9", 1);
4664+
4665+ TOURNAMENT_ARCHER_ALLOWED.put(TournamentFightType.F1X1, archer1x1);
4666+ TOURNAMENT_ARCHER_ALLOWED.put(TournamentFightType.F2X2, archer2x2);
4667+ TOURNAMENT_ARCHER_ALLOWED.put(TournamentFightType.F3X3, archer3x3);
4668+ TOURNAMENT_ARCHER_ALLOWED.put(TournamentFightType.F4X4, archer4x4);
4669+ TOURNAMENT_ARCHER_ALLOWED.put(TournamentFightType.F5X5, archer5x5);
4670+ TOURNAMENT_ARCHER_ALLOWED.put(TournamentFightType.F9X9, archer9x9);
4671+
4672+ // archmages
4673+ int archmage1X1 = tournament.getProperty("ArchmagesCountAllowed_1x1", 1);
4674+ int archmage2x2 = tournament.getProperty("ArchmagesCountAllowed_2x2", 1);
4675+ int archmage3x3 = tournament.getProperty("ArchmagesCountAllowed_3x3", 1);
4676+ int archmage4x4 = tournament.getProperty("ArchmagesCountAllowed_4x4", 1);
4677+ int archmage5x5 = tournament.getProperty("ArchmagesCountAllowed_5x5", 1);
4678+ int archmage9x9 = tournament.getProperty("ArchmagesCountAllowed_9x9", 1);
4679+
4680+ TOURNAMENT_ARCHMAGE_ALLOWED.put(TournamentFightType.F1X1, archmage1X1);
4681+ TOURNAMENT_ARCHMAGE_ALLOWED.put(TournamentFightType.F2X2, archmage2x2);
4682+ TOURNAMENT_ARCHMAGE_ALLOWED.put(TournamentFightType.F3X3, archmage3x3);
4683+ TOURNAMENT_ARCHMAGE_ALLOWED.put(TournamentFightType.F4X4, archmage4x4);
4684+ TOURNAMENT_ARCHMAGE_ALLOWED.put(TournamentFightType.F5X5, archmage5x5);
4685+ TOURNAMENT_ARCHMAGE_ALLOWED.put(TournamentFightType.F9X9, archmage9x9);
4686+
4687+ // DAGGERS
4688+ int dagger1x1 = tournament.getProperty("DaggersCountAllowed_1x1", 1);
4689+ int dagger2x2 = tournament.getProperty("DaggersCountAllowed_2x2", 1);
4690+ int dagger3x3 = tournament.getProperty("DaggersCountAllowed_3x3", 1);
4691+ int dagger4x4 = tournament.getProperty("DaggersCountAllowed_4x4", 1);
4692+ int dagger5x5 = tournament.getProperty("DaggersCountAllowed_5x5", 1);
4693+ int dagger9x9 = tournament.getProperty("DaggersCountAllowed_9x9", 1);
4694+
4695+ TOURNAMENT_DAGGER_ALLOWED.put(TournamentFightType.F1X1, dagger1x1);
4696+ TOURNAMENT_DAGGER_ALLOWED.put(TournamentFightType.F2X2, dagger2x2);
4697+ TOURNAMENT_DAGGER_ALLOWED.put(TournamentFightType.F3X3, dagger3x3);
4698+ TOURNAMENT_DAGGER_ALLOWED.put(TournamentFightType.F4X4, dagger4x4);
4699+ TOURNAMENT_DAGGER_ALLOWED.put(TournamentFightType.F5X5, dagger5x5);
4700+ TOURNAMENT_DAGGER_ALLOWED.put(TournamentFightType.F9X9, dagger9x9);
4701+
4702+ // DOMINATOR
4703+ int dominator1x1 = tournament.getProperty("DominatorsCountAllowed_1x1", 1);
4704+ int dominator2x2 = tournament.getProperty("DominatorsCountAllowed_2x2", 1);
4705+ int dominator3x3 = tournament.getProperty("DominatorsCountAllowed_3x3", 1);
4706+ int dominator4x4 = tournament.getProperty("DominatorsCountAllowed_4x4", 1);
4707+ int dominator5x5 = tournament.getProperty("DominatorsCountAllowed_5x5", 1);
4708+ int dominator9x9 = tournament.getProperty("DominatorsCountAllowed_9x9", 1);
4709+
4710+ TOURNAMENT_DOMINATOR_ALLOWED.put(TournamentFightType.F1X1, dominator1x1);
4711+ TOURNAMENT_DOMINATOR_ALLOWED.put(TournamentFightType.F2X2, dominator2x2);
4712+ TOURNAMENT_DOMINATOR_ALLOWED.put(TournamentFightType.F3X3, dominator3x3);
4713+ TOURNAMENT_DOMINATOR_ALLOWED.put(TournamentFightType.F4X4, dominator4x4);
4714+ TOURNAMENT_DOMINATOR_ALLOWED.put(TournamentFightType.F5X5, dominator5x5);
4715+ TOURNAMENT_DOMINATOR_ALLOWED.put(TournamentFightType.F9X9, dominator9x9);
4716+
4717+ // DOOMCRYER
4718+ int doomcryer1x1 = tournament.getProperty("DoomcryersCountAllowed_1x1", 1);
4719+ int doomcryer2x2 = tournament.getProperty("DoomcryersCountAllowed_2x2", 1);
4720+ int doomcryer3x3 = tournament.getProperty("DoomcryersCountAllowed_3x3", 1);
4721+ int doomcryer4x4 = tournament.getProperty("DoomcryersCountAllowed_4x4", 1);
4722+ int doomcryer5x5 = tournament.getProperty("DoomcryersCountAllowed_5x5", 1);
4723+ int doomcryer9x9 = tournament.getProperty("DoomcryersCountAllowed_9x9", 1);
4724+
4725+ TOURNAMENT_DOOMCRYER_ALLOWED.put(TournamentFightType.F1X1, doomcryer1x1);
4726+ TOURNAMENT_DOOMCRYER_ALLOWED.put(TournamentFightType.F2X2, doomcryer2x2);
4727+ TOURNAMENT_DOOMCRYER_ALLOWED.put(TournamentFightType.F3X3, doomcryer3x3);
4728+ TOURNAMENT_DOOMCRYER_ALLOWED.put(TournamentFightType.F4X4, doomcryer4x4);
4729+ TOURNAMENT_DOOMCRYER_ALLOWED.put(TournamentFightType.F5X5, doomcryer5x5);
4730+ TOURNAMENT_DOOMCRYER_ALLOWED.put(TournamentFightType.F9X9, doomcryer9x9);
4731+
4732+ // DREADNOUGHT
4733+ int dreadnought1x1 = tournament.getProperty("DreadnoughtsCountAllowed_1x1", 1);
4734+ int dreadnought2x2 = tournament.getProperty("DreadnoughtsCountAllowed_2x2", 1);
4735+ int dreadnought3x3 = tournament.getProperty("DreadnoughtsCountAllowed_3x3", 1);
4736+ int dreadnought4x4 = tournament.getProperty("DreadnoughtsCountAllowed_4x4", 1);
4737+ int dreadnought5x5 = tournament.getProperty("DreadnoughtsCountAllowed_5x5", 1);
4738+ int dreadnought9x9 = tournament.getProperty("DreadnoughtsCountAllowed_9x9", 1);
4739+
4740+ TOURNAMENT_DREADNOUGHT_ALLOWED.put(TournamentFightType.F1X1, dreadnought1x1);
4741+ TOURNAMENT_DREADNOUGHT_ALLOWED.put(TournamentFightType.F2X2, dreadnought2x2);
4742+ TOURNAMENT_DREADNOUGHT_ALLOWED.put(TournamentFightType.F3X3, dreadnought3x3);
4743+ TOURNAMENT_DREADNOUGHT_ALLOWED.put(TournamentFightType.F4X4, dreadnought4x4);
4744+ TOURNAMENT_DREADNOUGHT_ALLOWED.put(TournamentFightType.F5X5, dreadnought5x5);
4745+ TOURNAMENT_DREADNOUGHT_ALLOWED.put(TournamentFightType.F9X9, dreadnought9x9);
4746+
4747+ // DUELIST
4748+ int duelist1x1 = tournament.getProperty("DuelistsCountAllowed_1x1", 1);
4749+ int duelist2x2 = tournament.getProperty("DuelistsCountAllowed_2x2", 1);
4750+ int duelist3x3 = tournament.getProperty("DuelistsCountAllowed_3x3", 1);
4751+ int duelist4x4 = tournament.getProperty("DuelistsCountAllowed_4x4", 1);
4752+ int duelist5x5 = tournament.getProperty("DuelistsCountAllowed_5x5", 1);
4753+ int duelist9x9 = tournament.getProperty("DuelistsCountAllowed_9x9", 1);
4754+
4755+ TOURNAMENT_DUELIST_ALLOWED.put(TournamentFightType.F1X1, duelist1x1);
4756+ TOURNAMENT_DUELIST_ALLOWED.put(TournamentFightType.F2X2, duelist2x2);
4757+ TOURNAMENT_DUELIST_ALLOWED.put(TournamentFightType.F3X3, duelist3x3);
4758+ TOURNAMENT_DUELIST_ALLOWED.put(TournamentFightType.F4X4, duelist4x4);
4759+ TOURNAMENT_DUELIST_ALLOWED.put(TournamentFightType.F5X5, duelist5x5);
4760+ TOURNAMENT_DUELIST_ALLOWED.put(TournamentFightType.F9X9, duelist9x9);
4761+
4762+ // HEALER
4763+ int healer1x1 = tournament.getProperty("HealersCountAllowed_1x1", 1);
4764+ int healer2x2 = tournament.getProperty("HealersCountAllowed_2x2", 1);
4765+ int healer3x3 = tournament.getProperty("HealersCountAllowed_3x3", 1);
4766+ int healer4x4 = tournament.getProperty("HealersCountAllowed_4x4", 1);
4767+ int healer5x5 = tournament.getProperty("HealersCountAllowed_5x5", 1);
4768+ int healer9x9 = tournament.getProperty("HealersCountAllowed_9x9", 1);
4769+
4770+ TOURNAMENT_HEALER_ALLOWED.put(TournamentFightType.F1X1, healer1x1);
4771+ TOURNAMENT_HEALER_ALLOWED.put(TournamentFightType.F2X2, healer2x2);
4772+ TOURNAMENT_HEALER_ALLOWED.put(TournamentFightType.F3X3, healer3x3);
4773+ TOURNAMENT_HEALER_ALLOWED.put(TournamentFightType.F4X4, healer4x4);
4774+ TOURNAMENT_HEALER_ALLOWED.put(TournamentFightType.F5X5, healer5x5);
4775+ TOURNAMENT_HEALER_ALLOWED.put(TournamentFightType.F9X9, healer9x9);
4776+
4777+ // MYSTIC MUSE
4778+ int mysticmuse1x1 = tournament.getProperty("MysticMusesCountAllowed_1x1", 1);
4779+ int mysticmuse2x2 = tournament.getProperty("MysticMusesCountAllowed_2x2", 1);
4780+ int mysticmuse3x3 = tournament.getProperty("MysticMusesCountAllowed_3x3", 1);
4781+ int mysticmuse4x4 = tournament.getProperty("MysticMusesCountAllowed_4x4", 1);
4782+ int mysticmuse5x5 = tournament.getProperty("MysticMusesCountAllowed_5x5", 1);
4783+ int mysticmuse9x9 = tournament.getProperty("MysticMusesCountAllowed_9x9", 1);
4784+
4785+ TOURNAMENT_MYSTICMUSE_ALLOWED.put(TournamentFightType.F1X1, mysticmuse1x1);
4786+ TOURNAMENT_MYSTICMUSE_ALLOWED.put(TournamentFightType.F2X2, mysticmuse2x2);
4787+ TOURNAMENT_MYSTICMUSE_ALLOWED.put(TournamentFightType.F3X3, mysticmuse3x3);
4788+ TOURNAMENT_MYSTICMUSE_ALLOWED.put(TournamentFightType.F4X4, mysticmuse4x4);
4789+ TOURNAMENT_MYSTICMUSE_ALLOWED.put(TournamentFightType.F5X5, mysticmuse5x5);
4790+ TOURNAMENT_MYSTICMUSE_ALLOWED.put(TournamentFightType.F9X9, mysticmuse9x9);
4791+
4792+ // SOUL TAKER
4793+ int soulTaker1x1 = tournament.getProperty("SoulTakersCountAllowed_1x1", 1);
4794+ int soulTaker2x2 = tournament.getProperty("SoulTakersCountAllowed_2x2", 1);
4795+ int soulTaker3x3 = tournament.getProperty("SoulTakersCountAllowed_3x3", 1);
4796+ int soulTaker4x4 = tournament.getProperty("SoulTakersCountAllowed_4x4", 1);
4797+ int soulTaker5x5 = tournament.getProperty("SoulTakersCountAllowed_5x5", 1);
4798+ int soulTaker9x9 = tournament.getProperty("SoulTakersCountAllowed_9x9", 1);
4799+
4800+ TOURNAMENT_SOULTAKER_ALLOWED.put(TournamentFightType.F1X1, soulTaker1x1);
4801+ TOURNAMENT_SOULTAKER_ALLOWED.put(TournamentFightType.F2X2, soulTaker2x2);
4802+ TOURNAMENT_SOULTAKER_ALLOWED.put(TournamentFightType.F3X3, soulTaker3x3);
4803+ TOURNAMENT_SOULTAKER_ALLOWED.put(TournamentFightType.F4X4, soulTaker4x4);
4804+ TOURNAMENT_SOULTAKER_ALLOWED.put(TournamentFightType.F5X5, soulTaker5x5);
4805+ TOURNAMENT_SOULTAKER_ALLOWED.put(TournamentFightType.F9X9, soulTaker9x9);
4806+
4807+ // TITAN
4808+ int titan1x1 = tournament.getProperty("TitansCountAllowed_1x1", 1);
4809+ int titan2x2 = tournament.getProperty("TitansCountAllowed_2x2", 1);
4810+ int titan3x3 = tournament.getProperty("TitansCountAllowed_3x3", 1);
4811+ int titan4x4 = tournament.getProperty("TitansCountAllowed_4x4", 1);
4812+ int titan5x5 = tournament.getProperty("TitansCountAllowed_5x5", 1);
4813+ int titan9x9 = tournament.getProperty("TitansCountAllowed_9x9", 1);
4814+
4815+ TOURNAMENT_TITAN_ALLOWED.put(TournamentFightType.F1X1, titan1x1);
4816+ TOURNAMENT_TITAN_ALLOWED.put(TournamentFightType.F2X2, titan2x2);
4817+ TOURNAMENT_TITAN_ALLOWED.put(TournamentFightType.F3X3, titan3x3);
4818+ TOURNAMENT_TITAN_ALLOWED.put(TournamentFightType.F4X4, titan4x4);
4819+ TOURNAMENT_TITAN_ALLOWED.put(TournamentFightType.F5X5, titan5x5);
4820+ TOURNAMENT_TITAN_ALLOWED.put(TournamentFightType.F9X9, titan9x9);
4821+
4822+ // STORM SCREAMER
4823+ int stormScreamer1x1 = tournament.getProperty("StormScreamersCountAllowed_1x1", 1);
4824+ int stormScreamer2x2 = tournament.getProperty("StormScreamersCountAllowed_2x2", 1);
4825+ int stormScreamer3x3 = tournament.getProperty("StormScreamersCountAllowed_3x3", 1);
4826+ int stormScreamer4x4 = tournament.getProperty("StormScreamersCountAllowed_4x4", 1);
4827+ int stormScreamer5x5 = tournament.getProperty("StormScreamersCountAllowed_5x5", 1);
4828+ int stormScreamer9x9 = tournament.getProperty("StormScreamersCountAllowed_9x9", 1);
4829+
4830+ TOURNAMENT_STORMSCREAMER_ALLOWED.put(TournamentFightType.F1X1, stormScreamer1x1);
4831+ TOURNAMENT_STORMSCREAMER_ALLOWED.put(TournamentFightType.F2X2, stormScreamer2x2);
4832+ TOURNAMENT_STORMSCREAMER_ALLOWED.put(TournamentFightType.F3X3, stormScreamer3x3);
4833+ TOURNAMENT_STORMSCREAMER_ALLOWED.put(TournamentFightType.F4X4, stormScreamer4x4);
4834+ TOURNAMENT_STORMSCREAMER_ALLOWED.put(TournamentFightType.F5X5, stormScreamer5x5);
4835+ TOURNAMENT_STORMSCREAMER_ALLOWED.put(TournamentFightType.F9X9, stormScreamer9x9);
4836+
4837+ // TANKERS
4838+ int tanker1x1 = tournament.getProperty("TankersCountAllowed_1x1", 1);
4839+ int tanker2x2 = tournament.getProperty("TankersCountAllowed_2x2", 1);
4840+ int tanker3x3 = tournament.getProperty("TankersCountAllowed_3x3", 1);
4841+ int tanker4x4 = tournament.getProperty("TankersCountAllowed_4x4", 1);
4842+ int tanker5x5 = tournament.getProperty("TankersCountAllowed_5x5", 1);
4843+ int tanker9x9 = tournament.getProperty("TankersCountAllowed_9x9", 1);
4844+
4845+ TOURNAMENT_TANKER_ALLOWED.put(TournamentFightType.F1X1, tanker1x1);
4846+ TOURNAMENT_TANKER_ALLOWED.put(TournamentFightType.F2X2, tanker2x2);
4847+ TOURNAMENT_TANKER_ALLOWED.put(TournamentFightType.F3X3, tanker3x3);
4848+ TOURNAMENT_TANKER_ALLOWED.put(TournamentFightType.F4X4, tanker4x4);
4849+ TOURNAMENT_TANKER_ALLOWED.put(TournamentFightType.F5X5, tanker5x5);
4850+ TOURNAMENT_TANKER_ALLOWED.put(TournamentFightType.F9X9, tanker9x9);
4851+
4852+ }
4853+
4854+
4855+
4856+
4857
4858
4859 /** Character Killing Monument settings */
4860@@ -2568,6 +2886,8 @@
4861 // rates settings
4862 loadRates();
4863
4864+ loadTournament();
4865+
4866 // rusacis settings
4867 loadRusAcis();
4868 }
4869diff --git java/net/sf/l2j/commons/data/xml/IXmlReader.java java/net/sf/l2j/commons/data/xml/IXmlReader.java
4870index d876bb1..cc69d62 100644
4871--- java/net/sf/l2j/commons/data/xml/IXmlReader.java
4872+++ java/net/sf/l2j/commons/data/xml/IXmlReader.java
4873@@ -465,4 +465,24 @@
4874 throw e;
4875 }
4876 }
4877+
4878+
4879+ /**
4880+ * This method parses the content of a NamedNodeMap and feed the given StatsSet.
4881+ * @param attrs : The NamedNodeMap to parse.
4882+ * @param set : The StatsSet to feed.
4883+ */
4884+ default void parseAndFeed(NamedNodeMap attrs, StatSet set)
4885+ {
4886+ for (int i = 0; i < attrs.getLength(); i++)
4887+ {
4888+ final Node attr = attrs.item(i);
4889+ set.set(attr.getNodeName(), attr.getNodeValue());
4890+ }
4891+ }
4892+
4893+
4894+
4895+
4896+
4897 }
4898\ No newline at end of file
4899diff --git java/net/sf/l2j/gameserver/GameServer.java java/net/sf/l2j/gameserver/GameServer.java
4900index 98f7da4..9a43506 100644
4901--- java/net/sf/l2j/gameserver/GameServer.java
4902+++ java/net/sf/l2j/gameserver/GameServer.java
4903@@ -81,6 +81,7 @@
4904 import net.sf.l2j.gameserver.data.xml.WalkerRouteData;
4905 import net.sf.l2j.gameserver.geoengine.GeoEngine;
4906 import net.sf.l2j.gameserver.handler.AdminCommandHandler;
4907+import net.sf.l2j.gameserver.handler.BypassHandler;
4908 import net.sf.l2j.gameserver.handler.ChatHandler;
4909 import net.sf.l2j.gameserver.handler.ItemHandler;
4910 import net.sf.l2j.gameserver.handler.SkillHandler;
4911@@ -116,6 +117,8 @@
4912 import Base.HuntPass.HuntPassData;
4913 import Base.HuntPass.HuntPassManager;
4914 import Base.HuntPass.HuntPassPointCollector;
4915+import Base.Instance.InstanceManager;
4916+import Base.Tournament.Manager.TournamentManager;
4917
4918 public class GameServer
4919 {
4920@@ -299,6 +302,7 @@
4921 LOGGER.info("Loaded {} skill handlers.", SkillHandler.getInstance().size());
4922 LOGGER.info("Loaded {} target handlers.", TargetHandler.getInstance().size());
4923 LOGGER.info("Loaded {} user command handlers.", UserCommandHandler.getInstance().size());
4924+ LOGGER.info("Loaded {} bypass command handlers.", BypassHandler.getInstance().size());
4925 LOGGER.info("Loaded {} voiced command handlers.", VoicedCommandHandler.getInstance().size());
4926
4927
4928@@ -334,6 +338,13 @@
4929
4930
4931
4932+ StringUtil.printSection("Instance Manager");
4933+ InstanceManager.getInstance();
4934+
4935+ StringUtil.printSection("Tournament Manager");
4936+ TournamentManager.getInstance();
4937+
4938+
4939
4940 StringUtil.printSection("System");
4941 Runtime.getRuntime().addShutdownHook(Shutdown.getInstance());
4942diff --git java/net/sf/l2j/gameserver/enums/ZoneId.java java/net/sf/l2j/gameserver/enums/ZoneId.java
4943index 1be8899..01a1938 100644
4944--- java/net/sf/l2j/gameserver/enums/ZoneId.java
4945+++ java/net/sf/l2j/gameserver/enums/ZoneId.java
4946@@ -23,8 +23,9 @@
4947 SCRIPT(18),
4948 BOSS(19),
4949 PAGAN(20),
4950- SSQ(21),
4951- ENCHANT_ZONE(22);
4952+ TOURNAMENT(21),
4953+ SSQ(22),
4954+ ENCHANT_ZONE(23);
4955
4956 private final int _id;
4957
4958diff --git java/net/sf/l2j/gameserver/enums/actors/ClassId.java java/net/sf/l2j/gameserver/enums/actors/ClassId.java
4959index 9fbfcef..7bc550d 100644
4960--- java/net/sf/l2j/gameserver/enums/actors/ClassId.java
4961+++ java/net/sf/l2j/gameserver/enums/actors/ClassId.java
4962@@ -2,6 +2,8 @@
4963
4964 import java.util.EnumSet;
4965
4966+import net.sf.l2j.commons.util.ArraysUtil;
4967+
4968 import net.sf.l2j.gameserver.model.actor.Player;
4969
4970 /**
4971@@ -182,6 +184,79 @@
4972 return _name;
4973 }
4974
4975+
4976+
4977+ private static final ClassId[] HEALERS =
4978+ {
4979+ ClassId.BISHOP,
4980+ ClassId.CARDINAL,
4981+ ClassId.EVAS_SAINT,
4982+ ClassId.ELVEN_ELDER,
4983+ ClassId.SHILLIEN_SAINT,
4984+ ClassId.SHILLIEN_ELDER
4985+ };
4986+
4987+ private static final ClassId[] TANKERS =
4988+ {
4989+ ClassId.HELL_KNIGHT,
4990+ ClassId.DARK_AVENGER,
4991+ ClassId.SHILLIEN_KNIGHT,
4992+ ClassId.SHILLIEN_TEMPLAR,
4993+ ClassId.EVAS_TEMPLAR,
4994+ ClassId.TEMPLE_KNIGHT,
4995+ ClassId.BLADEDANCER,
4996+ ClassId.SPECTRAL_DANCER,
4997+ ClassId.SWORD_SINGER,
4998+ ClassId.SWORD_MUSE,
4999+ ClassId.PHOENIX_KNIGHT,
5000+ ClassId.PALADIN,
5001+ };
5002+
5003+ private static final ClassId[] DAGGERS =
5004+ {
5005+ ClassId.ADVENTURER,
5006+ ClassId.TREASURE_HUNTER,
5007+ ClassId.GHOST_HUNTER,
5008+ ClassId.ABYSS_WALKER,
5009+ ClassId.PLAINS_WALKER,
5010+ ClassId.WIND_RIDER,
5011+ ClassId.FORTUNE_SEEKER,
5012+ ClassId.BOUNTY_HUNTER
5013+ };
5014+
5015+ private static final ClassId[] ARCHERS =
5016+ {
5017+ ClassId.SAGGITARIUS,
5018+ ClassId.HAWKEYE,
5019+ ClassId.GHOST_SENTINEL,
5020+ ClassId.PHANTOM_RANGER,
5021+ ClassId.MOONLIGHT_SENTINEL,
5022+ ClassId.SILVER_RANGER
5023+ };
5024+
5025+ public boolean isHealer()
5026+ {
5027+ return ArraysUtil.contains(HEALERS, this);
5028+ }
5029+
5030+ public boolean isDagger()
5031+ {
5032+ return ArraysUtil.contains(DAGGERS, this);
5033+ }
5034+
5035+ public boolean isTanker()
5036+ {
5037+ return ArraysUtil.contains(TANKERS, this);
5038+ }
5039+
5040+ public boolean isArcher()
5041+ {
5042+ return ArraysUtil.contains(ARCHERS, this);
5043+ }
5044+
5045+
5046+
5047+
5048 /**
5049 * @return The associated id of this {@link ClassId}.
5050 */
5051diff --git java/net/sf/l2j/gameserver/geoengine/geodata/IGeoObject.java java/net/sf/l2j/gameserver/geoengine/geodata/IGeoObject.java
5052index 379e708..28b43ff 100644
5053--- java/net/sf/l2j/gameserver/geoengine/geodata/IGeoObject.java
5054+++ java/net/sf/l2j/gameserver/geoengine/geodata/IGeoObject.java
5055@@ -31,4 +31,6 @@
5056 * @return byte[][] : {@link IGeoObject} data.
5057 */
5058 public byte[][] getObjectGeoData();
5059+
5060+ public int getInstanceID();
5061 }
5062diff --git java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java
5063index 926b29c..1842f7f 100644
5064--- java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java
5065+++ java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java
5066@@ -18,6 +18,7 @@
5067 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminFind;
5068 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminGeoEngine;
5069 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminInfo;
5070+import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminInstance;
5071 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminItem;
5072 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminKnownlist;
5073 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminLMEvent;
5074@@ -88,9 +89,10 @@
5075 registerHandler(new AdminTest());
5076 registerHandler(new AdminZone());
5077 registerHandler(new AdminZoneCreation());
5078+ registerHandler(new AdminInstance());
5079 }
5080
5081- private void registerHandler(IAdminCommandHandler handler)
5082+ public void registerHandler(IAdminCommandHandler handler)
5083 {
5084 for (String id : handler.getAdminCommandList())
5085 _entries.put(id.hashCode(), handler);
5086diff --git java/net/sf/l2j/gameserver/handler/BypassHandler.java java/net/sf/l2j/gameserver/handler/BypassHandler.java
5087new file mode 100644
5088index 0000000..b8f406f
5089--- /dev/null
5090+++ java/net/sf/l2j/gameserver/handler/BypassHandler.java
5091@@ -0,0 +1,54 @@
5092+package net.sf.l2j.gameserver.handler;
5093+
5094+import java.util.HashMap;
5095+import java.util.Map;
5096+
5097+
5098+import net.sf.l2j.gameserver.model.entity.Tournament.ByPasses.TournamentBypasses;
5099+
5100+/**
5101+ * @author Anarchy
5102+ */
5103+public class BypassHandler
5104+{
5105+
5106+ private final Map<Integer, IBypassHandler> _datatable = new HashMap<>();
5107+
5108+ public static BypassHandler getInstance()
5109+ {
5110+ return SingletonHolder._instance;
5111+ }
5112+
5113+ private BypassHandler()
5114+ {
5115+ registerBypassHandler(new TournamentBypasses());
5116+ }
5117+
5118+ public void registerBypassHandler(IBypassHandler handler)
5119+ {
5120+ String[] ids = handler.getBypassHandlersList();
5121+ for (int i = 0; i < ids.length; i++)
5122+ {
5123+ _datatable.put(ids[i].hashCode(), handler);
5124+ }
5125+ }
5126+
5127+ public IBypassHandler getBypassHandler(String bypass)
5128+ {
5129+ String command = bypass;
5130+ if (bypass.indexOf(" ") != -1)
5131+ command = bypass.substring(0, bypass.indexOf(" "));
5132+
5133+ return _datatable.get(command.hashCode());
5134+ }
5135+
5136+ public int size()
5137+ {
5138+ return _datatable.size();
5139+ }
5140+
5141+ private static class SingletonHolder
5142+ {
5143+ protected static final BypassHandler _instance = new BypassHandler();
5144+ }
5145+}
5146\ No newline at end of file
5147diff --git java/net/sf/l2j/gameserver/handler/IBypassHandler.java java/net/sf/l2j/gameserver/handler/IBypassHandler.java
5148new file mode 100644
5149index 0000000..3fec86c
5150--- /dev/null
5151+++ java/net/sf/l2j/gameserver/handler/IBypassHandler.java
5152@@ -0,0 +1,13 @@
5153+package net.sf.l2j.gameserver.handler;
5154+
5155+import net.sf.l2j.gameserver.model.actor.Player;
5156+
5157+/**
5158+ * @author Anarchy
5159+ */
5160+public interface IBypassHandler
5161+{
5162+ public boolean handleBypass(String bypass, Player activeChar);
5163+
5164+ public String[] getBypassHandlersList();
5165+}
5166\ No newline at end of file
5167diff --git java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminInstance.java java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminInstance.java
5168new file mode 100644
5169index 0000000..5e1a2ec
5170--- /dev/null
5171+++ java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminInstance.java
5172@@ -0,0 +1,62 @@
5173+package net.sf.l2j.gameserver.handler.admincommandhandlers;
5174+
5175+import java.util.StringTokenizer;
5176+
5177+import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
5178+import net.sf.l2j.gameserver.model.World;
5179+import net.sf.l2j.gameserver.model.actor.Player;
5180+
5181+import Base.Instance.InstanceManager;
5182+
5183+
5184+/**
5185+ * @author Rouxy
5186+ */
5187+public class AdminInstance implements IAdminCommandHandler
5188+{
5189+
5190+ @Override
5191+ public void useAdminCommand(String command, Player activeChar)
5192+ {
5193+ if (command.startsWith("admin_getinstance"))
5194+ {
5195+ StringTokenizer st = new StringTokenizer(command, " ");
5196+ st.nextToken(); // skip command
5197+
5198+ if (!st.hasMoreTokens())
5199+ {
5200+ activeChar.sendMessage("Write the name.");
5201+ return;
5202+ }
5203+
5204+ String target_name = st.nextToken();
5205+ Player player = World.getInstance().getPlayer(target_name);
5206+ if (player == null)
5207+ {
5208+ activeChar.sendMessage("Player is offline");
5209+ return;
5210+ }
5211+
5212+ activeChar.setInstance(player.getInstance(), false);
5213+ activeChar.sendMessage("You are with the same instance of player " + target_name);
5214+ }
5215+ else if (command.startsWith("admin_resetmyinstance"))
5216+ {
5217+ activeChar.setInstance(InstanceManager.getInstance().getInstance(0), false);
5218+ activeChar.sendMessage("Your instance is now default");
5219+ }
5220+
5221+ }
5222+
5223+ @Override
5224+ public String[] getAdminCommandList()
5225+ {
5226+
5227+ return new String[]
5228+ {
5229+ "admin_getinstance",
5230+ "admin_resetmyinstance"
5231+ };
5232+ }
5233+
5234+}
5235\ No newline at end of file
5236diff --git java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminReload.java java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminReload.java
5237index 61144d5..7ad61ea 100644
5238--- java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminReload.java
5239+++ java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminReload.java
5240@@ -27,6 +27,8 @@
5241 import net.sf.l2j.gameserver.model.actor.Player;
5242 import net.sf.l2j.util.LocalizationStorage;
5243
5244+import Base.Tournament.Data.TournamentArenaParser;
5245+
5246 public class AdminReload implements IAdminCommandHandler
5247 {
5248 private static final String[] ADMIN_COMMANDS =
5249@@ -75,6 +77,12 @@
5250 CrestCache.getInstance().reload();
5251 player.sendMessage("Crests have been reloaded.");
5252 }
5253+ else if (type.startsWith("tournamentarena"))
5254+ {
5255+ TournamentArenaParser.getInstance().reload();
5256+ player.sendMessage("The content of Tournament arenas.xml has been reloaded.");
5257+ }
5258+
5259 else if (type.startsWith("cw"))
5260 {
5261 CursedWeaponManager.getInstance().reload();
5262diff --git java/net/sf/l2j/gameserver/model/WorldObject.java java/net/sf/l2j/gameserver/model/WorldObject.java
5263index 2bb4d4a..90f3e13 100644
5264--- java/net/sf/l2j/gameserver/model/WorldObject.java
5265+++ java/net/sf/l2j/gameserver/model/WorldObject.java
5266@@ -15,12 +15,16 @@
5267 import net.sf.l2j.gameserver.model.actor.Creature;
5268 import net.sf.l2j.gameserver.model.actor.Playable;
5269 import net.sf.l2j.gameserver.model.actor.Player;
5270+import net.sf.l2j.gameserver.model.actor.instance.Fence;
5271 import net.sf.l2j.gameserver.model.boat.BoatItinerary;
5272 import net.sf.l2j.gameserver.model.location.Location;
5273 import net.sf.l2j.gameserver.model.location.SpawnLocation;
5274 import net.sf.l2j.gameserver.model.zone.type.subtype.ZoneType;
5275 import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
5276
5277+import Base.Instance.Instance;
5278+import Base.Instance.InstanceManager;
5279+
5280 /**
5281 * Mother class of all interactive objects in the world (PC, NPC, Item...)
5282 */
5283@@ -399,6 +403,18 @@
5284 }
5285 }
5286
5287+
5288+
5289+ for (WorldObject object : getDifferentInstanceObjects())
5290+ {
5291+ object.removeKnownObject(this);
5292+ removeKnownObject(object);
5293+ }
5294+
5295+
5296+
5297+
5298+
5299 // For every new surrounding area NOT SHARED with old surrounding areas.
5300 for (WorldRegion region : newAreas)
5301 {
5302@@ -411,7 +427,8 @@
5303 // Update all objects.
5304 for (WorldObject obj : region.getObjects())
5305 {
5306- if (obj == this)
5307+ // if (obj == this)
5308+ if (obj == this || obj.getInstance().getId() != getInstance().getId())
5309 continue;
5310
5311 obj.addKnownObject(this);
5312@@ -494,6 +511,11 @@
5313 if (obj == this || !type.isAssignableFrom(obj.getClass()))
5314 continue;
5315
5316+
5317+ if (obj.getInstance().getId() != getInstance().getId() && !(obj instanceof Fence))
5318+ continue;
5319+
5320+
5321 result.add((A) obj);
5322 }
5323 }
5324@@ -524,6 +546,12 @@
5325 if (obj == this || !type.isAssignableFrom(obj.getClass()) || !predicate.test((A) obj))
5326 continue;
5327
5328+
5329+ if (obj.getInstance().getId() != getInstance().getId() && !(obj instanceof Fence))
5330+ continue;
5331+
5332+
5333+
5334 result.add((A) obj);
5335 }
5336 }
5337@@ -814,4 +842,50 @@
5338 {
5339
5340 }
5341+
5342+
5343+
5344+ // Rouxy: Instance
5345+ private Instance _instance = InstanceManager.getInstance().getInstance(0);
5346+
5347+ public void setInstance(Instance instance, boolean silent)
5348+ {
5349+ _instance = instance;
5350+
5351+ if (!silent)
5352+ {
5353+ decayMe();
5354+ spawnMe();
5355+ }
5356+ }
5357+
5358+ public Instance getInstance()
5359+ {
5360+ return _instance;
5361+ }
5362+
5363+ private final List<WorldObject> getDifferentInstanceObjects()
5364+ {
5365+ final WorldRegion region = _region;
5366+ if (region == null)
5367+ return Collections.emptyList();
5368+
5369+ final List<WorldObject> result = new ArrayList<>();
5370+
5371+ for (WorldRegion reg : region.getSurroundingRegions())
5372+ {
5373+ for (WorldObject obj : reg.getObjects())
5374+ {
5375+ if (obj == this || obj.getInstance().getId() == getInstance().getId() || obj instanceof Fence)
5376+ continue;
5377+
5378+ result.add(obj);
5379+ }
5380+ }
5381+
5382+ return result;
5383+ }
5384+
5385+
5386+
5387 }
5388\ No newline at end of file
5389diff --git java/net/sf/l2j/gameserver/model/actor/Player.java java/net/sf/l2j/gameserver/model/actor/Player.java
5390index 6aaf342..93586b7 100644
5391--- java/net/sf/l2j/gameserver/model/actor/Player.java
5392+++ java/net/sf/l2j/gameserver/model/actor/Player.java
5393@@ -67,6 +67,7 @@
5394 import net.sf.l2j.gameserver.enums.PrivilegeType;
5395 import net.sf.l2j.gameserver.enums.PunishmentType;
5396 import net.sf.l2j.gameserver.enums.RestartType;
5397+import net.sf.l2j.gameserver.enums.SayType;
5398 import net.sf.l2j.gameserver.enums.ShortcutType;
5399 import net.sf.l2j.gameserver.enums.SpawnType;
5400 import net.sf.l2j.gameserver.enums.StatusType;
5401@@ -171,6 +172,7 @@
5402 import net.sf.l2j.gameserver.network.serverpackets.ChangeWaitType;
5403 import net.sf.l2j.gameserver.network.serverpackets.CharInfo;
5404 import net.sf.l2j.gameserver.network.serverpackets.ConfirmDlg;
5405+import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;
5406 import net.sf.l2j.gameserver.network.serverpackets.DeleteObject;
5407 import net.sf.l2j.gameserver.network.serverpackets.EnchantResult;
5408 import net.sf.l2j.gameserver.network.serverpackets.EtcStatusUpdate;
5409@@ -182,6 +184,7 @@
5410 import net.sf.l2j.gameserver.network.serverpackets.ExStorageMaxCount;
5411 import net.sf.l2j.gameserver.network.serverpackets.HennaInfo;
5412 import net.sf.l2j.gameserver.network.serverpackets.InventoryUpdate;
5413+import net.sf.l2j.gameserver.network.serverpackets.ItemList;
5414 import net.sf.l2j.gameserver.network.serverpackets.L2GameServerPacket;
5415 import net.sf.l2j.gameserver.network.serverpackets.LeaveWorld;
5416 import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
5417@@ -239,6 +242,13 @@
5418 import net.sf.l2j.gameserver.taskmanager.ShadowItemTaskManager;
5419 import net.sf.l2j.gameserver.taskmanager.WaterTaskManager;
5420 import net.sf.l2j.util.CustomMessage;
5421+import net.sf.l2j.util.Mysql;
5422+import net.sf.l2j.util.PlayerVar;
5423+import net.sf.l2j.util.PlayerVariables;
5424+
5425+import Base.Tournament.Enums.TournamentFightType;
5426+import Base.Tournament.Manager.TournamentManager;
5427+import Base.Tournament.Model.TournamentTeam;
5428
5429
5430
5431@@ -2062,6 +2072,8 @@
5432 return null;
5433 }
5434
5435+ item.setInstance(getInstance(), true); // True because Drop me will spawn it
5436+
5437 item.dropMe(this, x, y, z);
5438
5439 // Send message to client, if requested.
5440@@ -2662,6 +2674,7 @@
5441 if (killer != null)
5442 {
5443 final Player pk = killer.getActingPlayer();
5444+ TournamentManager.getInstance().onKill(killer, this);
5445
5446 if (pk != null)
5447 {
5448@@ -4316,6 +4329,9 @@
5449 player.getStatus().stopHpMpRegeneration();
5450 }
5451
5452+ PlayerVariables.loadVariables(player);
5453+ TournamentManager.getInstance().onPlayerEnter(player);
5454+
5455 if (Config.RESTORE_STORE_ITEMS)
5456 player.restoreStoreList();
5457
5458@@ -6809,6 +6825,9 @@
5459
5460 if (isInOlympiadMode() && target instanceof Player && ((Player) target).isInOlympiadMode() && ((Player) target).getOlympiadGameId() == getOlympiadGameId())
5461 OlympiadGameManager.getInstance().notifyCompetitorDamage(this, damage);
5462+
5463+ if (isInTournamentMatch() && target instanceof Player && ((Player) target).isInTournamentMatch() && ((Player) target).getTournamentFightId() == getTournamentFightId())
5464+ addTournamentMatchDamage(damage);
5465 }
5466
5467 public void checkItemRestriction()
5468@@ -7859,7 +7878,468 @@
5469
5470
5471
5472-
5473+ // Rouxy: Daily Reward
5474+ /**
5475+ * @return the nextRewardTime
5476+ */
5477+ public long getNextRewardTime()
5478+ {
5479+ return nextRewardTime;
5480+ }
5481+
5482+ /**
5483+ * @param nextRewardTime the nextRewardTime to set
5484+ */
5485+ public void setNextRewardTime(long nextRewardTime)
5486+ {
5487+ this.nextRewardTime = nextRewardTime;
5488+ }
5489+
5490+ private long nextRewardTime;
5491+
5492+ // Rouxy: Tournament
5493+
5494+ private boolean tournamentTeamBeingInvited;
5495+ private int tournamentFightId;
5496+ private TournamentFightType tournamentFightType = TournamentFightType.NONE;
5497+ private boolean inTournamentMatch;
5498+ private int lastX;
5499+ private int lastY;
5500+ private int lastZ;
5501+ private int tournamentPoints;
5502+ private int tournamentMatchDamage;
5503+ private Map<TournamentFightType, Integer> tournamentKills = new HashMap<>();
5504+ private Map<TournamentFightType, Integer> tournamentVictories = new HashMap<>();
5505+ private Map<TournamentFightType, Integer> tournamentDefeats = new HashMap<>();
5506+ private Map<TournamentFightType, Integer> tournamentTies = new HashMap<>();
5507+ private Map<TournamentFightType, Integer> tournamentDamage = new HashMap<>();
5508+
5509+ public int getTournamentTotalDamage()
5510+ {
5511+ int count = 0;
5512+ for (Map.Entry<TournamentFightType, Integer> entry : tournamentDamage.entrySet())
5513+ {
5514+ count += entry.getValue();
5515+ }
5516+ return count;
5517+ }
5518+
5519+ public int getTournamentTotalDamage(TournamentFightType type)
5520+ {
5521+ return tournamentDamage.get(type);
5522+ }
5523+
5524+ public int getTotalVictories()
5525+ {
5526+ int count = 0;
5527+ for (Map.Entry<TournamentFightType, Integer> entry : tournamentVictories.entrySet())
5528+ {
5529+ count += entry.getValue();
5530+ }
5531+ return count;
5532+ }
5533+
5534+ public int getTotalDefeats()
5535+ {
5536+ int count = 0;
5537+ for (Map.Entry<TournamentFightType, Integer> entry : tournamentDefeats.entrySet())
5538+ {
5539+ count += entry.getValue();
5540+ }
5541+ return count;
5542+ }
5543+
5544+ public int getTotalTies()
5545+ {
5546+ int count = 0;
5547+ for (Map.Entry<TournamentFightType, Integer> entry : tournamentTies.entrySet())
5548+ {
5549+ count += entry.getValue();
5550+ }
5551+ return count;
5552+ }
5553+
5554+ /**
5555+ * @return Total of fights done by player
5556+ */
5557+ public int getTotalTournamentFightsDone()
5558+ {
5559+ return getTournamentFightsDone(TournamentFightType.F1X1) + getTournamentFightsDone(TournamentFightType.F2X2) + getTournamentFightsDone(TournamentFightType.F3X3) + getTournamentFightsDone(TournamentFightType.F4X4) + getTournamentFightsDone(TournamentFightType.F5X5) + getTournamentFightsDone(TournamentFightType.F9X9);
5560+ }
5561+
5562+ /**
5563+ * @param type
5564+ * @return Total of fights of type done by player
5565+ */
5566+ public int getTournamentFightsDone(TournamentFightType type)
5567+ {
5568+ return tournamentVictories.get(type) + tournamentDefeats.get(type) + tournamentTies.get(type);
5569+ }
5570+
5571+ /**
5572+ * @return if player is in a registered team o tournament
5573+ */
5574+ public boolean isInTournamentMode()
5575+ {
5576+ return TournamentManager.getInstance().isInTournamentMode(this);
5577+ }
5578+
5579+ public TournamentTeam getTournamentTeam()
5580+ {
5581+ return tournamentTeam;
5582+ }
5583+
5584+ public void setTournamentTeam(TournamentTeam tournamentTeam)
5585+ {
5586+ this.tournamentTeam = tournamentTeam;
5587+ }
5588+
5589+ private TournamentTeam tournamentTeam;
5590+
5591+ public boolean isInTournamentTeam()
5592+ {
5593+ return getTournamentTeam() != null;
5594+ }
5595+
5596+ /**
5597+ * @return if player received a invitation to a tour team
5598+ */
5599+ public boolean isTournamentTeamBeingInvited()
5600+ {
5601+ return tournamentTeamBeingInvited;
5602+ }
5603+
5604+ public void setTournamentTeamBeingInvited(boolean tournamentTeamBeingInvited)
5605+ {
5606+ this.tournamentTeamBeingInvited = tournamentTeamBeingInvited;
5607+ }
5608+
5609+ public int getTournamentFightId()
5610+ {
5611+ return tournamentFightId;
5612+ }
5613+
5614+ public void setTournamentFightId(int tournamentFightId)
5615+ {
5616+ this.tournamentFightId = tournamentFightId;
5617+ }
5618+
5619+ public TournamentFightType getTournamentFightType()
5620+ {
5621+ return tournamentFightType;
5622+ }
5623+
5624+ public void setTournamentFightType(TournamentFightType tournamentFightType)
5625+ {
5626+ this.tournamentFightType = tournamentFightType;
5627+ }
5628+
5629+ /**
5630+ * @return the inTournamentMatch
5631+ */
5632+ public boolean isInTournamentMatch()
5633+ {
5634+ return inTournamentMatch;
5635+ }
5636+
5637+ /**
5638+ * @param inTournamentMatch the inTournamentMatch to set
5639+ */
5640+ public void setInTournamentMatch(boolean inTournamentMatch)
5641+ {
5642+ this.inTournamentMatch = inTournamentMatch;
5643+ }
5644+
5645+ /**
5646+ * @return the lastX
5647+ */
5648+ public int getLastX()
5649+ {
5650+ return lastX;
5651+ }
5652+
5653+ /**
5654+ * @param lastX the lastX to set
5655+ */
5656+ public void setLastX(int lastX)
5657+ {
5658+ this.lastX = lastX;
5659+ }
5660+
5661+ /**
5662+ * @return the lastY
5663+ */
5664+ public int getLastY()
5665+ {
5666+ return lastY;
5667+ }
5668+
5669+ /**
5670+ * @param lastY the lastY to set
5671+ */
5672+ public void setLastY(int lastY)
5673+ {
5674+ this.lastY = lastY;
5675+ }
5676+
5677+ /**
5678+ * @return the lastZ
5679+ */
5680+ public int getLastZ()
5681+ {
5682+ return lastZ;
5683+ }
5684+
5685+ /**
5686+ * @param lastZ the lastZ to set
5687+ */
5688+ public void setLastZ(int lastZ)
5689+ {
5690+ this.lastZ = lastZ;
5691+ }
5692+
5693+ /**
5694+ * @return the tournamentMatchDamage
5695+ */
5696+ public int getTournamentMatchDamage()
5697+ {
5698+ return tournamentMatchDamage;
5699+ }
5700+
5701+ public void addTournamentMatchDamage(int damage)
5702+ {
5703+ tournamentMatchDamage += damage;
5704+ }
5705+
5706+ /**
5707+ * @param tournamentMatchDamage the tournamentMatchDamage to set
5708+ */
5709+ public void setTournamentMatchDamage(int tournamentMatchDamage)
5710+ {
5711+ this.tournamentMatchDamage = tournamentMatchDamage;
5712+ }
5713+
5714+ /**
5715+ * @return the tournamentKills
5716+ */
5717+ public Map<TournamentFightType, Integer> getTournamentKills()
5718+ {
5719+ return tournamentKills;
5720+ }
5721+
5722+ /**
5723+ * @param tournamentKills the tournamentKills to set
5724+ */
5725+ public void setTournamentKills(Map<TournamentFightType, Integer> tournamentKills)
5726+ {
5727+ this.tournamentKills = tournamentKills;
5728+ }
5729+
5730+ public void addTournamentTie(TournamentFightType type)
5731+ {
5732+ increment(tournamentTies, type);
5733+ }
5734+
5735+ public void addTournamentDefeat(TournamentFightType type)
5736+ {
5737+ increment(tournamentDefeats, type);
5738+ }
5739+
5740+ public void addTournamentVictory(TournamentFightType type)
5741+ {
5742+ increment(tournamentVictories, type);
5743+ }
5744+
5745+ public void addTournamentKill(TournamentFightType type)
5746+ {
5747+ increment(tournamentKills, type);
5748+ }
5749+
5750+ public static <K> void increment(Map<K, Integer> map, K key)
5751+ {
5752+ map.merge(key, 1, Integer::sum);
5753+
5754+ }
5755+
5756+ public void addTournamentDamage(TournamentFightType type, int damage)
5757+ {
5758+ increment(tournamentDamage, type, damage);
5759+ }
5760+
5761+ public static <K> void increment(Map<K, Integer> map, K key, int toIncrement)
5762+ {
5763+
5764+ int val = map.get(key);
5765+ map.put(key, val + toIncrement);
5766+ }
5767+
5768+ /**
5769+ * @return all kills of plaer in tournament
5770+ */
5771+ public int getTotalTournamentKills()
5772+ {
5773+ int kills = 0;
5774+ for (Map.Entry<TournamentFightType, Integer> entry : tournamentKills.entrySet())
5775+ {
5776+ kills += entry.getValue();
5777+ }
5778+ return kills;
5779+ }
5780+
5781+ /**
5782+ * @return the tournamentVictories
5783+ */
5784+ public Map<TournamentFightType, Integer> getTournamentVictories()
5785+ {
5786+ return tournamentVictories;
5787+ }
5788+
5789+ /**
5790+ * @param tournamentVictories the tournamentVictories to set
5791+ */
5792+ public void setTournamentVictories(Map<TournamentFightType, Integer> tournamentVictories)
5793+ {
5794+ this.tournamentVictories = tournamentVictories;
5795+ }
5796+
5797+ /**
5798+ * @return the tournamentDefeats
5799+ */
5800+ public Map<TournamentFightType, Integer> getTournamentDefeats()
5801+ {
5802+ return tournamentDefeats;
5803+ }
5804+
5805+ /**
5806+ * @param tournamentDefeats the tournamentDefeats to set
5807+ */
5808+ public void setTournamentDefeats(Map<TournamentFightType, Integer> tournamentDefeats)
5809+ {
5810+ this.tournamentDefeats = tournamentDefeats;
5811+ }
5812+
5813+ /**
5814+ * @return the tournamentTies
5815+ */
5816+ public Map<TournamentFightType, Integer> getTournamentTies()
5817+ {
5818+ return tournamentTies;
5819+ }
5820+
5821+ /**
5822+ * @param tournamentTies the tournamentTies to set
5823+ */
5824+ public void setTournamentTies(Map<TournamentFightType, Integer> tournamentTies)
5825+ {
5826+ this.tournamentTies = tournamentTies;
5827+ }
5828+
5829+ public void storeTournament()
5830+ {
5831+
5832+ }
5833+
5834+ /**
5835+ * @return the tournamentDamage
5836+ */
5837+ public Map<TournamentFightType, Integer> getTournamentDamage()
5838+ {
5839+ return tournamentDamage;
5840+ }
5841+
5842+ /**
5843+ * @param tournamentDamage the tournamentDamage to set
5844+ */
5845+ public void setTournamentDamage(Map<TournamentFightType, Integer> tournamentDamage)
5846+ {
5847+ this.tournamentDamage = tournamentDamage;
5848+ }
5849+
5850+ /**
5851+ * @return the tournamentPoints
5852+ */
5853+ public int getTournamentPoints()
5854+ {
5855+ return tournamentPoints;
5856+ }
5857+
5858+ /**
5859+ * @param tournamentPoints the tournamentPoints to set
5860+ */
5861+ public void setTournamentPoints(int tournamentPoints)
5862+ {
5863+ this.tournamentPoints = tournamentPoints;
5864+ }
5865+
5866+ /**
5867+ * @return the tournamentTeamRequesterId
5868+ */
5869+ public int getTournamentTeamRequesterId()
5870+ {
5871+ return tournamentTeamRequesterId;
5872+ }
5873+
5874+ /**
5875+ * @param tournamentTeamRequesterId the tournamentTeamRequesterId to set
5876+ */
5877+ public void setTournamentTeamRequesterId(int tournamentTeamRequesterId)
5878+ {
5879+ this.tournamentTeamRequesterId = tournamentTeamRequesterId;
5880+ }
5881+
5882+ private int tournamentTeamRequesterId;
5883+
5884+ // player variables
5885+ private final Map<String, PlayerVar> vars = new ConcurrentHashMap<>();
5886+
5887+ /**
5888+ * @return player memos.
5889+ */
5890+ public Map<String, PlayerVar> getVariables()
5891+ {
5892+ return vars;
5893+ }
5894+
5895+ public void deleteTempItem(int itemObjectID)
5896+ {
5897+ boolean destroyed = false;
5898+ if (getInventory().getItemByObjectId(itemObjectID) != null)
5899+ {
5900+ sendMessage("Your " + ItemData.getInstance().getTemplate(getInventory().getItemByObjectId(itemObjectID).getItemId()).getName() + " has expired.");
5901+ destroyItem("tempItemDestroy", itemObjectID, 1, this, true);
5902+
5903+ sendPacket(new ItemList(this, true));
5904+
5905+ destroyed = true;
5906+ }
5907+
5908+ if (!destroyed)
5909+ {
5910+ Connection con = null;
5911+ PreparedStatement statement = null;
5912+ ResultSet rset = null;
5913+ try
5914+ {
5915+ con = ConnectionPool.getConnection();
5916+ statement = con.prepareStatement("DELETE FROM items WHERE object_id=?");
5917+ statement.setInt(1, itemObjectID);
5918+ statement.execute();
5919+ }
5920+ catch (Exception e)
5921+ {
5922+ e.printStackTrace();
5923+ }
5924+ finally
5925+ {
5926+ Mysql.closeQuietly(con, statement, rset);
5927+ }
5928+ }
5929+ }
5930+
5931+ public void sendChatMessage(int objectId, SayType messageType, String charName, String text)
5932+ {
5933+ sendPacket(new CreatureSay(objectId, messageType, charName, text));
5934+ }
5935
5936
5937
5938diff --git java/net/sf/l2j/gameserver/model/actor/cast/PlayableCast.java java/net/sf/l2j/gameserver/model/actor/cast/PlayableCast.java
5939index 39e9d29..41653ff 100644
5940--- java/net/sf/l2j/gameserver/model/actor/cast/PlayableCast.java
5941+++ java/net/sf/l2j/gameserver/model/actor/cast/PlayableCast.java
5942@@ -1,5 +1,6 @@
5943 package net.sf.l2j.gameserver.model.actor.cast;
5944
5945+import net.sf.l2j.Config;
5946 import net.sf.l2j.gameserver.enums.skills.SkillType;
5947 import net.sf.l2j.gameserver.model.actor.Creature;
5948 import net.sf.l2j.gameserver.model.actor.Playable;
5949@@ -70,6 +71,16 @@
5950 if (!skill.checkCondition(_actor, target, false))
5951 return false;
5952
5953+ if (_actor.getActingPlayer().isInTournamentMatch())
5954+ {
5955+ if (Config.TOURNAMENT_RESTRICTED_SKILL_LIST.contains(skill.getId()))
5956+ {
5957+ _actor.sendMessage("You can't use this skill in Tournament.");
5958+ return false;
5959+ }
5960+ }
5961+
5962+
5963 final Player player = _actor.getActingPlayer();
5964
5965 if (player.isInOlympiadMode() && (skill.isHeroSkill() || skill.getSkillType() == SkillType.RESURRECT))
5966diff --git java/net/sf/l2j/gameserver/model/actor/instance/Door.java java/net/sf/l2j/gameserver/model/actor/instance/Door.java
5967index f35d09a..2bf5cca 100644
5968--- java/net/sf/l2j/gameserver/model/actor/instance/Door.java
5969+++ java/net/sf/l2j/gameserver/model/actor/instance/Door.java
5970@@ -464,4 +464,15 @@
5971 _npcMakers.remove(npcMaker);
5972 _npcMakers.add(npcMaker);
5973 }
5974+
5975+
5976+ @Override
5977+ public int getInstanceID()
5978+ {
5979+ if (getDoorId() == 17100001 || getDoorId() == 17100002 || getDoorId() == 17100101 || getDoorId() == 17100102 || getDoorId() == 17100201 || getDoorId() == 17100202 || getDoorId() == 17100301 || getDoorId() == 17100302)
5980+ return 2140000000;
5981+
5982+ return getInstance().getId();
5983+ }
5984+
5985 }
5986\ No newline at end of file
5987diff --git java/net/sf/l2j/gameserver/model/actor/instance/Fence.java java/net/sf/l2j/gameserver/model/actor/instance/Fence.java
5988index cd75ae9..6c5c189 100644
5989--- java/net/sf/l2j/gameserver/model/actor/instance/Fence.java
5990+++ java/net/sf/l2j/gameserver/model/actor/instance/Fence.java
5991@@ -142,4 +142,12 @@
5992 player.sendPacket(new ExColosseumFenceInfo(getObjectId(), _fence));
5993 }
5994 }
5995+
5996+ @Override
5997+ public int getInstanceID()
5998+ {
5999+
6000+ return getInstance().getId();
6001+ }
6002+
6003 }
6004\ No newline at end of file
6005diff --git java/net/sf/l2j/gameserver/model/actor/instance/Monster.java java/net/sf/l2j/gameserver/model/actor/instance/Monster.java
6006index dbdcbaf..b2319ca 100644
6007--- java/net/sf/l2j/gameserver/model/actor/instance/Monster.java
6008+++ java/net/sf/l2j/gameserver/model/actor/instance/Monster.java
6009@@ -628,6 +628,7 @@
6010 final ItemInstance item = ItemInstance.create(holder.getId(), holder.getValue(), player, this);
6011 if (player != null)
6012 item.setDropProtection(player.getObjectId(), isRaidBoss());
6013+ item.setInstance(getInstance(), false);
6014 item.dropMe(this, 70);
6015
6016 // If stackable, end loop as entire count is included in 1 instance of item.
6017diff --git java/net/sf/l2j/gameserver/model/actor/instance/SchemeBuffer.java java/net/sf/l2j/gameserver/model/actor/instance/SchemeBuffer.java
6018index 5f5f47d..d0f0bd3 100644
6019--- java/net/sf/l2j/gameserver/model/actor/instance/SchemeBuffer.java
6020+++ java/net/sf/l2j/gameserver/model/actor/instance/SchemeBuffer.java
6021@@ -22,21 +22,13 @@
6022 public class SchemeBuffer extends Folk
6023 {
6024 private static final int PAGE_LIMIT = 6;
6025- private static SchemeBuffer _instance = null;
6026-
6027+
6028 public SchemeBuffer(int objectId, NpcTemplate template)
6029 {
6030 super(objectId, template);
6031 }
6032
6033- public static SchemeBuffer getInstance()
6034- {
6035- if (_instance == null)
6036- {
6037- _instance = new SchemeBuffer(0, null);
6038- }
6039- return _instance;
6040- }
6041+
6042
6043
6044 @Override
6045diff --git java/net/sf/l2j/gameserver/model/actor/instance/TournamentNpc.java java/net/sf/l2j/gameserver/model/actor/instance/TournamentNpc.java
6046new file mode 100644
6047index 0000000..5295334
6048--- /dev/null
6049+++ java/net/sf/l2j/gameserver/model/actor/instance/TournamentNpc.java
6050@@ -0,0 +1,40 @@
6051+package net.sf.l2j.gameserver.model.actor.instance;
6052+
6053+import net.sf.l2j.gameserver.model.actor.Player;
6054+import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
6055+
6056+import Base.Tournament.Enums.TournamentFightType;
6057+import Base.Tournament.Manager.TournamentManager;
6058+
6059+
6060+/**
6061+ * @author Rouxy
6062+ */
6063+public class TournamentNpc extends Folk
6064+{
6065+ public TournamentNpc(final int objectId, final NpcTemplate template)
6066+ {
6067+ super(objectId, template);
6068+ }
6069+
6070+ @Override
6071+ public void showChatWindow(Player player)
6072+ {
6073+ TournamentManager.getInstance().showHtml(player, "main", TournamentFightType.NONE);
6074+ }
6075+
6076+ @Override
6077+ public String getHtmlPath(Player id, final int npcId, final int val)
6078+ {
6079+ String pom = "";
6080+ if (val == 0)
6081+ {
6082+ pom = "" + npcId;
6083+ }
6084+ else
6085+ {
6086+ pom = npcId + "-" + val;
6087+ }
6088+ return "data/html/en/mods/tournament/" + pom + ".htm";
6089+ }
6090+}
6091\ No newline at end of file
6092diff --git java/net/sf/l2j/gameserver/model/entity/Tournament/ByPasses/TournamentBypasses.java java/net/sf/l2j/gameserver/model/entity/Tournament/ByPasses/TournamentBypasses.java
6093new file mode 100644
6094index 0000000..0e5a5dc
6095--- /dev/null
6096+++ java/net/sf/l2j/gameserver/model/entity/Tournament/ByPasses/TournamentBypasses.java
6097@@ -0,0 +1,445 @@
6098+package net.sf.l2j.gameserver.model.entity.Tournament.ByPasses;
6099+
6100+import java.util.StringTokenizer;
6101+
6102+import net.sf.l2j.gameserver.data.sql.PlayerInfoTable;
6103+import net.sf.l2j.gameserver.handler.IBypassHandler;
6104+import net.sf.l2j.gameserver.model.World;
6105+import net.sf.l2j.gameserver.model.actor.Player;
6106+
6107+import Base.Tournament.Enums.TournamentFightType;
6108+import Base.Tournament.Manager.TournamentManager;
6109+import Base.Tournament.Matches.TournamentMatch1x1;
6110+import Base.Tournament.Matches.TournamentMatch2x2;
6111+import Base.Tournament.Matches.TournamentMatch3x3;
6112+import Base.Tournament.Matches.TournamentMatch4x4;
6113+import Base.Tournament.Matches.TournamentMatch5x5;
6114+import Base.Tournament.Matches.TournamentMatch9x9;
6115+import Base.Tournament.Model.TournamentTeam;
6116+
6117+
6118+public class TournamentBypasses implements IBypassHandler
6119+{
6120+
6121+ @Override
6122+ public boolean handleBypass(String bypass, Player player)
6123+ {
6124+ StringTokenizer st = new StringTokenizer(bypass, " ");
6125+ st.nextToken();
6126+ TournamentTeam team = player.getTournamentTeam();
6127+
6128+ if (bypass.startsWith("bp_tournamentTeamInfo"))
6129+ {
6130+ if (team != null)
6131+ {
6132+ TournamentManager.getInstance().showHtml(player, "createTeam", TournamentFightType.F2X2);
6133+ }
6134+ else
6135+ {
6136+ player.sendMessage("First you must create a new Tournament Team.");
6137+ }
6138+ }
6139+ if (bypass.startsWith("bp_leaveTournamentTeam"))
6140+ {
6141+ if (team != null)
6142+ {
6143+ team.removeMember(player);
6144+ }
6145+ else
6146+ {
6147+ player.sendMessage("You haven't a Team.");
6148+ }
6149+ }
6150+ if (bypass.startsWith("bp_registerTournament1x1"))
6151+ {
6152+ TournamentManager.getInstance().showHtml(player, "fights/F1X1", TournamentFightType.F1X1);
6153+ if (!TournamentManager.getInstance().isRunning())
6154+ {
6155+ player.sendMessage("Tournament isn't Running!");
6156+ return false;
6157+ }
6158+ if (!player.isInTournamentTeam())
6159+ {
6160+ team = new TournamentTeam(player, null);
6161+ }
6162+
6163+ if (!TournamentMatch1x1.getInstance().checkConditions(team))
6164+ {
6165+ return false;
6166+ }
6167+ if (TournamentManager.getInstance().getRegisteredTournamentTeams().containsKey(team))
6168+ {
6169+ player.sendMessage("Your team already registered.");
6170+ return true;
6171+ }
6172+
6173+ if (team.getLeader() != player)
6174+ {
6175+ player.sendMessage("Only Leaders can register.");
6176+ return false;
6177+ }
6178+
6179+ if (TournamentMatch1x1.getInstance().register(team))
6180+ {
6181+ team.sendMessage("Your are on the 1x1 waiting list. ");
6182+ return true;
6183+ }
6184+
6185+ }
6186+ if (bypass.startsWith("bp_registerTournament2x2"))
6187+ {
6188+ if (!TournamentManager.getInstance().isRunning())
6189+ {
6190+ player.sendMessage("Tournament isn't Running!");
6191+ return false;
6192+ }
6193+ if (!player.isInTournamentTeam() || player.getTournamentTeam().getMembers().size() < 2)
6194+ {
6195+ player.sendMessage("You need to invite 1 players to register this mode.");
6196+ }
6197+ else
6198+ {
6199+ if (!TournamentMatch2x2.getInstance().checkConditions(team))
6200+ {
6201+ return false;
6202+ }
6203+ if (TournamentManager.getInstance().getRegisteredTournamentTeams().containsKey(team))
6204+ {
6205+ player.sendMessage("Your team already registered.");
6206+ return true;
6207+ }
6208+
6209+ if (team.getLeader() != player)
6210+ {
6211+ player.sendMessage("Only Leaders can register.");
6212+ return false;
6213+ }
6214+
6215+ if (TournamentMatch2x2.getInstance().register(team))
6216+ {
6217+ team.sendMessage("Your team is on the 2x2 waiting list. ");
6218+ return true;
6219+ }
6220+ }
6221+ TournamentManager.getInstance().showHtml(player, "fights/F2X2", TournamentFightType.F2X2);
6222+
6223+ }
6224+ if (bypass.startsWith("bp_registerTournament3x3"))
6225+ {
6226+ if (!TournamentManager.getInstance().isRunning())
6227+ {
6228+ player.sendMessage("Tournament isn't Running!");
6229+ return false;
6230+ }
6231+ if (!player.isInTournamentTeam() || player.getTournamentTeam().getMembers().size() < 3)
6232+ {
6233+ player.sendMessage("You need to invite 2 players to register this mode.");
6234+ }
6235+ else
6236+ {
6237+ if (!TournamentMatch3x3.getInstance().checkConditions(team))
6238+ {
6239+ return false;
6240+ }
6241+ if (TournamentManager.getInstance().getRegisteredTournamentTeams().containsKey(team))
6242+ {
6243+ player.sendMessage("Your team already registered.");
6244+ return true;
6245+ }
6246+
6247+ if (team.getLeader() != player)
6248+ {
6249+ player.sendMessage("Only Leaders can register.");
6250+ return false;
6251+ }
6252+
6253+ if (TournamentMatch3x3.getInstance().register(team))
6254+ {
6255+ team.sendMessage("Your team is on the 3x3 waiting list. ");
6256+ return true;
6257+ }
6258+
6259+ }
6260+ TournamentManager.getInstance().showHtml(player, "fights/F3X3", TournamentFightType.F3X3);
6261+
6262+ }
6263+
6264+ if (bypass.startsWith("bp_registerTournament4x4"))
6265+ {
6266+ if (!TournamentManager.getInstance().isRunning())
6267+ {
6268+ player.sendMessage("Tournament isn't Running!");
6269+ return false;
6270+ }
6271+ if (!player.isInTournamentTeam() || player.getTournamentTeam().getMembers().size() < 4)
6272+ {
6273+ player.sendMessage("You need to invite 3 players to register this mode.");
6274+ }
6275+ else
6276+ {
6277+ if (!TournamentMatch3x3.getInstance().checkConditions(team))
6278+ {
6279+ return false;
6280+ }
6281+ if (TournamentManager.getInstance().getRegisteredTournamentTeams().containsKey(team))
6282+ {
6283+ player.sendMessage("Your team already registered.");
6284+ return true;
6285+ }
6286+
6287+ if (team.getLeader() != player)
6288+ {
6289+ player.sendMessage("Only Leaders can register.");
6290+ return false;
6291+ }
6292+
6293+ if (TournamentMatch4x4.getInstance().register(team))
6294+ {
6295+ team.sendMessage("Your team is on the 4x4 waiting list. ");
6296+ return true;
6297+ }
6298+ }
6299+ TournamentManager.getInstance().showHtml(player, "fights/F4X4", TournamentFightType.F4X4);
6300+
6301+ }
6302+
6303+ if (bypass.startsWith("bp_registerTournament5x5"))
6304+ {
6305+ if (!TournamentManager.getInstance().isRunning())
6306+ {
6307+ player.sendMessage("Tournament isn't Running!");
6308+ return false;
6309+ }
6310+ if (!player.isInTournamentTeam() || player.getTournamentTeam().getMembers().size() < 5)
6311+ {
6312+ player.sendMessage("You need to invite 4 players to register this mode.");
6313+ }
6314+ else
6315+ {
6316+ if (!TournamentMatch3x3.getInstance().checkConditions(team))
6317+ {
6318+ return false;
6319+ }
6320+ if (TournamentManager.getInstance().getRegisteredTournamentTeams().containsKey(team))
6321+ {
6322+ player.sendMessage("Your team already registered.");
6323+ return true;
6324+ }
6325+
6326+ if (team.getLeader() != player)
6327+ {
6328+ player.sendMessage("Only Leaders can register.");
6329+ return false;
6330+ }
6331+
6332+ if (TournamentMatch5x5.getInstance().register(team))
6333+ {
6334+ team.sendMessage("Your team is on the 5x5 waiting list. ");
6335+ return true;
6336+ }
6337+ }
6338+ TournamentManager.getInstance().showHtml(player, "fights/F5X5", TournamentFightType.F5X5);
6339+
6340+ }
6341+
6342+ if (bypass.startsWith("bp_registerTournament9x9"))
6343+ {
6344+ if (!TournamentManager.getInstance().isRunning())
6345+ {
6346+ player.sendMessage("Tournament isn't Running!");
6347+ return false;
6348+ }
6349+ if (!player.isInTournamentTeam() || player.getTournamentTeam().getMembers().size() < 9)
6350+ {
6351+ player.sendMessage("You need to invite 8 players to register this mode.");
6352+ }
6353+ else
6354+ {
6355+ if (!TournamentMatch3x3.getInstance().checkConditions(team))
6356+ {
6357+ return false;
6358+ }
6359+ if (TournamentManager.getInstance().getRegisteredTournamentTeams().containsKey(team))
6360+ {
6361+ player.sendMessage("Your team already registered.");
6362+ return true;
6363+ }
6364+
6365+ if (team.getLeader() != player)
6366+ {
6367+ player.sendMessage("Only Leaders can register.");
6368+ return false;
6369+ }
6370+
6371+ if (TournamentMatch9x9.getInstance().register(team))
6372+ {
6373+ team.sendMessage("Your team is on the 9x9 waiting list. ");
6374+ return true;
6375+ }
6376+ }
6377+ TournamentManager.getInstance().showHtml(player, "fights/F9X9", TournamentFightType.F9X9);
6378+
6379+ }
6380+ if (bypass.startsWith("bp_deleteTournamentTeam"))
6381+ {
6382+
6383+ if (team != null)
6384+ {
6385+ team.disbandTeam();
6386+ }
6387+ else
6388+ {
6389+ player.sendMessage("You haven't a Tournament Team.");
6390+ }
6391+ TournamentManager.getInstance().showHtml(player, "main", TournamentFightType.NONE);
6392+ }
6393+ if (bypass.startsWith("bp_inviteTournamentMember"))
6394+ {
6395+ if (!TournamentManager.getInstance().isRunning())
6396+ {
6397+ player.sendMessage("Tournament isn't Running!");
6398+ return false;
6399+ }
6400+ if (TournamentManager.getInstance().isTournamentTeleporting())
6401+ {
6402+ player.sendMessage("Tournament is teleportind players, wait 30 seconds to invite someone.");
6403+ return false;
6404+ }
6405+ String nextMemberName = st.nextToken();
6406+ Player nextMember = World.getInstance().getPlayer(nextMemberName);
6407+ if (nextMember == player)
6408+ {
6409+ player.sendMessage("You can't invite yourself!");
6410+ return false;
6411+ }
6412+
6413+ if (nextMember != null)
6414+ {
6415+ if (nextMember.isInTournamentTeam())
6416+ {
6417+ player.sendMessage("This player already in Tournament Team.");
6418+ return false;
6419+ }
6420+ if (nextMember.isInParty())
6421+ {
6422+ player.sendMessage("You can't players in party. Don't worry, party will be automatically created!");
6423+ return false;
6424+ }
6425+ if (team != null)
6426+ {
6427+ if (team.getLeader() != player)
6428+ {
6429+ player.sendMessage("Only Leaders can invite players.");
6430+ return false;
6431+ }
6432+ }
6433+ TournamentManager.getInstance().askJoinTeam(player, nextMember);
6434+ }
6435+ else
6436+ {
6437+ player.sendMessage("Player " + nextMemberName + " doesn't exists or is not online!");
6438+ return false;
6439+ }
6440+
6441+ }
6442+ if (bypass.startsWith("bp_removeTournamentParticipation"))
6443+ {
6444+ if (!TournamentManager.getInstance().isRunning())
6445+ {
6446+ player.sendMessage("Tournament isn't Running!");
6447+ return false;
6448+ }
6449+ if (team != null)
6450+ {
6451+ if (TournamentManager.getInstance().getRegisteredTournamentTeams().containsKey(team))
6452+ {
6453+ TournamentManager.getInstance().getRegisteredTournamentTeams().remove(team);
6454+ team.sendMessage("Your team have been removed from Tournament Waiting List");
6455+ }
6456+ else
6457+ {
6458+ player.sendMessage("Your team isn't registered.");
6459+ TournamentManager.getInstance().showHtml(player, "main", TournamentFightType.NONE);
6460+ return false;
6461+ }
6462+ }
6463+ else
6464+ {
6465+ player.sendMessage("You haven't a Tournament Team.");
6466+ }
6467+ TournamentManager.getInstance().showHtml(player, "main", TournamentFightType.NONE);
6468+
6469+ }
6470+
6471+ if (bypass.startsWith("bp_createTournamentTeam"))
6472+ {
6473+ if (!TournamentManager.getInstance().isRunning())
6474+ {
6475+ player.sendMessage("Tournament isn't Running!");
6476+ return false;
6477+ }
6478+ if (player.getTournamentTeam() != null)
6479+ {
6480+ player.sendMessage("You can't create a new Tournament Team.");
6481+ return false;
6482+ }
6483+
6484+ if (team == null)
6485+ {
6486+ team = new TournamentTeam(player, null);
6487+ }
6488+ else
6489+ {
6490+ player.sendMessage("Your Tournament Team has been already created, try to invite someone.");
6491+ return false;
6492+ }
6493+ TournamentManager.getInstance().showHtml(player, "main", TournamentFightType.NONE);
6494+
6495+ }
6496+ else if (bypass.startsWith("bp_showTournamentPage"))
6497+ {
6498+ String page = st.nextToken();
6499+ TournamentManager.getInstance().showHtml(player, page, TournamentFightType.NONE);
6500+ }
6501+ else if (bypass.startsWith("bp_checkTournamentPlayer"))
6502+ {
6503+ String playerName = st.nextToken();
6504+ String type = st.nextToken();
6505+ int targetObjectId = PlayerInfoTable.getInstance().getPlayerObjectId(playerName);
6506+ TournamentManager.getInstance().showPlayerRankingData(player, targetObjectId, TournamentFightType.valueOf(type));
6507+ }
6508+ else if (bypass.startsWith("bp_tournamentRanking"))
6509+ {
6510+ String type = st.nextToken();
6511+ String rankType = st.nextToken();
6512+ TournamentManager.getInstance().showRanking(player, TournamentFightType.valueOf(type), rankType);
6513+ }
6514+ return false;
6515+ }
6516+
6517+ @Override
6518+ public String[] getBypassHandlersList()
6519+ {
6520+
6521+ return new String[]
6522+ {
6523+ "bp_checkTournamentPlayer",
6524+ "bp_showTournamentPage",
6525+ "bp_registerTournament1x1",
6526+ "bp_removeTournamentParticipation",
6527+ "bp_createTournamentTeam",
6528+ "bp_registerTournament2x2",
6529+ "bp_inviteTournamentMember",
6530+ "bp_deleteTournamentTeam",
6531+ "bp_tournamentTeamInfo",
6532+ "bp_inviteTournamentPage",
6533+ "bp_registerTournament3x3",
6534+ "bp_registerTournament4x4",
6535+ "bp_registerTournament5x5",
6536+ "bp_registerTournament9x9",
6537+ "bp_tournamentRanking",
6538+ "bp_leaveTournamentTeam"
6539+
6540+ };
6541+ }
6542+}
6543\ No newline at end of file
6544diff --git java/net/sf/l2j/gameserver/model/zone/SpawnZone.java java/net/sf/l2j/gameserver/model/zone/SpawnZone.java
6545new file mode 100644
6546index 0000000..2110804
6547--- /dev/null
6548+++ java/net/sf/l2j/gameserver/model/zone/SpawnZone.java
6549@@ -0,0 +1,58 @@
6550+package net.sf.l2j.gameserver.model.zone;
6551+
6552+import java.util.ArrayList;
6553+import java.util.List;
6554+
6555+import net.sf.l2j.commons.random.Rnd;
6556+
6557+import net.sf.l2j.gameserver.model.location.Location;
6558+import net.sf.l2j.gameserver.model.zone.type.subtype.ZoneType;
6559+
6560+/**
6561+ * Abstract zone with spawn locations.<br>
6562+ * It inherits regular L2ZoneType behavior, with the possible addition of 2 Lists holding Locations.
6563+ */
6564+public abstract class SpawnZone extends ZoneType
6565+{
6566+ private List<Location> _spawnLocs = null;
6567+ private List<Location> _chaoticSpawnLocs = null;
6568+
6569+ public SpawnZone(int id)
6570+ {
6571+ super(id);
6572+ }
6573+
6574+ public final void addSpawn(int x, int y, int z)
6575+ {
6576+ if (_spawnLocs == null)
6577+ _spawnLocs = new ArrayList<>();
6578+
6579+ _spawnLocs.add(new Location(x, y, z));
6580+ }
6581+
6582+ public final void addChaoticSpawn(int x, int y, int z)
6583+ {
6584+ if (_chaoticSpawnLocs == null)
6585+ _chaoticSpawnLocs = new ArrayList<>();
6586+
6587+ _chaoticSpawnLocs.add(new Location(x, y, z));
6588+ }
6589+
6590+ public final List<Location> getSpawns()
6591+ {
6592+ return _spawnLocs;
6593+ }
6594+
6595+ public final Location getSpawnLoc()
6596+ {
6597+ return Rnd.get(_spawnLocs);
6598+ }
6599+
6600+ public final Location getChaoticSpawnLoc()
6601+ {
6602+ if (_chaoticSpawnLocs != null)
6603+ return Rnd.get(_chaoticSpawnLocs);
6604+
6605+ return getSpawnLoc();
6606+ }
6607+}
6608\ No newline at end of file
6609diff --git java/net/sf/l2j/gameserver/model/zone/type/TournamentZone.java java/net/sf/l2j/gameserver/model/zone/type/TournamentZone.java
6610new file mode 100644
6611index 0000000..dc258f8
6612--- /dev/null
6613+++ java/net/sf/l2j/gameserver/model/zone/type/TournamentZone.java
6614@@ -0,0 +1,51 @@
6615+package net.sf.l2j.gameserver.model.zone.type;
6616+
6617+import net.sf.l2j.gameserver.enums.ZoneId;
6618+import net.sf.l2j.gameserver.model.actor.Creature;
6619+import net.sf.l2j.gameserver.model.actor.Player;
6620+import net.sf.l2j.gameserver.model.zone.SpawnZone;
6621+import net.sf.l2j.gameserver.network.SystemMessageId;
6622+
6623+/**
6624+ * @author Rouxy
6625+ */
6626+public class TournamentZone extends SpawnZone
6627+{
6628+
6629+ @Override
6630+ public void setParameter(String name, String value)
6631+ {
6632+
6633+ super.setParameter(name, value);
6634+ }
6635+
6636+ public TournamentZone(int id)
6637+ {
6638+ super(id);
6639+
6640+ }
6641+
6642+ @Override
6643+ protected void onEnter(Creature character)
6644+ {
6645+ character.setInsideZone(ZoneId.TOURNAMENT, true);
6646+ if (character instanceof Player)
6647+ ((Player) character).sendPacket(SystemMessageId.ENTERED_COMBAT_ZONE);
6648+
6649+ character.setInsideZone(ZoneId.PVP, true);
6650+ character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
6651+ }
6652+
6653+ @Override
6654+ protected void onExit(Creature character)
6655+ {
6656+ character.setInsideZone(ZoneId.TOURNAMENT, false);
6657+ character.setInsideZone(ZoneId.PVP, false);
6658+ character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false);
6659+
6660+ if (character instanceof Player)
6661+ ((Player) character).sendPacket(SystemMessageId.LEFT_COMBAT_ZONE);
6662+
6663+ }
6664+
6665+}
6666\ No newline at end of file
6667diff --git java/net/sf/l2j/gameserver/network/clientpackets/DlgAnswer.java java/net/sf/l2j/gameserver/network/clientpackets/DlgAnswer.java
6668index 5103b6e..d2727e4 100644
6669--- java/net/sf/l2j/gameserver/network/clientpackets/DlgAnswer.java
6670+++ java/net/sf/l2j/gameserver/network/clientpackets/DlgAnswer.java
6671@@ -1,5 +1,8 @@
6672 package net.sf.l2j.gameserver.network.clientpackets;
6673
6674+import net.sf.l2j.Config;
6675+import net.sf.l2j.gameserver.enums.LootRule;
6676+import net.sf.l2j.gameserver.model.World;
6677 import net.sf.l2j.gameserver.model.actor.Player;
6678 import net.sf.l2j.gameserver.model.entity.events.capturetheflag.CTFEvent;
6679 import net.sf.l2j.gameserver.model.entity.events.capturetheflag.CTFManager;
6680@@ -9,7 +12,12 @@
6681 import net.sf.l2j.gameserver.model.entity.events.lastman.LMManager;
6682 import net.sf.l2j.gameserver.model.entity.events.teamvsteam.TvTEvent;
6683 import net.sf.l2j.gameserver.model.entity.events.teamvsteam.TvTManager;
6684+import net.sf.l2j.gameserver.model.group.Party;
6685 import net.sf.l2j.gameserver.network.SystemMessageId;
6686+import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
6687+
6688+import Base.Tournament.Manager.TournamentManager;
6689+import Base.Tournament.Model.TournamentTeam;
6690
6691 public final class DlgAnswer extends L2GameClientPacket
6692 {
6693@@ -50,5 +58,92 @@
6694 player.activateGate(_answer, 1);
6695 else if (_messageId == SystemMessageId.WOULD_YOU_LIKE_TO_CLOSE_THE_GATE.getId())
6696 player.activateGate(_answer, 0);
6697+
6698+ else if (_messageId == SystemMessageId.S1.getId())
6699+ {
6700+ if (TournamentManager.getInstance().isTournamentTeleporting())
6701+ {
6702+ if (_answer == 1)
6703+ {
6704+ player.teleportTo(Config.TOURNAMENT_NPC_LOCATION.getX(), Config.TOURNAMENT_NPC_LOCATION.getY(), Config.TOURNAMENT_NPC_LOCATION.getZ(), 500);
6705+ }
6706+ }
6707+ else if (player.isTournamentTeamBeingInvited())
6708+ {
6709+ Player leader = World.getInstance().getPlayer(player.getTournamentTeamRequesterId());
6710+ if (leader != null)
6711+ {
6712+ TournamentTeam team = leader.getTournamentTeam();
6713+ if (_answer == 1)
6714+ {
6715+ if (team == null)
6716+ {
6717+ team = new TournamentTeam(leader, player);
6718+ player.sendPacket(new ExShowScreenMessage("Your Team have been created!", 3000));
6719+ }
6720+ else
6721+ {
6722+ team.addMember(player);
6723+ leader.sendPacket(new ExShowScreenMessage(player.getName() + " entered your team.", 3000));
6724+ player.sendPacket(new ExShowScreenMessage("You entered " + team.getName() + ".", 3000));
6725+ }
6726+ Party party = leader.getParty();
6727+ if (party != null)
6728+ {
6729+ party.addPartyMember(player);
6730+ }
6731+ else
6732+ {
6733+ party = new Party(leader, player, LootRule.ITEM_LOOTER);
6734+ team.setParty(party);
6735+ }
6736+ // String pageToOpen = null;
6737+ // TournamentFightType type = TournamentFightType.NONE;
6738+ // switch (team.getMembers().size())
6739+ // {
6740+ // case 1:
6741+ // pageToOpen = "fights/F1X1";
6742+ // type = TournamentFightType.F1X1;
6743+ // break;
6744+ // case 2:
6745+ // pageToOpen = "fights/F2X2";
6746+ // type = TournamentFightType.F2X2;
6747+ // break;
6748+ // case 3:
6749+ // pageToOpen = "fights/F3X3";
6750+ // type = TournamentFightType.F3X3;
6751+ // break;
6752+ // case 4:
6753+ // pageToOpen = "fights/F4X4";
6754+ // type = TournamentFightType.F4X4;
6755+ // break;
6756+ // case 5:
6757+ // pageToOpen = "fights/F5X5";
6758+ // type = TournamentFightType.F5X5;
6759+ // break;
6760+ // case 9:
6761+ // pageToOpen = "fights/F9X9";
6762+ // type = TournamentFightType.F9X9;
6763+ // break;
6764+ //
6765+ // }
6766+ // TournamentManager.getInstance().showHtml(leader, pageToOpen, type);
6767+ // TournamentManager.getInstance().showHtml(player, pageToOpen, type);
6768+
6769+ }
6770+ else
6771+ {
6772+ leader.sendMessage(player.getName() + " denied your Tournament Team request.");
6773+ return;
6774+ }
6775+ }
6776+ player.setTournamentTeamRequesterId(0);
6777+ player.setTournamentTeamBeingInvited(false);
6778+ }
6779+ }
6780+
6781+
6782+
6783+
6784 }
6785 }
6786\ No newline at end of file
6787diff --git java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
6788index fa0119b..b23a2ea 100644
6789--- java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
6790+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
6791@@ -34,7 +34,9 @@
6792 import net.sf.l2j.gameserver.enums.skills.ElementType;
6793 import net.sf.l2j.gameserver.enums.skills.SkillType;
6794 import net.sf.l2j.gameserver.handler.AdminCommandHandler;
6795+import net.sf.l2j.gameserver.handler.BypassHandler;
6796 import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
6797+import net.sf.l2j.gameserver.handler.IBypassHandler;
6798 import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
6799 import net.sf.l2j.gameserver.handler.VoicedCommandHandler;
6800 import net.sf.l2j.gameserver.handler.itemhandlers.Cubic;
6801@@ -126,6 +128,22 @@
6802 ach.useAdminCommand(_command, player);
6803 }
6804
6805+ else if (_command.startsWith("bp_"))
6806+ {
6807+ String command = _command.split(" ")[0];
6808+ IBypassHandler bh = BypassHandler.getInstance().getBypassHandler(command);
6809+ if (bh == null)
6810+ {
6811+ GMAUDIT_LOG.warning("No handler registered for bypass '" + command + "'");
6812+ return;
6813+ }
6814+ bh.handleBypass(_command, player);
6815+ }
6816+
6817+
6818+
6819+
6820+
6821 else if (_command.startsWith("cubic_"))
6822 {
6823 String command = _command.substring(6);
6824diff --git java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java
6825index 75ebcca..8cc59d8 100644
6826--- java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java
6827+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java
6828@@ -32,6 +32,14 @@
6829 if (requestor == null)
6830 return;
6831
6832+
6833+ if (requestor.isInTournamentMatch())
6834+ {
6835+ requestor.sendMessage("You can't invite players in Tournament.");
6836+ return;
6837+ }
6838+
6839+
6840 final Player target = World.getInstance().getPlayer(_targetName);
6841 if (target == null)
6842 {
6843diff --git java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java
6844index 00a37d4..61cdf4c 100644
6845--- java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java
6846+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java
6847@@ -11,6 +11,8 @@
6848 import net.sf.l2j.gameserver.network.serverpackets.RestartResponse;
6849 import net.sf.l2j.gameserver.taskmanager.AttackStanceTaskManager;
6850
6851+import Base.Tournament.Manager.TournamentManager;
6852+
6853 public final class RequestRestart extends L2GameClientPacket
6854 {
6855 @Override
6856@@ -52,6 +54,8 @@
6857 return;
6858 }
6859
6860+
6861+ TournamentManager.getInstance().onDisconnect(player);
6862 player.removeFromBossZone();
6863
6864 final GameClient client = getClient();
6865diff --git java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
6866index 7f2cc2d..53cff25 100644
6867--- java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
6868+++ java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
6869@@ -73,6 +73,17 @@
6870 }
6871 }
6872
6873+
6874+ if (player.getActingPlayer().isInTournamentMatch())
6875+ {
6876+ if (Config.TOURNAMENT_RESTRICTED_ITEM_LIST.contains(item.getItem().getItemId()))
6877+ {
6878+ player.sendMessage("You can't use this item in Tournament.");
6879+ return;
6880+ }
6881+ }
6882+
6883+
6884 if (item.getItem().getType2() == Item.TYPE2_QUEST)
6885 {
6886 player.sendPacket(SystemMessageId.CANNOT_USE_QUEST_ITEMS);
6887diff --git java/net/sf/l2j/gameserver/network/serverpackets/NpcHtmlMessage.java java/net/sf/l2j/gameserver/network/serverpackets/NpcHtmlMessage.java
6888index b34e4bf..92a45a8 100644
6889--- java/net/sf/l2j/gameserver/network/serverpackets/NpcHtmlMessage.java
6890+++ java/net/sf/l2j/gameserver/network/serverpackets/NpcHtmlMessage.java
6891@@ -14,6 +14,23 @@
6892 private String _html;
6893 private String _file;
6894
6895+ /**
6896+ * @return the _file
6897+ */
6898+ public String getFile()
6899+ {
6900+ return _file;
6901+ }
6902+
6903+ /**
6904+ * @param _file the _file to set
6905+ */
6906+ public void set_file(String _file)
6907+ {
6908+ this._file = _file;
6909+ }
6910+
6911+
6912 private int _itemId = 0;
6913 private boolean _validate = true;
6914
6915diff --git java/net/sf/l2j/gameserver/skills/l2skills/L2SkillSummon.java java/net/sf/l2j/gameserver/skills/l2skills/L2SkillSummon.java
6916index 59e8b0a..f8df991 100644
6917--- java/net/sf/l2j/gameserver/skills/l2skills/L2SkillSummon.java
6918+++ java/net/sf/l2j/gameserver/skills/l2skills/L2SkillSummon.java
6919@@ -173,7 +173,7 @@
6920 spawnLoc.addStrictOffset(40);
6921 spawnLoc.setHeadingTo(activeChar.getPosition());
6922 spawnLoc.set(GeoEngine.getInstance().getValidLocation(activeChar, spawnLoc));
6923-
6924+ summon.setInstance(activeChar.getInstance(), true);
6925 summon.spawnMe(spawnLoc);
6926 summon.getAI().setFollowStatus(true);
6927
6928diff --git java/net/sf/l2j/util/Mysql.java java/net/sf/l2j/util/Mysql.java
6929new file mode 100644
6930index 0000000..efaaab8
6931--- /dev/null
6932+++ java/net/sf/l2j/util/Mysql.java
6933@@ -0,0 +1,187 @@
6934+package net.sf.l2j.util;
6935+
6936+import java.sql.Connection;
6937+import java.sql.PreparedStatement;
6938+import java.sql.ResultSet;
6939+import java.sql.SQLException;
6940+import java.sql.Statement;
6941+import java.util.logging.Logger;
6942+
6943+import net.sf.l2j.commons.pool.ConnectionPool;
6944+
6945+public abstract class Mysql
6946+{
6947+ private static final Logger _log = Logger.getLogger(Mysql.class.getName());
6948+
6949+ /**
6950+ * Performs a simple sql queries where unnecessary control parameters <BR>
6951+ * NOTE: In this method, the parameters passed are not valid for SQL-injection!
6952+ * @param db
6953+ * @param query
6954+ * @param vars
6955+ * @return
6956+ */
6957+ public static boolean setEx(ConnectionPool db, String query, Object... vars)
6958+ {
6959+ Connection con = null;
6960+ Statement statement = null;
6961+ PreparedStatement pstatement = null;
6962+ boolean successed = true;
6963+
6964+ try
6965+ {
6966+ if (db == null)
6967+ db = new ConnectionPool();
6968+
6969+ con = db.getConnection();
6970+ if (vars.length == 0)
6971+ {
6972+ statement = con.createStatement();
6973+ statement.executeUpdate(query);
6974+ statement.close();
6975+ }
6976+ else
6977+ {
6978+ pstatement = con.prepareStatement(query);
6979+ setVars(pstatement, vars);
6980+ pstatement.executeUpdate();
6981+ pstatement.close();
6982+ }
6983+ con.close();
6984+ }
6985+ catch (Exception e)
6986+ {
6987+ _log.warning("Could not execute update '" + query + "': " + e);
6988+ e.printStackTrace();
6989+ successed = false;
6990+ }
6991+ finally
6992+ {
6993+ closeQuietly(con, pstatement);
6994+ closeQuietly(statement);
6995+ }
6996+ return successed;
6997+ }
6998+
6999+ public static void setVars(PreparedStatement statement, Object... vars) throws SQLException
7000+ {
7001+ Number n;
7002+ long long_val;
7003+ double double_val;
7004+ for (int i = 0; i < vars.length; i++)
7005+ if (vars[i] instanceof Number)
7006+ {
7007+ n = (Number) vars[i];
7008+ long_val = n.longValue();
7009+ double_val = n.doubleValue();
7010+ if (long_val == double_val)
7011+ statement.setLong(i + 1, long_val);
7012+ else
7013+ statement.setDouble(i + 1, double_val);
7014+ }
7015+ else if (vars[i] instanceof String)
7016+ statement.setString(i + 1, (String) vars[i]);
7017+ }
7018+
7019+ public static boolean set(String query, Object... vars)
7020+ {
7021+ return setEx(null, query, vars);
7022+ }
7023+
7024+ public static boolean set(String query)
7025+ {
7026+ return setEx(null, query);
7027+ }
7028+
7029+ public static void closeQuietly(Connection conn)
7030+ {
7031+ try
7032+ {
7033+ close(conn);
7034+ }
7035+ catch (SQLException e)
7036+ { // NOPMD
7037+ // quiet
7038+ }
7039+ }
7040+
7041+ public static void closeQuietly(Connection conn, Statement stmt, ResultSet rs)
7042+ {
7043+
7044+ try
7045+ {
7046+ closeQuietly(rs);
7047+ }
7048+ finally
7049+ {
7050+ try
7051+ {
7052+ closeQuietly(stmt);
7053+ }
7054+ finally
7055+ {
7056+ closeQuietly(conn);
7057+ }
7058+ }
7059+ }
7060+
7061+ public static void closeQuietly(Connection conn, Statement stmt)
7062+ {
7063+ try
7064+ {
7065+ closeQuietly(stmt);
7066+ }
7067+ finally
7068+ {
7069+ closeQuietly(conn);
7070+ }
7071+ }
7072+
7073+ public static void closeQuietly(ResultSet rs)
7074+ {
7075+ try
7076+ {
7077+ close(rs);
7078+ }
7079+ catch (SQLException e)
7080+ { // NOPMD
7081+ // quiet
7082+ }
7083+ }
7084+
7085+ public static void closeQuietly(Statement stmt)
7086+ {
7087+ try
7088+ {
7089+ close(stmt);
7090+ }
7091+ catch (SQLException e)
7092+ { // NOPMD
7093+ // quiet
7094+ }
7095+ }
7096+
7097+ public static void close(Connection conn) throws SQLException
7098+ {
7099+ if (conn != null)
7100+ {
7101+ conn.close();
7102+ }
7103+ }
7104+
7105+ public static void close(ResultSet rs) throws SQLException
7106+ {
7107+ if (rs != null)
7108+ {
7109+ rs.close();
7110+ }
7111+ }
7112+
7113+ public static void close(Statement stmt) throws SQLException
7114+ {
7115+ if (stmt != null)
7116+ {
7117+ stmt.close();
7118+ }
7119+ }
7120+}
7121\ No newline at end of file
7122diff --git java/net/sf/l2j/util/PlayerVar.java java/net/sf/l2j/util/PlayerVar.java
7123new file mode 100644
7124index 0000000..4c6ab26
7125--- /dev/null
7126+++ java/net/sf/l2j/util/PlayerVar.java
7127@@ -0,0 +1,122 @@
7128+package net.sf.l2j.util;
7129+
7130+import java.util.concurrent.ScheduledFuture;
7131+
7132+import net.sf.l2j.commons.pool.ThreadPool;
7133+
7134+import net.sf.l2j.gameserver.model.actor.Player;
7135+
7136+public class PlayerVar
7137+{
7138+ private Player owner;
7139+ private String name;
7140+ private String value;
7141+ private long expire_time;
7142+
7143+ @SuppressWarnings("rawtypes")
7144+ private ScheduledFuture task;
7145+
7146+ public PlayerVar(Player owner, String name, String value, long expire_time)
7147+ {
7148+ this.owner = owner;
7149+ this.name = name;
7150+ this.value = value;
7151+ this.expire_time = expire_time;
7152+
7153+ if (expire_time > 0) // if expires schedule expiration
7154+ {
7155+ task = ThreadPool.schedule(new PlayerVarExpireTask(this), expire_time - System.currentTimeMillis());
7156+ }
7157+ }
7158+
7159+ public int getIntValue()
7160+ {
7161+ if (isNumeric(getValue()))
7162+ {
7163+ return Integer.parseInt(getValue());
7164+ }
7165+ return -1;
7166+ }
7167+
7168+ public String getName()
7169+ {
7170+ return name;
7171+ }
7172+
7173+ public Player getOwner()
7174+ {
7175+ return owner;
7176+ }
7177+
7178+ public boolean hasExpired()
7179+ {
7180+ return task == null || task.isDone();
7181+ }
7182+
7183+ public long getTimeToExpire()
7184+ {
7185+ return expire_time - System.currentTimeMillis();
7186+ }
7187+
7188+ public String getValue()
7189+ {
7190+ return value;
7191+ }
7192+
7193+ public boolean getValueBoolean()
7194+ {
7195+ if (isNumeric(value))
7196+ return Integer.parseInt(value) > 0;
7197+
7198+ return value.equalsIgnoreCase("true");
7199+ }
7200+
7201+ public void setValue(String val)
7202+ {
7203+ value = val;
7204+ }
7205+
7206+ public void stopExpireTask()
7207+ {
7208+ if (task != null && !task.isDone())
7209+ {
7210+ task.cancel(true);
7211+ }
7212+ }
7213+
7214+ private static class PlayerVarExpireTask implements Runnable
7215+ {
7216+ private PlayerVar _pv;
7217+
7218+ public PlayerVarExpireTask(PlayerVar pv)
7219+ {
7220+ _pv = pv;
7221+ }
7222+
7223+ @Override
7224+ public void run()
7225+ {
7226+ Player pc = _pv.getOwner();
7227+ if (pc == null)
7228+ {
7229+ return;
7230+ }
7231+
7232+ PlayerVariables.unsetVar(pc, _pv.getName());
7233+ }
7234+ }
7235+
7236+ public boolean isNumeric(String str)
7237+ {
7238+ try
7239+ {
7240+ @SuppressWarnings("unused")
7241+ double d = Double.parseDouble(str);
7242+ }
7243+ catch (NumberFormatException nfe)
7244+ {
7245+ return false;
7246+ }
7247+ return true;
7248+ }
7249+}
7250\ No newline at end of file
7251diff --git java/net/sf/l2j/util/PlayerVariables.java java/net/sf/l2j/util/PlayerVariables.java
7252new file mode 100644
7253index 0000000..4c191c8
7254--- /dev/null
7255+++ java/net/sf/l2j/util/PlayerVariables.java
7256@@ -0,0 +1,351 @@
7257+package net.sf.l2j.util;
7258+
7259+import java.sql.Connection;
7260+import java.sql.PreparedStatement;
7261+import java.sql.ResultSet;
7262+
7263+import net.sf.l2j.commons.pool.ConnectionPool;
7264+
7265+import net.sf.l2j.gameserver.model.actor.Player;
7266+
7267+/**
7268+ * @author DevKatara
7269+ */
7270+public class PlayerVariables
7271+{
7272+ // When var exist
7273+ public static void changeValue(Player player, String name, String value)
7274+ {
7275+ if (!player.getVariables().containsKey(name))
7276+ {
7277+ player.sendMessage("Variable is not exist...");
7278+ return;
7279+ }
7280+
7281+ getVarObject(player, name).setValue(value);
7282+ Mysql.set("UPDATE character_memo_alt SET value=? WHERE obj_id=? AND name=?", value, player.getObjectId(), name);
7283+ }
7284+
7285+ public static void setVar(Player player, String name, String value, long expirationTime)
7286+ {
7287+ if (player.getVariables().containsKey(name))
7288+ getVarObject(player, name).stopExpireTask();
7289+
7290+ player.getVariables().put(name, new PlayerVar(player, name, value, expirationTime));
7291+ Mysql.set("REPLACE INTO character_memo_alt (obj_id, name, value, expire_time) VALUES (?,?,?,?)", player.getObjectId(), name, value, expirationTime);
7292+ }
7293+
7294+ public static void setVar(int objId, String name, String value, long expirationTime)
7295+ {
7296+ Mysql.set("REPLACE INTO character_memo_alt (obj_id, name, value, expire_time) VALUES (?,?,?,?)", objId, name, value, expirationTime);
7297+ }
7298+
7299+ public static void setVar(Player player, String name, int value, long expirationTime)
7300+ {
7301+ setVar(player, name, String.valueOf(value), expirationTime);
7302+ }
7303+
7304+ public void setVar(Player player, String name, long value, long expirationTime)
7305+ {
7306+ setVar(player, name, String.valueOf(value), expirationTime);
7307+ }
7308+
7309+ public static PlayerVar getVarObject(Player player, String name)
7310+ {
7311+ if (player.getVariables() == null)
7312+ return null;
7313+
7314+ return player.getVariables().get(name);
7315+ }
7316+
7317+ public static long getVarTimeToExpire(Player player, String name)
7318+ {
7319+ try
7320+ {
7321+ return getVarObject(player, name).getTimeToExpire();
7322+ }
7323+ catch (NullPointerException npe)
7324+ {
7325+ }
7326+
7327+ return 0;
7328+ }
7329+
7330+ public static void unsetVar(Player player, String name)
7331+ {
7332+ if (name == null)
7333+ return;
7334+
7335+ // Avoid possible unsetVar that have elements for login
7336+ if (player == null)
7337+ return;
7338+
7339+ PlayerVar pv = player.getVariables().remove(name);
7340+
7341+ if (pv != null)
7342+ {
7343+ if (name.contains("delete_temp_item"))
7344+ pv.getOwner().deleteTempItem(Integer.parseInt(pv.getValue()));
7345+ else if (name.contains("solo_hero"))
7346+ {
7347+ pv.getOwner().broadcastCharInfo();
7348+ pv.getOwner().broadcastUserInfo();
7349+ }
7350+
7351+ Mysql.set("DELETE FROM character_memo_alt WHERE obj_id=? AND name=? LIMIT 1", pv.getOwner().getObjectId(), name);
7352+
7353+ pv.stopExpireTask();
7354+ }
7355+ }
7356+
7357+ public static void deleteExpiredVar(Player player, String name, String value)
7358+ {
7359+ if (name == null)
7360+ return;
7361+
7362+ if (name.contains("delete_temp_item"))
7363+ player.deleteTempItem(Integer.parseInt(value));
7364+ /*
7365+ * else if(name.contains("solo_hero")) // Useless player.broadcastCharInfo();
7366+ */
7367+
7368+ Mysql.set("DELETE FROM character_memo_alt WHERE obj_id=? AND name=? LIMIT 1", player.getObjectId(), name);
7369+ }
7370+
7371+ public static String getVar(Player player, String name)
7372+ {
7373+ PlayerVar pv = getVarObject(player, name);
7374+
7375+ if (pv == null)
7376+ return null;
7377+
7378+ return pv.getValue();
7379+ }
7380+
7381+ public static long getVarTimeToExpireSQL(Player player, String name)
7382+ {
7383+ long expireTime = 0;
7384+ try (Connection con = ConnectionPool.getConnection())
7385+ {
7386+ PreparedStatement statement = con.prepareStatement("SELECT expire_time FROM character_memo_alt WHERE obj_id = ? AND name = ?");
7387+ statement.setLong(1, player.getObjectId());
7388+ statement.setString(2, name);
7389+ for (ResultSet rset = statement.executeQuery(); rset.next();)
7390+ expireTime = rset.getLong("expire_time");
7391+
7392+ con.close();
7393+ statement.close();
7394+ }
7395+ catch (Exception e)
7396+ {
7397+ e.printStackTrace();
7398+ }
7399+
7400+ return expireTime;
7401+ }
7402+
7403+ public static boolean getVarB(Player player, String name, boolean defaultVal)
7404+ {
7405+ PlayerVar pv = getVarObject(player, name);
7406+
7407+ if (pv == null)
7408+ return defaultVal;
7409+
7410+ return pv.getValueBoolean();
7411+ }
7412+
7413+ public static boolean getVarB(Player player, String name)
7414+ {
7415+ return getVarB(player, name, false);
7416+ }
7417+
7418+ public long getVarLong(Player player, String name)
7419+ {
7420+ return getVarLong(player, name, 0L);
7421+ }
7422+
7423+ public long getVarLong(Player player, String name, long defaultVal)
7424+ {
7425+ long result = defaultVal;
7426+ String var = getVar(player, name);
7427+ if (var != null)
7428+ result = Long.parseLong(var);
7429+
7430+ return result;
7431+ }
7432+
7433+ public static int getVarInt(Player player, String name)
7434+ {
7435+ return getVarInt(player, name, 0);
7436+ }
7437+
7438+ public static int getVarInt(Player player, String name, int defaultVal)
7439+ {
7440+ int result = defaultVal;
7441+ String var = getVar(player, name);
7442+ if (var != null)
7443+ {
7444+ if (var.equalsIgnoreCase("true"))
7445+ result = 1;
7446+ else if (var.equalsIgnoreCase("false"))
7447+ result = 0;
7448+ else
7449+ result = Integer.parseInt(var);
7450+ }
7451+ return result;
7452+ }
7453+
7454+ public static void votedResult(Player player)
7455+ {
7456+ Connection con = null;
7457+ PreparedStatement offline = null;
7458+ ResultSet rs = null;
7459+ try
7460+ {
7461+ con = ConnectionPool.getConnection();
7462+ offline = con.prepareStatement("SELECT * FROM character_memo_alt WHERE obj_id=? AND name=?");
7463+ offline.setInt(1, player.getObjectId());
7464+ rs = offline.executeQuery();
7465+ boolean hasResult = rs.next();
7466+ if (!hasResult)
7467+ {
7468+ insertVoteSites(player);
7469+ }
7470+
7471+ con.close();
7472+ }
7473+ catch (Exception e)
7474+ {
7475+ e.printStackTrace();
7476+ }
7477+ finally
7478+ {
7479+ Mysql.closeQuietly(con, offline, rs);
7480+ }
7481+ }
7482+
7483+ public static void insertVoteSites(Player player)
7484+ {
7485+ Connection con = null;
7486+ PreparedStatement offline = null;
7487+ ResultSet rs = null;
7488+ try
7489+ {
7490+ con = ConnectionPool.getConnection();
7491+ offline = con.prepareStatement("INSERT INTO character_memo_alt (obj_id,name,value,expire_time) VALUES (?,?,?,?)");
7492+ offline.setInt(1, player.getObjectId());
7493+ offline.setString(2, "votedSites");
7494+ offline.setString(3, "0");
7495+ offline.setLong(4, 0);
7496+ offline.execute();
7497+ con.close();
7498+ }
7499+ catch (Exception e)
7500+ {
7501+ e.printStackTrace();
7502+ }
7503+ finally
7504+ {
7505+ Mysql.closeQuietly(con, offline, rs);
7506+ }
7507+ }
7508+
7509+ public static void loadVariables(Player player)
7510+ {
7511+ Connection con = null;
7512+ PreparedStatement offline = null;
7513+ ResultSet rs = null;
7514+ try
7515+ {
7516+ con = ConnectionPool.getConnection();
7517+ offline = con.prepareStatement("SELECT * FROM character_memo_alt WHERE obj_id =?");
7518+ offline.setInt(1, player.getObjectId());
7519+ rs = offline.executeQuery();
7520+
7521+ while (rs.next())
7522+ {
7523+ String name = rs.getString("name");
7524+ String value = rs.getString("value");
7525+ long expire_time = rs.getLong("expire_time");
7526+ long curtime = System.currentTimeMillis();
7527+
7528+ if ((expire_time <= curtime) && (expire_time > 0))
7529+ {
7530+ deleteExpiredVar(player, name, rs.getString("value")); // TODO: Remove the Var
7531+ continue;
7532+ }
7533+
7534+ player.getVariables().put(name, new PlayerVar(player, name, value, expire_time));
7535+ }
7536+
7537+ con.close();
7538+ }
7539+ catch (Exception e)
7540+ {
7541+ e.printStackTrace();
7542+ }
7543+ finally
7544+ {
7545+ Mysql.closeQuietly(con, offline, rs);
7546+ }
7547+ }
7548+
7549+ public static String getVarValue(Player player, String var, String defaultString)
7550+ {
7551+ String value = null;
7552+ Connection con = null;
7553+ PreparedStatement offline = null;
7554+ ResultSet rs = null;
7555+ try
7556+ {
7557+ con = ConnectionPool.getConnection();
7558+ offline = con.prepareStatement("SELECT value FROM character_memo_alt WHERE obj_id = ? AND name = ?");
7559+ offline.setInt(1, player.getObjectId());
7560+ offline.setString(2, var);
7561+ rs = offline.executeQuery();
7562+ if (rs.next())
7563+ value = rs.getString("value");
7564+
7565+ con.close();
7566+ }
7567+ catch (Exception e)
7568+ {
7569+ e.printStackTrace();
7570+ }
7571+ finally
7572+ {
7573+ Mysql.closeQuietly(con, offline, rs);
7574+ }
7575+ return value == null ? defaultString : value;
7576+ }
7577+
7578+ public static String getVarValue(int objectId, String var, String defaultString)
7579+ {
7580+ String value = null;
7581+ Connection con = null;
7582+ PreparedStatement offline = null;
7583+ ResultSet rs = null;
7584+ try
7585+ {
7586+ con = ConnectionPool.getConnection();
7587+ offline = con.prepareStatement("SELECT value FROM character_memo_alt WHERE obj_id = ? AND name = ?");
7588+ offline.setInt(1, objectId);
7589+ offline.setString(2, var);
7590+ rs = offline.executeQuery();
7591+ if (rs.next())
7592+ value = rs.getString("value");
7593+
7594+ con.close();
7595+ }
7596+ catch (Exception e)
7597+ {
7598+ e.printStackTrace();
7599+ }
7600+ finally
7601+ {
7602+ Mysql.closeQuietly(con, offline, rs);
7603+ }
7604+ return value == null ? defaultString : value;
7605+ }
7606+
7607+}
7608\ No newline at end of file
7609diff --git java/net/sf/l2j/util/RewardHolder.java java/net/sf/l2j/util/RewardHolder.java
7610new file mode 100644
7611index 0000000..422b063
7612--- /dev/null
7613+++ java/net/sf/l2j/util/RewardHolder.java
7614@@ -0,0 +1,49 @@
7615+package net.sf.l2j.util;
7616+
7617+/**
7618+ * @author Rouxy
7619+ */
7620+public class RewardHolder
7621+{
7622+ private int itemId;
7623+ private int count;
7624+ private int chance;
7625+
7626+ public RewardHolder(int itemId, int count)
7627+ {
7628+ this.itemId = itemId;
7629+ this.count = count;
7630+ this.chance = 100;
7631+ }
7632+
7633+ public int getItemId()
7634+ {
7635+ return itemId;
7636+ }
7637+
7638+ public void setItemId(int itemId)
7639+ {
7640+ this.itemId = itemId;
7641+ }
7642+
7643+ public int getCount()
7644+ {
7645+ return count;
7646+ }
7647+
7648+ public void setCount(int count)
7649+ {
7650+ this.count = count;
7651+ }
7652+
7653+ public int getChance()
7654+ {
7655+ return chance;
7656+ }
7657+
7658+ public void setChance(int chance)
7659+ {
7660+ this.chance = chance;
7661+ }
7662+
7663+}
7664\ No newline at end of file
7665diff --git server/gameserver/data/xml/TournamentData/Arenas.xml server/gameserver/data/xml/TournamentData/Arenas.xml
7666new file mode 100644
7667index 0000000..3292d3a
7668--- /dev/null
7669+++ server/gameserver/data/xml/TournamentData/Arenas.xml
7670@@ -0,0 +1,159 @@
7671+<?xml version='1.0' encoding='utf-8'?>
7672+<list>
7673+ <!--<arena id="1" types="F1X1;F2X2;F3X3;F4X4;F5X5;F9X9">
7674+
7675+ <team_one_loc x="87775" y="257757" z="-10381"/>
7676+ <team_one_loc x="87775" y="257857" z="-10381"/>
7677+ <team_one_loc x="87775" y="257957" z="-10381"/>
7678+ <team_one_loc x="87775" y="258057" z="-10381"/>
7679+ <team_one_loc x="87775" y="258157" z="-10381"/>
7680+ <team_one_loc x="87775" y="258257" z="-10381"/>
7681+ <team_one_loc x="87775" y="258357" z="-10381"/>
7682+ <team_one_loc x="87775" y="258457" z="-10381"/>
7683+ <team_one_loc x="87775" y="258557" z="-10381"/>
7684+
7685+ <team_two_loc x="88959" y="257757" z="-10381"/>
7686+ <team_two_loc x="88959" y="257857" z="-10381"/>
7687+ <team_two_loc x="88959" y="257957" z="-10381"/>
7688+ <team_two_loc x="88959" y="258057" z="-10381"/>
7689+ <team_two_loc x="88959" y="258157" z="-10381"/>
7690+ <team_two_loc x="88959" y="258257" z="-10381"/>
7691+ <team_two_loc x="88959" y="258357" z="-10381"/>
7692+ <team_two_loc x="88959" y="258457" z="-10381"/>
7693+ <team_two_loc x="88959" y="258557" z="-10381"/>
7694+ </arena>-->
7695+
7696+ <!-- coliseum 1x1 -->
7697+ <arena id="2" types="F1X1">
7698+ <!-- Team One Locs -->
7699+ <team_one_loc x="150396" y="46726" z="-3408"/>
7700+ <team_one_loc x="150396" y="46726" z="-3408"/>
7701+ <!-- Team Two Locs -->
7702+ <team_two_loc x="148532" y="46726" z="-3408"/>
7703+ <team_two_loc x="148532" y="46726" z="-3408"/>
7704+ </arena>
7705+
7706+ <!-- coliseum 2x2 -->
7707+ <arena id="3" types="F2X2">
7708+ <!-- Team One Locs -->
7709+ <team_one_loc x="150396" y="46726" z="-3408"/>
7710+ <team_one_loc x="150396" y="46726" z="-3408"/>
7711+ <team_one_loc x="150396" y="46826" z="-3408"/>
7712+ <team_one_loc x="150396" y="46826" z="-3408"/>
7713+ <!-- Team Two Locs -->
7714+ <team_two_loc x="148532" y="46726" z="-3408"/>
7715+ <team_two_loc x="148532" y="46726" z="-3408"/>
7716+ <team_two_loc x="148532" y="46826" z="-3408"/>
7717+ <team_two_loc x="148532" y="46826" z="-3408"/>
7718+ </arena>
7719+
7720+ <!-- coliseum 3x3 -->
7721+ <arena id="4" types="F3X3">
7722+ <!-- Team One Locs -->
7723+ <team_one_loc x="150396" y="46726" z="-3408"/>
7724+ <team_one_loc x="150396" y="46726" z="-3408"/>
7725+ <team_one_loc x="150396" y="46826" z="-3408"/>
7726+ <team_one_loc x="150396" y="46826" z="-3408"/>
7727+ <team_one_loc x="150396" y="46626" z="-3408"/>
7728+ <team_one_loc x="150396" y="46626" z="-3408"/>
7729+ <!-- Team Two Locs -->
7730+ <team_two_loc x="148532" y="46726" z="-3408"/>
7731+ <team_two_loc x="148532" y="46726" z="-3408"/>
7732+ <team_two_loc x="148532" y="46826" z="-3408"/>
7733+ <team_two_loc x="148532" y="46826" z="-3408"/>
7734+ <team_two_loc x="148532" y="46626" z="-3408"/>
7735+ <team_two_loc x="148532" y="46626" z="-3408"/>
7736+ </arena>
7737+
7738+ <!-- coliseum 4x4 -->
7739+ <arena id="5" types="F4X4">
7740+ <!-- Team One Locs -->
7741+ <team_one_loc x="150396" y="46726" z="-3408"/>
7742+ <team_one_loc x="150396" y="46726" z="-3408"/>
7743+ <team_one_loc x="150396" y="46826" z="-3408"/>
7744+ <team_one_loc x="150396" y="46826" z="-3408"/>
7745+ <team_one_loc x="150396" y="46626" z="-3408"/>
7746+ <team_one_loc x="150396" y="46626" z="-3408"/>
7747+ <team_one_loc x="150396" y="46926" z="-3408"/>
7748+ <team_one_loc x="150396" y="46926" z="-3408"/>
7749+ <!-- Team Two Locs -->
7750+ <team_two_loc x="148532" y="46726" z="-3408"/>
7751+ <team_two_loc x="148532" y="46726" z="-3408"/>
7752+ <team_two_loc x="148532" y="46826" z="-3408"/>
7753+ <team_two_loc x="148532" y="46826" z="-3408"/>
7754+ <team_two_loc x="148532" y="46626" z="-3408"/>
7755+ <team_two_loc x="148532" y="46626" z="-3408"/>
7756+ <team_two_loc x="148532" y="46926" z="-3408"/>
7757+ <team_two_loc x="148532" y="46926" z="-3408"/>
7758+ </arena>
7759+
7760+ <!-- coliseum 5x5 -->
7761+ <arena id="6" types="F5X5">
7762+ <!-- Team One Locs -->
7763+ <team_one_loc x="150396" y="46726" z="-3408"/>
7764+ <team_one_loc x="150396" y="46726" z="-3408"/>
7765+ <team_one_loc x="150396" y="46826" z="-3408"/>
7766+ <team_one_loc x="150396" y="46826" z="-3408"/>
7767+ <team_one_loc x="150396" y="46626" z="-3408"/>
7768+ <team_one_loc x="150396" y="46626" z="-3408"/>
7769+ <team_one_loc x="150396" y="46926" z="-3408"/>
7770+ <team_one_loc x="150396" y="46926" z="-3408"/>
7771+ <team_one_loc x="150396" y="46526" z="-3408"/>
7772+ <team_one_loc x="150396" y="46526" z="-3408"/>
7773+ <!-- Team Two Locs -->
7774+ <team_two_loc x="148532" y="46726" z="-3408"/>
7775+ <team_two_loc x="148532" y="46726" z="-3408"/>
7776+ <team_two_loc x="148532" y="46826" z="-3408"/>
7777+ <team_two_loc x="148532" y="46826" z="-3408"/>
7778+ <team_two_loc x="148532" y="46626" z="-3408"/>
7779+ <team_two_loc x="148532" y="46626" z="-3408"/>
7780+ <team_two_loc x="148532" y="46926" z="-3408"/>
7781+ <team_two_loc x="148532" y="46926" z="-3408"/>
7782+ <team_two_loc x="148532" y="46526" z="-3408"/>
7783+ <team_two_loc x="148532" y="46526" z="-3408"/>
7784+ </arena>
7785+
7786+ <!-- coliseum 9x9 -->
7787+ <arena id="7" types="F9X9">
7788+ <!-- Team One Locs -->
7789+ <team_one_loc x="150396" y="46726" z="-3408"/>
7790+ <team_one_loc x="150396" y="46726" z="-3408"/>
7791+ <team_one_loc x="150396" y="46826" z="-3408"/>
7792+ <team_one_loc x="150396" y="46826" z="-3408"/>
7793+ <team_one_loc x="150396" y="46626" z="-3408"/>
7794+ <team_one_loc x="150396" y="46626" z="-3408"/>
7795+ <team_one_loc x="150396" y="46926" z="-3408"/>
7796+ <team_one_loc x="150396" y="46926" z="-3408"/>
7797+ <team_one_loc x="150396" y="46526" z="-3408"/>
7798+ <team_one_loc x="150396" y="46526" z="-3408"/>
7799+ <team_one_loc x="150396" y="46426" z="-3408"/>
7800+ <team_one_loc x="150396" y="46426" z="-3408"/>
7801+ <team_one_loc x="150396" y="46326" z="-3408"/>
7802+ <team_one_loc x="150396" y="46326" z="-3408"/>
7803+ <team_one_loc x="150396" y="47026" z="-3408"/>
7804+ <team_one_loc x="150396" y="47026" z="-3408"/>
7805+ <team_one_loc x="150396" y="47126" z="-3408"/>
7806+ <team_one_loc x="150396" y="47126" z="-3408"/>
7807+ <!-- Team Two Locs -->
7808+ <team_two_loc x="148532" y="46726" z="-3408"/>
7809+ <team_two_loc x="148532" y="46726" z="-3408"/>
7810+ <team_two_loc x="148532" y="46826" z="-3408"/>
7811+ <team_two_loc x="148532" y="46826" z="-3408"/>
7812+ <team_two_loc x="148532" y="46626" z="-3408"/>
7813+ <team_two_loc x="148532" y="46626" z="-3408"/>
7814+ <team_two_loc x="148532" y="46926" z="-3408"/>
7815+ <team_two_loc x="148532" y="46926" z="-3408"/>
7816+ <team_two_loc x="148532" y="46526" z="-3408"/>
7817+ <team_two_loc x="148532" y="46526" z="-3408"/>
7818+ <team_two_loc x="148532" y="46426" z="-3408"/>
7819+ <team_two_loc x="148532" y="46426" z="-3408"/>
7820+ <team_two_loc x="148532" y="46326" z="-3408"/>
7821+ <team_two_loc x="148532" y="46326" z="-3408"/>
7822+ <team_two_loc x="148532" y="47026" z="-3408"/>
7823+ <team_two_loc x="148532" y="47026" z="-3408"/>
7824+ <team_two_loc x="148532" y="47126" z="-3408"/>
7825+ <team_two_loc x="148532" y="47126" z="-3408"/>
7826+ </arena>
7827+
7828+
7829+</list>
7830\ No newline at end of file
7831diff --git server/gameserver/data/xml/adminCommands.xml server/gameserver/data/xml/adminCommands.xml
7832index a8921c9..d70cc57 100644
7833--- server/gameserver/data/xml/adminCommands.xml
7834+++ server/gameserver/data/xml/adminCommands.xml
7835@@ -11,6 +11,9 @@
7836 <aCar name="admin_msg" accessLevel="7" params="id" desc="Send the associated SystemMessage id."/>
7837 <aCar name="admin_show" accessLevel="7" params="clear|door|html|move|path|walker" desc="Show visual paths. For html, show the complete folder."/>
7838
7839+ <!-- ADMIN TOURNAMENT -->
7840+ <aCar name="admin_tour" accessLevel="7" params="" desc="Activate or Deactivate the manual tournament."/>
7841+
7842 <!-- ANNOUNCEMENTS -->
7843 <aCar name="admin_announce" accessLevel="7" params="[list|all|add|add_auto|del]" desc="Open the Announcements panel."/>
7844 <aCar name="admin_ann" accessLevel="7" params="message" desc="Broadcast the message, with 'Announcements:' tag."/>
7845diff --git server/gameserver/data/xml/npcs/TournamentNPC.xml server/gameserver/data/xml/npcs/TournamentNPC.xml
7846new file mode 100644
7847index 0000000..217e99c
7848--- /dev/null
7849+++ server/gameserver/data/xml/npcs/TournamentNPC.xml
7850@@ -0,0 +1,40 @@
7851+<?xml version="1.0" encoding="utf-8"?>
7852+<list>
7853+ <npc id="50009" idTemplate="30519" name="First" title="Tournament Manager">
7854+ <set name="usingServerSideName" val="true"/>
7855+ <set name="usingServerSideTitle" val="true"/>
7856+ <set name="level" val="70"/>
7857+ <set name="radius" val="7"/>
7858+ <set name="height" val="18"/>
7859+ <set name="rHand" val="0"/>
7860+ <set name="lHand" val="0"/>
7861+ <set name="type" val="TournamentNpc"/>
7862+ <set name="exp" val="0"/>
7863+ <set name="sp" val="0"/>
7864+ <set name="hp" val="2444.46819"/>
7865+ <set name="mp" val="1345.8"/>
7866+ <set name="hpRegen" val="7.5"/>
7867+ <set name="mpRegen" val="2.7"/>
7868+ <set name="pAtk" val="688.86373"/>
7869+ <set name="pDef" val="295.91597"/>
7870+ <set name="mAtk" val="470.40463"/>
7871+ <set name="mDef" val="216.53847"/>
7872+ <set name="crit" val="4"/>
7873+ <set name="atkSpd" val="253"/>
7874+ <set name="str" val="40"/>
7875+ <set name="int" val="21"/>
7876+ <set name="dex" val="30"/>
7877+ <set name="wit" val="20"/>
7878+ <set name="con" val="43"/>
7879+ <set name="men" val="20"/>
7880+ <set name="corpseTime" val="7"/>
7881+ <set name="walkSpd" val="50"/>
7882+ <set name="runSpd" val="120"/>
7883+ <set name="dropHerbGroup" val="0"/>
7884+ <ai type="DEFAULT" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>
7885+ <skills>
7886+ <skill id="4045" level="1"/>
7887+ <skill id="4416" level="18"/>
7888+ </skills>
7889+ </npc>
7890+</list>
7891\ No newline at end of file
7892diff --git server/gameserver/data/xml/zones/TournamentZone.xml server/gameserver/data/xml/zones/TournamentZone.xml
7893new file mode 100644
7894index 0000000..354553d
7895--- /dev/null
7896+++ server/gameserver/data/xml/zones/TournamentZone.xml
7897@@ -0,0 +1,47 @@
7898+<?xml version="1.0" encoding="UTF-8"?>
7899+<list>
7900+ <!-- PVP Zones -->
7901+ <zone shape="NPoly" minZ="-3596" maxZ="-3396"><!-- dion_monster_pvp -->
7902+ <node x="11947" y="183019"/>
7903+ <node x="12937" y="183019"/>
7904+ <node x="12943" y="184010"/>
7905+ <node x="11941" y="184010"/>
7906+ </zone>
7907+ <zone shape="NPoly" minZ="-3752" maxZ="-3352"><!-- gludin_pvp -->
7908+ <node x="-88411" y="141732"/>
7909+ <node x="-87429" y="141733"/>
7910+ <node x="-87429" y="142708"/>
7911+ <node x="-88408" y="142708"/>
7912+ </zone>
7913+ <zone shape="NPoly" minZ="-3850" maxZ="-3350"><!-- giran_pvp_battle -->
7914+ <node x="72493" y="142263"/>
7915+ <node x="73493" y="142264"/>
7916+ <node x="73493" y="143261"/>
7917+ <node x="72495" y="143258"/>
7918+ </zone>
7919+ <zone shape="NPoly" minZ="-3498" maxZ="-3298"><!-- colosseum_battle -->
7920+ <node x="150948" y="46483" />
7921+ <node x="151210" y="46186" />
7922+ <node x="151221" y="45928" />
7923+ <node x="150737" y="45344" />
7924+ <node x="148265" y="45346" />
7925+ <node x="147769" y="45942" />
7926+ <node x="147784" y="46184" />
7927+ <node x="148047" y="46482" />
7928+ <node x="148049" y="46954" />
7929+ <node x="147781" y="47256" />
7930+ <node x="147769" y="47492" />
7931+ <node x="148263" y="48087" />
7932+ <node x="150745" y="48084" />
7933+ <node x="151220" y="47493" />
7934+ <node x="151216" y="47259" />
7935+ <node x="150947" y="46960" />
7936+ </zone>
7937+
7938+ <zone shape="NPoly" minZ="1000" maxZ="-20000"><!-- heine room 1 -->
7939+ <node x="87595" y="259076"/>
7940+ <node x="87595" y="257344"/>
7941+ <node x="89223" y="257344"/>
7942+ <node x="89223" y="259076"/>
7943+ </zone>
7944+</list>
7945\ No newline at end of file
7946diff --git java/net/sf/l2j/gameserver/network/GameClient.java java/net/sf/l2j/gameserver/network/GameClient.java
7947index ab7c1e4..a453c60 100644
7948--- java/net/sf/l2j/gameserver/network/GameClient.java
7949+++ java/net/sf/l2j/gameserver/network/GameClient.java
7950@@ -1,5 +1,6 @@
7951 package net.sf.l2j.gameserver.network;
7952
7953+import java.lang.System.Logger.Level;
7954 import java.net.InetAddress;
7955 import java.nio.ByteBuffer;
7956 import java.sql.Connection;
7957@@ -25,6 +26,7 @@
7958 import net.sf.l2j.gameserver.data.sql.PlayerInfoTable;
7959 import net.sf.l2j.gameserver.enums.FloodProtector;
7960 import net.sf.l2j.gameserver.enums.MessageType;
7961+import net.sf.l2j.gameserver.enums.TeleportType;
7962 import net.sf.l2j.gameserver.model.CharSelectSlot;
7963 import net.sf.l2j.gameserver.model.World;
7964 import net.sf.l2j.gameserver.model.actor.Player;
7965@@ -39,6 +41,9 @@
7966 import net.sf.l2j.gameserver.network.serverpackets.L2GameServerPacket;
7967 import net.sf.l2j.gameserver.network.serverpackets.ServerClose;
7968
7969+import Base.Instance.InstanceManager;
7970+import Base.Tournament.Manager.TournamentManager;
7971+
7972 /**
7973 * Represents a client connected on Game Server.<br>
7974 * <br>
7975@@ -213,9 +218,21 @@
7976 {
7977 try
7978 {
7979- ThreadPool.execute(() ->
7980+ ThreadPool.execute(new DisconnectTask());
7981+ }
7982+ catch (RejectedExecutionException e)
7983+ {
7984+ }
7985+ }
7986+
7987+ protected class DisconnectTask implements Runnable
7988+ {
7989+ @Override
7990+ public void run()
7991+ {
7992+ boolean fast = true;
7993+ try
7994 {
7995- boolean fast = true;
7996 final Player player = getPlayer();
7997 if (player != null && !isDetached())
7998 {
7999@@ -263,11 +280,26 @@
8000 }
8001
8002 AntiFeedManager.getInstance().onDisconnect(GameClient.this);
8003+ // Rouxy: Instance Mod
8004+ Player player2 = getPlayer();
8005+ if (player2 != null)
8006+ {
8007+ if (player2.getInstance() != null && player2.getInstance().getId() != 0)
8008+ {
8009+ player2.setInstance(InstanceManager.getInstance().getInstance(0), true);
8010+ player2.teleportTo(83384,148152,-3400,100);
8011+ }
8012+ }
8013+ // Rouxy: Tournament
8014+ TournamentManager.getInstance().onDisconnect(player);
8015+
8016+
8017 cleanMe(fast);
8018- });
8019- }
8020- catch (RejectedExecutionException e)
8021- {
8022+ }
8023+ catch (Exception e1)
8024+ {
8025+ LOGGER.info(Level.WARNING, "error while disconnecting client", e1);
8026+ }
8027 }
8028 }
8029
8030diff --git java/net/sf/l2j/gameserver/network/serverpackets/Die.java java/net/sf/l2j/gameserver/network/serverpackets/Die.java
8031index 1644ed0..cb5f105 100644
8032--- java/net/sf/l2j/gameserver/network/serverpackets/Die.java
8033+++ java/net/sf/l2j/gameserver/network/serverpackets/Die.java
8034@@ -29,7 +29,7 @@
8035 {
8036 _creature = creature;
8037 _objectId = creature.getObjectId();
8038- _canTeleport = !(((creature instanceof Player)) && CTFEvent.isStarted() && CTFEvent.isPlayerParticipant(_objectId) || TvTEvent.isStarted() && TvTEvent.isPlayerParticipant(_objectId) || LMEvent.isStarted() && LMEvent.isPlayerParticipant(_objectId) || DMEvent.isStarted() && DMEvent.isPlayerParticipant(_objectId));
8039+ _canTeleport = !(((creature instanceof Player)) && !creature.getActingPlayer().isInTournamentMatch() && CTFEvent.isStarted() && CTFEvent.isPlayerParticipant(_objectId) || TvTEvent.isStarted() && TvTEvent.isPlayerParticipant(_objectId) || LMEvent.isStarted() && LMEvent.isPlayerParticipant(_objectId) || DMEvent.isStarted() && DMEvent.isPlayerParticipant(_objectId));
8040 _fake = !creature.isDead();
8041
8042 if (creature instanceof Player)
8043diff --git a/aCis_datapack/data/html/mods/tournament/createTeam.htm b/aCis_datapack/data/html/mods/tournament/createTeam.htm
8044new file mode 100644
8045index 0000000..4640213
8046--- /dev/null
8047+++ b/aCis_datapack/data/html/mods/tournament/createTeam.htm
8048@@ -0,0 +1,38 @@
8049+
8050+<html>
8051+<title>Battle Tournament</title>
8052+<body>
8053+<center>
8054+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
8055+<br>
8056+
8057+
8058+<center>
8059+ Tournament Team:
8060+
8061+ <br>You need to invite <font color=LEVEL>%missingMembers%</font>
8062+</center>
8063+
8064+<img src="Sek.cbui371" width=300 height=1>
8065+
8066+
8067+
8068+<img src="Sek.cbui371" width=300 height=1>
8069+%inviteBoxRegButton%
8070+<br>
8071+
8072+<center>
8073+ <table width=320 bgcolor=000000>
8074+ <tr>
8075+ <td align=center>
8076+ <font color=994992>** Team Members **</font>
8077+ </td>
8078+ </tr>
8079+ </table>
8080+ %memberslist%
8081+
8082+</center>
8083+<br>
8084+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
8085+</body>
8086+</html>
8087diff --git a/aCis_datapack/data/html/mods/tournament/fights/F1X1.htm b/aCis_datapack/data/html/mods/tournament/fights/F1X1.htm
8088new file mode 100644
8089index 0000000..2fbba6a
8090--- /dev/null
8091+++ b/aCis_datapack/data/html/mods/tournament/fights/F1X1.htm
8092@@ -0,0 +1,93 @@
8093+<html><body>
8094+
8095+
8096+<table width=300>
8097+ <tr>
8098+ <td fixwidth=20></td>
8099+ <td align=center><img src="l2ui_ch3.herotower_deco" width=256 height=32> </td>
8100+ <td fixwidth=20></td>
8101+ </tr>
8102+</table>
8103+<br>
8104+<table border="0" width="320" bgcolor="000000">
8105+<tr>
8106+
8107+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8108+<td width=99 align=center> <font color=ff0019>Tournament (1x1)</font></td>
8109+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8110+</tr>
8111+</table>
8112+<br>
8113+
8114+
8115+<table width=315 bgcolor=000000>
8116+ <tr>
8117+ <td fixwidth=5>
8118+ </td>
8119+ <td align=center>
8120+ <font color=LEVEL>Players Registered: </font>%teamsRegF1X1%<br>
8121+ </td>
8122+ </tr>
8123+ <tr>
8124+ <td fixwidth=5>
8125+ </td>
8126+ <td align=center>
8127+ <font color=LEVEL>Active Fights: </font>%activeFightsF1X1%<br>
8128+ </td>
8129+ </tr>
8130+ <tr>
8131+ <td fixwidth=5>
8132+ </td>
8133+ <td align=center>
8134+ <font color=LEVEL>Total Fights: </font>%allTimeFights%<br>
8135+ </td>
8136+ </tr>
8137+</table>
8138+
8139+<br>
8140+<table width=315 bgcolor=000000>
8141+ <tr>
8142+ <td fixwidth=50></td>
8143+ <td align=center><button value="Register" action="bypass -h bp_registerTournament1x1" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8144+ <td fixwidth=50></td>
8145+ </tr>
8146+</table>
8147+
8148+<table width=315 bgcolor=000000>
8149+ <tr>
8150+ <td fixwidth=50></td>
8151+ <td align=center><button value="Leave" action="bypass -h bp_removeTournamentParticipation" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8152+ <td fixwidth=50></td>
8153+ </tr>
8154+</table>
8155+
8156+<table width=315 bgcolor=000000>
8157+ <tr>
8158+ <td fixwidth=50></td>
8159+ <td align=center><button value="DeleteTeam" action="bypass -h bp_deleteTournamentTeam" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8160+ <td fixwidth=50></td>
8161+ </tr>
8162+</table>
8163+
8164+<table width=330 bgcolor=000000>
8165+ <tr>
8166+ <td fixwidth=50></td>
8167+ <td align=center>* Your Team *</td>
8168+ <td fixwidth=50></td>
8169+ </tr>
8170+</table>
8171+<center>
8172+%memberslist%
8173+</center>
8174+</body></html>
8175\ No newline at end of file
8176diff --git a/aCis_datapack/data/html/mods/tournament/fights/F2X2.htm b/aCis_datapack/data/html/mods/tournament/fights/F2X2.htm
8177new file mode 100644
8178index 0000000..0dd4456
8179--- /dev/null
8180+++ b/aCis_datapack/data/html/mods/tournament/fights/F2X2.htm
8181@@ -0,0 +1,110 @@
8182+<html><body>
8183+
8184+
8185+<table width=300>
8186+ <tr>
8187+ <td fixwidth=20></td>
8188+ <td align=center><img src="l2ui_ch3.herotower_deco" width=256 height=32> </td>
8189+ <td fixwidth=20></td>
8190+ </tr>
8191+</table>
8192+<br>
8193+<table border="0" width="320" bgcolor="000000">
8194+<tr>
8195+
8196+<td align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8197+<td align=center> <font color=ff0019>Tournament (2x2)</font></td>
8198+<td align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8199+</tr>
8200+</table>
8201+<br>
8202+
8203+
8204+<table width=320 bgcolor=000000>
8205+ <tr>
8206+ <td fixwidth=5></td>
8207+ <td align=center>
8208+ <font color=LEVEL>Players Registered: </font>%teamsRegF2X2%<br>
8209+ </td>
8210+ <td fixwidth=5></td>
8211+ </tr>
8212+ <tr>
8213+ <td fixwidth=5>
8214+ </td>
8215+ <td align=center>
8216+ <font color=LEVEL>Active Fights: </font>%activeFightsF2X2%<br>
8217+ </td>
8218+ </tr>
8219+ <tr>
8220+ <td fixwidth=5>
8221+ </td>
8222+ <td align=center>
8223+ <font color=LEVEL>Total Fights: </font>%allTimeFights%<br>
8224+ </td>
8225+ </tr>
8226+</table>
8227+
8228+<br>
8229+<table width=300 bgcolor=000000>
8230+ <tr>
8231+ <td fixwidth=50></td>
8232+ <td align=center><button value="Register" action="bypass -h bp_registerTournament2x2" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8233+ <td fixwidth=50></td>
8234+ </tr>
8235+</table>
8236+
8237+
8238+<table width=300 bgcolor=000000>
8239+ <tr>
8240+ <td fixwidth=50></td>
8241+ <td align=center><button value="Leave" action="bypass -h bp_removeTournamentParticipation" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8242+ <td fixwidth=50></td>
8243+ </tr>
8244+</table>
8245+
8246+<table width=300 bgcolor=000000>
8247+ <tr>
8248+ <td fixwidth=50></td>
8249+ <td align=center><button value="DeleteTeam" action="bypass -h bp_deleteTournamentTeam" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8250+ <td fixwidth=50></td>
8251+ </tr>
8252+</table>
8253+
8254+
8255+<table width=300>
8256+ <tr>
8257+ <td align=center >Type the name of your partner or use command: <br1><font color=994992>".tournamentinvite playername"</font></td>
8258+
8259+ </tr>
8260+</table>
8261+
8262+<table width=280>
8263+ <tr>
8264+ <td align=center>Player Name:</td>
8265+ <td align=left><edit var="playerName" width=120 height=10></td>
8266+ <td align=center><button value="Invite" action="bypass -h bp_inviteTournamentMember $playerName" width=45 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
8267+ </tr>
8268+ </table>
8269+
8270+<br>
8271+
8272+
8273+<table width=330 bgcolor=000000>
8274+ <tr>
8275+ <td fixwidth=50></td>
8276+ <td align=center>* Your Team *</td>
8277+ <td fixwidth=50></td>
8278+ </tr>
8279+</table>
8280+<center>
8281+%memberslist%
8282+</center>
8283+</body></html>
8284\ No newline at end of file
8285diff --git a/aCis_datapack/data/html/mods/tournament/fights/F3X3.htm b/aCis_datapack/data/html/mods/tournament/fights/F3X3.htm
8286new file mode 100644
8287index 0000000..9afe1b2
8288--- /dev/null
8289+++ b/aCis_datapack/data/html/mods/tournament/fights/F3X3.htm
8290@@ -0,0 +1,110 @@
8291+<html><body>
8292+
8293+
8294+<table width=300>
8295+ <tr>
8296+ <td fixwidth=20></td>
8297+ <td align=center><img src="l2ui_ch3.herotower_deco" width=256 height=32> </td>
8298+ <td fixwidth=20></td>
8299+ </tr>
8300+</table>
8301+<br>
8302+<table border="0" width="320" bgcolor="000000">
8303+<tr>
8304+
8305+<td align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8306+<td align=center> <font color=ff0019>Tournament (3x3)</font></td>
8307+<td align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8308+</tr>
8309+</table>
8310+<br>
8311+
8312+
8313+<table width=320 bgcolor=000000>
8314+ <tr>
8315+ <td fixwidth=5></td>
8316+ <td align=center>
8317+ <font color=LEVEL>Players Registered: </font>%teamsRegF3X3%<br>
8318+ </td>
8319+ <td fixwidth=5></td>
8320+ </tr>
8321+ <tr>
8322+ <td fixwidth=5>
8323+ </td>
8324+ <td align=center>
8325+ <font color=LEVEL>Active Fights: </font>%activeFightsF3X3%<br>
8326+ </td>
8327+ </tr>
8328+ <tr>
8329+ <td fixwidth=5>
8330+ </td>
8331+ <td align=center>
8332+ <font color=LEVEL>Total Fights: </font>%allTimeFights%<br>
8333+ </td>
8334+ </tr>
8335+</table>
8336+
8337+<br>
8338+<table width=300 bgcolor=000000>
8339+ <tr>
8340+ <td fixwidth=50></td>
8341+ <td align=center><button value="Register" action="bypass -h bp_registerTournament3x3" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8342+ <td fixwidth=50></td>
8343+ </tr>
8344+</table>
8345+
8346+
8347+<table width=300 bgcolor=000000>
8348+ <tr>
8349+ <td fixwidth=50></td>
8350+ <td align=center><button value="Leave" action="bypass -h bp_removeTournamentParticipation" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8351+ <td fixwidth=50></td>
8352+ </tr>
8353+</table>
8354+
8355+<table width=300 bgcolor=000000>
8356+ <tr>
8357+ <td fixwidth=50></td>
8358+ <td align=center><button value="DeleteTeam" action="bypass -h bp_deleteTournamentTeam" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8359+ <td fixwidth=50></td>
8360+ </tr>
8361+</table>
8362+
8363+
8364+<table width=300>
8365+ <tr>
8366+ <td align=center >Type the name of your partner or use command: <br1><font color=994992>".tournamentinvite playername"</font></td>
8367+
8368+ </tr>
8369+</table>
8370+
8371+<table width=280>
8372+ <tr>
8373+ <td align=center>Player Name:</td>
8374+ <td align=left><edit var="playerName" width=120 height=10></td>
8375+ <td align=center><button value="Invite" action="bypass -h bp_inviteTournamentMember $playerName" width=45 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
8376+ </tr>
8377+ </table>
8378+
8379+<br>
8380+
8381+
8382+<table width=330 bgcolor=000000>
8383+ <tr>
8384+ <td fixwidth=50></td>
8385+ <td align=center>* Your Team *</td>
8386+ <td fixwidth=50></td>
8387+ </tr>
8388+</table>
8389+<center>
8390+%memberslist%
8391+</center>
8392+</body></html>
8393\ No newline at end of file
8394diff --git a/aCis_datapack/data/html/mods/tournament/fights/F4X4.htm b/aCis_datapack/data/html/mods/tournament/fights/F4X4.htm
8395new file mode 100644
8396index 0000000..a8bd719
8397--- /dev/null
8398+++ b/aCis_datapack/data/html/mods/tournament/fights/F4X4.htm
8399@@ -0,0 +1,110 @@
8400+<html><body>
8401+
8402+
8403+<table width=300>
8404+ <tr>
8405+ <td fixwidth=20></td>
8406+ <td align=center><img src="l2ui_ch3.herotower_deco" width=256 height=32> </td>
8407+ <td fixwidth=20></td>
8408+ </tr>
8409+</table>
8410+<br>
8411+<table border="0" width="320" bgcolor="000000">
8412+<tr>
8413+
8414+<td align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8415+<td align=center> <font color=ff0019>Tournament (4x4)</font></td>
8416+<td align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8417+</tr>
8418+</table>
8419+<br>
8420+
8421+
8422+<table width=320 bgcolor=000000>
8423+ <tr>
8424+ <td fixwidth=5></td>
8425+ <td align=center>
8426+ <font color=LEVEL>Players Registered: </font>%teamsRegF4X4%<br>
8427+ </td>
8428+ <td fixwidth=5></td>
8429+ </tr>
8430+ <tr>
8431+ <td fixwidth=5>
8432+ </td>
8433+ <td align=center>
8434+ <font color=LEVEL>Active Fights: </font>%activeFightsF4X4%<br>
8435+ </td>
8436+ </tr>
8437+ <tr>
8438+ <td fixwidth=5>
8439+ </td>
8440+ <td align=center>
8441+ <font color=LEVEL>Total Fights: </font>%allTimeFights%<br>
8442+ </td>
8443+ </tr>
8444+</table>
8445+
8446+<br>
8447+<table width=300 bgcolor=000000>
8448+ <tr>
8449+ <td fixwidth=50></td>
8450+ <td align=center><button value="Register" action="bypass -h bp_registerTournament4x4" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8451+ <td fixwidth=50></td>
8452+ </tr>
8453+</table>
8454+
8455+
8456+<table width=300 bgcolor=000000>
8457+ <tr>
8458+ <td fixwidth=50></td>
8459+ <td align=center><button value="Leave" action="bypass -h bp_removeTournamentParticipation" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8460+ <td fixwidth=50></td>
8461+ </tr>
8462+</table>
8463+
8464+<table width=300 bgcolor=000000>
8465+ <tr>
8466+ <td fixwidth=50></td>
8467+ <td align=center><button value="DeleteTeam" action="bypass -h bp_deleteTournamentTeam" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8468+ <td fixwidth=50></td>
8469+ </tr>
8470+</table>
8471+
8472+
8473+<table width=300>
8474+ <tr>
8475+ <td align=center >Type the name of your partner or use command: <br1><font color=994992>".tournamentinvite playername"</font></td>
8476+
8477+ </tr>
8478+</table>
8479+
8480+<table width=280>
8481+ <tr>
8482+ <td align=center>Player Name:</td>
8483+ <td align=left><edit var="playerName" width=120 height=10></td>
8484+ <td align=center><button value="Invite" action="bypass -h bp_inviteTournamentMember $playerName" width=45 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
8485+ </tr>
8486+ </table>
8487+
8488+<br>
8489+
8490+
8491+<table width=330 bgcolor=000000>
8492+ <tr>
8493+ <td fixwidth=50></td>
8494+ <td align=center>* Your Team *</td>
8495+ <td fixwidth=50></td>
8496+ </tr>
8497+</table>
8498+<center>
8499+%memberslist%
8500+</center>
8501+</body></html>
8502\ No newline at end of file
8503diff --git a/aCis_datapack/data/html/mods/tournament/fights/F5X5.htm b/aCis_datapack/data/html/mods/tournament/fights/F5X5.htm
8504new file mode 100644
8505index 0000000..361e55b
8506--- /dev/null
8507+++ b/aCis_datapack/data/html/mods/tournament/fights/F5X5.htm
8508@@ -0,0 +1,110 @@
8509+<html><body>
8510+
8511+
8512+<table width=300>
8513+ <tr>
8514+ <td fixwidth=20></td>
8515+ <td align=center><img src="l2ui_ch3.herotower_deco" width=256 height=32> </td>
8516+ <td fixwidth=20></td>
8517+ </tr>
8518+</table>
8519+<br>
8520+<table border="0" width="320" bgcolor="000000">
8521+<tr>
8522+
8523+<td align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8524+<td align=center> <font color=ff0019>Tournament (5x5)</font></td>
8525+<td align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8526+</tr>
8527+</table>
8528+<br>
8529+
8530+
8531+<table width=320 bgcolor=000000>
8532+ <tr>
8533+ <td fixwidth=5></td>
8534+ <td align=center>
8535+ <font color=LEVEL>Players Registered: </font>%teamsRegF5X5%<br>
8536+ </td>
8537+ <td fixwidth=5></td>
8538+ </tr>
8539+ <tr>
8540+ <td fixwidth=5>
8541+ </td>
8542+ <td align=center>
8543+ <font color=LEVEL>Active Fights: </font>%activeFightsF5X5%<br>
8544+ </td>
8545+ </tr>
8546+ <tr>
8547+ <td fixwidth=5>
8548+ </td>
8549+ <td align=center>
8550+ <font color=LEVEL>Total Fights: </font>%allTimeFights%<br>
8551+ </td>
8552+ </tr>
8553+</table>
8554+
8555+<br>
8556+<table width=300 bgcolor=000000>
8557+ <tr>
8558+ <td fixwidth=50></td>
8559+ <td align=center><button value="Register" action="bypass -h bp_registerTournament5x5" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8560+ <td fixwidth=50></td>
8561+ </tr>
8562+</table>
8563+
8564+
8565+<table width=300 bgcolor=000000>
8566+ <tr>
8567+ <td fixwidth=50></td>
8568+ <td align=center><button value="Leave" action="bypass -h bp_removeTournamentParticipation" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8569+ <td fixwidth=50></td>
8570+ </tr>
8571+</table>
8572+
8573+<table width=300 bgcolor=000000>
8574+ <tr>
8575+ <td fixwidth=50></td>
8576+ <td align=center><button value="DeleteTeam" action="bypass -h bp_deleteTournamentTeam" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8577+ <td fixwidth=50></td>
8578+ </tr>
8579+</table>
8580+
8581+
8582+<table width=300>
8583+ <tr>
8584+ <td align=center >Type the name of your partner or use command: <br1><font color=994992>".tournamentinvite playername"</font></td>
8585+
8586+ </tr>
8587+</table>
8588+
8589+<table width=280>
8590+ <tr>
8591+ <td align=center>Player Name:</td>
8592+ <td align=left><edit var="playerName" width=120 height=10></td>
8593+ <td align=center><button value="Invite" action="bypass -h bp_inviteTournamentMember $playerName" width=45 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
8594+ </tr>
8595+ </table>
8596+
8597+<br>
8598+
8599+
8600+<table width=330 bgcolor=000000>
8601+ <tr>
8602+ <td fixwidth=50></td>
8603+ <td align=center>* Your Team *</td>
8604+ <td fixwidth=50></td>
8605+ </tr>
8606+</table>
8607+<center>
8608+%memberslist%
8609+</center>
8610+</body></html>
8611\ No newline at end of file
8612diff --git a/aCis_datapack/data/html/mods/tournament/fights/F9X9.htm b/aCis_datapack/data/html/mods/tournament/fights/F9X9.htm
8613new file mode 100644
8614index 0000000..2cddd64
8615--- /dev/null
8616+++ b/aCis_datapack/data/html/mods/tournament/fights/F9X9.htm
8617@@ -0,0 +1,110 @@
8618+<html><body>
8619+
8620+
8621+<table width=300>
8622+ <tr>
8623+ <td fixwidth=20></td>
8624+ <td align=center><img src="l2ui_ch3.herotower_deco" width=256 height=32> </td>
8625+ <td fixwidth=20></td>
8626+ </tr>
8627+</table>
8628+<br>
8629+<table border="0" width="320" bgcolor="000000">
8630+<tr>
8631+
8632+<td align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8633+<td align=center> <font color=ff0019>Tournament (9x9)</font></td>
8634+<td align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8635+</tr>
8636+</table>
8637+<br>
8638+
8639+
8640+<table width=320 bgcolor=000000>
8641+ <tr>
8642+ <td fixwidth=5></td>
8643+ <td align=center>
8644+ <font color=LEVEL>Players Registered: </font>%teamsRegF9X9%<br>
8645+ </td>
8646+ <td fixwidth=5></td>
8647+ </tr>
8648+ <tr>
8649+ <td fixwidth=5>
8650+ </td>
8651+ <td align=center>
8652+ <font color=LEVEL>Active Fights: </font>%activeFightsF9X9%<br>
8653+ </td>
8654+ </tr>
8655+ <tr>
8656+ <td fixwidth=5>
8657+ </td>
8658+ <td align=center>
8659+ <font color=LEVEL>Total Fights: </font>%allTimeFights%<br>
8660+ </td>
8661+ </tr>
8662+</table>
8663+
8664+<br>
8665+<table width=300 bgcolor=000000>
8666+ <tr>
8667+ <td fixwidth=50></td>
8668+ <td align=center><button value="Register" action="bypass -h bp_registerTournament9x9" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8669+ <td fixwidth=50></td>
8670+ </tr>
8671+</table>
8672+
8673+
8674+<table width=300 bgcolor=000000>
8675+ <tr>
8676+ <td fixwidth=50></td>
8677+ <td align=center><button value="Leave" action="bypass -h bp_removeTournamentParticipation" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8678+ <td fixwidth=50></td>
8679+ </tr>
8680+</table>
8681+
8682+<table width=300 bgcolor=000000>
8683+ <tr>
8684+ <td fixwidth=50></td>
8685+ <td align=center><button value="DeleteTeam" action="bypass -h bp_deleteTournamentTeam" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
8686+ <td fixwidth=50></td>
8687+ </tr>
8688+</table>
8689+
8690+
8691+<table width=300>
8692+ <tr>
8693+ <td align=center >Type the name of your partner or use command: <br1><font color=994992>".tournamentinvite playername"</font></td>
8694+
8695+ </tr>
8696+</table>
8697+
8698+<table width=280>
8699+ <tr>
8700+ <td align=center>Player Name:</td>
8701+ <td align=left><edit var="playerName" width=120 height=10></td>
8702+ <td align=center><button value="Invite" action="bypass -h bp_inviteTournamentMember $playerName" width=45 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
8703+ </tr>
8704+ </table>
8705+
8706+<br>
8707+
8708+
8709+<table width=330 bgcolor=000000>
8710+ <tr>
8711+ <td fixwidth=50></td>
8712+ <td align=center>* Your Team *</td>
8713+ <td fixwidth=50></td>
8714+ </tr>
8715+</table>
8716+<center>
8717+%memberslist%
8718+</center>
8719+</body></html>
8720\ No newline at end of file
8721diff --git a/aCis_datapack/data/html/mods/tournament/invitePage.htm b/aCis_datapack/data/html/mods/tournament/invitePage.htm
8722new file mode 100644
8723index 0000000..526a149
8724--- /dev/null
8725+++ b/aCis_datapack/data/html/mods/tournament/invitePage.htm
8726@@ -0,0 +1,49 @@
8727+
8728+<html>
8729+<title>Battle Tournament</title>
8730+<body>
8731+<center>
8732+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
8733+<br>
8734+
8735+
8736+<center>
8737+ Tournament Team:
8738+
8739+
8740+</center>
8741+
8742+<img src="Sek.cbui371" width=300 height=1>
8743+
8744+
8745+
8746+<img src="Sek.cbui371" width=300 height=1>
8747+
8748+<center>
8749+ Type the name of your partner or use command: <br1><font color=994992>".tournamentinvite playername"</font>
8750+</center>
8751+<table width=280>
8752+ <tr>
8753+ <td>Player Name</td>
8754+ <td><edit var="playerName" width=120 height=15></td>
8755+ <td><button value="Invite" action="bypass -h bp_inviteTournamentMember $playerName" width=45 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
8756+ </tr>
8757+ </table>
8758+
8759+<br>
8760+
8761+<center>
8762+ <table width=320 bgcolor=000000>
8763+ <tr>
8764+ <td align=center>
8765+ <font color=994992>** Team Members **</font>
8766+ </td>
8767+ </tr>
8768+ </table>
8769+ %memberslist%
8770+
8771+</center>
8772+<br>
8773+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
8774+</body>
8775+</html>
8776diff --git a/aCis_datapack/data/html/mods/tournament/main.htm b/aCis_datapack/data/html/mods/tournament/main.htm
8777new file mode 100644
8778index 0000000..9b5eb60
8779--- /dev/null
8780+++ b/aCis_datapack/data/html/mods/tournament/main.htm
8781@@ -0,0 +1,126 @@
8782+
8783+<html>
8784+<title>Battle Tournament</title>
8785+<body>
8786+<center>
8787+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
8788+<br>
8789+
8790+
8791+<img src="Sek.cbui371" width=300 height=1>
8792+<table width=280 bgcolor=000000>
8793+<tr>
8794+<td width=25 align="right"><button action="" width=32 height=32 back="icon.skill1367" fore="icon.skill1369"></td>
8795+<td width=120>
8796+<table>
8797+<tr><td><font color="abf04b">[ Battle Tour 1x1 ] </font></td></tr>
8798+<tr><td>{ 1 member per team }</font></td></tr>
8799+</table>
8800+</td>
8801+<td width=8></td>
8802+<td><button width="115" height="30" back="L2UI_ch3.bigbutton2_down" fore="L2UI_ch3.bigbutton2" action="bypass -h bp_showTournamentPage fights/F1X1" value="Fight 1x1"></td>
8803+</tr>
8804+</table>
8805+
8806+<img src="Sek.cbui371" width=300 height=1>
8807+<table width=280 bgcolor=000000>
8808+<tr>
8809+<td width=25 align="right"><button action="" width=32 height=32 back="icon.skill1367" fore="icon.skill1369"></td>
8810+<td width=120>
8811+<table>
8812+<tr><td><font color="abf04b">[ Battle Tour 2x2 ] </font></td></tr>
8813+<tr><td>{ 2 members for pt }</font></td></tr>
8814+</table>
8815+</td>
8816+<td width=8></td>
8817+<td><button width="115" height="30" back="L2UI_ch3.bigbutton2_down" fore="L2UI_ch3.bigbutton2" action="bypass -h bp_showTournamentPage fights/F2X2" value="Fight 2x2"></td>
8818+</tr>
8819+</table>
8820+
8821+
8822+<img src="Sek.cbui371" width=300 height=1>
8823+<table width=280 bgcolor=000000>
8824+<tr>
8825+<td width=25 align="right"><button action="" width=32 height=32 back="icon.etc_event_medal_i00" fore="icon.skill1368"></td>
8826+<td width=120>
8827+<table>
8828+<tr><td><font color="abf04b">[ Battle Tour 3x3 ] </font></td></tr>
8829+<tr><td>{ 3 members for pt } </font></td></tr>
8830+</table>
8831+</td>
8832+<td width=11></td>
8833+<td><button width="115" height="30" back="L2UI_ch3.bigbutton2_down" fore="L2UI_ch3.bigbutton2" action="bypass -h bp_showTournamentPage fights/F3X3" value="Fight 3x3"></td>
8834+</tr>
8835+</table>
8836+
8837+
8838+<img src="Sek.cbui371" width=300 height=1>
8839+<table width=280 bgcolor=000000>
8840+<tr>
8841+<td width=25 align="right"><button action="" width=32 height=32 back="icon.etc_event_medal_i00" fore="icon.skill1368"></td>
8842+<td width=120>
8843+<table>
8844+<tr><td><font color="abf04b">[ Battle Tour 4x4 ] </font></td></tr>
8845+<tr><td>{ 4 members for pt } </font></td></tr>
8846+</table>
8847+</td>
8848+<td width=11></td>
8849+<td><button width="115" height="30" back="L2UI_ch3.bigbutton2_down" fore="L2UI_ch3.bigbutton2" action="bypass -h bp_showTournamentPage fights/F4X4" value="Fight 4x4"></td>
8850+</tr>
8851+</table>
8852+
8853+<img src="Sek.cbui371" width=300 height=1>
8854+<table width=280 bgcolor=000000>
8855+<tr>
8856+<td width=25 align="right"><button action="" width=32 height=32 back="icon.etc_event_medal_i00" fore="icon.skill1370"></td>
8857+<td width=120>
8858+<table>
8859+<tr><td><font color="abf04b">[ Battle Tour 5x5 ] </font></td></tr>
8860+<tr><td>{ 5 members for pt } </font></td></tr>
8861+</table>
8862+</td>
8863+<td width=11></td>
8864+<td><button width="115" height="30" back="L2UI_ch3.bigbutton2_down" fore="L2UI_ch3.bigbutton2" action="bypass -h bp_showTournamentPage fights/F5X5" value="Fight 5x5"></td>
8865+</tr>
8866+</table>
8867+
8868+
8869+<img src="Sek.cbui371" width=300 height=1>
8870+<table width=280 bgcolor=000000>
8871+<tr>
8872+<td width=25 align="right"><button action="" width=32 height=32 back="icon.etc_event_medal_i00" fore="icon.skill1370"></td>
8873+<td width=120>
8874+<table>
8875+<tr><td><font color="abf04b">[ Battle Tour 9x9 ] </font></td></tr>
8876+<tr><td>{ 9 members for pt } </font></td></tr>
8877+</table>
8878+</td>
8879+<td width=11></td>
8880+<td><button width="115" height="30" back="L2UI_ch3.bigbutton2_down" fore="L2UI_ch3.bigbutton2" action="bypass -h bp_showTournamentPage fights/F9X9" value="Fight 9x9"></td>
8881+</tr>
8882+</table>
8883+
8884+
8885+<img src="Sek.cbui371" width=300 height=1>
8886+<br>
8887+<table width=315 bgcolor=000000>
8888+ <tr>
8889+ <td align=center><font color=ff0000>Quick Actions</font></td>
8890+
8891+ </tr>
8892+</table>
8893+<br>
8894+<table width=315 bgcolor=000000>
8895+ <tr>
8896+ <td align=center><font color=LEVEL><a action="bypass bp_deleteTournamentTeam">Delete Team</a></font></td>
8897+ <td align=center><font color=LEVEL><a action="bypass bp_leaveTournamentTeam">Leave Team</a></font></td>
8898+ <td align=center><font color=LEVEL><a action="bypass bp_removeTournamentParticipation">Unregister</a></font></td>
8899+ <td align=center><font color=LEVEL><a action="bypass bp_showTournamentPage invitePage">Invite Page</a></font></td>
8900+
8901+
8902+ </tr>
8903+</table>
8904+
8905+<br>
8906+</body>
8907+</html>
8908diff --git a/aCis_datapack/data/html/mods/tournament/myTour - Copia.htm b/aCis_datapack/data/html/mods/tournament/myTour - Copia.htm
8909new file mode 100644
8910index 0000000..8698fd4
8911--- /dev/null
8912+++ b/aCis_datapack/data/html/mods/tournament/myTour - Copia.htm
8913@@ -0,0 +1,148 @@
8914+<html><title>My Tour</title><body>
8915+
8916+<center>
8917+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
8918+</center>
8919+<a action="bypass bp_showTournamentPage ranking">rank</a>
8920+
8921+<table border="1" width=316 bgcolor="000000">
8922+<tr>
8923+<td width=99 align=center><font color=LEVEL>%playerName%</font>
8924+</td>
8925+</tr>
8926+</table>
8927+<br>
8928+
8929+<table border="0" width="300" bgcolor="000000">
8930+<tr>
8931+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8932+<td width=99 align=center> <font color=ff0019> My Tour</font></td>
8933+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
8934+</tr>
8935+</table>
8936+<br>
8937+
8938+
8939+<table width=300 height=32 bgcolor=000000>
8940+<tr>
8941+<td fixwidth=5>
8942+</td>
8943+<td fixwidth=250 align=center>
8944+<font color=LEVEL>Here you can check all your Tournament Status.</font>
8945+</td>
8946+
8947+</tr>
8948+</table>
8949+<br>
8950+
8951+<table width=320 bgcolor=000000>
8952+ <tr>
8953+ <td fixwidth=5>
8954+ </td>
8955+ <td fixwidth=290>
8956+ <font color=LEVEL>General</font><br>
8957+ </td>
8958+ </tr>
8959+
8960+</table>
8961+
8962+<table width=320 bgcolor=000000>
8963+ <tr>
8964+ <td fixwidth=5>
8965+ </td>
8966+ <td align=left>
8967+ <font color=ff0029>DPF:</font> %dpfTotal%
8968+ <br>
8969+ </td>
8970+ <td align=left>
8971+ <font color=ff0029>WDT:</font> %wdt%
8972+
8973+ <br>
8974+ </td>
8975+ </tr>
8976+ <tr>
8977+ <td fixwidth=5>
8978+ </td>
8979+ <td align=left>
8980+ <font color=ff0029>Total Damage:</font> %totalDmg%
8981+ <br>
8982+ </td>
8983+ <td align=left>
8984+ <font color=ff0029>Total Fights:</font> %totalFights%
8985+ <br>
8986+ </td>
8987+ </tr>
8988+ <tr>
8989+ <td fixwidth=5>
8990+ </td>
8991+ <td align=left>
8992+ <font color=ff0029>Total Kills:</font> %killstotal%
8993+ <br>
8994+ </td>
8995+
8996+ </tr>
8997+</table>
8998+<br>
8999+
9000+<table width=300 bgcolor=000000>
9001+<tr>
9002+<td fixwidth=5>
9003+</td>
9004+<td fixwidth=250 align=center>
9005+<font color=LEVEL>Click on Fight to full check</font>
9006+</td>
9007+
9008+</tr>
9009+</table>
9010+<table width=330 bgcolor=000000>
9011+ <tr>
9012+ <td fixwidth=30>
9013+ </td>
9014+ <td>
9015+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
9016+ </td>
9017+ <td>
9018+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
9019+ </td>
9020+ <td>
9021+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
9022+ </td>
9023+ <td>
9024+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
9025+ </td>
9026+ <td>
9027+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
9028+ </td>
9029+ <td>
9030+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
9031+ </td>
9032+ <td fixwidth=30>
9033+ </td>
9034+ </tr>
9035+
9036+
9037+</table>
9038+
9039+
9040+<br><br>
9041+
9042+<table width=300 bgcolor=000000>
9043+ <tr>
9044+ <td fixwidth=5>
9045+ </td>
9046+ <td fixwidth=250>
9047+ <a action=""><font color=LEVEL>DPF = Damage Per Fight</font></a>
9048+ </td>
9049+ </tr>
9050+ <tr>
9051+ <td fixwidth=5>
9052+ </td>
9053+ <td fixwidth=250>
9054+ <a action=""><font color=LEVEL>WDT = Win/Defeats/Ties Ratio</font></a>
9055+ </td>
9056+ </tr>
9057+
9058+</table>
9059+
9060+
9061+</body></html>
9062\ No newline at end of file
9063diff --git a/aCis_datapack/data/html/mods/tournament/myTour.htm b/aCis_datapack/data/html/mods/tournament/myTour.htm
9064new file mode 100644
9065index 0000000..740f6de
9066--- /dev/null
9067+++ b/aCis_datapack/data/html/mods/tournament/myTour.htm
9068@@ -0,0 +1,161 @@
9069+<html><title>My Tour</title><body>
9070+
9071+<table width=314 bgcolor=000000>
9072+ <tr>
9073+ <td fixwidth=50></td>
9074+ <td align=center><button value="Rankings" action="bypass bp_showTournamentPage ranking" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
9075+ <td fixwidth=50></td>
9076+ </tr>
9077+</table>
9078+
9079+<table width=300>
9080+ <tr>
9081+ <td fixwidth=20></td>
9082+ <td align=center><img src="l2ui_ch3.herotower_deco" width=256 height=32> </td>
9083+ <td fixwidth=50></td>
9084+ </tr>
9085+</table>
9086+
9087+
9088+
9089+<table border="1" width=316 bgcolor="000000">
9090+<tr>
9091+<td width=99 align=center><font color=LEVEL>%playerName%</font>
9092+</td>
9093+</tr>
9094+</table>
9095+<br>
9096+
9097+<table border="0" width="300" bgcolor="000000">
9098+<tr>
9099+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9100+<td width=99 align=center> <font color=ff0019> My Tour</font></td>
9101+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9102+</tr>
9103+</table>
9104+<br>
9105+
9106+
9107+<table width=300 height=32 bgcolor=000000>
9108+<tr>
9109+<td fixwidth=5>
9110+</td>
9111+<td fixwidth=250 align=center>
9112+<font color=LEVEL>Here you can check all your Tournament Status.</font>
9113+</td>
9114+
9115+</tr>
9116+</table>
9117+<br>
9118+
9119+<table width=320 bgcolor=000000>
9120+ <tr>
9121+ <td fixwidth=5>
9122+ </td>
9123+ <td fixwidth=290>
9124+ <font color=LEVEL>General</font><br>
9125+ </td>
9126+ </tr>
9127+
9128+</table>
9129+
9130+<table width=320 bgcolor=000000>
9131+ <tr>
9132+ <td fixwidth=5>
9133+ </td>
9134+ <td align=left>
9135+ <font color=ff0029>DPF:</font> %dpfTotal%
9136+ <br>
9137+ </td>
9138+ <td align=left>
9139+ <font color=ff0029>WDT:</font> %wdt%
9140+
9141+ <br>
9142+ </td>
9143+ </tr>
9144+ <tr>
9145+ <td fixwidth=5>
9146+ </td>
9147+ <td align=left>
9148+ <font color=ff0029>Total Damage:</font> %totalDmg%
9149+ <br>
9150+ </td>
9151+ <td align=left>
9152+ <font color=ff0029>Total Fights:</font> %totalFights%
9153+ <br>
9154+ </td>
9155+ </tr>
9156+ <tr>
9157+ <td fixwidth=5>
9158+ </td>
9159+ <td align=left>
9160+ <font color=ff0029>Total Kills:</font> %killstotal%
9161+ <br>
9162+ </td>
9163+
9164+ </tr>
9165+</table>
9166+<br>
9167+
9168+<table width=300 bgcolor=000000>
9169+<tr>
9170+<td fixwidth=5>
9171+</td>
9172+<td fixwidth=250 align=center>
9173+<font color=LEVEL>Click on Fight to full check</font>
9174+</td>
9175+
9176+</tr>
9177+</table>
9178+<table width=330 bgcolor=000000>
9179+ <tr>
9180+ <td fixwidth=30>
9181+ </td>
9182+ <td>
9183+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
9184+ </td>
9185+ <td>
9186+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
9187+ </td>
9188+ <td>
9189+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
9190+ </td>
9191+ <td>
9192+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
9193+ </td>
9194+ <td>
9195+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
9196+ </td>
9197+ <td>
9198+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
9199+ </td>
9200+ <td fixwidth=30>
9201+ </td>
9202+ </tr>
9203+
9204+
9205+</table>
9206+
9207+
9208+<br>
9209+
9210+<table width=300 bgcolor=000000>
9211+ <tr>
9212+ <td fixwidth=5>
9213+ </td>
9214+ <td fixwidth=250>
9215+ <a action=""><font color=LEVEL>DPF = Damage Per Fight</font></a>
9216+ </td>
9217+ </tr>
9218+ <tr>
9219+ <td fixwidth=5>
9220+ </td>
9221+ <td fixwidth=250>
9222+ <a action=""><font color=LEVEL>WDT = Win/Defeats/Ties Ratio</font></a>
9223+ </td>
9224+ </tr>
9225+
9226+</table>
9227+
9228+
9229+</body></html>
9230\ No newline at end of file
9231diff --git a/aCis_datapack/data/html/mods/tournament/ranking.htm b/aCis_datapack/data/html/mods/tournament/ranking.htm
9232new file mode 100644
9233index 0000000..5d692e0
9234--- /dev/null
9235+++ b/aCis_datapack/data/html/mods/tournament/ranking.htm
9236@@ -0,0 +1,139 @@
9237+<html><body>
9238+
9239+<center>
9240+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
9241+</center>
9242+<table border="1" width="315" bgcolor="000000">
9243+<tr>
9244+<td width=99 align=center>Tournament Points: <font color=LEVEL>%tourPoints%</font><br1>
9245+</td>
9246+</tr>
9247+</table>
9248+<br>
9249+<table border="0" width="300" bgcolor="000000">
9250+<tr>
9251+
9252+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9253+<td width=99 align=center> <font color=ff0019>Rankings</font></td>
9254+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9255+</tr>
9256+</table>
9257+<br>
9258+
9259+
9260+<table width=300 height=32 bgcolor=000000>
9261+<tr>
9262+<td fixwidth=5>
9263+</td>
9264+<td fixwidth=32 height=35>
9265+<img src=icon.skill1363 width=32 height=32>
9266+</td>
9267+<td fixwidth=250>
9268+<font color=FE642E>Top Global</font><br1>
9269+<font color=F2F5A9>Best Tournament Players.</font>
9270+</td>
9271+<td fixwidth=50>
9272+<button action="bypass -h bp_showTournamentPage ranking/global" width=32 height=32 fore="L2UI_CH3.Minimap.mapbutton_zoomin1" back="L2UI_CH3.Minimap.mapbutton_zoomin2">
9273+</td>
9274+</tr>
9275+</table>
9276+
9277+
9278+<table width=300 height=32 bgcolor=000000>
9279+ <tr>
9280+ <td fixwidth=5>
9281+ </td>
9282+ <td fixwidth=32 height=35>
9283+ <img src=icon.skill1230 width=32 height=32>
9284+ </td>
9285+ <td fixwidth=250>
9286+ <font color=FE642E>Top Kills</font><br1>
9287+ <font color=F2F5A9>Top Killers in Tournament.</font>
9288+ </td>
9289+ <td fixwidth=50>
9290+ <button action="bypass -h bp_showTournamentPage ranking/kills" width=32 height=32 fore="L2UI_CH3.Minimap.mapbutton_zoomin1" back="L2UI_CH3.Minimap.mapbutton_zoomin2">
9291+ </td>
9292+ </tr>
9293+</table>
9294+
9295+<table width=300 height=32 bgcolor=000000>
9296+<tr>
9297+<td fixwidth=5>
9298+</td>
9299+<td fixwidth=32 height=35>
9300+<img src=icon.skill1374 width=32 height=32>
9301+</td>
9302+<td fixwidth=250>
9303+<font color=FE642E>Top Victories</font><br1>
9304+<font color=F2F5A9>Most victorious players in Tournament.</font>
9305+</td>
9306+<td fixwidth=50>
9307+<button action="bypass -h bp_showTournamentPage ranking/victories" width=32 height=32 fore="L2UI_CH3.Minimap.mapbutton_zoomin1" back="L2UI_CH3.Minimap.mapbutton_zoomin2">
9308+</td>
9309+</tr>
9310+</table>
9311+
9312+<table width=300 height=32 bgcolor=000000>
9313+<tr>
9314+<td fixwidth=5>
9315+</td>
9316+<td fixwidth=32 height=35>
9317+<img src=icon.skill0260 width=32 height=32>
9318+</td>
9319+<td fixwidth=250>
9320+<font color=FE642E>Top Damage</font><br1>
9321+<font color=F2F5A9>Players with more damage in Tournament.</font>
9322+</td>
9323+<td fixwidth=50>
9324+<button action="bypass -h bp_showTournamentPage ranking/damage" width=32 height=32 fore="L2UI_CH3.Minimap.mapbutton_zoomin1" back="L2UI_CH3.Minimap.mapbutton_zoomin2">
9325+</td>
9326+</tr>
9327+</table>
9328+
9329+
9330+<table width=300 height=32 bgcolor=000000>
9331+<tr>
9332+<td fixwidth=5>
9333+</td>
9334+<td fixwidth=32 height=35>
9335+<img src=icon.skill0426 width=32 height=32>
9336+</td>
9337+<td fixwidth=250>
9338+<font color=FE642E>Top Ties</font><br1>
9339+<font color=F2F5A9>Players with more tied fights in Tournament.</font>
9340+</td>
9341+<td fixwidth=50>
9342+<button action="bypass -h bp_showTournamentPage ranking/ties" width=32 height=32 fore="L2UI_CH3.Minimap.mapbutton_zoomin1" back="L2UI_CH3.Minimap.mapbutton_zoomin2">
9343+</td>
9344+</tr>
9345+</table>
9346+
9347+<table width=300 height=32 bgcolor=000000>
9348+<tr>
9349+<td fixwidth=5>
9350+</td>
9351+<td fixwidth=32 height=40>
9352+<img src=icon.skill0060 width=32 height=32>
9353+</td>
9354+<td fixwidth=250>
9355+<font color=FE642E>Top Defeats</font><br1>
9356+<font color=F2F5A9>Players with more deaths in Tournament.</font>
9357+</td>
9358+<td fixwidth=50>
9359+<button action="bypass -h bp_showTournamentPage ranking/defeats" width=32 height=32 fore="L2UI_CH3.Minimap.mapbutton_zoomin1" back="L2UI_CH3.Minimap.mapbutton_zoomin2">
9360+</td>
9361+</tr>
9362+</table>
9363+
9364+<br>
9365+<table width=314 bgcolor=000000>
9366+ <tr>
9367+ <td fixwidth=50></td>
9368+ <td align=center><button value="Back" action="bypass bp_showTournamentPage mytour" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
9369+ <td fixwidth=50></td>
9370+ </tr>
9371+</table>
9372+
9373+
9374+
9375+</body></html>
9376\ No newline at end of file
9377diff --git a/aCis_datapack/data/html/mods/tournament/ranking/damage.htm b/aCis_datapack/data/html/mods/tournament/ranking/damage.htm
9378new file mode 100644
9379index 0000000..9b8e3d4
9380--- /dev/null
9381+++ b/aCis_datapack/data/html/mods/tournament/ranking/damage.htm
9382@@ -0,0 +1,148 @@
9383+<html><body>
9384+
9385+<table border="1" width="320" bgcolor="000000">
9386+<tr>
9387+<td width=99 align=center>Tournament Points: <font color=LEVEL>%tourPoints%</font><br1>
9388+</td>
9389+</tr>
9390+</table>
9391+<table border="0" width="300" bgcolor="000000">
9392+<tr>
9393+
9394+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9395+<td width=99 align=center> <font color=ff0019>(Damage) Select a Mode:</font></td>
9396+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9397+</tr>
9398+</table>
9399+<br>
9400+
9401+
9402+
9403+<table width=300 height=32 bgcolor=000000>
9404+<tr>
9405+<td fixwidth=5>
9406+</td>
9407+<td fixwidth=32 height=35>
9408+<img src=l2ui_ch3.calculate1_1 width=32 height=32>
9409+</td>
9410+<td fixwidth=190 align=center>
9411+<font color=LEVEL>1x1 MODE</font><br1>
9412+<a action="bypass bp_tournamentRanking F1X1 damage"><font color=009099>Check Ranking</font></a>
9413+</td>
9414+<td fixwidth=32 height=35>
9415+<img src=l2ui_ch3.calculate1_1 width=32 height=32>
9416+</td>
9417+</tr>
9418+</table>
9419+<br>
9420+
9421+
9422+<table width=300 height=32 bgcolor=000000>
9423+<tr>
9424+<td fixwidth=5>
9425+</td>
9426+<td fixwidth=32 height=35>
9427+<img src=l2ui_ch3.calculate1_2 width=32 height=32>
9428+</td>
9429+<td fixwidth=190 align=center>
9430+<font color=LEVEL>2x2 MODE</font><br1>
9431+<a action="bypass bp_tournamentRanking F2X2 damage"><font color=009099>Check Ranking</font></a>
9432+</td>
9433+<td fixwidth=32 height=35>
9434+<img src=l2ui_ch3.calculate1_2 width=32 height=32>
9435+</td>
9436+</tr>
9437+</table>
9438+<br>
9439+
9440+
9441+<table width=300 height=32 bgcolor=000000>
9442+<tr>
9443+<td fixwidth=5>
9444+</td>
9445+<td fixwidth=32 height=35>
9446+<img src=l2ui_ch3.calculate1_3 width=32 height=32>
9447+</td>
9448+<td fixwidth=190 align=center>
9449+<font color=LEVEL>3x3 MODE</font><br1>
9450+<a action="bypass bp_tournamentRanking F3X3 damage"><font color=009099>Check Ranking</font></a>
9451+</td>
9452+<td fixwidth=32 height=35>
9453+<img src=l2ui_ch3.calculate1_3 width=32 height=32>
9454+</td>
9455+</tr>
9456+</table>
9457+<br>
9458+
9459+
9460+<table width=300 height=32 bgcolor=000000>
9461+<tr>
9462+<td fixwidth=5>
9463+</td>
9464+<td fixwidth=32 height=35>
9465+<img src=l2ui_ch3.calculate1_4 width=32 height=32>
9466+</td>
9467+<td fixwidth=190 align=center>
9468+<font color=LEVEL>4x4 MODE</font><br1>
9469+<a action="bypass bp_tournamentRanking F4X4 damage"><font color=009099>Check Ranking</font></a>
9470+</td>
9471+<td fixwidth=32 height=35>
9472+<img src=l2ui_ch3.calculate1_4 width=32 height=32>
9473+</td>
9474+</tr>
9475+</table>
9476+<br>
9477+
9478+
9479+
9480+<table width=300 height=32 bgcolor=000000>
9481+<tr>
9482+<td fixwidth=5>
9483+</td>
9484+<td fixwidth=32 height=35>
9485+<img src=l2ui_ch3.calculate1_5 width=32 height=32>
9486+</td>
9487+<td fixwidth=190 align=center>
9488+<font color=LEVEL>5x5 MODE</font><br1>
9489+<a action="bypass bp_tournamentRanking F5X5 damage"><font color=009099>Check Ranking</font></a>
9490+</td>
9491+<td fixwidth=32 height=35>
9492+<img src=l2ui_ch3.calculate1_5 width=32 height=32>
9493+</td>
9494+</tr>
9495+</table>
9496+<br>
9497+
9498+
9499+<table width=300 height=32 bgcolor=000000>
9500+<tr>
9501+<td fixwidth=5>
9502+</td>
9503+<td fixwidth=32 height=35>
9504+<img src=l2ui_ch3.calculate1_9 width=32 height=32>
9505+</td>
9506+<td fixwidth=190 align=center>
9507+<font color=LEVEL>9x9 MODE</font><br1>
9508+<a action="bypass bp_tournamentRanking F9X9 damage"><font color=009099>Check Ranking</font></a>
9509+</td>
9510+<td fixwidth=32 height=35>
9511+<img src=l2ui_ch3.calculate1_9 width=32 height=32>
9512+</td>
9513+</tr>
9514+</table>
9515+<br>
9516+<table width=314 bgcolor=000000>
9517+ <tr>
9518+ <td fixwidth=50></td>
9519+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
9520+ <td fixwidth=50></td>
9521+ </tr>
9522+</table>
9523+
9524+
9525+
9526+
9527+
9528+
9529+
9530+</body></html>
9531\ No newline at end of file
9532diff --git a/aCis_datapack/data/html/mods/tournament/ranking/damage/F1X1.htm b/aCis_datapack/data/html/mods/tournament/ranking/damage/F1X1.htm
9533new file mode 100644
9534index 0000000..003f324
9535--- /dev/null
9536+++ b/aCis_datapack/data/html/mods/tournament/ranking/damage/F1X1.htm
9537@@ -0,0 +1,53 @@
9538+<html><body>
9539+
9540+<center>
9541+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
9542+</center>
9543+
9544+<br>
9545+<table border="0" width="320" bgcolor="000000">
9546+<tr>
9547+
9548+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9549+<td width=99 align=center> <font color=ff0019>Damage Ranking (1x1)</font></td>
9550+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9551+</tr>
9552+</table>
9553+<br>
9554+
9555+<table width=300 bgcolor=000000>
9556+ <tr>
9557+ <td fixwidth=5></td>
9558+ <td align=center fixwidth=20>
9559+ #
9560+ </td>
9561+ <td align=center fixwidth=75>
9562+ Player
9563+ </td>
9564+ <td align=center fixwidth=50>
9565+ Damage
9566+ </td>
9567+ <td align=center fixwidth=50>
9568+ Action
9569+ </td>
9570+ </tr>
9571+
9572+</table>
9573+%ranking-damageF1X1%
9574+
9575+<br>
9576+<table width=314 bgcolor=000000>
9577+ <tr>
9578+ <td fixwidth=50></td>
9579+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/damage" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
9580+ <td fixwidth=50></td>
9581+ </tr>
9582+</table>
9583+
9584+
9585+
9586+
9587+
9588+
9589+
9590+</body></html>
9591\ No newline at end of file
9592diff --git a/aCis_datapack/data/html/mods/tournament/ranking/damage/F2X2.htm b/aCis_datapack/data/html/mods/tournament/ranking/damage/F2X2.htm
9593new file mode 100644
9594index 0000000..2cf79e2
9595--- /dev/null
9596+++ b/aCis_datapack/data/html/mods/tournament/ranking/damage/F2X2.htm
9597@@ -0,0 +1,54 @@
9598+<html><body>
9599+
9600+<center>
9601+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
9602+</center>
9603+
9604+<br>
9605+<table border="0" width="320" bgcolor="000000">
9606+<tr>
9607+
9608+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9609+<td width=99 align=center> <font color=ff0019>Damage Ranking (2x2)</font></td>
9610+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9611+</tr>
9612+</table>
9613+<br>
9614+
9615+<table width=300 bgcolor=000000>
9616+ <tr>
9617+ <td fixwidth=5></td>
9618+ <td align=center fixwidth=20>
9619+ #
9620+ </td>
9621+ <td align=center fixwidth=75>
9622+ Player
9623+ </td>
9624+ <td align=center fixwidth=50>
9625+ Damage
9626+ </td>
9627+ <td align=center fixwidth=50>
9628+ Action
9629+ </td>
9630+ </tr>
9631+
9632+</table>
9633+%ranking-damageF2X2%
9634+
9635+
9636+
9637+<br>
9638+<table width=314 bgcolor=000000>
9639+ <tr>
9640+ <td fixwidth=50></td>
9641+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/damage" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
9642+ <td fixwidth=50></td>
9643+ </tr>
9644+</table>
9645+
9646+
9647+
9648+
9649+
9650+
9651+</body></html>
9652\ No newline at end of file
9653diff --git a/aCis_datapack/data/html/mods/tournament/ranking/damage/F3X3.htm b/aCis_datapack/data/html/mods/tournament/ranking/damage/F3X3.htm
9654new file mode 100644
9655index 0000000..f3d936a
9656--- /dev/null
9657+++ b/aCis_datapack/data/html/mods/tournament/ranking/damage/F3X3.htm
9658@@ -0,0 +1,54 @@
9659+<html><body>
9660+
9661+<center>
9662+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
9663+</center>
9664+
9665+<br>
9666+<table border="0" width="320" bgcolor="000000">
9667+<tr>
9668+
9669+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9670+<td width=99 align=center> <font color=ff0019>Damage Ranking (3x3)</font></td>
9671+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9672+</tr>
9673+</table>
9674+<br>
9675+
9676+<table width=300 bgcolor=000000>
9677+ <tr>
9678+ <td fixwidth=5></td>
9679+ <td align=center fixwidth=20>
9680+ #
9681+ </td>
9682+ <td align=center fixwidth=75>
9683+ Player
9684+ </td>
9685+ <td align=center fixwidth=50>
9686+ Damage
9687+ </td>
9688+ <td align=center fixwidth=50>
9689+ Action
9690+ </td>
9691+ </tr>
9692+
9693+</table>
9694+%ranking-damageF3X3%
9695+
9696+
9697+
9698+<br>
9699+<table width=314 bgcolor=000000>
9700+ <tr>
9701+ <td fixwidth=50></td>
9702+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/damage" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
9703+ <td fixwidth=50></td>
9704+ </tr>
9705+</table>
9706+
9707+
9708+
9709+
9710+
9711+
9712+</body></html>
9713\ No newline at end of file
9714diff --git a/aCis_datapack/data/html/mods/tournament/ranking/damage/F4X4.htm b/aCis_datapack/data/html/mods/tournament/ranking/damage/F4X4.htm
9715new file mode 100644
9716index 0000000..29d021c
9717--- /dev/null
9718+++ b/aCis_datapack/data/html/mods/tournament/ranking/damage/F4X4.htm
9719@@ -0,0 +1,54 @@
9720+<html><body>
9721+
9722+<center>
9723+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
9724+</center>
9725+
9726+<br>
9727+<table border="0" width="320" bgcolor="000000">
9728+<tr>
9729+
9730+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9731+<td width=99 align=center> <font color=ff0019>Damage Ranking (4x4)</font></td>
9732+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9733+</tr>
9734+</table>
9735+<br>
9736+
9737+<table width=300 bgcolor=000000>
9738+ <tr>
9739+ <td fixwidth=5></td>
9740+ <td align=center fixwidth=20>
9741+ #
9742+ </td>
9743+ <td align=center fixwidth=75>
9744+ Player
9745+ </td>
9746+ <td align=center fixwidth=50>
9747+ Damage
9748+ </td>
9749+ <td align=center fixwidth=50>
9750+ Action
9751+ </td>
9752+ </tr>
9753+
9754+</table>
9755+%ranking-damageF4X4%
9756+
9757+
9758+
9759+<br>
9760+<table width=314 bgcolor=000000>
9761+ <tr>
9762+ <td fixwidth=50></td>
9763+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/damage" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
9764+ <td fixwidth=50></td>
9765+ </tr>
9766+</table>
9767+
9768+
9769+
9770+
9771+
9772+
9773+</body></html>
9774\ No newline at end of file
9775diff --git a/aCis_datapack/data/html/mods/tournament/ranking/damage/F5X5.htm b/aCis_datapack/data/html/mods/tournament/ranking/damage/F5X5.htm
9776new file mode 100644
9777index 0000000..a96922c
9778--- /dev/null
9779+++ b/aCis_datapack/data/html/mods/tournament/ranking/damage/F5X5.htm
9780@@ -0,0 +1,54 @@
9781+<html><body>
9782+
9783+<center>
9784+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
9785+</center>
9786+
9787+<br>
9788+<table border="0" width="320" bgcolor="000000">
9789+<tr>
9790+
9791+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9792+<td width=99 align=center> <font color=ff0019>Damage Ranking (5x5)</font></td>
9793+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9794+</tr>
9795+</table>
9796+<br>
9797+
9798+<table width=300 bgcolor=000000>
9799+ <tr>
9800+ <td fixwidth=5></td>
9801+ <td align=center fixwidth=20>
9802+ #
9803+ </td>
9804+ <td align=center fixwidth=75>
9805+ Player
9806+ </td>
9807+ <td align=center fixwidth=50>
9808+ Damage
9809+ </td>
9810+ <td align=center fixwidth=50>
9811+ Action
9812+ </td>
9813+ </tr>
9814+
9815+</table>
9816+%ranking-damageF5X5%
9817+
9818+
9819+
9820+<br>
9821+<table width=314 bgcolor=000000>
9822+ <tr>
9823+ <td fixwidth=50></td>
9824+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/damage" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
9825+ <td fixwidth=50></td>
9826+ </tr>
9827+</table>
9828+
9829+
9830+
9831+
9832+
9833+
9834+</body></html>
9835\ No newline at end of file
9836diff --git a/aCis_datapack/data/html/mods/tournament/ranking/damage/F9X9.htm b/aCis_datapack/data/html/mods/tournament/ranking/damage/F9X9.htm
9837new file mode 100644
9838index 0000000..a5a75a8
9839--- /dev/null
9840+++ b/aCis_datapack/data/html/mods/tournament/ranking/damage/F9X9.htm
9841@@ -0,0 +1,54 @@
9842+<html><body>
9843+
9844+<center>
9845+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
9846+</center>
9847+
9848+<br>
9849+<table border="0" width="320" bgcolor="000000">
9850+<tr>
9851+
9852+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9853+<td width=99 align=center> <font color=ff0019>Damage Ranking (9x9)</font></td>
9854+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9855+</tr>
9856+</table>
9857+<br>
9858+
9859+<table width=300 bgcolor=000000>
9860+ <tr>
9861+ <td fixwidth=5></td>
9862+ <td align=center fixwidth=20>
9863+ #
9864+ </td>
9865+ <td align=center fixwidth=75>
9866+ Player
9867+ </td>
9868+ <td align=center fixwidth=50>
9869+ Damage
9870+ </td>
9871+ <td align=center fixwidth=50>
9872+ Action
9873+ </td>
9874+ </tr>
9875+
9876+</table>
9877+%ranking-damageF9X9%
9878+
9879+
9880+<br>
9881+<table width=314 bgcolor=000000>
9882+ <tr>
9883+ <td fixwidth=50></td>
9884+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/damage" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
9885+ <td fixwidth=50></td>
9886+ </tr>
9887+</table>
9888+
9889+
9890+
9891+
9892+
9893+
9894+
9895+</body></html>
9896\ No newline at end of file
9897diff --git a/aCis_datapack/data/html/mods/tournament/ranking/defeats.htm b/aCis_datapack/data/html/mods/tournament/ranking/defeats.htm
9898new file mode 100644
9899index 0000000..4af0b8f
9900--- /dev/null
9901+++ b/aCis_datapack/data/html/mods/tournament/ranking/defeats.htm
9902@@ -0,0 +1,148 @@
9903+<html><body>
9904+
9905+<table border="1" width="320" bgcolor="000000">
9906+<tr>
9907+<td width=99 align=center>Tournament Points: <font color=LEVEL>%tourPoints%</font><br1>
9908+</td>
9909+</tr>
9910+</table>
9911+<table border="0" width="300" bgcolor="000000">
9912+<tr>
9913+
9914+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9915+<td width=99 align=center> <font color=ff0019>(Defeats) Select a Mode:</font></td>
9916+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
9917+</tr>
9918+</table>
9919+<br>
9920+
9921+
9922+
9923+<table width=300 height=32 bgcolor=000000>
9924+<tr>
9925+<td fixwidth=5>
9926+</td>
9927+<td fixwidth=32 height=35>
9928+<img src=l2ui_ch3.calculate1_1 width=32 height=32>
9929+</td>
9930+<td fixwidth=190 align=center>
9931+<font color=LEVEL>1x1 MODE</font><br1>
9932+<a action="bypass bp_tournamentRanking F1X1 defeats"><font color=009099>Check Ranking</font></a>
9933+</td>
9934+<td fixwidth=32 height=35>
9935+<img src=l2ui_ch3.calculate1_1 width=32 height=32>
9936+</td>
9937+</tr>
9938+</table>
9939+<br>
9940+
9941+
9942+<table width=300 height=32 bgcolor=000000>
9943+<tr>
9944+<td fixwidth=5>
9945+</td>
9946+<td fixwidth=32 height=35>
9947+<img src=l2ui_ch3.calculate1_2 width=32 height=32>
9948+</td>
9949+<td fixwidth=190 align=center>
9950+<font color=LEVEL>2x2 MODE</font><br1>
9951+<a action="bypass bp_tournamentRanking F2X2 defeats"><font color=009099>Check Ranking</font></a>
9952+</td>
9953+<td fixwidth=32 height=35>
9954+<img src=l2ui_ch3.calculate1_2 width=32 height=32>
9955+</td>
9956+</tr>
9957+</table>
9958+<br>
9959+
9960+
9961+<table width=300 height=32 bgcolor=000000>
9962+<tr>
9963+<td fixwidth=5>
9964+</td>
9965+<td fixwidth=32 height=35>
9966+<img src=l2ui_ch3.calculate1_3 width=32 height=32>
9967+</td>
9968+<td fixwidth=190 align=center>
9969+<font color=LEVEL>3x3 MODE</font><br1>
9970+<a action="bypass bp_tournamentRanking F3X3 defeats"><font color=009099>Check Ranking</font></a>
9971+</td>
9972+<td fixwidth=32 height=35>
9973+<img src=l2ui_ch3.calculate1_3 width=32 height=32>
9974+</td>
9975+</tr>
9976+</table>
9977+<br>
9978+
9979+
9980+<table width=300 height=32 bgcolor=000000>
9981+<tr>
9982+<td fixwidth=5>
9983+</td>
9984+<td fixwidth=32 height=35>
9985+<img src=l2ui_ch3.calculate1_4 width=32 height=32>
9986+</td>
9987+<td fixwidth=190 align=center>
9988+<font color=LEVEL>4x4 MODE</font><br1>
9989+<a action="bypass bp_tournamentRanking F4X4 defeats"><font color=009099>Check Ranking</font></a>
9990+</td>
9991+<td fixwidth=32 height=35>
9992+<img src=l2ui_ch3.calculate1_4 width=32 height=32>
9993+</td>
9994+</tr>
9995+</table>
9996+<br>
9997+
9998+
9999+
10000+<table width=300 height=32 bgcolor=000000>
10001+<tr>
10002+<td fixwidth=5>
10003+</td>
10004+<td fixwidth=32 height=35>
10005+<img src=l2ui_ch3.calculate1_5 width=32 height=32>
10006+</td>
10007+<td fixwidth=190 align=center>
10008+<font color=LEVEL>5x5 MODE</font><br1>
10009+<a action="bypass bp_tournamentRanking F5X5 defeats"><font color=009099>Check Ranking</font></a>
10010+</td>
10011+<td fixwidth=32 height=35>
10012+<img src=l2ui_ch3.calculate1_5 width=32 height=32>
10013+</td>
10014+</tr>
10015+</table>
10016+<br>
10017+
10018+
10019+<table width=300 height=32 bgcolor=000000>
10020+<tr>
10021+<td fixwidth=5>
10022+</td>
10023+<td fixwidth=32 height=35>
10024+<img src=l2ui_ch3.calculate1_9 width=32 height=32>
10025+</td>
10026+<td fixwidth=190 align=center>
10027+<font color=LEVEL>9x9 MODE</font><br1>
10028+<a action="bypass bp_tournamentRanking F9X9 defeats"><font color=009099>Check Ranking</font></a>
10029+</td>
10030+<td fixwidth=32 height=35>
10031+<img src=l2ui_ch3.calculate1_9 width=32 height=32>
10032+</td>
10033+</tr>
10034+</table>
10035+<br>
10036+<table width=314 bgcolor=000000>
10037+ <tr>
10038+ <td fixwidth=50></td>
10039+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
10040+ <td fixwidth=50></td>
10041+ </tr>
10042+</table>
10043+
10044+
10045+
10046+
10047+
10048+
10049+
10050+</body></html>
10051\ No newline at end of file
10052diff --git a/aCis_datapack/data/html/mods/tournament/ranking/defeats/F1X1.htm b/aCis_datapack/data/html/mods/tournament/ranking/defeats/F1X1.htm
10053new file mode 100644
10054index 0000000..0dfc564
10055--- /dev/null
10056+++ b/aCis_datapack/data/html/mods/tournament/ranking/defeats/F1X1.htm
10057@@ -0,0 +1,54 @@
10058+<html><body>
10059+
10060+<center>
10061+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10062+</center>
10063+
10064+<br>
10065+<table border="0" width="320" bgcolor="000000">
10066+<tr>
10067+
10068+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10069+<td width=99 align=center> <font color=ff0019>Defeats Ranking (1x1)</font></td>
10070+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10071+</tr>
10072+</table>
10073+<br>
10074+
10075+<table width=300 bgcolor=000000>
10076+ <tr>
10077+ <td fixwidth=5></td>
10078+ <td align=center fixwidth=20>
10079+ #
10080+ </td>
10081+ <td align=center fixwidth=75>
10082+ Player
10083+ </td>
10084+ <td align=center fixwidth=50>
10085+ Victories
10086+ </td>
10087+ <td align=center fixwidth=50>
10088+ Action
10089+ </td>
10090+ </tr>
10091+
10092+</table>
10093+%ranking-defeatsF1X1%
10094+
10095+
10096+
10097+<br>
10098+<table width=314 bgcolor=000000>
10099+ <tr>
10100+ <td fixwidth=50></td>
10101+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/defeats" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
10102+ <td fixwidth=50></td>
10103+ </tr>
10104+</table>
10105+
10106+
10107+
10108+
10109+
10110+
10111+</body></html>
10112\ No newline at end of file
10113diff --git a/aCis_datapack/data/html/mods/tournament/ranking/defeats/F2X2.htm b/aCis_datapack/data/html/mods/tournament/ranking/defeats/F2X2.htm
10114new file mode 100644
10115index 0000000..cbfda68
10116--- /dev/null
10117+++ b/aCis_datapack/data/html/mods/tournament/ranking/defeats/F2X2.htm
10118@@ -0,0 +1,54 @@
10119+<html><body>
10120+
10121+<center>
10122+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10123+</center>
10124+
10125+<br>
10126+<table border="0" width="320" bgcolor="000000">
10127+<tr>
10128+
10129+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10130+<td width=99 align=center> <font color=ff0019>Defeats Ranking (2x2)</font></td>
10131+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10132+</tr>
10133+</table>
10134+<br>
10135+
10136+<table width=300 bgcolor=000000>
10137+ <tr>
10138+ <td fixwidth=5></td>
10139+ <td align=center fixwidth=20>
10140+ #
10141+ </td>
10142+ <td align=center fixwidth=75>
10143+ Player
10144+ </td>
10145+ <td align=center fixwidth=50>
10146+ Victories
10147+ </td>
10148+ <td align=center fixwidth=50>
10149+ Action
10150+ </td>
10151+ </tr>
10152+
10153+</table>
10154+%ranking-defeatsF2X2%
10155+
10156+
10157+
10158+<br>
10159+<table width=314 bgcolor=000000>
10160+ <tr>
10161+ <td fixwidth=50></td>
10162+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/defeats" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
10163+ <td fixwidth=50></td>
10164+ </tr>
10165+</table>
10166+
10167+
10168+
10169+
10170+
10171+
10172+</body></html>
10173\ No newline at end of file
10174diff --git a/aCis_datapack/data/html/mods/tournament/ranking/defeats/F3X3.htm b/aCis_datapack/data/html/mods/tournament/ranking/defeats/F3X3.htm
10175new file mode 100644
10176index 0000000..fc439d0
10177--- /dev/null
10178+++ b/aCis_datapack/data/html/mods/tournament/ranking/defeats/F3X3.htm
10179@@ -0,0 +1,54 @@
10180+<html><body>
10181+
10182+<center>
10183+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10184+</center>
10185+
10186+<br>
10187+<table border="0" width="320" bgcolor="000000">
10188+<tr>
10189+
10190+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10191+<td width=99 align=center> <font color=ff0019>Defeats Ranking (3x3)</font></td>
10192+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10193+</tr>
10194+</table>
10195+<br>
10196+
10197+<table width=300 bgcolor=000000>
10198+ <tr>
10199+ <td fixwidth=5></td>
10200+ <td align=center fixwidth=20>
10201+ #
10202+ </td>
10203+ <td align=center fixwidth=75>
10204+ Player
10205+ </td>
10206+ <td align=center fixwidth=50>
10207+ Defeats
10208+ </td>
10209+ <td align=center fixwidth=50>
10210+ Action
10211+ </td>
10212+ </tr>
10213+
10214+</table>
10215+%ranking-defeatsF3X3%
10216+
10217+
10218+
10219+<br>
10220+<table width=314 bgcolor=000000>
10221+ <tr>
10222+ <td fixwidth=50></td>
10223+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/defeats" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
10224+ <td fixwidth=50></td>
10225+ </tr>
10226+</table>
10227+
10228+
10229+
10230+
10231+
10232+
10233+</body></html>
10234\ No newline at end of file
10235diff --git a/aCis_datapack/data/html/mods/tournament/ranking/defeats/F4X4.htm b/aCis_datapack/data/html/mods/tournament/ranking/defeats/F4X4.htm
10236new file mode 100644
10237index 0000000..776e626
10238--- /dev/null
10239+++ b/aCis_datapack/data/html/mods/tournament/ranking/defeats/F4X4.htm
10240@@ -0,0 +1,54 @@
10241+<html><body>
10242+
10243+<center>
10244+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10245+</center>
10246+
10247+<br>
10248+<table border="0" width="320" bgcolor="000000">
10249+<tr>
10250+
10251+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10252+<td width=99 align=center> <font color=ff0019>Defeats Ranking (4x4)</font></td>
10253+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10254+</tr>
10255+</table>
10256+<br>
10257+
10258+<table width=300 bgcolor=000000>
10259+ <tr>
10260+ <td fixwidth=5></td>
10261+ <td align=center fixwidth=20>
10262+ #
10263+ </td>
10264+ <td align=center fixwidth=75>
10265+ Player
10266+ </td>
10267+ <td align=center fixwidth=50>
10268+ Victories
10269+ </td>
10270+ <td align=center fixwidth=50>
10271+ Action
10272+ </td>
10273+ </tr>
10274+
10275+</table>
10276+%ranking-defeatsF4X4%
10277+
10278+
10279+
10280+
10281+<br>
10282+<table width=314 bgcolor=000000>
10283+ <tr>
10284+ <td fixwidth=50></td>
10285+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/defeats" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
10286+ <td fixwidth=50></td>
10287+ </tr>
10288+</table>
10289+
10290+
10291+
10292+
10293+
10294+</body></html>
10295\ No newline at end of file
10296diff --git a/aCis_datapack/data/html/mods/tournament/ranking/defeats/F5X5.htm b/aCis_datapack/data/html/mods/tournament/ranking/defeats/F5X5.htm
10297new file mode 100644
10298index 0000000..dbaaf00
10299--- /dev/null
10300+++ b/aCis_datapack/data/html/mods/tournament/ranking/defeats/F5X5.htm
10301@@ -0,0 +1,54 @@
10302+<html><body>
10303+
10304+<center>
10305+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10306+</center>
10307+
10308+<br>
10309+<table border="0" width="320" bgcolor="000000">
10310+<tr>
10311+
10312+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10313+<td width=99 align=center> <font color=ff0019>Defeats Ranking (5x5)</font></td>
10314+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10315+</tr>
10316+</table>
10317+<br>
10318+
10319+<table width=300 bgcolor=000000>
10320+ <tr>
10321+ <td fixwidth=5></td>
10322+ <td align=center fixwidth=20>
10323+ #
10324+ </td>
10325+ <td align=center fixwidth=75>
10326+ Player
10327+ </td>
10328+ <td align=center fixwidth=50>
10329+ Victories
10330+ </td>
10331+ <td align=center fixwidth=50>
10332+ Action
10333+ </td>
10334+ </tr>
10335+
10336+</table>
10337+%ranking-defeatsF5X5%
10338+
10339+
10340+
10341+<br>
10342+<table width=314 bgcolor=000000>
10343+ <tr>
10344+ <td fixwidth=50></td>
10345+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/defeats" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
10346+ <td fixwidth=50></td>
10347+ </tr>
10348+</table>
10349+
10350+
10351+
10352+
10353+
10354+
10355+</body></html>
10356\ No newline at end of file
10357diff --git a/aCis_datapack/data/html/mods/tournament/ranking/defeats/F9X9.htm b/aCis_datapack/data/html/mods/tournament/ranking/defeats/F9X9.htm
10358new file mode 100644
10359index 0000000..4540c2a
10360--- /dev/null
10361+++ b/aCis_datapack/data/html/mods/tournament/ranking/defeats/F9X9.htm
10362@@ -0,0 +1,54 @@
10363+<html><body>
10364+
10365+<center>
10366+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10367+</center>
10368+
10369+<br>
10370+<table border="0" width="320" bgcolor="000000">
10371+<tr>
10372+
10373+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10374+<td width=99 align=center> <font color=ff0019>Defeats Ranking (9x9)</font></td>
10375+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10376+</tr>
10377+</table>
10378+<br>
10379+
10380+<table width=300 bgcolor=000000>
10381+ <tr>
10382+ <td fixwidth=5></td>
10383+ <td align=center fixwidth=20>
10384+ #
10385+ </td>
10386+ <td align=center fixwidth=75>
10387+ Player
10388+ </td>
10389+ <td align=center fixwidth=50>
10390+ Victories
10391+ </td>
10392+ <td align=center fixwidth=50>
10393+ Action
10394+ </td>
10395+ </tr>
10396+
10397+</table>
10398+%ranking-defeatsF9X9%
10399+
10400+
10401+
10402+
10403+
10404+<br>
10405+<table width=314 bgcolor=000000>
10406+ <tr>
10407+ <td fixwidth=50></td>
10408+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/defeats" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
10409+ <td fixwidth=50></td>
10410+ </tr>
10411+</table>
10412+
10413+
10414+
10415+
10416+</body></html>
10417\ No newline at end of file
10418diff --git a/aCis_datapack/data/html/mods/tournament/ranking/dpf/F1X1.htm b/aCis_datapack/data/html/mods/tournament/ranking/dpf/F1X1.htm
10419new file mode 100644
10420index 0000000..91adfee
10421--- /dev/null
10422+++ b/aCis_datapack/data/html/mods/tournament/ranking/dpf/F1X1.htm
10423@@ -0,0 +1,46 @@
10424+<html><body>
10425+
10426+<center>
10427+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10428+</center>
10429+
10430+<br>
10431+<table border="0" width="320" bgcolor="000000">
10432+<tr>
10433+
10434+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10435+<td width=99 align=center> <font color=ff0019>Damage Per Fight (DPF) Ranking(1x1)</font></td>
10436+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10437+</tr>
10438+</table>
10439+<br>
10440+
10441+<table width=300 bgcolor=000000>
10442+ <tr>
10443+ <td fixwidth=5></td>
10444+ <td align=center fixwidth=20>
10445+ #
10446+ </td>
10447+ <td align=center fixwidth=75>
10448+ Player
10449+ </td>
10450+ <td align=center fixwidth=50>
10451+ DPF
10452+ </td>
10453+ <td align=center fixwidth=50>
10454+ Action
10455+ </td>
10456+ </tr>
10457+
10458+</table>
10459+%ranking-dpfF1X1%
10460+
10461+
10462+
10463+
10464+
10465+
10466+
10467+
10468+
10469+</body></html>
10470\ No newline at end of file
10471diff --git a/aCis_datapack/data/html/mods/tournament/ranking/dpf/F2X2.htm b/aCis_datapack/data/html/mods/tournament/ranking/dpf/F2X2.htm
10472new file mode 100644
10473index 0000000..d904061
10474--- /dev/null
10475+++ b/aCis_datapack/data/html/mods/tournament/ranking/dpf/F2X2.htm
10476@@ -0,0 +1,46 @@
10477+<html><body>
10478+
10479+<center>
10480+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10481+</center>
10482+
10483+<br>
10484+<table border="0" width="320" bgcolor="000000">
10485+<tr>
10486+
10487+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10488+<td width=99 align=center> <font color=ff0019>Damage Per Fight (DPF) Ranking(2x2)</font></td>
10489+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10490+</tr>
10491+</table>
10492+<br>
10493+
10494+<table width=300 bgcolor=000000>
10495+ <tr>
10496+ <td fixwidth=5></td>
10497+ <td align=center fixwidth=20>
10498+ #
10499+ </td>
10500+ <td align=center fixwidth=75>
10501+ Player
10502+ </td>
10503+ <td align=center fixwidth=50>
10504+ DPF
10505+ </td>
10506+ <td align=center fixwidth=50>
10507+ Action
10508+ </td>
10509+ </tr>
10510+
10511+</table>
10512+%ranking-dpfF2X2%
10513+
10514+
10515+
10516+
10517+
10518+
10519+
10520+
10521+
10522+</body></html>
10523\ No newline at end of file
10524diff --git a/aCis_datapack/data/html/mods/tournament/ranking/dpf/F3X3.htm b/aCis_datapack/data/html/mods/tournament/ranking/dpf/F3X3.htm
10525new file mode 100644
10526index 0000000..3f15f47
10527--- /dev/null
10528+++ b/aCis_datapack/data/html/mods/tournament/ranking/dpf/F3X3.htm
10529@@ -0,0 +1,46 @@
10530+<html><body>
10531+
10532+<center>
10533+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10534+</center>
10535+
10536+<br>
10537+<table border="0" width="320" bgcolor="000000">
10538+<tr>
10539+
10540+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10541+<td width=99 align=center> <font color=ff0019>Damage Per Fight (DPF) Ranking(3x3)</font></td>
10542+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10543+</tr>
10544+</table>
10545+<br>
10546+
10547+<table width=300 bgcolor=000000>
10548+ <tr>
10549+ <td fixwidth=5></td>
10550+ <td align=center fixwidth=20>
10551+ #
10552+ </td>
10553+ <td align=center fixwidth=75>
10554+ Player
10555+ </td>
10556+ <td align=center fixwidth=50>
10557+ DPF
10558+ </td>
10559+ <td align=center fixwidth=50>
10560+ Action
10561+ </td>
10562+ </tr>
10563+
10564+</table>
10565+%ranking-dpfF3X3%
10566+
10567+
10568+
10569+
10570+
10571+
10572+
10573+
10574+
10575+</body></html>
10576\ No newline at end of file
10577diff --git a/aCis_datapack/data/html/mods/tournament/ranking/dpf/F4X4.htm b/aCis_datapack/data/html/mods/tournament/ranking/dpf/F4X4.htm
10578new file mode 100644
10579index 0000000..186fc91
10580--- /dev/null
10581+++ b/aCis_datapack/data/html/mods/tournament/ranking/dpf/F4X4.htm
10582@@ -0,0 +1,46 @@
10583+<html><body>
10584+
10585+<center>
10586+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10587+</center>
10588+
10589+<br>
10590+<table border="0" width="320" bgcolor="000000">
10591+<tr>
10592+
10593+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10594+<td width=99 align=center> <font color=ff0019>Damage Per Fight (DPF) Ranking(4x4)</font></td>
10595+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10596+</tr>
10597+</table>
10598+<br>
10599+
10600+<table width=300 bgcolor=000000>
10601+ <tr>
10602+ <td fixwidth=5></td>
10603+ <td align=center fixwidth=20>
10604+ #
10605+ </td>
10606+ <td align=center fixwidth=75>
10607+ Player
10608+ </td>
10609+ <td align=center fixwidth=50>
10610+ DPF
10611+ </td>
10612+ <td align=center fixwidth=50>
10613+ Action
10614+ </td>
10615+ </tr>
10616+
10617+</table>
10618+%ranking-dpfF4X4%
10619+
10620+
10621+
10622+
10623+
10624+
10625+
10626+
10627+
10628+</body></html>
10629\ No newline at end of file
10630diff --git a/aCis_datapack/data/html/mods/tournament/ranking/dpf/F5X5.htm b/aCis_datapack/data/html/mods/tournament/ranking/dpf/F5X5.htm
10631new file mode 100644
10632index 0000000..7861a00
10633--- /dev/null
10634+++ b/aCis_datapack/data/html/mods/tournament/ranking/dpf/F5X5.htm
10635@@ -0,0 +1,46 @@
10636+<html><body>
10637+
10638+<center>
10639+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10640+</center>
10641+
10642+<br>
10643+<table border="0" width="320" bgcolor="000000">
10644+<tr>
10645+
10646+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10647+<td width=99 align=center> <font color=ff0019>Damage Per Fight (DPF) Ranking (5x5)</font></td>
10648+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10649+</tr>
10650+</table>
10651+<br>
10652+
10653+<table width=300 bgcolor=000000>
10654+ <tr>
10655+ <td fixwidth=5></td>
10656+ <td align=center fixwidth=20>
10657+ #
10658+ </td>
10659+ <td align=center fixwidth=75>
10660+ Player
10661+ </td>
10662+ <td align=center fixwidth=50>
10663+ DPF
10664+ </td>
10665+ <td align=center fixwidth=50>
10666+ Action
10667+ </td>
10668+ </tr>
10669+
10670+</table>
10671+%ranking-dpfF5X5%
10672+
10673+
10674+
10675+
10676+
10677+
10678+
10679+
10680+
10681+</body></html>
10682\ No newline at end of file
10683diff --git a/aCis_datapack/data/html/mods/tournament/ranking/dpf/F9X9.htm b/aCis_datapack/data/html/mods/tournament/ranking/dpf/F9X9.htm
10684new file mode 100644
10685index 0000000..74d96ce
10686--- /dev/null
10687+++ b/aCis_datapack/data/html/mods/tournament/ranking/dpf/F9X9.htm
10688@@ -0,0 +1,46 @@
10689+<html><body>
10690+
10691+<center>
10692+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10693+</center>
10694+
10695+<br>
10696+<table border="0" width="320" bgcolor="000000">
10697+<tr>
10698+
10699+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10700+<td width=99 align=center> <font color=ff0019>Global Ranking (9x9)</font></td>
10701+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10702+</tr>
10703+</table>
10704+<br>
10705+
10706+<table width=300 bgcolor=000000>
10707+ <tr>
10708+ <td fixwidth=5></td>
10709+ <td align=center fixwidth=20>
10710+ #
10711+ </td>
10712+ <td align=center fixwidth=75>
10713+ Player
10714+ </td>
10715+ <td align=center fixwidth=50>
10716+ DPF
10717+ </td>
10718+ <td align=center fixwidth=50>
10719+ Action
10720+ </td>
10721+ </tr>
10722+
10723+</table>
10724+%ranking-dpfF9X9%
10725+
10726+
10727+
10728+
10729+
10730+
10731+
10732+
10733+
10734+</body></html>
10735\ No newline at end of file
10736diff --git a/aCis_datapack/data/html/mods/tournament/ranking/global.htm b/aCis_datapack/data/html/mods/tournament/ranking/global.htm
10737new file mode 100644
10738index 0000000..150caab
10739--- /dev/null
10740+++ b/aCis_datapack/data/html/mods/tournament/ranking/global.htm
10741@@ -0,0 +1,148 @@
10742+<html><body>
10743+
10744+<table border="1" width="320" bgcolor="000000">
10745+<tr>
10746+<td width=99 align=center>Tournament Points: <font color=LEVEL>%tourPoints%</font><br1>
10747+</td>
10748+</tr>
10749+</table>
10750+<table border="0" width="300" bgcolor="000000">
10751+<tr>
10752+
10753+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10754+<td width=99 align=center> <font color=ff0019>Select a Mode:</font></td>
10755+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10756+</tr>
10757+</table>
10758+<br>
10759+
10760+
10761+
10762+<table width=300 height=32 bgcolor=000000>
10763+<tr>
10764+<td fixwidth=5>
10765+</td>
10766+<td fixwidth=32 height=35>
10767+<img src=l2ui_ch3.calculate1_1 width=32 height=32>
10768+</td>
10769+<td fixwidth=190 align=center>
10770+<font color=LEVEL>1x1 MODE</font><br1>
10771+<a action="bypass bp_tournamentRanking F1X1 wdt"><font color=009099>Check Ranking</font></a>
10772+</td>
10773+<td fixwidth=32 height=35>
10774+<img src=l2ui_ch3.calculate1_1 width=32 height=32>
10775+</td>
10776+</tr>
10777+</table>
10778+<br>
10779+
10780+
10781+<table width=300 height=32 bgcolor=000000>
10782+<tr>
10783+<td fixwidth=5>
10784+</td>
10785+<td fixwidth=32 height=35>
10786+<img src=l2ui_ch3.calculate1_2 width=32 height=32>
10787+</td>
10788+<td fixwidth=190 align=center>
10789+<font color=LEVEL>2x2 MODE</font><br1>
10790+<a action="bypass bp_tournamentRanking F2X2 wdt"><font color=009099>Check Ranking</font></a>
10791+</td>
10792+<td fixwidth=32 height=35>
10793+<img src=l2ui_ch3.calculate1_2 width=32 height=32>
10794+</td>
10795+</tr>
10796+</table>
10797+<br>
10798+
10799+
10800+<table width=300 height=32 bgcolor=000000>
10801+<tr>
10802+<td fixwidth=5>
10803+</td>
10804+<td fixwidth=32 height=35>
10805+<img src=l2ui_ch3.calculate1_3 width=32 height=32>
10806+</td>
10807+<td fixwidth=190 align=center>
10808+<font color=LEVEL>3x3 MODE</font><br1>
10809+<a action="bypass bp_tournamentRanking F3X3 wdt"><font color=009099>Check Ranking</font></a>
10810+</td>
10811+<td fixwidth=32 height=35>
10812+<img src=l2ui_ch3.calculate1_3 width=32 height=32>
10813+</td>
10814+</tr>
10815+</table>
10816+<br>
10817+
10818+
10819+<table width=300 height=32 bgcolor=000000>
10820+<tr>
10821+<td fixwidth=5>
10822+</td>
10823+<td fixwidth=32 height=35>
10824+<img src=l2ui_ch3.calculate1_4 width=32 height=32>
10825+</td>
10826+<td fixwidth=190 align=center>
10827+<font color=LEVEL>4x4 MODE</font><br1>
10828+<a action="bypass bp_tournamentRanking F4X4 wdt"><font color=009099>Check Ranking</font></a>
10829+</td>
10830+<td fixwidth=32 height=35>
10831+<img src=l2ui_ch3.calculate1_4 width=32 height=32>
10832+</td>
10833+</tr>
10834+</table>
10835+<br>
10836+
10837+
10838+
10839+<table width=300 height=32 bgcolor=000000>
10840+<tr>
10841+<td fixwidth=5>
10842+</td>
10843+<td fixwidth=32 height=35>
10844+<img src=l2ui_ch3.calculate1_5 width=32 height=32>
10845+</td>
10846+<td fixwidth=190 align=center>
10847+<font color=LEVEL>5x5 MODE</font><br1>
10848+<a action="bypass bp_tournamentRanking F5X5 wdt"><font color=009099>Check Ranking</font></a>
10849+</td>
10850+<td fixwidth=32 height=35>
10851+<img src=l2ui_ch3.calculate1_5 width=32 height=32>
10852+</td>
10853+</tr>
10854+</table>
10855+<br>
10856+
10857+
10858+<table width=300 height=32 bgcolor=000000>
10859+<tr>
10860+<td fixwidth=5>
10861+</td>
10862+<td fixwidth=32 height=35>
10863+<img src=l2ui_ch3.calculate1_9 width=32 height=32>
10864+</td>
10865+<td fixwidth=190 align=center>
10866+<font color=LEVEL>9x9 MODE</font><br1>
10867+<a action="bypass bp_tournamentRanking F9X9 wdt"><font color=009099>Check Ranking</font></a>
10868+</td>
10869+<td fixwidth=32 height=35>
10870+<img src=l2ui_ch3.calculate1_9 width=32 height=32>
10871+</td>
10872+</tr>
10873+</table>
10874+<br>
10875+<table width=314 bgcolor=000000>
10876+ <tr>
10877+ <td fixwidth=50></td>
10878+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
10879+ <td fixwidth=50></td>
10880+ </tr>
10881+</table>
10882+
10883+
10884+
10885+
10886+
10887+
10888+
10889+</body></html>
10890\ No newline at end of file
10891diff --git a/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF1X1.htm b/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF1X1.htm
10892new file mode 100644
10893index 0000000..c45a0fb
10894--- /dev/null
10895+++ b/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF1X1.htm
10896@@ -0,0 +1,183 @@
10897+<html><title>My Tour</title><body>
10898+
10899+<center>
10900+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
10901+</center>
10902+
10903+<table border="1" width=316 bgcolor="000000">
10904+<tr>
10905+<td width=99 align=center><font color=LEVEL>%playerName%</font>
10906+</td>
10907+</tr>
10908+</table>
10909+<br>
10910+
10911+<table border="0" width="300" bgcolor="000000">
10912+<tr>
10913+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10914+<td width=99 align=center> <font color=ff0019> 1x1 Details</font></td>
10915+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
10916+</tr>
10917+</table>
10918+<br>
10919+
10920+
10921+<table width=300 height=32 bgcolor=000000>
10922+<tr>
10923+<td fixwidth=5>
10924+</td>
10925+<td fixwidth=250 align=center>
10926+<font color=LEVEL>All statuses below refer to 1x1 mode</font>
10927+</td>
10928+
10929+</tr>
10930+</table>
10931+<br>
10932+
10933+<table width=320 bgcolor=000000>
10934+ <tr>
10935+ <td fixwidth=5>
10936+ </td>
10937+ <td fixwidth=290>
10938+ <font color=LEVEL>General (1x1)</font><br>
10939+ </td>
10940+ </tr>
10941+
10942+</table>
10943+
10944+<table width=320 bgcolor=000000>
10945+ <tr>
10946+ <td fixwidth=5>
10947+ </td>
10948+ <td align=left>
10949+ <font color=ff0029>DPF:</font> %dpfF1X1%
10950+ <br>
10951+ </td>
10952+ <td align=left>
10953+ <font color=ff0029>WDT:</font> %wdt%
10954+
10955+ <br>
10956+ </td>
10957+ </tr>
10958+ <tr>
10959+ <td fixwidth=5>
10960+ </td>
10961+ <td align=left>
10962+ <font color=ff0029>Total Damage:</font> %totalDmg%
10963+ <br>
10964+ </td>
10965+ <td align=left>
10966+ <font color=ff0029>Total Fights:</font> %totalFights%
10967+ <br>
10968+ </td>
10969+ </tr>
10970+ <tr>
10971+ <td fixwidth=5>
10972+ </td>
10973+ <td align=left>
10974+ <font color=ff0029>Total Kills:</font> %killstotal%
10975+ <br>
10976+ </td>
10977+
10978+ </tr>
10979+</table>
10980+<br>
10981+
10982+
10983+<table width=320 bgcolor=000000>
10984+ <tr>
10985+ <td fixwidth=5>
10986+ </td>
10987+ <td fixwidth=290>
10988+ <font color=LEVEL>Matches (1x1)</font><br>
10989+ </td>
10990+ <tr>
10991+ </tr>
10992+</table>
10993+
10994+<table width=320 bgcolor=000000>
10995+ <tr>
10996+ <td fixwidth=5>
10997+ </td>
10998+ <td align=left>
10999+ <font color=ff0029>Victories:</font> %victoriesF1X1%
11000+ <br>
11001+ </td>
11002+ <td align=left>
11003+ <font color=ff0029>Defeats:</font> %defeatsF1X1%
11004+
11005+ <br>
11006+ </td>
11007+ </tr>
11008+ <tr>
11009+ <td fixwidth=5>
11010+ </td>
11011+ <td align=left>
11012+ <font color=ff0029>Damage (1x1):</font> %damageF1X1%
11013+ <br>
11014+ </td>
11015+ <td align=left>
11016+ <font color=ff0029>Total Fights:</font> %fightsDoneF1X1%
11017+ <br>
11018+ </td>
11019+ </tr>
11020+ <tr>
11021+ <td fixwidth=5>
11022+ </td>
11023+ <td align=left>
11024+ <font color=ff0029>Total Kills:</font> %killstotal%
11025+ <br>
11026+ </td>
11027+
11028+ </tr>
11029+</table>
11030+<br>
11031+
11032+
11033+<table width=300 bgcolor=000000>
11034+<tr>
11035+<td fixwidth=5>
11036+</td>
11037+<td fixwidth=250 align=center>
11038+<font color=LEVEL>Click on Fight to full check</font>
11039+</td>
11040+
11041+</tr>
11042+</table>
11043+<table width=330 bgcolor=000000>
11044+ <tr>
11045+ <td fixwidth=30>
11046+ </td>
11047+ <td>
11048+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
11049+ </td>
11050+ <td>
11051+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
11052+ </td>
11053+ <td>
11054+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
11055+ </td>
11056+ <td>
11057+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
11058+ </td>
11059+ <td>
11060+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
11061+ </td>
11062+ <td>
11063+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
11064+ </td>
11065+ <td fixwidth=30>
11066+ </td>
11067+ </tr>
11068+
11069+
11070+</table>
11071+
11072+
11073+<center>
11074+<a action="bypass bp_showTournamentPage myTour"> Back</a>
11075+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
11076+</center>
11077+
11078+
11079+</body></html>
11080\ No newline at end of file
11081diff --git a/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF2X2.htm b/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF2X2.htm
11082new file mode 100644
11083index 0000000..33f7848
11084--- /dev/null
11085+++ b/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF2X2.htm
11086@@ -0,0 +1,183 @@
11087+<html><title>My Tour</title><body>
11088+
11089+<center>
11090+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
11091+</center>
11092+
11093+<table border="1" width=316 bgcolor="000000">
11094+<tr>
11095+<td width=99 align=center><font color=LEVEL>%playerName%</font>
11096+</td>
11097+</tr>
11098+</table>
11099+<br>
11100+
11101+<table border="0" width="300" bgcolor="000000">
11102+<tr>
11103+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
11104+<td width=99 align=center> <font color=ff0019> 2x2 Details</font></td>
11105+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
11106+</tr>
11107+</table>
11108+<br>
11109+
11110+
11111+<table width=300 height=32 bgcolor=000000>
11112+<tr>
11113+<td fixwidth=5>
11114+</td>
11115+<td fixwidth=250 align=center>
11116+<font color=LEVEL>All statuses below refer to 2x2 mode</font>
11117+</td>
11118+
11119+</tr>
11120+</table>
11121+<br>
11122+
11123+<table width=320 bgcolor=000000>
11124+ <tr>
11125+ <td fixwidth=5>
11126+ </td>
11127+ <td fixwidth=290>
11128+ <font color=LEVEL>General (2x2)</font><br>
11129+ </td>
11130+ </tr>
11131+
11132+</table>
11133+
11134+<table width=320 bgcolor=000000>
11135+ <tr>
11136+ <td fixwidth=5>
11137+ </td>
11138+ <td align=left>
11139+ <font color=ff0029>DPF:</font> %dpfF2X2%
11140+ <br>
11141+ </td>
11142+ <td align=left>
11143+ <font color=ff0029>WDT:</font> %wdt%
11144+
11145+ <br>
11146+ </td>
11147+ </tr>
11148+ <tr>
11149+ <td fixwidth=5>
11150+ </td>
11151+ <td align=left>
11152+ <font color=ff0029>Total Damage:</font> %totalDmg%
11153+ <br>
11154+ </td>
11155+ <td align=left>
11156+ <font color=ff0029>Total Fights:</font> %totalFights%
11157+ <br>
11158+ </td>
11159+ </tr>
11160+ <tr>
11161+ <td fixwidth=5>
11162+ </td>
11163+ <td align=left>
11164+ <font color=ff0029>Total Kills:</font> %killstotal%
11165+ <br>
11166+ </td>
11167+
11168+ </tr>
11169+</table>
11170+<br>
11171+
11172+
11173+<table width=320 bgcolor=000000>
11174+ <tr>
11175+ <td fixwidth=5>
11176+ </td>
11177+ <td fixwidth=290>
11178+ <font color=LEVEL>Matches (2x2)</font><br>
11179+ </td>
11180+ <tr>
11181+ </tr>
11182+</table>
11183+
11184+<table width=320 bgcolor=000000>
11185+ <tr>
11186+ <td fixwidth=5>
11187+ </td>
11188+ <td align=left>
11189+ <font color=ff0029>Victories:</font> %victoriesF2X2%
11190+ <br>
11191+ </td>
11192+ <td align=left>
11193+ <font color=ff0029>Defeats:</font> %defeatsF2X2%
11194+
11195+ <br>
11196+ </td>
11197+ </tr>
11198+ <tr>
11199+ <td fixwidth=5>
11200+ </td>
11201+ <td align=left>
11202+ <font color=ff0029>Damage (1x1):</font> %damageF2X2%
11203+ <br>
11204+ </td>
11205+ <td align=left>
11206+ <font color=ff0029>Total Fights:</font> %fightsDoneF2X2%
11207+ <br>
11208+ </td>
11209+ </tr>
11210+ <tr>
11211+ <td fixwidth=5>
11212+ </td>
11213+ <td align=left>
11214+ <font color=ff0029>Total Kills:</font> %killstotal%
11215+ <br>
11216+ </td>
11217+
11218+ </tr>
11219+</table>
11220+<br>
11221+
11222+
11223+<table width=300 bgcolor=000000>
11224+<tr>
11225+<td fixwidth=5>
11226+</td>
11227+<td fixwidth=250 align=center>
11228+<font color=LEVEL>Click on Fight to full check</font>
11229+</td>
11230+
11231+</tr>
11232+</table>
11233+<table width=330 bgcolor=000000>
11234+ <tr>
11235+ <td fixwidth=30>
11236+ </td>
11237+ <td>
11238+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
11239+ </td>
11240+ <td>
11241+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
11242+ </td>
11243+ <td>
11244+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
11245+ </td>
11246+ <td>
11247+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
11248+ </td>
11249+ <td>
11250+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
11251+ </td>
11252+ <td>
11253+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
11254+ </td>
11255+ <td fixwidth=30>
11256+ </td>
11257+ </tr>
11258+
11259+
11260+</table>
11261+
11262+
11263+<center>
11264+<a action="bypass bp_showTournamentPage myTour"> Back</a>
11265+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
11266+</center>
11267+
11268+
11269+</body></html>
11270\ No newline at end of file
11271diff --git a/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF3X3.htm b/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF3X3.htm
11272new file mode 100644
11273index 0000000..16fdef5
11274--- /dev/null
11275+++ b/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF3X3.htm
11276@@ -0,0 +1,183 @@
11277+<html><title>My Tour</title><body>
11278+
11279+<center>
11280+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
11281+</center>
11282+
11283+<table border="1" width=316 bgcolor="000000">
11284+<tr>
11285+<td width=99 align=center><font color=LEVEL>%playerName%</font>
11286+</td>
11287+</tr>
11288+</table>
11289+<br>
11290+
11291+<table border="0" width="300" bgcolor="000000">
11292+<tr>
11293+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
11294+<td width=99 align=center> <font color=ff0019> 3x3 Details</font></td>
11295+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
11296+</tr>
11297+</table>
11298+<br>
11299+
11300+
11301+<table width=300 height=32 bgcolor=000000>
11302+<tr>
11303+<td fixwidth=5>
11304+</td>
11305+<td fixwidth=250 align=center>
11306+<font color=LEVEL>All statuses below refer to 3x3 mode</font>
11307+</td>
11308+
11309+</tr>
11310+</table>
11311+<br>
11312+
11313+<table width=320 bgcolor=000000>
11314+ <tr>
11315+ <td fixwidth=5>
11316+ </td>
11317+ <td fixwidth=290>
11318+ <font color=LEVEL>General (3x3)</font><br>
11319+ </td>
11320+ </tr>
11321+
11322+</table>
11323+
11324+<table width=320 bgcolor=000000>
11325+ <tr>
11326+ <td fixwidth=5>
11327+ </td>
11328+ <td align=left>
11329+ <font color=ff0029>DPF:</font> %dpfF3X3%
11330+ <br>
11331+ </td>
11332+ <td align=left>
11333+ <font color=ff0029>WDT:</font> %wdt%
11334+
11335+ <br>
11336+ </td>
11337+ </tr>
11338+ <tr>
11339+ <td fixwidth=5>
11340+ </td>
11341+ <td align=left>
11342+ <font color=ff0029>Total Damage:</font> %totalDmg%
11343+ <br>
11344+ </td>
11345+ <td align=left>
11346+ <font color=ff0029>Total Fights:</font> %totalFights%
11347+ <br>
11348+ </td>
11349+ </tr>
11350+ <tr>
11351+ <td fixwidth=5>
11352+ </td>
11353+ <td align=left>
11354+ <font color=ff0029>Total Kills:</font> %killstotal%
11355+ <br>
11356+ </td>
11357+
11358+ </tr>
11359+</table>
11360+<br>
11361+
11362+
11363+<table width=320 bgcolor=000000>
11364+ <tr>
11365+ <td fixwidth=5>
11366+ </td>
11367+ <td fixwidth=290>
11368+ <font color=LEVEL>Matches (2X2)</font><br>
11369+ </td>
11370+ <tr>
11371+ </tr>
11372+</table>
11373+
11374+<table width=320 bgcolor=000000>
11375+ <tr>
11376+ <td fixwidth=5>
11377+ </td>
11378+ <td align=left>
11379+ <font color=ff0029>Victories:</font> %victoriesF3X3%
11380+ <br>
11381+ </td>
11382+ <td align=left>
11383+ <font color=ff0029>Defeats:</font> %defeatsF3X3%
11384+
11385+ <br>
11386+ </td>
11387+ </tr>
11388+ <tr>
11389+ <td fixwidth=5>
11390+ </td>
11391+ <td align=left>
11392+ <font color=ff0029>Damage (3x3):</font> %damageF3X3%
11393+ <br>
11394+ </td>
11395+ <td align=left>
11396+ <font color=ff0029>Total Fights:</font> %fightsDoneF3X3%
11397+ <br>
11398+ </td>
11399+ </tr>
11400+ <tr>
11401+ <td fixwidth=5>
11402+ </td>
11403+ <td align=left>
11404+ <font color=ff0029>Total Kills:</font> %killstotal%
11405+ <br>
11406+ </td>
11407+
11408+ </tr>
11409+</table>
11410+<br>
11411+
11412+
11413+<table width=300 bgcolor=000000>
11414+<tr>
11415+<td fixwidth=5>
11416+</td>
11417+<td fixwidth=250 align=center>
11418+<font color=LEVEL>Click on Fight to full check</font>
11419+</td>
11420+
11421+</tr>
11422+</table>
11423+<table width=330 bgcolor=000000>
11424+ <tr>
11425+ <td fixwidth=30>
11426+ </td>
11427+ <td>
11428+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
11429+ </td>
11430+ <td>
11431+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
11432+ </td>
11433+ <td>
11434+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
11435+ </td>
11436+ <td>
11437+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
11438+ </td>
11439+ <td>
11440+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
11441+ </td>
11442+ <td>
11443+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
11444+ </td>
11445+ <td fixwidth=30>
11446+ </td>
11447+ </tr>
11448+
11449+
11450+</table>
11451+
11452+
11453+<center>
11454+<a action="bypass bp_showTournamentPage myTour"> Back</a>
11455+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
11456+</center>
11457+
11458+
11459+</body></html>
11460\ No newline at end of file
11461diff --git a/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF4X4.htm b/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF4X4.htm
11462new file mode 100644
11463index 0000000..cca73a2
11464--- /dev/null
11465+++ b/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF4X4.htm
11466@@ -0,0 +1,183 @@
11467+<html><title>My Tour</title><body>
11468+
11469+<center>
11470+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
11471+</center>
11472+
11473+<table border="1" width=316 bgcolor="000000">
11474+<tr>
11475+<td width=99 align=center><font color=LEVEL>%playerName%</font>
11476+</td>
11477+</tr>
11478+</table>
11479+<br>
11480+
11481+<table border="0" width="300" bgcolor="000000">
11482+<tr>
11483+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
11484+<td width=99 align=center> <font color=ff0019> 4x4 Details</font></td>
11485+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
11486+</tr>
11487+</table>
11488+<br>
11489+
11490+
11491+<table width=300 height=32 bgcolor=000000>
11492+<tr>
11493+<td fixwidth=5>
11494+</td>
11495+<td fixwidth=250 align=center>
11496+<font color=LEVEL>All statuses below refer to 4x4 mode</font>
11497+</td>
11498+
11499+</tr>
11500+</table>
11501+<br>
11502+
11503+<table width=320 bgcolor=000000>
11504+ <tr>
11505+ <td fixwidth=5>
11506+ </td>
11507+ <td fixwidth=290>
11508+ <font color=LEVEL>General (4x4)</font><br>
11509+ </td>
11510+ </tr>
11511+
11512+</table>
11513+
11514+<table width=320 bgcolor=000000>
11515+ <tr>
11516+ <td fixwidth=5>
11517+ </td>
11518+ <td align=left>
11519+ <font color=ff0029>DPF:</font> %dpfF4X4%
11520+ <br>
11521+ </td>
11522+ <td align=left>
11523+ <font color=ff0029>WDT:</font> %wdt%
11524+
11525+ <br>
11526+ </td>
11527+ </tr>
11528+ <tr>
11529+ <td fixwidth=5>
11530+ </td>
11531+ <td align=left>
11532+ <font color=ff0029>Total Damage:</font> %totalDmg%
11533+ <br>
11534+ </td>
11535+ <td align=left>
11536+ <font color=ff0029>Total Fights:</font> %totalFights%
11537+ <br>
11538+ </td>
11539+ </tr>
11540+ <tr>
11541+ <td fixwidth=5>
11542+ </td>
11543+ <td align=left>
11544+ <font color=ff0029>Total Kills:</font> %killstotal%
11545+ <br>
11546+ </td>
11547+
11548+ </tr>
11549+</table>
11550+<br>
11551+
11552+
11553+<table width=320 bgcolor=000000>
11554+ <tr>
11555+ <td fixwidth=5>
11556+ </td>
11557+ <td fixwidth=290>
11558+ <font color=LEVEL>Matches (2X2)</font><br>
11559+ </td>
11560+ <tr>
11561+ </tr>
11562+</table>
11563+
11564+<table width=320 bgcolor=000000>
11565+ <tr>
11566+ <td fixwidth=5>
11567+ </td>
11568+ <td align=left>
11569+ <font color=ff0029>Victories:</font> %victoriesF4X4%
11570+ <br>
11571+ </td>
11572+ <td align=left>
11573+ <font color=ff0029>Defeats:</font> %defeatsF4X4%
11574+
11575+ <br>
11576+ </td>
11577+ </tr>
11578+ <tr>
11579+ <td fixwidth=5>
11580+ </td>
11581+ <td align=left>
11582+ <font color=ff0029>Damage (4x4):</font> %damageF4X4%
11583+ <br>
11584+ </td>
11585+ <td align=left>
11586+ <font color=ff0029>Total Fights:</font> %fightsDoneF4X4%
11587+ <br>
11588+ </td>
11589+ </tr>
11590+ <tr>
11591+ <td fixwidth=5>
11592+ </td>
11593+ <td align=left>
11594+ <font color=ff0029>Total Kills:</font> %killstotal%
11595+ <br>
11596+ </td>
11597+
11598+ </tr>
11599+</table>
11600+<br>
11601+
11602+
11603+<table width=300 bgcolor=000000>
11604+<tr>
11605+<td fixwidth=5>
11606+</td>
11607+<td fixwidth=250 align=center>
11608+<font color=LEVEL>Click on Fight to full check</font>
11609+</td>
11610+
11611+</tr>
11612+</table>
11613+<table width=330 bgcolor=000000>
11614+ <tr>
11615+ <td fixwidth=30>
11616+ </td>
11617+ <td>
11618+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
11619+ </td>
11620+ <td>
11621+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
11622+ </td>
11623+ <td>
11624+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
11625+ </td>
11626+ <td>
11627+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
11628+ </td>
11629+ <td>
11630+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
11631+ </td>
11632+ <td>
11633+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
11634+ </td>
11635+ <td fixwidth=30>
11636+ </td>
11637+ </tr>
11638+
11639+
11640+</table>
11641+
11642+
11643+<center>
11644+<a action="bypass bp_showTournamentPage myTour"> Back</a>
11645+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
11646+</center>
11647+
11648+
11649+</body></html>
11650\ No newline at end of file
11651diff --git a/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF5X5.htm b/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF5X5.htm
11652new file mode 100644
11653index 0000000..f9d0670
11654--- /dev/null
11655+++ b/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF5X5.htm
11656@@ -0,0 +1,183 @@
11657+<html><title>My Tour</title><body>
11658+
11659+<center>
11660+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
11661+</center>
11662+
11663+<table border="1" width=316 bgcolor="000000">
11664+<tr>
11665+<td width=99 align=center><font color=LEVEL>%playerName%</font>
11666+</td>
11667+</tr>
11668+</table>
11669+<br>
11670+
11671+<table border="0" width="300" bgcolor="000000">
11672+<tr>
11673+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
11674+<td width=99 align=center> <font color=ff0019> 5x5 Details</font></td>
11675+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
11676+</tr>
11677+</table>
11678+<br>
11679+
11680+
11681+<table width=300 height=32 bgcolor=000000>
11682+<tr>
11683+<td fixwidth=5>
11684+</td>
11685+<td fixwidth=250 align=center>
11686+<font color=LEVEL>All statuses below refer to 5x5 mode</font>
11687+</td>
11688+
11689+</tr>
11690+</table>
11691+<br>
11692+
11693+<table width=320 bgcolor=000000>
11694+ <tr>
11695+ <td fixwidth=5>
11696+ </td>
11697+ <td fixwidth=290>
11698+ <font color=LEVEL>General (5x5)</font><br>
11699+ </td>
11700+ </tr>
11701+
11702+</table>
11703+
11704+<table width=320 bgcolor=000000>
11705+ <tr>
11706+ <td fixwidth=5>
11707+ </td>
11708+ <td align=left>
11709+ <font color=ff0029>DPF:</font> %dpfF5X5%
11710+ <br>
11711+ </td>
11712+ <td align=left>
11713+ <font color=ff0029>WDT:</font> %wdt%
11714+
11715+ <br>
11716+ </td>
11717+ </tr>
11718+ <tr>
11719+ <td fixwidth=5>
11720+ </td>
11721+ <td align=left>
11722+ <font color=ff0029>Total Damage:</font> %totalDmg%
11723+ <br>
11724+ </td>
11725+ <td align=left>
11726+ <font color=ff0029>Total Fights:</font> %totalFights%
11727+ <br>
11728+ </td>
11729+ </tr>
11730+ <tr>
11731+ <td fixwidth=5>
11732+ </td>
11733+ <td align=left>
11734+ <font color=ff0029>Total Kills:</font> %killstotal%
11735+ <br>
11736+ </td>
11737+
11738+ </tr>
11739+</table>
11740+<br>
11741+
11742+
11743+<table width=320 bgcolor=000000>
11744+ <tr>
11745+ <td fixwidth=5>
11746+ </td>
11747+ <td fixwidth=290>
11748+ <font color=LEVEL>Matches (2X2)</font><br>
11749+ </td>
11750+ <tr>
11751+ </tr>
11752+</table>
11753+
11754+<table width=320 bgcolor=000000>
11755+ <tr>
11756+ <td fixwidth=5>
11757+ </td>
11758+ <td align=left>
11759+ <font color=ff0029>Victories:</font> %victoriesF5X5%
11760+ <br>
11761+ </td>
11762+ <td align=left>
11763+ <font color=ff0029>Defeats:</font> %defeatsF5X5%
11764+
11765+ <br>
11766+ </td>
11767+ </tr>
11768+ <tr>
11769+ <td fixwidth=5>
11770+ </td>
11771+ <td align=left>
11772+ <font color=ff0029>Damage (5x5):</font> %damageF5X5%
11773+ <br>
11774+ </td>
11775+ <td align=left>
11776+ <font color=ff0029>Total Fights:</font> %fightsDoneF5X5%
11777+ <br>
11778+ </td>
11779+ </tr>
11780+ <tr>
11781+ <td fixwidth=5>
11782+ </td>
11783+ <td align=left>
11784+ <font color=ff0029>Total Kills:</font> %killstotal%
11785+ <br>
11786+ </td>
11787+
11788+ </tr>
11789+</table>
11790+<br>
11791+
11792+
11793+<table width=300 bgcolor=000000>
11794+<tr>
11795+<td fixwidth=5>
11796+</td>
11797+<td fixwidth=250 align=center>
11798+<font color=LEVEL>Click on Fight to full check</font>
11799+</td>
11800+
11801+</tr>
11802+</table>
11803+<table width=330 bgcolor=000000>
11804+ <tr>
11805+ <td fixwidth=30>
11806+ </td>
11807+ <td>
11808+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
11809+ </td>
11810+ <td>
11811+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
11812+ </td>
11813+ <td>
11814+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
11815+ </td>
11816+ <td>
11817+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
11818+ </td>
11819+ <td>
11820+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
11821+ </td>
11822+ <td>
11823+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
11824+ </td>
11825+ <td fixwidth=30>
11826+ </td>
11827+ </tr>
11828+
11829+
11830+</table>
11831+
11832+
11833+<center>
11834+<a action="bypass bp_showTournamentPage myTour"> Back</a>
11835+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
11836+</center>
11837+
11838+
11839+</body></html>
11840\ No newline at end of file
11841diff --git a/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF9X9.htm b/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF9X9.htm
11842new file mode 100644
11843index 0000000..dfceab8
11844--- /dev/null
11845+++ b/aCis_datapack/data/html/mods/tournament/ranking/info/playerInfoF9X9.htm
11846@@ -0,0 +1,180 @@
11847+<html><title>My Tour</title><body>
11848+
11849+
11850+<table border="1" width=316 bgcolor="000000">
11851+<tr>
11852+<td width=99 align=center><font color=LEVEL>%playerName%</font>
11853+</td>
11854+</tr>
11855+</table>
11856+<br>
11857+
11858+<table border="0" width="300" bgcolor="000000">
11859+<tr>
11860+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
11861+<td width=99 align=center> <font color=ff0019> 9x9 Details</font></td>
11862+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
11863+</tr>
11864+</table>
11865+<br>
11866+
11867+
11868+<table width=300 height=32 bgcolor=000000>
11869+<tr>
11870+<td fixwidth=5>
11871+</td>
11872+<td fixwidth=250 align=center>
11873+<font color=LEVEL>All statuses below refer to 9x9 mode</font>
11874+</td>
11875+
11876+</tr>
11877+</table>
11878+<br>
11879+
11880+<table width=320 bgcolor=000000>
11881+ <tr>
11882+ <td fixwidth=5>
11883+ </td>
11884+ <td fixwidth=290>
11885+ <font color=LEVEL>General (9x9)</font><br>
11886+ </td>
11887+ </tr>
11888+
11889+</table>
11890+
11891+<table width=320 bgcolor=000000>
11892+ <tr>
11893+ <td fixwidth=5>
11894+ </td>
11895+ <td align=left>
11896+ <font color=ff0029>DPF:</font> %dpfF9X9%
11897+ <br>
11898+ </td>
11899+ <td align=left>
11900+ <font color=ff0029>WDT:</font> %wdt%
11901+
11902+ <br>
11903+ </td>
11904+ </tr>
11905+ <tr>
11906+ <td fixwidth=5>
11907+ </td>
11908+ <td align=left>
11909+ <font color=ff0029>Total Damage:</font> %totalDmg%
11910+ <br>
11911+ </td>
11912+ <td align=left>
11913+ <font color=ff0029>Total Fights:</font> %totalFights%
11914+ <br>
11915+ </td>
11916+ </tr>
11917+ <tr>
11918+ <td fixwidth=5>
11919+ </td>
11920+ <td align=left>
11921+ <font color=ff0029>Total Kills:</font> %killstotal%
11922+ <br>
11923+ </td>
11924+
11925+ </tr>
11926+</table>
11927+<br>
11928+
11929+
11930+<table width=320 bgcolor=000000>
11931+ <tr>
11932+ <td fixwidth=5>
11933+ </td>
11934+ <td fixwidth=290>
11935+ <font color=LEVEL>Matches (2X2)</font><br>
11936+ </td>
11937+ <tr>
11938+ </tr>
11939+</table>
11940+
11941+<table width=320 bgcolor=000000>
11942+ <tr>
11943+ <td fixwidth=5>
11944+ </td>
11945+ <td align=left>
11946+ <font color=ff0029>Victories:</font> %victoriesF9X9%
11947+ <br>
11948+ </td>
11949+ <td align=left>
11950+ <font color=ff0029>Defeats:</font> %defeatsF9X9%
11951+
11952+ <br>
11953+ </td>
11954+ </tr>
11955+ <tr>
11956+ <td fixwidth=5>
11957+ </td>
11958+ <td align=left>
11959+ <font color=ff0029>Damage (9x9):</font> %damageF9X9%
11960+ <br>
11961+ </td>
11962+ <td align=left>
11963+ <font color=ff0029>Total Fights:</font> %fightsDoneF9X9%
11964+ <br>
11965+ </td>
11966+ </tr>
11967+ <tr>
11968+ <td fixwidth=5>
11969+ </td>
11970+ <td align=left>
11971+ <font color=ff0029>Total Kills:</font> %killstotal%
11972+ <br>
11973+ </td>
11974+
11975+ </tr>
11976+</table>
11977+<br>
11978+
11979+
11980+<table width=300 bgcolor=000000>
11981+<tr>
11982+<td fixwidth=5>
11983+</td>
11984+<td fixwidth=250 align=center>
11985+<font color=LEVEL>Click on Fight to full check</font>
11986+</td>
11987+
11988+</tr>
11989+</table>
11990+<table width=330 bgcolor=000000>
11991+ <tr>
11992+ <td fixwidth=30>
11993+ </td>
11994+ <td>
11995+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
11996+ </td>
11997+ <td>
11998+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
11999+ </td>
12000+ <td>
12001+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
12002+ </td>
12003+ <td>
12004+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
12005+ </td>
12006+ <td>
12007+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
12008+ </td>
12009+ <td>
12010+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
12011+ </td>
12012+ <td fixwidth=30>
12013+ </td>
12014+ </tr>
12015+
12016+
12017+</table>
12018+
12019+
12020+<center>
12021+<a action="bypass bp_showTournamentPage myTour"> Back</a>
12022+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
12023+</center>
12024+
12025+
12026+</body></html>
12027\ No newline at end of file
12028diff --git a/aCis_datapack/data/html/mods/tournament/ranking/kills.htm b/aCis_datapack/data/html/mods/tournament/ranking/kills.htm
12029new file mode 100644
12030index 0000000..8fa36b7
12031--- /dev/null
12032+++ b/aCis_datapack/data/html/mods/tournament/ranking/kills.htm
12033@@ -0,0 +1,148 @@
12034+<html><body>
12035+
12036+<table border="1" width="320" bgcolor="000000">
12037+<tr>
12038+<td width=99 align=center>Tournament Points: <font color=LEVEL>%tourPoints%</font><br1>
12039+</td>
12040+</tr>
12041+</table>
12042+<table border="0" width="300" bgcolor="000000">
12043+<tr>
12044+
12045+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12046+<td width=99 align=center> <font color=ff0019>(Kills) Select a Mode:</font></td>
12047+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12048+</tr>
12049+</table>
12050+<br>
12051+
12052+
12053+
12054+<table width=300 height=32 bgcolor=000000>
12055+<tr>
12056+<td fixwidth=5>
12057+</td>
12058+<td fixwidth=32 height=35>
12059+<img src=l2ui_ch3.calculate1_1 width=32 height=32>
12060+</td>
12061+<td fixwidth=190 align=center>
12062+<font color=LEVEL>1x1 MODE</font><br1>
12063+<a action="bypass bp_tournamentRanking F1X1 kills"><font color=009099>Check Ranking</font></a>
12064+</td>
12065+<td fixwidth=32 height=35>
12066+<img src=l2ui_ch3.calculate1_1 width=32 height=32>
12067+</td>
12068+</tr>
12069+</table>
12070+<br>
12071+
12072+
12073+<table width=300 height=32 bgcolor=000000>
12074+<tr>
12075+<td fixwidth=5>
12076+</td>
12077+<td fixwidth=32 height=35>
12078+<img src=l2ui_ch3.calculate1_2 width=32 height=32>
12079+</td>
12080+<td fixwidth=190 align=center>
12081+<font color=LEVEL>2x2 MODE</font><br1>
12082+<a action="bypass bp_tournamentRanking F2X2 kills"><font color=009099>Check Ranking</font></a>
12083+</td>
12084+<td fixwidth=32 height=35>
12085+<img src=l2ui_ch3.calculate1_2 width=32 height=32>
12086+</td>
12087+</tr>
12088+</table>
12089+<br>
12090+
12091+
12092+<table width=300 height=32 bgcolor=000000>
12093+<tr>
12094+<td fixwidth=5>
12095+</td>
12096+<td fixwidth=32 height=35>
12097+<img src=l2ui_ch3.calculate1_3 width=32 height=32>
12098+</td>
12099+<td fixwidth=190 align=center>
12100+<font color=LEVEL>3x3 MODE</font><br1>
12101+<a action="bypass bp_tournamentRanking F3X3 kills"><font color=009099>Check Ranking</font></a>
12102+</td>
12103+<td fixwidth=32 height=35>
12104+<img src=l2ui_ch3.calculate1_3 width=32 height=32>
12105+</td>
12106+</tr>
12107+</table>
12108+<br>
12109+
12110+
12111+<table width=300 height=32 bgcolor=000000>
12112+<tr>
12113+<td fixwidth=5>
12114+</td>
12115+<td fixwidth=32 height=35>
12116+<img src=l2ui_ch3.calculate1_4 width=32 height=32>
12117+</td>
12118+<td fixwidth=190 align=center>
12119+<font color=LEVEL>4x4 MODE</font><br1>
12120+<a action="bypass bp_tournamentRanking F4X4 kills"><font color=009099>Check Ranking</font></a>
12121+</td>
12122+<td fixwidth=32 height=35>
12123+<img src=l2ui_ch3.calculate1_4 width=32 height=32>
12124+</td>
12125+</tr>
12126+</table>
12127+<br>
12128+
12129+
12130+
12131+<table width=300 height=32 bgcolor=000000>
12132+<tr>
12133+<td fixwidth=5>
12134+</td>
12135+<td fixwidth=32 height=35>
12136+<img src=l2ui_ch3.calculate1_5 width=32 height=32>
12137+</td>
12138+<td fixwidth=190 align=center>
12139+<font color=LEVEL>5x5 MODE</font><br1>
12140+<a action="bypass bp_tournamentRanking F5X5 kills"><font color=009099>Check Ranking</font></a>
12141+</td>
12142+<td fixwidth=32 height=35>
12143+<img src=l2ui_ch3.calculate1_5 width=32 height=32>
12144+</td>
12145+</tr>
12146+</table>
12147+<br>
12148+
12149+
12150+<table width=300 height=32 bgcolor=000000>
12151+<tr>
12152+<td fixwidth=5>
12153+</td>
12154+<td fixwidth=32 height=35>
12155+<img src=l2ui_ch3.calculate1_9 width=32 height=32>
12156+</td>
12157+<td fixwidth=190 align=center>
12158+<font color=LEVEL>9x9 MODE</font><br1>
12159+<a action="bypass bp_tournamentRanking F9X9 kills"><font color=009099>Check Ranking</font></a>
12160+</td>
12161+<td fixwidth=32 height=35>
12162+<img src=l2ui_ch3.calculate1_9 width=32 height=32>
12163+</td>
12164+</tr>
12165+</table>
12166+<br>
12167+<table width=314 bgcolor=000000>
12168+ <tr>
12169+ <td fixwidth=50></td>
12170+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
12171+ <td fixwidth=50></td>
12172+ </tr>
12173+</table>
12174+
12175+
12176+
12177+
12178+
12179+
12180+
12181+</body></html>
12182\ No newline at end of file
12183diff --git a/aCis_datapack/data/html/mods/tournament/ranking/kills/F1X1.htm b/aCis_datapack/data/html/mods/tournament/ranking/kills/F1X1.htm
12184new file mode 100644
12185index 0000000..320a738
12186--- /dev/null
12187+++ b/aCis_datapack/data/html/mods/tournament/ranking/kills/F1X1.htm
12188@@ -0,0 +1,57 @@
12189+<html><body>
12190+
12191+<center>
12192+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
12193+</center>
12194+
12195+<br>
12196+<table border="0" width="320" bgcolor="000000">
12197+<tr>
12198+
12199+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12200+<td width=99 align=center> <font color=ff0019>Kills Ranking(1x1)</font></td>
12201+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12202+</tr>
12203+</table>
12204+<br>
12205+
12206+<table width=300 bgcolor=000000>
12207+ <tr>
12208+ <td fixwidth=5></td>
12209+ <td align=center fixwidth=20>
12210+ #
12211+ </td>
12212+ <td align=center fixwidth=75>
12213+ Player
12214+ </td>
12215+ <td align=center fixwidth=50>
12216+ Kills
12217+ </td>
12218+ <td align=center fixwidth=50>
12219+ Action
12220+ </td>
12221+ </tr>
12222+
12223+</table>
12224+%ranking-killsF1X1%
12225+
12226+
12227+<br>
12228+<table width=314 bgcolor=000000>
12229+ <tr>
12230+ <td fixwidth=50></td>
12231+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/kills" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
12232+ <td fixwidth=50></td>
12233+ </tr>
12234+</table>
12235+
12236+
12237+
12238+
12239+
12240+
12241+
12242+
12243+
12244+
12245+</body></html>
12246\ No newline at end of file
12247diff --git a/aCis_datapack/data/html/mods/tournament/ranking/kills/F2X2.htm b/aCis_datapack/data/html/mods/tournament/ranking/kills/F2X2.htm
12248new file mode 100644
12249index 0000000..d934dee
12250--- /dev/null
12251+++ b/aCis_datapack/data/html/mods/tournament/ranking/kills/F2X2.htm
12252@@ -0,0 +1,57 @@
12253+<html><body>
12254+
12255+<center>
12256+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
12257+</center>
12258+
12259+<br>
12260+<table border="0" width="320" bgcolor="000000">
12261+<tr>
12262+
12263+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12264+<td width=99 align=center> <font color=ff0019>Kills Ranking(2x2)</font></td>
12265+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12266+</tr>
12267+</table>
12268+<br>
12269+
12270+<table width=300 bgcolor=000000>
12271+ <tr>
12272+ <td fixwidth=5></td>
12273+ <td align=center fixwidth=20>
12274+ #
12275+ </td>
12276+ <td align=center fixwidth=75>
12277+ Player
12278+ </td>
12279+ <td align=center fixwidth=50>
12280+ Kills
12281+ </td>
12282+ <td align=center fixwidth=50>
12283+ Action
12284+ </td>
12285+ </tr>
12286+
12287+</table>
12288+%ranking-killsF2X2%
12289+
12290+
12291+
12292+
12293+<br>
12294+<table width=314 bgcolor=000000>
12295+ <tr>
12296+ <td fixwidth=50></td>
12297+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/kills" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
12298+ <td fixwidth=50></td>
12299+ </tr>
12300+</table>
12301+
12302+
12303+
12304+
12305+
12306+
12307+
12308+
12309+</body></html>
12310\ No newline at end of file
12311diff --git a/aCis_datapack/data/html/mods/tournament/ranking/kills/F3X3.htm b/aCis_datapack/data/html/mods/tournament/ranking/kills/F3X3.htm
12312new file mode 100644
12313index 0000000..3ddbc24
12314--- /dev/null
12315+++ b/aCis_datapack/data/html/mods/tournament/ranking/kills/F3X3.htm
12316@@ -0,0 +1,57 @@
12317+<html><body>
12318+
12319+<center>
12320+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
12321+</center>
12322+
12323+<br>
12324+<table border="0" width="320" bgcolor="000000">
12325+<tr>
12326+
12327+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12328+<td width=99 align=center> <font color=ff0019>Kills Ranking(3x3)</font></td>
12329+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12330+</tr>
12331+</table>
12332+<br>
12333+
12334+<table width=300 bgcolor=000000>
12335+ <tr>
12336+ <td fixwidth=5></td>
12337+ <td align=center fixwidth=20>
12338+ #
12339+ </td>
12340+ <td align=center fixwidth=75>
12341+ Player
12342+ </td>
12343+ <td align=center fixwidth=50>
12344+ Kills
12345+ </td>
12346+ <td align=center fixwidth=50>
12347+ Action
12348+ </td>
12349+ </tr>
12350+
12351+</table>
12352+%ranking-killsF3X3%
12353+
12354+
12355+
12356+
12357+<br>
12358+<table width=314 bgcolor=000000>
12359+ <tr>
12360+ <td fixwidth=50></td>
12361+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/kills" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
12362+ <td fixwidth=50></td>
12363+ </tr>
12364+</table>
12365+
12366+
12367+
12368+
12369+
12370+
12371+
12372+
12373+</body></html>
12374\ No newline at end of file
12375diff --git a/aCis_datapack/data/html/mods/tournament/ranking/kills/F4X4.htm b/aCis_datapack/data/html/mods/tournament/ranking/kills/F4X4.htm
12376new file mode 100644
12377index 0000000..9ed4aae
12378--- /dev/null
12379+++ b/aCis_datapack/data/html/mods/tournament/ranking/kills/F4X4.htm
12380@@ -0,0 +1,57 @@
12381+<html><body>
12382+
12383+<center>
12384+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
12385+</center>
12386+
12387+<br>
12388+<table border="0" width="320" bgcolor="000000">
12389+<tr>
12390+
12391+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12392+<td width=99 align=center> <font color=ff0019>Kills Ranking(4x4)</font></td>
12393+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12394+</tr>
12395+</table>
12396+<br>
12397+
12398+<table width=300 bgcolor=000000>
12399+ <tr>
12400+ <td fixwidth=5></td>
12401+ <td align=center fixwidth=20>
12402+ #
12403+ </td>
12404+ <td align=center fixwidth=75>
12405+ Player
12406+ </td>
12407+ <td align=center fixwidth=50>
12408+ DPF
12409+ </td>
12410+ <td align=center fixwidth=50>
12411+ Action
12412+ </td>
12413+ </tr>
12414+
12415+</table>
12416+%ranking-killsF4X4%
12417+
12418+
12419+<br>
12420+<table width=314 bgcolor=000000>
12421+ <tr>
12422+ <td fixwidth=50></td>
12423+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/kills" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
12424+ <td fixwidth=50></td>
12425+ </tr>
12426+</table>
12427+
12428+
12429+
12430+
12431+
12432+
12433+
12434+
12435+
12436+
12437+</body></html>
12438\ No newline at end of file
12439diff --git a/aCis_datapack/data/html/mods/tournament/ranking/kills/F5X5.htm b/aCis_datapack/data/html/mods/tournament/ranking/kills/F5X5.htm
12440new file mode 100644
12441index 0000000..b2081e6
12442--- /dev/null
12443+++ b/aCis_datapack/data/html/mods/tournament/ranking/kills/F5X5.htm
12444@@ -0,0 +1,57 @@
12445+<html><body>
12446+
12447+<center>
12448+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
12449+</center>
12450+
12451+<br>
12452+<table border="0" width="320" bgcolor="000000">
12453+<tr>
12454+
12455+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12456+<td width=99 align=center> <font color=ff0019>Kills Ranking (5x5)</font></td>
12457+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12458+</tr>
12459+</table>
12460+<br>
12461+
12462+<table width=300 bgcolor=000000>
12463+ <tr>
12464+ <td fixwidth=5></td>
12465+ <td align=center fixwidth=20>
12466+ #
12467+ </td>
12468+ <td align=center fixwidth=75>
12469+ Player
12470+ </td>
12471+ <td align=center fixwidth=50>
12472+ Kills
12473+ </td>
12474+ <td align=center fixwidth=50>
12475+ Action
12476+ </td>
12477+ </tr>
12478+
12479+</table>
12480+%ranking-killsF5X5%
12481+
12482+
12483+
12484+
12485+<br>
12486+<table width=314 bgcolor=000000>
12487+ <tr>
12488+ <td fixwidth=50></td>
12489+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/kills" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
12490+ <td fixwidth=50></td>
12491+ </tr>
12492+</table>
12493+
12494+
12495+
12496+
12497+
12498+
12499+
12500+
12501+</body></html>
12502\ No newline at end of file
12503diff --git a/aCis_datapack/data/html/mods/tournament/ranking/kills/F9X9.htm b/aCis_datapack/data/html/mods/tournament/ranking/kills/F9X9.htm
12504new file mode 100644
12505index 0000000..3726491
12506--- /dev/null
12507+++ b/aCis_datapack/data/html/mods/tournament/ranking/kills/F9X9.htm
12508@@ -0,0 +1,54 @@
12509+<html><body>
12510+
12511+<center>
12512+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
12513+</center>
12514+
12515+<br>
12516+<table border="0" width="320" bgcolor="000000">
12517+<tr>
12518+
12519+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12520+<td width=99 align=center> <font color=ff0019>Kills Ranking (9x9)</font></td>
12521+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12522+</tr>
12523+</table>
12524+<br>
12525+
12526+<table width=300 bgcolor=000000>
12527+ <tr>
12528+ <td fixwidth=5></td>
12529+ <td align=center fixwidth=20>
12530+ #
12531+ </td>
12532+ <td align=center fixwidth=75>
12533+ Player
12534+ </td>
12535+ <td align=center fixwidth=50>
12536+ Kill
12537+ </td>
12538+ <td align=center fixwidth=50>
12539+ Action
12540+ </td>
12541+ </tr>
12542+
12543+</table>
12544+%ranking-killsF9X9%
12545+
12546+
12547+
12548+<br>
12549+<table width=314 bgcolor=000000>
12550+ <tr>
12551+ <td fixwidth=50></td>
12552+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/kills" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
12553+ <td fixwidth=50></td>
12554+ </tr>
12555+</table>
12556+
12557+
12558+
12559+
12560+
12561+
12562+</body></html>
12563\ No newline at end of file
12564diff --git a/aCis_datapack/data/html/mods/tournament/ranking/ties.htm b/aCis_datapack/data/html/mods/tournament/ranking/ties.htm
12565new file mode 100644
12566index 0000000..d218dd9
12567--- /dev/null
12568+++ b/aCis_datapack/data/html/mods/tournament/ranking/ties.htm
12569@@ -0,0 +1,148 @@
12570+<html><body>
12571+
12572+<table border="1" width="320" bgcolor="000000">
12573+<tr>
12574+<td width=99 align=center>Tournament Points: <font color=LEVEL>%tourPoints%</font><br1>
12575+</td>
12576+</tr>
12577+</table>
12578+<table border="0" width="300" bgcolor="000000">
12579+<tr>
12580+
12581+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12582+<td width=99 align=center> <font color=ff0019>(Tie) Select a Mode:</font></td>
12583+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12584+</tr>
12585+</table>
12586+<br>
12587+
12588+
12589+
12590+<table width=300 height=32 bgcolor=000000>
12591+<tr>
12592+<td fixwidth=5>
12593+</td>
12594+<td fixwidth=32 height=35>
12595+<img src=l2ui_ch3.calculate1_1 width=32 height=32>
12596+</td>
12597+<td fixwidth=190 align=center>
12598+<font color=LEVEL>1x1 MODE</font><br1>
12599+<a action="bypass bp_tournamentRanking F1X1 ties"><font color=009099>Check Ranking</font></a>
12600+</td>
12601+<td fixwidth=32 height=35>
12602+<img src=l2ui_ch3.calculate1_1 width=32 height=32>
12603+</td>
12604+</tr>
12605+</table>
12606+<br>
12607+
12608+
12609+<table width=300 height=32 bgcolor=000000>
12610+<tr>
12611+<td fixwidth=5>
12612+</td>
12613+<td fixwidth=32 height=35>
12614+<img src=l2ui_ch3.calculate1_2 width=32 height=32>
12615+</td>
12616+<td fixwidth=190 align=center>
12617+<font color=LEVEL>2x2 MODE</font><br1>
12618+<a action="bypass bp_tournamentRanking F2X2 ties"><font color=009099>Check Ranking</font></a>
12619+</td>
12620+<td fixwidth=32 height=35>
12621+<img src=l2ui_ch3.calculate1_2 width=32 height=32>
12622+</td>
12623+</tr>
12624+</table>
12625+<br>
12626+
12627+
12628+<table width=300 height=32 bgcolor=000000>
12629+<tr>
12630+<td fixwidth=5>
12631+</td>
12632+<td fixwidth=32 height=35>
12633+<img src=l2ui_ch3.calculate1_3 width=32 height=32>
12634+</td>
12635+<td fixwidth=190 align=center>
12636+<font color=LEVEL>3x3 MODE</font><br1>
12637+<a action="bypass bp_tournamentRanking F3X3 ties"><font color=009099>Check Ranking</font></a>
12638+</td>
12639+<td fixwidth=32 height=35>
12640+<img src=l2ui_ch3.calculate1_3 width=32 height=32>
12641+</td>
12642+</tr>
12643+</table>
12644+<br>
12645+
12646+
12647+<table width=300 height=32 bgcolor=000000>
12648+<tr>
12649+<td fixwidth=5>
12650+</td>
12651+<td fixwidth=32 height=35>
12652+<img src=l2ui_ch3.calculate1_4 width=32 height=32>
12653+</td>
12654+<td fixwidth=190 align=center>
12655+<font color=LEVEL>4x4 MODE</font><br1>
12656+<a action="bypass bp_tournamentRanking F4X4 ties"><font color=009099>Check Ranking</font></a>
12657+</td>
12658+<td fixwidth=32 height=35>
12659+<img src=l2ui_ch3.calculate1_4 width=32 height=32>
12660+</td>
12661+</tr>
12662+</table>
12663+<br>
12664+
12665+
12666+
12667+<table width=300 height=32 bgcolor=000000>
12668+<tr>
12669+<td fixwidth=5>
12670+</td>
12671+<td fixwidth=32 height=35>
12672+<img src=l2ui_ch3.calculate1_5 width=32 height=32>
12673+</td>
12674+<td fixwidth=190 align=center>
12675+<font color=LEVEL>5x5 MODE</font><br1>
12676+<a action="bypass bp_tournamentRanking F5X5 ties"><font color=009099>Check Ranking</font></a>
12677+</td>
12678+<td fixwidth=32 height=35>
12679+<img src=l2ui_ch3.calculate1_5 width=32 height=32>
12680+</td>
12681+</tr>
12682+</table>
12683+<br>
12684+
12685+
12686+<table width=300 height=32 bgcolor=000000>
12687+<tr>
12688+<td fixwidth=5>
12689+</td>
12690+<td fixwidth=32 height=35>
12691+<img src=l2ui_ch3.calculate1_9 width=32 height=32>
12692+</td>
12693+<td fixwidth=190 align=center>
12694+<font color=LEVEL>9x9 MODE</font><br1>
12695+<a action="bypass bp_tournamentRanking F9X9 ties"><font color=009099>Check Ranking</font></a>
12696+</td>
12697+<td fixwidth=32 height=35>
12698+<img src=l2ui_ch3.calculate1_9 width=32 height=32>
12699+</td>
12700+</tr>
12701+</table>
12702+<br>
12703+<table width=314 bgcolor=000000>
12704+ <tr>
12705+ <td fixwidth=50></td>
12706+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
12707+ <td fixwidth=50></td>
12708+ </tr>
12709+</table>
12710+
12711+
12712+
12713+
12714+
12715+
12716+
12717+</body></html>
12718\ No newline at end of file
12719diff --git a/aCis_datapack/data/html/mods/tournament/ranking/ties/F1X1.htm b/aCis_datapack/data/html/mods/tournament/ranking/ties/F1X1.htm
12720new file mode 100644
12721index 0000000..51b6ae8
12722--- /dev/null
12723+++ b/aCis_datapack/data/html/mods/tournament/ranking/ties/F1X1.htm
12724@@ -0,0 +1,55 @@
12725+<html><body>
12726+
12727+<center>
12728+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
12729+</center>
12730+
12731+<br>
12732+<table border="0" width="320" bgcolor="000000">
12733+<tr>
12734+
12735+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12736+<td width=99 align=center> <font color=ff0019>Ties Ranking(1x1)</font></td>
12737+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12738+</tr>
12739+</table>
12740+<br>
12741+
12742+<table width=300 bgcolor=000000>
12743+ <tr>
12744+ <td fixwidth=5></td>
12745+ <td align=center fixwidth=20>
12746+ #
12747+ </td>
12748+ <td align=center fixwidth=75>
12749+ Player
12750+ </td>
12751+ <td align=center fixwidth=50>
12752+ Ties
12753+ </td>
12754+ <td align=center fixwidth=50>
12755+ Action
12756+ </td>
12757+ </tr>
12758+
12759+</table>
12760+%ranking-tiesF1X1%
12761+
12762+
12763+
12764+
12765+<br>
12766+<table width=314 bgcolor=000000>
12767+ <tr>
12768+ <td fixwidth=50></td>
12769+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/ties" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
12770+ <td fixwidth=50></td>
12771+ </tr>
12772+</table>
12773+
12774+
12775+
12776+
12777+
12778+
12779+</body></html>
12780\ No newline at end of file
12781diff --git a/aCis_datapack/data/html/mods/tournament/ranking/ties/F2X2.htm b/aCis_datapack/data/html/mods/tournament/ranking/ties/F2X2.htm
12782new file mode 100644
12783index 0000000..29d7c15
12784--- /dev/null
12785+++ b/aCis_datapack/data/html/mods/tournament/ranking/ties/F2X2.htm
12786@@ -0,0 +1,55 @@
12787+<html><body>
12788+
12789+<center>
12790+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
12791+</center>
12792+
12793+<br>
12794+<table border="0" width="320" bgcolor="000000">
12795+<tr>
12796+
12797+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12798+<td width=99 align=center> <font color=ff0019>Ties Ranking(2x2)</font></td>
12799+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12800+</tr>
12801+</table>
12802+<br>
12803+
12804+<table width=300 bgcolor=000000>
12805+ <tr>
12806+ <td fixwidth=5></td>
12807+ <td align=center fixwidth=20>
12808+ #
12809+ </td>
12810+ <td align=center fixwidth=75>
12811+ Player
12812+ </td>
12813+ <td align=center fixwidth=50>
12814+ Ties
12815+ </td>
12816+ <td align=center fixwidth=50>
12817+ Action
12818+ </td>
12819+ </tr>
12820+
12821+</table>
12822+%ranking-tiesF2X2%
12823+
12824+
12825+
12826+
12827+
12828+
12829+<br>
12830+<table width=314 bgcolor=000000>
12831+ <tr>
12832+ <td fixwidth=50></td>
12833+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/ties" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
12834+ <td fixwidth=50></td>
12835+ </tr>
12836+</table>
12837+
12838+
12839+
12840+
12841+</body></html>
12842\ No newline at end of file
12843diff --git a/aCis_datapack/data/html/mods/tournament/ranking/ties/F3X3.htm b/aCis_datapack/data/html/mods/tournament/ranking/ties/F3X3.htm
12844new file mode 100644
12845index 0000000..603be3a
12846--- /dev/null
12847+++ b/aCis_datapack/data/html/mods/tournament/ranking/ties/F3X3.htm
12848@@ -0,0 +1,55 @@
12849+<html><body>
12850+
12851+<center>
12852+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
12853+</center>
12854+
12855+<br>
12856+<table border="0" width="320" bgcolor="000000">
12857+<tr>
12858+
12859+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12860+<td width=99 align=center> <font color=ff0019>Ties Ranking(3x3)</font></td>
12861+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12862+</tr>
12863+</table>
12864+<br>
12865+
12866+<table width=300 bgcolor=000000>
12867+ <tr>
12868+ <td fixwidth=5></td>
12869+ <td align=center fixwidth=20>
12870+ #
12871+ </td>
12872+ <td align=center fixwidth=75>
12873+ Player
12874+ </td>
12875+ <td align=center fixwidth=50>
12876+ Ties
12877+ </td>
12878+ <td align=center fixwidth=50>
12879+ Action
12880+ </td>
12881+ </tr>
12882+
12883+</table>
12884+%ranking-tiesF3X3%
12885+
12886+
12887+
12888+
12889+
12890+<br>
12891+<table width=314 bgcolor=000000>
12892+ <tr>
12893+ <td fixwidth=50></td>
12894+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/ties" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
12895+ <td fixwidth=50></td>
12896+ </tr>
12897+</table>
12898+
12899+
12900+
12901+
12902+
12903+</body></html>
12904\ No newline at end of file
12905diff --git a/aCis_datapack/data/html/mods/tournament/ranking/ties/F4X4.htm b/aCis_datapack/data/html/mods/tournament/ranking/ties/F4X4.htm
12906new file mode 100644
12907index 0000000..e4393b4
12908--- /dev/null
12909+++ b/aCis_datapack/data/html/mods/tournament/ranking/ties/F4X4.htm
12910@@ -0,0 +1,55 @@
12911+<html><body>
12912+
12913+<center>
12914+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
12915+</center>
12916+
12917+<br>
12918+<table border="0" width="320" bgcolor="000000">
12919+<tr>
12920+
12921+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12922+<td width=99 align=center> <font color=ff0019>Ties Ranking(4x4)</font></td>
12923+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12924+</tr>
12925+</table>
12926+<br>
12927+
12928+<table width=300 bgcolor=000000>
12929+ <tr>
12930+ <td fixwidth=5></td>
12931+ <td align=center fixwidth=20>
12932+ #
12933+ </td>
12934+ <td align=center fixwidth=75>
12935+ Player
12936+ </td>
12937+ <td align=center fixwidth=50>
12938+ Ties
12939+ </td>
12940+ <td align=center fixwidth=50>
12941+ Action
12942+ </td>
12943+ </tr>
12944+
12945+</table>
12946+%ranking-tiesF4X4%
12947+
12948+
12949+
12950+
12951+<br>
12952+<table width=314 bgcolor=000000>
12953+ <tr>
12954+ <td fixwidth=50></td>
12955+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/ties" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
12956+ <td fixwidth=50></td>
12957+ </tr>
12958+</table>
12959+
12960+
12961+
12962+
12963+
12964+
12965+</body></html>
12966\ No newline at end of file
12967diff --git a/aCis_datapack/data/html/mods/tournament/ranking/ties/F5X5.htm b/aCis_datapack/data/html/mods/tournament/ranking/ties/F5X5.htm
12968new file mode 100644
12969index 0000000..0d7affa
12970--- /dev/null
12971+++ b/aCis_datapack/data/html/mods/tournament/ranking/ties/F5X5.htm
12972@@ -0,0 +1,55 @@
12973+<html><body>
12974+
12975+<center>
12976+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
12977+</center>
12978+
12979+<br>
12980+<table border="0" width="320" bgcolor="000000">
12981+<tr>
12982+
12983+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12984+<td width=99 align=center> <font color=ff0019>Ties Ranking (5x5)</font></td>
12985+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
12986+</tr>
12987+</table>
12988+<br>
12989+
12990+<table width=300 bgcolor=000000>
12991+ <tr>
12992+ <td fixwidth=5></td>
12993+ <td align=center fixwidth=20>
12994+ #
12995+ </td>
12996+ <td align=center fixwidth=75>
12997+ Player
12998+ </td>
12999+ <td align=center fixwidth=50>
13000+ Ties
13001+ </td>
13002+ <td align=center fixwidth=50>
13003+ Action
13004+ </td>
13005+ </tr>
13006+
13007+</table>
13008+%ranking-tiesF5X5%
13009+
13010+
13011+
13012+
13013+
13014+
13015+<br>
13016+<table width=314 bgcolor=000000>
13017+ <tr>
13018+ <td fixwidth=50></td>
13019+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/ties" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13020+ <td fixwidth=50></td>
13021+ </tr>
13022+</table>
13023+
13024+
13025+
13026+
13027+</body></html>
13028\ No newline at end of file
13029diff --git a/aCis_datapack/data/html/mods/tournament/ranking/ties/F9X9.htm b/aCis_datapack/data/html/mods/tournament/ranking/ties/F9X9.htm
13030new file mode 100644
13031index 0000000..a78a158
13032--- /dev/null
13033+++ b/aCis_datapack/data/html/mods/tournament/ranking/ties/F9X9.htm
13034@@ -0,0 +1,57 @@
13035+<html><body>
13036+
13037+<center>
13038+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13039+</center>
13040+
13041+<br>
13042+<table border="0" width="320" bgcolor="000000">
13043+<tr>
13044+
13045+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13046+<td width=99 align=center> <font color=ff0019>Global Ranking (9x9)</font></td>
13047+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13048+</tr>
13049+</table>
13050+<br>
13051+
13052+<table width=300 bgcolor=000000>
13053+ <tr>
13054+ <td fixwidth=5></td>
13055+ <td align=center fixwidth=20>
13056+ #
13057+ </td>
13058+ <td align=center fixwidth=75>
13059+ Player
13060+ </td>
13061+ <td align=center fixwidth=50>
13062+ Ties
13063+ </td>
13064+ <td align=center fixwidth=50>
13065+ Action
13066+ </td>
13067+ </tr>
13068+
13069+</table>
13070+%ranking-tiesF9X9%
13071+
13072+
13073+<br>
13074+<table width=314 bgcolor=000000>
13075+ <tr>
13076+ <td fixwidth=50></td>
13077+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/ties" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13078+ <td fixwidth=50></td>
13079+ </tr>
13080+</table>
13081+
13082+
13083+
13084+
13085+
13086+
13087+
13088+
13089+
13090+
13091+</body></html>
13092\ No newline at end of file
13093diff --git a/aCis_datapack/data/html/mods/tournament/ranking/victories.htm b/aCis_datapack/data/html/mods/tournament/ranking/victories.htm
13094new file mode 100644
13095index 0000000..74093b6
13096--- /dev/null
13097+++ b/aCis_datapack/data/html/mods/tournament/ranking/victories.htm
13098@@ -0,0 +1,148 @@
13099+<html><body>
13100+
13101+<table border="1" width="320" bgcolor="000000">
13102+<tr>
13103+<td width=99 align=center>Tournament Points: <font color=LEVEL>%tourPoints%</font><br1>
13104+</td>
13105+</tr>
13106+</table>
13107+<table border="0" width="300" bgcolor="000000">
13108+<tr>
13109+
13110+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13111+<td width=99 align=center> <font color=ff0019>(Victories) Select a Mode:</font></td>
13112+<td width=50 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13113+</tr>
13114+</table>
13115+<br>
13116+
13117+
13118+
13119+<table width=300 height=32 bgcolor=000000>
13120+<tr>
13121+<td fixwidth=5>
13122+</td>
13123+<td fixwidth=32 height=35>
13124+<img src=l2ui_ch3.calculate1_1 width=32 height=32>
13125+</td>
13126+<td fixwidth=190 align=center>
13127+<font color=LEVEL>1x1 MODE</font><br1>
13128+<a action="bypass bp_tournamentRanking F1X1 victories"><font color=009099>Check Ranking</font></a>
13129+</td>
13130+<td fixwidth=32 height=35>
13131+<img src=l2ui_ch3.calculate1_1 width=32 height=32>
13132+</td>
13133+</tr>
13134+</table>
13135+<br>
13136+
13137+
13138+<table width=300 height=32 bgcolor=000000>
13139+<tr>
13140+<td fixwidth=5>
13141+</td>
13142+<td fixwidth=32 height=35>
13143+<img src=l2ui_ch3.calculate1_2 width=32 height=32>
13144+</td>
13145+<td fixwidth=190 align=center>
13146+<font color=LEVEL>2x2 MODE</font><br1>
13147+<a action="bypass bp_tournamentRanking F2X2 victories"><font color=009099>Check Ranking</font></a>
13148+</td>
13149+<td fixwidth=32 height=35>
13150+<img src=l2ui_ch3.calculate1_2 width=32 height=32>
13151+</td>
13152+</tr>
13153+</table>
13154+<br>
13155+
13156+
13157+<table width=300 height=32 bgcolor=000000>
13158+<tr>
13159+<td fixwidth=5>
13160+</td>
13161+<td fixwidth=32 height=35>
13162+<img src=l2ui_ch3.calculate1_3 width=32 height=32>
13163+</td>
13164+<td fixwidth=190 align=center>
13165+<font color=LEVEL>3x3 MODE</font><br1>
13166+<a action="bypass bp_tournamentRanking F3X3 victories"><font color=009099>Check Ranking</font></a>
13167+</td>
13168+<td fixwidth=32 height=35>
13169+<img src=l2ui_ch3.calculate1_3 width=32 height=32>
13170+</td>
13171+</tr>
13172+</table>
13173+<br>
13174+
13175+
13176+<table width=300 height=32 bgcolor=000000>
13177+<tr>
13178+<td fixwidth=5>
13179+</td>
13180+<td fixwidth=32 height=35>
13181+<img src=l2ui_ch3.calculate1_4 width=32 height=32>
13182+</td>
13183+<td fixwidth=190 align=center>
13184+<font color=LEVEL>4x4 MODE</font><br1>
13185+<a action="bypass bp_tournamentRanking F4X4 victories"><font color=009099>Check Ranking</font></a>
13186+</td>
13187+<td fixwidth=32 height=35>
13188+<img src=l2ui_ch3.calculate1_4 width=32 height=32>
13189+</td>
13190+</tr>
13191+</table>
13192+<br>
13193+
13194+
13195+
13196+<table width=300 height=32 bgcolor=000000>
13197+<tr>
13198+<td fixwidth=5>
13199+</td>
13200+<td fixwidth=32 height=35>
13201+<img src=l2ui_ch3.calculate1_5 width=32 height=32>
13202+</td>
13203+<td fixwidth=190 align=center>
13204+<font color=LEVEL>5x5 MODE</font><br1>
13205+<a action="bypass bp_tournamentRanking F5X5 victories"><font color=009099>Check Ranking</font></a>
13206+</td>
13207+<td fixwidth=32 height=35>
13208+<img src=l2ui_ch3.calculate1_5 width=32 height=32>
13209+</td>
13210+</tr>
13211+</table>
13212+<br>
13213+
13214+
13215+<table width=300 height=32 bgcolor=000000>
13216+<tr>
13217+<td fixwidth=5>
13218+</td>
13219+<td fixwidth=32 height=35>
13220+<img src=l2ui_ch3.calculate1_9 width=32 height=32>
13221+</td>
13222+<td fixwidth=190 align=center>
13223+<font color=LEVEL>9x9 MODE</font><br1>
13224+<a action="bypass bp_tournamentRanking F9X9 victories"><font color=009099>Check Ranking</font></a>
13225+</td>
13226+<td fixwidth=32 height=35>
13227+<img src=l2ui_ch3.calculate1_9 width=32 height=32>
13228+</td>
13229+</tr>
13230+</table>
13231+<br>
13232+<table width=314 bgcolor=000000>
13233+ <tr>
13234+ <td fixwidth=50></td>
13235+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13236+ <td fixwidth=50></td>
13237+ </tr>
13238+</table>
13239+
13240+
13241+
13242+
13243+
13244+
13245+
13246+</body></html>
13247\ No newline at end of file
13248diff --git a/aCis_datapack/data/html/mods/tournament/ranking/victories/F1X1.htm b/aCis_datapack/data/html/mods/tournament/ranking/victories/F1X1.htm
13249new file mode 100644
13250index 0000000..e19840f
13251--- /dev/null
13252+++ b/aCis_datapack/data/html/mods/tournament/ranking/victories/F1X1.htm
13253@@ -0,0 +1,54 @@
13254+<html><body>
13255+
13256+<center>
13257+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13258+</center>
13259+
13260+<br>
13261+<table border="0" width="320" bgcolor="000000">
13262+<tr>
13263+
13264+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13265+<td width=99 align=center> <font color=ff0019>Victories Ranking (1x1)</font></td>
13266+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13267+</tr>
13268+</table>
13269+<br>
13270+
13271+<table width=300 bgcolor=000000>
13272+ <tr>
13273+ <td fixwidth=5></td>
13274+ <td align=center fixwidth=20>
13275+ #
13276+ </td>
13277+ <td align=center fixwidth=75>
13278+ Player
13279+ </td>
13280+ <td align=center fixwidth=50>
13281+ Victories
13282+ </td>
13283+ <td align=center fixwidth=50>
13284+ Action
13285+ </td>
13286+ </tr>
13287+
13288+</table>
13289+%ranking-victoriesF1X1%
13290+
13291+
13292+
13293+
13294+<br>
13295+<table width=314 bgcolor=000000>
13296+ <tr>
13297+ <td fixwidth=50></td>
13298+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/victories" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13299+ <td fixwidth=50></td>
13300+ </tr>
13301+</table>
13302+
13303+
13304+
13305+
13306+
13307+</body></html>
13308\ No newline at end of file
13309diff --git a/aCis_datapack/data/html/mods/tournament/ranking/victories/F2X2.htm b/aCis_datapack/data/html/mods/tournament/ranking/victories/F2X2.htm
13310new file mode 100644
13311index 0000000..61176eb
13312--- /dev/null
13313+++ b/aCis_datapack/data/html/mods/tournament/ranking/victories/F2X2.htm
13314@@ -0,0 +1,54 @@
13315+<html><body>
13316+
13317+<center>
13318+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13319+</center>
13320+
13321+<br>
13322+<table border="0" width="320" bgcolor="000000">
13323+<tr>
13324+
13325+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13326+<td width=99 align=center> <font color=ff0019>Victories Ranking (2x2)</font></td>
13327+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13328+</tr>
13329+</table>
13330+<br>
13331+
13332+<table width=300 bgcolor=000000>
13333+ <tr>
13334+ <td fixwidth=5></td>
13335+ <td align=center fixwidth=20>
13336+ #
13337+ </td>
13338+ <td align=center fixwidth=75>
13339+ Player
13340+ </td>
13341+ <td align=center fixwidth=50>
13342+ Victories
13343+ </td>
13344+ <td align=center fixwidth=50>
13345+ Action
13346+ </td>
13347+ </tr>
13348+
13349+</table>
13350+%ranking-victoriesF2X2%
13351+
13352+
13353+
13354+
13355+<br>
13356+<table width=314 bgcolor=000000>
13357+ <tr>
13358+ <td fixwidth=50></td>
13359+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/victories" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13360+ <td fixwidth=50></td>
13361+ </tr>
13362+</table>
13363+
13364+
13365+
13366+
13367+
13368+</body></html>
13369\ No newline at end of file
13370diff --git a/aCis_datapack/data/html/mods/tournament/ranking/victories/F3X3.htm b/aCis_datapack/data/html/mods/tournament/ranking/victories/F3X3.htm
13371new file mode 100644
13372index 0000000..10cb636
13373--- /dev/null
13374+++ b/aCis_datapack/data/html/mods/tournament/ranking/victories/F3X3.htm
13375@@ -0,0 +1,54 @@
13376+<html><body>
13377+
13378+<center>
13379+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13380+</center>
13381+
13382+<br>
13383+<table border="0" width="320" bgcolor="000000">
13384+<tr>
13385+
13386+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13387+<td width=99 align=center> <font color=ff0019>Victories Ranking (3x3)</font></td>
13388+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13389+</tr>
13390+</table>
13391+<br>
13392+
13393+<table width=300 bgcolor=000000>
13394+ <tr>
13395+ <td fixwidth=5></td>
13396+ <td align=center fixwidth=20>
13397+ #
13398+ </td>
13399+ <td align=center fixwidth=75>
13400+ Player
13401+ </td>
13402+ <td align=center fixwidth=50>
13403+ Victories
13404+ </td>
13405+ <td align=center fixwidth=50>
13406+ Action
13407+ </td>
13408+ </tr>
13409+
13410+</table>
13411+%ranking-victoriesF3X3%
13412+
13413+
13414+
13415+<br>
13416+<table width=314 bgcolor=000000>
13417+ <tr>
13418+ <td fixwidth=50></td>
13419+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/victories" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13420+ <td fixwidth=50></td>
13421+ </tr>
13422+</table>
13423+
13424+
13425+
13426+
13427+
13428+
13429+</body></html>
13430\ No newline at end of file
13431diff --git a/aCis_datapack/data/html/mods/tournament/ranking/victories/F4X4.htm b/aCis_datapack/data/html/mods/tournament/ranking/victories/F4X4.htm
13432new file mode 100644
13433index 0000000..47af928
13434--- /dev/null
13435+++ b/aCis_datapack/data/html/mods/tournament/ranking/victories/F4X4.htm
13436@@ -0,0 +1,54 @@
13437+<html><body>
13438+
13439+<center>
13440+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13441+</center>
13442+
13443+<br>
13444+<table border="0" width="320" bgcolor="000000">
13445+<tr>
13446+
13447+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13448+<td width=99 align=center> <font color=ff0019>Victories Ranking (4x4)</font></td>
13449+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13450+</tr>
13451+</table>
13452+<br>
13453+
13454+<table width=300 bgcolor=000000>
13455+ <tr>
13456+ <td fixwidth=5></td>
13457+ <td align=center fixwidth=20>
13458+ #
13459+ </td>
13460+ <td align=center fixwidth=75>
13461+ Player
13462+ </td>
13463+ <td align=center fixwidth=50>
13464+ Victories
13465+ </td>
13466+ <td align=center fixwidth=50>
13467+ Action
13468+ </td>
13469+ </tr>
13470+
13471+</table>
13472+%ranking-victoriesF4X4%
13473+
13474+
13475+
13476+
13477+<br>
13478+<table width=314 bgcolor=000000>
13479+ <tr>
13480+ <td fixwidth=50></td>
13481+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/victories" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13482+ <td fixwidth=50></td>
13483+ </tr>
13484+</table>
13485+
13486+
13487+
13488+
13489+
13490+</body></html>
13491\ No newline at end of file
13492diff --git a/aCis_datapack/data/html/mods/tournament/ranking/victories/F5X5.htm b/aCis_datapack/data/html/mods/tournament/ranking/victories/F5X5.htm
13493new file mode 100644
13494index 0000000..594ccae
13495--- /dev/null
13496+++ b/aCis_datapack/data/html/mods/tournament/ranking/victories/F5X5.htm
13497@@ -0,0 +1,54 @@
13498+<html><body>
13499+
13500+<center>
13501+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13502+</center>
13503+
13504+<br>
13505+<table border="0" width="320" bgcolor="000000">
13506+<tr>
13507+
13508+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13509+<td width=99 align=center> <font color=ff0019>Victories Ranking (5x5)</font></td>
13510+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13511+</tr>
13512+</table>
13513+<br>
13514+
13515+<table width=300 bgcolor=000000>
13516+ <tr>
13517+ <td fixwidth=5></td>
13518+ <td align=center fixwidth=20>
13519+ #
13520+ </td>
13521+ <td align=center fixwidth=75>
13522+ Player
13523+ </td>
13524+ <td align=center fixwidth=50>
13525+ Victories
13526+ </td>
13527+ <td align=center fixwidth=50>
13528+ Action
13529+ </td>
13530+ </tr>
13531+
13532+</table>
13533+%ranking-victoriesF5X5%
13534+
13535+
13536+<br>
13537+<table width=314 bgcolor=000000>
13538+ <tr>
13539+ <td fixwidth=50></td>
13540+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/victories" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13541+ <td fixwidth=50></td>
13542+ </tr>
13543+</table>
13544+
13545+
13546+
13547+
13548+
13549+
13550+
13551+</body></html>
13552\ No newline at end of file
13553diff --git a/aCis_datapack/data/html/mods/tournament/ranking/victories/F9X9.htm b/aCis_datapack/data/html/mods/tournament/ranking/victories/F9X9.htm
13554new file mode 100644
13555index 0000000..3f87e17
13556--- /dev/null
13557+++ b/aCis_datapack/data/html/mods/tournament/ranking/victories/F9X9.htm
13558@@ -0,0 +1,55 @@
13559+<html><body>
13560+
13561+<center>
13562+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13563+</center>
13564+
13565+<br>
13566+<table border="0" width="320" bgcolor="000000">
13567+<tr>
13568+
13569+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13570+<td width=99 align=center> <font color=ff0019>Victories Ranking (9x9)</font></td>
13571+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13572+</tr>
13573+</table>
13574+<br>
13575+
13576+<table width=300 bgcolor=000000>
13577+ <tr>
13578+ <td fixwidth=5></td>
13579+ <td align=center fixwidth=20>
13580+ #
13581+ </td>
13582+ <td align=center fixwidth=75>
13583+ Player
13584+ </td>
13585+ <td align=center fixwidth=50>
13586+ Victories
13587+ </td>
13588+ <td align=center fixwidth=50>
13589+ Action
13590+ </td>
13591+ </tr>
13592+
13593+</table>
13594+%ranking-victoriesF9X9%
13595+
13596+
13597+
13598+<br>
13599+<table width=314 bgcolor=000000>
13600+ <tr>
13601+ <td fixwidth=50></td>
13602+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/victories" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13603+ <td fixwidth=50></td>
13604+ </tr>
13605+</table>
13606+
13607+
13608+
13609+
13610+
13611+
13612+
13613+</body></html>
13614\ No newline at end of file
13615diff --git a/aCis_datapack/data/html/mods/tournament/ranking/wdt/F1X1.htm b/aCis_datapack/data/html/mods/tournament/ranking/wdt/F1X1.htm
13616new file mode 100644
13617index 0000000..b6476f8
13618--- /dev/null
13619+++ b/aCis_datapack/data/html/mods/tournament/ranking/wdt/F1X1.htm
13620@@ -0,0 +1,54 @@
13621+<html><body>
13622+
13623+<center>
13624+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13625+</center>
13626+
13627+<br>
13628+<table border="0" width="320" bgcolor="000000">
13629+<tr>
13630+
13631+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13632+<td width=99 align=center> <font color=ff0019>Global Ranking (1x1)</font></td>
13633+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13634+</tr>
13635+</table>
13636+<br>
13637+
13638+<table width=300 bgcolor=000000>
13639+ <tr>
13640+ <td fixwidth=5></td>
13641+ <td align=center fixwidth=20>
13642+ #
13643+ </td>
13644+ <td align=center fixwidth=75>
13645+ Player
13646+ </td>
13647+ <td align=center fixwidth=50>
13648+ W/D/T
13649+ </td>
13650+ <td align=center fixwidth=50>
13651+ Action
13652+ </td>
13653+ </tr>
13654+
13655+</table>
13656+%ranking-wdtF1X1%
13657+
13658+
13659+<br>
13660+<table width=314 bgcolor=000000>
13661+ <tr>
13662+ <td fixwidth=50></td>
13663+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/global" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13664+ <td fixwidth=50></td>
13665+ </tr>
13666+</table>
13667+
13668+
13669+
13670+
13671+
13672+
13673+
13674+</body></html>
13675\ No newline at end of file
13676diff --git a/aCis_datapack/data/html/mods/tournament/ranking/wdt/F2X2.htm b/aCis_datapack/data/html/mods/tournament/ranking/wdt/F2X2.htm
13677new file mode 100644
13678index 0000000..235866c
13679--- /dev/null
13680+++ b/aCis_datapack/data/html/mods/tournament/ranking/wdt/F2X2.htm
13681@@ -0,0 +1,54 @@
13682+<html><body>
13683+
13684+<center>
13685+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13686+</center>
13687+
13688+<br>
13689+<table border="0" width="320" bgcolor="000000">
13690+<tr>
13691+
13692+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13693+<td width=99 align=center> <font color=ff0019>Global Ranking (2x2)</font></td>
13694+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13695+</tr>
13696+</table>
13697+<br>
13698+
13699+<table width=300 bgcolor=000000>
13700+ <tr>
13701+ <td fixwidth=5></td>
13702+ <td align=center fixwidth=20>
13703+ #
13704+ </td>
13705+ <td align=center fixwidth=75>
13706+ Player
13707+ </td>
13708+ <td align=center fixwidth=50>
13709+ W/D/T
13710+ </td>
13711+ <td align=center fixwidth=50>
13712+ Action
13713+ </td>
13714+ </tr>
13715+
13716+</table>
13717+%ranking-wdtF2X2%
13718+
13719+
13720+
13721+<br>
13722+<table width=314 bgcolor=000000>
13723+ <tr>
13724+ <td fixwidth=50></td>
13725+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/global" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13726+ <td fixwidth=50></td>
13727+ </tr>
13728+</table>
13729+
13730+
13731+
13732+
13733+
13734+
13735+</body></html>
13736\ No newline at end of file
13737diff --git a/aCis_datapack/data/html/mods/tournament/ranking/wdt/F3X3.htm b/aCis_datapack/data/html/mods/tournament/ranking/wdt/F3X3.htm
13738new file mode 100644
13739index 0000000..bdefa5d
13740--- /dev/null
13741+++ b/aCis_datapack/data/html/mods/tournament/ranking/wdt/F3X3.htm
13742@@ -0,0 +1,54 @@
13743+<html><body>
13744+
13745+<center>
13746+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13747+</center>
13748+
13749+<br>
13750+<table border="0" width="320" bgcolor="000000">
13751+<tr>
13752+
13753+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13754+<td width=99 align=center> <font color=ff0019>Global Ranking (3x3)</font></td>
13755+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13756+</tr>
13757+</table>
13758+<br>
13759+
13760+<table width=300 bgcolor=000000>
13761+ <tr>
13762+ <td fixwidth=5></td>
13763+ <td align=center fixwidth=20>
13764+ #
13765+ </td>
13766+ <td align=center fixwidth=75>
13767+ Player
13768+ </td>
13769+ <td align=center fixwidth=50>
13770+ W/D/T
13771+ </td>
13772+ <td align=center fixwidth=50>
13773+ Action
13774+ </td>
13775+ </tr>
13776+
13777+</table>
13778+%ranking-wdtF3X3%
13779+
13780+
13781+
13782+<br>
13783+<table width=314 bgcolor=000000>
13784+ <tr>
13785+ <td fixwidth=50></td>
13786+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/global" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13787+ <td fixwidth=50></td>
13788+ </tr>
13789+</table>
13790+
13791+
13792+
13793+
13794+
13795+
13796+</body></html>
13797\ No newline at end of file
13798diff --git a/aCis_datapack/data/html/mods/tournament/ranking/wdt/F4X4.htm b/aCis_datapack/data/html/mods/tournament/ranking/wdt/F4X4.htm
13799new file mode 100644
13800index 0000000..ec04ca1
13801--- /dev/null
13802+++ b/aCis_datapack/data/html/mods/tournament/ranking/wdt/F4X4.htm
13803@@ -0,0 +1,54 @@
13804+<html><body>
13805+
13806+<center>
13807+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13808+</center>
13809+
13810+<br>
13811+<table border="0" width="320" bgcolor="000000">
13812+<tr>
13813+
13814+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13815+<td width=99 align=center> <font color=ff0019>Global Ranking (4x4)</font></td>
13816+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13817+</tr>
13818+</table>
13819+<br>
13820+
13821+<table width=300 bgcolor=000000>
13822+ <tr>
13823+ <td fixwidth=5></td>
13824+ <td align=center fixwidth=20>
13825+ #
13826+ </td>
13827+ <td align=center fixwidth=75>
13828+ Player
13829+ </td>
13830+ <td align=center fixwidth=50>
13831+ W/D/T
13832+ </td>
13833+ <td align=center fixwidth=50>
13834+ Action
13835+ </td>
13836+ </tr>
13837+
13838+</table>
13839+%ranking-wdtF4X4%
13840+
13841+
13842+
13843+
13844+<br>
13845+<table width=314 bgcolor=000000>
13846+ <tr>
13847+ <td fixwidth=50></td>
13848+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/global" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13849+ <td fixwidth=50></td>
13850+ </tr>
13851+</table>
13852+
13853+
13854+
13855+
13856+
13857+</body></html>
13858\ No newline at end of file
13859diff --git a/aCis_datapack/data/html/mods/tournament/ranking/wdt/F5X5.htm b/aCis_datapack/data/html/mods/tournament/ranking/wdt/F5X5.htm
13860new file mode 100644
13861index 0000000..a9bbf4a
13862--- /dev/null
13863+++ b/aCis_datapack/data/html/mods/tournament/ranking/wdt/F5X5.htm
13864@@ -0,0 +1,55 @@
13865+<html><body>
13866+
13867+<center>
13868+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13869+</center>
13870+
13871+<br>
13872+<table border="0" width="320" bgcolor="000000">
13873+<tr>
13874+
13875+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13876+<td width=99 align=center> <font color=ff0019>Global Ranking (5x5)</font></td>
13877+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13878+</tr>
13879+</table>
13880+<br>
13881+
13882+<table width=300 bgcolor=000000>
13883+ <tr>
13884+ <td fixwidth=5></td>
13885+ <td align=center fixwidth=20>
13886+ #
13887+ </td>
13888+ <td align=center fixwidth=75>
13889+ Player
13890+ </td>
13891+ <td align=center fixwidth=50>
13892+ W/D/T
13893+ </td>
13894+ <td align=center fixwidth=50>
13895+ Action
13896+ </td>
13897+ </tr>
13898+
13899+</table>
13900+%ranking-wdtF5X5%
13901+
13902+
13903+
13904+<br>
13905+<table width=314 bgcolor=000000>
13906+ <tr>
13907+ <td fixwidth=50></td>
13908+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/global" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13909+ <td fixwidth=50></td>
13910+ </tr>
13911+</table>
13912+
13913+
13914+
13915+
13916+
13917+
13918+
13919+</body></html>
13920\ No newline at end of file
13921diff --git a/aCis_datapack/data/html/mods/tournament/ranking/wdt/F9X9.htm b/aCis_datapack/data/html/mods/tournament/ranking/wdt/F9X9.htm
13922new file mode 100644
13923index 0000000..ed3d56c
13924--- /dev/null
13925+++ b/aCis_datapack/data/html/mods/tournament/ranking/wdt/F9X9.htm
13926@@ -0,0 +1,54 @@
13927+<html><body>
13928+
13929+<center>
13930+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13931+</center>
13932+
13933+<br>
13934+<table border="0" width="320" bgcolor="000000">
13935+<tr>
13936+
13937+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13938+<td width=99 align=center> <font color=ff0019>Global Ranking (9x9)</font></td>
13939+<td width=30 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
13940+</tr>
13941+</table>
13942+<br>
13943+
13944+<table width=300 bgcolor=000000>
13945+ <tr>
13946+ <td fixwidth=5></td>
13947+ <td align=center fixwidth=20>
13948+ #
13949+ </td>
13950+ <td align=center fixwidth=75>
13951+ Player
13952+ </td>
13953+ <td align=center fixwidth=50>
13954+ W/D/T
13955+ </td>
13956+ <td align=center fixwidth=50>
13957+ Action
13958+ </td>
13959+ </tr>
13960+
13961+</table>
13962+%ranking-wdtF9X9%
13963+
13964+
13965+
13966+
13967+<br>
13968+<table width=314 bgcolor=000000>
13969+ <tr>
13970+ <td fixwidth=50></td>
13971+ <td align=center><button value="Back" action="bypass bp_showTournamentPage ranking/global" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td>
13972+ <td fixwidth=50></td>
13973+ </tr>
13974+</table>
13975+
13976+
13977+
13978+
13979+
13980+</body></html>
13981\ No newline at end of file
13982diff --git a/aCis_datapack/data/html/mods/tournament/status/1x1.htm b/aCis_datapack/data/html/mods/tournament/status/1x1.htm
13983new file mode 100644
13984index 0000000..c45a0fb
13985--- /dev/null
13986+++ b/aCis_datapack/data/html/mods/tournament/status/1x1.htm
13987@@ -0,0 +1,183 @@
13988+<html><title>My Tour</title><body>
13989+
13990+<center>
13991+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
13992+</center>
13993+
13994+<table border="1" width=316 bgcolor="000000">
13995+<tr>
13996+<td width=99 align=center><font color=LEVEL>%playerName%</font>
13997+</td>
13998+</tr>
13999+</table>
14000+<br>
14001+
14002+<table border="0" width="300" bgcolor="000000">
14003+<tr>
14004+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
14005+<td width=99 align=center> <font color=ff0019> 1x1 Details</font></td>
14006+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
14007+</tr>
14008+</table>
14009+<br>
14010+
14011+
14012+<table width=300 height=32 bgcolor=000000>
14013+<tr>
14014+<td fixwidth=5>
14015+</td>
14016+<td fixwidth=250 align=center>
14017+<font color=LEVEL>All statuses below refer to 1x1 mode</font>
14018+</td>
14019+
14020+</tr>
14021+</table>
14022+<br>
14023+
14024+<table width=320 bgcolor=000000>
14025+ <tr>
14026+ <td fixwidth=5>
14027+ </td>
14028+ <td fixwidth=290>
14029+ <font color=LEVEL>General (1x1)</font><br>
14030+ </td>
14031+ </tr>
14032+
14033+</table>
14034+
14035+<table width=320 bgcolor=000000>
14036+ <tr>
14037+ <td fixwidth=5>
14038+ </td>
14039+ <td align=left>
14040+ <font color=ff0029>DPF:</font> %dpfF1X1%
14041+ <br>
14042+ </td>
14043+ <td align=left>
14044+ <font color=ff0029>WDT:</font> %wdt%
14045+
14046+ <br>
14047+ </td>
14048+ </tr>
14049+ <tr>
14050+ <td fixwidth=5>
14051+ </td>
14052+ <td align=left>
14053+ <font color=ff0029>Total Damage:</font> %totalDmg%
14054+ <br>
14055+ </td>
14056+ <td align=left>
14057+ <font color=ff0029>Total Fights:</font> %totalFights%
14058+ <br>
14059+ </td>
14060+ </tr>
14061+ <tr>
14062+ <td fixwidth=5>
14063+ </td>
14064+ <td align=left>
14065+ <font color=ff0029>Total Kills:</font> %killstotal%
14066+ <br>
14067+ </td>
14068+
14069+ </tr>
14070+</table>
14071+<br>
14072+
14073+
14074+<table width=320 bgcolor=000000>
14075+ <tr>
14076+ <td fixwidth=5>
14077+ </td>
14078+ <td fixwidth=290>
14079+ <font color=LEVEL>Matches (1x1)</font><br>
14080+ </td>
14081+ <tr>
14082+ </tr>
14083+</table>
14084+
14085+<table width=320 bgcolor=000000>
14086+ <tr>
14087+ <td fixwidth=5>
14088+ </td>
14089+ <td align=left>
14090+ <font color=ff0029>Victories:</font> %victoriesF1X1%
14091+ <br>
14092+ </td>
14093+ <td align=left>
14094+ <font color=ff0029>Defeats:</font> %defeatsF1X1%
14095+
14096+ <br>
14097+ </td>
14098+ </tr>
14099+ <tr>
14100+ <td fixwidth=5>
14101+ </td>
14102+ <td align=left>
14103+ <font color=ff0029>Damage (1x1):</font> %damageF1X1%
14104+ <br>
14105+ </td>
14106+ <td align=left>
14107+ <font color=ff0029>Total Fights:</font> %fightsDoneF1X1%
14108+ <br>
14109+ </td>
14110+ </tr>
14111+ <tr>
14112+ <td fixwidth=5>
14113+ </td>
14114+ <td align=left>
14115+ <font color=ff0029>Total Kills:</font> %killstotal%
14116+ <br>
14117+ </td>
14118+
14119+ </tr>
14120+</table>
14121+<br>
14122+
14123+
14124+<table width=300 bgcolor=000000>
14125+<tr>
14126+<td fixwidth=5>
14127+</td>
14128+<td fixwidth=250 align=center>
14129+<font color=LEVEL>Click on Fight to full check</font>
14130+</td>
14131+
14132+</tr>
14133+</table>
14134+<table width=330 bgcolor=000000>
14135+ <tr>
14136+ <td fixwidth=30>
14137+ </td>
14138+ <td>
14139+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
14140+ </td>
14141+ <td>
14142+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
14143+ </td>
14144+ <td>
14145+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
14146+ </td>
14147+ <td>
14148+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
14149+ </td>
14150+ <td>
14151+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
14152+ </td>
14153+ <td>
14154+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
14155+ </td>
14156+ <td fixwidth=30>
14157+ </td>
14158+ </tr>
14159+
14160+
14161+</table>
14162+
14163+
14164+<center>
14165+<a action="bypass bp_showTournamentPage myTour"> Back</a>
14166+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
14167+</center>
14168+
14169+
14170+</body></html>
14171\ No newline at end of file
14172diff --git a/aCis_datapack/data/html/mods/tournament/status/2x2.htm b/aCis_datapack/data/html/mods/tournament/status/2x2.htm
14173new file mode 100644
14174index 0000000..33f7848
14175--- /dev/null
14176+++ b/aCis_datapack/data/html/mods/tournament/status/2x2.htm
14177@@ -0,0 +1,183 @@
14178+<html><title>My Tour</title><body>
14179+
14180+<center>
14181+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
14182+</center>
14183+
14184+<table border="1" width=316 bgcolor="000000">
14185+<tr>
14186+<td width=99 align=center><font color=LEVEL>%playerName%</font>
14187+</td>
14188+</tr>
14189+</table>
14190+<br>
14191+
14192+<table border="0" width="300" bgcolor="000000">
14193+<tr>
14194+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
14195+<td width=99 align=center> <font color=ff0019> 2x2 Details</font></td>
14196+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
14197+</tr>
14198+</table>
14199+<br>
14200+
14201+
14202+<table width=300 height=32 bgcolor=000000>
14203+<tr>
14204+<td fixwidth=5>
14205+</td>
14206+<td fixwidth=250 align=center>
14207+<font color=LEVEL>All statuses below refer to 2x2 mode</font>
14208+</td>
14209+
14210+</tr>
14211+</table>
14212+<br>
14213+
14214+<table width=320 bgcolor=000000>
14215+ <tr>
14216+ <td fixwidth=5>
14217+ </td>
14218+ <td fixwidth=290>
14219+ <font color=LEVEL>General (2x2)</font><br>
14220+ </td>
14221+ </tr>
14222+
14223+</table>
14224+
14225+<table width=320 bgcolor=000000>
14226+ <tr>
14227+ <td fixwidth=5>
14228+ </td>
14229+ <td align=left>
14230+ <font color=ff0029>DPF:</font> %dpfF2X2%
14231+ <br>
14232+ </td>
14233+ <td align=left>
14234+ <font color=ff0029>WDT:</font> %wdt%
14235+
14236+ <br>
14237+ </td>
14238+ </tr>
14239+ <tr>
14240+ <td fixwidth=5>
14241+ </td>
14242+ <td align=left>
14243+ <font color=ff0029>Total Damage:</font> %totalDmg%
14244+ <br>
14245+ </td>
14246+ <td align=left>
14247+ <font color=ff0029>Total Fights:</font> %totalFights%
14248+ <br>
14249+ </td>
14250+ </tr>
14251+ <tr>
14252+ <td fixwidth=5>
14253+ </td>
14254+ <td align=left>
14255+ <font color=ff0029>Total Kills:</font> %killstotal%
14256+ <br>
14257+ </td>
14258+
14259+ </tr>
14260+</table>
14261+<br>
14262+
14263+
14264+<table width=320 bgcolor=000000>
14265+ <tr>
14266+ <td fixwidth=5>
14267+ </td>
14268+ <td fixwidth=290>
14269+ <font color=LEVEL>Matches (2x2)</font><br>
14270+ </td>
14271+ <tr>
14272+ </tr>
14273+</table>
14274+
14275+<table width=320 bgcolor=000000>
14276+ <tr>
14277+ <td fixwidth=5>
14278+ </td>
14279+ <td align=left>
14280+ <font color=ff0029>Victories:</font> %victoriesF2X2%
14281+ <br>
14282+ </td>
14283+ <td align=left>
14284+ <font color=ff0029>Defeats:</font> %defeatsF2X2%
14285+
14286+ <br>
14287+ </td>
14288+ </tr>
14289+ <tr>
14290+ <td fixwidth=5>
14291+ </td>
14292+ <td align=left>
14293+ <font color=ff0029>Damage (1x1):</font> %damageF2X2%
14294+ <br>
14295+ </td>
14296+ <td align=left>
14297+ <font color=ff0029>Total Fights:</font> %fightsDoneF2X2%
14298+ <br>
14299+ </td>
14300+ </tr>
14301+ <tr>
14302+ <td fixwidth=5>
14303+ </td>
14304+ <td align=left>
14305+ <font color=ff0029>Total Kills:</font> %killstotal%
14306+ <br>
14307+ </td>
14308+
14309+ </tr>
14310+</table>
14311+<br>
14312+
14313+
14314+<table width=300 bgcolor=000000>
14315+<tr>
14316+<td fixwidth=5>
14317+</td>
14318+<td fixwidth=250 align=center>
14319+<font color=LEVEL>Click on Fight to full check</font>
14320+</td>
14321+
14322+</tr>
14323+</table>
14324+<table width=330 bgcolor=000000>
14325+ <tr>
14326+ <td fixwidth=30>
14327+ </td>
14328+ <td>
14329+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
14330+ </td>
14331+ <td>
14332+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
14333+ </td>
14334+ <td>
14335+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
14336+ </td>
14337+ <td>
14338+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
14339+ </td>
14340+ <td>
14341+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
14342+ </td>
14343+ <td>
14344+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
14345+ </td>
14346+ <td fixwidth=30>
14347+ </td>
14348+ </tr>
14349+
14350+
14351+</table>
14352+
14353+
14354+<center>
14355+<a action="bypass bp_showTournamentPage myTour"> Back</a>
14356+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
14357+</center>
14358+
14359+
14360+</body></html>
14361\ No newline at end of file
14362diff --git a/aCis_datapack/data/html/mods/tournament/status/3x3.htm b/aCis_datapack/data/html/mods/tournament/status/3x3.htm
14363new file mode 100644
14364index 0000000..da41c65
14365--- /dev/null
14366+++ b/aCis_datapack/data/html/mods/tournament/status/3x3.htm
14367@@ -0,0 +1,183 @@
14368+<html><title>My Tour</title><body>
14369+
14370+<center>
14371+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
14372+</center>
14373+
14374+<table border="1" width=316 bgcolor="000000">
14375+<tr>
14376+<td width=99 align=center><font color=LEVEL>%playerName%</font>
14377+</td>
14378+</tr>
14379+</table>
14380+<br>
14381+
14382+<table border="0" width="300" bgcolor="000000">
14383+<tr>
14384+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
14385+<td width=99 align=center> <font color=ff0019> 3x3 Details</font></td>
14386+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
14387+</tr>
14388+</table>
14389+<br>
14390+
14391+
14392+<table width=300 height=32 bgcolor=000000>
14393+<tr>
14394+<td fixwidth=5>
14395+</td>
14396+<td fixwidth=250 align=center>
14397+<font color=LEVEL>All statuses below refer to 3x3 mode</font>
14398+</td>
14399+
14400+</tr>
14401+</table>
14402+<br>
14403+
14404+<table width=320 bgcolor=000000>
14405+ <tr>
14406+ <td fixwidth=5>
14407+ </td>
14408+ <td fixwidth=290>
14409+ <font color=LEVEL>General (3x3)</font><br>
14410+ </td>
14411+ </tr>
14412+
14413+</table>
14414+
14415+<table width=320 bgcolor=000000>
14416+ <tr>
14417+ <td fixwidth=5>
14418+ </td>
14419+ <td align=left>
14420+ <font color=ff0029>DPF:</font> %dpfF3X3%
14421+ <br>
14422+ </td>
14423+ <td align=left>
14424+ <font color=ff0029>WDT:</font> %wdt%
14425+
14426+ <br>
14427+ </td>
14428+ </tr>
14429+ <tr>
14430+ <td fixwidth=5>
14431+ </td>
14432+ <td align=left>
14433+ <font color=ff0029>Total Damage:</font> %totalDmg%
14434+ <br>
14435+ </td>
14436+ <td align=left>
14437+ <font color=ff0029>Total Fights:</font> %totalFights%
14438+ <br>
14439+ </td>
14440+ </tr>
14441+ <tr>
14442+ <td fixwidth=5>
14443+ </td>
14444+ <td align=left>
14445+ <font color=ff0029>Total Kills:</font> %killstotal%
14446+ <br>
14447+ </td>
14448+
14449+ </tr>
14450+</table>
14451+<br>
14452+
14453+
14454+<table width=320 bgcolor=000000>
14455+ <tr>
14456+ <td fixwidth=5>
14457+ </td>
14458+ <td fixwidth=290>
14459+ <font color=LEVEL>Matches (3x3)</font><br>
14460+ </td>
14461+ <tr>
14462+ </tr>
14463+</table>
14464+
14465+<table width=320 bgcolor=000000>
14466+ <tr>
14467+ <td fixwidth=5>
14468+ </td>
14469+ <td align=left>
14470+ <font color=ff0029>Victories:</font> %victoriesF3X3%
14471+ <br>
14472+ </td>
14473+ <td align=left>
14474+ <font color=ff0029>Defeats:</font> %defeatsF3X3%
14475+
14476+ <br>
14477+ </td>
14478+ </tr>
14479+ <tr>
14480+ <td fixwidth=5>
14481+ </td>
14482+ <td align=left>
14483+ <font color=ff0029>Damage (3x3):</font> %damageF3X3%
14484+ <br>
14485+ </td>
14486+ <td align=left>
14487+ <font color=ff0029>Total Fights:</font> %fightsDoneF3X3%
14488+ <br>
14489+ </td>
14490+ </tr>
14491+ <tr>
14492+ <td fixwidth=5>
14493+ </td>
14494+ <td align=left>
14495+ <font color=ff0029>Total Kills:</font> %killstotal%
14496+ <br>
14497+ </td>
14498+
14499+ </tr>
14500+</table>
14501+<br>
14502+
14503+
14504+<table width=300 bgcolor=000000>
14505+<tr>
14506+<td fixwidth=5>
14507+</td>
14508+<td fixwidth=250 align=center>
14509+<font color=LEVEL>Click on Fight to full check</font>
14510+</td>
14511+
14512+</tr>
14513+</table>
14514+<table width=330 bgcolor=000000>
14515+ <tr>
14516+ <td fixwidth=30>
14517+ </td>
14518+ <td>
14519+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
14520+ </td>
14521+ <td>
14522+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
14523+ </td>
14524+ <td>
14525+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
14526+ </td>
14527+ <td>
14528+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
14529+ </td>
14530+ <td>
14531+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
14532+ </td>
14533+ <td>
14534+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
14535+ </td>
14536+ <td fixwidth=30>
14537+ </td>
14538+ </tr>
14539+
14540+
14541+</table>
14542+
14543+
14544+<center>
14545+<a action="bypass bp_showTournamentPage myTour"> Back</a>
14546+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
14547+</center>
14548+
14549+
14550+</body></html>
14551\ No newline at end of file
14552diff --git a/aCis_datapack/data/html/mods/tournament/status/4x4.htm b/aCis_datapack/data/html/mods/tournament/status/4x4.htm
14553new file mode 100644
14554index 0000000..9416d63
14555--- /dev/null
14556+++ b/aCis_datapack/data/html/mods/tournament/status/4x4.htm
14557@@ -0,0 +1,183 @@
14558+<html><title>My Tour</title><body>
14559+
14560+<center>
14561+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
14562+</center>
14563+
14564+<table border="1" width=316 bgcolor="000000">
14565+<tr>
14566+<td width=99 align=center><font color=LEVEL>%playerName%</font>
14567+</td>
14568+</tr>
14569+</table>
14570+<br>
14571+
14572+<table border="0" width="300" bgcolor="000000">
14573+<tr>
14574+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
14575+<td width=99 align=center> <font color=ff0019> 4x4 Details</font></td>
14576+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
14577+</tr>
14578+</table>
14579+<br>
14580+
14581+
14582+<table width=300 height=32 bgcolor=000000>
14583+<tr>
14584+<td fixwidth=5>
14585+</td>
14586+<td fixwidth=250 align=center>
14587+<font color=LEVEL>All statuses below refer to 4x4 mode</font>
14588+</td>
14589+
14590+</tr>
14591+</table>
14592+<br>
14593+
14594+<table width=320 bgcolor=000000>
14595+ <tr>
14596+ <td fixwidth=5>
14597+ </td>
14598+ <td fixwidth=290>
14599+ <font color=LEVEL>General (4x4)</font><br>
14600+ </td>
14601+ </tr>
14602+
14603+</table>
14604+
14605+<table width=320 bgcolor=000000>
14606+ <tr>
14607+ <td fixwidth=5>
14608+ </td>
14609+ <td align=left>
14610+ <font color=ff0029>DPF:</font> %dpfF4X4%
14611+ <br>
14612+ </td>
14613+ <td align=left>
14614+ <font color=ff0029>WDT:</font> %wdt%
14615+
14616+ <br>
14617+ </td>
14618+ </tr>
14619+ <tr>
14620+ <td fixwidth=5>
14621+ </td>
14622+ <td align=left>
14623+ <font color=ff0029>Total Damage:</font> %totalDmg%
14624+ <br>
14625+ </td>
14626+ <td align=left>
14627+ <font color=ff0029>Total Fights:</font> %totalFights%
14628+ <br>
14629+ </td>
14630+ </tr>
14631+ <tr>
14632+ <td fixwidth=5>
14633+ </td>
14634+ <td align=left>
14635+ <font color=ff0029>Total Kills:</font> %killstotal%
14636+ <br>
14637+ </td>
14638+
14639+ </tr>
14640+</table>
14641+<br>
14642+
14643+
14644+<table width=320 bgcolor=000000>
14645+ <tr>
14646+ <td fixwidth=5>
14647+ </td>
14648+ <td fixwidth=290>
14649+ <font color=LEVEL>Matches (4x4)</font><br>
14650+ </td>
14651+ <tr>
14652+ </tr>
14653+</table>
14654+
14655+<table width=320 bgcolor=000000>
14656+ <tr>
14657+ <td fixwidth=5>
14658+ </td>
14659+ <td align=left>
14660+ <font color=ff0029>Victories:</font> %victoriesF4X4%
14661+ <br>
14662+ </td>
14663+ <td align=left>
14664+ <font color=ff0029>Defeats:</font> %defeatsF4X4%
14665+
14666+ <br>
14667+ </td>
14668+ </tr>
14669+ <tr>
14670+ <td fixwidth=5>
14671+ </td>
14672+ <td align=left>
14673+ <font color=ff0029>Damage (4x4):</font> %damageF4X4%
14674+ <br>
14675+ </td>
14676+ <td align=left>
14677+ <font color=ff0029>Total Fights:</font> %fightsDoneF4X4%
14678+ <br>
14679+ </td>
14680+ </tr>
14681+ <tr>
14682+ <td fixwidth=5>
14683+ </td>
14684+ <td align=left>
14685+ <font color=ff0029>Total Kills:</font> %killstotal%
14686+ <br>
14687+ </td>
14688+
14689+ </tr>
14690+</table>
14691+<br>
14692+
14693+
14694+<table width=300 bgcolor=000000>
14695+<tr>
14696+<td fixwidth=5>
14697+</td>
14698+<td fixwidth=250 align=center>
14699+<font color=LEVEL>Click on Fight to full check</font>
14700+</td>
14701+
14702+</tr>
14703+</table>
14704+<table width=330 bgcolor=000000>
14705+ <tr>
14706+ <td fixwidth=30>
14707+ </td>
14708+ <td>
14709+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
14710+ </td>
14711+ <td>
14712+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
14713+ </td>
14714+ <td>
14715+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
14716+ </td>
14717+ <td>
14718+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
14719+ </td>
14720+ <td>
14721+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
14722+ </td>
14723+ <td>
14724+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
14725+ </td>
14726+ <td fixwidth=30>
14727+ </td>
14728+ </tr>
14729+
14730+
14731+</table>
14732+
14733+
14734+<center>
14735+<a action="bypass bp_showTournamentPage myTour"> Back</a>
14736+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
14737+</center>
14738+
14739+
14740+</body></html>
14741\ No newline at end of file
14742diff --git a/aCis_datapack/data/html/mods/tournament/status/5x5.htm b/aCis_datapack/data/html/mods/tournament/status/5x5.htm
14743new file mode 100644
14744index 0000000..d525eaf
14745--- /dev/null
14746+++ b/aCis_datapack/data/html/mods/tournament/status/5x5.htm
14747@@ -0,0 +1,183 @@
14748+<html><title>My Tour</title><body>
14749+
14750+<center>
14751+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
14752+</center>
14753+
14754+<table border="1" width=316 bgcolor="000000">
14755+<tr>
14756+<td width=99 align=center><font color=LEVEL>%playerName%</font>
14757+</td>
14758+</tr>
14759+</table>
14760+<br>
14761+
14762+<table border="0" width="300" bgcolor="000000">
14763+<tr>
14764+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
14765+<td width=99 align=center> <font color=ff0019> 5x5 Details</font></td>
14766+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
14767+</tr>
14768+</table>
14769+<br>
14770+
14771+
14772+<table width=300 height=32 bgcolor=000000>
14773+<tr>
14774+<td fixwidth=5>
14775+</td>
14776+<td fixwidth=250 align=center>
14777+<font color=LEVEL>All statuses below refer to 5x5 mode</font>
14778+</td>
14779+
14780+</tr>
14781+</table>
14782+<br>
14783+
14784+<table width=320 bgcolor=000000>
14785+ <tr>
14786+ <td fixwidth=5>
14787+ </td>
14788+ <td fixwidth=290>
14789+ <font color=LEVEL>General (5x5)</font><br>
14790+ </td>
14791+ </tr>
14792+
14793+</table>
14794+
14795+<table width=320 bgcolor=000000>
14796+ <tr>
14797+ <td fixwidth=5>
14798+ </td>
14799+ <td align=left>
14800+ <font color=ff0029>DPF:</font> %dpfF5X5%
14801+ <br>
14802+ </td>
14803+ <td align=left>
14804+ <font color=ff0029>WDT:</font> %wdt%
14805+
14806+ <br>
14807+ </td>
14808+ </tr>
14809+ <tr>
14810+ <td fixwidth=5>
14811+ </td>
14812+ <td align=left>
14813+ <font color=ff0029>Total Damage:</font> %totalDmg%
14814+ <br>
14815+ </td>
14816+ <td align=left>
14817+ <font color=ff0029>Total Fights:</font> %totalFights%
14818+ <br>
14819+ </td>
14820+ </tr>
14821+ <tr>
14822+ <td fixwidth=5>
14823+ </td>
14824+ <td align=left>
14825+ <font color=ff0029>Total Kills:</font> %killstotal%
14826+ <br>
14827+ </td>
14828+
14829+ </tr>
14830+</table>
14831+<br>
14832+
14833+
14834+<table width=320 bgcolor=000000>
14835+ <tr>
14836+ <td fixwidth=5>
14837+ </td>
14838+ <td fixwidth=290>
14839+ <font color=LEVEL>Matches (5x5)</font><br>
14840+ </td>
14841+ <tr>
14842+ </tr>
14843+</table>
14844+
14845+<table width=320 bgcolor=000000>
14846+ <tr>
14847+ <td fixwidth=5>
14848+ </td>
14849+ <td align=left>
14850+ <font color=ff0029>Victories:</font> %victoriesF5X5%
14851+ <br>
14852+ </td>
14853+ <td align=left>
14854+ <font color=ff0029>Defeats:</font> %defeatsF5X5%
14855+
14856+ <br>
14857+ </td>
14858+ </tr>
14859+ <tr>
14860+ <td fixwidth=5>
14861+ </td>
14862+ <td align=left>
14863+ <font color=ff0029>Damage (5x5):</font> %damageF5X5%
14864+ <br>
14865+ </td>
14866+ <td align=left>
14867+ <font color=ff0029>Total Fights:</font> %fightsDoneF5X5%
14868+ <br>
14869+ </td>
14870+ </tr>
14871+ <tr>
14872+ <td fixwidth=5>
14873+ </td>
14874+ <td align=left>
14875+ <font color=ff0029>Total Kills:</font> %killstotal%
14876+ <br>
14877+ </td>
14878+
14879+ </tr>
14880+</table>
14881+<br>
14882+
14883+
14884+<table width=300 bgcolor=000000>
14885+<tr>
14886+<td fixwidth=5>
14887+</td>
14888+<td fixwidth=250 align=center>
14889+<font color=LEVEL>Click on Fight to full check</font>
14890+</td>
14891+
14892+</tr>
14893+</table>
14894+<table width=330 bgcolor=000000>
14895+ <tr>
14896+ <td fixwidth=30>
14897+ </td>
14898+ <td>
14899+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
14900+ </td>
14901+ <td>
14902+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
14903+ </td>
14904+ <td>
14905+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
14906+ </td>
14907+ <td>
14908+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
14909+ </td>
14910+ <td>
14911+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
14912+ </td>
14913+ <td>
14914+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
14915+ </td>
14916+ <td fixwidth=30>
14917+ </td>
14918+ </tr>
14919+
14920+
14921+</table>
14922+
14923+
14924+<center>
14925+<a action="bypass bp_showTournamentPage myTour"> Back</a>
14926+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
14927+</center>
14928+
14929+
14930+</body></html>
14931\ No newline at end of file
14932diff --git a/aCis_datapack/data/html/mods/tournament/status/9x9.htm b/aCis_datapack/data/html/mods/tournament/status/9x9.htm
14933new file mode 100644
14934index 0000000..306ea0c
14935--- /dev/null
14936+++ b/aCis_datapack/data/html/mods/tournament/status/9x9.htm
14937@@ -0,0 +1,180 @@
14938+<html><title>My Tour</title><body>
14939+
14940+
14941+<table border="1" width=316 bgcolor="000000">
14942+<tr>
14943+<td width=99 align=center><font color=LEVEL>%playerName%</font>
14944+</td>
14945+</tr>
14946+</table>
14947+<br>
14948+
14949+<table border="0" width="300" bgcolor="000000">
14950+<tr>
14951+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
14952+<td width=99 align=center> <font color=ff0019> 9x9 Details</font></td>
14953+<td width=99 align=center> <img src="L2UI.bbs_boardmaster" width=16 height=16></td>
14954+</tr>
14955+</table>
14956+<br>
14957+
14958+
14959+<table width=300 height=32 bgcolor=000000>
14960+<tr>
14961+<td fixwidth=5>
14962+</td>
14963+<td fixwidth=250 align=center>
14964+<font color=LEVEL>All statuses below refer to 9x9 mode</font>
14965+</td>
14966+
14967+</tr>
14968+</table>
14969+<br>
14970+
14971+<table width=320 bgcolor=000000>
14972+ <tr>
14973+ <td fixwidth=5>
14974+ </td>
14975+ <td fixwidth=290>
14976+ <font color=LEVEL>General (9x9)</font><br>
14977+ </td>
14978+ </tr>
14979+
14980+</table>
14981+
14982+<table width=320 bgcolor=000000>
14983+ <tr>
14984+ <td fixwidth=5>
14985+ </td>
14986+ <td align=left>
14987+ <font color=ff0029>DPF:</font> %dpfF9X9%
14988+ <br>
14989+ </td>
14990+ <td align=left>
14991+ <font color=ff0029>WDT:</font> %wdt%
14992+
14993+ <br>
14994+ </td>
14995+ </tr>
14996+ <tr>
14997+ <td fixwidth=5>
14998+ </td>
14999+ <td align=left>
15000+ <font color=ff0029>Total Damage:</font> %totalDmg%
15001+ <br>
15002+ </td>
15003+ <td align=left>
15004+ <font color=ff0029>Total Fights:</font> %totalFights%
15005+ <br>
15006+ </td>
15007+ </tr>
15008+ <tr>
15009+ <td fixwidth=5>
15010+ </td>
15011+ <td align=left>
15012+ <font color=ff0029>Total Kills:</font> %killstotal%
15013+ <br>
15014+ </td>
15015+
15016+ </tr>
15017+</table>
15018+<br>
15019+
15020+
15021+<table width=320 bgcolor=000000>
15022+ <tr>
15023+ <td fixwidth=5>
15024+ </td>
15025+ <td fixwidth=290>
15026+ <font color=LEVEL>Matches (9x9)</font><br>
15027+ </td>
15028+ <tr>
15029+ </tr>
15030+</table>
15031+
15032+<table width=320 bgcolor=000000>
15033+ <tr>
15034+ <td fixwidth=5>
15035+ </td>
15036+ <td align=left>
15037+ <font color=ff0029>Victories:</font> %victoriesF9X9%
15038+ <br>
15039+ </td>
15040+ <td align=left>
15041+ <font color=ff0029>Defeats:</font> %defeatsF9X9%
15042+
15043+ <br>
15044+ </td>
15045+ </tr>
15046+ <tr>
15047+ <td fixwidth=5>
15048+ </td>
15049+ <td align=left>
15050+ <font color=ff0029>Damage (9x9):</font> %damageF9X9%
15051+ <br>
15052+ </td>
15053+ <td align=left>
15054+ <font color=ff0029>Total Fights:</font> %fightsDoneF9X9%
15055+ <br>
15056+ </td>
15057+ </tr>
15058+ <tr>
15059+ <td fixwidth=5>
15060+ </td>
15061+ <td align=left>
15062+ <font color=ff0029>Total Kills:</font> %killstotal%
15063+ <br>
15064+ </td>
15065+
15066+ </tr>
15067+</table>
15068+<br>
15069+
15070+
15071+<table width=300 bgcolor=000000>
15072+<tr>
15073+<td fixwidth=5>
15074+</td>
15075+<td fixwidth=250 align=center>
15076+<font color=LEVEL>Click on Fight to full check</font>
15077+</td>
15078+
15079+</tr>
15080+</table>
15081+<table width=330 bgcolor=000000>
15082+ <tr>
15083+ <td fixwidth=30>
15084+ </td>
15085+ <td>
15086+ <a action="bypass bp_showTournamentPage status/1x1"><font color=FF0000>1x1</font></a>
15087+ </td>
15088+ <td>
15089+ <a action="bypass bp_showTournamentPage status/2x2"><font color=FF0000>2x2</font></a>
15090+ </td>
15091+ <td>
15092+ <a action="bypass bp_showTournamentPage status/3x3"><font color=FF0000>3x3</font></a>
15093+ </td>
15094+ <td>
15095+ <a action="bypass bp_showTournamentPage status/4x4"><font color=FF0000>4x4</font></a>
15096+ </td>
15097+ <td>
15098+ <a action="bypass bp_showTournamentPage status/5x5"><font color=FF0000>5x5</font></a>
15099+ </td>
15100+ <td>
15101+ <a action="bypass bp_showTournamentPage status/9x9"><font color=FF0000>9x9</font></a>
15102+ </td>
15103+ <td fixwidth=30>
15104+ </td>
15105+ </tr>
15106+
15107+
15108+</table>
15109+
15110+
15111+<center>
15112+<a action="bypass bp_showTournamentPage myTour"> Back</a>
15113+<img src="l2ui_ch3.herotower_deco" width=256 height=32>
15114+</center>
15115+
15116+
15117+</body></html>