Advertisement
-JRGames-

modificações

Jan 23rd, 2022
1,428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 221.51 KB | None | 0 0
  1. diff --git a/aCis_gameserver/java/net/sf/l2j/Config.java b/aCis_gameserver/java/net/sf/l2j/Config.java
  2. index 093a08d..4ac511a 100644
  3. --- a/aCis_gameserver/java/net/sf/l2j/Config.java
  4. +++ b/aCis_gameserver/java/net/sf/l2j/Config.java
  5. @@ -35,6 +35,7 @@
  6.  import net.sf.l2j.gameserver.geoengine.geodata.GeoFormat;
  7.  import net.sf.l2j.gameserver.model.holder.ItemHolder;
  8.  import net.sf.l2j.gameserver.model.holder.RewardHolder;
  9. +import net.sf.l2j.gameserver.model.holder.RewardHolderNew;
  10.  import net.sf.l2j.gameserver.util.FloodProtectorConfig;
  11.  import net.sf.l2j.util.StringUtil;
  12.  
  13. @@ -600,6 +601,7 @@
  14.     public static int BANKING_SYSTEM_GOLDBARS;
  15.     public static int BANKING_SYSTEM_ADENA;
  16.     public static int BANKING_SYSTEM_GOLDBAR_ID;
  17. +   public static boolean ALLOW_AUTO_GB;
  18.     public static int PVP_POINT_ID;
  19.     public static int PVP_POINT_COUNT;
  20.     public static boolean ALLOW_EVENT_COMMANDS;
  21. @@ -890,8 +892,8 @@
  22.     public static int PARTY_ZONE_RUNNING_TIME;
  23.      public static String PART_ZONE_MONSTERS_EVENT;
  24.      public static List<Integer> PART_ZONE_MONSTERS_EVENT_ID;
  25. -    public static List<RewardHolder> PARTY_ZONE_REWARDS = new ArrayList<>();
  26. -   public static List<RewardHolder> PARTY_ZONE_EVENT_REWARDS = new ArrayList<>();
  27. +    public static List<RewardHolderNew> PARTY_ZONE_REWARDS = new ArrayList<>();
  28. +   public static List<RewardHolderNew> PARTY_ZONE_EVENT_REWARDS = new ArrayList<>();
  29.    
  30.     public static int INSTANCE_FARM_MONSTER_ID;
  31.     public static int ISTANCE_FARM_LOCS_COUNT;
  32. @@ -2148,6 +2150,7 @@
  33.             BANKING_SYSTEM_GOLDBARS = l2jmod.getProperty("BankingGoldbarCount", 1);
  34.             BANKING_SYSTEM_ADENA = l2jmod.getProperty("BankingAdenaCount", 500000000); 
  35.             BANKING_SYSTEM_GOLDBAR_ID = l2jmod.getProperty("BankingGoldbar_Id", 1);
  36. +           ALLOW_AUTO_GB = l2jmod.getProperty("AllowAutoGoldBar", false);
  37.             PVP_POINT_ID = l2jmod.getProperty("ColorCoinID", 57);
  38.             PVP_POINT_COUNT = l2jmod.getProperty("ColorCoinCount", 200);   
  39.             ALLOW_EVENT_COMMANDS = l2jmod.getProperty("AllowEventCommands", false);
  40. @@ -2750,8 +2753,8 @@
  41.             PART_ZONE_MONSTERS_EVENT_ID = new ArrayList<>();
  42.             for(String id : PART_ZONE_MONSTERS_EVENT.split(","))
  43.                 PART_ZONE_MONSTERS_EVENT_ID.add(Integer.parseInt(id));
  44. -           PARTY_ZONE_REWARDS = parseReward(l2jevent, "PartyZoneReward");
  45. -           PARTY_ZONE_EVENT_REWARDS = parseReward(l2jevent, "PartyZoneEventReward");
  46. +           PARTY_ZONE_REWARDS = parseRewardNew(l2jevent, "PartyZoneReward");
  47. +           PARTY_ZONE_EVENT_REWARDS = parseRewardNew(l2jevent, "PartyZoneEventReward");
  48.  
  49.             ALLOW_HIDE_ITEM_EVENT = l2jevent.getProperty("HideEventEnable", false);
  50.             HIDE_ITEM_REWARDS = parseReward(l2jevent, "HideEventRewardList");
  51. @@ -3802,9 +3805,26 @@
  52.         return auxReturn;
  53.     }
  54.    
  55. -   public static ExProperties load(String filename)
  56. +   public static List<RewardHolderNew> parseRewardNew(Properties propertieNew, String configNameNew)
  57.     {
  58. -       return load(new File(filename));
  59. +       List<RewardHolderNew> auxReturnNew = new ArrayList<>();
  60. +      
  61. +       String aux = propertieNew.getProperty(configNameNew).trim();
  62. +       for (String randomRewardNew : aux.split(";"))
  63. +       {
  64. +           final String[] infos = randomRewardNew.split(",");
  65. +          
  66. +           if (infos.length > 3)
  67. +               auxReturnNew.add(new RewardHolderNew(Integer.valueOf(infos[0]), Integer.valueOf(infos[1]), Integer.valueOf(infos[2]), Integer.valueOf(infos[3])));
  68. +           else
  69. +               auxReturnNew.add(new RewardHolderNew(Integer.valueOf(infos[0]), Integer.valueOf(infos[1]), Integer.valueOf(infos[2])));
  70. +       }
  71. +       return auxReturnNew;
  72. +   }
  73. +
  74. +   public static ExProperties load(String filenameNew)
  75. +   {
  76. +       return load(new File(filenameNew));
  77.     }
  78.    
  79.     public static ExProperties load(File file)
  80. diff --git a/aCis_gameserver/java/net/sf/l2j/Team.java b/aCis_gameserver/java/net/sf/l2j/Team.java
  81. index 2d8ea5a..234a560 100644
  82. --- a/aCis_gameserver/java/net/sf/l2j/Team.java
  83. +++ b/aCis_gameserver/java/net/sf/l2j/Team.java
  84. @@ -27,24 +27,22 @@
  85.     public static void info()
  86.     {
  87.         _log.info("                                                                            ");
  88. -       _log.info("                 ___________$$$$$$$$$$$$$$$$$$$$$$$                         ");
  89. -       _log.info("                 ________$$$$___$$$$$$$$$$$$$$$$$$$$$                       ");
  90. -       _log.info("                 ______$$$$______$$$$$$$$$$$$$$$$$$$$$$                     ");
  91. -       _log.info("                 ____$$$$$________$$$$$$$$$$$$$$$$$$$$$$$                   ");
  92. -       _log.info("                 ___$$$$$__________$$$$$$$$$$$$$$$$$$$$$$$                  ");
  93. -       _log.info("                 __$$$$$_____*______$$$$$$$$$$$$$$$$$$$$$$$                 ");
  94. -       _log.info("                 _$$$$$$____________$$$$$$$$$$$$$$$$$$$$$$$$                ");
  95. -       _log.info("                 _$$$$$$___________$$$$$$$$$___________$$$$$$               ");
  96. -       _log.info("                 _$$$$$$$_________$$$_$$$_$$$_________$$$$$$$$              ");
  97. -       _log.info("                 _$$$$$$$$______$$$$___$___$$$$______$$$$$$$$$$             ");
  98. -       _log.info("                 _$$$$$$$$$$$$$$$$$___$$$___$$$$$$$$$$$$$$$$$$$             ");
  99. -       _log.info("                                                                            ");
  100. -       _log.info("                             -= Rev Base: aCis =-                           ");
  101. -       _log.info("          -= Essa rev foi customizada e editada por Oseias Garcez  =-       ");
  102. -       _log.info("              -= Facebook para contato: fb.com/oseias.trooper =-            ");
  103. -       _log.info("                          ---------------------------                       ");
  104. -       _log.info("                -= Essa Revisao Pertence a Ferx Zajaicikysky =-             ");
  105. -       _log.info("                                                                            ");
  106. +        _log.info("                 ___________$$$$$$$$$$$$$$$$$$$$$$$                         ");
  107. +        _log.info("                 ________$$$$___$$$$$$$$$$$$$$$$$$$$$                       ");
  108. +        _log.info("                 ______$$$$______$$$$$$$$$$$$$$$$$$$$$$                     ");
  109. +        _log.info("                 ____$$$$$________$$$$$$$$$$$$$$$$$$$$$$$                   ");
  110. +        _log.info("                 ___$$$$$__________$$$$$$$$$$$$$$$$$$$$$$$                  ");
  111. +        _log.info("                 __$$$$$_____*______$$$$$$$$$$$$$$$$$$$$$$$                 ");
  112. +        _log.info("                 _$$$$$$____________$$$$$$$$$$$$$$$$$$$$$$$$                ");
  113. +        _log.info("                 _$$$$$$___________$$$$$$$$$___________$$$$$$               ");
  114. +        _log.info("                 _$$$$$$$_________$$$_$$$_$$$_________$$$$$$$$              ");
  115. +        _log.info("                 _$$$$$$$$______$$$$___$___$$$$______$$$$$$$$$$             ");
  116. +        _log.info("                 _$$$$$$$$$$$$$$$$$___$$$___$$$$$$$$$$$$$$$$$$$             ");
  117. +        _log.info("                                                                            ");
  118. +        _log.info("                             -= Rev Base: aCis =-                           ");
  119. +        _log.info("                          ---------------------------                       ");
  120. +        _log.info("               -= Essa Revisao Pertence a Jhonata TioPatinhaS =-            ");
  121. +       _log.info("                                                                            ");
  122.  
  123.     }
  124.  }
  125. \ No newline at end of file
  126. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/datatables/MapRegionTable.java b/aCis_gameserver/java/net/sf/l2j/gameserver/datatables/MapRegionTable.java
  127. index d916e1d..49ebec6 100644
  128. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/datatables/MapRegionTable.java
  129. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/datatables/MapRegionTable.java
  130. @@ -38,6 +38,7 @@
  131.  import net.sf.l2j.gameserver.model.zone.type.L2AutoPvpZone;
  132.  import net.sf.l2j.gameserver.model.zone.type.L2ChaoticFreeZone;
  133.  import net.sf.l2j.gameserver.model.zone.type.L2ClanHallZone;
  134. +import net.sf.l2j.gameserver.model.zone.type.L2FarmZone;
  135.  import net.sf.l2j.gameserver.model.zone.type.L2ChaoticSelfZone;
  136.  import net.sf.l2j.gameserver.model.zone.type.L2NoZergZone;
  137.  import net.sf.l2j.gameserver.model.zone.type.L2PartyFarmZone;
  138. @@ -369,6 +370,11 @@
  139.             if (flag != null)
  140.                 return flag.getSpawnLoc();
  141.            
  142. +           // Checking if in Farm Zone
  143. +           L2FarmZone farm = ZoneManager.getFarm(player);
  144. +           if (farm != null)
  145. +               return farm.getSpawnLoc();
  146. +
  147.             L2AutoPvpZone pvpzone = ZoneManager.getAutoPvpZone(player);
  148.             if (PvPZoneConfig.PVP_ZONE_EVENT_ENABLED && pvpzone != null)
  149.                 return PvPZone.getInstance().zoneWins.getSpawnLoc();
  150. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/datatables/MultisellData.java b/aCis_gameserver/java/net/sf/l2j/gameserver/datatables/MultisellData.java
  151. index 3942b6f..d139c4a 100644
  152. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/datatables/MultisellData.java
  153. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/datatables/MultisellData.java
  154. @@ -219,6 +219,9 @@
  155.    
  156.     public void separateAndSend(String listName, L2PcInstance player, boolean inventoryOnly, double taxRate)
  157.     {
  158. +       if (player.isGM())
  159. +           player.sendMessage("Multisell File: " + listName);
  160. +      
  161.         final ListContainer list = generateMultiSell(listName, inventoryOnly, player, taxRate);
  162.        
  163.         ListContainer temp = new ListContainer();
  164. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java
  165. index ae1b3da..2ab8ec3 100644
  166. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java
  167. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java
  168. @@ -45,6 +45,7 @@
  169.  import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminFakePlayers;
  170.  import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminFence;
  171.  import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminGeodata;
  172. +import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminGiran;
  173.  import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminGm;
  174.  import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminGmChat;
  175.  import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminHeal;
  176. @@ -85,6 +86,7 @@
  177.  import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminUnblockIp;
  178.  import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminVip;
  179.  import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminZone;
  180. +import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminZoneCreation;
  181.  
  182.  public class AdminCommandHandler
  183.  {
  184. @@ -166,6 +168,8 @@
  185.         registerAdminCommandHandler(new AdminVip());
  186.         registerAdminCommandHandler(new AdminZone());
  187.         registerAdminCommandHandler(new AdminLocationGenerator());
  188. +       registerAdminCommandHandler(new AdminGiran());
  189. +       registerAdminCommandHandler(new AdminZoneCreation());
  190.     }
  191.    
  192.     public void registerAdminCommandHandler(IAdminCommandHandler handler)
  193. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java
  194. index 2120cb7..72ea024 100644
  195. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java
  196. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java
  197. @@ -18,6 +18,7 @@
  198.  import java.util.Map;
  199.  
  200.  import net.sf.l2j.Config;
  201. +import net.sf.l2j.gameserver.handler.voicedcommandhandlers.VoicedAutoGB;
  202.  import net.sf.l2j.gameserver.handler.voicedcommandhandlers.VoicedBanking;
  203.  import net.sf.l2j.gameserver.handler.voicedcommandhandlers.VoicedBossSpawn;
  204.  import net.sf.l2j.gameserver.handler.voicedcommandhandlers.VoicedCastles;
  205. @@ -63,7 +64,9 @@
  206.             registerHandler(new VoicedSecurity());
  207.             registerHandler(new RewardVote());
  208.         }
  209. -      
  210. +       if (Config.ALLOW_AUTO_GB)
  211. +            registerHandler(new VoicedAutoGB());
  212. +      
  213.         if (Config.ALLOW_EVENT_COMMANDS)
  214.             registerHandler(new VoicedEvent());
  215.  
  216. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminGiran.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminGiran.java
  217. new file mode 100644
  218. index 0000000..3e45867
  219. --- /dev/null
  220. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminGiran.java
  221. @@ -0,0 +1,52 @@
  222. +package net.sf.l2j.gameserver.handler.admincommandhandlers;
  223. +
  224. +import java.util.logging.Logger;
  225. +
  226. +import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
  227. +import net.sf.l2j.gameserver.model.L2Object;
  228. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  229. +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
  230. +
  231. +public class AdminGiran implements IAdminCommandHandler
  232. +{
  233. +   private static final String[] ADMIN_COMMANDS =
  234. +   {
  235. +       "admin_giran"
  236. +   };
  237. +  
  238. +   protected static final Logger _log = Logger.getLogger(AdminGiran.class.getName());
  239. +  
  240. +   @Override
  241. +   public boolean useAdminCommand(String command, L2PcInstance activeChar)
  242. +   {
  243. +       if ((activeChar.getTarget() == null))
  244. +       {
  245. +           activeChar.sendMessage("Select a target");
  246. +           return false;
  247. +       }
  248. +      
  249. +       L2Object target = activeChar.getTarget();
  250. +      
  251. +       if (!(target instanceof L2PcInstance))
  252. +       {
  253. +           activeChar.sendMessage("Target need to be player");
  254. +           return false;
  255. +       }
  256. +      
  257. +       L2PcInstance player = activeChar.getTarget().getActingPlayer();
  258. +      
  259. +       if (command.equals("admin_giran"))
  260. +       {
  261. +           player.teleToLocation(82840, 147996, -3469, 50); // Giran
  262. +           activeChar.sendMessage("The Player " + player.getName() + " Went Teleport to Giran.");
  263. +               activeChar.sendPacket(new ExShowScreenMessage("The Player " + player.getName() + " Went Teleport to Giran.", 6 * 1000));
  264. +         }
  265. +       return false;
  266. +   }
  267. +  
  268. +   @Override
  269. +   public String[] getAdminCommandList()
  270. +   {
  271. +       return ADMIN_COMMANDS;
  272. +   }
  273. +}
  274. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminZoneCreation.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminZoneCreation.java
  275. new file mode 100644
  276. index 0000000..6bb7d90
  277. --- /dev/null
  278. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminZoneCreation.java
  279. @@ -0,0 +1,322 @@
  280. +package net.sf.l2j.gameserver.handler.admincommandhandlers;
  281. +
  282. +import java.io.BufferedWriter;
  283. +import java.io.File;
  284. +import java.io.FileWriter;
  285. +import java.io.IOException;
  286. +import java.text.SimpleDateFormat;
  287. +import java.util.ArrayList;
  288. +import java.util.Date;
  289. +import java.util.List;
  290. +import java.util.StringTokenizer;
  291. +
  292. +import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
  293. +import net.sf.l2j.gameserver.model.Location;
  294. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  295. +import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
  296. +
  297. +/**
  298. + * @author melron
  299. + */
  300. +public class AdminZoneCreation implements IAdminCommandHandler
  301. +{
  302. +   private static final List<Location> savedLocs = new ArrayList<>();
  303. +   private static final String fileName = "coordinates" + "%s" + ".xml";
  304. +   private static ZoneShape shape = ZoneShape.NONE;
  305. +   private static final int zDifference = 1000;
  306. +   private static final String maxLocs = "You have reached the maximum locations for this shape.";
  307. +   private static int radius = 0;
  308. +  
  309. +   private static enum ZoneShape
  310. +   {
  311. +       NONE,
  312. +       NPoly,
  313. +       Cuboid,
  314. +       Cylinder
  315. +   }
  316. +  
  317. +   private static final String[] ADMIN_COMMANDS =
  318. +   {
  319. +       "admin_create_zone",
  320. +       "admin_setType",
  321. +       "admin_setRad",
  322. +       "admin_saveLoc",
  323. +       "admin_reset",
  324. +       "admin_removeLoc",
  325. +       "admin_storeLocs",
  326. +   };
  327. +  
  328. +   @Override
  329. +   public boolean useAdminCommand(String command, L2PcInstance activeChar)
  330. +   {
  331. +       final StringTokenizer st = new StringTokenizer(command);
  332. +       st.nextToken();
  333. +       if (command.startsWith("admin_create_zone"))
  334. +           openHtml(activeChar);
  335. +       else if (command.startsWith("admin_setType"))
  336. +       {
  337. +           clear();
  338. +           shape = ZoneShape.valueOf(st.nextToken());
  339. +           switch (shape)
  340. +           {
  341. +               case NPoly:
  342. +                   activeChar.sendMessage("You can add unlimited but atleast 3 coordinates in this shape.");
  343. +                   break;
  344. +               case Cuboid:
  345. +                   activeChar.sendMessage("You must add 2 coordinates (in order to make a square) in this shape.");
  346. +                   break;
  347. +               case Cylinder:
  348. +                   activeChar.sendMessage("You must add 1 coordinates and radius (in order to make a circle) in this shape.");
  349. +                   break;
  350. +               default:
  351. +                   activeChar.sendMessage("You have to select the zone shape first.");
  352. +           }
  353. +           openHtml(activeChar);
  354. +       }
  355. +       else if (command.startsWith("admin_saveLoc"))
  356. +       {
  357. +           if (canSaveLoc(activeChar))
  358. +           {
  359. +               final Location loc = new Location(activeChar.getX(), activeChar.getY(), activeChar.getZ());
  360. +               if (savedLocs.add(loc))
  361. +                   activeChar.sendMessage(loc + " saved..");
  362. +           }
  363. +           openHtml(activeChar);
  364. +       }
  365. +       else if (command.startsWith("admin_reset"))
  366. +       {
  367. +           clear();
  368. +           activeChar.sendMessage("Reset completed.");
  369. +           openHtml(activeChar);
  370. +       }
  371. +       else if (command.startsWith("admin_removeLoc"))
  372. +       {
  373. +           if (savedLocs.size() > 0)
  374. +               activeChar.sendMessage(savedLocs.remove(savedLocs.size() - 1) + " removed.");
  375. +           openHtml(activeChar);
  376. +       }
  377. +       else if (command.startsWith("admin_storeLocs"))
  378. +       {
  379. +           if (savedLocs.isEmpty())
  380. +           {
  381. +               activeChar.sendMessage("Empty locs..");
  382. +               return false;
  383. +           }
  384. +           store(activeChar);
  385. +       }
  386. +       else if (command.startsWith("admin_setRad"))
  387. +       {
  388. +           if (!st.hasMoreTokens() || !setRadius(parseInt(st.nextToken())))
  389. +               activeChar.sendMessage("Invalid value or shape.");
  390. +           else
  391. +               activeChar.sendMessage("Radius stored.");
  392. +          
  393. +           openHtml(activeChar);
  394. +       }
  395. +       return true;
  396. +   }
  397. +  
  398. +   private static int calcZ(boolean minZ)
  399. +   {
  400. +       return (savedLocs.stream().mapToInt(loc -> loc.getZ()).sum() / savedLocs.size()) + (minZ ? -zDifference : zDifference);
  401. +   }
  402. +  
  403. +   private static int parseInt(String nextToken)
  404. +   {
  405. +       try
  406. +       {
  407. +           return Integer.parseInt(nextToken);
  408. +       }
  409. +       catch (NumberFormatException e)
  410. +       {
  411. +           return 0;
  412. +       }
  413. +   }
  414. +  
  415. +   private static void store(L2PcInstance gm)
  416. +   {
  417. +       if (!canStoreLocs(gm))
  418. +           return;
  419. +       final String fName = String.format(fileName, "_" + shape.name() + "_" + getTimeStamp());
  420. +       String filePath = "";
  421. +       try (BufferedWriter writer = new BufferedWriter(new FileWriter(fName)))
  422. +       {
  423. +           final File file = new File(fName);
  424. +           filePath = file.getAbsolutePath().replaceAll("\\\\", "/");
  425. +           writer.write(getHeadLine());
  426. +           for (Location loc : savedLocs)
  427. +               writer.write(String.format("\t<node X=\"%s\" Y=\"%s\" />\r\n", loc.getX(), loc.getY()));
  428. +          
  429. +           writer.write("</zone>");
  430. +       }
  431. +       catch (IOException e)
  432. +       {
  433. +           gm.sendMessage(String.format("Couldn't store coordinates in %s file.", fName));
  434. +           e.printStackTrace();
  435. +       }
  436. +       gm.sendMessage("Coordinates has been successfully stored at " + filePath);
  437. +       clear();
  438. +       openHtml(gm);
  439. +   }
  440. +  
  441. +   private static String getTimeStamp()
  442. +   {
  443. +       return new SimpleDateFormat("hh-mm-ss").format(new Date());
  444. +   }
  445. +  
  446. +   private static boolean canStoreLocs(L2PcInstance gm)
  447. +   {
  448. +       switch (shape)
  449. +       {
  450. +           case NPoly:
  451. +               if (savedLocs.size() < 3)
  452. +               {
  453. +                   gm.sendMessage("You have to set atleast 3 coordinates!");
  454. +                   return false;
  455. +               }
  456. +               return true;
  457. +           case Cuboid:
  458. +               if (savedLocs.size() != 2)
  459. +               {
  460. +                   gm.sendMessage("You have to set 2 coordinates.");
  461. +                   return false;
  462. +               }
  463. +               return true;
  464. +           case Cylinder:
  465. +               if (savedLocs.size() != 1)
  466. +               {
  467. +                   gm.sendMessage("Only 1 location required for this shape.");
  468. +                   return false;
  469. +               }
  470. +               return true;
  471. +           default:
  472. +               gm.sendMessage("You have to select the zone shape first.");
  473. +               return false;
  474. +       }
  475. +   }
  476. +  
  477. +   private static boolean canSaveLoc(L2PcInstance activeChar)
  478. +   {
  479. +       switch (shape)
  480. +       {
  481. +           case NPoly:
  482. +               return true; // unlimited locs can be added
  483. +           case Cuboid:
  484. +               if (savedLocs.size() >= 2)
  485. +               {
  486. +                   activeChar.sendMessage(maxLocs);
  487. +                   return false;
  488. +               }
  489. +               return true;
  490. +           case Cylinder:
  491. +               if (savedLocs.size() >= 1)
  492. +               {
  493. +                   activeChar.sendMessage("Only 1 locations required for this shape.");
  494. +                   return false;
  495. +               }
  496. +               return true;
  497. +           default:
  498. +               activeChar.sendMessage("You have to select the zone shape first.");
  499. +               return false;
  500. +       }
  501. +   }
  502. +  
  503. +   private static String getHeadLine()
  504. +   {
  505. +       switch (shape)
  506. +       {
  507. +           case NPoly:
  508. +               return String.format("<zone shape='NPoly' minZ='%s' maxZ='%s'>\r\n", calcZ(true), calcZ(false));
  509. +           case Cuboid:
  510. +               return String.format("<zone shape='Cuboid' minZ='%s' maxZ='%s'>\r\n", calcZ(true), calcZ(false));
  511. +           case Cylinder:
  512. +               return String.format("<zone shape='Cylinder' minZ='%s' maxZ='%s' rad='%s'>\r\n", calcZ(true), calcZ(false), getRad());
  513. +           default:
  514. +               return "";
  515. +       }
  516. +   }
  517. +  
  518. +   private static boolean setRadius(int val)
  519. +   {
  520. +       if (shape == ZoneShape.Cylinder)
  521. +       {
  522. +           if (val == 0)
  523. +               return false;
  524. +           radius = val;
  525. +       }
  526. +      
  527. +       return shape == ZoneShape.Cylinder;
  528. +   }
  529. +  
  530. +   private static int getRad()
  531. +   {
  532. +       return radius;
  533. +   }
  534. +  
  535. +   private static void openHtml(L2PcInstance activeChar)
  536. +   {
  537. +       final NpcHtmlMessage html = new NpcHtmlMessage(0);
  538. +       html.setFile("data/html/admin/zone_create.htm");
  539. +       switch (shape)
  540. +       {
  541. +           case NONE:
  542. +               html.replace("%zoneShape%", "Empty");
  543. +               html.replace("%locsSize%", "Locations Saved: Null");
  544. +               html.replace("%proceed%", "");
  545. +               html.replace("%undo%", savedLocs.size() > 0 ? "<button value=\"Undo\" action=\"bypass admin_removeLoc\" back=\"l2ui_ch3.smallbutton2_down\" width=65 height=20 fore=\"l2ui_ch3.smallbutton2\">" : "");
  546. +               html.replace("%dist%", "");
  547. +               break;
  548. +           case NPoly:
  549. +               html.replace("%zoneShape%", shape.name());
  550. +               html.replace("%locsSize%", "Locations Saved: " + savedLocs.size());
  551. +               html.replace("%proceed%", savedLocs.size() > 2 ? "<button value=\"Save\" action=\"bypass admin_storeLocs\" back=\"l2ui_ch3.smallbutton2_down\" width=65 height=20 fore=\"l2ui_ch3.smallbutton2\">" : "");
  552. +               html.replace("%undo%", savedLocs.size() > 0 ? "<button value=\"Undo\" action=\"bypass admin_removeLoc\" back=\"l2ui_ch3.smallbutton2_down\" width=65 height=20 fore=\"l2ui_ch3.smallbutton2\">" : "");
  553. +               html.replace("%dist%", "");
  554. +               break;
  555. +           case Cuboid:
  556. +               html.replace("%zoneShape%", shape.name());
  557. +               html.replace("%locsSize%", "Locations Saved: " + savedLocs.size());
  558. +               html.replace("%proceed%", savedLocs.size() == 2 ? "<button value=\"Save\" action=\"bypass admin_storeLocs\" back=\"l2ui_ch3.smallbutton2_down\" width=65 height=20 fore=\"l2ui_ch3.smallbutton2\">" : "");
  559. +               html.replace("%undo%", savedLocs.size() > 0 ? "<button value=\"Undo\" action=\"bypass admin_removeLoc\" back=\"l2ui_ch3.smallbutton2_down\" width=65 height=20 fore=\"l2ui_ch3.smallbutton2\">" : "");
  560. +               html.replace("%dist%", "");
  561. +               break;
  562. +           case Cylinder:
  563. +               html.replace("%zoneShape%", shape.name());
  564. +               html.replace("%locsSize%", "Locations Saved: " + savedLocs.size());
  565. +               html.replace("%undo%", savedLocs.size() == 1 ? "<button value=\"Undo\" action=\"bypass admin_removeLoc\" back=\"l2ui_ch3.smallbutton2_down\" width=65 height=20 fore=\"l2ui_ch3.smallbutton2\">" : "");
  566. +               if (savedLocs.size() == 1)
  567. +               {
  568. +                   if (radius == 0)
  569. +                   {
  570. +                       html.replace("%proceed%", "");
  571. +                       html.replace("%dist%", "Set the radius: <edit var=\"Radius\" width=110 height=15> <button value=\"Save\" action=\"bypass admin_setRad $Radius\" back=\"l2ui_ch3.smallbutton2_down\" width=65 height=20 fore=\"l2ui_ch3.smallbutton2\">");
  572. +                   }
  573. +                   else
  574. +                   {
  575. +                       html.replace("%proceed%", "<button value=\"Save\" action=\"bypass admin_storeLocs\" back=\"l2ui_ch3.smallbutton2_down\" width=65 height=20 fore=\"l2ui_ch3.smallbutton2\">");
  576. +                       html.replace("%dist%", "");
  577. +                   }
  578. +               }
  579. +               else
  580. +               {
  581. +                   html.replace("%proceed%", "");
  582. +                   html.replace("%dist%", "");
  583. +               }
  584. +               break;
  585. +       }
  586. +       activeChar.sendPacket(html);
  587. +   }
  588. +  
  589. +   private static void clear()
  590. +   {
  591. +       shape = ZoneShape.NONE;
  592. +       savedLocs.clear();
  593. +       radius = 0;
  594. +   }
  595. +  
  596. +   @Override
  597. +   public String[] getAdminCommandList()
  598. +   {
  599. +       return ADMIN_COMMANDS;
  600. +   }
  601. +}
  602. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/custom/special/ItemSkins.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/custom/special/ItemSkins.java
  603. index 5b053f0..6f666ce 100644
  604. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/custom/special/ItemSkins.java
  605. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/custom/special/ItemSkins.java
  606. @@ -23,671 +23,384 @@
  607.  
  608.  public class ItemSkins implements IItemHandler
  609.  {
  610. -   @Override
  611. -   public void useItem(L2Playable playable, ItemInstance item, boolean forceUse)
  612. -   {
  613. -       if (!(playable instanceof L2PcInstance))
  614. -           return;
  615. -
  616. -       L2PcInstance activeChar = (L2PcInstance) playable;
  617. -
  618. -       int itemId = item.getItemId();
  619. -
  620. -       if (itemId == 30000) // Dark
  621. -       {
  622. -           if (activeChar.getDressMeData() == null)
  623. -           {
  624. -               DressMeData dmd = new DressMeData();
  625. -               activeChar.setDressMeData(dmd);
  626. -           }
  627. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  628. -
  629. -           activeChar.setDressMeHelmEnabled(true);
  630. -           activeChar.setDressMeEnabled(true);
  631. -
  632. -           activeChar.getDressMeData().setChestId(26103);
  633. -           activeChar.getDressMeData().setHairId(26108);
  634. -
  635. -           activeChar.broadcastUserInfo();
  636. -       }
  637. -      
  638. -       if (itemId == 30001) // Light
  639. -       {
  640. -           if (activeChar.getDressMeData() == null)
  641. -           {
  642. -               DressMeData dmd = new DressMeData();
  643. -               activeChar.setDressMeData(dmd);
  644. -           }
  645. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  646. -
  647. -           activeChar.setDressMeHelmEnabled(true);
  648. -           activeChar.setDressMeEnabled(true);
  649. -
  650. -           activeChar.getDressMeData().setChestId(26102);
  651. -           activeChar.getDressMeData().setHairId(26107);
  652. -
  653. -           activeChar.broadcastUserInfo();
  654. -       }
  655. -      
  656. -       if (itemId == 30002) // Pirate
  657. -       {
  658. -           if (activeChar.getDressMeData() == null)
  659. -           {
  660. -               DressMeData dmd = new DressMeData();
  661. -               activeChar.setDressMeData(dmd);
  662. -           }
  663. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  664. -
  665. -           activeChar.setDressMeHelmEnabled(true);
  666. -           activeChar.setDressMeEnabled(true);
  667. -
  668. -           activeChar.getDressMeData().setChestId(9961);
  669. -           activeChar.getDressMeData().setLegsId(9962);
  670. -           activeChar.getDressMeData().setGlovesId(9963);
  671. -           activeChar.getDressMeData().setBootsId(9964);
  672. -           activeChar.getDressMeData().setHairId(9960);
  673. -
  674. -           activeChar.broadcastUserInfo();
  675. -       }
  676. -
  677. -       if (itemId == 30003) // Muskeeter
  678. -       {
  679. -           if (activeChar.getDressMeData() == null)
  680. -           {
  681. -               DressMeData dmd = new DressMeData();
  682. -               activeChar.setDressMeData(dmd);
  683. -           }
  684. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  685. -
  686. -           activeChar.setDressMeHelmEnabled(true);
  687. -           activeChar.setDressMeEnabled(true);
  688. -
  689. -           activeChar.getDressMeData().setChestId(9965);
  690. -           activeChar.getDressMeData().setHairId(9966);
  691. -
  692. -           activeChar.broadcastUserInfo();
  693. -       }
  694. -      
  695. -       if (itemId == 30004) // Wizard
  696. -       {
  697. -           if (activeChar.getDressMeData() == null)
  698. -           {
  699. -               DressMeData dmd = new DressMeData();
  700. -               activeChar.setDressMeData(dmd);
  701. -           }
  702. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  703. -
  704. -           activeChar.setDressMeHelmEnabled(true);
  705. -           activeChar.setDressMeEnabled(true);
  706. -
  707. -           activeChar.getDressMeData().setChestId(9967);
  708. -           activeChar.getDressMeData().setHairId(9968);
  709. -
  710. -           activeChar.broadcastUserInfo();
  711. -       }
  712. -      
  713. -       if (itemId == 30005) // Archer
  714. -       {
  715. -           if (activeChar.getDressMeData() == null)
  716. -           {
  717. -               DressMeData dmd = new DressMeData();
  718. -               activeChar.setDressMeData(dmd);
  719. -           }
  720. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  721. -
  722. -           activeChar.setDressMeHelmEnabled(true);
  723. -           activeChar.setDressMeEnabled(true);
  724. -
  725. -           activeChar.getDressMeData().setChestId(26100);
  726. -           activeChar.getDressMeData().setHairId(26105);
  727. -
  728. -           activeChar.broadcastUserInfo();
  729. -       }
  730. -      
  731. -       if (itemId == 30006) // Ninja
  732. -       {
  733. -           if (activeChar.getDressMeData() == null)
  734. -           {
  735. -               DressMeData dmd = new DressMeData();
  736. -               activeChar.setDressMeData(dmd);
  737. -           }
  738. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  739. -
  740. -           activeChar.setDressMeHelmEnabled(true);
  741. -           activeChar.setDressMeEnabled(true);
  742. -
  743. -           activeChar.getDressMeData().setChestId(26101);
  744. -           activeChar.getDressMeData().setHairId(26106);
  745. -
  746. -           activeChar.broadcastUserInfo();
  747. -       }
  748. -      
  749. -       if (itemId == 30007) // Beleth
  750. -       {
  751. -           if (activeChar.getDressMeData() == null)
  752. -           {
  753. -               DressMeData dmd = new DressMeData();
  754. -               activeChar.setDressMeData(dmd);
  755. -           }
  756. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  757. -
  758. -           activeChar.setDressMeHelmEnabled(true);
  759. -           activeChar.setDressMeEnabled(true);
  760. -
  761. -           activeChar.getDressMeData().setChestId(26104);
  762. -           activeChar.getDressMeData().setHairId(26109);
  763. -
  764. -           activeChar.broadcastUserInfo();
  765. -       }
  766. -      
  767. -       if (itemId == 30008) // Knight
  768. -       {
  769. -           if (activeChar.getDressMeData() == null)
  770. -           {
  771. -               DressMeData dmd = new DressMeData();
  772. -               activeChar.setDressMeData(dmd);
  773. -           }
  774. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  775. -
  776. -           activeChar.setDressMeHelmEnabled(true);
  777. -           activeChar.setDressMeEnabled(true);
  778. -
  779. -           activeChar.getDressMeData().setChestId(26110);
  780. -           activeChar.getDressMeData().setHairId(26111);
  781. -
  782. -           activeChar.broadcastUserInfo();
  783. -       }
  784. -      
  785. -       if (itemId == 30009) // Healer
  786. -       {
  787. -           if (activeChar.getDressMeData() == null)
  788. -           {
  789. -               DressMeData dmd = new DressMeData();
  790. -               activeChar.setDressMeData(dmd);
  791. -           }
  792. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  793. -
  794. -           activeChar.setDressMeHelmEnabled(true);
  795. -           activeChar.setDressMeEnabled(true);
  796. -
  797. -           activeChar.getDressMeData().setChestId(26112);
  798. -           activeChar.getDressMeData().setHairId(26113);
  799. -
  800. -           activeChar.broadcastUserInfo();
  801. -       }
  802. -      
  803. -       if (itemId == 30010) // Lilith
  804. -       {
  805. -           if (activeChar.getDressMeData() == null)
  806. -           {
  807. -               DressMeData dmd = new DressMeData();
  808. -               activeChar.setDressMeData(dmd);
  809. -           }
  810. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  811. -
  812. -           activeChar.setDressMeHelmEnabled(true);
  813. -           activeChar.setDressMeEnabled(true);
  814. -
  815. -           activeChar.getDressMeData().setChestId(26114);
  816. -           activeChar.getDressMeData().setHairId(26115);
  817. -
  818. -           activeChar.broadcastUserInfo();
  819. -       }
  820. -      
  821. -       if (itemId == 30011) // Royal Archer
  822. -       {
  823. -           if (activeChar.getDressMeData() == null)
  824. -           {
  825. -               DressMeData dmd = new DressMeData();
  826. -               activeChar.setDressMeData(dmd);
  827. -           }
  828. -          
  829. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  830. -
  831. -           activeChar.setDressMeHelmEnabled(true);
  832. -           activeChar.setDressMeEnabled(true);
  833. -
  834. -           activeChar.getDressMeData().setChestId(45002);
  835. -           activeChar.getDressMeData().setHairId(45003);
  836. -
  837. -           activeChar.broadcastUserInfo();
  838. -       }
  839. -      
  840. -       if (itemId == 30012) // Royal Muskeeter
  841. -       {
  842. -           if (activeChar.getDressMeData() == null)
  843. -           {
  844. -               DressMeData dmd = new DressMeData();
  845. -               activeChar.setDressMeData(dmd);
  846. -           }
  847. -          
  848. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  849. -
  850. -           activeChar.setDressMeHelmEnabled(true);
  851. -           activeChar.setDressMeEnabled(true);
  852. -
  853. -           activeChar.getDressMeData().setChestId(45008);
  854. -           activeChar.getDressMeData().setHairId(45009);
  855. -
  856. -           activeChar.broadcastUserInfo();
  857. -       }
  858. -      
  859. -       if (itemId == 30013) // Warrior
  860. -       {
  861. -           if (activeChar.getDressMeData() == null)
  862. -           {
  863. -               DressMeData dmd = new DressMeData();
  864. -               activeChar.setDressMeData(dmd);
  865. -           }
  866. -          
  867. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  868. -
  869. -           activeChar.setDressMeHelmEnabled(true);
  870. -           activeChar.setDressMeEnabled(true);
  871. -
  872. -           activeChar.getDressMeData().setChestId(45014);
  873. -           activeChar.getDressMeData().setHairId(45015);
  874. -
  875. -           activeChar.broadcastUserInfo();
  876. -       }
  877. -      
  878. -       if (itemId == 30014) // Cat
  879. -       {
  880. -           if (activeChar.getDressMeData() == null)
  881. -           {
  882. -               DressMeData dmd = new DressMeData();
  883. -               activeChar.setDressMeData(dmd);
  884. -           }
  885. -          
  886. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  887. -
  888. -           activeChar.setDressMeHelmEnabled(true);
  889. -           activeChar.setDressMeEnabled(true);
  890. -
  891. -           activeChar.getDressMeData().setChestId(45016);
  892. -           activeChar.getDressMeData().setHairId(45017);
  893. -
  894. -           activeChar.broadcastUserInfo();
  895. -       }
  896. -      
  897. -       if (itemId == 30015) // Red King
  898. -       {
  899. -           if (activeChar.getDressMeData() == null)
  900. -           {
  901. -               DressMeData dmd = new DressMeData();
  902. -               activeChar.setDressMeData(dmd);
  903. -           }
  904. -          
  905. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  906. -
  907. -           activeChar.setDressMeHelmEnabled(true);
  908. -           activeChar.setDressMeEnabled(true);
  909. -
  910. -           activeChar.getDressMeData().setChestId(45018);
  911. -           activeChar.getDressMeData().setHairId(45019);
  912. -
  913. -           activeChar.broadcastUserInfo();
  914. -       }
  915. -      
  916. -       if (itemId == 30016) // Red King
  917. -       {
  918. -           if (activeChar.getDressMeData() == null)
  919. -           {
  920. -               DressMeData dmd = new DressMeData();
  921. -               activeChar.setDressMeData(dmd);
  922. -           }
  923. -          
  924. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  925. -
  926. -           activeChar.setDressMeHelmEnabled(true);
  927. -           activeChar.setDressMeEnabled(true);
  928. -
  929. -           activeChar.getDressMeData().setChestId(45020);
  930. -           activeChar.getDressMeData().setHairId(45021);
  931. -
  932. -           activeChar.broadcastUserInfo();
  933. -       }
  934. -      
  935. -       if (itemId == 30017) // Valkyr
  936. -       {
  937. -           if (activeChar.getDressMeData() == null)
  938. -           {
  939. -               DressMeData dmd = new DressMeData();
  940. -               activeChar.setDressMeData(dmd);
  941. -           }
  942. -          
  943. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  944. -
  945. -           activeChar.setDressMeHelmEnabled(true);
  946. -           activeChar.setDressMeEnabled(true);
  947. -
  948. -           activeChar.getDressMeData().setChestId(45022);
  949. -           activeChar.getDressMeData().setHairId(45023);
  950. -
  951. -           activeChar.broadcastUserInfo();
  952. -       }
  953. -      
  954. -       if (itemId == 30018) // Anakim
  955. -       {
  956. -           if (activeChar.getDressMeData() == null)
  957. -           {
  958. -               DressMeData dmd = new DressMeData();
  959. -               activeChar.setDressMeData(dmd);
  960. -           }
  961. -          
  962. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  963. -
  964. -           activeChar.setDressMeHelmEnabled(true);
  965. -           activeChar.setDressMeEnabled(true);
  966. -
  967. -           activeChar.getDressMeData().setChestId(45024);
  968. -           activeChar.getDressMeData().setHairId(45025);
  969. -
  970. -           activeChar.broadcastUserInfo();
  971. -       }
  972. -      
  973. -       if (itemId == 30019) // Pirate
  974. -       {
  975. -           if (activeChar.getDressMeData() == null)
  976. -           {
  977. -               DressMeData dmd = new DressMeData();
  978. -               activeChar.setDressMeData(dmd);
  979. -           }
  980. -          
  981. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  982. -
  983. -           activeChar.setDressMeHelmEnabled(true);
  984. -           activeChar.setDressMeEnabled(true);
  985. -
  986. -           activeChar.getDressMeData().setChestId(45028);
  987. -           activeChar.getDressMeData().setHairId(45029);
  988. -
  989. -           activeChar.broadcastUserInfo();
  990. -       }
  991. -      
  992. -       if (itemId == 30020) // Samurai
  993. -       {
  994. -           if (activeChar.getDressMeData() == null)
  995. -           {
  996. -               DressMeData dmd = new DressMeData();
  997. -               activeChar.setDressMeData(dmd);
  998. -           }
  999. -          
  1000. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1001. -
  1002. -           activeChar.setDressMeHelmEnabled(true);
  1003. -           activeChar.setDressMeEnabled(true);
  1004. -
  1005. -           activeChar.getDressMeData().setChestId(45032);
  1006. -           activeChar.getDressMeData().setHairId(45033);
  1007. -
  1008. -           activeChar.broadcastUserInfo();
  1009. -       }
  1010. -      
  1011. -       if (itemId == 30021) // Vampire
  1012. -       {
  1013. -           if (activeChar.getDressMeData() == null)
  1014. -           {
  1015. -               DressMeData dmd = new DressMeData();
  1016. -               activeChar.setDressMeData(dmd);
  1017. -           }
  1018. -          
  1019. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1020. -
  1021. -           activeChar.setDressMeHelmEnabled(true);
  1022. -           activeChar.setDressMeEnabled(true);
  1023. -
  1024. -           activeChar.getDressMeData().setChestId(45036);
  1025. -           activeChar.getDressMeData().setHairId(45037);
  1026. -
  1027. -           activeChar.broadcastUserInfo();
  1028. -       }
  1029. -      
  1030. -       if (itemId == 30022) // Cyborgue
  1031. -       {
  1032. -           if (activeChar.getDressMeData() == null)
  1033. -           {
  1034. -               DressMeData dmd = new DressMeData();
  1035. -               activeChar.setDressMeData(dmd);
  1036. -           }
  1037. -          
  1038. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1039. -
  1040. -           activeChar.setDressMeHelmEnabled(true);
  1041. -           activeChar.setDressMeEnabled(true);
  1042. -
  1043. -           activeChar.getDressMeData().setChestId(45040);
  1044. -           activeChar.getDressMeData().setHairId(45041);
  1045. -
  1046. -           activeChar.broadcastUserInfo();
  1047. -       }
  1048. -      
  1049. -       if (itemId == 30023) // Cyborgue
  1050. -       {
  1051. -           if (activeChar.getDressMeData() == null)
  1052. -           {
  1053. -               DressMeData dmd = new DressMeData();
  1054. -               activeChar.setDressMeData(dmd);
  1055. -           }
  1056. -          
  1057. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1058. -
  1059. -           activeChar.setDressMeHelmEnabled(true);
  1060. -           activeChar.setDressMeEnabled(true);
  1061. -
  1062. -           activeChar.getDressMeData().setChestId(45042);
  1063. -           activeChar.getDressMeData().setHairId(45043);
  1064. -
  1065. -           activeChar.broadcastUserInfo();
  1066. -       }
  1067. -      
  1068. -       if (itemId == 30024) // Wolf
  1069. -       {
  1070. -           if (activeChar.getDressMeData() == null)
  1071. -           {
  1072. -               DressMeData dmd = new DressMeData();
  1073. -               activeChar.setDressMeData(dmd);
  1074. -           }
  1075. -          
  1076. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1077. -
  1078. -           activeChar.setDressMeHelmEnabled(true);
  1079. -           activeChar.setDressMeEnabled(true);
  1080. -
  1081. -           activeChar.getDressMeData().setChestId(45044);
  1082. -           activeChar.getDressMeData().setHairId(45045);
  1083. -
  1084. -           activeChar.broadcastUserInfo();
  1085. -       }
  1086. -      
  1087. -       if (itemId == 30025) // Dragon Suit
  1088. -       {
  1089. -           if (activeChar.getDressMeData() == null)
  1090. -           {
  1091. -               DressMeData dmd = new DressMeData();
  1092. -               activeChar.setDressMeData(dmd);
  1093. -           }
  1094. -          
  1095. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1096. -
  1097. -           activeChar.setDressMeHelmEnabled(true);
  1098. -           activeChar.setDressMeEnabled(true);
  1099. -
  1100. -           activeChar.getDressMeData().setChestId(45046);
  1101. -           activeChar.getDressMeData().setHairId(45047);
  1102. -
  1103. -           activeChar.broadcastUserInfo();
  1104. -       }
  1105. -      
  1106. -       if (itemId == 30026) // Knight Suit
  1107. -       {
  1108. -           if (activeChar.getDressMeData() == null)
  1109. -           {
  1110. -               DressMeData dmd = new DressMeData();
  1111. -               activeChar.setDressMeData(dmd);
  1112. -           }
  1113. -          
  1114. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1115. -
  1116. -           activeChar.setDressMeHelmEnabled(true);
  1117. -           activeChar.setDressMeEnabled(true);
  1118. -
  1119. -           activeChar.getDressMeData().setChestId(45048);
  1120. -           activeChar.getDressMeData().setHairId(45049);
  1121. -
  1122. -           activeChar.broadcastUserInfo();
  1123. -       }
  1124. -      
  1125. -       if (itemId == 30027) // Merry Christmas Suit
  1126. -       {
  1127. -           if (activeChar.getDressMeData() == null)
  1128. -           {
  1129. -               DressMeData dmd = new DressMeData();
  1130. -               activeChar.setDressMeData(dmd);
  1131. -           }
  1132. -          
  1133. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1134. -
  1135. -           activeChar.setDressMeHelmEnabled(true);
  1136. -           activeChar.setDressMeEnabled(true);
  1137. -
  1138. -           activeChar.getDressMeData().setChestId(45052);
  1139. -           activeChar.getDressMeData().setHairId(45053);
  1140. -
  1141. -           activeChar.broadcastUserInfo();
  1142. -       }
  1143. -      
  1144. -       if (itemId == 30028) // Merry Christmas Suit
  1145. -       {
  1146. -           if (activeChar.getDressMeData() == null)
  1147. -           {
  1148. -               DressMeData dmd = new DressMeData();
  1149. -               activeChar.setDressMeData(dmd);
  1150. -           }
  1151. -          
  1152. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1153. -
  1154. -           activeChar.setDressMeHelmEnabled(true);
  1155. -           activeChar.setDressMeEnabled(true);
  1156. -          
  1157. -           activeChar.getDressMeData().setChestId(45050);
  1158. -           activeChar.getDressMeData().setHairId(45051);
  1159. -
  1160. -           activeChar.broadcastUserInfo();
  1161. -       }
  1162. -      
  1163. -       if (itemId == 30029) // Skull Suit
  1164. -       {
  1165. -           if (activeChar.getDressMeData() == null)
  1166. -           {
  1167. -               DressMeData dmd = new DressMeData();
  1168. -               activeChar.setDressMeData(dmd);
  1169. -           }
  1170. -          
  1171. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1172. -
  1173. -           activeChar.setDressMeHelmEnabled(true);
  1174. -           activeChar.setDressMeEnabled(true);
  1175. -
  1176. -           activeChar.getDressMeData().setHairId(45060);
  1177. -           activeChar.getDressMeData().setChestId(45061);
  1178. -
  1179. -           activeChar.broadcastUserInfo();
  1180. -       }
  1181. -      
  1182. -       if (itemId == 30030) // Skull Suit
  1183. -       {
  1184. -           if (activeChar.getDressMeData() == null)
  1185. -           {
  1186. -               DressMeData dmd = new DressMeData();
  1187. -               activeChar.setDressMeData(dmd);
  1188. -           }
  1189. -          
  1190. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1191. -
  1192. -           activeChar.setDressMeHelmEnabled(true);
  1193. -           activeChar.setDressMeEnabled(true);
  1194. -
  1195. -           activeChar.getDressMeData().setHairId(45068);
  1196. -           activeChar.getDressMeData().setChestId(45068);
  1197. -
  1198. -           activeChar.broadcastUserInfo();
  1199. -       }
  1200. -      
  1201. -       if (itemId == 30031) // Wizard
  1202. -       {
  1203. -           if (activeChar.getDressMeData() == null)
  1204. -           {
  1205. -               DressMeData dmd = new DressMeData();
  1206. -               activeChar.setDressMeData(dmd);
  1207. -           }
  1208. -          
  1209. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1210. -
  1211. -           activeChar.setDressMeHelmEnabled(true);
  1212. -           activeChar.setDressMeEnabled(true);
  1213. -
  1214. -           activeChar.getDressMeData().setChestId(45012);
  1215. -           activeChar.getDressMeData().setHairId(45013);
  1216. -
  1217. -           activeChar.broadcastUserInfo();
  1218. -       }
  1219. -      
  1220. -       if (itemId == 30032) // Bunny?
  1221. -       {
  1222. -           if (activeChar.getDressMeData() == null)
  1223. -           {
  1224. -               DressMeData dmd = new DressMeData();
  1225. -               activeChar.setDressMeData(dmd);
  1226. -           }
  1227. -          
  1228. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1229. -
  1230. -           activeChar.setDressMeHelmEnabled(true);
  1231. -           activeChar.setDressMeEnabled(true);
  1232. -
  1233. -           activeChar.getDressMeData().setHairId(45062);
  1234. -           activeChar.getDressMeData().setChestId(45063);
  1235. -
  1236. -           activeChar.broadcastUserInfo();
  1237. -       }
  1238. -      
  1239. -       if (itemId == 30033) // Punk?
  1240. -       {
  1241. -           if (activeChar.getDressMeData() == null)
  1242. -           {
  1243. -               DressMeData dmd = new DressMeData();
  1244. -               activeChar.setDressMeData(dmd);
  1245. -           }
  1246. -          
  1247. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1248. -
  1249. -           activeChar.setDressMeHelmEnabled(true);
  1250. -           activeChar.setDressMeEnabled(true);
  1251. -
  1252. -           activeChar.getDressMeData().setHairId(45064);
  1253. -           activeChar.getDressMeData().setChestId(45065);
  1254. -
  1255. -           activeChar.broadcastUserInfo();
  1256. -       }
  1257. -      
  1258. -       if (itemId == 30034) // Street?
  1259. -       {
  1260. -           if (activeChar.getDressMeData() == null)
  1261. -           {
  1262. -               DressMeData dmd = new DressMeData();
  1263. -               activeChar.setDressMeData(dmd);
  1264. -           }
  1265. -          
  1266. -           activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1267. -
  1268. -           activeChar.setDressMeHelmEnabled(true);
  1269. -           activeChar.setDressMeEnabled(true);
  1270. -
  1271. -           activeChar.getDressMeData().setHairId(45066);
  1272. -           activeChar.getDressMeData().setChestId(45067);
  1273. -
  1274. -           activeChar.broadcastUserInfo();
  1275. -       }
  1276. -   }
  1277. -}
  1278. \ No newline at end of file
  1279. +    @Override
  1280. +    public void useItem(final L2Playable playable, final ItemInstance item, final boolean forceUse) {
  1281. +        if (!(playable instanceof L2PcInstance)) {
  1282. +            return;
  1283. +        }
  1284. +        final L2PcInstance activeChar = (L2PcInstance)playable;
  1285. +        final int itemId = item.getItemId();
  1286. +        if (itemId == 30000) {
  1287. +            if (activeChar.getDressMeData() == null) {
  1288. +                final DressMeData dmd = new DressMeData();
  1289. +                activeChar.setDressMeData(dmd);
  1290. +            }
  1291. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1292. +            activeChar.setDressMeHelmEnabled(true);
  1293. +            activeChar.setDressMeEnabled(true);
  1294. +            activeChar.getDressMeData().setChestId(50000);
  1295. +            activeChar.getDressMeData().setHairId(50001);
  1296. +            activeChar.broadcastUserInfo();
  1297. +        }
  1298. +        if (itemId == 30001) {
  1299. +            if (activeChar.getDressMeData() == null) {
  1300. +                final DressMeData dmd = new DressMeData();
  1301. +                activeChar.setDressMeData(dmd);
  1302. +            }
  1303. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1304. +            activeChar.setDressMeHelmEnabled(true);
  1305. +            activeChar.setDressMeEnabled(true);
  1306. +            activeChar.getDressMeData().setChestId(50002);
  1307. +            activeChar.getDressMeData().setHairId(50003);
  1308. +            activeChar.broadcastUserInfo();
  1309. +        }
  1310. +        if (itemId == 30002) {
  1311. +            if (activeChar.getDressMeData() == null) {
  1312. +                final DressMeData dmd = new DressMeData();
  1313. +                activeChar.setDressMeData(dmd);
  1314. +            }
  1315. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1316. +            activeChar.setDressMeHelmEnabled(true);
  1317. +            activeChar.setDressMeEnabled(true);
  1318. +            activeChar.getDressMeData().setChestId(50004);
  1319. +            activeChar.getDressMeData().setHairId(50005);
  1320. +            activeChar.broadcastUserInfo();
  1321. +        }
  1322. +        if (itemId == 30003) {
  1323. +            if (activeChar.getDressMeData() == null) {
  1324. +                final DressMeData dmd = new DressMeData();
  1325. +                activeChar.setDressMeData(dmd);
  1326. +            }
  1327. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1328. +            activeChar.setDressMeHelmEnabled(true);
  1329. +            activeChar.setDressMeEnabled(true);
  1330. +            activeChar.getDressMeData().setChestId(50006);
  1331. +            activeChar.getDressMeData().setHairId(50007);
  1332. +            activeChar.broadcastUserInfo();
  1333. +        }
  1334. +        if (itemId == 30004) {
  1335. +            if (activeChar.getDressMeData() == null) {
  1336. +                final DressMeData dmd = new DressMeData();
  1337. +                activeChar.setDressMeData(dmd);
  1338. +            }
  1339. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1340. +            activeChar.setDressMeHelmEnabled(true);
  1341. +            activeChar.setDressMeEnabled(true);
  1342. +            activeChar.getDressMeData().setChestId(50008);
  1343. +            activeChar.getDressMeData().setHairId(50009);
  1344. +            activeChar.broadcastUserInfo();
  1345. +        }
  1346. +        if (itemId == 30005) {
  1347. +            if (activeChar.getDressMeData() == null) {
  1348. +                final DressMeData dmd = new DressMeData();
  1349. +                activeChar.setDressMeData(dmd);
  1350. +            }
  1351. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1352. +            activeChar.setDressMeHelmEnabled(true);
  1353. +            activeChar.setDressMeEnabled(true);
  1354. +            activeChar.getDressMeData().setChestId(50010);
  1355. +            activeChar.getDressMeData().setHairId(50011);
  1356. +            activeChar.broadcastUserInfo();
  1357. +        }
  1358. +        if (itemId == 30006) {
  1359. +            if (activeChar.getDressMeData() == null) {
  1360. +                final DressMeData dmd = new DressMeData();
  1361. +                activeChar.setDressMeData(dmd);
  1362. +            }
  1363. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1364. +            activeChar.setDressMeHelmEnabled(true);
  1365. +            activeChar.setDressMeEnabled(true);
  1366. +            activeChar.getDressMeData().setChestId(50012);
  1367. +            activeChar.getDressMeData().setHairId(50013);
  1368. +            activeChar.broadcastUserInfo();
  1369. +        }
  1370. +        if (itemId == 30007) {
  1371. +            if (activeChar.getDressMeData() == null) {
  1372. +                final DressMeData dmd = new DressMeData();
  1373. +                activeChar.setDressMeData(dmd);
  1374. +            }
  1375. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1376. +            activeChar.setDressMeHelmEnabled(true);
  1377. +            activeChar.setDressMeEnabled(true);
  1378. +            activeChar.getDressMeData().setChestId(50014);
  1379. +            activeChar.getDressMeData().setHairId(50015);
  1380. +            activeChar.broadcastUserInfo();
  1381. +        }
  1382. +        if (itemId == 30008) {
  1383. +            if (activeChar.getDressMeData() == null) {
  1384. +                final DressMeData dmd = new DressMeData();
  1385. +                activeChar.setDressMeData(dmd);
  1386. +            }
  1387. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1388. +            activeChar.setDressMeHelmEnabled(true);
  1389. +            activeChar.setDressMeEnabled(true);
  1390. +            activeChar.getDressMeData().setChestId(50016);
  1391. +            activeChar.getDressMeData().setHairId(50017);
  1392. +            activeChar.broadcastUserInfo();
  1393. +        }
  1394. +        if (itemId == 30009) {
  1395. +            if (activeChar.getDressMeData() == null) {
  1396. +                final DressMeData dmd = new DressMeData();
  1397. +                activeChar.setDressMeData(dmd);
  1398. +            }
  1399. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1400. +            activeChar.setDressMeHelmEnabled(true);
  1401. +            activeChar.setDressMeEnabled(true);
  1402. +            activeChar.getDressMeData().setChestId(50018);
  1403. +            activeChar.getDressMeData().setHairId(50019);
  1404. +            activeChar.broadcastUserInfo();
  1405. +        }
  1406. +        if (itemId == 30010) {
  1407. +            if (activeChar.getDressMeData() == null) {
  1408. +                final DressMeData dmd = new DressMeData();
  1409. +                activeChar.setDressMeData(dmd);
  1410. +            }
  1411. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1412. +            activeChar.setDressMeHelmEnabled(true);
  1413. +            activeChar.setDressMeEnabled(true);
  1414. +            activeChar.getDressMeData().setChestId(50020);
  1415. +            activeChar.getDressMeData().setHairId(50021);
  1416. +            activeChar.broadcastUserInfo();
  1417. +        }
  1418. +        if (itemId == 30011) {
  1419. +            if (activeChar.getDressMeData() == null) {
  1420. +                final DressMeData dmd = new DressMeData();
  1421. +                activeChar.setDressMeData(dmd);
  1422. +            }
  1423. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1424. +            activeChar.setDressMeHelmEnabled(true);
  1425. +            activeChar.setDressMeEnabled(true);
  1426. +            activeChar.getDressMeData().setChestId(50022);
  1427. +            activeChar.getDressMeData().setHairId(50023);
  1428. +            activeChar.broadcastUserInfo();
  1429. +        }
  1430. +        if (itemId == 30012) {
  1431. +            if (activeChar.getDressMeData() == null) {
  1432. +                final DressMeData dmd = new DressMeData();
  1433. +                activeChar.setDressMeData(dmd);
  1434. +            }
  1435. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1436. +            activeChar.setDressMeHelmEnabled(true);
  1437. +            activeChar.setDressMeEnabled(true);
  1438. +            activeChar.getDressMeData().setChestId(50024);
  1439. +            activeChar.getDressMeData().setHairId(50025);
  1440. +            activeChar.broadcastUserInfo();
  1441. +        }
  1442. +        if (itemId == 30013) {
  1443. +            if (activeChar.getDressMeData() == null) {
  1444. +                final DressMeData dmd = new DressMeData();
  1445. +                activeChar.setDressMeData(dmd);
  1446. +            }
  1447. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1448. +            activeChar.setDressMeHelmEnabled(true);
  1449. +            activeChar.setDressMeEnabled(true);
  1450. +            activeChar.getDressMeData().setChestId(50026);
  1451. +            activeChar.getDressMeData().setHairId(50027);
  1452. +            activeChar.broadcastUserInfo();
  1453. +        }
  1454. +        if (itemId == 30014) {
  1455. +            if (activeChar.getDressMeData() == null) {
  1456. +                final DressMeData dmd = new DressMeData();
  1457. +                activeChar.setDressMeData(dmd);
  1458. +            }
  1459. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1460. +            activeChar.setDressMeHelmEnabled(true);
  1461. +            activeChar.setDressMeEnabled(true);
  1462. +            activeChar.getDressMeData().setChestId(50028);
  1463. +            activeChar.getDressMeData().setHairId(50029);
  1464. +            activeChar.broadcastUserInfo();
  1465. +        }
  1466. +        if (itemId == 30015) {
  1467. +            if (activeChar.getDressMeData() == null) {
  1468. +                final DressMeData dmd = new DressMeData();
  1469. +                activeChar.setDressMeData(dmd);
  1470. +            }
  1471. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1472. +            activeChar.setDressMeHelmEnabled(true);
  1473. +            activeChar.setDressMeEnabled(true);
  1474. +            activeChar.getDressMeData().setChestId(50030);
  1475. +            activeChar.getDressMeData().setHairId(50031);
  1476. +            activeChar.broadcastUserInfo();
  1477. +        }
  1478. +        if (itemId == 30016) {
  1479. +            if (activeChar.getDressMeData() == null) {
  1480. +                final DressMeData dmd = new DressMeData();
  1481. +                activeChar.setDressMeData(dmd);
  1482. +            }
  1483. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1484. +            activeChar.setDressMeHelmEnabled(true);
  1485. +            activeChar.setDressMeEnabled(true);
  1486. +            activeChar.getDressMeData().setChestId(50032);
  1487. +            activeChar.getDressMeData().setHairId(50033);
  1488. +            activeChar.broadcastUserInfo();
  1489. +        }
  1490. +        if (itemId == 30017) {
  1491. +            if (activeChar.getDressMeData() == null) {
  1492. +                final DressMeData dmd = new DressMeData();
  1493. +                activeChar.setDressMeData(dmd);
  1494. +            }
  1495. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1496. +            activeChar.setDressMeHelmEnabled(true);
  1497. +            activeChar.setDressMeEnabled(true);
  1498. +            activeChar.getDressMeData().setChestId(50034);
  1499. +            activeChar.getDressMeData().setHairId(50035);
  1500. +            activeChar.broadcastUserInfo();
  1501. +        }
  1502. +        if (itemId == 30018) {
  1503. +            if (activeChar.getDressMeData() == null) {
  1504. +                final DressMeData dmd = new DressMeData();
  1505. +                activeChar.setDressMeData(dmd);
  1506. +            }
  1507. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1508. +            activeChar.setDressMeHelmEnabled(true);
  1509. +            activeChar.setDressMeEnabled(true);
  1510. +            activeChar.getDressMeData().setChestId(50036);
  1511. +            activeChar.getDressMeData().setHairId(50037);
  1512. +            activeChar.broadcastUserInfo();
  1513. +        }
  1514. +        if (itemId == 30019) {
  1515. +            if (activeChar.getDressMeData() == null) {
  1516. +                final DressMeData dmd = new DressMeData();
  1517. +                activeChar.setDressMeData(dmd);
  1518. +            }
  1519. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1520. +            activeChar.setDressMeHelmEnabled(true);
  1521. +            activeChar.setDressMeEnabled(true);
  1522. +            activeChar.getDressMeData().setChestId(50038);
  1523. +            activeChar.getDressMeData().setHairId(50039);
  1524. +            activeChar.broadcastUserInfo();
  1525. +        }
  1526. +        if (itemId == 30020) {
  1527. +            if (activeChar.getDressMeData() == null) {
  1528. +                final DressMeData dmd = new DressMeData();
  1529. +                activeChar.setDressMeData(dmd);
  1530. +            }
  1531. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1532. +            activeChar.setDressMeHelmEnabled(true);
  1533. +            activeChar.setDressMeEnabled(true);
  1534. +            activeChar.getDressMeData().setChestId(50040);
  1535. +            activeChar.getDressMeData().setHairId(50041);
  1536. +            activeChar.broadcastUserInfo();
  1537. +        }
  1538. +        if (itemId == 30021) {
  1539. +            if (activeChar.getDressMeData() == null) {
  1540. +                final DressMeData dmd = new DressMeData();
  1541. +                activeChar.setDressMeData(dmd);
  1542. +            }
  1543. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1544. +            activeChar.setDressMeHelmEnabled(true);
  1545. +            activeChar.setDressMeEnabled(true);
  1546. +            activeChar.getDressMeData().setChestId(50042);
  1547. +            activeChar.getDressMeData().setHairId(50043);
  1548. +            activeChar.broadcastUserInfo();
  1549. +        }
  1550. +        if (itemId == 30022) {
  1551. +            if (activeChar.getDressMeData() == null) {
  1552. +                final DressMeData dmd = new DressMeData();
  1553. +                activeChar.setDressMeData(dmd);
  1554. +            }
  1555. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1556. +            activeChar.setDressMeHelmEnabled(true);
  1557. +            activeChar.setDressMeEnabled(true);
  1558. +            activeChar.getDressMeData().setChestId(50044);
  1559. +            activeChar.getDressMeData().setHairId(50045);
  1560. +            activeChar.broadcastUserInfo();
  1561. +        }
  1562. +        if (itemId == 30023) {
  1563. +            if (activeChar.getDressMeData() == null) {
  1564. +                final DressMeData dmd = new DressMeData();
  1565. +                activeChar.setDressMeData(dmd);
  1566. +            }
  1567. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1568. +            activeChar.setDressMeHelmEnabled(true);
  1569. +            activeChar.setDressMeEnabled(true);
  1570. +            activeChar.getDressMeData().setChestId(50046);
  1571. +            activeChar.getDressMeData().setHairId(50047);
  1572. +            activeChar.broadcastUserInfo();
  1573. +        }
  1574. +        if (itemId == 30024) {
  1575. +            if (activeChar.getDressMeData() == null) {
  1576. +                final DressMeData dmd = new DressMeData();
  1577. +                activeChar.setDressMeData(dmd);
  1578. +            }
  1579. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1580. +            activeChar.setDressMeHelmEnabled(true);
  1581. +            activeChar.setDressMeEnabled(true);
  1582. +            activeChar.getDressMeData().setChestId(50048);
  1583. +            activeChar.getDressMeData().setHairId(50049);
  1584. +            activeChar.broadcastUserInfo();
  1585. +        }
  1586. +        if (itemId == 30025) {
  1587. +            if (activeChar.getDressMeData() == null) {
  1588. +                final DressMeData dmd = new DressMeData();
  1589. +                activeChar.setDressMeData(dmd);
  1590. +            }
  1591. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1592. +            activeChar.setDressMeHelmEnabled(true);
  1593. +            activeChar.setDressMeEnabled(true);
  1594. +            activeChar.getDressMeData().setChestId(50050);
  1595. +            activeChar.getDressMeData().setHairId(50051);
  1596. +            activeChar.broadcastUserInfo();
  1597. +        }
  1598. +        if (itemId == 30026) {
  1599. +            if (activeChar.getDressMeData() == null) {
  1600. +                final DressMeData dmd = new DressMeData();
  1601. +                activeChar.setDressMeData(dmd);
  1602. +            }
  1603. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1604. +            activeChar.setDressMeHelmEnabled(true);
  1605. +            activeChar.setDressMeEnabled(true);
  1606. +            activeChar.getDressMeData().setChestId(50052);
  1607. +            activeChar.getDressMeData().setHairId(50053);
  1608. +            activeChar.broadcastUserInfo();
  1609. +        }
  1610. +        if (itemId == 30027) {
  1611. +            if (activeChar.getDressMeData() == null) {
  1612. +                final DressMeData dmd = new DressMeData();
  1613. +                activeChar.setDressMeData(dmd);
  1614. +            }
  1615. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1616. +            activeChar.setDressMeHelmEnabled(true);
  1617. +            activeChar.setDressMeEnabled(true);
  1618. +            activeChar.getDressMeData().setChestId(50054);
  1619. +            activeChar.getDressMeData().setHairId(50055);
  1620. +            activeChar.broadcastUserInfo();
  1621. +        }
  1622. +        if (itemId == 30028) {
  1623. +            if (activeChar.getDressMeData() == null) {
  1624. +                final DressMeData dmd = new DressMeData();
  1625. +                activeChar.setDressMeData(dmd);
  1626. +            }
  1627. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1628. +            activeChar.setDressMeHelmEnabled(true);
  1629. +            activeChar.setDressMeEnabled(true);
  1630. +            activeChar.getDressMeData().setChestId(50056);
  1631. +            activeChar.getDressMeData().setHairId(50057);
  1632. +            activeChar.broadcastUserInfo();
  1633. +        }
  1634. +        if (itemId == 30029) {
  1635. +            if (activeChar.getDressMeData() == null) {
  1636. +                final DressMeData dmd = new DressMeData();
  1637. +                activeChar.setDressMeData(dmd);
  1638. +            }
  1639. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1640. +            activeChar.setDressMeHelmEnabled(true);
  1641. +            activeChar.setDressMeEnabled(true);
  1642. +            activeChar.getDressMeData().setChestId(50058);
  1643. +            activeChar.getDressMeData().setHairId(50059);
  1644. +            activeChar.broadcastUserInfo();
  1645. +        }
  1646. +        if (itemId == 30030) {
  1647. +            if (activeChar.getDressMeData() == null) {
  1648. +                final DressMeData dmd = new DressMeData();
  1649. +                activeChar.setDressMeData(dmd);
  1650. +            }
  1651. +            activeChar.broadcastPacket(new MagicSkillUse(activeChar, activeChar, 1036, 1, 4000, 0));
  1652. +            activeChar.setDressMeHelmEnabled(true);
  1653. +            activeChar.setDressMeEnabled(true);
  1654. +            activeChar.getDressMeData().setChestId(6408);
  1655. +            activeChar.getDressMeData().setHairId(6842);
  1656. +            activeChar.broadcastUserInfo();
  1657. +        }
  1658. +    }
  1659. +}
  1660. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/VoicedAutoGB.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/VoicedAutoGB.java
  1661. new file mode 100644
  1662. index 0000000..e065abc
  1663. --- /dev/null
  1664. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/VoicedAutoGB.java
  1665. @@ -0,0 +1,93 @@
  1666. +package net.sf.l2j.gameserver.handler.voicedcommandhandlers;
  1667. +
  1668. +import java.util.HashMap;
  1669. +import java.util.logging.Logger;
  1670. +
  1671. +import net.sf.l2j.Config;
  1672. +import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
  1673. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1674. +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
  1675. +import net.sf.l2j.gameserver.network.serverpackets.ItemList;
  1676. +
  1677. +public class VoicedAutoGB implements IVoicedCommandHandler {
  1678. +  
  1679. +   static final Logger _log = Logger.getLogger(Config.class.getName());
  1680. +  
  1681. +   static final HashMap<String, Thread> userGB = new HashMap<>();
  1682. +  
  1683. +   private static String[] _voicedCommands = {
  1684. +       "gb",
  1685. +   };
  1686. +  
  1687. +   @Override
  1688. +   public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params) {
  1689. +       if (activeChar == null) {
  1690. +           return false;
  1691. +       }
  1692. +      
  1693. +       if (command.equals("gb")) {
  1694. +
  1695. +           if (userGB.containsKey(activeChar.toString()) && activeChar.isAutoGB())
  1696. +           {
  1697. +               userGB.remove(activeChar.toString()) //here we get thread and remove it from map
  1698. +               .interrupt(); //and interrupt it
  1699. +               activeChar.setAutoGB(false);
  1700. +               //activeChar.sendPacket(new CreatureSay(0, Say2.TELL, "", "SYS: Auto GB Desativado!"));
  1701. +                activeChar.sendMessage("Auto GB Disabled.");
  1702. +                activeChar.sendPacket(new ExShowScreenMessage("Auto GoldBar Disabled.", 4000));
  1703. +               VoicedMenu.showMenuHtml(activeChar);
  1704. +           } else {
  1705. +               activeChar.setAutoGB(true);
  1706. +               //activeChar.sendPacket(new CreatureSay(0, Say2.TELL, "", "SYS: Auto GB Ativado!"));
  1707. +                activeChar.sendMessage("Auto GB Enabled.");
  1708. +                activeChar.sendPacket(new ExShowScreenMessage("Auto GoldBar Enabled.", 4000));
  1709. +               Thread t = new Thread(new Autogb(activeChar));
  1710. +               userGB.put(activeChar.toString(), t);
  1711. +               t.start();
  1712. +               VoicedMenu.showMenuHtml(activeChar);
  1713. +           }
  1714. +              
  1715. +               return true;
  1716. +       }
  1717. +       return false;
  1718. +   }
  1719. +  
  1720. +   @Override
  1721. +   public String[] getVoicedCommandList() {
  1722. +       return _voicedCommands;
  1723. +   }
  1724. +  
  1725. +   private class Autogb implements Runnable {
  1726. +      
  1727. +       L2PcInstance activeChar;
  1728. +      
  1729. +       public Autogb(L2PcInstance activeChar) {
  1730. +           this.activeChar = activeChar;
  1731. +       }
  1732. +      
  1733. +       @Override
  1734. +       public void run() {
  1735. +           try {
  1736. +               while (true) {
  1737. +
  1738. +                       if (activeChar.getInventory().getInventoryItemCount(57, 0) >= Config.BANKING_SYSTEM_ADENA)
  1739. +                       {
  1740. +                           activeChar.getInventory().reduceAdena("Goldbar", Config.BANKING_SYSTEM_ADENA, activeChar, null);
  1741. +                           activeChar.getInventory().addItem("Goldbar", Config.BANKING_SYSTEM_GOLDBAR_ID, Config.BANKING_SYSTEM_GOLDBARS, activeChar, null);
  1742. +                           activeChar.getInventory().updateDatabase();
  1743. +                           activeChar.sendPacket(new ItemList(activeChar, false));
  1744. +                           //activeChar.sendMessage("Now you have " + Config.BANKING_SYSTEM_GOLDBARS + " Goldbar(s), and " + Config.BANKING_SYSTEM_ADENA + " less adena.");
  1745. +                       }
  1746. +                   Thread.sleep(2000);
  1747. +               }
  1748. +           } catch (InterruptedException e) {
  1749. +               //nothing
  1750. +           } catch (Exception e) {
  1751. +               _log.warning(e.getMessage());
  1752. +               Thread.currentThread().interrupt();
  1753. +           } finally {
  1754. +               userGB.remove(activeChar.toString());
  1755. +           }
  1756. +       }
  1757. +   }
  1758. +}
  1759. \ No newline at end of file
  1760. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/VoicedMenu.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/VoicedMenu.java
  1761. index 21a39c5..fb4d299 100644
  1762. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/VoicedMenu.java
  1763. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/VoicedMenu.java
  1764. @@ -40,7 +40,8 @@
  1765.         "hideEnchantGlow",
  1766.         "hideSkillsAnimation",
  1767.         "hideSkinsTextures",
  1768. -       "autoFarm"
  1769. +       "autoFarm",
  1770. +       "gb"
  1771.     };
  1772.  
  1773.     private static final String ACTIVED = "<font color=00FF00>ON</font>";
  1774. @@ -199,7 +200,7 @@
  1775.         return true;
  1776.     }
  1777.  
  1778. -   private static void showMenuHtml(L2PcInstance activeChar)
  1779. +   static void showMenuHtml(L2PcInstance activeChar)
  1780.     {
  1781.         NpcHtmlMessage html = new NpcHtmlMessage(0);
  1782.         html.setFile("data/html/mods/menu/Menu.htm");
  1783. @@ -217,7 +218,8 @@
  1784.         html.replace("%server_os%", String.valueOf(System.getProperty("os.name")));
  1785.         html.replace("%server_free_mem%", String.valueOf((Runtime.getRuntime().maxMemory()-Runtime.getRuntime().totalMemory()+Runtime.getRuntime().freeMemory()) / 1048576));
  1786.         html.replace("%server_total_mem%", String.valueOf(Runtime.getRuntime().totalMemory() / 1048576));
  1787. -       activeChar.sendPacket(html);
  1788. +        html.replace("%gb%", activeChar.isAutoGB() ? "<font color=00FF00>ON</font>" : "<font color=FF0000>OFF</font>");
  1789. +        activeChar.sendPacket(html);
  1790.     }
  1791.  
  1792.     private static void showAuctionHtml(L2PcInstance activeChar)
  1793. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/VoicedOutfit.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/VoicedOutfit.java
  1794. index f93e397..1128d7c 100644
  1795. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/VoicedOutfit.java
  1796. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/VoicedOutfit.java
  1797. @@ -25,7 +25,7 @@
  1798.  public class VoicedOutfit implements IVoicedCommandHandler
  1799.  {
  1800.     private static final String[] VOICED_COMMANDS =
  1801. -   {
  1802. +   { /*
  1803.         "skins",
  1804.         "trySkin_RArcher",
  1805.         "RArcher",
  1806. @@ -99,2623 +99,1578 @@
  1807.         "Hallowen",
  1808.         "trySkin_BlackZaken",
  1809.         "BlackZaken",
  1810. -       "disable_Helm"
  1811. -   };
  1812. +       "disable_Helm"*/
  1813. +            "skins",
  1814. +               "trySkin_Archer", "Archer",
  1815. +               "trySkin_GreenArcher", "GreenArcher",
  1816. +               "trySkin_LightAssassin", "LightAssassin",
  1817. +               "trySkin_DarkAssassin", "DarkAssassin",
  1818. +               "trySkin_RedMusketeer", "RedMusketeer",
  1819. +               "trySkin_Muskeeter", "Muskeeter",
  1820. +               "trySkin_Wizard", "Wizard",
  1821. +               "trySkin_Warrior", "Warrior",
  1822. +               "trySkin_Cat", "Cat",
  1823. +               "trySkin_King", "King",
  1824. +               "trySkin_WhiteKing", "WhiteKing",
  1825. +               "trySkin_Valkyri", "Valkyri",
  1826. +               "trySkin_Anakim", "Anakim",
  1827. +               "trySkin_Pirate", "Pirate",
  1828. +               "trySkin_PirateBlue", "PirateBlue",
  1829. +               "trySkin_Ninja", "Ninja",
  1830. +               "trySkin_Samurai", "Samurai",
  1831. +               "trySkin_DarkWizard", "DarkWizard",
  1832. +               "trySkin_Vampire", "Vampire",
  1833. +               "trySkin_Beleth", "Beleth",
  1834. +               "trySkin_Cyborg", "Cyborg",
  1835. +               "trySkin_Cowboy", "Cowboy",
  1836. +               "trySkin_Barbarian", "Barbarian",
  1837. +               "trySkin_Dragon", "Dragon",
  1838. +               "trySkin_WhiteKnight", "WhiteKnight",
  1839. +               "trySkin_RedSanta", "RedSanta",
  1840. +               "trySkin_BlueSanta", "BlueSanta",
  1841. +               "trySkin_DarkKnight", "DarkKnight",
  1842. +               "trySkin_Healer", "Healer",
  1843. +               "trySkin_Lilith", "Lilith",
  1844. +               "trySkin_Wedding", "Wedding",
  1845. +               "disable_Helm"
  1846. +           };
  1847.  
  1848.     @Override
  1849. -   public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
  1850. -   {
  1851. -       if (command.equals("skins"))
  1852. -           showSkinPanel(activeChar);
  1853. -
  1854. -       // Red Archer
  1855. -       if (command.equals("trySkin_RArcher"))
  1856. -       {
  1857. -           if (activeChar.isTryDressMeEnabled())
  1858. -           {
  1859. -               activeChar.sendMessage("You are already trying a new skin.");
  1860. -               return false;
  1861. -           }
  1862. -          
  1863. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  1864. -           {
  1865. -               activeChar.sendMessage("This command can only be used on peace area.");
  1866. -               return false;
  1867. -           }
  1868. -            
  1869. -           if (activeChar.getDressMeData() == null)
  1870. -           {
  1871. -               DressMeData dmd = new DressMeData();
  1872. -               activeChar.setDressMeData(dmd);
  1873. -           }
  1874. -          
  1875. -           activeChar.setTryDressMeEnabled(true);
  1876. -           activeChar.setDressMeHelmEnabled(true);
  1877. -           activeChar.setDressMeEnabled(true);
  1878. -
  1879. -           activeChar.getDressMeData().setChestId(45000);
  1880. -           activeChar.getDressMeData().setHairId(45001);
  1881. -           activeChar.broadcastUserInfo();
  1882. -
  1883. -           initCountdown(activeChar, 5);
  1884. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  1885. -           {
  1886. -               @Override
  1887. -               public void run()
  1888. -               {
  1889. -                   activeChar.setTryDressMeEnabled(false);
  1890. -                   activeChar.setDressMeHelmEnabled(false);
  1891. -                   activeChar.setDressMeEnabled(false);
  1892. -                   activeChar.broadcastUserInfo();
  1893. -               }
  1894. -
  1895. -           }, 5 * 1000);
  1896. -       }
  1897. -      
  1898. -       if (command.equals("RArcher"))
  1899. -       {
  1900. -           if (!activeChar.isVip())
  1901. -           {
  1902. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  1903. -               return false;
  1904. -           }
  1905. -          
  1906. -           if (activeChar.isTryDressMeEnabled())
  1907. -           {
  1908. -               activeChar.sendMessage("You are already trying a new skin.");
  1909. -               return false;
  1910. -           }
  1911. -          
  1912. -           if (activeChar.getDressMeData() == null)
  1913. -           {
  1914. -               DressMeData dmd = new DressMeData();
  1915. -               activeChar.setDressMeData(dmd);
  1916. -           }
  1917. -          
  1918. -           activeChar.setDressMeHelmEnabled(true);
  1919. -           activeChar.setDressMeEnabled(true);
  1920. -
  1921. -           activeChar.getDressMeData().setChestId(45000);
  1922. -           activeChar.getDressMeData().setHairId(45001);
  1923. -           activeChar.broadcastUserInfo();
  1924. -       }
  1925. -      
  1926. -       // Yellow Archer
  1927. -       if (command.equals("trySkin_YArcher"))
  1928. -       {
  1929. -           if (activeChar.isTryDressMeEnabled())
  1930. -           {
  1931. -               activeChar.sendMessage("You are already trying a new skin.");
  1932. -               return false;
  1933. -           }
  1934. -          
  1935. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  1936. -           {
  1937. -               activeChar.sendMessage("This command can only be used on peace area.");
  1938. -               return false;
  1939. -           }
  1940. -            
  1941. -           if (activeChar.getDressMeData() == null)
  1942. -           {
  1943. -               DressMeData dmd = new DressMeData();
  1944. -               activeChar.setDressMeData(dmd);
  1945. -           }
  1946. -          
  1947. -           activeChar.setTryDressMeEnabled(true);
  1948. -           activeChar.setDressMeHelmEnabled(true);
  1949. -           activeChar.setDressMeEnabled(true);
  1950. -
  1951. -           activeChar.getDressMeData().setChestId(45002);
  1952. -           activeChar.getDressMeData().setHairId(45003);
  1953. -           activeChar.broadcastUserInfo();
  1954. -
  1955. -           initCountdown(activeChar, 5);
  1956. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  1957. -           {
  1958. -               @Override
  1959. -               public void run()
  1960. -               {
  1961. -                   activeChar.setTryDressMeEnabled(false);
  1962. -                   activeChar.setDressMeHelmEnabled(false);
  1963. -                   activeChar.setDressMeEnabled(false);
  1964. -                   activeChar.broadcastUserInfo();
  1965. -               }
  1966. -
  1967. -           }, 5 * 1000);
  1968. -       }
  1969. -      
  1970. -       if (command.equals("YArcher"))
  1971. -       {
  1972. -           if (!activeChar.isVip())
  1973. -           {
  1974. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  1975. -               return false;
  1976. -           }
  1977. -          
  1978. -           if (activeChar.isTryDressMeEnabled())
  1979. -           {
  1980. -               activeChar.sendMessage("You are already trying a new skin.");
  1981. -               return false;
  1982. -           }
  1983. -          
  1984. -           if (activeChar.getDressMeData() == null)
  1985. -           {
  1986. -               DressMeData dmd = new DressMeData();
  1987. -               activeChar.setDressMeData(dmd);
  1988. -           }
  1989. -          
  1990. -           activeChar.setDressMeHelmEnabled(true);
  1991. -           activeChar.setDressMeEnabled(true);
  1992. -
  1993. -           activeChar.getDressMeData().setChestId(45002);
  1994. -           activeChar.getDressMeData().setHairId(45003);
  1995. -           activeChar.broadcastUserInfo();
  1996. -       }
  1997. -      
  1998. -       // Light Assassin
  1999. -       if (command.equals("trySkin_LAssassin"))
  2000. -       {
  2001. -           if (activeChar.isTryDressMeEnabled())
  2002. -           {
  2003. -               activeChar.sendMessage("You are already trying a new skin.");
  2004. -               return false;
  2005. -           }
  2006. -          
  2007. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2008. -           {
  2009. -               activeChar.sendMessage("This command can only be used on peace area.");
  2010. -               return false;
  2011. -           }
  2012. -            
  2013. -           if (activeChar.getDressMeData() == null)
  2014. -           {
  2015. -               DressMeData dmd = new DressMeData();
  2016. -               activeChar.setDressMeData(dmd);
  2017. -           }
  2018. -          
  2019. -           activeChar.setTryDressMeEnabled(true);
  2020. -           activeChar.setDressMeHelmEnabled(true);
  2021. -           activeChar.setDressMeEnabled(true);
  2022. -
  2023. -           activeChar.getDressMeData().setChestId(45004);
  2024. -           activeChar.getDressMeData().setHairId(45005);
  2025. -           activeChar.broadcastUserInfo();
  2026. -
  2027. -           initCountdown(activeChar, 5);
  2028. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2029. -           {
  2030. -               @Override
  2031. -               public void run()
  2032. -               {
  2033. -                   activeChar.setTryDressMeEnabled(false);
  2034. -                   activeChar.setDressMeHelmEnabled(false);
  2035. -                   activeChar.setDressMeEnabled(false);
  2036. -                   activeChar.broadcastUserInfo();
  2037. -               }
  2038. -
  2039. -           }, 5 * 1000);
  2040. -       }
  2041. -      
  2042. -       if (command.equals("LAssassin"))
  2043. -       {
  2044. -           if (!activeChar.isVip())
  2045. -           {
  2046. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2047. -               return false;
  2048. -           }
  2049. -          
  2050. -           if (activeChar.isTryDressMeEnabled())
  2051. -           {
  2052. -               activeChar.sendMessage("You are already trying a new skin.");
  2053. -               return false;
  2054. -           }
  2055. -          
  2056. -           if (activeChar.getDressMeData() == null)
  2057. -           {
  2058. -               DressMeData dmd = new DressMeData();
  2059. -               activeChar.setDressMeData(dmd);
  2060. -           }
  2061. -          
  2062. -           activeChar.setDressMeHelmEnabled(true);
  2063. -           activeChar.setDressMeEnabled(true);
  2064. -
  2065. -           activeChar.getDressMeData().setChestId(45004);
  2066. -           activeChar.getDressMeData().setHairId(45005);
  2067. -           activeChar.broadcastUserInfo();
  2068. -       }
  2069. -      
  2070. -       // Dark Assassin
  2071. -       if (command.equals("trySkin_DAssassin"))
  2072. -       {
  2073. -           if (activeChar.isTryDressMeEnabled())
  2074. -           {
  2075. -               activeChar.sendMessage("You are already trying a new skin.");
  2076. -               return false;
  2077. -           }
  2078. -          
  2079. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2080. -           {
  2081. -               activeChar.sendMessage("This command can only be used on peace area.");
  2082. -               return false;
  2083. -           }
  2084. -            
  2085. -           if (activeChar.getDressMeData() == null)
  2086. -           {
  2087. -               DressMeData dmd = new DressMeData();
  2088. -               activeChar.setDressMeData(dmd);
  2089. -           }
  2090. -          
  2091. -           activeChar.setTryDressMeEnabled(true);
  2092. -           activeChar.setDressMeHelmEnabled(true);
  2093. -           activeChar.setDressMeEnabled(true);
  2094. -
  2095. -           activeChar.getDressMeData().setChestId(45006);
  2096. -           activeChar.getDressMeData().setHairId(45007);
  2097. -           activeChar.broadcastUserInfo();
  2098. -
  2099. -           initCountdown(activeChar, 5);
  2100. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2101. -           {
  2102. -               @Override
  2103. -               public void run()
  2104. -               {
  2105. -                   activeChar.setTryDressMeEnabled(false);
  2106. -                   activeChar.setDressMeHelmEnabled(false);
  2107. -                   activeChar.setDressMeEnabled(false);
  2108. -                   activeChar.broadcastUserInfo();
  2109. -               }
  2110. -
  2111. -           }, 5 * 1000);
  2112. -       }
  2113. -      
  2114. -       if (command.equals("DAssassin"))
  2115. -       {
  2116. -           if (!activeChar.isVip())
  2117. -           {
  2118. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2119. -               return false;
  2120. -           }
  2121. -          
  2122. -           if (activeChar.isTryDressMeEnabled())
  2123. -           {
  2124. -               activeChar.sendMessage("You are already trying a new skin.");
  2125. -               return false;
  2126. -           }
  2127. -          
  2128. -           if (activeChar.getDressMeData() == null)
  2129. -           {
  2130. -               DressMeData dmd = new DressMeData();
  2131. -               activeChar.setDressMeData(dmd);
  2132. -           }
  2133. -          
  2134. -           activeChar.setDressMeHelmEnabled(true);
  2135. -           activeChar.setDressMeEnabled(true);
  2136. -
  2137. -           activeChar.getDressMeData().setChestId(45006);
  2138. -           activeChar.getDressMeData().setHairId(45007);
  2139. -           activeChar.broadcastUserInfo();
  2140. -       }
  2141. -      
  2142. -       // Red Muskeeteer
  2143. -       if (command.equals("trySkin_RMuskeeter"))
  2144. -       {
  2145. -           if (activeChar.isTryDressMeEnabled())
  2146. -           {
  2147. -               activeChar.sendMessage("You are already trying a new skin.");
  2148. -               return false;
  2149. -           }
  2150. -          
  2151. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2152. -           {
  2153. -               activeChar.sendMessage("This command can only be used on peace area.");
  2154. -               return false;
  2155. -           }
  2156. -            
  2157. -           if (activeChar.getDressMeData() == null)
  2158. -           {
  2159. -               DressMeData dmd = new DressMeData();
  2160. -               activeChar.setDressMeData(dmd);
  2161. -           }
  2162. -          
  2163. -           activeChar.setTryDressMeEnabled(true);
  2164. -           activeChar.setDressMeHelmEnabled(true);
  2165. -           activeChar.setDressMeEnabled(true);
  2166. -
  2167. -           activeChar.getDressMeData().setChestId(45008);
  2168. -           activeChar.getDressMeData().setHairId(45009);
  2169. -           activeChar.broadcastUserInfo();
  2170. -
  2171. -           initCountdown(activeChar, 5);
  2172. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2173. -           {
  2174. -               @Override
  2175. -               public void run()
  2176. -               {
  2177. -                   activeChar.setTryDressMeEnabled(false);
  2178. -                   activeChar.setDressMeHelmEnabled(false);
  2179. -                   activeChar.setDressMeEnabled(false);
  2180. -                   activeChar.broadcastUserInfo();
  2181. -               }
  2182. -
  2183. -           }, 5 * 1000);
  2184. -       }
  2185. -      
  2186. -       if (command.equals("RMuskeeter"))
  2187. -       {
  2188. -           if (!activeChar.isVip())
  2189. -           {
  2190. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2191. -               return false;
  2192. -           }
  2193. -          
  2194. -           if (activeChar.isTryDressMeEnabled())
  2195. -           {
  2196. -               activeChar.sendMessage("You are already trying a new skin.");
  2197. -               return false;
  2198. -           }
  2199. -          
  2200. -           if (activeChar.getDressMeData() == null)
  2201. -           {
  2202. -               DressMeData dmd = new DressMeData();
  2203. -               activeChar.setDressMeData(dmd);
  2204. -           }
  2205. -          
  2206. -           activeChar.setDressMeHelmEnabled(true);
  2207. -           activeChar.setDressMeEnabled(true);
  2208. -
  2209. -           activeChar.getDressMeData().setChestId(45008);
  2210. -           activeChar.getDressMeData().setHairId(45009);
  2211. -           activeChar.broadcastUserInfo();
  2212. -       }
  2213. -      
  2214. -       // Blue Muskeeteer
  2215. -       if (command.equals("trySkin_BMuskeeter"))
  2216. -       {
  2217. -           if (activeChar.isTryDressMeEnabled())
  2218. -           {
  2219. -               activeChar.sendMessage("You are already trying a new skin.");
  2220. -               return false;
  2221. -           }
  2222. -          
  2223. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2224. -           {
  2225. -               activeChar.sendMessage("This command can only be used on peace area.");
  2226. -               return false;
  2227. -           }
  2228. -            
  2229. -           if (activeChar.getDressMeData() == null)
  2230. -           {
  2231. -               DressMeData dmd = new DressMeData();
  2232. -               activeChar.setDressMeData(dmd);
  2233. -           }
  2234. -          
  2235. -           activeChar.setTryDressMeEnabled(true);
  2236. -           activeChar.setDressMeHelmEnabled(true);
  2237. -           activeChar.setDressMeEnabled(true);
  2238. -
  2239. -           activeChar.getDressMeData().setChestId(45010);
  2240. -           activeChar.getDressMeData().setHairId(45011);
  2241. -           activeChar.broadcastUserInfo();
  2242. -
  2243. -           initCountdown(activeChar, 5);
  2244. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2245. -           {
  2246. -               @Override
  2247. -               public void run()
  2248. -               {
  2249. -                   activeChar.setTryDressMeEnabled(false);
  2250. -                   activeChar.setDressMeHelmEnabled(false);
  2251. -                   activeChar.setDressMeEnabled(false);
  2252. -                   activeChar.broadcastUserInfo();
  2253. -               }
  2254. -
  2255. -           }, 5 * 1000);
  2256. -       }
  2257. -      
  2258. -       if (command.equals("BMuskeeter"))
  2259. -       {
  2260. -           if (!activeChar.isVip())
  2261. -           {
  2262. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2263. -               return false;
  2264. -           }
  2265. -          
  2266. -           if (activeChar.isTryDressMeEnabled())
  2267. -           {
  2268. -               activeChar.sendMessage("You are already trying a new skin.");
  2269. -               return false;
  2270. -           }
  2271. -          
  2272. -           if (activeChar.getDressMeData() == null)
  2273. -           {
  2274. -               DressMeData dmd = new DressMeData();
  2275. -               activeChar.setDressMeData(dmd);
  2276. -           }
  2277. -          
  2278. -           activeChar.setDressMeHelmEnabled(true);
  2279. -           activeChar.setDressMeEnabled(true);
  2280. -
  2281. -           activeChar.getDressMeData().setChestId(45010);
  2282. -           activeChar.getDressMeData().setHairId(45011);
  2283. -           activeChar.broadcastUserInfo();
  2284. -       }
  2285. -      
  2286. -       // Royal Wizard
  2287. -       if (command.equals("trySkin_RWizard"))
  2288. -       {
  2289. -           if (activeChar.isTryDressMeEnabled())
  2290. -           {
  2291. -               activeChar.sendMessage("You are already trying a new skin.");
  2292. -               return false;
  2293. -           }
  2294. -          
  2295. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2296. -           {
  2297. -               activeChar.sendMessage("This command can only be used on peace area.");
  2298. -               return false;
  2299. -           }
  2300. -            
  2301. -           if (activeChar.getDressMeData() == null)
  2302. -           {
  2303. -               DressMeData dmd = new DressMeData();
  2304. -               activeChar.setDressMeData(dmd);
  2305. -           }
  2306. -          
  2307. -           activeChar.setTryDressMeEnabled(true);
  2308. -           activeChar.setDressMeHelmEnabled(true);
  2309. -           activeChar.setDressMeEnabled(true);
  2310. -
  2311. -           activeChar.getDressMeData().setChestId(45012);
  2312. -           activeChar.getDressMeData().setHairId(45013);
  2313. -           activeChar.broadcastUserInfo();
  2314. -
  2315. -           initCountdown(activeChar, 5);
  2316. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2317. -           {
  2318. -               @Override
  2319. -               public void run()
  2320. -               {
  2321. -                   activeChar.setTryDressMeEnabled(false);
  2322. -                   activeChar.setDressMeHelmEnabled(false);
  2323. -                   activeChar.setDressMeEnabled(false);
  2324. -                   activeChar.broadcastUserInfo();
  2325. -               }
  2326. -
  2327. -           }, 5 * 1000);
  2328. -       }
  2329. -      
  2330. -       if (command.equals("RWizard"))
  2331. -       {
  2332. -           if (!activeChar.isVip())
  2333. -           {
  2334. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2335. -               return false;
  2336. -           }
  2337. -          
  2338. -           if (activeChar.isTryDressMeEnabled())
  2339. -           {
  2340. -               activeChar.sendMessage("You are already trying a new skin.");
  2341. -               return false;
  2342. -           }
  2343. -          
  2344. -           if (activeChar.getDressMeData() == null)
  2345. -           {
  2346. -               DressMeData dmd = new DressMeData();
  2347. -               activeChar.setDressMeData(dmd);
  2348. -           }
  2349. -          
  2350. -           activeChar.setDressMeHelmEnabled(true);
  2351. -           activeChar.setDressMeEnabled(true);
  2352. -
  2353. -           activeChar.getDressMeData().setChestId(45012);
  2354. -           activeChar.getDressMeData().setHairId(45013);
  2355. -           activeChar.broadcastUserInfo();
  2356. -       }
  2357. -      
  2358. -       // Chevalier Armor
  2359. -       if (command.equals("trySkin_Chevalier"))
  2360. -       {
  2361. -           if (activeChar.isTryDressMeEnabled())
  2362. -           {
  2363. -               activeChar.sendMessage("You are already trying a new skin.");
  2364. -               return false;
  2365. -           }
  2366. -          
  2367. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2368. -           {
  2369. -               activeChar.sendMessage("This command can only be used on peace area.");
  2370. -               return false;
  2371. -           }
  2372. -            
  2373. -           if (activeChar.getDressMeData() == null)
  2374. -           {
  2375. -               DressMeData dmd = new DressMeData();
  2376. -               activeChar.setDressMeData(dmd);
  2377. -           }
  2378. -          
  2379. -           activeChar.setTryDressMeEnabled(true);
  2380. -           activeChar.setDressMeHelmEnabled(true);
  2381. -           activeChar.setDressMeEnabled(true);
  2382. -
  2383. -           activeChar.getDressMeData().setChestId(45014);
  2384. -           activeChar.getDressMeData().setHairId(45015);
  2385. -           activeChar.broadcastUserInfo();
  2386. -
  2387. -           initCountdown(activeChar, 5);
  2388. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2389. -           {
  2390. -               @Override
  2391. -               public void run()
  2392. -               {
  2393. -                   activeChar.setTryDressMeEnabled(false);
  2394. -                   activeChar.setDressMeHelmEnabled(false);
  2395. -                   activeChar.setDressMeEnabled(false);
  2396. -                   activeChar.broadcastUserInfo();
  2397. -               }
  2398. -
  2399. -           }, 5 * 1000);
  2400. -       }
  2401. -      
  2402. -       if (command.equals("Chevalier"))
  2403. -       {
  2404. -           if (!activeChar.isVip())
  2405. -           {
  2406. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2407. -               return false;
  2408. -           }
  2409. -          
  2410. -           if (activeChar.isTryDressMeEnabled())
  2411. -           {
  2412. -               activeChar.sendMessage("You are already trying a new skin.");
  2413. -               return false;
  2414. -           }
  2415. -          
  2416. -           if (activeChar.getDressMeData() == null)
  2417. -           {
  2418. -               DressMeData dmd = new DressMeData();
  2419. -               activeChar.setDressMeData(dmd);
  2420. -           }
  2421. -          
  2422. -           activeChar.setDressMeHelmEnabled(true);
  2423. -           activeChar.setDressMeEnabled(true);
  2424. -
  2425. -           activeChar.getDressMeData().setChestId(45014);
  2426. -           activeChar.getDressMeData().setHairId(45015);
  2427. -           activeChar.broadcastUserInfo();
  2428. -       }
  2429. -      
  2430. -       // Cat Armor
  2431. -       if (command.equals("trySkin_Cat"))
  2432. -       {
  2433. -           if (activeChar.isTryDressMeEnabled())
  2434. -           {
  2435. -               activeChar.sendMessage("You are already trying a new skin.");
  2436. -               return false;
  2437. -           }
  2438. -          
  2439. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2440. -           {
  2441. -               activeChar.sendMessage("This command can only be used on peace area.");
  2442. -               return false;
  2443. -           }
  2444. -            
  2445. -           if (activeChar.getDressMeData() == null)
  2446. -           {
  2447. -               DressMeData dmd = new DressMeData();
  2448. -               activeChar.setDressMeData(dmd);
  2449. -           }
  2450. -          
  2451. -           activeChar.setTryDressMeEnabled(true);
  2452. -           activeChar.setDressMeHelmEnabled(true);
  2453. -           activeChar.setDressMeEnabled(true);
  2454. -
  2455. -           activeChar.getDressMeData().setChestId(45016);
  2456. -           activeChar.getDressMeData().setHairId(45017);
  2457. -           activeChar.broadcastUserInfo();
  2458. -
  2459. -           initCountdown(activeChar, 5);
  2460. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2461. -           {
  2462. -               @Override
  2463. -               public void run()
  2464. -               {
  2465. -                   activeChar.setTryDressMeEnabled(false);
  2466. -                   activeChar.setDressMeHelmEnabled(false);
  2467. -                   activeChar.setDressMeEnabled(false);
  2468. -                   activeChar.broadcastUserInfo();
  2469. -               }
  2470. -
  2471. -           }, 5 * 1000);
  2472. -       }
  2473. -      
  2474. -       if (command.equals("Cat"))
  2475. -       {
  2476. -           if (!activeChar.isVip())
  2477. -           {
  2478. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2479. -               return false;
  2480. -           }
  2481. -          
  2482. -           if (activeChar.isTryDressMeEnabled())
  2483. -           {
  2484. -               activeChar.sendMessage("You are already trying a new skin.");
  2485. -               return false;
  2486. -           }
  2487. -          
  2488. -           if (activeChar.getDressMeData() == null)
  2489. -           {
  2490. -               DressMeData dmd = new DressMeData();
  2491. -               activeChar.setDressMeData(dmd);
  2492. -           }
  2493. -          
  2494. -           activeChar.setDressMeHelmEnabled(true);
  2495. -           activeChar.setDressMeEnabled(true);
  2496. -
  2497. -           activeChar.getDressMeData().setChestId(45016);
  2498. -           activeChar.getDressMeData().setHairId(45017);
  2499. -           activeChar.broadcastUserInfo();
  2500. -       }
  2501. -      
  2502. -       // Royal King
  2503. -       if (command.equals("trySkin_RKing"))
  2504. -       {
  2505. -           if (activeChar.isTryDressMeEnabled())
  2506. -           {
  2507. -               activeChar.sendMessage("You are already trying a new skin.");
  2508. -               return false;
  2509. -           }
  2510. -          
  2511. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2512. -           {
  2513. -               activeChar.sendMessage("This command can only be used on peace area.");
  2514. -               return false;
  2515. -           }
  2516. -            
  2517. -           if (activeChar.getDressMeData() == null)
  2518. -           {
  2519. -               DressMeData dmd = new DressMeData();
  2520. -               activeChar.setDressMeData(dmd);
  2521. -           }
  2522. -          
  2523. -           activeChar.setTryDressMeEnabled(true);
  2524. -           activeChar.setDressMeHelmEnabled(true);
  2525. -           activeChar.setDressMeEnabled(true);
  2526. -
  2527. -           activeChar.getDressMeData().setChestId(45018);
  2528. -           activeChar.getDressMeData().setHairId(45019);
  2529. -           activeChar.broadcastUserInfo();
  2530. -
  2531. -           initCountdown(activeChar, 5);
  2532. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2533. -           {
  2534. -               @Override
  2535. -               public void run()
  2536. -               {
  2537. -                   activeChar.setTryDressMeEnabled(false);
  2538. -                   activeChar.setDressMeHelmEnabled(false);
  2539. -                   activeChar.setDressMeEnabled(false);
  2540. -                   activeChar.broadcastUserInfo();
  2541. -               }
  2542. -
  2543. -           }, 5 * 1000);
  2544. -       }
  2545. -      
  2546. -       if (command.equals("RKing"))
  2547. -       {
  2548. -           if (!activeChar.isVip())
  2549. -           {
  2550. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2551. -               return false;
  2552. -           }
  2553. -          
  2554. -           if (activeChar.isTryDressMeEnabled())
  2555. -           {
  2556. -               activeChar.sendMessage("You are already trying a new skin.");
  2557. -               return false;
  2558. -           }
  2559. -          
  2560. -           if (activeChar.getDressMeData() == null)
  2561. -           {
  2562. -               DressMeData dmd = new DressMeData();
  2563. -               activeChar.setDressMeData(dmd);
  2564. -           }
  2565. -          
  2566. -           activeChar.setDressMeHelmEnabled(true);
  2567. -           activeChar.setDressMeEnabled(true);
  2568. -
  2569. -           activeChar.getDressMeData().setChestId(45018);
  2570. -           activeChar.getDressMeData().setHairId(45019);
  2571. -           activeChar.broadcastUserInfo();
  2572. -       }
  2573. -      
  2574. -       // White King
  2575. -       if (command.equals("trySkin_WKing"))
  2576. -       {
  2577. -           if (activeChar.isTryDressMeEnabled())
  2578. -           {
  2579. -               activeChar.sendMessage("You are already trying a new skin.");
  2580. -               return false;
  2581. -           }
  2582. -          
  2583. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2584. -           {
  2585. -               activeChar.sendMessage("This command can only be used on peace area.");
  2586. -               return false;
  2587. -           }
  2588. -            
  2589. -           if (activeChar.getDressMeData() == null)
  2590. -           {
  2591. -               DressMeData dmd = new DressMeData();
  2592. -               activeChar.setDressMeData(dmd);
  2593. -           }
  2594. -          
  2595. -           activeChar.setTryDressMeEnabled(true);
  2596. -           activeChar.setDressMeHelmEnabled(true);
  2597. -           activeChar.setDressMeEnabled(true);
  2598. -
  2599. -           activeChar.getDressMeData().setChestId(45020);
  2600. -           activeChar.getDressMeData().setHairId(45021);
  2601. -           activeChar.broadcastUserInfo();
  2602. -
  2603. -           initCountdown(activeChar, 5);
  2604. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2605. -           {
  2606. -               @Override
  2607. -               public void run()
  2608. -               {
  2609. -                   activeChar.setTryDressMeEnabled(false);
  2610. -                   activeChar.setDressMeHelmEnabled(false);
  2611. -                   activeChar.setDressMeEnabled(false);
  2612. -                   activeChar.broadcastUserInfo();
  2613. -               }
  2614. -
  2615. -           }, 5 * 1000);
  2616. -       }
  2617. -      
  2618. -       if (command.equals("WKing"))
  2619. -       {
  2620. -           if (!activeChar.isVip())
  2621. -           {
  2622. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2623. -               return false;
  2624. -           }
  2625. -          
  2626. -           if (activeChar.isTryDressMeEnabled())
  2627. -           {
  2628. -               activeChar.sendMessage("You are already trying a new skin.");
  2629. -               return false;
  2630. -           }
  2631. -          
  2632. -           if (activeChar.getDressMeData() == null)
  2633. -           {
  2634. -               DressMeData dmd = new DressMeData();
  2635. -               activeChar.setDressMeData(dmd);
  2636. -           }
  2637. -          
  2638. -           activeChar.setDressMeHelmEnabled(true);
  2639. -           activeChar.setDressMeEnabled(true);
  2640. -
  2641. -           activeChar.getDressMeData().setChestId(45020);
  2642. -           activeChar.getDressMeData().setHairId(45021);
  2643. -           activeChar.broadcastUserInfo();
  2644. -       }
  2645. -      
  2646. -       // Valkyrie Armor
  2647. -       if (command.equals("trySkin_Valkyrie"))
  2648. -       {
  2649. -           if (activeChar.isTryDressMeEnabled())
  2650. -           {
  2651. -               activeChar.sendMessage("You are already trying a new skin.");
  2652. -               return false;
  2653. -           }
  2654. -          
  2655. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2656. -           {
  2657. -               activeChar.sendMessage("This command can only be used on peace area.");
  2658. -               return false;
  2659. -           }
  2660. -            
  2661. -           if (activeChar.getDressMeData() == null)
  2662. -           {
  2663. -               DressMeData dmd = new DressMeData();
  2664. -               activeChar.setDressMeData(dmd);
  2665. -           }
  2666. -          
  2667. -           activeChar.setTryDressMeEnabled(true);
  2668. -           activeChar.setDressMeHelmEnabled(true);
  2669. -           activeChar.setDressMeEnabled(true);
  2670. -
  2671. -           activeChar.getDressMeData().setChestId(45022);
  2672. -           activeChar.getDressMeData().setHairId(45023);
  2673. -           activeChar.broadcastUserInfo();
  2674. -
  2675. -           initCountdown(activeChar, 5);
  2676. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2677. -           {
  2678. -               @Override
  2679. -               public void run()
  2680. -               {
  2681. -                   activeChar.setTryDressMeEnabled(false);
  2682. -                   activeChar.setDressMeHelmEnabled(false);
  2683. -                   activeChar.setDressMeEnabled(false);
  2684. -                   activeChar.broadcastUserInfo();
  2685. -               }
  2686. -
  2687. -           }, 5 * 1000);
  2688. -       }
  2689. -      
  2690. -       if (command.equals("Valkyrie"))
  2691. -       {
  2692. -           if (!activeChar.isVip())
  2693. -           {
  2694. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2695. -               return false;
  2696. -           }
  2697. -          
  2698. -           if (activeChar.isTryDressMeEnabled())
  2699. -           {
  2700. -               activeChar.sendMessage("You are already trying a new skin.");
  2701. -               return false;
  2702. -           }
  2703. -          
  2704. -           if (activeChar.getDressMeData() == null)
  2705. -           {
  2706. -               DressMeData dmd = new DressMeData();
  2707. -               activeChar.setDressMeData(dmd);
  2708. -           }
  2709. -          
  2710. -           activeChar.setDressMeHelmEnabled(true);
  2711. -           activeChar.setDressMeEnabled(true);
  2712. -
  2713. -           activeChar.getDressMeData().setChestId(45022);
  2714. -           activeChar.getDressMeData().setHairId(45023);
  2715. -           activeChar.broadcastUserInfo();
  2716. -       }
  2717. -      
  2718. -       // Anakim Armor
  2719. -       if (command.equals("trySkin_Anakim"))
  2720. -       {
  2721. -           if (activeChar.isTryDressMeEnabled())
  2722. -           {
  2723. -               activeChar.sendMessage("You are already trying a new skin.");
  2724. -               return false;
  2725. -           }
  2726. -          
  2727. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2728. -           {
  2729. -               activeChar.sendMessage("This command can only be used on peace area.");
  2730. -               return false;
  2731. -           }
  2732. -            
  2733. -           if (activeChar.getDressMeData() == null)
  2734. -           {
  2735. -               DressMeData dmd = new DressMeData();
  2736. -               activeChar.setDressMeData(dmd);
  2737. -           }
  2738. -          
  2739. -           activeChar.setTryDressMeEnabled(true);
  2740. -           activeChar.setDressMeHelmEnabled(true);
  2741. -           activeChar.setDressMeEnabled(true);
  2742. -
  2743. -           activeChar.getDressMeData().setChestId(45024);
  2744. -           activeChar.getDressMeData().setHairId(45025);
  2745. -           activeChar.broadcastUserInfo();
  2746. -
  2747. -           initCountdown(activeChar, 5);
  2748. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2749. -           {
  2750. -               @Override
  2751. -               public void run()
  2752. -               {
  2753. -                   activeChar.setTryDressMeEnabled(false);
  2754. -                   activeChar.setDressMeHelmEnabled(false);
  2755. -                   activeChar.setDressMeEnabled(false);
  2756. -                   activeChar.broadcastUserInfo();
  2757. -               }
  2758. -
  2759. -           }, 5 * 1000);
  2760. -       }
  2761. -      
  2762. -       if (command.equals("Anakim"))
  2763. -       {
  2764. -           if (!activeChar.isVip())
  2765. -           {
  2766. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2767. -               return false;
  2768. -           }
  2769. -          
  2770. -           if (activeChar.isTryDressMeEnabled())
  2771. -           {
  2772. -               activeChar.sendMessage("You are already trying a new skin.");
  2773. -               return false;
  2774. -           }
  2775. -          
  2776. -           if (activeChar.getDressMeData() == null)
  2777. -           {
  2778. -               DressMeData dmd = new DressMeData();
  2779. -               activeChar.setDressMeData(dmd);
  2780. -           }
  2781. -          
  2782. -           activeChar.setDressMeHelmEnabled(true);
  2783. -           activeChar.setDressMeEnabled(true);
  2784. -
  2785. -           activeChar.getDressMeData().setChestId(45024);
  2786. -           activeChar.getDressMeData().setHairId(45025);
  2787. -           activeChar.broadcastUserInfo();
  2788. -       }
  2789. -      
  2790. -       // Red Pirate
  2791. -       if (command.equals("trySkin_RPirate"))
  2792. -       {
  2793. -           if (activeChar.isTryDressMeEnabled())
  2794. -           {
  2795. -               activeChar.sendMessage("You are already trying a new skin.");
  2796. -               return false;
  2797. -           }
  2798. -          
  2799. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2800. -           {
  2801. -               activeChar.sendMessage("This command can only be used on peace area.");
  2802. -               return false;
  2803. -           }
  2804. -            
  2805. -           if (activeChar.getDressMeData() == null)
  2806. -           {
  2807. -               DressMeData dmd = new DressMeData();
  2808. -               activeChar.setDressMeData(dmd);
  2809. -           }
  2810. -          
  2811. -           activeChar.setTryDressMeEnabled(true);
  2812. -           activeChar.setDressMeHelmEnabled(true);
  2813. -           activeChar.setDressMeEnabled(true);
  2814. -
  2815. -           activeChar.getDressMeData().setChestId(45026);
  2816. -           activeChar.getDressMeData().setHairId(45027);
  2817. -           activeChar.broadcastUserInfo();
  2818. -
  2819. -           initCountdown(activeChar, 5);
  2820. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2821. -           {
  2822. -               @Override
  2823. -               public void run()
  2824. -               {
  2825. -                   activeChar.setTryDressMeEnabled(false);
  2826. -                   activeChar.setDressMeHelmEnabled(false);
  2827. -                   activeChar.setDressMeEnabled(false);
  2828. -                   activeChar.broadcastUserInfo();
  2829. -               }
  2830. -
  2831. -           }, 5 * 1000);
  2832. -       }
  2833. -      
  2834. -       if (command.equals("RPirate"))
  2835. -       {
  2836. -           if (!activeChar.isVip())
  2837. -           {
  2838. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2839. -               return false;
  2840. -           }
  2841. -          
  2842. -           if (activeChar.isTryDressMeEnabled())
  2843. -           {
  2844. -               activeChar.sendMessage("You are already trying a new skin.");
  2845. -               return false;
  2846. -           }
  2847. -          
  2848. -           if (activeChar.getDressMeData() == null)
  2849. -           {
  2850. -               DressMeData dmd = new DressMeData();
  2851. -               activeChar.setDressMeData(dmd);
  2852. -           }
  2853. -          
  2854. -           activeChar.setDressMeHelmEnabled(true);
  2855. -           activeChar.setDressMeEnabled(true);
  2856. -
  2857. -           activeChar.getDressMeData().setChestId(45026);
  2858. -           activeChar.getDressMeData().setHairId(45027);
  2859. -           activeChar.broadcastUserInfo();
  2860. -       }
  2861. -      
  2862. -       // Blue Pirate
  2863. -       if (command.equals("trySkin_BPirate"))
  2864. -       {
  2865. -           if (activeChar.isTryDressMeEnabled())
  2866. -           {
  2867. -               activeChar.sendMessage("You are already trying a new skin.");
  2868. -               return false;
  2869. -           }
  2870. -          
  2871. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2872. -           {
  2873. -               activeChar.sendMessage("This command can only be used on peace area.");
  2874. -               return false;
  2875. -           }
  2876. -            
  2877. -           if (activeChar.getDressMeData() == null)
  2878. -           {
  2879. -               DressMeData dmd = new DressMeData();
  2880. -               activeChar.setDressMeData(dmd);
  2881. -           }
  2882. -          
  2883. -           activeChar.setTryDressMeEnabled(true);
  2884. -           activeChar.setDressMeHelmEnabled(true);
  2885. -           activeChar.setDressMeEnabled(true);
  2886. -
  2887. -           activeChar.getDressMeData().setChestId(45028);
  2888. -           activeChar.getDressMeData().setHairId(45029);
  2889. -           activeChar.broadcastUserInfo();
  2890. -
  2891. -           initCountdown(activeChar, 5);
  2892. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2893. -           {
  2894. -               @Override
  2895. -               public void run()
  2896. -               {
  2897. -                   activeChar.setTryDressMeEnabled(false);
  2898. -                   activeChar.setDressMeHelmEnabled(false);
  2899. -                   activeChar.setDressMeEnabled(false);
  2900. -                   activeChar.broadcastUserInfo();
  2901. -               }
  2902. -
  2903. -           }, 5 * 1000);
  2904. -       }
  2905. -      
  2906. -       if (command.equals("BPirate"))
  2907. -       {
  2908. -           if (!activeChar.isVip())
  2909. -           {
  2910. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2911. -               return false;
  2912. -           }
  2913. -          
  2914. -           if (activeChar.isTryDressMeEnabled())
  2915. -           {
  2916. -               activeChar.sendMessage("You are already trying a new skin.");
  2917. -               return false;
  2918. -           }
  2919. -          
  2920. -           if (activeChar.getDressMeData() == null)
  2921. -           {
  2922. -               DressMeData dmd = new DressMeData();
  2923. -               activeChar.setDressMeData(dmd);
  2924. -           }
  2925. -          
  2926. -           activeChar.setDressMeHelmEnabled(true);
  2927. -           activeChar.setDressMeEnabled(true);
  2928. -
  2929. -           activeChar.getDressMeData().setChestId(45028);
  2930. -           activeChar.getDressMeData().setHairId(45029);
  2931. -           activeChar.broadcastUserInfo();
  2932. -       }
  2933. -      
  2934. -       // Ninja
  2935. -       if (command.equals("trySkin_Ninja"))
  2936. -       {
  2937. -           if (activeChar.isTryDressMeEnabled())
  2938. -           {
  2939. -               activeChar.sendMessage("You are already trying a new skin.");
  2940. -               return false;
  2941. -           }
  2942. -          
  2943. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  2944. -           {
  2945. -               activeChar.sendMessage("This command can only be used on peace area.");
  2946. -               return false;
  2947. -           }
  2948. -            
  2949. -           if (activeChar.getDressMeData() == null)
  2950. -           {
  2951. -               DressMeData dmd = new DressMeData();
  2952. -               activeChar.setDressMeData(dmd);
  2953. -           }
  2954. -          
  2955. -           activeChar.setTryDressMeEnabled(true);
  2956. -           activeChar.setDressMeHelmEnabled(true);
  2957. -           activeChar.setDressMeEnabled(true);
  2958. -
  2959. -           activeChar.getDressMeData().setChestId(45030);
  2960. -           activeChar.getDressMeData().setHairId(45031);
  2961. -           activeChar.broadcastUserInfo();
  2962. -
  2963. -           initCountdown(activeChar, 5);
  2964. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  2965. -           {
  2966. -               @Override
  2967. -               public void run()
  2968. -               {
  2969. -                   activeChar.setTryDressMeEnabled(false);
  2970. -                   activeChar.setDressMeHelmEnabled(false);
  2971. -                   activeChar.setDressMeEnabled(false);
  2972. -                   activeChar.broadcastUserInfo();
  2973. -               }
  2974. -
  2975. -           }, 5 * 1000);
  2976. -       }
  2977. -      
  2978. -       if (command.equals("Ninja"))
  2979. -       {
  2980. -           if (!activeChar.isVip())
  2981. -           {
  2982. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  2983. -               return false;
  2984. -           }
  2985. -          
  2986. -           if (activeChar.isTryDressMeEnabled())
  2987. -           {
  2988. -               activeChar.sendMessage("You are already trying a new skin.");
  2989. -               return false;
  2990. -           }
  2991. -          
  2992. -           if (activeChar.getDressMeData() == null)
  2993. -           {
  2994. -               DressMeData dmd = new DressMeData();
  2995. -               activeChar.setDressMeData(dmd);
  2996. -           }
  2997. -          
  2998. -           activeChar.setDressMeHelmEnabled(true);
  2999. -           activeChar.setDressMeEnabled(true);
  3000. -
  3001. -           activeChar.getDressMeData().setChestId(45030);
  3002. -           activeChar.getDressMeData().setHairId(45031);
  3003. -           activeChar.broadcastUserInfo();
  3004. -       }
  3005. -      
  3006. -       // Samurai
  3007. -       if (command.equals("trySkin_Samurai"))
  3008. -       {
  3009. -           if (activeChar.isTryDressMeEnabled())
  3010. -           {
  3011. -               activeChar.sendMessage("You are already trying a new skin.");
  3012. -               return false;
  3013. -           }
  3014. -          
  3015. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3016. -           {
  3017. -               activeChar.sendMessage("This command can only be used on peace area.");
  3018. -               return false;
  3019. -           }
  3020. -            
  3021. -           if (activeChar.getDressMeData() == null)
  3022. -           {
  3023. -               DressMeData dmd = new DressMeData();
  3024. -               activeChar.setDressMeData(dmd);
  3025. -           }
  3026. -          
  3027. -           activeChar.setTryDressMeEnabled(true);
  3028. -           activeChar.setDressMeHelmEnabled(true);
  3029. -           activeChar.setDressMeEnabled(true);
  3030. -
  3031. -           activeChar.getDressMeData().setChestId(45032);
  3032. -           activeChar.getDressMeData().setHairId(45033);
  3033. -           activeChar.broadcastUserInfo();
  3034. -
  3035. -           initCountdown(activeChar, 5);
  3036. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3037. -           {
  3038. -               @Override
  3039. -               public void run()
  3040. -               {
  3041. -                   activeChar.setTryDressMeEnabled(false);
  3042. -                   activeChar.setDressMeHelmEnabled(false);
  3043. -                   activeChar.setDressMeEnabled(false);
  3044. -                   activeChar.broadcastUserInfo();
  3045. -               }
  3046. -
  3047. -           }, 5 * 1000);
  3048. -       }
  3049. -      
  3050. -       if (command.equals("Samurai"))
  3051. -       {
  3052. -           if (!activeChar.isVip())
  3053. -           {
  3054. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3055. -               return false;
  3056. -           }
  3057. -          
  3058. -           if (activeChar.isTryDressMeEnabled())
  3059. -           {
  3060. -               activeChar.sendMessage("You are already trying a new skin.");
  3061. -               return false;
  3062. -           }
  3063. -          
  3064. -           if (activeChar.getDressMeData() == null)
  3065. -           {
  3066. -               DressMeData dmd = new DressMeData();
  3067. -               activeChar.setDressMeData(dmd);
  3068. -           }
  3069. -          
  3070. -           activeChar.setDressMeHelmEnabled(true);
  3071. -           activeChar.setDressMeEnabled(true);
  3072. -
  3073. -           activeChar.getDressMeData().setChestId(45032);
  3074. -           activeChar.getDressMeData().setHairId(45033);
  3075. -           activeChar.broadcastUserInfo();
  3076. -       }
  3077. -
  3078. -       // Red Magician
  3079. -       if (command.equals("trySkin_RMagician"))
  3080. -       {
  3081. -           if (activeChar.isTryDressMeEnabled())
  3082. -           {
  3083. -               activeChar.sendMessage("You are already trying a new skin.");
  3084. -               return false;
  3085. -           }
  3086. -          
  3087. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3088. -           {
  3089. -               activeChar.sendMessage("This command can only be used on peace area.");
  3090. -               return false;
  3091. -           }
  3092. -            
  3093. -           if (activeChar.getDressMeData() == null)
  3094. -           {
  3095. -               DressMeData dmd = new DressMeData();
  3096. -               activeChar.setDressMeData(dmd);
  3097. -           }
  3098. -          
  3099. -           activeChar.setTryDressMeEnabled(true);
  3100. -           activeChar.setDressMeHelmEnabled(true);
  3101. -           activeChar.setDressMeEnabled(true);
  3102. -
  3103. -           activeChar.getDressMeData().setChestId(45034);
  3104. -           activeChar.getDressMeData().setHairId(45035);
  3105. -           activeChar.broadcastUserInfo();
  3106. -
  3107. -           initCountdown(activeChar, 5);
  3108. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3109. -           {
  3110. -               @Override
  3111. -               public void run()
  3112. -               {
  3113. -                   activeChar.setTryDressMeEnabled(false);
  3114. -                   activeChar.setDressMeHelmEnabled(false);
  3115. -                   activeChar.setDressMeEnabled(false);
  3116. -                   activeChar.broadcastUserInfo();
  3117. -               }
  3118. -
  3119. -           }, 5 * 1000);
  3120. -       }
  3121. -      
  3122. -       if (command.equals("RMagician"))
  3123. -       {
  3124. -           if (!activeChar.isVip())
  3125. -           {
  3126. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3127. -               return false;
  3128. -           }
  3129. -          
  3130. -           if (activeChar.isTryDressMeEnabled())
  3131. -           {
  3132. -               activeChar.sendMessage("You are already trying a new skin.");
  3133. -               return false;
  3134. -           }
  3135. -          
  3136. -           if (activeChar.getDressMeData() == null)
  3137. -           {
  3138. -               DressMeData dmd = new DressMeData();
  3139. -               activeChar.setDressMeData(dmd);
  3140. -           }
  3141. -          
  3142. -           activeChar.setDressMeHelmEnabled(true);
  3143. -           activeChar.setDressMeEnabled(true);
  3144. -
  3145. -           activeChar.getDressMeData().setChestId(45034);
  3146. -           activeChar.getDressMeData().setHairId(45035);
  3147. -           activeChar.broadcastUserInfo();
  3148. -       }
  3149. -
  3150. -       // Vampiric Armor
  3151. -       if (command.equals("trySkin_Vampiric"))
  3152. -       {
  3153. -           if (activeChar.isTryDressMeEnabled())
  3154. -           {
  3155. -               activeChar.sendMessage("You are already trying a new skin.");
  3156. -               return false;
  3157. -           }
  3158. -          
  3159. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3160. -           {
  3161. -               activeChar.sendMessage("This command can only be used on peace area.");
  3162. -               return false;
  3163. -           }
  3164. -            
  3165. -           if (activeChar.getDressMeData() == null)
  3166. -           {
  3167. -               DressMeData dmd = new DressMeData();
  3168. -               activeChar.setDressMeData(dmd);
  3169. -           }
  3170. -          
  3171. -           activeChar.setTryDressMeEnabled(true);
  3172. -           activeChar.setDressMeHelmEnabled(true);
  3173. -           activeChar.setDressMeEnabled(true);
  3174. -
  3175. -           activeChar.getDressMeData().setChestId(45036);
  3176. -           activeChar.getDressMeData().setHairId(45037);
  3177. -           activeChar.broadcastUserInfo();
  3178. -
  3179. -           initCountdown(activeChar, 5);
  3180. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3181. -           {
  3182. -               @Override
  3183. -               public void run()
  3184. -               {
  3185. -                   activeChar.setTryDressMeEnabled(false);
  3186. -                   activeChar.setDressMeHelmEnabled(false);
  3187. -                   activeChar.setDressMeEnabled(false);
  3188. -                   activeChar.broadcastUserInfo();
  3189. -               }
  3190. -
  3191. -           }, 5 * 1000);
  3192. -       }
  3193. -      
  3194. -       if (command.equals("Vampiric"))
  3195. -       {
  3196. -           if (!activeChar.isVip())
  3197. -           {
  3198. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3199. -               return false;
  3200. -           }
  3201. -          
  3202. -           if (activeChar.isTryDressMeEnabled())
  3203. -           {
  3204. -               activeChar.sendMessage("You are already trying a new skin.");
  3205. -               return false;
  3206. -           }
  3207. -          
  3208. -           if (activeChar.getDressMeData() == null)
  3209. -           {
  3210. -               DressMeData dmd = new DressMeData();
  3211. -               activeChar.setDressMeData(dmd);
  3212. -           }
  3213. -          
  3214. -           activeChar.setDressMeHelmEnabled(true);
  3215. -           activeChar.setDressMeEnabled(true);
  3216. -
  3217. -           activeChar.getDressMeData().setChestId(45036);
  3218. -           activeChar.getDressMeData().setHairId(45037);
  3219. -           activeChar.broadcastUserInfo();
  3220. -       }      
  3221. -      
  3222. -       // Beleth Armor
  3223. -       if (command.equals("trySkin_Beleth"))
  3224. -       {
  3225. -           if (activeChar.isTryDressMeEnabled())
  3226. -           {
  3227. -               activeChar.sendMessage("You are already trying a new skin.");
  3228. -               return false;
  3229. -           }
  3230. -          
  3231. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3232. -           {
  3233. -               activeChar.sendMessage("This command can only be used on peace area.");
  3234. -               return false;
  3235. -           }
  3236. -            
  3237. -           if (activeChar.getDressMeData() == null)
  3238. -           {
  3239. -               DressMeData dmd = new DressMeData();
  3240. -               activeChar.setDressMeData(dmd);
  3241. -           }
  3242. -          
  3243. -           activeChar.setTryDressMeEnabled(true);
  3244. -           activeChar.setDressMeHelmEnabled(true);
  3245. -           activeChar.setDressMeEnabled(true);
  3246. -
  3247. -           activeChar.getDressMeData().setChestId(45038);
  3248. -           activeChar.getDressMeData().setHairId(45039);
  3249. -           activeChar.broadcastUserInfo();
  3250. -
  3251. -           initCountdown(activeChar, 5);
  3252. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3253. -           {
  3254. -               @Override
  3255. -               public void run()
  3256. -               {
  3257. -                   activeChar.setTryDressMeEnabled(false);
  3258. -                   activeChar.setDressMeHelmEnabled(false);
  3259. -                   activeChar.setDressMeEnabled(false);
  3260. -                   activeChar.broadcastUserInfo();
  3261. -               }
  3262. -
  3263. -           }, 5 * 1000);
  3264. -       }
  3265. -      
  3266. -       if (command.equals("Beleth"))
  3267. -       {
  3268. -           if (!activeChar.isVip())
  3269. -           {
  3270. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3271. -               return false;
  3272. -           }
  3273. -          
  3274. -           if (activeChar.isTryDressMeEnabled())
  3275. -           {
  3276. -               activeChar.sendMessage("You are already trying a new skin.");
  3277. -               return false;
  3278. -           }
  3279. -          
  3280. -           if (activeChar.getDressMeData() == null)
  3281. -           {
  3282. -               DressMeData dmd = new DressMeData();
  3283. -               activeChar.setDressMeData(dmd);
  3284. -           }
  3285. -          
  3286. -           activeChar.setDressMeHelmEnabled(true);
  3287. -           activeChar.setDressMeEnabled(true);
  3288. -
  3289. -           activeChar.getDressMeData().setChestId(45038);
  3290. -           activeChar.getDressMeData().setHairId(45039);
  3291. -           activeChar.broadcastUserInfo();
  3292. -       }
  3293. -      
  3294. -       // Cyborg Armor
  3295. -       if (command.equals("trySkin_Cyborg"))
  3296. -       {
  3297. -           if (activeChar.isTryDressMeEnabled())
  3298. -           {
  3299. -               activeChar.sendMessage("You are already trying a new skin.");
  3300. -               return false;
  3301. -           }
  3302. -          
  3303. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3304. -           {
  3305. -               activeChar.sendMessage("This command can only be used on peace area.");
  3306. -               return false;
  3307. -           }
  3308. -            
  3309. -           if (activeChar.getDressMeData() == null)
  3310. -           {
  3311. -               DressMeData dmd = new DressMeData();
  3312. -               activeChar.setDressMeData(dmd);
  3313. -           }
  3314. -          
  3315. -           activeChar.setTryDressMeEnabled(true);
  3316. -           activeChar.setDressMeHelmEnabled(true);
  3317. -           activeChar.setDressMeEnabled(true);
  3318. -
  3319. -           activeChar.getDressMeData().setChestId(45040);
  3320. -           activeChar.getDressMeData().setHairId(45041);
  3321. -           activeChar.broadcastUserInfo();
  3322. -
  3323. -           initCountdown(activeChar, 5);
  3324. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3325. -           {
  3326. -               @Override
  3327. -               public void run()
  3328. -               {
  3329. -                   activeChar.setTryDressMeEnabled(false);
  3330. -                   activeChar.setDressMeHelmEnabled(false);
  3331. -                   activeChar.setDressMeEnabled(false);
  3332. -                   activeChar.broadcastUserInfo();
  3333. -               }
  3334. -
  3335. -           }, 5 * 1000);
  3336. -       }
  3337. -      
  3338. -       if (command.equals("Cyborg"))
  3339. -       {
  3340. -           if (!activeChar.isVip())
  3341. -           {
  3342. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3343. -               return false;
  3344. -           }
  3345. -          
  3346. -           if (activeChar.isTryDressMeEnabled())
  3347. -           {
  3348. -               activeChar.sendMessage("You are already trying a new skin.");
  3349. -               return false;
  3350. -           }
  3351. -          
  3352. -           if (activeChar.getDressMeData() == null)
  3353. -           {
  3354. -               DressMeData dmd = new DressMeData();
  3355. -               activeChar.setDressMeData(dmd);
  3356. -           }
  3357. -          
  3358. -           activeChar.setDressMeHelmEnabled(true);
  3359. -           activeChar.setDressMeEnabled(true);
  3360. -
  3361. -           activeChar.getDressMeData().setChestId(45040);
  3362. -           activeChar.getDressMeData().setHairId(45041);
  3363. -           activeChar.broadcastUserInfo();
  3364. -       }
  3365. -      
  3366. -       // Cowboy Armor
  3367. -       if (command.equals("trySkin_Cowboy"))
  3368. -       {
  3369. -           if (activeChar.isTryDressMeEnabled())
  3370. -           {
  3371. -               activeChar.sendMessage("You are already trying a new skin.");
  3372. -               return false;
  3373. -           }
  3374. -          
  3375. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3376. -           {
  3377. -               activeChar.sendMessage("This command can only be used on peace area.");
  3378. -               return false;
  3379. -           }
  3380. -            
  3381. -           if (activeChar.getDressMeData() == null)
  3382. -           {
  3383. -               DressMeData dmd = new DressMeData();
  3384. -               activeChar.setDressMeData(dmd);
  3385. -           }
  3386. -          
  3387. -           activeChar.setTryDressMeEnabled(true);
  3388. -           activeChar.setDressMeHelmEnabled(true);
  3389. -           activeChar.setDressMeEnabled(true);
  3390. -
  3391. -           activeChar.getDressMeData().setChestId(45042);
  3392. -           activeChar.getDressMeData().setHairId(45043);
  3393. -           activeChar.broadcastUserInfo();
  3394. -
  3395. -           initCountdown(activeChar, 5);
  3396. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3397. -           {
  3398. -               @Override
  3399. -               public void run()
  3400. -               {
  3401. -                   activeChar.setTryDressMeEnabled(false);
  3402. -                   activeChar.setDressMeHelmEnabled(false);
  3403. -                   activeChar.setDressMeEnabled(false);
  3404. -                   activeChar.broadcastUserInfo();
  3405. -               }
  3406. -
  3407. -           }, 5 * 1000);
  3408. -       }
  3409. -      
  3410. -       if (command.equals("Cowboy"))
  3411. -       {
  3412. -           if (!activeChar.isVip())
  3413. -           {
  3414. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3415. -               return false;
  3416. -           }
  3417. -          
  3418. -           if (activeChar.isTryDressMeEnabled())
  3419. -           {
  3420. -               activeChar.sendMessage("You are already trying a new skin.");
  3421. -               return false;
  3422. -           }
  3423. -          
  3424. -           if (activeChar.getDressMeData() == null)
  3425. -           {
  3426. -               DressMeData dmd = new DressMeData();
  3427. -               activeChar.setDressMeData(dmd);
  3428. -           }
  3429. -          
  3430. -           activeChar.setDressMeHelmEnabled(true);
  3431. -           activeChar.setDressMeEnabled(true);
  3432. -
  3433. -           activeChar.getDressMeData().setChestId(45042);
  3434. -           activeChar.getDressMeData().setHairId(45043);
  3435. -           activeChar.broadcastUserInfo();
  3436. -       }
  3437. -
  3438. -       // Barbarian Armor
  3439. -       if (command.equals("trySkin_Barbarian"))
  3440. -       {
  3441. -           if (activeChar.isTryDressMeEnabled())
  3442. -           {
  3443. -               activeChar.sendMessage("You are already trying a new skin.");
  3444. -               return false;
  3445. -           }
  3446. -          
  3447. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3448. -           {
  3449. -               activeChar.sendMessage("This command can only be used on peace area.");
  3450. -               return false;
  3451. -           }
  3452. -            
  3453. -           if (activeChar.getDressMeData() == null)
  3454. -           {
  3455. -               DressMeData dmd = new DressMeData();
  3456. -               activeChar.setDressMeData(dmd);
  3457. -           }
  3458. -          
  3459. -           activeChar.setTryDressMeEnabled(true);
  3460. -           activeChar.setDressMeHelmEnabled(true);
  3461. -           activeChar.setDressMeEnabled(true);
  3462. -
  3463. -           activeChar.getDressMeData().setChestId(45044);
  3464. -           activeChar.getDressMeData().setHairId(45045);
  3465. -           activeChar.broadcastUserInfo();
  3466. -
  3467. -           initCountdown(activeChar, 5);
  3468. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3469. -           {
  3470. -               @Override
  3471. -               public void run()
  3472. -               {
  3473. -                   activeChar.setTryDressMeEnabled(false);
  3474. -                   activeChar.setDressMeHelmEnabled(false);
  3475. -                   activeChar.setDressMeEnabled(false);
  3476. -                   activeChar.broadcastUserInfo();
  3477. -               }
  3478. -
  3479. -           }, 5 * 1000);
  3480. -       }
  3481. -      
  3482. -       if (command.equals("Barbarian"))
  3483. -       {
  3484. -           if (!activeChar.isVip())
  3485. -           {
  3486. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3487. -               return false;
  3488. -           }
  3489. -          
  3490. -           if (activeChar.isTryDressMeEnabled())
  3491. -           {
  3492. -               activeChar.sendMessage("You are already trying a new skin.");
  3493. -               return false;
  3494. -           }
  3495. -          
  3496. -           if (activeChar.getDressMeData() == null)
  3497. -           {
  3498. -               DressMeData dmd = new DressMeData();
  3499. -               activeChar.setDressMeData(dmd);
  3500. -           }
  3501. -          
  3502. -           activeChar.setDressMeHelmEnabled(true);
  3503. -           activeChar.setDressMeEnabled(true);
  3504. -
  3505. -           activeChar.getDressMeData().setChestId(45044);
  3506. -           activeChar.getDressMeData().setHairId(45045);
  3507. -           activeChar.broadcastUserInfo();
  3508. -       }
  3509. -      
  3510. -       // Dragon Armor
  3511. -       if (command.equals("trySkin_Dragon"))
  3512. -       {
  3513. -           if (activeChar.isTryDressMeEnabled())
  3514. -           {
  3515. -               activeChar.sendMessage("You are already trying a new skin.");
  3516. -               return false;
  3517. -           }
  3518. -          
  3519. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3520. -           {
  3521. -               activeChar.sendMessage("This command can only be used on peace area.");
  3522. -               return false;
  3523. -           }
  3524. -            
  3525. -           if (activeChar.getDressMeData() == null)
  3526. -           {
  3527. -               DressMeData dmd = new DressMeData();
  3528. -               activeChar.setDressMeData(dmd);
  3529. -           }
  3530. -          
  3531. -           activeChar.setTryDressMeEnabled(true);
  3532. -           activeChar.setDressMeHelmEnabled(true);
  3533. -           activeChar.setDressMeEnabled(true);
  3534. -
  3535. -           activeChar.getDressMeData().setChestId(45046);
  3536. -           activeChar.getDressMeData().setHairId(45047);
  3537. -           activeChar.broadcastUserInfo();
  3538. -
  3539. -           initCountdown(activeChar, 5);
  3540. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3541. -           {
  3542. -               @Override
  3543. -               public void run()
  3544. -               {
  3545. -                   activeChar.setTryDressMeEnabled(false);
  3546. -                   activeChar.setDressMeHelmEnabled(false);
  3547. -                   activeChar.setDressMeEnabled(false);
  3548. -                   activeChar.broadcastUserInfo();
  3549. -               }
  3550. -
  3551. -           }, 5 * 1000);
  3552. -       }
  3553. -      
  3554. -       if (command.equals("Dragon"))
  3555. -       {
  3556. -           if (!activeChar.isVip())
  3557. -           {
  3558. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3559. -               return false;
  3560. -           }
  3561. -          
  3562. -           if (activeChar.isTryDressMeEnabled())
  3563. -           {
  3564. -               activeChar.sendMessage("You are already trying a new skin.");
  3565. -               return false;
  3566. -           }
  3567. -          
  3568. -           if (activeChar.getDressMeData() == null)
  3569. -           {
  3570. -               DressMeData dmd = new DressMeData();
  3571. -               activeChar.setDressMeData(dmd);
  3572. -           }
  3573. -          
  3574. -           activeChar.setDressMeHelmEnabled(true);
  3575. -           activeChar.setDressMeEnabled(true);
  3576. -
  3577. -           activeChar.getDressMeData().setChestId(45046);
  3578. -           activeChar.getDressMeData().setHairId(45047);
  3579. -           activeChar.broadcastUserInfo();
  3580. -       }
  3581. -      
  3582. -       // White Knight
  3583. -       if (command.equals("trySkin_WKnight"))
  3584. -       {
  3585. -           if (activeChar.isTryDressMeEnabled())
  3586. -           {
  3587. -               activeChar.sendMessage("You are already trying a new skin.");
  3588. -               return false;
  3589. -           }
  3590. -          
  3591. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3592. -           {
  3593. -               activeChar.sendMessage("This command can only be used on peace area.");
  3594. -               return false;
  3595. -           }
  3596. -            
  3597. -           if (activeChar.getDressMeData() == null)
  3598. -           {
  3599. -               DressMeData dmd = new DressMeData();
  3600. -               activeChar.setDressMeData(dmd);
  3601. -           }
  3602. -          
  3603. -           activeChar.setTryDressMeEnabled(true);
  3604. -           activeChar.setDressMeHelmEnabled(true);
  3605. -           activeChar.setDressMeEnabled(true);
  3606. -
  3607. -           activeChar.getDressMeData().setChestId(45048);
  3608. -           activeChar.getDressMeData().setHairId(45049);
  3609. -           activeChar.broadcastUserInfo();
  3610. -
  3611. -           initCountdown(activeChar, 5);
  3612. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3613. -           {
  3614. -               @Override
  3615. -               public void run()
  3616. -               {
  3617. -                   activeChar.setTryDressMeEnabled(false);
  3618. -                   activeChar.setDressMeHelmEnabled(false);
  3619. -                   activeChar.setDressMeEnabled(false);
  3620. -                   activeChar.broadcastUserInfo();
  3621. -               }
  3622. -
  3623. -           }, 5 * 1000);
  3624. -       }
  3625. -      
  3626. -       if (command.equals("WKnight"))
  3627. -       {
  3628. -           if (!activeChar.isVip())
  3629. -           {
  3630. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3631. -               return false;
  3632. -           }
  3633. -          
  3634. -           if (activeChar.isTryDressMeEnabled())
  3635. -           {
  3636. -               activeChar.sendMessage("You are already trying a new skin.");
  3637. -               return false;
  3638. -           }
  3639. -          
  3640. -           if (activeChar.getDressMeData() == null)
  3641. -           {
  3642. -               DressMeData dmd = new DressMeData();
  3643. -               activeChar.setDressMeData(dmd);
  3644. -           }
  3645. -          
  3646. -           activeChar.setDressMeHelmEnabled(true);
  3647. -           activeChar.setDressMeEnabled(true);
  3648. -
  3649. -           activeChar.getDressMeData().setChestId(45048);
  3650. -           activeChar.getDressMeData().setHairId(45049);
  3651. -           activeChar.broadcastUserInfo();
  3652. -       }
  3653. -
  3654. -       // Red Christmas
  3655. -       if (command.equals("trySkin_RChristmas"))
  3656. -       {
  3657. -           if (activeChar.isTryDressMeEnabled())
  3658. -           {
  3659. -               activeChar.sendMessage("You are already trying a new skin.");
  3660. -               return false;
  3661. -           }
  3662. -          
  3663. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3664. -           {
  3665. -               activeChar.sendMessage("This command can only be used on peace area.");
  3666. -               return false;
  3667. -           }
  3668. -            
  3669. -           if (activeChar.getDressMeData() == null)
  3670. -           {
  3671. -               DressMeData dmd = new DressMeData();
  3672. -               activeChar.setDressMeData(dmd);
  3673. -           }
  3674. -          
  3675. -           activeChar.setTryDressMeEnabled(true);
  3676. -           activeChar.setDressMeHelmEnabled(true);
  3677. -           activeChar.setDressMeEnabled(true);
  3678. -
  3679. -           activeChar.getDressMeData().setChestId(45050);
  3680. -           activeChar.getDressMeData().setHairId(45051);
  3681. -           activeChar.broadcastUserInfo();
  3682. -
  3683. -           initCountdown(activeChar, 5);
  3684. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3685. -           {
  3686. -               @Override
  3687. -               public void run()
  3688. -               {
  3689. -                   activeChar.setTryDressMeEnabled(false);
  3690. -                   activeChar.setDressMeHelmEnabled(false);
  3691. -                   activeChar.setDressMeEnabled(false);
  3692. -                   activeChar.broadcastUserInfo();
  3693. -               }
  3694. -
  3695. -           }, 5 * 1000);
  3696. -       }
  3697. -      
  3698. -       if (command.equals("RChristmas"))
  3699. -       {
  3700. -           if (!activeChar.isVip())
  3701. -           {
  3702. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3703. -               return false;
  3704. -           }
  3705. -          
  3706. -           if (activeChar.isTryDressMeEnabled())
  3707. -           {
  3708. -               activeChar.sendMessage("You are already trying a new skin.");
  3709. -               return false;
  3710. -           }
  3711. -          
  3712. -           if (activeChar.getDressMeData() == null)
  3713. -           {
  3714. -               DressMeData dmd = new DressMeData();
  3715. -               activeChar.setDressMeData(dmd);
  3716. -           }
  3717. -          
  3718. -           activeChar.setDressMeHelmEnabled(true);
  3719. -           activeChar.setDressMeEnabled(true);
  3720. -
  3721. -           activeChar.getDressMeData().setChestId(45050);
  3722. -           activeChar.getDressMeData().setHairId(45051);
  3723. -           activeChar.broadcastUserInfo();
  3724. -       }
  3725. -
  3726. -       // Blue Christmas
  3727. -       if (command.equals("trySkin_BChristmas"))
  3728. -       {
  3729. -           if (activeChar.isTryDressMeEnabled())
  3730. -           {
  3731. -               activeChar.sendMessage("You are already trying a new skin.");
  3732. -               return false;
  3733. -           }
  3734. -          
  3735. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3736. -           {
  3737. -               activeChar.sendMessage("This command can only be used on peace area.");
  3738. -               return false;
  3739. -           }
  3740. -            
  3741. -           if (activeChar.getDressMeData() == null)
  3742. -           {
  3743. -               DressMeData dmd = new DressMeData();
  3744. -               activeChar.setDressMeData(dmd);
  3745. -           }
  3746. -          
  3747. -           activeChar.setTryDressMeEnabled(true);
  3748. -           activeChar.setDressMeHelmEnabled(true);
  3749. -           activeChar.setDressMeEnabled(true);
  3750. -
  3751. -           activeChar.getDressMeData().setChestId(45052);
  3752. -           activeChar.getDressMeData().setHairId(45053);
  3753. -           activeChar.broadcastUserInfo();
  3754. -
  3755. -           initCountdown(activeChar, 5);
  3756. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3757. -           {
  3758. -               @Override
  3759. -               public void run()
  3760. -               {
  3761. -                   activeChar.setTryDressMeEnabled(false);
  3762. -                   activeChar.setDressMeHelmEnabled(false);
  3763. -                   activeChar.setDressMeEnabled(false);
  3764. -                   activeChar.broadcastUserInfo();
  3765. -               }
  3766. -
  3767. -           }, 5 * 1000);
  3768. -       }
  3769. -      
  3770. -       if (command.equals("BChristmas"))
  3771. -       {
  3772. -           if (!activeChar.isVip())
  3773. -           {
  3774. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3775. -               return false;
  3776. -           }
  3777. -          
  3778. -           if (activeChar.isTryDressMeEnabled())
  3779. -           {
  3780. -               activeChar.sendMessage("You are already trying a new skin.");
  3781. -               return false;
  3782. -           }
  3783. -          
  3784. -           if (activeChar.getDressMeData() == null)
  3785. -           {
  3786. -               DressMeData dmd = new DressMeData();
  3787. -               activeChar.setDressMeData(dmd);
  3788. -           }
  3789. -          
  3790. -           activeChar.setDressMeHelmEnabled(true);
  3791. -           activeChar.setDressMeEnabled(true);
  3792. -
  3793. -           activeChar.getDressMeData().setChestId(45052);
  3794. -           activeChar.getDressMeData().setHairId(45053);
  3795. -           activeChar.broadcastUserInfo();
  3796. -       }
  3797. -
  3798. -       // Dark Knight
  3799. -       if (command.equals("trySkin_DKnight"))
  3800. -       {
  3801. -           if (activeChar.isTryDressMeEnabled())
  3802. -           {
  3803. -               activeChar.sendMessage("You are already trying a new skin.");
  3804. -               return false;
  3805. -           }
  3806. -          
  3807. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3808. -           {
  3809. -               activeChar.sendMessage("This command can only be used on peace area.");
  3810. -               return false;
  3811. -           }
  3812. -            
  3813. -           if (activeChar.getDressMeData() == null)
  3814. -           {
  3815. -               DressMeData dmd = new DressMeData();
  3816. -               activeChar.setDressMeData(dmd);
  3817. -           }
  3818. -          
  3819. -           activeChar.setTryDressMeEnabled(true);
  3820. -           activeChar.setDressMeHelmEnabled(true);
  3821. -           activeChar.setDressMeEnabled(true);
  3822. -
  3823. -           activeChar.getDressMeData().setChestId(45054);
  3824. -           activeChar.getDressMeData().setHairId(45055);
  3825. -           activeChar.broadcastUserInfo();
  3826. -
  3827. -           initCountdown(activeChar, 5);
  3828. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3829. -           {
  3830. -               @Override
  3831. -               public void run()
  3832. -               {
  3833. -                   activeChar.setTryDressMeEnabled(false);
  3834. -                   activeChar.setDressMeHelmEnabled(false);
  3835. -                   activeChar.setDressMeEnabled(false);
  3836. -                   activeChar.broadcastUserInfo();
  3837. -               }
  3838. -
  3839. -           }, 5 * 1000);
  3840. -       }
  3841. -      
  3842. -       if (command.equals("DKnight"))
  3843. -       {
  3844. -           if (!activeChar.isVip())
  3845. -           {
  3846. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3847. -               return false;
  3848. -           }
  3849. -          
  3850. -           if (activeChar.isTryDressMeEnabled())
  3851. -           {
  3852. -               activeChar.sendMessage("You are already trying a new skin.");
  3853. -               return false;
  3854. -           }
  3855. -          
  3856. -           if (activeChar.getDressMeData() == null)
  3857. -           {
  3858. -               DressMeData dmd = new DressMeData();
  3859. -               activeChar.setDressMeData(dmd);
  3860. -           }
  3861. -          
  3862. -           activeChar.setDressMeHelmEnabled(true);
  3863. -           activeChar.setDressMeEnabled(true);
  3864. -
  3865. -           activeChar.getDressMeData().setChestId(45054);
  3866. -           activeChar.getDressMeData().setHairId(45055);
  3867. -           activeChar.broadcastUserInfo();
  3868. -       }
  3869. -
  3870. -       // Healer Armor
  3871. -       if (command.equals("trySkin_Healer"))
  3872. -       {
  3873. -           if (activeChar.isTryDressMeEnabled())
  3874. -           {
  3875. -               activeChar.sendMessage("You are already trying a new skin.");
  3876. -               return false;
  3877. -           }
  3878. -          
  3879. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3880. -           {
  3881. -               activeChar.sendMessage("This command can only be used on peace area.");
  3882. -               return false;
  3883. -           }
  3884. -            
  3885. -           if (activeChar.getDressMeData() == null)
  3886. -           {
  3887. -               DressMeData dmd = new DressMeData();
  3888. -               activeChar.setDressMeData(dmd);
  3889. -           }
  3890. -          
  3891. -           activeChar.setTryDressMeEnabled(true);
  3892. -           activeChar.setDressMeHelmEnabled(true);
  3893. -           activeChar.setDressMeEnabled(true);
  3894. -
  3895. -           activeChar.getDressMeData().setChestId(45056);
  3896. -           activeChar.getDressMeData().setHairId(45057);
  3897. -           activeChar.broadcastUserInfo();
  3898. -
  3899. -           initCountdown(activeChar, 5);
  3900. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3901. -           {
  3902. -               @Override
  3903. -               public void run()
  3904. -               {
  3905. -                   activeChar.setTryDressMeEnabled(false);
  3906. -                   activeChar.setDressMeHelmEnabled(false);
  3907. -                   activeChar.setDressMeEnabled(false);
  3908. -                   activeChar.broadcastUserInfo();
  3909. -               }
  3910. -
  3911. -           }, 5 * 1000);
  3912. -       }
  3913. -      
  3914. -       if (command.equals("Healer"))
  3915. -       {
  3916. -           if (!activeChar.isVip())
  3917. -           {
  3918. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3919. -               return false;
  3920. -           }
  3921. -          
  3922. -           if (activeChar.isTryDressMeEnabled())
  3923. -           {
  3924. -               activeChar.sendMessage("You are already trying a new skin.");
  3925. -               return false;
  3926. -           }
  3927. -          
  3928. -           if (activeChar.getDressMeData() == null)
  3929. -           {
  3930. -               DressMeData dmd = new DressMeData();
  3931. -               activeChar.setDressMeData(dmd);
  3932. -           }
  3933. -          
  3934. -           activeChar.setDressMeHelmEnabled(true);
  3935. -           activeChar.setDressMeEnabled(true);
  3936. -
  3937. -           activeChar.getDressMeData().setChestId(45056);
  3938. -           activeChar.getDressMeData().setHairId(45057);
  3939. -           activeChar.broadcastUserInfo();
  3940. -       }
  3941. -      
  3942. -       // Lilith Armor
  3943. -       if (command.equals("trySkin_Lilith"))
  3944. -       {
  3945. -           if (activeChar.isTryDressMeEnabled())
  3946. -           {
  3947. -               activeChar.sendMessage("You are already trying a new skin.");
  3948. -               return false;
  3949. -           }
  3950. -          
  3951. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  3952. -           {
  3953. -               activeChar.sendMessage("This command can only be used on peace area.");
  3954. -               return false;
  3955. -           }
  3956. -            
  3957. -           if (activeChar.getDressMeData() == null)
  3958. -           {
  3959. -               DressMeData dmd = new DressMeData();
  3960. -               activeChar.setDressMeData(dmd);
  3961. -           }
  3962. -          
  3963. -           activeChar.setTryDressMeEnabled(true);
  3964. -           activeChar.setDressMeHelmEnabled(true);
  3965. -           activeChar.setDressMeEnabled(true);
  3966. -
  3967. -           activeChar.getDressMeData().setChestId(45058);
  3968. -           activeChar.getDressMeData().setHairId(45059);
  3969. -           activeChar.broadcastUserInfo();
  3970. -
  3971. -           initCountdown(activeChar, 5);
  3972. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  3973. -           {
  3974. -               @Override
  3975. -               public void run()
  3976. -               {
  3977. -                   activeChar.setTryDressMeEnabled(false);
  3978. -                   activeChar.setDressMeHelmEnabled(false);
  3979. -                   activeChar.setDressMeEnabled(false);
  3980. -                   activeChar.broadcastUserInfo();
  3981. -               }
  3982. -
  3983. -           }, 5 * 1000);
  3984. -       }
  3985. -      
  3986. -       if (command.equals("Lilith"))
  3987. -       {
  3988. -           if (!activeChar.isVip())
  3989. -           {
  3990. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  3991. -               return false;
  3992. -           }
  3993. -          
  3994. -           if (activeChar.isTryDressMeEnabled())
  3995. -           {
  3996. -               activeChar.sendMessage("You are already trying a new skin.");
  3997. -               return false;
  3998. -           }
  3999. -          
  4000. -           if (activeChar.getDressMeData() == null)
  4001. -           {
  4002. -               DressMeData dmd = new DressMeData();
  4003. -               activeChar.setDressMeData(dmd);
  4004. -           }
  4005. -          
  4006. -           activeChar.setDressMeHelmEnabled(true);
  4007. -           activeChar.setDressMeEnabled(true);
  4008. -
  4009. -           activeChar.getDressMeData().setChestId(45058);
  4010. -           activeChar.getDressMeData().setHairId(45059);
  4011. -           activeChar.broadcastUserInfo();
  4012. -       }
  4013. -      
  4014. -       // Skeleton Armor
  4015. -       if (command.equals("trySkin_Skeleton"))
  4016. -       {
  4017. -           if (activeChar.isTryDressMeEnabled())
  4018. -           {
  4019. -               activeChar.sendMessage("You are already trying a new skin.");
  4020. -               return false;
  4021. -           }
  4022. -          
  4023. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  4024. -           {
  4025. -               activeChar.sendMessage("This command can only be used on peace area.");
  4026. -               return false;
  4027. -           }
  4028. -            
  4029. -           if (activeChar.getDressMeData() == null)
  4030. -           {
  4031. -               DressMeData dmd = new DressMeData();
  4032. -               activeChar.setDressMeData(dmd);
  4033. -           }
  4034. -          
  4035. -           activeChar.setTryDressMeEnabled(true);
  4036. -           activeChar.setDressMeHelmEnabled(true);
  4037. -           activeChar.setDressMeEnabled(true);
  4038. -
  4039. -           activeChar.getDressMeData().setHairId(45060);
  4040. -           activeChar.getDressMeData().setChestId(45061);
  4041. -           activeChar.broadcastUserInfo();
  4042. -
  4043. -           initCountdown(activeChar, 5);
  4044. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  4045. -           {
  4046. -               @Override
  4047. -               public void run()
  4048. -               {
  4049. -                   activeChar.setTryDressMeEnabled(false);
  4050. -                   activeChar.setDressMeHelmEnabled(false);
  4051. -                   activeChar.setDressMeEnabled(false);
  4052. -                   activeChar.broadcastUserInfo();
  4053. -               }
  4054. -
  4055. -           }, 5 * 1000);
  4056. -       }
  4057. -      
  4058. -       if (command.equals("Skeleton"))
  4059. -       {
  4060. -           if (!activeChar.isVip())
  4061. -           {
  4062. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  4063. -               return false;
  4064. -           }
  4065. -          
  4066. -           if (activeChar.isTryDressMeEnabled())
  4067. -           {
  4068. -               activeChar.sendMessage("You are already trying a new skin.");
  4069. -               return false;
  4070. -           }
  4071. -          
  4072. -           if (activeChar.getDressMeData() == null)
  4073. -           {
  4074. -               DressMeData dmd = new DressMeData();
  4075. -               activeChar.setDressMeData(dmd);
  4076. -           }
  4077. -          
  4078. -           activeChar.setDressMeHelmEnabled(true);
  4079. -           activeChar.setDressMeEnabled(true);
  4080. -
  4081. -           activeChar.getDressMeData().setHairId(45060);
  4082. -           activeChar.getDressMeData().setChestId(45061);
  4083. -           activeChar.broadcastUserInfo();
  4084. -       }
  4085. -      
  4086. -       // Butler Armor
  4087. -       if (command.equals("trySkin_Butler"))
  4088. -       {
  4089. -           if (activeChar.isTryDressMeEnabled())
  4090. -           {
  4091. -               activeChar.sendMessage("You are already trying a new skin.");
  4092. -               return false;
  4093. -           }
  4094. -          
  4095. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  4096. -           {
  4097. -               activeChar.sendMessage("This command can only be used on peace area.");
  4098. -               return false;
  4099. -           }
  4100. -
  4101. -           if (activeChar.getDressMeData() == null)
  4102. -           {
  4103. -               DressMeData dmd = new DressMeData();
  4104. -               activeChar.setDressMeData(dmd);
  4105. -           }
  4106. -          
  4107. -           activeChar.setTryDressMeEnabled(true);
  4108. -           activeChar.setDressMeHelmEnabled(true);
  4109. -           activeChar.setDressMeEnabled(true);
  4110. -
  4111. -           activeChar.getDressMeData().setHairId(45062);
  4112. -           activeChar.getDressMeData().setChestId(45063);
  4113. -           activeChar.broadcastUserInfo();
  4114. -
  4115. -           initCountdown(activeChar, 5);
  4116. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  4117. -           {
  4118. -               @Override
  4119. -               public void run()
  4120. -               {
  4121. -                   activeChar.setTryDressMeEnabled(false);
  4122. -                   activeChar.setDressMeHelmEnabled(false);
  4123. -                   activeChar.setDressMeEnabled(false);
  4124. -                   activeChar.broadcastUserInfo();
  4125. -               }
  4126. -
  4127. -           }, 5 * 1000);
  4128. -       }
  4129. -      
  4130. -       if (command.equals("Butler"))
  4131. -       {
  4132. -           if (!activeChar.isVip())
  4133. -           {
  4134. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  4135. -               return false;
  4136. -           }
  4137. -          
  4138. -           if (activeChar.isTryDressMeEnabled())
  4139. -           {
  4140. -               activeChar.sendMessage("You are already trying a new skin.");
  4141. -               return false;
  4142. -           }
  4143. -          
  4144. -           if (activeChar.getDressMeData() == null)
  4145. -           {
  4146. -               DressMeData dmd = new DressMeData();
  4147. -               activeChar.setDressMeData(dmd);
  4148. -           }
  4149. -          
  4150. -           activeChar.setDressMeHelmEnabled(true);
  4151. -           activeChar.setDressMeEnabled(true);
  4152. -
  4153. -           activeChar.getDressMeData().setHairId(45062);
  4154. -           activeChar.getDressMeData().setChestId(45063);
  4155. -           activeChar.broadcastUserInfo();
  4156. -       }
  4157. -      
  4158. -       // Punk Armor
  4159. -       if (command.equals("trySkin_Punk"))
  4160. -       {
  4161. -           if (activeChar.isTryDressMeEnabled())
  4162. -           {
  4163. -               activeChar.sendMessage("You are already trying a new skin.");
  4164. -               return false;
  4165. -           }
  4166. -          
  4167. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  4168. -           {
  4169. -               activeChar.sendMessage("This command can only be used on peace area.");
  4170. -               return false;
  4171. -           }
  4172. -            
  4173. -           if (activeChar.getDressMeData() == null)
  4174. -           {
  4175. -               DressMeData dmd = new DressMeData();
  4176. -               activeChar.setDressMeData(dmd);
  4177. -           }
  4178. -          
  4179. -           activeChar.setTryDressMeEnabled(true);
  4180. -           activeChar.setDressMeHelmEnabled(true);
  4181. -           activeChar.setDressMeEnabled(true);
  4182. -
  4183. -           activeChar.getDressMeData().setHairId(45064);
  4184. -           activeChar.getDressMeData().setChestId(45065);
  4185. -           activeChar.broadcastUserInfo();
  4186. -
  4187. -           initCountdown(activeChar, 5);
  4188. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  4189. -           {
  4190. -               @Override
  4191. -               public void run()
  4192. -               {
  4193. -                   activeChar.setTryDressMeEnabled(false);
  4194. -                   activeChar.setDressMeHelmEnabled(false);
  4195. -                   activeChar.setDressMeEnabled(false);
  4196. -                   activeChar.broadcastUserInfo();
  4197. -               }
  4198. -
  4199. -           }, 5 * 1000);
  4200. -       }
  4201. -      
  4202. -       if (command.equals("Punk"))
  4203. -       {
  4204. -           if (!activeChar.isVip())
  4205. -           {
  4206. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  4207. -               return false;
  4208. -           }
  4209. -          
  4210. -           if (activeChar.isTryDressMeEnabled())
  4211. -           {
  4212. -               activeChar.sendMessage("You are already trying a new skin.");
  4213. -               return false;
  4214. -           }
  4215. -          
  4216. -           if (activeChar.getDressMeData() == null)
  4217. -           {
  4218. -               DressMeData dmd = new DressMeData();
  4219. -               activeChar.setDressMeData(dmd);
  4220. -           }
  4221. -          
  4222. -           activeChar.setDressMeHelmEnabled(true);
  4223. -           activeChar.setDressMeEnabled(true);
  4224. -
  4225. -           activeChar.getDressMeData().setHairId(45064);
  4226. -           activeChar.getDressMeData().setChestId(45065);
  4227. -           activeChar.broadcastUserInfo();
  4228. -       }
  4229. -      
  4230. -       // Punk Armor
  4231. -       if (command.equals("trySkin_Street"))
  4232. -       {
  4233. -           if (activeChar.isTryDressMeEnabled())
  4234. -           {
  4235. -               activeChar.sendMessage("You are already trying a new skin.");
  4236. -               return false;
  4237. -           }
  4238. -          
  4239. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  4240. -           {
  4241. -               activeChar.sendMessage("This command can only be used on peace area.");
  4242. -               return false;
  4243. -           }
  4244. -
  4245. -           if (activeChar.getDressMeData() == null)
  4246. -           {
  4247. -               DressMeData dmd = new DressMeData();
  4248. -               activeChar.setDressMeData(dmd);
  4249. -           }
  4250. -          
  4251. -           activeChar.setTryDressMeEnabled(true);
  4252. -           activeChar.setDressMeHelmEnabled(true);
  4253. -           activeChar.setDressMeEnabled(true);
  4254. -
  4255. -           activeChar.getDressMeData().setHairId(45066);
  4256. -           activeChar.getDressMeData().setChestId(45067);
  4257. -           activeChar.broadcastUserInfo();
  4258. -
  4259. -           initCountdown(activeChar, 5);
  4260. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  4261. -           {
  4262. -               @Override
  4263. -               public void run()
  4264. -               {
  4265. -                   activeChar.setTryDressMeEnabled(false);
  4266. -                   activeChar.setDressMeHelmEnabled(false);
  4267. -                   activeChar.setDressMeEnabled(false);
  4268. -                   activeChar.broadcastUserInfo();
  4269. -               }
  4270. -
  4271. -           }, 5 * 1000);
  4272. -       }
  4273. -      
  4274. -       if (command.equals("Street"))
  4275. -       {
  4276. -           if (!activeChar.isVip())
  4277. -           {
  4278. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  4279. -               return false;
  4280. -           }
  4281. -          
  4282. -           if (activeChar.isTryDressMeEnabled())
  4283. -           {
  4284. -               activeChar.sendMessage("You are already trying a new skin.");
  4285. -               return false;
  4286. -           }
  4287. -          
  4288. -           if (activeChar.getDressMeData() == null)
  4289. -           {
  4290. -               DressMeData dmd = new DressMeData();
  4291. -               activeChar.setDressMeData(dmd);
  4292. -           }
  4293. -          
  4294. -           activeChar.setDressMeHelmEnabled(true);
  4295. -           activeChar.setDressMeEnabled(true);
  4296. -
  4297. -           activeChar.getDressMeData().setHairId(45066);
  4298. -           activeChar.getDressMeData().setChestId(45067);
  4299. -           activeChar.broadcastUserInfo();
  4300. -       }
  4301. -      
  4302. -       // Hallowen Armor
  4303. -       if (command.equals("trySkin_Hallowen"))
  4304. -       {
  4305. -           if (activeChar.isTryDressMeEnabled())
  4306. -           {
  4307. -               activeChar.sendMessage("You are already trying a new skin.");
  4308. -               return false;
  4309. -           }
  4310. -          
  4311. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  4312. -           {
  4313. -               activeChar.sendMessage("This command can only be used on peace area.");
  4314. -               return false;
  4315. -           }
  4316. -
  4317. -           if (activeChar.getDressMeData() == null)
  4318. -           {
  4319. -               DressMeData dmd = new DressMeData();
  4320. -               activeChar.setDressMeData(dmd);
  4321. -           }
  4322. -          
  4323. -           activeChar.setTryDressMeEnabled(true);
  4324. -           activeChar.setDressMeHelmEnabled(true);
  4325. -           activeChar.setDressMeEnabled(true);
  4326. -
  4327. -           activeChar.getDressMeData().setHairId(45068);
  4328. -           activeChar.getDressMeData().setChestId(45068);
  4329. -           activeChar.broadcastUserInfo();
  4330. -
  4331. -           initCountdown(activeChar, 5);
  4332. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  4333. -           {
  4334. -               @Override
  4335. -               public void run()
  4336. -               {
  4337. -                   activeChar.setTryDressMeEnabled(false);
  4338. -                   activeChar.setDressMeHelmEnabled(false);
  4339. -                   activeChar.setDressMeEnabled(false);
  4340. -                   activeChar.broadcastUserInfo();
  4341. -               }
  4342. -
  4343. -           }, 5 * 1000);
  4344. -       }
  4345. -      
  4346. -       if (command.equals("Hallowen"))
  4347. -       {
  4348. -           if (!activeChar.isVip())
  4349. -           {
  4350. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  4351. -               return false;
  4352. -           }
  4353. -          
  4354. -           if (activeChar.isTryDressMeEnabled())
  4355. -           {
  4356. -               activeChar.sendMessage("You are already trying a new skin.");
  4357. -               return false;
  4358. -           }
  4359. -          
  4360. -           if (activeChar.getDressMeData() == null)
  4361. -           {
  4362. -               DressMeData dmd = new DressMeData();
  4363. -               activeChar.setDressMeData(dmd);
  4364. -           }
  4365. -          
  4366. -           activeChar.setDressMeHelmEnabled(true);
  4367. -           activeChar.setDressMeEnabled(true);
  4368. -
  4369. -           activeChar.getDressMeData().setHairId(45068);
  4370. -           activeChar.getDressMeData().setChestId(45068);
  4371. -           activeChar.broadcastUserInfo();
  4372. -       }
  4373. -
  4374. -       // BlackZaken Armor
  4375. -       if (command.equals("trySkin_BlackZaken"))
  4376. -       {
  4377. -           if (activeChar.isTryDressMeEnabled())
  4378. -           {
  4379. -               activeChar.sendMessage("You are already trying a new skin.");
  4380. -               return false;
  4381. -           }
  4382. -          
  4383. -           if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
  4384. -           {
  4385. -               activeChar.sendMessage("This command can only be used on peace area.");
  4386. -               return false;
  4387. -           }
  4388. -            
  4389. -           if (activeChar.getDressMeData() == null)
  4390. -           {
  4391. -               DressMeData dmd = new DressMeData();
  4392. -               activeChar.setDressMeData(dmd);
  4393. -           }
  4394. -          
  4395. -           activeChar.setTryDressMeEnabled(true);
  4396. -           activeChar.setDressMeHelmEnabled(true);
  4397. -           activeChar.setDressMeEnabled(true);
  4398. -
  4399. -           activeChar.getDressMeData().setHairId(45070);
  4400. -           activeChar.getDressMeData().setChestId(45069);
  4401. -           activeChar.broadcastUserInfo();
  4402. -
  4403. -           initCountdown(activeChar, 5);
  4404. -           ThreadPoolManager.getInstance().scheduleAi(new Runnable()
  4405. -           {
  4406. -               @Override
  4407. -               public void run()
  4408. -               {
  4409. -                   activeChar.setTryDressMeEnabled(false);
  4410. -                   activeChar.setDressMeHelmEnabled(false);
  4411. -                   activeChar.setDressMeEnabled(false);
  4412. -                   activeChar.broadcastUserInfo();
  4413. -               }
  4414. -
  4415. -           }, 5 * 1000);
  4416. -       }
  4417. -      
  4418. -       if (command.equals("BlackZaken"))
  4419. -       {
  4420. -           if (!activeChar.isVip())
  4421. -           {
  4422. -               activeChar.sendMessage("You need to be a VIP member to access skins.");
  4423. -               return false;
  4424. -           }
  4425. -          
  4426. -           if (activeChar.isTryDressMeEnabled())
  4427. -           {
  4428. -               activeChar.sendMessage("You are already trying a new skin.");
  4429. -               return false;
  4430. -           }
  4431. -          
  4432. -           if (activeChar.getDressMeData() == null)
  4433. -           {
  4434. -               DressMeData dmd = new DressMeData();
  4435. -               activeChar.setDressMeData(dmd);
  4436. -           }
  4437. -          
  4438. -           activeChar.setDressMeHelmEnabled(true);
  4439. -           activeChar.setDressMeEnabled(true);
  4440. -
  4441. -           activeChar.getDressMeData().setHairId(45070);
  4442. -           activeChar.getDressMeData().setChestId(45069);
  4443. -           activeChar.broadcastUserInfo();
  4444. -       }
  4445. -      
  4446. -       //Disables
  4447. -       if (command.equals("disable_Helm"))
  4448. -       {
  4449. -           if (activeChar.isDressMeHelmEnabled())
  4450. -           {
  4451. -               activeChar.setDressMeHelmEnabled(false);
  4452. -               activeChar.broadcastUserInfo();
  4453. -           }
  4454. -           else
  4455. -           {
  4456. -               activeChar.setDressMeHelmEnabled(true);
  4457. -               activeChar.broadcastUserInfo();
  4458. -           }
  4459. -       }
  4460. -       return true;
  4461. -   }
  4462. +    public boolean useVoicedCommand(final String command, final L2PcInstance activeChar, final String target) {
  4463. +        if (command.equals("skins")) {
  4464. +            showSkinPanel(activeChar);
  4465. +        }
  4466. +        if (command.equals("trySkin_Archer")) {
  4467. +            if (activeChar.isTryDressMeEnabled()) {
  4468. +                activeChar.sendMessage("You are already trying a new skin.");
  4469. +                return false;
  4470. +            }
  4471. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  4472. +                activeChar.sendMessage("This command can only be used on peace area.");
  4473. +                return false;
  4474. +            }
  4475. +            if (activeChar.getDressMeData() == null) {
  4476. +                final DressMeData dmd = new DressMeData();
  4477. +                activeChar.setDressMeData(dmd);
  4478. +            }
  4479. +            activeChar.setTryDressMeEnabled(true);
  4480. +            activeChar.setDressMeHelmEnabled(true);
  4481. +            activeChar.setDressMeEnabled(true);
  4482. +            activeChar.getDressMeData().setChestId(50000);
  4483. +            activeChar.getDressMeData().setHairId(50001);
  4484. +            activeChar.broadcastUserInfo();
  4485. +            initCountdown(activeChar, 5);
  4486. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  4487. +                @Override
  4488. +                public void run() {
  4489. +                    activeChar.setTryDressMeEnabled(false);
  4490. +                    activeChar.setDressMeHelmEnabled(false);
  4491. +                    activeChar.setDressMeEnabled(false);
  4492. +                    activeChar.broadcastUserInfo();
  4493. +                }
  4494. +            }, 5000L);
  4495. +        }
  4496. +        if (command.equals("Archer")) {
  4497. +            if (!activeChar.isVip()) {
  4498. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  4499. +                return false;
  4500. +            }
  4501. +            if (activeChar.isTryDressMeEnabled()) {
  4502. +                activeChar.sendMessage("You are already trying a new skin.");
  4503. +                return false;
  4504. +            }
  4505. +            if (activeChar.getDressMeData() == null) {
  4506. +                final DressMeData dmd = new DressMeData();
  4507. +                activeChar.setDressMeData(dmd);
  4508. +            }
  4509. +            activeChar.setDressMeHelmEnabled(true);
  4510. +            activeChar.setDressMeEnabled(true);
  4511. +            activeChar.getDressMeData().setChestId(50000);
  4512. +            activeChar.getDressMeData().setHairId(50001);
  4513. +            activeChar.broadcastUserInfo();
  4514. +        }
  4515. +        if (command.equals("trySkin_GreenArcher")) {
  4516. +            if (activeChar.isTryDressMeEnabled()) {
  4517. +                activeChar.sendMessage("You are already trying a new skin.");
  4518. +                return false;
  4519. +            }
  4520. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  4521. +                activeChar.sendMessage("This command can only be used on peace area.");
  4522. +                return false;
  4523. +            }
  4524. +            if (activeChar.getDressMeData() == null) {
  4525. +                final DressMeData dmd = new DressMeData();
  4526. +                activeChar.setDressMeData(dmd);
  4527. +            }
  4528. +            activeChar.setTryDressMeEnabled(true);
  4529. +            activeChar.setDressMeHelmEnabled(true);
  4530. +            activeChar.setDressMeEnabled(true);
  4531. +            activeChar.getDressMeData().setChestId(50002);
  4532. +            activeChar.getDressMeData().setHairId(50003);
  4533. +            activeChar.broadcastUserInfo();
  4534. +            initCountdown(activeChar, 5);
  4535. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  4536. +                @Override
  4537. +                public void run() {
  4538. +                    activeChar.setTryDressMeEnabled(false);
  4539. +                    activeChar.setDressMeHelmEnabled(false);
  4540. +                    activeChar.setDressMeEnabled(false);
  4541. +                    activeChar.broadcastUserInfo();
  4542. +                }
  4543. +            }, 5000L);
  4544. +        }
  4545. +        if (command.equals("GreenArcher")) {
  4546. +            if (!activeChar.isVip()) {
  4547. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  4548. +                return false;
  4549. +            }
  4550. +            if (activeChar.isTryDressMeEnabled()) {
  4551. +                activeChar.sendMessage("You are already trying a new skin.");
  4552. +                return false;
  4553. +            }
  4554. +            if (activeChar.getDressMeData() == null) {
  4555. +                final DressMeData dmd = new DressMeData();
  4556. +                activeChar.setDressMeData(dmd);
  4557. +            }
  4558. +            activeChar.setDressMeHelmEnabled(true);
  4559. +            activeChar.setDressMeEnabled(true);
  4560. +            activeChar.getDressMeData().setChestId(50002);
  4561. +            activeChar.getDressMeData().setHairId(50003);
  4562. +            activeChar.broadcastUserInfo();
  4563. +        }
  4564. +        if (command.equals("trySkin_LightAssassin")) {
  4565. +            if (activeChar.isTryDressMeEnabled()) {
  4566. +                activeChar.sendMessage("You are already trying a new skin.");
  4567. +                return false;
  4568. +            }
  4569. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  4570. +                activeChar.sendMessage("This command can only be used on peace area.");
  4571. +                return false;
  4572. +            }
  4573. +            if (activeChar.getDressMeData() == null) {
  4574. +                final DressMeData dmd = new DressMeData();
  4575. +                activeChar.setDressMeData(dmd);
  4576. +            }
  4577. +            activeChar.setTryDressMeEnabled(true);
  4578. +            activeChar.setDressMeHelmEnabled(true);
  4579. +            activeChar.setDressMeEnabled(true);
  4580. +            activeChar.getDressMeData().setChestId(50004);
  4581. +            activeChar.getDressMeData().setHairId(50005);
  4582. +            activeChar.broadcastUserInfo();
  4583. +            initCountdown(activeChar, 5);
  4584. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  4585. +                @Override
  4586. +                public void run() {
  4587. +                    activeChar.setTryDressMeEnabled(false);
  4588. +                    activeChar.setDressMeHelmEnabled(false);
  4589. +                    activeChar.setDressMeEnabled(false);
  4590. +                    activeChar.broadcastUserInfo();
  4591. +                }
  4592. +            }, 5000L);
  4593. +        }
  4594. +        if (command.equals("LightAssassin")) {
  4595. +            if (!activeChar.isVip()) {
  4596. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  4597. +                return false;
  4598. +            }
  4599. +            if (activeChar.isTryDressMeEnabled()) {
  4600. +                activeChar.sendMessage("You are already trying a new skin.");
  4601. +                return false;
  4602. +            }
  4603. +            if (activeChar.getDressMeData() == null) {
  4604. +                final DressMeData dmd = new DressMeData();
  4605. +                activeChar.setDressMeData(dmd);
  4606. +            }
  4607. +            activeChar.setDressMeHelmEnabled(true);
  4608. +            activeChar.setDressMeEnabled(true);
  4609. +            activeChar.getDressMeData().setChestId(50004);
  4610. +            activeChar.getDressMeData().setHairId(50005);
  4611. +            activeChar.broadcastUserInfo();
  4612. +        }
  4613. +        if (command.equals("trySkin_DarkAssassin")) {
  4614. +            if (activeChar.isTryDressMeEnabled()) {
  4615. +                activeChar.sendMessage("You are already trying a new skin.");
  4616. +                return false;
  4617. +            }
  4618. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  4619. +                activeChar.sendMessage("This command can only be used on peace area.");
  4620. +                return false;
  4621. +            }
  4622. +            if (activeChar.getDressMeData() == null) {
  4623. +                final DressMeData dmd = new DressMeData();
  4624. +                activeChar.setDressMeData(dmd);
  4625. +            }
  4626. +            activeChar.setTryDressMeEnabled(true);
  4627. +            activeChar.setDressMeHelmEnabled(true);
  4628. +            activeChar.setDressMeEnabled(true);
  4629. +            activeChar.getDressMeData().setChestId(50006);
  4630. +            activeChar.getDressMeData().setHairId(50007);
  4631. +            activeChar.broadcastUserInfo();
  4632. +            initCountdown(activeChar, 5);
  4633. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  4634. +                @Override
  4635. +                public void run() {
  4636. +                    activeChar.setTryDressMeEnabled(false);
  4637. +                    activeChar.setDressMeHelmEnabled(false);
  4638. +                    activeChar.setDressMeEnabled(false);
  4639. +                    activeChar.broadcastUserInfo();
  4640. +                }
  4641. +            }, 5000L);
  4642. +        }
  4643. +        if (command.equals("DarkAssassin")) {
  4644. +            if (!activeChar.isVip()) {
  4645. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  4646. +                return false;
  4647. +            }
  4648. +            if (activeChar.isTryDressMeEnabled()) {
  4649. +                activeChar.sendMessage("You are already trying a new skin.");
  4650. +                return false;
  4651. +            }
  4652. +            if (activeChar.getDressMeData() == null) {
  4653. +                final DressMeData dmd = new DressMeData();
  4654. +                activeChar.setDressMeData(dmd);
  4655. +            }
  4656. +            activeChar.setDressMeHelmEnabled(true);
  4657. +            activeChar.setDressMeEnabled(true);
  4658. +            activeChar.getDressMeData().setChestId(50006);
  4659. +            activeChar.getDressMeData().setHairId(50007);
  4660. +            activeChar.broadcastUserInfo();
  4661. +        }
  4662. +        if (command.equals("trySkin_RedMusketeer")) {
  4663. +            if (activeChar.isTryDressMeEnabled()) {
  4664. +                activeChar.sendMessage("You are already trying a new skin.");
  4665. +                return false;
  4666. +            }
  4667. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  4668. +                activeChar.sendMessage("This command can only be used on peace area.");
  4669. +                return false;
  4670. +            }
  4671. +            if (activeChar.getDressMeData() == null) {
  4672. +                final DressMeData dmd = new DressMeData();
  4673. +                activeChar.setDressMeData(dmd);
  4674. +            }
  4675. +            activeChar.setTryDressMeEnabled(true);
  4676. +            activeChar.setDressMeHelmEnabled(true);
  4677. +            activeChar.setDressMeEnabled(true);
  4678. +            activeChar.getDressMeData().setChestId(50008);
  4679. +            activeChar.getDressMeData().setHairId(50009);
  4680. +            activeChar.broadcastUserInfo();
  4681. +            initCountdown(activeChar, 5);
  4682. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  4683. +                @Override
  4684. +                public void run() {
  4685. +                    activeChar.setTryDressMeEnabled(false);
  4686. +                    activeChar.setDressMeHelmEnabled(false);
  4687. +                    activeChar.setDressMeEnabled(false);
  4688. +                    activeChar.broadcastUserInfo();
  4689. +                }
  4690. +            }, 5000L);
  4691. +        }
  4692. +        if (command.equals("RedMusketeer")) {
  4693. +            if (!activeChar.isVip()) {
  4694. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  4695. +                return false;
  4696. +            }
  4697. +            if (activeChar.isTryDressMeEnabled()) {
  4698. +                activeChar.sendMessage("You are already trying a new skin.");
  4699. +                return false;
  4700. +            }
  4701. +            if (activeChar.getDressMeData() == null) {
  4702. +                final DressMeData dmd = new DressMeData();
  4703. +                activeChar.setDressMeData(dmd);
  4704. +            }
  4705. +            activeChar.setDressMeHelmEnabled(true);
  4706. +            activeChar.setDressMeEnabled(true);
  4707. +            activeChar.getDressMeData().setChestId(50008);
  4708. +            activeChar.getDressMeData().setHairId(50009);
  4709. +            activeChar.broadcastUserInfo();
  4710. +        }
  4711. +        if (command.equals("trySkin_Muskeeter")) {
  4712. +            if (activeChar.isTryDressMeEnabled()) {
  4713. +                activeChar.sendMessage("You are already trying a new skin.");
  4714. +                return false;
  4715. +            }
  4716. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  4717. +                activeChar.sendMessage("This command can only be used on peace area.");
  4718. +                return false;
  4719. +            }
  4720. +            if (activeChar.getDressMeData() == null) {
  4721. +                final DressMeData dmd = new DressMeData();
  4722. +                activeChar.setDressMeData(dmd);
  4723. +            }
  4724. +            activeChar.setTryDressMeEnabled(true);
  4725. +            activeChar.setDressMeHelmEnabled(true);
  4726. +            activeChar.setDressMeEnabled(true);
  4727. +            activeChar.getDressMeData().setChestId(50010);
  4728. +            activeChar.getDressMeData().setHairId(50011);
  4729. +            activeChar.broadcastUserInfo();
  4730. +            initCountdown(activeChar, 5);
  4731. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  4732. +                @Override
  4733. +                public void run() {
  4734. +                    activeChar.setTryDressMeEnabled(false);
  4735. +                    activeChar.setDressMeHelmEnabled(false);
  4736. +                    activeChar.setDressMeEnabled(false);
  4737. +                    activeChar.broadcastUserInfo();
  4738. +                }
  4739. +            }, 5000L);
  4740. +        }
  4741. +        if (command.equals("Muskeeter")) {
  4742. +            if (!activeChar.isVip()) {
  4743. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  4744. +                return false;
  4745. +            }
  4746. +            if (activeChar.isTryDressMeEnabled()) {
  4747. +                activeChar.sendMessage("You are already trying a new skin.");
  4748. +                return false;
  4749. +            }
  4750. +            if (activeChar.getDressMeData() == null) {
  4751. +                final DressMeData dmd = new DressMeData();
  4752. +                activeChar.setDressMeData(dmd);
  4753. +            }
  4754. +            activeChar.setDressMeHelmEnabled(true);
  4755. +            activeChar.setDressMeEnabled(true);
  4756. +            activeChar.getDressMeData().setChestId(50010);
  4757. +            activeChar.getDressMeData().setHairId(50011);
  4758. +            activeChar.broadcastUserInfo();
  4759. +        }
  4760. +        if (command.equals("trySkin_Wizard")) {
  4761. +            if (activeChar.isTryDressMeEnabled()) {
  4762. +                activeChar.sendMessage("You are already trying a new skin.");
  4763. +                return false;
  4764. +            }
  4765. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  4766. +                activeChar.sendMessage("This command can only be used on peace area.");
  4767. +                return false;
  4768. +            }
  4769. +            if (activeChar.getDressMeData() == null) {
  4770. +                final DressMeData dmd = new DressMeData();
  4771. +                activeChar.setDressMeData(dmd);
  4772. +            }
  4773. +            activeChar.setTryDressMeEnabled(true);
  4774. +            activeChar.setDressMeHelmEnabled(true);
  4775. +            activeChar.setDressMeEnabled(true);
  4776. +            activeChar.getDressMeData().setChestId(50012);
  4777. +            activeChar.getDressMeData().setHairId(50013);
  4778. +            activeChar.broadcastUserInfo();
  4779. +            initCountdown(activeChar, 5);
  4780. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  4781. +                @Override
  4782. +                public void run() {
  4783. +                    activeChar.setTryDressMeEnabled(false);
  4784. +                    activeChar.setDressMeHelmEnabled(false);
  4785. +                    activeChar.setDressMeEnabled(false);
  4786. +                    activeChar.broadcastUserInfo();
  4787. +                }
  4788. +            }, 5000L);
  4789. +        }
  4790. +        if (command.equals("Wizard")) {
  4791. +            if (!activeChar.isVip()) {
  4792. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  4793. +                return false;
  4794. +            }
  4795. +            if (activeChar.isTryDressMeEnabled()) {
  4796. +                activeChar.sendMessage("You are already trying a new skin.");
  4797. +                return false;
  4798. +            }
  4799. +            if (activeChar.getDressMeData() == null) {
  4800. +                final DressMeData dmd = new DressMeData();
  4801. +                activeChar.setDressMeData(dmd);
  4802. +            }
  4803. +            activeChar.setDressMeHelmEnabled(true);
  4804. +            activeChar.setDressMeEnabled(true);
  4805. +            activeChar.getDressMeData().setChestId(50012);
  4806. +            activeChar.getDressMeData().setHairId(50013);
  4807. +            activeChar.broadcastUserInfo();
  4808. +        }
  4809. +        if (command.equals("trySkin_Warrior")) {
  4810. +            if (activeChar.isTryDressMeEnabled()) {
  4811. +                activeChar.sendMessage("You are already trying a new skin.");
  4812. +                return false;
  4813. +            }
  4814. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  4815. +                activeChar.sendMessage("This command can only be used on peace area.");
  4816. +                return false;
  4817. +            }
  4818. +            if (activeChar.getDressMeData() == null) {
  4819. +                final DressMeData dmd = new DressMeData();
  4820. +                activeChar.setDressMeData(dmd);
  4821. +            }
  4822. +            activeChar.setTryDressMeEnabled(true);
  4823. +            activeChar.setDressMeHelmEnabled(true);
  4824. +            activeChar.setDressMeEnabled(true);
  4825. +            activeChar.getDressMeData().setChestId(50014);
  4826. +            activeChar.getDressMeData().setHairId(50015);
  4827. +            activeChar.broadcastUserInfo();
  4828. +            initCountdown(activeChar, 5);
  4829. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  4830. +                @Override
  4831. +                public void run() {
  4832. +                    activeChar.setTryDressMeEnabled(false);
  4833. +                    activeChar.setDressMeHelmEnabled(false);
  4834. +                    activeChar.setDressMeEnabled(false);
  4835. +                    activeChar.broadcastUserInfo();
  4836. +                }
  4837. +            }, 5000L);
  4838. +        }
  4839. +        if (command.equals("Warrior")) {
  4840. +            if (!activeChar.isVip()) {
  4841. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  4842. +                return false;
  4843. +            }
  4844. +            if (activeChar.isTryDressMeEnabled()) {
  4845. +                activeChar.sendMessage("You are already trying a new skin.");
  4846. +                return false;
  4847. +            }
  4848. +            if (activeChar.getDressMeData() == null) {
  4849. +                final DressMeData dmd = new DressMeData();
  4850. +                activeChar.setDressMeData(dmd);
  4851. +            }
  4852. +            activeChar.setDressMeHelmEnabled(true);
  4853. +            activeChar.setDressMeEnabled(true);
  4854. +            activeChar.getDressMeData().setChestId(50014);
  4855. +            activeChar.getDressMeData().setHairId(50015);
  4856. +            activeChar.broadcastUserInfo();
  4857. +        }
  4858. +        if (command.equals("trySkin_Cat")) {
  4859. +            if (activeChar.isTryDressMeEnabled()) {
  4860. +                activeChar.sendMessage("You are already trying a new skin.");
  4861. +                return false;
  4862. +            }
  4863. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  4864. +                activeChar.sendMessage("This command can only be used on peace area.");
  4865. +                return false;
  4866. +            }
  4867. +            if (activeChar.getDressMeData() == null) {
  4868. +                final DressMeData dmd = new DressMeData();
  4869. +                activeChar.setDressMeData(dmd);
  4870. +            }
  4871. +            activeChar.setTryDressMeEnabled(true);
  4872. +            activeChar.setDressMeHelmEnabled(true);
  4873. +            activeChar.setDressMeEnabled(true);
  4874. +            activeChar.getDressMeData().setChestId(50016);
  4875. +            activeChar.getDressMeData().setHairId(50017);
  4876. +            activeChar.broadcastUserInfo();
  4877. +            initCountdown(activeChar, 5);
  4878. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  4879. +                @Override
  4880. +                public void run() {
  4881. +                    activeChar.setTryDressMeEnabled(false);
  4882. +                    activeChar.setDressMeHelmEnabled(false);
  4883. +                    activeChar.setDressMeEnabled(false);
  4884. +                    activeChar.broadcastUserInfo();
  4885. +                }
  4886. +            }, 5000L);
  4887. +        }
  4888. +        if (command.equals("Cat")) {
  4889. +            if (!activeChar.isVip()) {
  4890. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  4891. +                return false;
  4892. +            }
  4893. +            if (activeChar.isTryDressMeEnabled()) {
  4894. +                activeChar.sendMessage("You are already trying a new skin.");
  4895. +                return false;
  4896. +            }
  4897. +            if (activeChar.getDressMeData() == null) {
  4898. +                final DressMeData dmd = new DressMeData();
  4899. +                activeChar.setDressMeData(dmd);
  4900. +            }
  4901. +            activeChar.setDressMeHelmEnabled(true);
  4902. +            activeChar.setDressMeEnabled(true);
  4903. +            activeChar.getDressMeData().setChestId(50016);
  4904. +            activeChar.getDressMeData().setHairId(50017);
  4905. +            activeChar.broadcastUserInfo();
  4906. +        }
  4907. +        if (command.equals("trySkin_King")) {
  4908. +            if (activeChar.isTryDressMeEnabled()) {
  4909. +                activeChar.sendMessage("You are already trying a new skin.");
  4910. +                return false;
  4911. +            }
  4912. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  4913. +                activeChar.sendMessage("This command can only be used on peace area.");
  4914. +                return false;
  4915. +            }
  4916. +            if (activeChar.getDressMeData() == null) {
  4917. +                final DressMeData dmd = new DressMeData();
  4918. +                activeChar.setDressMeData(dmd);
  4919. +            }
  4920. +            activeChar.setTryDressMeEnabled(true);
  4921. +            activeChar.setDressMeHelmEnabled(true);
  4922. +            activeChar.setDressMeEnabled(true);
  4923. +            activeChar.getDressMeData().setChestId(50018);
  4924. +            activeChar.getDressMeData().setHairId(50019);
  4925. +            activeChar.broadcastUserInfo();
  4926. +            initCountdown(activeChar, 5);
  4927. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  4928. +                @Override
  4929. +                public void run() {
  4930. +                    activeChar.setTryDressMeEnabled(false);
  4931. +                    activeChar.setDressMeHelmEnabled(false);
  4932. +                    activeChar.setDressMeEnabled(false);
  4933. +                    activeChar.broadcastUserInfo();
  4934. +                }
  4935. +            }, 5000L);
  4936. +        }
  4937. +        if (command.equals("King")) {
  4938. +            if (!activeChar.isVip()) {
  4939. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  4940. +                return false;
  4941. +            }
  4942. +            if (activeChar.isTryDressMeEnabled()) {
  4943. +                activeChar.sendMessage("You are already trying a new skin.");
  4944. +                return false;
  4945. +            }
  4946. +            if (activeChar.getDressMeData() == null) {
  4947. +                final DressMeData dmd = new DressMeData();
  4948. +                activeChar.setDressMeData(dmd);
  4949. +            }
  4950. +            activeChar.setDressMeHelmEnabled(true);
  4951. +            activeChar.setDressMeEnabled(true);
  4952. +            activeChar.getDressMeData().setChestId(50018);
  4953. +            activeChar.getDressMeData().setHairId(50019);
  4954. +            activeChar.broadcastUserInfo();
  4955. +        }
  4956. +        if (command.equals("trySkin_WhiteKing")) {
  4957. +            if (activeChar.isTryDressMeEnabled()) {
  4958. +                activeChar.sendMessage("You are already trying a new skin.");
  4959. +                return false;
  4960. +            }
  4961. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  4962. +                activeChar.sendMessage("This command can only be used on peace area.");
  4963. +                return false;
  4964. +            }
  4965. +            if (activeChar.getDressMeData() == null) {
  4966. +                final DressMeData dmd = new DressMeData();
  4967. +                activeChar.setDressMeData(dmd);
  4968. +            }
  4969. +            activeChar.setTryDressMeEnabled(true);
  4970. +            activeChar.setDressMeHelmEnabled(true);
  4971. +            activeChar.setDressMeEnabled(true);
  4972. +            activeChar.getDressMeData().setChestId(50020);
  4973. +            activeChar.getDressMeData().setHairId(50021);
  4974. +            activeChar.broadcastUserInfo();
  4975. +            initCountdown(activeChar, 5);
  4976. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  4977. +                @Override
  4978. +                public void run() {
  4979. +                    activeChar.setTryDressMeEnabled(false);
  4980. +                    activeChar.setDressMeHelmEnabled(false);
  4981. +                    activeChar.setDressMeEnabled(false);
  4982. +                    activeChar.broadcastUserInfo();
  4983. +                }
  4984. +            }, 5000L);
  4985. +        }
  4986. +        if (command.equals("WhiteKing")) {
  4987. +            if (!activeChar.isVip()) {
  4988. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  4989. +                return false;
  4990. +            }
  4991. +            if (activeChar.isTryDressMeEnabled()) {
  4992. +                activeChar.sendMessage("You are already trying a new skin.");
  4993. +                return false;
  4994. +            }
  4995. +            if (activeChar.getDressMeData() == null) {
  4996. +                final DressMeData dmd = new DressMeData();
  4997. +                activeChar.setDressMeData(dmd);
  4998. +            }
  4999. +            activeChar.setDressMeHelmEnabled(true);
  5000. +            activeChar.setDressMeEnabled(true);
  5001. +            activeChar.getDressMeData().setChestId(50020);
  5002. +            activeChar.getDressMeData().setHairId(50021);
  5003. +            activeChar.broadcastUserInfo();
  5004. +        }
  5005. +        if (command.equals("trySkin_Valkyri")) {
  5006. +            if (activeChar.isTryDressMeEnabled()) {
  5007. +                activeChar.sendMessage("You are already trying a new skin.");
  5008. +                return false;
  5009. +            }
  5010. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5011. +                activeChar.sendMessage("This command can only be used on peace area.");
  5012. +                return false;
  5013. +            }
  5014. +            if (activeChar.getDressMeData() == null) {
  5015. +                final DressMeData dmd = new DressMeData();
  5016. +                activeChar.setDressMeData(dmd);
  5017. +            }
  5018. +            activeChar.setTryDressMeEnabled(true);
  5019. +            activeChar.setDressMeHelmEnabled(true);
  5020. +            activeChar.setDressMeEnabled(true);
  5021. +            activeChar.getDressMeData().setChestId(50022);
  5022. +            activeChar.getDressMeData().setHairId(50023);
  5023. +            activeChar.broadcastUserInfo();
  5024. +            initCountdown(activeChar, 5);
  5025. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5026. +                @Override
  5027. +                public void run() {
  5028. +                    activeChar.setTryDressMeEnabled(false);
  5029. +                    activeChar.setDressMeHelmEnabled(false);
  5030. +                    activeChar.setDressMeEnabled(false);
  5031. +                    activeChar.broadcastUserInfo();
  5032. +                }
  5033. +            }, 5000L);
  5034. +        }
  5035. +        if (command.equals("Valkyri")) {
  5036. +            if (!activeChar.isVip()) {
  5037. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5038. +                return false;
  5039. +            }
  5040. +            if (activeChar.isTryDressMeEnabled()) {
  5041. +                activeChar.sendMessage("You are already trying a new skin.");
  5042. +                return false;
  5043. +            }
  5044. +            if (activeChar.getDressMeData() == null) {
  5045. +                final DressMeData dmd = new DressMeData();
  5046. +                activeChar.setDressMeData(dmd);
  5047. +            }
  5048. +            activeChar.setDressMeHelmEnabled(true);
  5049. +            activeChar.setDressMeEnabled(true);
  5050. +            activeChar.getDressMeData().setChestId(50022);
  5051. +            activeChar.getDressMeData().setHairId(50023);
  5052. +            activeChar.broadcastUserInfo();
  5053. +        }
  5054. +        if (command.equals("trySkin_Anakim")) {
  5055. +            if (activeChar.isTryDressMeEnabled()) {
  5056. +                activeChar.sendMessage("You are already trying a new skin.");
  5057. +                return false;
  5058. +            }
  5059. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5060. +                activeChar.sendMessage("This command can only be used on peace area.");
  5061. +                return false;
  5062. +            }
  5063. +            if (activeChar.getDressMeData() == null) {
  5064. +                final DressMeData dmd = new DressMeData();
  5065. +                activeChar.setDressMeData(dmd);
  5066. +            }
  5067. +            activeChar.setTryDressMeEnabled(true);
  5068. +            activeChar.setDressMeHelmEnabled(true);
  5069. +            activeChar.setDressMeEnabled(true);
  5070. +            activeChar.getDressMeData().setChestId(50024);
  5071. +            activeChar.getDressMeData().setHairId(50025);
  5072. +            activeChar.broadcastUserInfo();
  5073. +            initCountdown(activeChar, 5);
  5074. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5075. +                @Override
  5076. +                public void run() {
  5077. +                    activeChar.setTryDressMeEnabled(false);
  5078. +                    activeChar.setDressMeHelmEnabled(false);
  5079. +                    activeChar.setDressMeEnabled(false);
  5080. +                    activeChar.broadcastUserInfo();
  5081. +                }
  5082. +            }, 5000L);
  5083. +        }
  5084. +        if (command.equals("Anakim")) {
  5085. +            if (!activeChar.isVip()) {
  5086. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5087. +                return false;
  5088. +            }
  5089. +            if (activeChar.isTryDressMeEnabled()) {
  5090. +                activeChar.sendMessage("You are already trying a new skin.");
  5091. +                return false;
  5092. +            }
  5093. +            if (activeChar.getDressMeData() == null) {
  5094. +                final DressMeData dmd = new DressMeData();
  5095. +                activeChar.setDressMeData(dmd);
  5096. +            }
  5097. +            activeChar.setDressMeHelmEnabled(true);
  5098. +            activeChar.setDressMeEnabled(true);
  5099. +            activeChar.getDressMeData().setChestId(50024);
  5100. +            activeChar.getDressMeData().setHairId(50025);
  5101. +            activeChar.broadcastUserInfo();
  5102. +        }
  5103. +        if (command.equals("trySkin_Pirate")) {
  5104. +            if (activeChar.isTryDressMeEnabled()) {
  5105. +                activeChar.sendMessage("You are already trying a new skin.");
  5106. +                return false;
  5107. +            }
  5108. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5109. +                activeChar.sendMessage("This command can only be used on peace area.");
  5110. +                return false;
  5111. +            }
  5112. +            if (activeChar.getDressMeData() == null) {
  5113. +                final DressMeData dmd = new DressMeData();
  5114. +                activeChar.setDressMeData(dmd);
  5115. +            }
  5116. +            activeChar.setTryDressMeEnabled(true);
  5117. +            activeChar.setDressMeHelmEnabled(true);
  5118. +            activeChar.setDressMeEnabled(true);
  5119. +            activeChar.getDressMeData().setChestId(50026);
  5120. +            activeChar.getDressMeData().setHairId(50027);
  5121. +            activeChar.broadcastUserInfo();
  5122. +            initCountdown(activeChar, 5);
  5123. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5124. +                @Override
  5125. +                public void run() {
  5126. +                    activeChar.setTryDressMeEnabled(false);
  5127. +                    activeChar.setDressMeHelmEnabled(false);
  5128. +                    activeChar.setDressMeEnabled(false);
  5129. +                    activeChar.broadcastUserInfo();
  5130. +                }
  5131. +            }, 5000L);
  5132. +        }
  5133. +        if (command.equals("Pirate")) {
  5134. +            if (!activeChar.isVip()) {
  5135. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5136. +                return false;
  5137. +            }
  5138. +            if (activeChar.isTryDressMeEnabled()) {
  5139. +                activeChar.sendMessage("You are already trying a new skin.");
  5140. +                return false;
  5141. +            }
  5142. +            if (activeChar.getDressMeData() == null) {
  5143. +                final DressMeData dmd = new DressMeData();
  5144. +                activeChar.setDressMeData(dmd);
  5145. +            }
  5146. +            activeChar.setDressMeHelmEnabled(true);
  5147. +            activeChar.setDressMeEnabled(true);
  5148. +            activeChar.getDressMeData().setChestId(50026);
  5149. +            activeChar.getDressMeData().setHairId(50027);
  5150. +            activeChar.broadcastUserInfo();
  5151. +        }
  5152. +        if (command.equals("trySkin_PirateBlue")) {
  5153. +            if (activeChar.isTryDressMeEnabled()) {
  5154. +                activeChar.sendMessage("You are already trying a new skin.");
  5155. +                return false;
  5156. +            }
  5157. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5158. +                activeChar.sendMessage("This command can only be used on peace area.");
  5159. +                return false;
  5160. +            }
  5161. +            if (activeChar.getDressMeData() == null) {
  5162. +                final DressMeData dmd = new DressMeData();
  5163. +                activeChar.setDressMeData(dmd);
  5164. +            }
  5165. +            activeChar.setTryDressMeEnabled(true);
  5166. +            activeChar.setDressMeHelmEnabled(true);
  5167. +            activeChar.setDressMeEnabled(true);
  5168. +            activeChar.getDressMeData().setChestId(50028);
  5169. +            activeChar.getDressMeData().setHairId(50029);
  5170. +            activeChar.broadcastUserInfo();
  5171. +            initCountdown(activeChar, 5);
  5172. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5173. +                @Override
  5174. +                public void run() {
  5175. +                    activeChar.setTryDressMeEnabled(false);
  5176. +                    activeChar.setDressMeHelmEnabled(false);
  5177. +                    activeChar.setDressMeEnabled(false);
  5178. +                    activeChar.broadcastUserInfo();
  5179. +                }
  5180. +            }, 5000L);
  5181. +        }
  5182. +        if (command.equals("PirateBlue")) {
  5183. +            if (!activeChar.isVip()) {
  5184. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5185. +                return false;
  5186. +            }
  5187. +            if (activeChar.isTryDressMeEnabled()) {
  5188. +                activeChar.sendMessage("You are already trying a new skin.");
  5189. +                return false;
  5190. +            }
  5191. +            if (activeChar.getDressMeData() == null) {
  5192. +                final DressMeData dmd = new DressMeData();
  5193. +                activeChar.setDressMeData(dmd);
  5194. +            }
  5195. +            activeChar.setDressMeHelmEnabled(true);
  5196. +            activeChar.setDressMeEnabled(true);
  5197. +            activeChar.getDressMeData().setChestId(50028);
  5198. +            activeChar.getDressMeData().setHairId(50029);
  5199. +            activeChar.broadcastUserInfo();
  5200. +        }
  5201. +        if (command.equals("trySkin_Ninja")) {
  5202. +            if (activeChar.isTryDressMeEnabled()) {
  5203. +                activeChar.sendMessage("You are already trying a new skin.");
  5204. +                return false;
  5205. +            }
  5206. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5207. +                activeChar.sendMessage("This command can only be used on peace area.");
  5208. +                return false;
  5209. +            }
  5210. +            if (activeChar.getDressMeData() == null) {
  5211. +                final DressMeData dmd = new DressMeData();
  5212. +                activeChar.setDressMeData(dmd);
  5213. +            }
  5214. +            activeChar.setTryDressMeEnabled(true);
  5215. +            activeChar.setDressMeHelmEnabled(true);
  5216. +            activeChar.setDressMeEnabled(true);
  5217. +            activeChar.getDressMeData().setChestId(50030);
  5218. +            activeChar.getDressMeData().setHairId(50031);
  5219. +            activeChar.broadcastUserInfo();
  5220. +            initCountdown(activeChar, 5);
  5221. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5222. +                @Override
  5223. +                public void run() {
  5224. +                    activeChar.setTryDressMeEnabled(false);
  5225. +                    activeChar.setDressMeHelmEnabled(false);
  5226. +                    activeChar.setDressMeEnabled(false);
  5227. +                    activeChar.broadcastUserInfo();
  5228. +                }
  5229. +            }, 5000L);
  5230. +        }
  5231. +        if (command.equals("Ninja")) {
  5232. +            if (!activeChar.isVip()) {
  5233. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5234. +                return false;
  5235. +            }
  5236. +            if (activeChar.isTryDressMeEnabled()) {
  5237. +                activeChar.sendMessage("You are already trying a new skin.");
  5238. +                return false;
  5239. +            }
  5240. +            if (activeChar.getDressMeData() == null) {
  5241. +                final DressMeData dmd = new DressMeData();
  5242. +                activeChar.setDressMeData(dmd);
  5243. +            }
  5244. +            activeChar.setDressMeHelmEnabled(true);
  5245. +            activeChar.setDressMeEnabled(true);
  5246. +            activeChar.getDressMeData().setChestId(50030);
  5247. +            activeChar.getDressMeData().setHairId(50031);
  5248. +            activeChar.broadcastUserInfo();
  5249. +        }
  5250. +        if (command.equals("trySkin_Samurai")) {
  5251. +            if (activeChar.isTryDressMeEnabled()) {
  5252. +                activeChar.sendMessage("You are already trying a new skin.");
  5253. +                return false;
  5254. +            }
  5255. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5256. +                activeChar.sendMessage("This command can only be used on peace area.");
  5257. +                return false;
  5258. +            }
  5259. +            if (activeChar.getDressMeData() == null) {
  5260. +                final DressMeData dmd = new DressMeData();
  5261. +                activeChar.setDressMeData(dmd);
  5262. +            }
  5263. +            activeChar.setTryDressMeEnabled(true);
  5264. +            activeChar.setDressMeHelmEnabled(true);
  5265. +            activeChar.setDressMeEnabled(true);
  5266. +            activeChar.getDressMeData().setChestId(50032);
  5267. +            activeChar.getDressMeData().setHairId(50033);
  5268. +            activeChar.broadcastUserInfo();
  5269. +            initCountdown(activeChar, 5);
  5270. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5271. +                @Override
  5272. +                public void run() {
  5273. +                    activeChar.setTryDressMeEnabled(false);
  5274. +                    activeChar.setDressMeHelmEnabled(false);
  5275. +                    activeChar.setDressMeEnabled(false);
  5276. +                    activeChar.broadcastUserInfo();
  5277. +                }
  5278. +            }, 5000L);
  5279. +        }
  5280. +        if (command.equals("Samurai")) {
  5281. +            if (!activeChar.isVip()) {
  5282. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5283. +                return false;
  5284. +            }
  5285. +            if (activeChar.isTryDressMeEnabled()) {
  5286. +                activeChar.sendMessage("You are already trying a new skin.");
  5287. +                return false;
  5288. +            }
  5289. +            if (activeChar.getDressMeData() == null) {
  5290. +                final DressMeData dmd = new DressMeData();
  5291. +                activeChar.setDressMeData(dmd);
  5292. +            }
  5293. +            activeChar.setDressMeHelmEnabled(true);
  5294. +            activeChar.setDressMeEnabled(true);
  5295. +            activeChar.getDressMeData().setChestId(50032);
  5296. +            activeChar.getDressMeData().setHairId(50033);
  5297. +            activeChar.broadcastUserInfo();
  5298. +        }
  5299. +        if (command.equals("trySkin_DarkWizard")) {
  5300. +            if (activeChar.isTryDressMeEnabled()) {
  5301. +                activeChar.sendMessage("You are already trying a new skin.");
  5302. +                return false;
  5303. +            }
  5304. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5305. +                activeChar.sendMessage("This command can only be used on peace area.");
  5306. +                return false;
  5307. +            }
  5308. +            if (activeChar.getDressMeData() == null) {
  5309. +                final DressMeData dmd = new DressMeData();
  5310. +                activeChar.setDressMeData(dmd);
  5311. +            }
  5312. +            activeChar.setTryDressMeEnabled(true);
  5313. +            activeChar.setDressMeHelmEnabled(true);
  5314. +            activeChar.setDressMeEnabled(true);
  5315. +            activeChar.getDressMeData().setChestId(50034);
  5316. +            activeChar.getDressMeData().setHairId(50035);
  5317. +            activeChar.broadcastUserInfo();
  5318. +            initCountdown(activeChar, 5);
  5319. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5320. +                @Override
  5321. +                public void run() {
  5322. +                    activeChar.setTryDressMeEnabled(false);
  5323. +                    activeChar.setDressMeHelmEnabled(false);
  5324. +                    activeChar.setDressMeEnabled(false);
  5325. +                    activeChar.broadcastUserInfo();
  5326. +                }
  5327. +            }, 5000L);
  5328. +        }
  5329. +        if (command.equals("DarkWizard")) {
  5330. +            if (!activeChar.isVip()) {
  5331. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5332. +                return false;
  5333. +            }
  5334. +            if (activeChar.isTryDressMeEnabled()) {
  5335. +                activeChar.sendMessage("You are already trying a new skin.");
  5336. +                return false;
  5337. +            }
  5338. +            if (activeChar.getDressMeData() == null) {
  5339. +                final DressMeData dmd = new DressMeData();
  5340. +                activeChar.setDressMeData(dmd);
  5341. +            }
  5342. +            activeChar.setDressMeHelmEnabled(true);
  5343. +            activeChar.setDressMeEnabled(true);
  5344. +            activeChar.getDressMeData().setChestId(50034);
  5345. +            activeChar.getDressMeData().setHairId(50035);
  5346. +            activeChar.broadcastUserInfo();
  5347. +        }
  5348. +        if (command.equals("trySkin_Vampire")) {
  5349. +            if (activeChar.isTryDressMeEnabled()) {
  5350. +                activeChar.sendMessage("You are already trying a new skin.");
  5351. +                return false;
  5352. +            }
  5353. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5354. +                activeChar.sendMessage("This command can only be used on peace area.");
  5355. +                return false;
  5356. +            }
  5357. +            if (activeChar.getDressMeData() == null) {
  5358. +                final DressMeData dmd = new DressMeData();
  5359. +                activeChar.setDressMeData(dmd);
  5360. +            }
  5361. +            activeChar.setTryDressMeEnabled(true);
  5362. +            activeChar.setDressMeHelmEnabled(true);
  5363. +            activeChar.setDressMeEnabled(true);
  5364. +            activeChar.getDressMeData().setChestId(50036);
  5365. +            activeChar.getDressMeData().setHairId(50037);
  5366. +            activeChar.broadcastUserInfo();
  5367. +            initCountdown(activeChar, 5);
  5368. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5369. +                @Override
  5370. +                public void run() {
  5371. +                    activeChar.setTryDressMeEnabled(false);
  5372. +                    activeChar.setDressMeHelmEnabled(false);
  5373. +                    activeChar.setDressMeEnabled(false);
  5374. +                    activeChar.broadcastUserInfo();
  5375. +                }
  5376. +            }, 5000L);
  5377. +        }
  5378. +        if (command.equals("Vampire")) {
  5379. +            if (!activeChar.isVip()) {
  5380. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5381. +                return false;
  5382. +            }
  5383. +            if (activeChar.isTryDressMeEnabled()) {
  5384. +                activeChar.sendMessage("You are already trying a new skin.");
  5385. +                return false;
  5386. +            }
  5387. +            if (activeChar.getDressMeData() == null) {
  5388. +                final DressMeData dmd = new DressMeData();
  5389. +                activeChar.setDressMeData(dmd);
  5390. +            }
  5391. +            activeChar.setDressMeHelmEnabled(true);
  5392. +            activeChar.setDressMeEnabled(true);
  5393. +            activeChar.getDressMeData().setChestId(50036);
  5394. +            activeChar.getDressMeData().setHairId(50037);
  5395. +            activeChar.broadcastUserInfo();
  5396. +        }
  5397. +        if (command.equals("trySkin_Beleth")) {
  5398. +            if (activeChar.isTryDressMeEnabled()) {
  5399. +                activeChar.sendMessage("You are already trying a new skin.");
  5400. +                return false;
  5401. +            }
  5402. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5403. +                activeChar.sendMessage("This command can only be used on peace area.");
  5404. +                return false;
  5405. +            }
  5406. +            if (activeChar.getDressMeData() == null) {
  5407. +                final DressMeData dmd = new DressMeData();
  5408. +                activeChar.setDressMeData(dmd);
  5409. +            }
  5410. +            activeChar.setTryDressMeEnabled(true);
  5411. +            activeChar.setDressMeHelmEnabled(true);
  5412. +            activeChar.setDressMeEnabled(true);
  5413. +            activeChar.getDressMeData().setChestId(50038);
  5414. +            activeChar.getDressMeData().setHairId(50039);
  5415. +            activeChar.broadcastUserInfo();
  5416. +            initCountdown(activeChar, 5);
  5417. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5418. +                @Override
  5419. +                public void run() {
  5420. +                    activeChar.setTryDressMeEnabled(false);
  5421. +                    activeChar.setDressMeHelmEnabled(false);
  5422. +                    activeChar.setDressMeEnabled(false);
  5423. +                    activeChar.broadcastUserInfo();
  5424. +                }
  5425. +            }, 5000L);
  5426. +        }
  5427. +        if (command.equals("Beleth")) {
  5428. +            if (!activeChar.isVip()) {
  5429. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5430. +                return false;
  5431. +            }
  5432. +            if (activeChar.isTryDressMeEnabled()) {
  5433. +                activeChar.sendMessage("You are already trying a new skin.");
  5434. +                return false;
  5435. +            }
  5436. +            if (activeChar.getDressMeData() == null) {
  5437. +                final DressMeData dmd = new DressMeData();
  5438. +                activeChar.setDressMeData(dmd);
  5439. +            }
  5440. +            activeChar.setDressMeHelmEnabled(true);
  5441. +            activeChar.setDressMeEnabled(true);
  5442. +            activeChar.getDressMeData().setChestId(50038);
  5443. +            activeChar.getDressMeData().setHairId(50039);
  5444. +            activeChar.broadcastUserInfo();
  5445. +        }
  5446. +        if (command.equals("trySkin_Cyborg")) {
  5447. +            if (activeChar.isTryDressMeEnabled()) {
  5448. +                activeChar.sendMessage("You are already trying a new skin.");
  5449. +                return false;
  5450. +            }
  5451. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5452. +                activeChar.sendMessage("This command can only be used on peace area.");
  5453. +                return false;
  5454. +            }
  5455. +            if (activeChar.getDressMeData() == null) {
  5456. +                final DressMeData dmd = new DressMeData();
  5457. +                activeChar.setDressMeData(dmd);
  5458. +            }
  5459. +            activeChar.setTryDressMeEnabled(true);
  5460. +            activeChar.setDressMeHelmEnabled(true);
  5461. +            activeChar.setDressMeEnabled(true);
  5462. +            activeChar.getDressMeData().setChestId(50040);
  5463. +            activeChar.getDressMeData().setHairId(50041);
  5464. +            activeChar.broadcastUserInfo();
  5465. +            initCountdown(activeChar, 5);
  5466. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5467. +                @Override
  5468. +                public void run() {
  5469. +                    activeChar.setTryDressMeEnabled(false);
  5470. +                    activeChar.setDressMeHelmEnabled(false);
  5471. +                    activeChar.setDressMeEnabled(false);
  5472. +                    activeChar.broadcastUserInfo();
  5473. +                }
  5474. +            }, 5000L);
  5475. +        }
  5476. +        if (command.equals("Cyborg")) {
  5477. +            if (!activeChar.isVip()) {
  5478. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5479. +                return false;
  5480. +            }
  5481. +            if (activeChar.isTryDressMeEnabled()) {
  5482. +                activeChar.sendMessage("You are already trying a new skin.");
  5483. +                return false;
  5484. +            }
  5485. +            if (activeChar.getDressMeData() == null) {
  5486. +                final DressMeData dmd = new DressMeData();
  5487. +                activeChar.setDressMeData(dmd);
  5488. +            }
  5489. +            activeChar.setDressMeHelmEnabled(true);
  5490. +            activeChar.setDressMeEnabled(true);
  5491. +            activeChar.getDressMeData().setChestId(50040);
  5492. +            activeChar.getDressMeData().setHairId(50041);
  5493. +            activeChar.broadcastUserInfo();
  5494. +        }
  5495. +        if (command.equals("trySkin_Cowboy")) {
  5496. +            if (activeChar.isTryDressMeEnabled()) {
  5497. +                activeChar.sendMessage("You are already trying a new skin.");
  5498. +                return false;
  5499. +            }
  5500. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5501. +                activeChar.sendMessage("This command can only be used on peace area.");
  5502. +                return false;
  5503. +            }
  5504. +            if (activeChar.getDressMeData() == null) {
  5505. +                final DressMeData dmd = new DressMeData();
  5506. +                activeChar.setDressMeData(dmd);
  5507. +            }
  5508. +            activeChar.setTryDressMeEnabled(true);
  5509. +            activeChar.setDressMeHelmEnabled(true);
  5510. +            activeChar.setDressMeEnabled(true);
  5511. +            activeChar.getDressMeData().setChestId(50042);
  5512. +            activeChar.getDressMeData().setHairId(45043);
  5513. +            activeChar.broadcastUserInfo();
  5514. +            initCountdown(activeChar, 5);
  5515. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5516. +                @Override
  5517. +                public void run() {
  5518. +                    activeChar.setTryDressMeEnabled(false);
  5519. +                    activeChar.setDressMeHelmEnabled(false);
  5520. +                    activeChar.setDressMeEnabled(false);
  5521. +                    activeChar.broadcastUserInfo();
  5522. +                }
  5523. +            }, 5000L);
  5524. +        }
  5525. +        if (command.equals("Cowboy")) {
  5526. +            if (!activeChar.isVip()) {
  5527. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5528. +                return false;
  5529. +            }
  5530. +            if (activeChar.isTryDressMeEnabled()) {
  5531. +                activeChar.sendMessage("You are already trying a new skin.");
  5532. +                return false;
  5533. +            }
  5534. +            if (activeChar.getDressMeData() == null) {
  5535. +                final DressMeData dmd = new DressMeData();
  5536. +                activeChar.setDressMeData(dmd);
  5537. +            }
  5538. +            activeChar.setDressMeHelmEnabled(true);
  5539. +            activeChar.setDressMeEnabled(true);
  5540. +            activeChar.getDressMeData().setChestId(50042);
  5541. +            activeChar.getDressMeData().setHairId(50043);
  5542. +            activeChar.broadcastUserInfo();
  5543. +        }
  5544. +        if (command.equals("trySkin_Barbarian")) {
  5545. +            if (activeChar.isTryDressMeEnabled()) {
  5546. +                activeChar.sendMessage("You are already trying a new skin.");
  5547. +                return false;
  5548. +            }
  5549. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5550. +                activeChar.sendMessage("This command can only be used on peace area.");
  5551. +                return false;
  5552. +            }
  5553. +            if (activeChar.getDressMeData() == null) {
  5554. +                final DressMeData dmd = new DressMeData();
  5555. +                activeChar.setDressMeData(dmd);
  5556. +            }
  5557. +            activeChar.setTryDressMeEnabled(true);
  5558. +            activeChar.setDressMeHelmEnabled(true);
  5559. +            activeChar.setDressMeEnabled(true);
  5560. +            activeChar.getDressMeData().setChestId(50044);
  5561. +            activeChar.getDressMeData().setHairId(50045);
  5562. +            activeChar.broadcastUserInfo();
  5563. +            initCountdown(activeChar, 5);
  5564. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5565. +                @Override
  5566. +                public void run() {
  5567. +                    activeChar.setTryDressMeEnabled(false);
  5568. +                    activeChar.setDressMeHelmEnabled(false);
  5569. +                    activeChar.setDressMeEnabled(false);
  5570. +                    activeChar.broadcastUserInfo();
  5571. +                }
  5572. +            }, 5000L);
  5573. +        }
  5574. +        if (command.equals("Barbarian")) {
  5575. +            if (!activeChar.isVip()) {
  5576. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5577. +                return false;
  5578. +            }
  5579. +            if (activeChar.isTryDressMeEnabled()) {
  5580. +                activeChar.sendMessage("You are already trying a new skin.");
  5581. +                return false;
  5582. +            }
  5583. +            if (activeChar.getDressMeData() == null) {
  5584. +                final DressMeData dmd = new DressMeData();
  5585. +                activeChar.setDressMeData(dmd);
  5586. +            }
  5587. +            activeChar.setDressMeHelmEnabled(true);
  5588. +            activeChar.setDressMeEnabled(true);
  5589. +            activeChar.getDressMeData().setChestId(50044);
  5590. +            activeChar.getDressMeData().setHairId(50050);
  5591. +            activeChar.broadcastUserInfo();
  5592. +        }
  5593. +        if (command.equals("trySkin_Dragon")) {
  5594. +            if (activeChar.isTryDressMeEnabled()) {
  5595. +                activeChar.sendMessage("You are already trying a new skin.");
  5596. +                return false;
  5597. +            }
  5598. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5599. +                activeChar.sendMessage("This command can only be used on peace area.");
  5600. +                return false;
  5601. +            }
  5602. +            if (activeChar.getDressMeData() == null) {
  5603. +                final DressMeData dmd = new DressMeData();
  5604. +                activeChar.setDressMeData(dmd);
  5605. +            }
  5606. +            activeChar.setTryDressMeEnabled(true);
  5607. +            activeChar.setDressMeHelmEnabled(true);
  5608. +            activeChar.setDressMeEnabled(true);
  5609. +            activeChar.getDressMeData().setChestId(50046);
  5610. +            activeChar.getDressMeData().setHairId(50047);
  5611. +            activeChar.broadcastUserInfo();
  5612. +            initCountdown(activeChar, 5);
  5613. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5614. +                @Override
  5615. +                public void run() {
  5616. +                    activeChar.setTryDressMeEnabled(false);
  5617. +                    activeChar.setDressMeHelmEnabled(false);
  5618. +                    activeChar.setDressMeEnabled(false);
  5619. +                    activeChar.broadcastUserInfo();
  5620. +                }
  5621. +            }, 5000L);
  5622. +        }
  5623. +        if (command.equals("Dragon")) {
  5624. +            if (!activeChar.isVip()) {
  5625. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5626. +                return false;
  5627. +            }
  5628. +            if (activeChar.isTryDressMeEnabled()) {
  5629. +                activeChar.sendMessage("You are already trying a new skin.");
  5630. +                return false;
  5631. +            }
  5632. +            if (activeChar.getDressMeData() == null) {
  5633. +                final DressMeData dmd = new DressMeData();
  5634. +                activeChar.setDressMeData(dmd);
  5635. +            }
  5636. +            activeChar.setDressMeHelmEnabled(true);
  5637. +            activeChar.setDressMeEnabled(true);
  5638. +            activeChar.getDressMeData().setChestId(50046);
  5639. +            activeChar.getDressMeData().setHairId(50047);
  5640. +            activeChar.broadcastUserInfo();
  5641. +        }
  5642. +        if (command.equals("trySkin_WhiteKnight")) {
  5643. +            if (activeChar.isTryDressMeEnabled()) {
  5644. +                activeChar.sendMessage("You are already trying a new skin.");
  5645. +                return false;
  5646. +            }
  5647. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5648. +                activeChar.sendMessage("This command can only be used on peace area.");
  5649. +                return false;
  5650. +            }
  5651. +            if (activeChar.getDressMeData() == null) {
  5652. +                final DressMeData dmd = new DressMeData();
  5653. +                activeChar.setDressMeData(dmd);
  5654. +            }
  5655. +            activeChar.setTryDressMeEnabled(true);
  5656. +            activeChar.setDressMeHelmEnabled(true);
  5657. +            activeChar.setDressMeEnabled(true);
  5658. +            activeChar.getDressMeData().setChestId(50048);
  5659. +            activeChar.getDressMeData().setHairId(50049);
  5660. +            activeChar.broadcastUserInfo();
  5661. +            initCountdown(activeChar, 5);
  5662. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5663. +                @Override
  5664. +                public void run() {
  5665. +                    activeChar.setTryDressMeEnabled(false);
  5666. +                    activeChar.setDressMeHelmEnabled(false);
  5667. +                    activeChar.setDressMeEnabled(false);
  5668. +                    activeChar.broadcastUserInfo();
  5669. +                }
  5670. +            }, 5000L);
  5671. +        }
  5672. +        if (command.equals("WhiteKnight")) {
  5673. +            if (!activeChar.isVip()) {
  5674. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5675. +                return false;
  5676. +            }
  5677. +            if (activeChar.isTryDressMeEnabled()) {
  5678. +                activeChar.sendMessage("You are already trying a new skin.");
  5679. +                return false;
  5680. +            }
  5681. +            if (activeChar.getDressMeData() == null) {
  5682. +                final DressMeData dmd = new DressMeData();
  5683. +                activeChar.setDressMeData(dmd);
  5684. +            }
  5685. +            activeChar.setDressMeHelmEnabled(true);
  5686. +            activeChar.setDressMeEnabled(true);
  5687. +            activeChar.getDressMeData().setChestId(50048);
  5688. +            activeChar.getDressMeData().setHairId(50049);
  5689. +            activeChar.broadcastUserInfo();
  5690. +        }
  5691. +        if (command.equals("trySkin_RedSanta")) {
  5692. +            if (activeChar.isTryDressMeEnabled()) {
  5693. +                activeChar.sendMessage("You are already trying a new skin.");
  5694. +                return false;
  5695. +            }
  5696. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5697. +                activeChar.sendMessage("This command can only be used on peace area.");
  5698. +                return false;
  5699. +            }
  5700. +            if (activeChar.getDressMeData() == null) {
  5701. +                final DressMeData dmd = new DressMeData();
  5702. +                activeChar.setDressMeData(dmd);
  5703. +            }
  5704. +            activeChar.setTryDressMeEnabled(true);
  5705. +            activeChar.setDressMeHelmEnabled(true);
  5706. +            activeChar.setDressMeEnabled(true);
  5707. +            activeChar.getDressMeData().setChestId(50050);
  5708. +            activeChar.getDressMeData().setHairId(50051);
  5709. +            activeChar.broadcastUserInfo();
  5710. +            initCountdown(activeChar, 5);
  5711. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5712. +                @Override
  5713. +                public void run() {
  5714. +                    activeChar.setTryDressMeEnabled(false);
  5715. +                    activeChar.setDressMeHelmEnabled(false);
  5716. +                    activeChar.setDressMeEnabled(false);
  5717. +                    activeChar.broadcastUserInfo();
  5718. +                }
  5719. +            }, 5000L);
  5720. +        }
  5721. +        if (command.equals("RedSanta")) {
  5722. +            if (!activeChar.isVip()) {
  5723. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5724. +                return false;
  5725. +            }
  5726. +            if (activeChar.isTryDressMeEnabled()) {
  5727. +                activeChar.sendMessage("You are already trying a new skin.");
  5728. +                return false;
  5729. +            }
  5730. +            if (activeChar.getDressMeData() == null) {
  5731. +                final DressMeData dmd = new DressMeData();
  5732. +                activeChar.setDressMeData(dmd);
  5733. +            }
  5734. +            activeChar.setDressMeHelmEnabled(true);
  5735. +            activeChar.setDressMeEnabled(true);
  5736. +            activeChar.getDressMeData().setChestId(50050);
  5737. +            activeChar.getDressMeData().setHairId(50051);
  5738. +            activeChar.broadcastUserInfo();
  5739. +        }
  5740. +        if (command.equals("trySkin_BlueSanta")) {
  5741. +            if (activeChar.isTryDressMeEnabled()) {
  5742. +                activeChar.sendMessage("You are already trying a new skin.");
  5743. +                return false;
  5744. +            }
  5745. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5746. +                activeChar.sendMessage("This command can only be used on peace area.");
  5747. +                return false;
  5748. +            }
  5749. +            if (activeChar.getDressMeData() == null) {
  5750. +                final DressMeData dmd = new DressMeData();
  5751. +                activeChar.setDressMeData(dmd);
  5752. +            }
  5753. +            activeChar.setTryDressMeEnabled(true);
  5754. +            activeChar.setDressMeHelmEnabled(true);
  5755. +            activeChar.setDressMeEnabled(true);
  5756. +            activeChar.getDressMeData().setChestId(50052);
  5757. +            activeChar.getDressMeData().setHairId(50053);
  5758. +            activeChar.broadcastUserInfo();
  5759. +            initCountdown(activeChar, 5);
  5760. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5761. +                @Override
  5762. +                public void run() {
  5763. +                    activeChar.setTryDressMeEnabled(false);
  5764. +                    activeChar.setDressMeHelmEnabled(false);
  5765. +                    activeChar.setDressMeEnabled(false);
  5766. +                    activeChar.broadcastUserInfo();
  5767. +                }
  5768. +            }, 5000L);
  5769. +        }
  5770. +        if (command.equals("BlueSanta")) {
  5771. +            if (!activeChar.isVip()) {
  5772. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5773. +                return false;
  5774. +            }
  5775. +            if (activeChar.isTryDressMeEnabled()) {
  5776. +                activeChar.sendMessage("You are already trying a new skin.");
  5777. +                return false;
  5778. +            }
  5779. +            if (activeChar.getDressMeData() == null) {
  5780. +                final DressMeData dmd = new DressMeData();
  5781. +                activeChar.setDressMeData(dmd);
  5782. +            }
  5783. +            activeChar.setDressMeHelmEnabled(true);
  5784. +            activeChar.setDressMeEnabled(true);
  5785. +            activeChar.getDressMeData().setChestId(50052);
  5786. +            activeChar.getDressMeData().setHairId(50053);
  5787. +            activeChar.broadcastUserInfo();
  5788. +        }
  5789. +        if (command.equals("trySkin_DarkKnight")) {
  5790. +            if (activeChar.isTryDressMeEnabled()) {
  5791. +                activeChar.sendMessage("You are already trying a new skin.");
  5792. +                return false;
  5793. +            }
  5794. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5795. +                activeChar.sendMessage("This command can only be used on peace area.");
  5796. +                return false;
  5797. +            }
  5798. +            if (activeChar.getDressMeData() == null) {
  5799. +                final DressMeData dmd = new DressMeData();
  5800. +                activeChar.setDressMeData(dmd);
  5801. +            }
  5802. +            activeChar.setTryDressMeEnabled(true);
  5803. +            activeChar.setDressMeHelmEnabled(true);
  5804. +            activeChar.setDressMeEnabled(true);
  5805. +            activeChar.getDressMeData().setChestId(50054);
  5806. +            activeChar.getDressMeData().setHairId(50055);
  5807. +            activeChar.broadcastUserInfo();
  5808. +            initCountdown(activeChar, 5);
  5809. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5810. +                @Override
  5811. +                public void run() {
  5812. +                    activeChar.setTryDressMeEnabled(false);
  5813. +                    activeChar.setDressMeHelmEnabled(false);
  5814. +                    activeChar.setDressMeEnabled(false);
  5815. +                    activeChar.broadcastUserInfo();
  5816. +                }
  5817. +            }, 5000L);
  5818. +        }
  5819. +        if (command.equals("DarkKnight")) {
  5820. +            if (!activeChar.isVip()) {
  5821. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5822. +                return false;
  5823. +            }
  5824. +            if (activeChar.isTryDressMeEnabled()) {
  5825. +                activeChar.sendMessage("You are already trying a new skin.");
  5826. +                return false;
  5827. +            }
  5828. +            if (activeChar.getDressMeData() == null) {
  5829. +                final DressMeData dmd = new DressMeData();
  5830. +                activeChar.setDressMeData(dmd);
  5831. +            }
  5832. +            activeChar.setDressMeHelmEnabled(true);
  5833. +            activeChar.setDressMeEnabled(true);
  5834. +            activeChar.getDressMeData().setChestId(50054);
  5835. +            activeChar.getDressMeData().setHairId(50055);
  5836. +            activeChar.broadcastUserInfo();
  5837. +        }
  5838. +        if (command.equals("trySkin_Healer")) {
  5839. +            if (activeChar.isTryDressMeEnabled()) {
  5840. +                activeChar.sendMessage("You are already trying a new skin.");
  5841. +                return false;
  5842. +            }
  5843. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5844. +                activeChar.sendMessage("This command can only be used on peace area.");
  5845. +                return false;
  5846. +            }
  5847. +            if (activeChar.getDressMeData() == null) {
  5848. +                final DressMeData dmd = new DressMeData();
  5849. +                activeChar.setDressMeData(dmd);
  5850. +            }
  5851. +            activeChar.setTryDressMeEnabled(true);
  5852. +            activeChar.setDressMeHelmEnabled(true);
  5853. +            activeChar.setDressMeEnabled(true);
  5854. +            activeChar.getDressMeData().setChestId(50056);
  5855. +            activeChar.getDressMeData().setHairId(50057);
  5856. +            activeChar.broadcastUserInfo();
  5857. +            initCountdown(activeChar, 5);
  5858. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5859. +                @Override
  5860. +                public void run() {
  5861. +                    activeChar.setTryDressMeEnabled(false);
  5862. +                    activeChar.setDressMeHelmEnabled(false);
  5863. +                    activeChar.setDressMeEnabled(false);
  5864. +                    activeChar.broadcastUserInfo();
  5865. +                }
  5866. +            }, 5000L);
  5867. +        }
  5868. +        if (command.equals("Healer")) {
  5869. +            if (!activeChar.isVip()) {
  5870. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5871. +                return false;
  5872. +            }
  5873. +            if (activeChar.isTryDressMeEnabled()) {
  5874. +                activeChar.sendMessage("You are already trying a new skin.");
  5875. +                return false;
  5876. +            }
  5877. +            if (activeChar.getDressMeData() == null) {
  5878. +                final DressMeData dmd = new DressMeData();
  5879. +                activeChar.setDressMeData(dmd);
  5880. +            }
  5881. +            activeChar.setDressMeHelmEnabled(true);
  5882. +            activeChar.setDressMeEnabled(true);
  5883. +            activeChar.getDressMeData().setChestId(50056);
  5884. +            activeChar.getDressMeData().setHairId(50057);
  5885. +            activeChar.broadcastUserInfo();
  5886. +        }
  5887. +        if (command.equals("trySkin_Lilith")) {
  5888. +            if (activeChar.isTryDressMeEnabled()) {
  5889. +                activeChar.sendMessage("You are already trying a new skin.");
  5890. +                return false;
  5891. +            }
  5892. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5893. +                activeChar.sendMessage("This command can only be used on peace area.");
  5894. +                return false;
  5895. +            }
  5896. +            if (activeChar.getDressMeData() == null) {
  5897. +                final DressMeData dmd = new DressMeData();
  5898. +                activeChar.setDressMeData(dmd);
  5899. +            }
  5900. +            activeChar.setTryDressMeEnabled(true);
  5901. +            activeChar.setDressMeHelmEnabled(true);
  5902. +            activeChar.setDressMeEnabled(true);
  5903. +            activeChar.getDressMeData().setChestId(50058);
  5904. +            activeChar.getDressMeData().setHairId(50059);
  5905. +            activeChar.broadcastUserInfo();
  5906. +            initCountdown(activeChar, 5);
  5907. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5908. +                @Override
  5909. +                public void run() {
  5910. +                    activeChar.setTryDressMeEnabled(false);
  5911. +                    activeChar.setDressMeHelmEnabled(false);
  5912. +                    activeChar.setDressMeEnabled(false);
  5913. +                    activeChar.broadcastUserInfo();
  5914. +                }
  5915. +            }, 5000L);
  5916. +        }
  5917. +        if (command.equals("Lilith")) {
  5918. +            if (!activeChar.isVip()) {
  5919. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5920. +                return false;
  5921. +            }
  5922. +            if (activeChar.isTryDressMeEnabled()) {
  5923. +                activeChar.sendMessage("You are already trying a new skin.");
  5924. +                return false;
  5925. +            }
  5926. +            if (activeChar.getDressMeData() == null) {
  5927. +                final DressMeData dmd = new DressMeData();
  5928. +                activeChar.setDressMeData(dmd);
  5929. +            }
  5930. +            activeChar.setDressMeHelmEnabled(true);
  5931. +            activeChar.setDressMeEnabled(true);
  5932. +            activeChar.getDressMeData().setChestId(50058);
  5933. +            activeChar.getDressMeData().setHairId(50059);
  5934. +            activeChar.broadcastUserInfo();
  5935. +        }
  5936. +        if (command.equals("trySkin_Wedding")) {
  5937. +            if (activeChar.isTryDressMeEnabled()) {
  5938. +                activeChar.sendMessage("You are already trying a new skin.");
  5939. +                return false;
  5940. +            }
  5941. +            if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE)) {
  5942. +                activeChar.sendMessage("This command can only be used on peace area.");
  5943. +                return false;
  5944. +            }
  5945. +            if (activeChar.getDressMeData() == null) {
  5946. +                final DressMeData dmd = new DressMeData();
  5947. +                activeChar.setDressMeData(dmd);
  5948. +            }
  5949. +            activeChar.setTryDressMeEnabled(true);
  5950. +            activeChar.setDressMeHelmEnabled(true);
  5951. +            activeChar.setDressMeEnabled(true);
  5952. +            activeChar.getDressMeData().setChestId(6408);
  5953. +            activeChar.getDressMeData().setHairId(6842);
  5954. +            activeChar.broadcastUserInfo();
  5955. +            initCountdown(activeChar, 5);
  5956. +            ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
  5957. +                @Override
  5958. +                public void run() {
  5959. +                    activeChar.setTryDressMeEnabled(false);
  5960. +                    activeChar.setDressMeHelmEnabled(false);
  5961. +                    activeChar.setDressMeEnabled(false);
  5962. +                    activeChar.broadcastUserInfo();
  5963. +                }
  5964. +            }, 5000L);
  5965. +        }
  5966. +        if (command.equals("Wedding")) {
  5967. +            if (!activeChar.isVip()) {
  5968. +                activeChar.sendMessage("You need to be a VIP member to access skins.");
  5969. +                return false;
  5970. +            }
  5971. +            if (activeChar.isTryDressMeEnabled()) {
  5972. +                activeChar.sendMessage("You are already trying a new skin.");
  5973. +                return false;
  5974. +            }
  5975. +            if (activeChar.getDressMeData() == null) {
  5976. +                final DressMeData dmd = new DressMeData();
  5977. +                activeChar.setDressMeData(dmd);
  5978. +            }
  5979. +            activeChar.setDressMeHelmEnabled(true);
  5980. +            activeChar.setDressMeEnabled(true);
  5981. +            activeChar.getDressMeData().setChestId(6408);
  5982. +            activeChar.getDressMeData().setHairId(6842);
  5983. +            activeChar.broadcastUserInfo();
  5984. +        }
  5985. +        if (command.equals("disable_Helm")) {
  5986. +            if (activeChar.isDressMeHelmEnabled()) {
  5987. +                activeChar.setDressMeHelmEnabled(false);
  5988. +                activeChar.broadcastUserInfo();
  5989. +            }
  5990. +            else {
  5991. +                activeChar.setDressMeHelmEnabled(true);
  5992. +                activeChar.broadcastUserInfo();
  5993. +            }
  5994. +        }
  5995. +        return true;
  5996. +    }
  5997.  
  5998.     public static void showSkinPanel(L2PcInstance activeChar)
  5999.     {
  6000. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/ZoneManager.java b/aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/ZoneManager.java
  6001. index c7e46aa..19beeb3 100644
  6002. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/ZoneManager.java
  6003. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/ZoneManager.java
  6004. @@ -39,6 +39,7 @@
  6005.  import net.sf.l2j.gameserver.model.zone.type.L2AutoPvpZone;
  6006.  import net.sf.l2j.gameserver.model.zone.type.L2ChaoticFreeZone;
  6007.  import net.sf.l2j.gameserver.model.zone.type.L2ChaoticSelfZone;
  6008. +import net.sf.l2j.gameserver.model.zone.type.L2FarmZone;
  6009.  import net.sf.l2j.gameserver.model.zone.type.L2NoZergZone;
  6010.  import net.sf.l2j.gameserver.model.zone.type.L2OlympiadStadiumZone;
  6011.  import net.sf.l2j.gameserver.model.zone.type.L2PartyFarmZone;
  6012. @@ -536,6 +537,20 @@
  6013.         return null;
  6014.     }
  6015.    
  6016. +   public final static L2FarmZone getFarm(L2Character character)
  6017. +   {
  6018. +       if (character == null)
  6019. +           return null;
  6020. +      
  6021. +       for (L2ZoneType temp : ZoneManager.getInstance().getZones(character.getX(), character.getY(), character.getZ()))
  6022. +       {
  6023. +           if (temp instanceof L2FarmZone && temp.isCharacterInZone(character))
  6024. +               return ((L2FarmZone) temp);
  6025. +       }
  6026. +      
  6027. +       return null;
  6028. +   }
  6029. +
  6030.     public final static L2PartyFarmZone getParty(L2Character character)
  6031.     {
  6032.         if (character == null)
  6033. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
  6034. index ccd60ec..256db52 100644
  6035. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
  6036. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
  6037. @@ -14401,4 +14401,26 @@
  6038.     {
  6039.         _applyAugment = item;
  6040.     }
  6041. +
  6042. +   private boolean _autogb;
  6043. +   public void setAutoGB(boolean comm)
  6044. +   {
  6045. +       _autogb = comm;
  6046. +   }
  6047. +  
  6048. +   public boolean isAutoGB()
  6049. +   {
  6050. +       return _autogb;
  6051. +   }
  6052. +  
  6053. +   private String _html_save = "";
  6054. +   public final String getHtmlSave()
  6055. +   {
  6056. +       return _html_save;
  6057. +   }
  6058. +  
  6059. +   public final void setHtmlSave(String value)
  6060. +   {
  6061. +       _html_save = value;
  6062. +   }
  6063.  }
  6064. \ No newline at end of file
  6065. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/entity/events/partyzone/PartyZoneReward.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/entity/events/partyzone/PartyZoneReward.java
  6066. index a47eb99..c7ae8da 100644
  6067. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/entity/events/partyzone/PartyZoneReward.java
  6068. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/entity/events/partyzone/PartyZoneReward.java
  6069. @@ -9,7 +9,7 @@
  6070.  import net.sf.l2j.gameserver.model.actor.L2Npc;
  6071.  import net.sf.l2j.gameserver.model.actor.L2Playable;
  6072.  import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  6073. -import net.sf.l2j.gameserver.model.holder.RewardHolder;
  6074. +import net.sf.l2j.gameserver.model.holder.RewardHolderNew;
  6075.  import net.sf.l2j.util.Rnd;
  6076.  
  6077.  public class PartyZoneReward
  6078. @@ -126,28 +126,29 @@
  6079.  
  6080.     public static void RandomReward(L2PcInstance player)
  6081.     {
  6082. -       for (RewardHolder reward : Config.PARTY_ZONE_REWARDS)
  6083. +       for (RewardHolderNew rewardNew : Config.PARTY_ZONE_REWARDS)
  6084.         {
  6085. -           if (Rnd.get(100) <= reward.getRewardChance())
  6086. +           if (Rnd.get(100) <= rewardNew.getRewardChance())
  6087.             {
  6088.                 if (player.isVip())
  6089. -                   player.addItem("Random Reward", reward.getRewardId(), reward.getRewardCount() * Config.VIP_DROP_RATE, player, true);
  6090. +                   player.addItem("Random Reward", rewardNew.getRewardId(), Rnd.get(rewardNew.getRewardMin(), rewardNew.getRewardMax()) * Config.VIP_DROP_RATE, player, true);
  6091.                 else
  6092. -                   player.addItem("Random Reward", reward.getRewardId(), reward.getRewardCount(), player, true);
  6093. +                   //player.addItem("Random Reward", reward.getRewardId(), reward.getRewardCount(), player, true);
  6094. +                   player.addItem("Random Reward", rewardNew.getRewardId(), Rnd.get(rewardNew.getRewardMin(), rewardNew.getRewardMax()), player, true);
  6095.             }
  6096.         }
  6097.     }
  6098.    
  6099.     public static void RandomRewardEvent(L2PcInstance player)
  6100.     {
  6101. -       for (RewardHolder reward : Config.PARTY_ZONE_EVENT_REWARDS)
  6102. +       for (RewardHolderNew rewardNew : Config.PARTY_ZONE_EVENT_REWARDS)
  6103.         {
  6104. -           if (Rnd.get(100) <= reward.getRewardChance())
  6105. +           if (Rnd.get(100) <= rewardNew.getRewardChance())
  6106.             {
  6107.                 if (player.isVip())
  6108. -                   player.addItem("Random Reward", reward.getRewardId(), reward.getRewardCount() * Config.VIP_DROP_RATE, player, true);
  6109. +                   player.addItem("Random Reward", rewardNew.getRewardId(), Rnd.get(rewardNew.getRewardMin(), rewardNew.getRewardMax()) * Config.VIP_DROP_RATE, player, true);
  6110.                 else
  6111. -                   player.addItem("Random Reward", reward.getRewardId(), reward.getRewardCount(), player, true);
  6112. +                   player.addItem("Random Reward", rewardNew.getRewardId(), Rnd.get(rewardNew.getRewardMin(), rewardNew.getRewardMax()), player, true);
  6113.             }
  6114.         }
  6115.     }
  6116. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/holder/RewardHolderNew.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/holder/RewardHolderNew.java
  6117. new file mode 100644
  6118. index 0000000..e377a1d
  6119. --- /dev/null
  6120. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/holder/RewardHolderNew.java
  6121. @@ -0,0 +1,81 @@
  6122. +package net.sf.l2j.gameserver.model.holder;
  6123. +
  6124. +/**
  6125. + *
  6126. + * @author TioPatinhaS
  6127. + *
  6128. + */
  6129. +public class RewardHolderNew
  6130. +   {
  6131. +   private int _id;
  6132. +   private int _min;
  6133. +   private int _max;
  6134. +   private int _chance;
  6135. +  
  6136. +   /**
  6137. +    * @param rewardId
  6138. +    * @param rewardMin
  6139. +    * @param rewardMax
  6140. +    */
  6141. +   public RewardHolderNew(int rewardId, int rewardMin, int rewardMax)
  6142. +   {
  6143. +       _id = rewardId;
  6144. +       _min = rewardMin;
  6145. +       _max = rewardMax;
  6146. +       _chance = 100;
  6147. +   }
  6148. +      
  6149. +   /**
  6150. +    * @param rewardId
  6151. +    * @param rewardMin
  6152. +    * @param rewardMax
  6153. +    * @param rewardChance
  6154. +    */
  6155. +   public RewardHolderNew(int rewardId, int rewardMin, int rewardMax, int rewardChance)
  6156. +   {
  6157. +       _id = rewardId;
  6158. +       _min = rewardMin;
  6159. +       _max = rewardMax;
  6160. +       _chance = rewardChance;
  6161. +   }
  6162. +      
  6163. +   public int getRewardId()
  6164. +   {
  6165. +       return _id;
  6166. +   }
  6167. +      
  6168. +   public int getRewardMin()
  6169. +   {
  6170. +       return _min;
  6171. +   }
  6172. +      
  6173. +   public int getRewardMax()
  6174. +   {
  6175. +       return _max;
  6176. +   }
  6177. +      
  6178. +   public int getRewardChance()
  6179. +   {
  6180. +       return _chance;
  6181. +   }
  6182. +      
  6183. +   public void setId(int id)
  6184. +   {
  6185. +       _id = id;
  6186. +   }
  6187. +      
  6188. +   public void setMin(int min)
  6189. +   {
  6190. +       _min = min;
  6191. +   }
  6192. +      
  6193. +   public void setMax(int max)
  6194. +   {
  6195. +       _max = max;
  6196. +   }
  6197. +      
  6198. +   public void setChance(int chance)
  6199. +   {
  6200. +       _chance = chance;
  6201. +   }
  6202. +}
  6203. \ No newline at end of file
  6204. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2FarmZone.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2FarmZone.java
  6205. new file mode 100644
  6206. index 0000000..6c0cc11
  6207. --- /dev/null
  6208. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2FarmZone.java
  6209. @@ -0,0 +1,139 @@
  6210. +package net.sf.l2j.gameserver.model.zone.type;
  6211. +
  6212. +import java.util.ArrayList;
  6213. +import java.util.List;
  6214. +
  6215. +import net.sf.l2j.Config;
  6216. +import net.sf.l2j.gameserver.ThreadPoolManager;
  6217. +import net.sf.l2j.gameserver.datatables.MapRegionTable;
  6218. +import net.sf.l2j.gameserver.instancemanager.protect.LimitHwidZone;
  6219. +import net.sf.l2j.gameserver.model.actor.L2Character;
  6220. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  6221. +import net.sf.l2j.gameserver.model.zone.L2SpawnZone;
  6222. +import net.sf.l2j.gameserver.model.zone.ZoneId;
  6223. +import net.sf.l2j.gameserver.taskmanager.PvpFlagTaskManager;
  6224. +
  6225. +/**
  6226. + *
  6227. + * @author TioPatinhaS
  6228. + *
  6229. + */
  6230. +
  6231. +public class L2FarmZone extends L2SpawnZone
  6232. +{ 
  6233. +   private boolean _checkClasses;
  6234. +   private static List<String> _classes = new ArrayList<>();
  6235. +  
  6236. +   public L2FarmZone(int id)
  6237. +   {
  6238. +       super(id);
  6239. +       _checkClasses = false;
  6240. +   }
  6241. +
  6242. +   @Override
  6243. +   public void setParameter(String name, String value)
  6244. +   {
  6245. +       if (name.equals("checkClasses"))
  6246. +           _checkClasses = Boolean.parseBoolean(value);
  6247. +       else if (name.equals("Classes"))
  6248. +       {
  6249. +           String[] propertySplit = value.split(",");
  6250. +           for (String i : propertySplit)
  6251. +                _classes.add(i);
  6252. +       }
  6253. +       else
  6254. +       {
  6255. +           super.setParameter(name, value);
  6256. +       }
  6257. +   }
  6258. +  
  6259. +   @Override
  6260. +   protected void onEnter(L2Character character)
  6261. +   {
  6262. +       character.setInsideZone(ZoneId.COLOR_AREA, true);
  6263. +       character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
  6264. +       character.setInsideZone(ZoneId.NO_RESTART, true);
  6265. +      
  6266. +       character.sendMessage("You have entered the Farm Zone.");
  6267. +      
  6268. +       if (character instanceof L2PcInstance)
  6269. +       {
  6270. +           final L2PcInstance activeChar = (L2PcInstance) character;
  6271. +
  6272. +           if (_checkClasses)
  6273. +           {
  6274. +               if (_classes != null && _classes.contains(""+ activeChar.getClassId().getId()))
  6275. +               {
  6276. +                   activeChar.teleToLocation(83597, 147888, -3405, 0);
  6277. +                   activeChar.sendMessage("Your class is not allowed in the Farm zone.");
  6278. +                   return;
  6279. +               }
  6280. +           }
  6281. +                          
  6282. +           activeChar.updatePvPStatus();
  6283. +          
  6284. +           if (Config.LIMIT_HWID_ON_AREA && LimitHwidZone.getInstance().checkCount(activeChar))
  6285. +           {
  6286. +               ThreadPoolManager.getInstance().scheduleGeneral(new KickPlayer(activeChar), 1000);
  6287. +               activeChar.sendMessage("Max " + Config.MAX_BOX_ON_AREA + " box per hwid in this Zone!");
  6288. +           }
  6289. +       }
  6290. +   }
  6291. +
  6292. +   private static final class KickPlayer implements Runnable
  6293. +   {
  6294. +       private L2PcInstance _player;
  6295. +
  6296. +       public KickPlayer(L2PcInstance player)
  6297. +       {
  6298. +           _player = player;
  6299. +       }
  6300. +
  6301. +       public void run()
  6302. +       {
  6303. +           if (_player != null)
  6304. +           {
  6305. +               _player.teleToLocation(MapRegionTable.TeleportWhereType.Town);
  6306. +               _player = null;
  6307. +           }
  6308. +       }
  6309. +   }
  6310. +
  6311. +   @Override
  6312. +   protected void onExit(L2Character character)
  6313. +   {
  6314. +       character.setInsideZone(ZoneId.COLOR_AREA, false);
  6315. +       character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false);
  6316. +       character.setInsideZone(ZoneId.NO_RESTART, false);
  6317. +      
  6318. +       character.sendMessage("You have left the Farm Zone.");
  6319. +
  6320. +       if (character instanceof L2PcInstance)
  6321. +       {
  6322. +           final L2PcInstance activeChar = (L2PcInstance) character;
  6323. +          
  6324. +           PvpFlagTaskManager.getInstance().add(activeChar, Config.PVP_NORMAL_TIME);
  6325. +          
  6326. +           // Set pvp flag
  6327. +           if (activeChar.getPvpFlag() == 0)
  6328. +               activeChar.updatePvPFlag(1);
  6329. +          
  6330. +           activeChar.broadcastUserInfo();
  6331. +          
  6332. +           if (Config.LIMIT_HWID_ON_AREA)
  6333. +               LimitHwidZone.getInstance().removeHwidCount(activeChar);
  6334. +       }
  6335. +   }
  6336. +
  6337. +   @Override
  6338. +   public void onDieInside(L2Character character)
  6339. +   {
  6340. +
  6341. +   }
  6342. +
  6343. +   @Override
  6344. +   public void onReviveInside(L2Character character)
  6345. +   {
  6346. +      
  6347. +   }
  6348. +}
  6349. \ No newline at end of file
  6350. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
  6351. index 74c777d..d9a4ebf 100644
  6352. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
  6353. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
  6354. @@ -122,15 +122,9 @@
  6355.                 }
  6356.             }
  6357.         }
  6358. -      
  6359. -       /*
  6360. -       if (activeChar.isGM())
  6361. -       {
  6362. -           activeChar.sendPacket(new CreatureSay(0, Say2.PARTY, "Item Info", "ID: " + item.getItemId() + " | Name: " + item.getItemName()));
  6363. -           activeChar.sendPacket(ActionFailed.STATIC_PACKET);
  6364. -           return;
  6365. -       }
  6366. -       */
  6367. +
  6368. +       if (activeChar.isGM())
  6369. +           activeChar.sendMessage(item.getItem().getName() + " , ID: " + item.getItem().getItemId());
  6370.        
  6371.         if (activeChar.isFishing() && item.getItem().getDefaultAction() != ActionType.fishingshot)
  6372.         {
  6373. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/NpcHtmlMessage.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/NpcHtmlMessage.java
  6374. index 62291e8..69e56cd 100644
  6375. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/NpcHtmlMessage.java
  6376. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/NpcHtmlMessage.java
  6377. @@ -35,6 +35,7 @@
  6378.  
  6379.     private final int _npcObjId;
  6380.     private String _html;
  6381. +   private String _file;
  6382.     private int _itemId = 0;
  6383.     private boolean _validate = true;
  6384.  
  6385. @@ -53,6 +54,12 @@
  6386.         if (activeChar == null)
  6387.             return;
  6388.        
  6389. +       if (activeChar.isGM() && _file != null)
  6390. +           activeChar.sendMessage("Html File: " + _file);
  6391. +      
  6392. +       if (_file != null)
  6393. +           activeChar.setHtmlSave(_file);
  6394. +      
  6395.         activeChar.clearBypass();
  6396.         for (int i = 0; i < _html.length(); i++)
  6397.         {
  6398. @@ -131,6 +138,11 @@
  6399.    
  6400.     public void setFile(String filename)
  6401.     {
  6402. +       _file = filename;
  6403. +      
  6404. +       if (_file.startsWith("data/html/"))
  6405. +           _file = _file.replace("data/html/", "");
  6406. +
  6407.         setHtml(HtmCache.getInstance().getHtmForce(filename));
  6408.     }
  6409.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement