Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 161.88 KB | None | 0 0
  1. package command;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.Iterator;
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25. import org.Wokama.client.Account;
  26. import org.Wokama.client.Player;
  27. import org.Wokama.client.Player.BoostSpellStats;
  28. import org.Wokama.client.Player.Stats;
  29.  
  30. import client.tool.RapidStuff;
  31. import common.ConditionParser;
  32. import common.Constant;
  33. import common.SQLManager;
  34. import common.SocketManager;
  35. import common.World;
  36. import fight.arena.Arena;
  37. import fight.arena.Team;
  38. import fight.deathmatch.Manager;
  39. import fight.extending.Stalk;
  40. import fight.kolizeum.K2;
  41. import fight.kolizeum.K3;
  42. import game.GameSendThread;
  43. import game.parse.ParseObject;
  44. import game.tool.AllColor;
  45. import game.tool.Util;
  46. import kernel.Config;
  47. import object.Gmap;
  48. import object.Gmap.MountPark;
  49. import object.Objects;
  50. import object.Objects.ObjTemplate;
  51. import object.job.Job.StatsMetier;
  52. import object.spell.Spell.SortStats;
  53. import object.spell.SpellEffect;
  54.  
  55. public class PlayerCommand {
  56.  
  57.     public static boolean launchNewCommand(String msg, Player _perso,
  58.             Account _compte, long _timeLastsave, GameSendThread _out) {
  59.  
  60.         if (msg.charAt(0) == '.') {
  61.             CommandManager command = CommandManager.getCommandByName(msg
  62.                     .substring(1, msg.length() - 1));
  63.  
  64.             if (command != null) {
  65.                 if (command.getCond() != null
  66.                         && !ConditionParser.validConditions(_perso,
  67.                                 command.getCond())) {
  68.                     SocketManager
  69.                             .GAME_SEND_MESSAGE(
  70.                                     _perso,
  71.                                     "Vous ne faite pas partie du bon monde pour executer cette commande!",
  72.                                     Config.CONFIG_MOTD_COLOR);
  73.                     return true;
  74.                 }
  75.  
  76.                 if (command.getPrice() > 0) {
  77.                     int points = Util.loadPointsByAccount(_perso.get_compte());
  78.                     int price = command.getPrice();
  79.                     int diff = 0;
  80.  
  81.                     if (points < price) {
  82.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  83.                                 "Vous n'avez pas assez de points, il vous manque "
  84.                                         + (price - points) + " points !",
  85.                                 Config.CONFIG_MOTD_COLOR);
  86.                         return true;
  87.                     } else {
  88.                         diff = (points - price);
  89.                         Util.updatePointsByAccount(_perso.get_compte(), diff);
  90.                         int accountPoints = Util.loadPointsByAccount(_perso
  91.                                 .get_compte());
  92.                         SocketManager
  93.                                 .GAME_SEND_MESSAGE(
  94.                                         _perso,
  95.                                         "Vous venez de perdre "
  96.                                                 + price
  97.                                                 + " points boutiques. Votre compte contient "
  98.                                                 + accountPoints
  99.                                                 + " points boutiques !Pour continuer à acheter. Merci de votre confiance que vous nous apportée !",
  100.                                         Config.CONFIG_MOTD_COLOR);
  101.                     }
  102.                 }
  103.  
  104.                 for (String f : command.getFunction().split(";")) {
  105.                     int type = -1;
  106.                     String args = null;
  107.  
  108.                     if (f.contains("-")) {
  109.                         args = f.split("-")[1];
  110.                         type = Integer.parseInt(f.split("-")[0]);
  111.                     } else {
  112.                         type = Integer.parseInt(f);
  113.                     }
  114.  
  115.                     switch (type) {
  116.                        case 0: // Liste des commandes général
  117.  
  118.                               String infos = "<b>.utilepvp129</b> - permet de vous montrer les commandes pvp 1.29.\n"
  119.                                 + "<b>.pvp2</b> - permet de vous montrer les commandes pvp 1.29/2.0.\n"
  120.                                 + "<b>.semi1</b> - permet de vous montrer les commandes semi 1.29/2.0.\n"
  121.                                 + "<b>.wakfu</b> - permet de vous montrer les commandes wakfu.";
  122.                               SocketManager.GAME_SEND_INBOX(_perso, infos);
  123.                               break;
  124.                        case 108: // Liste des commandes boutique pvp 1.29
  125.  
  126.                               String infos108 = "<b>.FMPA</b> - permet de mettre 1 pa sur un item [10]pts.\n"
  127.                                         + "<b>.FMPM</b> - permet de mettre 1 pm sur un item [10]pts.\n"
  128.                                         + "<b>.changename</b> - permet de changer son nom [50].\n";
  129.                               SocketManager.GAME_SEND_INBOX(_perso, infos108);
  130.                               break;
  131.                        case 105: // Liste des commandes alignement
  132.  
  133.                               String infos5 = "<b>.demon</b> - permet de vous mettre demon.\n"
  134.                                 + "<b>.ange</b> - permet de vous mettre ange.\n"
  135.                                 + "<b>.neutre</b> - permet de vous mettre neutre.\n";
  136.                               SocketManager.GAME_SEND_INBOX(_perso, infos5);
  137.                               break;
  138.                        case 107: // Liste des commandes boutique
  139.                        {
  140.                            if (_perso.get_exo() == 0){ //item requis//
  141.                               String infos7 = "<b>.FMPA</b> - permet de mettre 1 pa sur un item [30]pts.\n"
  142.                                 + "<b>.FMPM</b> - permet de mettre 1 pm sur un item [30]pts.\n"
  143.                                 + "<b>.changename</b> - permet de changer son nom [50].\n";
  144.                               SocketManager.GAME_SEND_INBOX(_perso, infos7);
  145.                               break;
  146.                             }
  147.                             {
  148.                                 if (_perso.get_exo() == 1){ //item requis//
  149.                                   String infos7 = "<b>.FMPA</b> - permet de mettre 1 pa sur un item.\n"
  150.                                     + "<b>.FMPM</b> - permet de mettre 1 pm sur un item.\n"
  151.                                     + "<b>.changename</b> - permet de changer son nom [50].\n";
  152.                                   SocketManager.GAME_SEND_INBOX(_perso, infos7);}
  153.                                   break;
  154.                             }}
  155.                        case 106: // Liste des commandes serveur
  156.  
  157.                               String infos6 = "<b>.staff</b> - permet de vous afficher le staff dispo.\n"
  158.                                 + "<b>.infos</b> - permet de voir luptime du serveur.\n"
  159.                                 + "<b>.reboot</b> - permet de lancer un vote reboot.\n"
  160.                                 + "<b>.votereboot</b> - permet de votez pour un reboot.\n";
  161.                               SocketManager.GAME_SEND_INBOX(_perso, infos6);
  162.                               break;
  163.                     case 103: // Liste des commandes pvp 1.29
  164.                         String infos1 = "<b>.utile129</b> - Vous montrera les commandes utiles.\n"
  165.                                 + "<b>.serveur</b> - permet de voir les différents commandes du serveur.\n"
  166.                                 + "<b>.alignement</b> - permet de chosir son alignement.\n"
  167.                                 + "<b>.boutique</b> - permet de voir les commandes boutique.\n";
  168.                         SocketManager.GAME_SEND_INBOX(_perso, infos1);
  169.                         break;
  170.                     case 102: //Liste des commandes pvp 1.29 utile1
  171.                          if (_perso.get_monde() == 1){ //item requis//
  172.                         String infos2 = "<b>.level</b> - Vous permet de uplevel.\n"
  173.                                 + "<b>.shop</b> - permet de vous tp dans la shop de votre monde.\n"
  174.                                 + "<b>.pvp</b> - permet de vous tp dans la pvp de votre monde.\n"
  175.                                 + "<b>.delsort</b> - permet de delete les points de sort dun sort.\n"
  176.                                 + "<b>.points</b> - permet de voir vos points boutique.\n"
  177.                                 + "<b>.guilde</b> - permet de creer une guilde.\n"
  178.                                 + "<b>.delsuiveur</b> - permet de delete un suiveur.\n"
  179.                                 + "<b>.all</b> - permet de parler dans le canal monde.\n"
  180.                                 + "<b>.fmcac</b> - permet de fm son cac.\n"
  181.                                 + "<b>.morph</b> - permet de changer son aparence.\n"
  182.                                 + "<b>.size</b> - permet de changer sa taille.\n"
  183.                                 + "<b>.demorph</b> - permet de retrouver sa morph.\n"
  184.                                 + "<b>.boutique</b> - permet de voir les commandes boutique.\n";
  185.                         SocketManager.GAME_SEND_INBOX(_perso, infos2);
  186.                         break;
  187.                         }
  188.                          if (_perso.get_monde() == 2){ //item requis//
  189.                         String infos2 = "<b>.shop</b> - permet de vous tp dans la shop de votre monde.\n"
  190.                                 + "<b>.pvp</b> - permet de vous tp dans la pvp de votre monde.\n"
  191.                                 + "<b>.delsort</b> - permet de delete les points de sort dun sort.\n"
  192.                                 + "<b>.points</b> - permet de voir vos points boutique.\n"
  193.                                 + "<b>.guilde</b> - permet de creer une guilde.\n"
  194.                                 + "<b>.delsuiveur</b> - permet de delete un suiveur.\n"
  195.                                 + "<b>.all</b> - permet de parler dans le canal monde.\n"
  196.                                 + "<b>.fmcac</b> - permet de fm son cac.\n"
  197.                                 + "<b>.size</b> - permet de changer sa taille.\n"
  198.                                 + "<b>.morph</b> - permet de changer son aparence.\n"
  199.                                 + "<b>.demorph</b> - permet de retrouver sa morph.\n"
  200.                                 + "<b>.boutique</b> - permet de voir les commandes boutique.\n";
  201.                         SocketManager.GAME_SEND_INBOX(_perso, infos2);
  202.                         break;
  203.                         }
  204.                          if (_perso.get_monde() == 3){ //item requis//
  205.                         String infos2 = "<b>.level</b> - Vous permet de uplevel.\n"
  206.                                 + "<b>.shop</b> - permet de vous tp dans la shop de votre monde.\n"
  207.                                 + "<b>.pvp</b> - permet de vous tp dans la pvp de votre monde.\n"
  208.                                 + "<b>.delsort</b> - permet de delete les points de sort dun sort.\n"
  209.                                 + "<b>.points</b> - permet de voir vos points boutique.\n"
  210.                                 + "<b>.guilde</b> - permet de creer une guilde.\n"
  211.                                 + "<b>.delsuiveur</b> - permet de delete un suiveur.\n"
  212.                                 + "<b>.all</b> - permet de parler dans le canal monde.\n"
  213.                                 + "<b>.fmcac</b> - permet de fm son cac.\n"
  214.                                 + "<b>.morph</b> - permet de changer son aparence.\n"
  215.                                 + "<b>.size</b> - permet de changer sa taille.\n"
  216.                                 + "<b>.demorph</b> - permet de retrouver sa morph.\n"
  217.                                 + "<b>.boutique</b> - permet de voir les commandes boutique.\n";
  218.                         SocketManager.GAME_SEND_INBOX(_perso, infos2);
  219.                         break;
  220.                         }
  221.                          if (_perso.get_monde() == 5){ //item requis//
  222.                             String infos2 = "<b>.shop</b> - permet de vous tp dans la shop de votre monde.\n"
  223.                                     + "<b>.pvp</b> - permet de vous tp dans la pvp de votre monde.\n"
  224.                                     + "<b>.delsort</b> - permet de delete les points de sort dun sort.\n"
  225.                                     + "<b>.points</b> - permet de voir vos points boutique.\n"
  226.                                     + "<b>.guilde</b> - permet de creer une guilde.\n"
  227.                                     + "<b>.delsuiveur</b> - permet de delete un suiveur.\n"
  228.                                     + "<b>.all</b> - permet de parler dans le canal monde.\n"
  229.                                     + "<b>.fmcac</b> - permet de fm son cac.\n"
  230.                                     + "<b>.size</b> - permet de changer sa taille.\n"
  231.                                     + "<b>.morph</b> - permet de changer son aparence.\n"
  232.                                     + "<b>.demorph</b> - permet de retrouver sa morph.\n"
  233.                                     + "<b>.boutique</b> - permet de voir les commandes boutique.\n";
  234.                             SocketManager.GAME_SEND_INBOX(_perso, infos2);
  235.                             break;
  236.                             }
  237.                     case 950: //staff les mondes
  238.                         if (_perso.get_compte().get_gmLvl() > 1){
  239.                         String infos2 = "<b>pvp full 1.29</b> - monde 1 /console monde 1.\n"
  240.                                 + "<b>semi anka 1.29/2.0</b> - monde 2 /console monde 2.\n"
  241.                                 + "<b>pvp 1.29/2.0</b> - monde 3 /console monde 3.\n"
  242.                                 + "<b>semi anka 1.29</b> - monde 5 /console monde 5.\n";
  243.                         SocketManager.GAME_SEND_INBOX(_perso, infos2);
  244.                         break;
  245.                         }
  246.                     case 1: //Liste des commandes VIP  
  247.                         SocketManager.GAME_SEND_MESSAGE(_perso, CommandManager.getCommandList(true), Config.CONFIG_MOTD_COLOR);
  248.                         break;
  249.                     case 935: //multi monde
  250.                         short newMapID = Short.parseShort(args.split(",")[0]);
  251.                         int newCellID = Integer.parseInt(args.split(",")[1]);
  252.                           if ((_perso != null) && (_perso.isOnline()))
  253.                           _perso.teleport(newMapID,newCellID);
  254.                          break;
  255.                     case 206: // mimibiote .mibi item_equipé id_item_skin
  256.                         String[] _arg;
  257.                         Objects o_stats;
  258.                         ObjTemplate t_skin, t_stat;
  259.                         int id_skin;
  260.                         String explication = "." + command.getName() + " position id_skin ";
  261.                         String position = "Liste des positions : cape, coiffe, anneau1, anneau2, amulette, ceinture bottes, arme, bouclier, familier";
  262.                         if(msg.length() <= command.getName().length()+2)
  263.                         {
  264.                             SocketManager.GAME_SEND_MESSAGE(_perso, explication, Config.CONFIG_MOTD_COLOR);
  265.                             break;
  266.                         }
  267.                         _arg = msg.substring(command.getName().length()+2, msg.length()-1).split(" ");
  268.                         if(_arg.length < 2)
  269.                         {
  270.                             SocketManager.GAME_SEND_MESSAGE(_perso, explication, Config.CONFIG_MOTD_COLOR);
  271.                             break;
  272.                         }
  273.                         try
  274.                         {
  275.                             id_skin = Integer.parseInt(_arg[1]);
  276.                         }catch(Exception e)
  277.                         {
  278.                             SocketManager.GAME_SEND_MESSAGE(_perso, "Vous n'avez un saisi une valeur correct", Config.CONFIG_MOTD_COLOR);
  279.                             break;
  280.                         }
  281.                         switch(_arg[0])
  282.                         {
  283.                         case "cape":
  284.                             o_stats = _perso.getObjetByPos(Constant.ITEM_POS_CAPE);
  285.                             break;
  286.                         case "coiffe":
  287.                             o_stats = _perso.getObjetByPos(Constant.ITEM_POS_COIFFE);
  288.                             break;
  289.                         case "anneau1":
  290.                             o_stats = _perso.getObjetByPos(Constant.ITEM_POS_ANNEAU1);
  291.                             break;
  292.                         case "anneau2":
  293.                             o_stats = _perso.getObjetByPos(Constant.ITEM_POS_ANNEAU2);
  294.                             break;
  295.                         case "amulette":
  296.                             o_stats = _perso.getObjetByPos(Constant.ITEM_POS_AMULETTE);
  297.                             break;
  298.                         case "bottes":
  299.                             o_stats = _perso.getObjetByPos(Constant.ITEM_POS_BOTTES);
  300.                             break;
  301.                         case "ceinture":
  302.                             o_stats = _perso.getObjetByPos(Constant.ITEM_POS_CEINTURE);
  303.                             break;
  304.                         case "arme":
  305.                             o_stats = _perso.getObjetByPos(Constant.ITEM_POS_ARME);
  306.                             break;
  307.                         case "bouclier":
  308.                             o_stats = _perso.getObjetByPos(Constant.ITEM_POS_BOUCLIER);
  309.                             break;
  310.                         case "familier":
  311.                             o_stats = _perso.getObjetByPos(Constant.ITEM_POS_FAMILIER);
  312.                             break;
  313.                         default:
  314.                             o_stats = null;
  315.                         }
  316.                         if(o_stats == null)
  317.                         {
  318.                             SocketManager.GAME_SEND_MESSAGE(_perso, position, Config.CONFIG_MOTD_COLOR);
  319.                             break;
  320.                         }
  321.                         t_skin = World.getObjTemplate(id_skin);
  322.                         t_stat = o_stats.getTemplate();
  323.                        
  324.                         if (t_skin == null) //Si les objets n'existent pas
  325.                         {
  326.                             SocketManager.GAME_SEND_MESSAGE(_perso, "ID item skin n'existe pas", Config.CONFIG_MOTD_COLOR);
  327.                             break;
  328.                         }
  329.                        
  330.                         if (t_skin.getType() != t_stat.getType())
  331.                         {
  332.                             SocketManager.GAME_SEND_MESSAGE(_perso, "Les objets ne sont pas du même type", Config.CONFIG_MOTD_COLOR);
  333.                             break;
  334.                         }
  335.                        
  336.                         if(t_skin.getLevel() < t_stat.getLevel())
  337.                         {
  338.                             SocketManager.GAME_SEND_MESSAGE(_perso, "Impossible, vous essayez de mettre des stats d'un item plus haut level", Config.CONFIG_MOTD_COLOR);
  339.                             break;
  340.                         }
  341.                         Stats s_stat = o_stats.getStats();
  342.                         ArrayList<SpellEffect> a_s_stat = o_stats.getEffects();
  343.                         BoostSpellStats b_stat = o_stats.getBoostSpellStats();
  344.                         Objects new_obj1 = new Objects(World.getNewItemGuid(), t_skin.getID(), 1,
  345.                                 Constant.ITEM_POS_NO_EQUIPED,
  346.                                 s_stat,
  347.                                 a_s_stat,
  348.                                 b_stat);
  349.                         if (_perso.addObjet(new_obj1, true))
  350.                             World.addObjet(new_obj1, true);
  351.                         SocketManager.GAME_SEND_MESSAGE(_perso, "Création de l'item réussi", Config.CONFIG_MOTD_COLOR);
  352.                        
  353.                         break;
  354.                     case 940: //teleportation des zone shop
  355.                          if (_perso.get_monde() == 2){ //item requis//
  356.                              _perso.teleport((short) 10131,255);
  357.                                 SocketManager
  358.                                   .GAME_SEND_MESSAGE(
  359.                                     _perso,
  360.                                     "Vous avez bien etait teleporter a votre zone shop.",
  361.                                     AllColor.GREEN);
  362.                                 break;
  363.                          }
  364.                          if (_perso.get_monde() == 1){ //item requis//
  365.                              _perso.teleport((short) 13103,380);
  366.                                 SocketManager
  367.                                   .GAME_SEND_MESSAGE(
  368.                                     _perso,
  369.                                     "Vous avez bien etait teleporter a votre zone shop.",
  370.                                     AllColor.GREEN);
  371.                                 break;
  372.                          }
  373.                          if (_perso.get_monde() == 3){ //item requis//
  374.                              _perso.teleport((short) 10124,251);
  375.                                 SocketManager
  376.                                   .GAME_SEND_MESSAGE(
  377.                                     _perso,
  378.                                     "Vous avez bien etait teleporter a votre zone shop.",
  379.                                     AllColor.GREEN);
  380.                                 break;
  381.                          }
  382.                          if (_perso.get_monde() == 5){ //item requis//
  383.                              _perso.teleport((short) 10114,282);
  384.                                 SocketManager
  385.                                   .GAME_SEND_MESSAGE(
  386.                                     _perso,
  387.                                     "Vous avez bien etait teleporter a votre zone shop.",
  388.                                     AllColor.GREEN);
  389.                                 break;
  390.                          }
  391.                          break;
  392.                     case 941: //teleportation des zone PVP
  393.                          if (_perso.get_monde() == 2){ //item requis//
  394.                              _perso.teleport((short) 10131,241);
  395.                                 SocketManager
  396.                                   .GAME_SEND_MESSAGE(
  397.                                     _perso,
  398.                                     "Vous avez bien etait teleporter a votre zone pvp.",
  399.                                     AllColor.GREEN);
  400.                                 break;
  401.                          }
  402.                          if (_perso.get_monde() == 1){ //item requis//
  403.                              _perso.teleport((short) 952,297);
  404.                                 SocketManager
  405.                                   .GAME_SEND_MESSAGE(
  406.                                     _perso,
  407.                                     "Vous avez bien etait teleporter a votre zone pvp.",
  408.                                     AllColor.GREEN);
  409.                                 break;
  410.                          }
  411.                          if (_perso.get_monde() == 3){ //item requis//
  412.                              _perso.teleport((short) 952,297);
  413.                                 SocketManager
  414.                                   .GAME_SEND_MESSAGE(
  415.                                     _perso,
  416.                                     "Vous avez bien etait teleporter a votre zone pvp.",
  417.                                     AllColor.GREEN);
  418.                                 break;
  419.                          }
  420.                      if (_perso.get_monde() == 5){ //item requis//
  421.                          _perso.teleport((short) 10123,297);
  422.                             SocketManager
  423.                               .GAME_SEND_MESSAGE(
  424.                                 _perso,
  425.                                 "Vous avez bien etait teleporter a votre zone pvp.",
  426.                                 AllColor.GREEN);
  427.                             break;
  428.                      }
  429.                          break;
  430.                      case 97:// Echange hydriglace!
  431.                          
  432.                      {
  433.                       if ((_perso != null) && (_perso.isOnline()))
  434.                        if (!_perso.hasItemTemplate(95214, 1500)) {
  435.                         SocketManager
  436.                           .GAME_SEND_MESSAGE(
  437.                             _perso,
  438.                             "Il vous faut 1500 Sufoglace pour effectuée  cette commande.",
  439.                             AllColor.GOLD);
  440.                         break;
  441.                        }
  442.                       if ((_perso != null) && (_perso.isOnline()))
  443.                        _perso.removeByTemplateID(95214, 1500);
  444.                       SocketManager
  445.                         .GAME_SEND_MESSAGE(
  446.                           _perso,
  447.                           "Vous venez de perdre 1500 lace. ",
  448.                           AllColor.GOLD);
  449.                      }
  450.                             int tID1 = Integer.parseInt(args.split(",")[0]);
  451.                              int nbr = Integer.parseInt(args.split(",")[1]);
  452.                            boolean isMax = Boolean.parseBoolean(args.split(",")[2]);
  453.  
  454.                            Objects.ObjTemplate t1 = World.getObjTemplate(tID1);
  455.                             Objects obj1 = t1.createNewItem(nbr, isMax, -1);
  456.                           if (_perso.addObjet(obj1, true))
  457.                                                        World.addObjet(obj1, true);
  458.                           SocketManager
  459.                    .GAME_SEND_MESSAGE(
  460.                      _perso,
  461.                      "Vous venez dobtenir votre dofus frigost!. ",
  462.                      AllColor.RED);
  463.                      break;
  464.                     case 2: // Envoyer une message
  465.                         String boxMess = args;
  466.                         SocketManager.GAME_SEND_MESSAGE(_perso, boxMess,
  467.                                 AllColor.GOLD);
  468.                         break;
  469.                     case 5: // Staff en ligne
  470.                         String staff = "Membres du staff Sufoko connectés :\n";
  471.                         boolean allOffline = true;
  472.  
  473.                         for (int i = 0; i < World.getOnlinePersos().size(); i++) {
  474.                             if (World.getOnlinePersos().get(i).get_compte()
  475.                                     .get_name().equalsIgnoreCase("diego")
  476.                                     && !World.getOnlinePersos().get(i)
  477.                                             .get_name()
  478.                                             .equalsIgnoreCase("[diego]"))
  479.                                 continue;
  480.                             if (World.getOnlinePersos().get(i).get_compte()
  481.                                     .get_gmLvl() > 0) {
  482.                                 staff += "- "
  483.                                         + World.getOnlinePersos().get(i)
  484.                                                 .get_name() + " (";
  485.  
  486.                                 if (World.getOnlinePersos().get(i).get_compte()
  487.                                         .get_gmLvl() > 1
  488.                                     && _perso.get_monde() == 1)
  489.                                     staff += "staff pvp 1.29)";
  490.                                 else if (World.getOnlinePersos().get(i)
  491.                                         .get_compte().get_gmLvl() > 1
  492.                                         && _perso.get_monde() == 2)
  493.                                     staff += "staff semi 2.0)";
  494.                                 else if (World.getOnlinePersos().get(i)
  495.                                         .get_compte().get_gmLvl() > 3
  496.                                     && _perso.get_monde() == 3)
  497.                                     staff += "staff pvp 2.0)";
  498.                                 else if (World.getOnlinePersos().get(i)
  499.                                         .get_compte().get_gmLvl() > 1
  500.                                         && _perso.get_monde() == 5)
  501.                                     staff += "staff semi 2.0)";
  502.                                 else
  503.                                     staff += "Unknown";
  504.                                 staff += "\n";
  505.                                 allOffline = false;
  506.                             }
  507.                         }
  508.                         if (!staff.isEmpty() && !allOffline) {
  509.                             SocketManager.GAME_SEND_INBOX(_perso, staff);
  510.                         } else if (allOffline) {
  511.                             SocketManager
  512.                                     .GAME_SEND_INBOX(_perso,
  513.                                             "Aucun membre du staff Sufoko est présent !");
  514.                         }
  515.                         break;//bon c koi le truk
  516.                        
  517.                     case 6: // Sauvegarde du personnage
  518.                         if ((System.currentTimeMillis() - _timeLastsave) < 360000
  519.                                 || _perso.get_fight() != null)
  520.                             break;
  521.  
  522.                         _timeLastsave = System.currentTimeMillis();
  523.                         SQLManager.SAVE_PERSONNAGE(_perso, true);
  524.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  525.                                 "Votre personnage <b>" + _perso.get_name()
  526.                                         + "</b> est sauvegardé.", AllColor.RED);
  527.                         break;
  528.                     case 7: // Rafraichissement de Map
  529.                         Gmap map = _perso.get_curCarte();
  530.                         map.refreshSpawns();
  531.                         break;
  532.                     case 8: // Vitalité Max
  533.                         /*int count = 100;
  534.                         Player perso = _perso;
  535.                         int newPDV = (perso.get_PDVMAX() * count) / 100;
  536.  
  537.                         perso.set_PDV(newPDV);
  538.                         if (perso.isOnline())
  539.                             SocketManager.GAME_SEND_STATS_PACKET(perso);
  540.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  541.                                 "Votre vie est désormais au maximum !",
  542.                                 Config.CONFIG_MOTD_COLOR);*/
  543.  
  544.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  545.                                 "Si tu veux ta vitalité, va t'acheter du pain !",
  546.                                 Config.CONFIG_MOTD_COLOR);
  547.                         break;
  548.                     case 9: // Création de guilde
  549.                         if (_perso.get_guild() != null
  550.                                 || _perso.getGuildMember() != null
  551.                                 || !_perso.isOnline() || _perso == null) {
  552.                             break;
  553.                         } else {
  554.                             SocketManager.GAME_SEND_gn_PACKET(_perso);
  555.                         }
  556.                         break;
  557.                     case 79: // Parchotage
  558.  
  559.                         if (_perso.get_fight() != null)
  560.                             break;
  561.  
  562.                         int nbreElement = 150;
  563.  
  564.                         if (_perso.get_baseStats().getEffect(125) < 150) {
  565.                             _perso.get_baseStats()
  566.                                     .addOneStat(
  567.                                             125,
  568.                                             150 - _perso.get_baseStats()
  569.                                                     .getEffect(125));
  570.                             nbreElement++;
  571.                         }
  572.  
  573.                         if (_perso.get_baseStats().getEffect(124) < 150) {
  574.                             _perso.get_baseStats()
  575.                                     .addOneStat(
  576.                                             124,
  577.                                             150 - _perso.get_baseStats()
  578.                                                     .getEffect(124));
  579.                             nbreElement++;
  580.                         }
  581.  
  582.                         if (_perso.get_baseStats().getEffect(118) < 150) {
  583.                             _perso.get_baseStats()
  584.                                     .addOneStat(
  585.                                             118,
  586.                                             150 - _perso.get_baseStats()
  587.                                                     .getEffect(118));
  588.                             if (nbreElement == 0)
  589.                                 nbreElement++;
  590.                         }
  591.  
  592.                         if (_perso.get_baseStats().getEffect(126) < 150) {
  593.                             _perso.get_baseStats()
  594.                                     .addOneStat(
  595.                                             126,
  596.                                             150 - _perso.get_baseStats()
  597.                                                     .getEffect(126));
  598.                             if (nbreElement == 0)
  599.                                 nbreElement++;
  600.                         }
  601.  
  602.                         if (_perso.get_baseStats().getEffect(119) < 150) {
  603.                             _perso.get_baseStats()
  604.                                     .addOneStat(
  605.                                             119,
  606.                                             150 - _perso.get_baseStats()
  607.                                                     .getEffect(119));
  608.                             if (nbreElement == 0)
  609.                                 nbreElement++;
  610.                         }
  611.  
  612.                         if (_perso.get_baseStats().getEffect(123) < 150) {
  613.                             _perso.get_baseStats()
  614.                                     .addOneStat(
  615.                                             123,
  616.                                             150 - _perso.get_baseStats()
  617.                                                     .getEffect(123));
  618.                             if (nbreElement == 0)
  619.                                 nbreElement++;
  620.                         }
  621.                         SocketManager
  622.                                 .GAME_SEND_MESSAGE(
  623.                                         _perso,
  624.                                         "1500 points boutique vous on etait debité vous ête desormais parcho 150 all.",
  625.                                         AllColor.RED);
  626.                         if (nbreElement == 150) {
  627.                             SocketManager.GAME_SEND_Im_PACKET(_perso,
  628.                                     "Vous ête dejas parchoté 150 ALL.!");
  629.                         } else {
  630.                             SocketManager.GAME_SEND_STATS_PACKET(_perso);
  631.                         }
  632.                         break;
  633.                     case 303: // Téléportation pour le monde pvp 1.29 monde 1
  634.                         short mapID303 = (short) Integer
  635.                                 .parseInt(args.split(",")[0]);
  636.                         int cellID303 = Integer.parseInt(args.split(",")[1]);
  637.                          if (_perso.get_monde() == 1){ //item requis//
  638.                                 SocketManager
  639.                                   .GAME_SEND_MESSAGE(
  640.                                     _perso,
  641.                                     "Vous ne faite pas partie du bon mondes pour vous tp a cette endroit!.",
  642.                                     AllColor.GREEN);
  643.                                 break;
  644.                          }
  645.                         _perso.teleport(mapID303, cellID303);
  646.                         break;
  647.                     case 10: // Parchotage
  648.                         if (_perso.get_fight() != null)
  649.                             break;
  650.  
  651.                         int nbreElement1 = 0;
  652.  
  653.                         if (_perso.get_baseStats().getEffect(125) < 101) {
  654.                             _perso.get_baseStats()
  655.                                     .addOneStat(
  656.                                             125,
  657.                                             101 - _perso.get_baseStats()
  658.                                                     .getEffect(125));
  659.                             nbreElement1++;
  660.                         }
  661.  
  662.                         if (_perso.get_baseStats().getEffect(124) < 101) {
  663.                             _perso.get_baseStats()
  664.                                     .addOneStat(
  665.                                             124,
  666.                                             101 - _perso.get_baseStats()
  667.                                                     .getEffect(124));
  668.                             nbreElement1++;
  669.                         }
  670.  
  671.                         if (_perso.get_baseStats().getEffect(118) < 101) {
  672.                             _perso.get_baseStats()
  673.                                     .addOneStat(
  674.                                             118,
  675.                                             101 - _perso.get_baseStats()
  676.                                                     .getEffect(118));
  677.                             if (nbreElement1 == 0)
  678.                                 nbreElement1++;
  679.                         }
  680.  
  681.                         if (_perso.get_baseStats().getEffect(126) < 101) {
  682.                             _perso.get_baseStats()
  683.                                     .addOneStat(
  684.                                             126,
  685.                                             101 - _perso.get_baseStats()
  686.                                                     .getEffect(126));
  687.                             if (nbreElement1 == 0)
  688.                                 nbreElement1++;
  689.                         }
  690.  
  691.                         if (_perso.get_baseStats().getEffect(119) < 101) {
  692.                             _perso.get_baseStats()
  693.                                     .addOneStat(
  694.                                             119,
  695.                                             101 - _perso.get_baseStats()
  696.                                                     .getEffect(119));
  697.                             if (nbreElement1 == 0)
  698.                                 nbreElement1++;
  699.                         }
  700.  
  701.                         if (_perso.get_baseStats().getEffect(123) < 101) {
  702.                             _perso.get_baseStats()
  703.                                     .addOneStat(
  704.                                             123,
  705.                                             101 - _perso.get_baseStats()
  706.                                                     .getEffect(123));
  707.                             SocketManager
  708.                             .GAME_SEND_Im_PACKET(_perso,
  709.                                     "parcho effectue avec succes!");
  710.                             if (nbreElement1 == 0)
  711.                                 nbreElement1++;
  712.                         }
  713.                         if (nbreElement1 == 0) {
  714.                             SocketManager
  715.                                     .GAME_SEND_Im_PACKET(_perso,
  716.                                             "116;<i>Serveur: </i>Vous êtes déjà parchotté dans tous les éléments !");
  717.                         } else {
  718.                             SocketManager.GAME_SEND_STATS_PACKET(_perso);
  719.                         }
  720.                         break;
  721.                     case 11: // Apprendre un sort
  722.                         int spellID = Integer.parseInt(args.split(",")[0]);
  723.                         int level = Integer.parseInt(args.split(",")[1]);
  724.                         _perso.learnSpell(spellID, level, true, true);
  725.                         break;
  726.                     case 12: // Alignement
  727.                         byte align = (byte) Integer.parseInt(args);
  728.                         _perso.modifAlignement(align);
  729.                         if (_perso.isOnline())
  730.                             SocketManager.GAME_SEND_STATS_PACKET(_perso);
  731.                         break;
  732.                     case 13: // Ajouter Kamas
  733.                         int kamas = Integer.parseInt(args);
  734.                         _perso.addKamas(kamas);
  735.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  736.                         break;
  737.                     case 601:
  738.                         if(_perso.get_fight() != null){
  739.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  740.                                     "Impossible de se téléporter en combat.",
  741.                                     AllColor.RED);
  742.                         }
  743.                         int delsuiveur = 0;//Ne pas toucher a la valeur 0, 0= delete du perso suiveur!
  744.                         _perso.set_suiveur(delsuiveur);
  745.                         SocketManager.GAME_SEND_ALTER_GM_PACKET(
  746.                                 _perso.get_curCarte(), _perso);
  747.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  748.                                 "Votre perso suiveur a bien etait enlever!.",
  749.                                 AllColor.RED);                     
  750.                         break;             
  751.                     case 14: // Ajouter Item
  752.                         int tID = 0;
  753.                         int taman2222 = 10;
  754.                         int maispoints2222 = SQLManager.GET_POINTS(_perso
  755.                                 .getAccID());
  756.                         if (maispoints2222 < taman2222) {
  757.                             SocketManager
  758.                                     .GAME_SEND_MESSAGE(
  759.                                             _perso,
  760.                                             "Il te faut "
  761.                                                     + taman2222
  762.                                                     + " points pour utiliser cette commande.",
  763.                                             Config.CONFIG_MOTD_COLOR);
  764.                             break;
  765.                         }
  766.                         try {
  767.                             tID = Integer.parseInt(msg.substring(
  768.                                     command.getName().length() + 2,
  769.                                     msg.length() - 1).trim());
  770.                         } catch (Exception e) {
  771.                             String liste_item = "Liste d'ids :\n";
  772.                             for (String valid_id : args.split(",")) {
  773.                                 int tp_id = -1;
  774.                                 try {
  775.                                     tp_id = Integer.parseInt(valid_id);
  776.                                 } catch (Exception xe) {
  777.                                     continue;
  778.                                 }
  779.                                 ObjTemplate t = World.getObjTemplate(tp_id);
  780.                                 if (t == null)
  781.                                     continue;
  782.                                 liste_item += "<b>" + t.getID() + "</b> - "
  783.                                         + t.getName() + "\n";
  784.                             }
  785.                             SocketManager.GAME_SEND_INBOX(_perso,
  786.                                     "Vous devez faire ." + command.getName()
  787.                                             + " (id du template)\n"
  788.                                             + liste_item);
  789.                             break;
  790.                         }
  791.                         if (tID < 0)
  792.                             break;
  793.                         boolean valid_tp = false;
  794.                         for (String valid_id : args.split(",")) {
  795.                             if (Integer.parseInt(valid_id) == tID)
  796.                                 valid_tp = true;
  797.                         }
  798.                         if (!valid_tp) {
  799.                             String liste_item = "Liste d'ids :\n";
  800.                             for (String valid_id : args.split(",")) {
  801.                                 int tp_id = -1;
  802.                                 try {
  803.                                     tp_id = Integer.parseInt(valid_id);
  804.                                 } catch (Exception e) {
  805.                                     continue;
  806.                                 }
  807.                                 ObjTemplate t = World.getObjTemplate(tp_id);
  808.                                 if (t == null)
  809.                                     continue;
  810.                                 liste_item += "<b>" + t.getID() + "</b> - "
  811.                                         + t.getName() + "\n";
  812.                             }
  813.                             SocketManager.GAME_SEND_INBOX(_perso, liste_item);
  814.                             break;
  815.                         }
  816.                         int accountPoints = Util.loadPointsByAccount(_perso
  817.                                 .get_compte());
  818.                         int newspoints2222 = maispoints2222 - taman2222;
  819.                         SQLManager.UPDATE_ACCOUNT_point(newspoints2222,
  820.                                 _perso.getAccID());
  821.                         ObjTemplate t = World.getObjTemplate(tID);
  822.                         if (t == null)
  823.                             break;
  824.                         Objects obj = t.createNewItem(1, true, -1);
  825.                         if (obj == null)
  826.                             break;
  827.                         if (_perso.addObjet(obj, true))// Si le joueur n'avait
  828.                                                         // pas d'item
  829.                             // similaire
  830.                             World.addObjet(obj, true);
  831.                         SocketManager.GAME_SEND_Ow_PACKET(_perso);
  832.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  833.                                 "Vous venez de recevoir l'item " + t.getName()
  834.                                         + " jet parfait ! Tu vien de perdre "
  835.                                         + taman2222
  836.                                         + " points boutique! Il te reste "
  837.                                         + accountPoints
  838.                                         + " Pour continuer a acheté",
  839.                                 Config.CONFIG_MOTD_COLOR);
  840.                         break;
  841.                     case 15: // Devenir VIP
  842.                         Account account = _perso.get_compte();
  843.                         if (account == null)
  844.                             return true;
  845.                         if (account.get_vip() == 0) {
  846.                             account.set_vip(1);
  847.                             SQLManager.UPDATE_ACCOUNT_VIP(account);
  848.                         }
  849.                         break;
  850.                     case 16: // Ajouter un titre
  851.                         _perso.set_title((byte) Integer.parseInt(args));
  852.                         if (_perso.get_fight() == null)
  853.                             SocketManager.GAME_SEND_ALTER_GM_PACKET(
  854.                                     _perso.get_curCarte(), _perso);
  855.                         break;
  856.                     case 17: // Reset des caractéristiques
  857.                         _perso.get_baseStats().addOneStat(125,
  858.                                 -_perso.get_baseStats().getEffect(125) + 0);
  859.                         _perso.get_baseStats().addOneStat(124,
  860.                                 -_perso.get_baseStats().getEffect(124) + 0);
  861.                         _perso.get_baseStats().addOneStat(118,
  862.                                 -_perso.get_baseStats().getEffect(118) + 0);
  863.                         _perso.get_baseStats().addOneStat(123,
  864.                                 -_perso.get_baseStats().getEffect(123) + 0);
  865.                         _perso.get_baseStats().addOneStat(119,
  866.                                 -_perso.get_baseStats().getEffect(119) + 0);
  867.                         _perso.get_baseStats().addOneStat(126,
  868.                                 -_perso.get_baseStats().getEffect(126) + 0);
  869.                         _perso.addCapital((_perso.get_lvl() - 1) * 5
  870.                                 - _perso.get_capital());
  871.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  872.                         SocketManager
  873.                                 .GAME_SEND_MESSAGE(
  874.                                         _perso,
  875.                                         "Vos points de caractéristique on etait remis à 0.",
  876.                                         AllColor.RED);
  877.                         break;
  878.                     case 400: // Lancer une traque
  879.                         Stalk.newTraque(_perso);
  880.                         break;
  881.                     case 401: // Récompense de traque
  882.                         Stalk.getRecompense(_perso);
  883.                         break;
  884.                     case 402: // Géoposition de la cible
  885.                         Stalk.getTraquePosition(_perso);
  886.                         break;
  887.                     case 21: // Désaprendre un sort
  888.                         _perso.setisForgetingSpell(true);
  889.                         SocketManager.GAME_SEND_FORGETSPELL_INTERFACE('+',
  890.                                 _perso);
  891.                         break;
  892.                     case 22: // Morph
  893.                         int morphID = 0;
  894.                         try {
  895.                             morphID = Integer.parseInt(msg.substring(
  896.                                     command.getName().length() + 2,
  897.                                     msg.length() - 1).trim());
  898.  
  899.                         } catch (Exception e) {
  900.                             SocketManager
  901.                                     .GAME_SEND_MESSAGE(
  902.                                             _perso,
  903.                                             "////MorphID autorisé 1.29:///// 10/11/20/21/30/31/40/41/50/51/60/61/70/71/80/81/90/91/100/101/110/111/120/121 /////MORPH ID autorisé 2.0:////// 14/15/24/25/34/35/44/45/54/55/64/65/74/75/84/85/94/95/104/105/114/115/124/125 //////Morph non classé fonctionne uniquement sans DD://///// 10325,10346,10201,10298,10293,10298,10285,10284,10282,10220,10201,1204,1203,9001",
  904.                                             AllColor.RED);
  905.                             break;
  906.                         }
  907.                         if (Config.CONFIG_MORPH_PROHIBIDEN.contains(morphID)) {
  908.                             _perso.set_gfxID(morphID);
  909.                             SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
  910.                                     _perso.get_curCarte(), _perso.get_GUID());
  911.                             SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
  912.                                     _perso.get_curCarte(), _perso);
  913.                         }
  914.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  915.                                 "Votre Morph à bien etait mise en place.",
  916.                                 AllColor.RED);
  917.                         break;
  918.                     case 23: // Donner une statistique
  919.                         int statID = Integer.parseInt(args.split(",")[0]);
  920.                         int value = Integer.parseInt(args.split(",")[1]);
  921.                         _perso.get_baseStats().addOneStat(statID, value);
  922.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  923.                         break;
  924.                     case 123: // Donner une statistique
  925.                         String packet = "/ui itemsummoner";
  926.                         _perso.get_compte().getGameThread().setCommand(new GmCommand(_perso));
  927.                         _perso.get_compte().getGameThread().getCommand().consoleCommand(packet);
  928.                        
  929.                         break;
  930.                     case 24: // Ouvrir la banque
  931.                         SocketManager.GAME_SEND_Im_PACKET(_perso, "1128;" + 0);
  932.                         break;
  933.                     case 999: // Ouvrir lenclos
  934.                         if (_perso.getInMountPark() == null)
  935.                             _perso.set_away(true);
  936.                         MountPark park = World.getCarte((short) 8745)
  937.                                 .getMountPark();
  938.                         _perso.setPark(park);
  939.                         String str = park.parseData(_perso.get_GUID(),
  940.                                 (park.get_owner() == -1 ? true : false));
  941.                         SocketManager.GAME_SEND_ECK_PACKET(_perso, 16, str);
  942.                         break;
  943.                     case 777: //Morph item
  944.                         int id_item_apparance;
  945.                         int id_item_jet;
  946.                         try {
  947.                             String morph_item[] = msg.substring(command.getName().length()+2, msg.length() - 1).split(" ");
  948.                             id_item_apparance = Integer.parseInt(morph_item[0]);
  949.                             id_item_jet = Integer.parseInt(morph_item[1]);
  950.                         }catch(Exception e){
  951.                             SocketManager.GAME_SEND_MESSAGE(_perso,"Indiquer votre morph en faisant <b>."+command.getName()+" (id de l'item apparence) (id de l'item stats)</b>",Config.CONFIG_MOTD_COLOR);
  952.                             return true;
  953.                         }
  954.                         ObjTemplate T = World.getObjTemplate(id_item_apparance);
  955.                         Objects morphitem = T.createNewMorphItem(id_item_apparance, World.getObjet(id_item_jet));
  956.                         if(_perso.addObjet(morphitem, true))World.addObjet(morphitem, true);
  957.                         SocketManager.GAME_SEND_Ow_PACKET(_perso);
  958.                         SocketManager.GAME_SEND_MESSAGE(_perso, "Item a bien étais transformer !", Config.CONFIG_MOTD_COLOR);
  959.                     break;
  960.                     case 25: // Ajouter des points de sort
  961.                         int points = Integer.parseInt(args);
  962.                         _perso.addSpellPoint(points);
  963.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  964.                         break;
  965.                     case 26: // Ajouter des points de capital
  966.                         int capital = Integer.parseInt(args);
  967.                         _perso.addCapital(capital);
  968.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  969.                         break;
  970.                     case 80: // DEMORPH
  971.                         Player target = _perso;
  972.                         int morphID1 = target.get_classe() * 10
  973.                                 + target.get_sexe();
  974.                         target.set_gfxID(morphID1);
  975.                         SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
  976.                                 target.get_curCarte(), target.get_GUID());
  977.                         SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
  978.                                 target.get_curCarte(), target);
  979.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  980.                                 "Votre morph a bien etait enlevé!.",
  981.                                 AllColor.RED);
  982.                         break;
  983.                     case 27: // Commandes Kolizeum 1vs1
  984.                         Manager k1 = World.kolizeum;
  985.                         String argument;
  986.                         try {
  987.                             argument = msg.substring(
  988.                                     command.getName().length() + 2,
  989.                                     msg.length() - 1);
  990.  
  991.                         } catch (Exception e) {
  992.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  993.                                     "Faites .kolizeum off/on.",
  994.                                     Config.CONFIG_MOTD_COLOR);
  995.                             break;
  996.                         }
  997.  
  998.                         switch (argument.toLowerCase()) {
  999.  
  1000.                         case "on": {
  1001.                             if (_perso.getKolizeum1() != null) {
  1002.                                 SocketManager
  1003.                                         .GAME_SEND_MESSAGE(
  1004.                                                 _perso,
  1005.                                                 "<b>Kolizeum </b>: vous êtes dejà inscrit !",
  1006.                                                 Config.CONFIG_MOTD_COLOR);
  1007.                                 break;
  1008.                             }
  1009.                             break;
  1010.                         }
  1011.  
  1012.                         case "off": {
  1013.                             if (_perso.getKolizeum1() == null) {
  1014.                                 SocketManager
  1015.                                         .GAME_SEND_MESSAGE(
  1016.                                                 _perso,
  1017.                                                 "<b>Kolizeum</b>: vous n'êtes pas inscrit !",
  1018.                                                 Config.CONFIG_MOTD_COLOR);
  1019.                                 break;
  1020.                             }
  1021.                             k1.removePlayer(_perso);
  1022.                             break;
  1023.                         }
  1024.                         }
  1025.                        
  1026.                         break;
  1027.                    
  1028.                     case 28: // Canal sans limite
  1029.                         String RangP = "";
  1030.                         if (_perso.get_monde() == 0)
  1031.                             RangP = "Nouveau";
  1032.                         if (_perso.get_monde() == 1)
  1033.                             RangP = "pvp 1.29";
  1034.                         if (_perso.get_monde() == 2)
  1035.                             RangP = "semi 2.0";
  1036.                         if (_perso.get_monde() == 3)
  1037.                             RangP = "pvp 2.0";
  1038.                         if (_perso.get_monde() == 5)
  1039.                             RangP = "semi 1.29";
  1040.                         if (_perso.get_monde() == 1
  1041.                         && _perso.get_compte().get_gmLvl() > 1)
  1042.                             RangP = "Staff PVP 1.29";
  1043.                         if (_perso.get_monde() == 2
  1044.                         && _perso.get_compte().get_gmLvl() > 1)
  1045.                             RangP = "Staff semi 2.0";
  1046.                         if (_perso.get_monde() == 3
  1047.                         && _perso.get_compte().get_gmLvl() > 1)
  1048.                             RangP = "Staff PVP 2.0";
  1049.                         if (_perso.get_monde() == 5
  1050.                         && _perso.get_compte().get_gmLvl() > 1)
  1051.                             RangP = "Staff semi 1.29";
  1052.                         String prefix = _perso.get_name();
  1053.                         String sp = msg.substring(
  1054.                                 command.getName().length() + 2,
  1055.                                 msg.length() - 1);
  1056.                         String clicker_name = "<a href='asfunction:onHref,ShowPlayerPopupMenu,"
  1057.                                 + _perso.get_name() + "'>" + prefix + "</a>";
  1058.                         SocketManager.GAME_SEND_MESSAGE_TO_ALL(
  1059.                                 (new StringBuilder("(" + RangP + ")<b> "))
  1060.                                         .append(clicker_name).append("</b> : ")
  1061.                                         .append(sp).toString(), "000099");
  1062.                         break;
  1063.                     case 29: // Création de Team Arena
  1064.                         String s;
  1065.                         try {
  1066.                             s = msg.substring(command.getName().length() + 2,
  1067.                                     msg.length() - 1);
  1068.                         } catch (Exception e) {
  1069.                             SocketManager
  1070.                                     .GAME_SEND_MESSAGE(
  1071.                                             _perso,
  1072.                                             "Pour créer une équipe, invitez votre partenaire dans votre groupe, puis éxécutez .createteam + Nom de votre Team",
  1073.                                             Config.CONFIG_MOTD_COLOR);
  1074.                             break;
  1075.                         }
  1076.                         if (s.length() > 20 || s.contains("#")
  1077.                                 || s.contains(",") || s.contains(";")
  1078.                                 || s.contains("/") || s.contains("!")
  1079.                                 || s.contains(".") || s.contains("'")
  1080.                                 || s.contains("*") || s.contains("$")
  1081.                                 || s.contains("+") || s.contains("-")
  1082.                                 || s.contains("|") || s.contains("~")
  1083.                                 || s.contains("(") || s.contains(")")
  1084.                                 || s.contains("[") || s.contains("]")
  1085.                                 || s.contains("%"))
  1086.  
  1087.                         {
  1088.                             SocketManager
  1089.                                     .GAME_SEND_MESSAGE(
  1090.                                             _perso,
  1091.                                             "Le nom de votre équipe ne doit pas contenir de caractères spéciaux !",
  1092.                                             AllColor.RED);
  1093.                             break;
  1094.                         }
  1095.                         if (_perso.getGroup() != null) {
  1096.                             if (_perso.getGroup().getPersos().size() > 2) {
  1097.                                 SocketManager
  1098.                                         .GAME_SEND_MESSAGE(
  1099.                                                 _perso,
  1100.                                                 "Votre groupe comporte plus de 2 joueurs ! L'arène est de type 2v2, ne l'oubliez pas !",
  1101.                                                 AllColor.RED);
  1102.                                 break;
  1103.                             }
  1104.                             if (!_perso.getGroup().isChief(_perso.get_GUID())) {
  1105.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  1106.                                         "Vous n'êtes pas chef de groupe !",
  1107.                                         AllColor.RED);
  1108.                                 break;
  1109.                             }
  1110.                             String players = "";
  1111.                             boolean first = true;
  1112.                             int classe = 0;
  1113.                             for (Player c : _perso.getGroup().getPersos()) {
  1114.                                 if (classe == c.get_classe()) {
  1115.                                     SocketManager
  1116.                                             .GAME_SEND_MESSAGE(
  1117.                                                     _perso,
  1118.                                                     "Vous ne pouvez pas créer de team avec deux mêmes classes !",
  1119.                                                     AllColor.RED);
  1120.                                     break;
  1121.                                 }
  1122.                                 if (!Arena.isVerifiedTeam(_perso.get_classe(),
  1123.                                         c.get_classe())) {
  1124.                                     SocketManager
  1125.                                             .GAME_SEND_MESSAGE(
  1126.                                                     _perso,
  1127.                                                     "Vous ne pouvez pas créer de team avec deux classes type pillier ! (Xélor, Sacrieur, Eniripsa, Osamodas)",
  1128.                                                     AllColor.RED);
  1129.                                     break;
  1130.                                 }
  1131.                                 if (first) {
  1132.                                     classe = c.get_classe();
  1133.                                     players = String.valueOf(c.get_GUID());
  1134.                                     first = false;
  1135.                                 } else if (!first) {
  1136.                                     players += "," + c.get_GUID();
  1137.                                 }
  1138.                             }
  1139.                             if (Team.addTeam(s, players, 0, 0)) {
  1140.                                 for (Player c : _perso.getGroup().getPersos()) {
  1141.                                     SocketManager
  1142.                                             .GAME_SEND_MESSAGE(
  1143.                                                     c,
  1144.                                                     "La Team '<b>"
  1145.                                                             + Team.getTeamByID(
  1146.                                                                     _perso.getTeamID())
  1147.                                                                     .getName()
  1148.                                                             + "</b>' a été créée avec succès !",
  1149.                                                     AllColor.RED);
  1150.                                 }
  1151.                             }
  1152.                             break;
  1153.                         } else {
  1154.                             SocketManager
  1155.                                     .GAME_SEND_MESSAGE(
  1156.                                             _perso,
  1157.                                             "Vous n'avez pas de groupe, et par conséquent, aucun partenaire à ajouter dans votre Team !",
  1158.                                             AllColor.RED);
  1159.                             break;
  1160.                         }
  1161.                     case 30: // Delete de Team Arena
  1162.                         String string;
  1163.                         try {
  1164.                             string = msg.substring(
  1165.                                     command.getName().length() + 2,
  1166.                                     msg.length() - 1);
  1167.                         } catch (Exception e) {
  1168.                             if (_perso.getTeamID() != -1)
  1169.                                 SocketManager
  1170.                                         .GAME_SEND_MESSAGE(
  1171.                                                 _perso,
  1172.                                                 "Etes vous sûr de vouloir détruire votre team ? (Quôte d'arène: "
  1173.                                                         + Team.getTeamByID(
  1174.                                                                 _perso.getTeamID())
  1175.                                                                 .getCote()
  1176.                                                         + ")\n Si oui, faites .removeteam ok !",
  1177.                                                 Config.CONFIG_MOTD_COLOR);
  1178.                             else
  1179.                                 SocketManager
  1180.                                         .GAME_SEND_MESSAGE(
  1181.                                                 _perso,
  1182.                                                 "Vous n'avez actuellement aucune team !",
  1183.                                                 AllColor.RED);
  1184.                             break;
  1185.                         }
  1186.                         if (string.equals("ok")) {
  1187.                             if (_perso.getArena() > -1)
  1188.                                 SocketManager
  1189.                                         .GAME_SEND_MESSAGE(
  1190.                                                 _perso,
  1191.                                                 "Action impossible, vous êtes inscris, ou déjà en combat d'arène !",
  1192.                                                 AllColor.RED);
  1193.                             else
  1194.                                 Team.removeTeam(
  1195.                                         Team.getTeamByID(_perso.getTeamID()),
  1196.                                         _perso);
  1197.                             break;
  1198.                         } else {
  1199.                             SocketManager
  1200.                                     .GAME_SEND_MESSAGE(
  1201.                                             _perso,
  1202.                                             "Tâche non reconnue, faites ."
  1203.                                                     + command.getName()
  1204.                                                     + " pour avoir des informations sur la commande.",
  1205.                                             AllColor.RED);
  1206.                             break;
  1207.                         }
  1208.                     case 31: // Informations de Team Arena
  1209.                         if (_perso.getTeamID() != -1) {
  1210.                             Player coep = Team.getPlayer(
  1211.                                     Team.getTeamByID(_perso.getTeamID()), 1);
  1212.                             if (Team.getPlayer(
  1213.                                     Team.getTeamByID(_perso.getTeamID()), 1) == _perso)
  1214.                                 coep = Team
  1215.                                         .getPlayer(Team.getTeamByID(_perso
  1216.                                                 .getTeamID()), 2);
  1217.                             SocketManager.GAME_SEND_MESSAGE(_perso, "<b>"
  1218.                                     + Team.getTeamByID(_perso.getTeamID())
  1219.                                             .getName()
  1220.                                     + "</b>\n"
  1221.                                     + "Partenaire: <b>"
  1222.                                     + coep.get_name()
  1223.                                     + "</b>\n"
  1224.                                     + "Côte: <b>"
  1225.                                     + Team.getTeamByID(_perso.getTeamID())
  1226.                                             .getCote()
  1227.                                     + "</b>\n"
  1228.                                     + "Rang: <b>"
  1229.                                     + Team.getTeamByID(_perso.getTeamID())
  1230.                                             .getRank() + "</b>", AllColor.RED);
  1231.                             break;
  1232.                         } else {
  1233.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  1234.                                     "Vous n'avez pas d'équipe d'arène 2v2 !",
  1235.                                     AllColor.RED);
  1236.                             break;
  1237.                         }
  1238.                     case 32: // Arena Inscription/Désinscription
  1239.                         String arena;
  1240.                         try {
  1241.                             arena = msg.substring(
  1242.                                     command.getName().length() + 2,
  1243.                                     msg.length() - 1);
  1244.                         } catch (Exception e) {
  1245.                             if (_perso.getArena() == 0)
  1246.                                 SocketManager
  1247.                                         .GAME_SEND_MESSAGE(
  1248.                                                 _perso,
  1249.                                                 "Vous êtes déjà inscris au tournoi d'arène 2v2 ! Faites |<b> ."
  1250.                                                         + command.getName()
  1251.                                                         + " off </b>| pour vous désinscrire...",
  1252.                                                 Config.CONFIG_MOTD_COLOR);
  1253.                             else if (_perso.getArena() == 1)
  1254.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  1255.                                         "Vous êtes en combat d'arène !",
  1256.                                         Config.CONFIG_MOTD_COLOR);
  1257.                             else
  1258.                                 SocketManager
  1259.                                         .GAME_SEND_MESSAGE(
  1260.                                                 _perso,
  1261.                                                 "Vous n'êtes pas inscris, faites |<b> ."
  1262.                                                         + command.getName()
  1263.                                                         + " on </b>| pour vous inscrire !",
  1264.                                                 Config.CONFIG_MOTD_COLOR);
  1265.                             break;
  1266.                         }
  1267.                         if (arena.equals("on")) {
  1268.                             if (_perso.getTeamID() < 0) {
  1269.                                 SocketManager
  1270.                                         .GAME_SEND_MESSAGE(
  1271.                                                 _perso,
  1272.                                                 "Vous ne possédez aucune Team ! (<b>."
  1273.                                                         + command.getName()
  1274.                                                         + "</b> pour plus d'informations)",
  1275.                                                 Config.CONFIG_MOTD_COLOR);
  1276.                                 break;
  1277.                             } else if (_perso.getGroup() == null) {
  1278.                                 SocketManager
  1279.                                         .GAME_SEND_MESSAGE(
  1280.                                                 _perso,
  1281.                                                 "Vous devez être grouppé avec votre partenaire de Team ! (<b>."
  1282.                                                         + command.getName()
  1283.                                                         + "</b> pour plus d'informations)",
  1284.                                                 Config.CONFIG_MOTD_COLOR);
  1285.                                 break;
  1286.                             } else {
  1287.                                 if (_perso.getGroup().getPersos().size() > 2
  1288.                                         || _perso.getGroup().getPersos().size() < 2) {
  1289.                                     SocketManager
  1290.                                             .GAME_SEND_MESSAGE(
  1291.                                                     _perso,
  1292.                                                     "Votre groupe doit contenir exactement deux joueurs ! Vous, et votre partenaire de Team !",
  1293.                                                     Config.CONFIG_MOTD_COLOR);
  1294.                                     break;
  1295.                                 } else if (!_perso.getGroup().isChief(
  1296.                                         _perso.get_GUID())) {
  1297.                                     SocketManager
  1298.                                             .GAME_SEND_MESSAGE(
  1299.                                                     _perso,
  1300.                                                     "Vous devez être le chef de groupe pour vous inscrire !",
  1301.                                                     Config.CONFIG_MOTD_COLOR);
  1302.                                     break;
  1303.                                 }
  1304.                                 for (Player c : _perso.getGroup().getPersos()) {
  1305.                                     try {
  1306.                                         if (!Team.getPlayers(
  1307.                                                 Team.getTeamByID(_perso
  1308.                                                         .getTeamID()))
  1309.                                                 .contains(c)) {
  1310.                                             SocketManager
  1311.                                                     .GAME_SEND_MESSAGE(
  1312.                                                             _perso,
  1313.                                                             "Le joueur "
  1314.                                                                     + c.get_name()
  1315.                                                                     + " n'est pas votre partenaire de Team !",
  1316.                                                             Config.CONFIG_MOTD_COLOR);
  1317.                                             break;
  1318.                                         }
  1319.  
  1320.                                         else if (!c.isOnline()) {
  1321.                                             SocketManager
  1322.                                                     .GAME_SEND_MESSAGE(
  1323.                                                             _perso,
  1324.                                                             "Le joueur "
  1325.                                                                     + c.get_name()
  1326.                                                                     + " n'est pas connecté !",
  1327.                                                             Config.CONFIG_MOTD_COLOR);
  1328.                                             break;
  1329.                                         } else if (c.get_fight() != null) {
  1330.                                             SocketManager
  1331.                                                     .GAME_SEND_MESSAGE(
  1332.                                                             _perso,
  1333.                                                             "Le joueur "
  1334.                                                                     + c.get_name()
  1335.                                                                     + " est en combat !",
  1336.                                                             Config.CONFIG_MOTD_COLOR);
  1337.                                             break;
  1338.                                         } else if (c.getArena() != -1) {
  1339.                                             SocketManager
  1340.                                                     .GAME_SEND_MESSAGE(
  1341.                                                             _perso,
  1342.                                                             "Le joueur "
  1343.                                                                     + c.get_name()
  1344.                                                                     + " est déjà inscris au tournoi d'arène 2v2 !",
  1345.                                                             Config.CONFIG_MOTD_COLOR);
  1346.                                             break;
  1347.                                         } else {
  1348.                                             Arena.addTeam(Team
  1349.                                                     .getTeamByID(_perso
  1350.                                                             .getTeamID()));
  1351.                                             break;
  1352.                                         }
  1353.                                     } catch (Exception e) {
  1354.                                     }
  1355.                                 }
  1356.                             }
  1357.                         } else if (arena.equals("off")) {
  1358.                             try {
  1359.                                 if (_perso.getTeamID() < 0) {
  1360.                                     SocketManager
  1361.                                             .GAME_SEND_MESSAGE(
  1362.                                                     _perso,
  1363.                                                     "Vous ne possédez aucune Team ! (<b>."
  1364.                                                             + command.getName()
  1365.                                                             + "</b> pour plus d'informations)",
  1366.                                                     Config.CONFIG_MOTD_COLOR);
  1367.                                     break;
  1368.                                 } else if (_perso.getArena() == 1
  1369.                                         && _perso.get_fight() != null) {
  1370.                                     SocketManager.GAME_SEND_MESSAGE(_perso,
  1371.                                             "Vous êtes en plein tournoi !",
  1372.                                             Config.CONFIG_MOTD_COLOR);
  1373.                                     break;
  1374.                                 } else {
  1375.                                     Arena.delTeam(Team.getTeamByID(_perso
  1376.                                             .getTeamID()));
  1377.                                     break;
  1378.                                 }
  1379.                             } catch (Exception e) {
  1380.                             }
  1381.                         } else {
  1382.                             SocketManager
  1383.                                     .GAME_SEND_MESSAGE(
  1384.                                             _perso,
  1385.                                             "Tâche non reconnue, faites ."
  1386.                                                     + command.getName()
  1387.                                                     + " pour avoir des informations sur la commande.",
  1388.                                             AllColor.RED);
  1389.                             break;
  1390.                         }
  1391.                         break;
  1392.                     case 33: // RapidStuffs
  1393.                         String rs;
  1394.                         try {
  1395.                             rs = msg.substring(command.getName().length() + 2,
  1396.                                     msg.length() - 1);
  1397.                         } catch (Exception e) {
  1398.                             SocketManager
  1399.                                     .GAME_SEND_MESSAGE(
  1400.                                             _perso,
  1401.                                             "<b>Equipements rapides: </b>\n"
  1402.                                                     + "<b>."
  1403.                                                     + command.getName()
  1404.                                                     + " create [name]</b> pour créer un nouveau stuff\n"
  1405.                                                     + "<b>."
  1406.                                                     + command.getName()
  1407.                                                     + " remove [name]</b> pour supprimer un stuff\n"
  1408.                                                     + "<b>."
  1409.                                                     + command.getName()
  1410.                                                     + " view</b> pour voir tous vos stuffs rapides disponibles\n"
  1411.                                                     + "<b>."
  1412.                                                     + command.getName()
  1413.                                                     + " equip [name]</b> pour équiper un stuff rapidement",
  1414.                                             Config.CONFIG_MOTD_COLOR);
  1415.                             break;
  1416.                         }
  1417.  
  1418.                         if (msg.length() >= command.getName().length() + 8
  1419.                                 && msg.substring(
  1420.                                         command.getName().length() + 2,
  1421.                                         command.getName().length() + 8).equals(
  1422.                                         "create")) {
  1423.                             if (_perso.getRapidStuffs().size() > 9) {
  1424.                                 SocketManager
  1425.                                         .GAME_SEND_MESSAGE(
  1426.                                                 _perso,
  1427.                                                 "Vous ne pouvez pas avoir plus de 10 stuffs rapides !",
  1428.                                                 Config.CONFIG_MOTD_COLOR);
  1429.                                 break;
  1430.                             }
  1431.                             String name = "";
  1432.                             try {
  1433.                                 name = msg.substring(
  1434.                                         command.getName().length() + 9,
  1435.                                         msg.length() - 1);
  1436.                             } catch (Exception e) {
  1437.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  1438.                                         "Erreur ! Entrez un nom à votre stuff rapide: ."
  1439.                                                 + command.getName()
  1440.                                                 + " create [name]",
  1441.                                         Config.CONFIG_MOTD_COLOR);
  1442.                                 break;
  1443.                             }
  1444.  
  1445.                             int coiffe = _perso
  1446.                                     .getObjetByPosSpece(Constant.ITEM_POS_COIFFE);
  1447.                             int cape = _perso
  1448.                                     .getObjetByPosSpece(Constant.ITEM_POS_CAPE);
  1449.                             int arme = _perso
  1450.                                     .getObjetByPosSpece(Constant.ITEM_POS_ARME);
  1451.                             int anneau1 = _perso
  1452.                                     .getObjetByPosSpece(Constant.ITEM_POS_ANNEAU1);
  1453.                             int amulette = _perso
  1454.                                     .getObjetByPosSpece(Constant.ITEM_POS_AMULETTE);
  1455.                             int ceinture = _perso
  1456.                                     .getObjetByPosSpece(Constant.ITEM_POS_CEINTURE);
  1457.                             int bottes = _perso
  1458.                                     .getObjetByPosSpece(Constant.ITEM_POS_BOTTES);
  1459.                             int bouclier = _perso
  1460.                                     .getObjetByPosSpece(Constant.ITEM_POS_BOUCLIER);
  1461.                             int anneau2 = _perso
  1462.                                     .getObjetByPosSpece(Constant.ITEM_POS_ANNEAU2);
  1463.                             int dofus1 = _perso
  1464.                                     .getObjetByPosSpece(Constant.ITEM_POS_DOFUS1);
  1465.                             int dofus2 = _perso
  1466.                                     .getObjetByPosSpece(Constant.ITEM_POS_DOFUS2);
  1467.                             int dofus3 = _perso
  1468.                                     .getObjetByPosSpece(Constant.ITEM_POS_DOFUS3);
  1469.                             int dofus4 = _perso
  1470.                                     .getObjetByPosSpece(Constant.ITEM_POS_DOFUS4);
  1471.                             int dofus5 = _perso
  1472.                                     .getObjetByPosSpece(Constant.ITEM_POS_DOFUS5);
  1473.                             int dofus6 = _perso
  1474.                                     .getObjetByPosSpece(Constant.ITEM_POS_DOFUS6);
  1475.                             int familier = _perso
  1476.                                     .getObjetByPosSpece(Constant.ITEM_POS_FAMILIER);
  1477.  
  1478.                             if (!RapidStuff.addRapidStuff(_perso, name, coiffe
  1479.                                     + "," + cape + "," + anneau1 + ","
  1480.                                     + amulette + "," + ceinture + "," + bottes
  1481.                                     + "," + familier + "," + bouclier + ","
  1482.                                     + arme + "," + anneau2 + "," + dofus1 + ","
  1483.                                     + dofus2 + "," + dofus3 + "," + dofus4
  1484.                                     + "," + dofus5 + "," + dofus6))
  1485.                                 SocketManager
  1486.                                         .GAME_SEND_MESSAGE(
  1487.                                                 _perso,
  1488.                                                 "Erreur ! Un stuff rapide est identique ou le nom est déjà utilisé !",
  1489.                                                 Config.CONFIG_MOTD_COLOR);
  1490.                             else
  1491.                                 SocketManager
  1492.                                         .GAME_SEND_MESSAGE(
  1493.                                                 _perso,
  1494.                                                 "Nouveau stuff enregistré avec succès !",
  1495.                                                 Config.CONFIG_MOTD_COLOR);
  1496.                             break;
  1497.                         }
  1498.  
  1499.                         else if (msg.length() >= command.getName().length() + 8
  1500.                                 && msg.substring(
  1501.                                         command.getName().length() + 2,
  1502.                                         command.getName().length() + 8).equals(
  1503.                                         "remove")) {
  1504.                             String name = "";
  1505.                             try {
  1506.                                 name = msg.substring(
  1507.                                         command.getName().length() + 9,
  1508.                                         msg.length() - 1);
  1509.                             } catch (Exception e) {
  1510.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  1511.                                         "Erreur ! Entrez le nom du stuff rapide à supprimer: "
  1512.                                                 + command.getName()
  1513.                                                 + " remove [name]",
  1514.                                         Config.CONFIG_MOTD_COLOR);
  1515.                                 break;
  1516.                             }
  1517.                             if (_perso.getRapidStuffByName(name) != null
  1518.                                     && RapidStuff.removeRapidStuff(_perso
  1519.                                             .getRapidStuffByName(name)))
  1520.                                 SocketManager
  1521.                                         .GAME_SEND_MESSAGE(
  1522.                                                 _perso,
  1523.                                                 "Le stuff <b>"
  1524.                                                         + name
  1525.                                                         + "</b> a été supprimé avec succès !",
  1526.                                                 Config.CONFIG_MOTD_COLOR);
  1527.                             else
  1528.                                 SocketManager
  1529.                                         .GAME_SEND_MESSAGE(
  1530.                                                 _perso,
  1531.                                                 "Le stuff rapide <b>"
  1532.                                                         + name
  1533.                                                         + "</b> est innéxistant ! Faites ."
  1534.                                                         + command.getName()
  1535.                                                         + " view pour avoir la liste.",
  1536.                                                 Config.CONFIG_MOTD_COLOR);
  1537.                             break;
  1538.                         }
  1539.  
  1540.                         else if (rs.equals("view")) {
  1541.                             String list = null;
  1542.                             if (_perso.getRapidStuffs().isEmpty()) {
  1543.                                 SocketManager
  1544.                                         .GAME_SEND_MESSAGE(
  1545.                                                 _perso,
  1546.                                                 "Vous n'avez aucun équipement rapide !",
  1547.                                                 Config.CONFIG_MOTD_COLOR);
  1548.                                 break;
  1549.                             } else {
  1550.                                 for (RapidStuff ss : _perso.getRapidStuffs()) {
  1551.                                     if (list == null) {
  1552.                                         list = "-" + ss.getName();
  1553.                                     } else {
  1554.                                         list += "\n-" + ss.getName();
  1555.                                     }
  1556.                                 }
  1557.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  1558.                                         "\n\n<b>Faites " + command.getName()
  1559.                                                 + " equip + [name] :</b>\n"
  1560.                                                 + list,
  1561.                                         Config.CONFIG_MOTD_COLOR);
  1562.                                 break;
  1563.                             }
  1564.                         }
  1565.  
  1566.                         else if (msg.length() >= command.getName().length() + 7
  1567.                                 && msg.substring(
  1568.                                         command.getName().length() + 2,
  1569.                                         command.getName().length() + 7).equals(
  1570.                                         "equip")) {
  1571.                             String name = "";
  1572.                             try {
  1573.                                 name = msg.substring(
  1574.                                         command.getName().length() + 8,
  1575.                                         msg.length() - 1);
  1576.                             } catch (Exception e) {
  1577.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  1578.                                         "Erreur ! Entrez le nom du stuff rapide à équiper: "
  1579.                                                 + command.getName()
  1580.                                                 + " equip [name]",
  1581.                                         Config.CONFIG_MOTD_COLOR);
  1582.                                 break;
  1583.                             }
  1584.  
  1585.                             if (_perso.getRapidStuffByName(name) != null) {
  1586.                                 boolean first = true;
  1587.                                 int number = 1;
  1588.  
  1589.                                 for (Objects rapidStuff : _perso
  1590.                                         .getRapidStuffByName(name).getObjects()) {
  1591.                                     if (!_perso.hasItemGuid(rapidStuff
  1592.                                             .getGuid())) {
  1593.                                         SocketManager
  1594.                                                 .GAME_SEND_MESSAGE(
  1595.                                                         _perso,
  1596.                                                         "L'item <b>"
  1597.                                                                 + World.getObjet(
  1598.                                                                         rapidStuff
  1599.                                                                                 .getGuid())
  1600.                                                                         .getTemplate()
  1601.                                                                         .getName()
  1602.                                                                 + "</b> ne vous appartient plus et n'a pas pu être équipé !",
  1603.                                                         Config.CONFIG_MOTD_COLOR);
  1604.                                         continue;
  1605.                                     } else {
  1606.                                         int pos = Constant
  1607.                                                 .getObjectPosByType(rapidStuff
  1608.                                                         .getTemplate()
  1609.                                                         .getType()); // Bordel
  1610.                                                                         // de
  1611.                                                                         // pos,
  1612.                                                                         // ça
  1613.                                                                         // m'aura
  1614.                                                                         // bien
  1615.                                                                         // fais
  1616.                                                                         // chié
  1617.                                         if (rapidStuff.getTemplate().isArm())
  1618.                                             pos = 1;
  1619.                                         if (rapidStuff.getTemplate().getType() == Constant.ITEM_TYPE_ANNEAU) {
  1620.                                             if (first) {
  1621.                                                 pos = 2;
  1622.                                                 first = false;
  1623.                                             } else
  1624.                                                 pos = 4;
  1625.                                         }
  1626.                                         if (rapidStuff.getTemplate().getType() == Constant.ITEM_TYPE_DOFUS) {
  1627.                                             switch (number) {
  1628.                                             case 1:
  1629.                                                 pos = Constant.ITEM_POS_DOFUS1;
  1630.                                                 number++;
  1631.                                                 break;
  1632.                                             case 2:
  1633.                                                 pos = Constant.ITEM_POS_DOFUS2;
  1634.                                                 number++;
  1635.                                                 break;
  1636.                                             case 3:
  1637.                                                 pos = Constant.ITEM_POS_DOFUS3;
  1638.                                                 number++;
  1639.                                                 break;
  1640.                                             case 4:
  1641.                                                 pos = Constant.ITEM_POS_DOFUS4;
  1642.                                                 number++;
  1643.                                                 break;
  1644.                                             case 5:
  1645.                                                 pos = Constant.ITEM_POS_DOFUS5;
  1646.                                                 number++;
  1647.                                                 break;
  1648.                                             case 6:
  1649.                                                 number = Constant.ITEM_POS_DOFUS6;
  1650.                                                 break;
  1651.                                             }
  1652.                                         }
  1653.                                         ParseObject.Object_move(_perso, _out,
  1654.                                                 1, rapidStuff.getGuid(), pos,
  1655.                                                 true); // On double pour les
  1656.                                                         // déséquipements autos
  1657.                                         if (_perso.isEquip()) { // C'est balow
  1658.                                             ParseObject.Object_move(_perso,
  1659.                                                     _out, 1,
  1660.                                                     rapidStuff.getGuid(), pos,
  1661.                                                     false);
  1662.                                             _perso.setEquip(false);
  1663.                                         }
  1664.                                     }
  1665.                                 }
  1666.                                 break;
  1667.                             } else {
  1668.                                 SocketManager.GAME_SEND_MESSAGE(
  1669.                                         _perso,
  1670.                                         "Erreur ! Nom incorrect: "
  1671.                                                 + command.getName()
  1672.                                                 + " equip [name]",
  1673.                                         Config.CONFIG_MOTD_COLOR);
  1674.                                 break;
  1675.                             }
  1676.                         }
  1677.  
  1678.                         else {
  1679.                             SocketManager
  1680.                                     .GAME_SEND_MESSAGE(
  1681.                                             _perso,
  1682.                                             "<b>Equipements rapides: </b>\n\n"
  1683.                                                     + "<b>"
  1684.                                                     + command.getName()
  1685.                                                     + " create [name]</b> pour créer un nouveau stuff\n"
  1686.                                                     + "<b>"
  1687.                                                     + command.getName()
  1688.                                                     + " remove [name]</b> pour supprimer un stuff\n"
  1689.                                                     + "<b>"
  1690.                                                     + command.getName()
  1691.                                                     + " view</b> pour voir tous vos stuffs rapides disponbiles\n"
  1692.                                                     + "<b>"
  1693.                                                     + command.getName()
  1694.                                                     + " equip [name]</b> pour équiper un stuff rapidement",
  1695.                                             Config.CONFIG_MOTD_COLOR);
  1696.                             break;
  1697.                         }
  1698.                     case 34: // Affichage des points du compte
  1699.                         int accountPoints1 = Util.loadPointsByAccount(_perso
  1700.                                 .get_compte());
  1701.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  1702.                                 "Votre compte contient " + accountPoints1
  1703.                                         + " points boutiques !",
  1704.                                 Config.CONFIG_MOTD_COLOR);
  1705.                         break;
  1706.                     case 35: // Job levelUp
  1707.                         String st;
  1708.                         int job = 0;
  1709.                         int item = 0;
  1710.                         try {
  1711.                             st = msg.substring(command.getName().length() + 2,
  1712.                                     msg.length() - 1);
  1713.                         } catch (Exception e) {
  1714.                             SocketManager
  1715.                                     .GAME_SEND_MESSAGE(
  1716.                                             _perso,
  1717.                                             "<b>Liste(Faites .learn + Job):<br /></b> Cordomage,joaillomage,costumage,dague,epee,marteau,pelle,hache,arc,baguette,baton",
  1718.                                             Config.CONFIG_MOTD_COLOR);
  1719.                             return true;
  1720.                         }
  1721.  
  1722.                         if (st.equalsIgnoreCase("cordomage")) {
  1723.                             item = 7495;
  1724.                             job = 62;
  1725.                         } else if (st.equalsIgnoreCase("joaillomage")) {
  1726.                             item = 7493;
  1727.                             job = 63;
  1728.                         } else if (st.equalsIgnoreCase("costumage")) {
  1729.                             item = 7494;
  1730.                             job = 64;
  1731.                         } else if (st.equalsIgnoreCase("dague")) {
  1732.                             item = 1520;
  1733.                             job = 43;
  1734.                         } else if (st.equalsIgnoreCase("epee")) {
  1735.                             item = 1339;
  1736.                             job = 44;
  1737.                         } else if (st.equalsIgnoreCase("marteau")) {
  1738.                             item = 1561;
  1739.                             job = 45;
  1740.                         } else if (st.equalsIgnoreCase("pelle")) {
  1741.                             item = 1560;
  1742.                             job = 46;
  1743.                         } else if (st.equalsIgnoreCase("hache")) {
  1744.                             item = 1562;
  1745.                             job = 47;
  1746.                         } else if (st.equalsIgnoreCase("arc")) {
  1747.                             item = 1563;
  1748.                             job = 72;
  1749.                         } else if (st.equalsIgnoreCase("baguette")) {
  1750.                             item = 1564;
  1751.                             job = 49;
  1752.                         } else if (st.equalsIgnoreCase("baton")) {
  1753.                             item = 1565;
  1754.                             job = 50;
  1755.                         } else {
  1756.                             SocketManager
  1757.                                     .GAME_SEND_MESSAGE(
  1758.                                             _perso,
  1759.                                             "Metier non reconnu, faites .learn pour avoir la liste",
  1760.                                             Config.CONFIG_MOTD_COLOR);
  1761.                             return true;
  1762.                         }
  1763.  
  1764.                         _perso.learnJob(World.getMetier(job));
  1765.                         ObjTemplate a = World.getObjTemplate(item);
  1766.                         Objects objs = a.createNewItem(1, false, -1);
  1767.                         if (_perso.addObjet(objs, true))// Si le joueur n'avait
  1768.                                                         // pas d'item similaire
  1769.                             World.addObjet(objs, true);
  1770.  
  1771.                         StatsMetier SM = _perso.getMetierByID(job);
  1772.                         SM.addXp(_perso, 1000000);
  1773.                         SocketManager
  1774.                                 .GAME_SEND_MESSAGE(
  1775.                                         _perso,
  1776.                                         "Vous avez appris le métier avec succès et avez reçu l'arme de FM disponibles dans votre inventaire",
  1777.                                         Config.CONFIG_MOTD_COLOR);
  1778.                         break;
  1779.                     case 180:
  1780.                         if (((Reboot.lastReboot == 0L) || (System
  1781.                                 .currentTimeMillis() - Reboot.lastReboot <= 600000L))
  1782.                                 && (System.currentTimeMillis()
  1783.                                         - Config.gameServer.getStartTime() > 3600000L)) {
  1784.                             if ((!Reboot.wait) && (Reboot.shutdown == null)) {
  1785.                                 new Reboot(_perso);
  1786.                             } else {
  1787.                                 SocketManager
  1788.                                         .GAME_SEND_MESSAGE(
  1789.                                                 _perso,
  1790.                                                 "Vous ne pouvez pas fair de demande de reboot, car il y a déjà un demande en cour.",
  1791.                                                 AllColor.GOLD);
  1792.                                 return true;
  1793.                             }
  1794.                         } else {
  1795.                             SocketManager
  1796.                                     .GAME_SEND_MESSAGE(
  1797.                                             _perso,
  1798.                                             "Vous ne pouvez pas encore faire de demande de reboot.",
  1799.                                             AllColor.GOLD);
  1800.                             return true;
  1801.                         }
  1802.                         break;
  1803.                     case 181:
  1804.                         if ((Reboot.wait) && (Reboot.shutdown == null)) {
  1805.                             String nuhter = null;
  1806.                             try {
  1807.                                 nuhter = msg.substring(command.getName()
  1808.                                         .length() + 2, msg.length() - 1);
  1809.                             } catch (Exception e) {
  1810.                                 SocketManager.GAME_SEND_MESSAGE(
  1811.                                         _perso,
  1812.                                         "Indiquer votre avis en faisant <b>."
  1813.                                                 + command.getName()
  1814.                                                 + " pour</b> ou <b>."
  1815.                                                 + command.getName()
  1816.                                                 + " contre</b>", AllColor.GOLD);
  1817.                                 return true;
  1818.                             }
  1819.                             if (nuhter != null) {
  1820.                                 if (nuhter.equals("pour")) {
  1821.                                     Reboot.addVote(_perso, true);
  1822.                                     SocketManager
  1823.                                             .GAME_SEND_MESSAGE(
  1824.                                                     _perso,
  1825.                                                     "Votre vote a bien étais prit en compte.",
  1826.                                                     AllColor.GOLD);
  1827.                                     return true;
  1828.                                 }
  1829.                                 if (nuhter.equals("contre")) {
  1830.                                     Reboot.addVote(_perso, false);
  1831.                                     SocketManager
  1832.                                             .GAME_SEND_MESSAGE(
  1833.                                                     _perso,
  1834.                                                     "Votre vote a bien étais prit en compte.",
  1835.                                                     AllColor.GOLD);
  1836.                                     return true;
  1837.                                 }
  1838.                             }
  1839.                         } else {
  1840.                             SocketManager
  1841.                                     .GAME_SEND_MESSAGE(
  1842.                                             _perso,
  1843.                                             "Vous ne pouvez pas voter, car il n'y a pas de demande en cour ou un redémmarage programmer.",
  1844.                                             AllColor.GOLD);
  1845.                             return true;
  1846.                         }
  1847.                         break;
  1848.                     case 36: // Modifier la taille du personnage
  1849.                         int potion = Integer.parseInt(args.split(",")[0]);
  1850.                           if ((_perso != null) && (_perso.isOnline()))
  1851.                           if (!_perso.hasItemTemplate(potion, 1)) {
  1852.                             SocketManager
  1853.                               .GAME_SEND_MESSAGE(
  1854.                                 _perso,
  1855.                                 "Acheter la potion au PNJ boutique pour pouvoir utiliser cette commande en illimiter size 75 a 125 autoriser..",
  1856.                                 AllColor.GREEN);
  1857.                             break;
  1858.                           }
  1859.                         int sizeID = 0;
  1860.                         try {
  1861.                             sizeID = Integer.parseInt(msg.substring(
  1862.                                     command.getName().length() + 2,
  1863.                                     msg.length() - 1).trim());
  1864.  
  1865.                         } catch (Exception e) {
  1866.                             SocketManager
  1867.                                     .GAME_SEND_MESSAGE(
  1868.                                             _perso,
  1869.                                             "Size autorisé de 75 à 125. Exemple:.size 125 pour revenir à votre taille normal .size 100",
  1870.                                             AllColor.GREEN);
  1871.                             break;
  1872.                         }
  1873.                         if (sizeID > 125)
  1874.                             sizeID = 125;
  1875.                         if (sizeID < 75)
  1876.                             sizeID = 75;
  1877.                         _perso.set_size(sizeID);
  1878.                         SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
  1879.                                 _perso.get_curCarte(), _perso.get_GUID());
  1880.                         SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
  1881.                                 _perso.get_curCarte(), _perso);
  1882.                         SocketManager
  1883.                         .GAME_SEND_MESSAGE(
  1884.                                 _perso,
  1885.                                 "Votre size a bien etait modifier avec succes.",
  1886.                                 AllColor.GREEN);
  1887.                         break;
  1888.                      case 37: //FmCac
  1889.                           try{
  1890.                           Objects object = _perso.getObjetByPos(Constant.ITEM_POS_ARME);
  1891.                           int price = Integer.parseInt(args);
  1892.                          
  1893.                           if(_perso.get_kamas() < price) {
  1894.                            SocketManager.GAME_SEND_MESSAGE(_perso, "Action impossible : vous avez moins de "+price+" k", Config.CONFIG_MOTD_COLOR);
  1895.                            return true;
  1896.                            
  1897.                           } else if(_perso.get_fight() != null) {
  1898.                            SocketManager.GAME_SEND_MESSAGE(_perso, "Action impossible : vous ne devez pas être en combat", Config.CONFIG_MOTD_COLOR);
  1899.                            return true;
  1900.                          
  1901.                           } else if(object == null) {
  1902.                            SocketManager.GAME_SEND_MESSAGE(_perso, "Action impossible : vous ne portez pas d'arme", Config.CONFIG_MOTD_COLOR);
  1903.                            return true;
  1904.                           }
  1905.                        
  1906.                           boolean containNeutre = false;
  1907.                          
  1908.                           for(SpellEffect effect : object.getEffects()) {
  1909.                            if(effect.getEffectID() == 100 || effect.getEffectID() == 95)
  1910.                             containNeutre = true;
  1911.                           }
  1912.                           if(!containNeutre) {
  1913.                            SocketManager.GAME_SEND_MESSAGE(_perso, "Action impossible : votre arme n'a pas de dégats neutre", Config.CONFIG_MOTD_COLOR);
  1914.                            return true;
  1915.                           }
  1916.                        
  1917.                           String answer;
  1918.                        
  1919.                           try {
  1920.                            answer = msg.substring(command.getName().length()+2, msg.length() - 1);
  1921.                           } catch(Exception e) {
  1922.                            SocketManager.GAME_SEND_MESSAGE(_perso, "Action impossible : vous n'avez pas spécifié l'élément (air, feu, terre, eau) qui remplacera les dégats/vols de vies neutres", Config.CONFIG_MOTD_COLOR);
  1923.                            return true;
  1924.                           }
  1925.                        
  1926.                           if(!answer.equalsIgnoreCase("air") && !answer.equalsIgnoreCase("terre") && !answer.equalsIgnoreCase("feu") && !answer.equalsIgnoreCase("eau")) {
  1927.                            SocketManager.GAME_SEND_MESSAGE(_perso, "Action impossible : l'élément " + answer + " n'existe pas ! (dispo : air, feu, terre, eau)", Config.CONFIG_MOTD_COLOR);
  1928.                            return true;
  1929.                           }
  1930.                        
  1931.                           for(int i = 0; i < object.getEffects().size(); i++) {
  1932.                            
  1933.                            if(object.getEffects().get(i).getEffectID() == 100) {
  1934.                             if(answer.equalsIgnoreCase("air"))
  1935.                              object.getEffects().get(i).setEffectID(98);
  1936.                            
  1937.                             if(answer.equalsIgnoreCase("feu"))
  1938.                              object.getEffects().get(i).setEffectID(99);
  1939.                            
  1940.                             if(answer.equalsIgnoreCase("terre"))
  1941.                              object.getEffects().get(i).setEffectID(97);
  1942.                            
  1943.                             if(answer.equalsIgnoreCase("eau"))
  1944.                              object.getEffects().get(i).setEffectID(96);
  1945.                            }
  1946.                        
  1947.                            if(object.getEffects().get(i).getEffectID() == 95) {
  1948.                             if(answer.equalsIgnoreCase("air"))
  1949.                              object.getEffects().get(i).setEffectID(93);
  1950.                            
  1951.                             if(answer.equalsIgnoreCase("feu"))
  1952.                              object.getEffects().get(i).setEffectID(94);
  1953.                              
  1954.                             if(answer.equalsIgnoreCase("terre"))
  1955.                              object.getEffects().get(i).setEffectID(92);
  1956.                            
  1957.                             if(answer.equalsIgnoreCase("eau"))
  1958.                              object.getEffects().get(i).setEffectID(91);
  1959.                            
  1960.                            }
  1961.                           }                    
  1962.                        
  1963.                           SocketManager.GAME_SEND_STATS_PACKET(_perso);
  1964.                           SocketManager.GAME_SEND_MESSAGE(_perso, "Votre objet <b>" + object.getTemplate().getName() + "</b> a été forgemagé avec succès en " + answer, Config.CONFIG_MOTD_COLOR);
  1965.                           SocketManager.GAME_SEND_MESSAGE(_perso, "Pensez à vous déconnecter pour voir les modifications apportés à votre arme !", Config.CONFIG_MOTD_COLOR);
  1966.                           }catch(Exception e){}
  1967.                           break;
  1968.                      case 30007: // FmCac
  1969.                          int pointsRS = 0;
  1970.                          Objects object = _perso
  1971.                            .getObjetByPos(Constant.ITEM_POS_ARME);
  1972.                          int price = Integer.parseInt(args);
  1973.  
  1974.                          if (_perso.get_kamas() < price) {
  1975.                           SocketManager.GAME_SEND_MESSAGE(_perso,
  1976.                             "Action impossible : vous avez moins de "
  1977.                               + price + " k",
  1978.                             Config.CONFIG_MOTD_COLOR);
  1979.                           return true;
  1980.  
  1981.                          } else if (_perso.get_fight() != null) {
  1982.                           SocketManager
  1983.                             .GAME_SEND_MESSAGE(
  1984.                               _perso,
  1985.                               "Action impossible : vous ne devez pas être en combat",
  1986.                               Config.CONFIG_MOTD_COLOR);
  1987.                           return true;
  1988.  
  1989.                          } else if (object == null) {
  1990.                           SocketManager
  1991.                             .GAME_SEND_MESSAGE(
  1992.                               _perso,
  1993.                               "Action impossible : vous ne portez pas d'arme",
  1994.                               Config.CONFIG_MOTD_COLOR);
  1995.                           return true;
  1996.                          }
  1997.  
  1998.                          boolean containNeutre = false;
  1999.  
  2000.                          for (SpellEffect effect : object.getEffects()) {
  2001.                           if (effect.getEffectID() == 100
  2002.                             || effect.getEffectID() == 95)
  2003.                            containNeutre = true;
  2004.                          }
  2005.                          if (!containNeutre) {
  2006.                           SocketManager
  2007.                             .GAME_SEND_MESSAGE(
  2008.                               _perso,
  2009.                               "Action impossible : votre arme n'a pas de dégats neutre",
  2010.                               Config.CONFIG_MOTD_COLOR);
  2011.                           return true;
  2012.                          }
  2013.  
  2014.                          String answer;
  2015.  
  2016.                          try {
  2017.                           answer = msg.substring(
  2018.                             command.getName().length() + 2,
  2019.                             msg.length() - 1);
  2020.                          } catch (Exception e) {
  2021.                           SocketManager
  2022.                             .GAME_SEND_MESSAGE(
  2023.                               _perso,
  2024.                               "Action impossible : vous n'avez pas spécifié l'élément (air, feu, terre, eau) qui remplacera les dégats/vols de vies neutres",
  2025.                               Config.CONFIG_MOTD_COLOR);
  2026.                           return true;
  2027.                          }
  2028.  
  2029.                          if (!answer.equalsIgnoreCase("air")
  2030.                            && !answer.equalsIgnoreCase("terre")
  2031.                            && !answer.equalsIgnoreCase("feu")
  2032.                            && !answer.equalsIgnoreCase("eau")) {
  2033.                           SocketManager
  2034.                             .GAME_SEND_MESSAGE(
  2035.                               _perso,
  2036.                               "Action impossible : l'élément "
  2037.                                 + answer
  2038.                                 + " n'existe pas ! (dispo : air, feu, terre, eau)",
  2039.                               Config.CONFIG_MOTD_COLOR);
  2040.                           return true;
  2041.                          }
  2042.  
  2043.                          for (int i = 0; i < object.getEffects().size(); i++) {
  2044.  
  2045.                           if (object.getEffects().get(i).getEffectID() == 100) {
  2046.                            if (answer.equalsIgnoreCase("air"))
  2047.                             object.getEffects().get(i).setEffectID(98);
  2048.  
  2049.                            if (answer.equalsIgnoreCase("feu"))
  2050.                             object.getEffects().get(i).setEffectID(99);
  2051.  
  2052.                            if (answer.equalsIgnoreCase("terre"))
  2053.                             object.getEffects().get(i).setEffectID(97);
  2054.  
  2055.                            if (answer.equalsIgnoreCase("eau"))
  2056.                             object.getEffects().get(i).setEffectID(96);
  2057.                           }
  2058.  
  2059.                           if (object.getEffects().get(i).getEffectID() == 95) {
  2060.                            if (answer.equalsIgnoreCase("air"))
  2061.                             object.getEffects().get(i).setEffectID(93);
  2062.  
  2063.                            if (answer.equalsIgnoreCase("feu"))
  2064.                             object.getEffects().get(i).setEffectID(94);
  2065.  
  2066.                            if (answer.equalsIgnoreCase("terre"))
  2067.                             object.getEffects().get(i).setEffectID(92);
  2068.  
  2069.                            if (answer.equalsIgnoreCase("eau"))
  2070.                             object.getEffects().get(i).setEffectID(91);
  2071.  
  2072.                           }
  2073.                          }
  2074.  
  2075.                          long new_kamas = _perso.get_kamas() - price;
  2076.                          if (new_kamas < 0)
  2077.                           new_kamas = 0;
  2078.                          _perso.set_kamas(new_kamas);
  2079.  
  2080.                          SocketManager.GAME_SEND_STATS_PACKET(_perso);
  2081.                          SocketManager
  2082.                            .GAME_SEND_MESSAGE(
  2083.                              _perso,
  2084.                              "Votre objet <b>"
  2085.                                + object.getTemplate()
  2086.                                  .getName()
  2087.                                + "</b> a été forgemagé avec succès en "
  2088.                                + answer,
  2089.                              Config.CONFIG_MOTD_COLOR);
  2090.                          SocketManager
  2091.                            .GAME_SEND_MESSAGE(
  2092.                              _perso,
  2093.                              "Pensez à vous déconnecter pour voir les modifications apportés à votre arme !",
  2094.                              Config.CONFIG_MOTD_COLOR);
  2095.                          int pointspersoRS1 = pointsRS - pointsRS;
  2096.                          SQLManager.UPDATE_ACCOUNT_point(pointspersoRS1,
  2097.                            _perso.getAccID());
  2098.                          break;
  2099.                     case 38: // Téléportation
  2100.                         short mapID = (short) Integer
  2101.                                 .parseInt(args.split(",")[0]);
  2102.                         int cellID = Integer.parseInt(args.split(",")[1]);
  2103.                         _perso.teleport(mapID, cellID);
  2104.                         break;
  2105.                     case 40: // Personnage suiveur
  2106.                         int id_morph = -1;// On initi
  2107.                         try {// Si valeur autre quechiffre
  2108.                             id_morph = Integer.parseInt(msg.substring(
  2109.                                     command.getName().length() + 2,
  2110.                                     msg.length() - 1).trim());
  2111.                         } catch (Exception e) {
  2112.                             String list_morph = "Liste des skin :\n";
  2113.                             for (String morph_id : args.split("\\|")) {
  2114.                                 try {
  2115.                                     list_morph += "<b>"
  2116.                                             + (morph_id.contains(",") ? morph_id
  2117.                                                     .split(",")[0] : morph_id)
  2118.                                             + "</b>";
  2119.                                     if (morph_id.contains(","))
  2120.                                         list_morph += " - "
  2121.                                                 + morph_id.split(",")[1];
  2122.                                     list_morph += "\n";
  2123.                                 } catch (Exception ce) {
  2124.                                     continue;
  2125.                                 }
  2126.                             }
  2127.                             SocketManager.GAME_SEND_INBOX(_perso,
  2128.                                     "Vous devez faire ." + command.getName()
  2129.                                             + " (id de la morph)\n"
  2130.                                             + list_morph);
  2131.                             break;
  2132.                         }
  2133.                         boolean valid_morph = false;
  2134.                         for (String morph_id : args.split("\\|")) {
  2135.                             try {
  2136.                                 if (Integer
  2137.                                         .parseInt((morph_id.contains(",") ? morph_id
  2138.                                                 .split(",")[0] : morph_id)) == id_morph)
  2139.                                     valid_morph = true;
  2140.                             } catch (Exception e) {
  2141.                                 continue;
  2142.                             }
  2143.                         }
  2144.                         if (!valid_morph) {
  2145.                             String list_morph = "Liste des skin :\n";
  2146.                             for (String morph_id : args.split("\\|")) {
  2147.                                 try {
  2148.                                     list_morph += "<b>"
  2149.                                             + (morph_id.contains(",") ? morph_id
  2150.                                                     .split(",")[0] : morph_id)
  2151.                                             + "</b>";
  2152.                                     if (morph_id.contains(","))
  2153.                                         list_morph += " - "
  2154.                                                 + morph_id.split(",")[1];
  2155.                                     list_morph += "\n";
  2156.                                 } catch (Exception e) {
  2157.                                     continue;
  2158.                                 }
  2159.                             }
  2160.                             SocketManager.GAME_SEND_INBOX(_perso, list_morph);
  2161.                             break;
  2162.                         }
  2163.                         if (_perso.get_suiveur() == id_morph) {
  2164.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2165.                                     "Vous avez déjà se personnage suiveur !",
  2166.                                     AllColor.GOLD);
  2167.                             break;
  2168.                         }
  2169.                         _perso.set_suiveur(id_morph);
  2170.                         SocketManager.GAME_SEND_ALTER_GM_PACKET(
  2171.                                 _perso.get_curCarte(), _perso);
  2172.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  2173.                                 "Le personnages suiveur à bien été mit.",
  2174.                                 AllColor.GOLD);
  2175.                         break;
  2176.                      case 977: //Prestige Level
  2177.                          int prestue= _perso.getprestue();
  2178.                            if (_perso.get_lvl() < 200)
  2179.                            {
  2180.                            SocketManager.GAME_SEND_MESSAGE(_perso,"<b> Le mode prestige est accesible au niveau 205. </b>",Config.CONFIG_MOTD_COLOR);
  2181.                            return true;
  2182.                            }
  2183.                            if (_perso.getprestue() > 10)
  2184.                            {
  2185.                            SocketManager.GAME_SEND_MESSAGE(_perso,"<b> Bravo ! Vous avez atteint le prestige maximal ! </b>",Config.CONFIG_MOTD_COLOR);
  2186.                            return true;
  2187.                                          }
  2188.                            
  2189.                             int level1 = 10;
  2190.  
  2191.                             @SuppressWarnings("unused")
  2192.                             int maxLevel = 200;
  2193.                             @SuppressWarnings("unused")
  2194.                             int minLevel = 10;
  2195.                            if ((level1 > 200) || (level1 < 10))
  2196.                             {
  2197.                            String text = level1 > 200 ? "maximal" : "minimal";
  2198.                            SocketManager.GAME_SEND_MESSAGE(_perso, "<b>Valeur incorrecte</b>: le niveau " + text + " est <b>" + 200 + "</b> !", Config.CONFIG_MOTD_COLOR);
  2199.                             }
  2200.                            if (level1 < _perso.get_lvl())
  2201.                             {
  2202.                            _perso.set_lvl(level1);
  2203.                            _perso.set_curExp(World.getExpLevel(level1).perso);
  2204.                            try
  2205.                             {
  2206.                            _perso.get_baseStats().addOneStat(125, -_perso.get_baseStats().getEffect(125));
  2207.                            _perso.get_baseStats().addOneStat(124, -_perso.get_baseStats().getEffect(124));
  2208.                            _perso.get_baseStats().addOneStat(118, -_perso.get_baseStats().getEffect(118));
  2209.                            _perso.get_baseStats().addOneStat(123, -_perso.get_baseStats().getEffect(123));
  2210.                            _perso.get_baseStats().addOneStat(119, -_perso.get_baseStats().getEffect(119));
  2211.                            _perso.get_baseStats().addOneStat(126, -_perso.get_baseStats().getEffect(126));
  2212.                             }
  2213.                            catch (Exception e)
  2214.                             {
  2215.                            e.printStackTrace();
  2216.                             }
  2217.                            finally
  2218.                             {
  2219.                            _perso.addCapital((_perso.get_lvl() - 1) * 5 - _perso.get_capital());
  2220.                            _perso.addCapital(0);
  2221.                            }
  2222.                            boolean unEquip = false;
  2223.                            for (Iterator<Objects> localIterator1 = _perso.getItems().values().iterator(); localIterator1.hasNext();)
  2224.                            {
  2225.                            object = (Objects)localIterator1.next();
  2226.                            if ((object.getPosition() != -1) && (
  2227.                            ((!object.getTemplate().getConditions().equalsIgnoreCase("")) && (!ConditionParser.validConditions(_perso, object.getTemplate().getConditions()))) ||
  2228.                            (object.getTemplate().getLevel() > level1)))
  2229.                            {
  2230.                            _perso.DesequiperItem(object);
  2231.                            unEquip = true;
  2232.                              }
  2233.                            }
  2234.                            if (unEquip) {
  2235.                            SocketManager.GAME_SEND_Im_PACKET(_perso, "119|43");
  2236.                              }
  2237.                            }
  2238.                            else
  2239.                            {
  2240.                            while (_perso.get_lvl() < level1)
  2241.                            {
  2242.                            @SuppressWarnings("unused")
  2243.                         boolean unEquip;
  2244.                            @SuppressWarnings({ "unused", "rawtypes" })
  2245.                         Iterator localIterator1;
  2246.                            @SuppressWarnings("unused")
  2247.                         Objects object1;
  2248.                            _perso.levelUp(false, true);
  2249.                              }
  2250.                            }
  2251.                            if ((_perso != null) && (_perso.isOnline()))
  2252.                            {
  2253.                            SocketManager.GAME_SEND_NEW_LVL_PACKET(_perso.get_compte().getGameThread().get_out(), level1);
  2254.                            SocketManager.GAME_SEND_STATS_PACKET(_perso);
  2255.                            SocketManager.GAME_SEND_SPELL_LIST(_perso);
  2256.                            SocketManager.GAME_SEND_STATS_PACKET(_perso);
  2257.                            int actualprestige = _perso.getprestue() + 1;
  2258.                            _perso.setprestige(actualprestige);
  2259.                            
  2260.                            int titleid1 = 70 + actualprestige;
  2261.                            _perso.set_title(titleid1);                   
  2262.                         SocketManager.GAME_SEND_ALTER_GM_PACKET(_perso.get_curCarte(),
  2263.                                 _perso);
  2264.                                 SocketManager.GAME_SEND_MESSAGE(_perso, "<b>Vous venez de passer votre prestige vous ête prestige</b>: " + prestue + "!", Config.CONFIG_MOTD_COLOR);
  2265.             }
  2266.                         break; 
  2267.                     case 100:// Prestige PH
  2268.                         if (_perso.get_honor() < 18000) {
  2269.                             SocketManager
  2270.                                     .GAME_SEND_MESSAGE(
  2271.                                             _perso,
  2272.                                             "<b> Le mode prestige est accesible à partir de 18.000 PH. </b>",
  2273.                                             Config.CONFIG_MOTD_COLOR);
  2274.                             return true;
  2275.                         }
  2276.                         if (_perso.getprestue() > 4) {
  2277.                             SocketManager
  2278.                                     .GAME_SEND_MESSAGE(
  2279.                                             _perso,
  2280.                                             "<b> Bravo ! Vous avez atteint le prestige maximal ! </b>",
  2281.                                             Config.CONFIG_MOTD_COLOR);
  2282.                             return true;
  2283.                         }
  2284.                         _perso.setpoints(_perso.getpoints() + 25);
  2285.  
  2286.                         if ((_perso != null) && (_perso.isOnline())) {
  2287.                             SocketManager.GAME_SEND_STATS_PACKET(_perso);
  2288.                             int actualprestige = _perso.getprestue() + 1;
  2289.                             _perso.setprestige(actualprestige);
  2290.  
  2291.                             int titleid1 = 104 + actualprestige;
  2292.                             _perso.set_title(titleid1);
  2293.                             _perso.set_honor(0);
  2294.                             SocketManager.GAME_SEND_ALTER_GM_PACKET(
  2295.                                     _perso.get_curCarte(), _perso);
  2296.                             SocketManager
  2297.                                     .GAME_SEND_MESSAGE(
  2298.                                             _perso,
  2299.                                             "Tu vien de passer ton prestige tu vien de gagner 25 points boutique, tes points d'honneur sont desormais remis à 0!",
  2300.                                             AllColor.GOLD);
  2301.                             return true;
  2302.                         }
  2303.                         break;
  2304.                     case 799:
  2305.                        
  2306.                         if (_perso.get_fight() != null) {
  2307.                             SocketManager
  2308.                                     .GAME_SEND_MESSAGE(
  2309.                                             _perso,
  2310.                                             "Vous êtes en <b>Combat</b> , Action impossible.",
  2311.                                             "B30016");
  2312.                             return true;
  2313.                         }
  2314.                         short mapIDo = (short) Integer
  2315.                                 .parseInt(args.split(",")[0]);
  2316.                         int cellIDo = Integer.parseInt(args.split(",")[1]);
  2317.                         int niveau = Integer.parseInt(args.split(",")[2]);
  2318.                         if (_perso.get_lvl() < niveau) {
  2319.                             SocketManager
  2320.                                     .GAME_SEND_MESSAGE(
  2321.                                             _perso,
  2322.                                             "Vous n'avez pas le level <b>requis</b> pour utiliser cette commande !",
  2323.                                             AllColor.RED);
  2324.                         } else if (_perso.get_lvl() >= niveau) {
  2325.                             _perso.teleport(mapIDo, cellIDo);
  2326.                         }
  2327.                         break;
  2328.                        
  2329.                     case 45:// TAG
  2330.                         String split1;
  2331.                         String name = _perso.get_name();
  2332.                         try {
  2333.                             split1 = msg.substring(5, msg.length() - 1);
  2334.                         } catch (Exception e) {
  2335.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2336.                                     "<b>Effectuez .tag + TAG:</b>",
  2337.                                     Config.CONFIG_MOTD_COLOR);
  2338.                             return true;
  2339.                         }
  2340.                         if (split1.length() < 2 || split1.length() > 10
  2341.                                 || split1.contains("modérateur")
  2342.                                 || split1.contains("créateur")
  2343.                                 || split1.contains(" ")
  2344.                                 || split1.contains("mj")
  2345.                                 || split1.contains("staff")
  2346.                                 || split1.contains(";") || split1.contains(",")
  2347.                                 || split1.contains(":") || split1.contains("§")
  2348.                                 || split1.contains("/") || split1.contains("?")
  2349.                                 || split1.contains("STAFF")
  2350.                                 || split1.contains("'")
  2351.                                 || split1.contains("MJ")
  2352.                                 || split1.contains("animateur")
  2353.                                 || split1.contains("ANIMATEUR")
  2354.                                 || split1.contains("CREATEUR")
  2355.                                 || split1.contains("MODERATEUR")
  2356.                                 || split1.contains("[") || split1.contains("]")
  2357.                                 || split1.contains("{") || split1.contains("}")
  2358.                                 || split1.contains("<") || split1.contains("&")
  2359.                                 || name.contains("[") || split1.contains("-")
  2360.                                 || split1.contains("\"")) {
  2361.                             SocketManager
  2362.                                     .GAME_SEND_MESSAGE(
  2363.                                             _perso,
  2364.                                             "Les conditions du TAG ne sont pas acquises.",
  2365.                                             Config.CONFIG_MOTD_COLOR);
  2366.                             return true;
  2367.                         }
  2368.                         _perso.set_tag("[" + split1 + "]");
  2369.                         _perso.set_Localname(_perso.get_tag()+_perso.get_name());
  2370.                         SQLManager.SAVE_PERSONNAGE(_perso, false);
  2371.                         SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
  2372.                                 _perso.get_curCarte(), _perso.get_GUID());
  2373.                         SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
  2374.                                 _perso.get_curCarte(), _perso);
  2375.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  2376.                                 "Votre nouveau tag est : " + split1 + "",
  2377.                                 Config.CONFIG_MOTD_COLOR);
  2378.                         break;
  2379.                     // DELTAG
  2380.                     case 46:
  2381.                         _perso.set_tag("");
  2382.                         _perso.set_Localname(_perso.get_name());
  2383.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  2384.                                 "Votre TAG à bien été enlevé",
  2385.                                 Config.CONFIG_MOTD_COLOR);
  2386.                         SQLManager.SAVE_PERSONNAGE(_perso, false);
  2387.                         SocketManager.GAME_SEND_ALTER_GM_PACKET(
  2388.                                 _perso.get_curCarte(), _perso);
  2389.                         SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
  2390.                                 _perso.get_curCarte(), _perso.get_GUID());
  2391.                         SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
  2392.                                 _perso.get_curCarte(), _perso);
  2393.                         break;
  2394.                     case 72: // fm chance
  2395.                         int taman = 15;
  2396.                         String choixs = null;
  2397.                         Objects itemss = null;
  2398.                         int maispoints1 = SQLManager.GET_POINTS(_perso
  2399.                                 .getAccID());
  2400.  
  2401.                         if (_perso.get_fight() != null) {
  2402.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2403.                                     "Commande inutilisable en combat.",
  2404.                                     Config.CONFIG_MOTD_COLOR);
  2405.                             break;
  2406.                         }
  2407.  
  2408.                         if (maispoints1 < taman) {
  2409.                             SocketManager
  2410.                                     .GAME_SEND_MESSAGE(
  2411.                                             _perso,
  2412.                                             "Il te faut "
  2413.                                                     + taman
  2414.                                                     + " points pour utiliser cette commande.",
  2415.                                             Config.CONFIG_MOTD_COLOR);
  2416.                             break;
  2417.                         }
  2418.  
  2419.                         try {
  2420.                             choixs = msg.substring(
  2421.                                     command.getName().length() + 2,
  2422.                                     msg.length() - 1);
  2423.                         } catch (Exception e) {
  2424.                             SocketManager
  2425.                                     .GAME_SEND_MESSAGE(
  2426.                                             _perso,
  2427.                                             "Liste (Faites .fmchance + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
  2428.                                             Config.CONFIG_MOTD_COLOR);
  2429.                             return true;
  2430.                         }
  2431.  
  2432.                         if (choixs.equalsIgnoreCase("Coiffe")) {
  2433.                             itemss = _perso
  2434.                                     .getObjetByPos(Constant.ITEM_POS_COIFFE);
  2435.                         } else if (choixs.equalsIgnoreCase("Cape")) {
  2436.                             itemss = _perso
  2437.                                     .getObjetByPos(Constant.ITEM_POS_CAPE);
  2438.                         } else if (choixs.equalsIgnoreCase("AnneauDroite")) {
  2439.                             itemss = _perso
  2440.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
  2441.                         } else if (choixs.equalsIgnoreCase("AnneauGauche")) {
  2442.                             itemss = _perso
  2443.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
  2444.                         } else if (choixs.equalsIgnoreCase("Ceinture")) {
  2445.                             itemss = _perso
  2446.                                     .getObjetByPos(Constant.ITEM_POS_CEINTURE);
  2447.                         } else if (choixs.equalsIgnoreCase("Bottes")) {
  2448.                             itemss = _perso
  2449.                                     .getObjetByPos(Constant.ITEM_POS_BOTTES);
  2450.                         } else if (choixs.equalsIgnoreCase("Amulette")) {
  2451.                             itemss = _perso
  2452.                                     .getObjetByPos(Constant.ITEM_POS_AMULETTE);
  2453.                         } else if (choixs.equalsIgnoreCase("Familier")) {
  2454.                             itemss = _perso
  2455.                                     .getObjetByPos(Constant.ITEM_POS_FAMILIER);
  2456.                         } else if (choixs.equalsIgnoreCase("Cac")) {
  2457.                             itemss = _perso
  2458.                                     .getObjetByPos(Constant.ITEM_POS_ARME);
  2459.                         }
  2460.  
  2461.                         else if (itemss == null) {
  2462.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2463.                                     "Vous ne portez pas l'item.",
  2464.                                     Config.CONFIG_MOTD_COLOR);
  2465.                             return true;
  2466.                         }
  2467.                         int id44 = ((Objects) itemss).getTemplate().getLevel();
  2468.                         int id1 = ((Objects) itemss).getStats().getEffect(123);
  2469.                         if (id1 > 29 && id44 < 30) {
  2470.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2471.                                     "Ton Item donne déjà  30 chance.",
  2472.                                     Config.CONFIG_MOTD_COLOR);
  2473.                             return true;
  2474.                         }
  2475.                         if (id1 > 59 && id44 < 100) {
  2476.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2477.                                     "Ton Item donne déjà  60 chance.",
  2478.                                     Config.CONFIG_MOTD_COLOR);
  2479.                             return true;
  2480.                         }
  2481.                         if (id1 > 79 && id44 < 149) {
  2482.                             SocketManager
  2483.                                     .GAME_SEND_MESSAGE(
  2484.                                             _perso,
  2485.                                             "Ton Item donne déjà  80 chance ou dans un autre élement.",
  2486.                                             Config.CONFIG_MOTD_COLOR);
  2487.                             return true;
  2488.                         }
  2489.                         if (id1 > 79 && id44 <= 149) {
  2490.                             SocketManager
  2491.                                     .GAME_SEND_MESSAGE(
  2492.                                             _perso,
  2493.                                             "Ton Item donne déjà  80 chance ou dans un autre élement.",
  2494.                                             Config.CONFIG_MOTD_COLOR);
  2495.                             return true;
  2496.                         }
  2497.                         if (id1 > 99 && id44 > 149) {
  2498.                             SocketManager
  2499.                                     .GAME_SEND_MESSAGE(
  2500.                                             _perso,
  2501.                                             "Ton Item donne déjà  100 chance ou dans un autre élement.",
  2502.                                             Config.CONFIG_MOTD_COLOR);
  2503.                             return true;
  2504.                         }
  2505.                         int newspoints1 = maispoints1 - taman;
  2506.                         SQLManager.UPDATE_ACCOUNT_point(newspoints1,
  2507.                                 _perso.getAccID());
  2508.                         ((Objects) itemss).getStats().addOneStat(123, 10);
  2509.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  2510.                         SocketManager
  2511.                                 .GAME_SEND_MESSAGE(
  2512.                                         _perso,
  2513.                                         "Votre "
  2514.                                                 + ((Objects) itemss)
  2515.                                                         .getTemplate()
  2516.                                                         .getName()
  2517.                                                 + " donne désormais +10 chance ! penser a deco/reco pour voir les effect.",
  2518.                                         Config.CONFIG_MOTD_COLOR);
  2519.                         return true;
  2520.                     case 975:// Echange koli For fun!                  
  2521.                     {
  2522.                         if ((_perso != null) && (_perso.isOnline()))
  2523.                             if (!_perso.hasItemTemplate(100111, 100)) {
  2524.                                 SocketManager
  2525.                                         .GAME_SEND_MESSAGE(
  2526.                                                 _perso,
  2527.                                                 "Il vous faut 100 Kolizetons pour effectuée  cette commande.",
  2528.                                                 AllColor.GOLD);
  2529.                                 break;
  2530.                             }
  2531.                         if ((_perso != null) && (_perso.isOnline()))
  2532.                             _perso.removeByTemplateID(100111, 100);
  2533.                         SocketManager
  2534.                                 .GAME_SEND_MESSAGE(
  2535.                                         _perso,
  2536.                                         "Vous venez de perdre 100 kolizetons pour  50 points boutique. ",
  2537.                                         AllColor.GOLD);
  2538.                        
  2539.                     }
  2540.                         _perso.setpoints(_perso.getpoints() + 50);
  2541.  
  2542.                         if ((_perso != null) && (_perso.isOnline()))
  2543.                             break;
  2544.                     case 42:// addLvl
  2545.                         int lvl = 0;
  2546.  
  2547.                         try {
  2548.                             lvl = Integer.parseInt(msg.substring(
  2549.                                     command.getName().length() + 2,
  2550.                                     msg.length() - 1).trim());
  2551.                         } catch (Exception e) {
  2552.                             if (_perso.get_lvl() < 100) {
  2553.                                 _perso.levelUp(false, true);
  2554.                             }
  2555.                             if (_perso.isOnline()) {
  2556.                                 if (lvl < 0)
  2557.                                     break;
  2558.                                 SocketManager.GAME_SEND_SPELL_LIST(_perso);
  2559.                                 SocketManager.GAME_SEND_NEW_LVL_PACKET(
  2560.                                         _perso.get_compte().getGameThread()
  2561.                                                 .get_out(), _perso.get_lvl());
  2562.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  2563.                                         "<b>Votre lvl à bien etait mis!</b>",
  2564.                                         Config.CONFIG_MOTD_COLOR);
  2565.                                 SocketManager.GAME_SEND_STATS_PACKET(_perso);
  2566.                             }
  2567.                         }
  2568.                         break;
  2569.                     case 925: //morphitem2
  2570.                         try {
  2571.                               msg.substring(
  2572.                                     command.getName().length() + 2,
  2573.                                     msg.length() - 1);
  2574.                         } catch (Exception e) {
  2575.                             SocketManager
  2576.                                     .GAME_SEND_MESSAGE(
  2577.                                             _perso,
  2578.                                             "faite .morphteim (IDITEM qui a les stats) (IDITEM aparence) et encore une fois (IDITEM aparence).",
  2579.                                             Config.CONFIG_MOTD_COLOR);
  2580.                             return true;
  2581.                         }
  2582.                         int Item1 = 0;
  2583.                         int Item2 = 0;
  2584.                         int maispoints756451523549661 = SQLManager.GET_POINTS(_perso
  2585.                                 .getAccID());
  2586.                         int taman756451523549661 = 100;
  2587.  
  2588.                         if (_perso.get_fight() != null) {
  2589.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2590.                                     "Commande inutilisable en combat.",
  2591.                                     Config.CONFIG_MOTD_COLOR);
  2592.                             break;
  2593.                         }
  2594.                        
  2595.                         try {
  2596.                             Item1 = Integer.parseInt(msg.split(" ")[1]);// solomonk
  2597.                             Item2 = Integer.parseInt(msg.split(" ")[2]); //piou
  2598.                         }catch (Exception e){
  2599.                             String mess = "Votre morphitem n'ai pas valide!";
  2600.                             SocketManager.GAME_SEND_MESSAGE(_perso, mess, Config.CONFIG_MOTD_COLOR);
  2601.                             break;
  2602.                         };
  2603.                        
  2604.                         ObjTemplate temp = World.getObjTemplate(Item1);
  2605.                         Objects morphitem1 = temp.createNewMorphItem(Item1, Item2);
  2606.  
  2607.                        
  2608.                         if(temp.getType() != morphitem1.getTemplate().getType()) {
  2609.  
  2610.                             SocketManager.GAME_SEND_MESSAGE(_perso, "Vous ne pouvez pas morphitem un item de type different", Config.CONFIG_MOTD_COLOR);
  2611.                             break;
  2612.                         }
  2613.                         if(_perso.addObjet(morphitem1, true))
  2614.                             World.addObjet(morphitem1, true);
  2615.  
  2616.                         String mess = "Morphitem généré.";
  2617.                         SocketManager.GAME_SEND_MESSAGE(_perso, mess, Config.CONFIG_MOTD_COLOR);
  2618.                         SocketManager.GAME_SEND_Ow_PACKET(_perso);
  2619.                         int newspoints756451523549661 = maispoints756451523549661 - taman756451523549661;
  2620.                         SQLManager.UPDATE_ACCOUNT_point(newspoints756451523549661,
  2621.                                 _perso.getAccID());
  2622.                         break;
  2623.                     case 76: //fm soin
  2624.                         int taman1 = 15;
  2625.                         String choixs1 = null;
  2626.                         Objects itemss1 = null;
  2627.                         int maispoints11 = SQLManager.GET_POINTS(_perso
  2628.                                 .getAccID());
  2629.  
  2630.                         if (_perso.get_fight() != null) {
  2631.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2632.                                     "Commande inutilisable en combat.",
  2633.                                     Config.CONFIG_MOTD_COLOR);
  2634.                             break;
  2635.                         }
  2636.  
  2637.                         if (maispoints11 < taman1) {
  2638.                             SocketManager
  2639.                                     .GAME_SEND_MESSAGE(
  2640.                                             _perso,
  2641.                                             "Il te faut "
  2642.                                                     + taman1
  2643.                                                     + " points pour utiliser cette commande.",
  2644.                                             Config.CONFIG_MOTD_COLOR);
  2645.                             break;
  2646.                         }
  2647.  
  2648.                         try {
  2649.                             choixs1 = msg.substring(
  2650.                                     command.getName().length() + 2,
  2651.                                     msg.length() - 1);
  2652.                         } catch (Exception e) {
  2653.                             SocketManager
  2654.                                     .GAME_SEND_MESSAGE(
  2655.                                             _perso,
  2656.                                             "Liste (Faites .fmsoin + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
  2657.                                             Config.CONFIG_MOTD_COLOR);
  2658.                             return true;
  2659.                         }
  2660.  
  2661.                         if (choixs1.equalsIgnoreCase("Coiffe")) {
  2662.                             itemss1 = _perso
  2663.                                     .getObjetByPos(Constant.ITEM_POS_COIFFE);
  2664.                         } else if (choixs1.equalsIgnoreCase("Cape")) {
  2665.                             itemss1 = _perso
  2666.                                     .getObjetByPos(Constant.ITEM_POS_CAPE);
  2667.                         } else if (choixs1.equalsIgnoreCase("AnneauDroite")) {
  2668.                             itemss1 = _perso
  2669.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
  2670.                         } else if (choixs1.equalsIgnoreCase("AnneauGauche")) {
  2671.                             itemss1 = _perso
  2672.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
  2673.                         } else if (choixs1.equalsIgnoreCase("Ceinture")) {
  2674.                             itemss1 = _perso
  2675.                                     .getObjetByPos(Constant.ITEM_POS_CEINTURE);
  2676.                         } else if (choixs1.equalsIgnoreCase("Bottes")) {
  2677.                             itemss1 = _perso
  2678.                                     .getObjetByPos(Constant.ITEM_POS_BOTTES);
  2679.                         } else if (choixs1.equalsIgnoreCase("Amulette")) {
  2680.                             itemss1 = _perso
  2681.                                     .getObjetByPos(Constant.ITEM_POS_AMULETTE);
  2682.                         } else if (choixs1.equalsIgnoreCase("Familier")) {
  2683.                             itemss1 = _perso
  2684.                                     .getObjetByPos(Constant.ITEM_POS_FAMILIER);
  2685.                         } else if (choixs1.equalsIgnoreCase("Cac")) {
  2686.                             itemss1 = _perso
  2687.                                     .getObjetByPos(Constant.ITEM_POS_ARME);
  2688.                         }
  2689.  
  2690.                         else if (itemss1 == null) {
  2691.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2692.                                     "Vous ne portez pas l'item.",
  2693.                                     Config.CONFIG_MOTD_COLOR);
  2694.                             return true;
  2695.                         }
  2696.                         int id111 = ((Objects) itemss1).getStats().getEffect(
  2697.                                 178);
  2698.                         if (id111 > 4) {
  2699.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2700.                                     "Ton Item donne déjà  5 soins.",
  2701.                                     Config.CONFIG_MOTD_COLOR);
  2702.                             return true;
  2703.                         }
  2704.                         int newspoints11 = maispoints11 - taman1;
  2705.                         SQLManager.UPDATE_ACCOUNT_point(newspoints11,
  2706.                                 _perso.getAccID());
  2707.                         ((Objects) itemss1).getStats().addOneStat(178, 5);
  2708.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  2709.                         SocketManager
  2710.                                 .GAME_SEND_MESSAGE(
  2711.                                         _perso,
  2712.                                         "Votre "
  2713.                                                 + ((Objects) itemss1)
  2714.                                                         .getTemplate()
  2715.                                                         .getName()
  2716.                                                 + " donne désormais +5 soins ! penser a deco/reco pour voir les effect.",
  2717.                                         Config.CONFIG_MOTD_COLOR);
  2718.                         return true;
  2719.                     case 75: // fm init
  2720.                         int taman1111 = 15;
  2721.                         String choixs1111 = null;
  2722.                         Objects itemss1111 = null;
  2723.                         int maispoints11111 = SQLManager.GET_POINTS(_perso
  2724.                                 .getAccID());
  2725.  
  2726.                         if (_perso.get_fight() != null) {
  2727.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2728.                                     "Commande inutilisable en combat.",
  2729.                                     Config.CONFIG_MOTD_COLOR);
  2730.                             break;
  2731.                         }
  2732.  
  2733.                         if (maispoints11111 < taman1111) {
  2734.                             SocketManager
  2735.                                     .GAME_SEND_MESSAGE(
  2736.                                             _perso,
  2737.                                             "Il te faut "
  2738.                                                     + taman1111
  2739.                                                     + " points pour utiliser cette commande.",
  2740.                                             Config.CONFIG_MOTD_COLOR);
  2741.                             break;
  2742.                         }
  2743.  
  2744.                         try {
  2745.                             choixs1111 = msg.substring(command.getName()
  2746.                                     .length() + 2, msg.length() - 1);
  2747.                         } catch (Exception e) {
  2748.                             SocketManager
  2749.                                     .GAME_SEND_MESSAGE(
  2750.                                             _perso,
  2751.                                             "Liste (Faites .init + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
  2752.                                             Config.CONFIG_MOTD_COLOR);
  2753.                             return true;
  2754.                         }
  2755.  
  2756.                         if (choixs1111.equalsIgnoreCase("Coiffe")) {
  2757.                             itemss1111 = _perso
  2758.                                     .getObjetByPos(Constant.ITEM_POS_COIFFE);
  2759.                         } else if (choixs1111.equalsIgnoreCase("Cape")) {
  2760.                             itemss1111 = _perso
  2761.                                     .getObjetByPos(Constant.ITEM_POS_CAPE);
  2762.                         } else if (choixs1111.equalsIgnoreCase("AnneauDroite")) {
  2763.                             itemss1111 = _perso
  2764.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
  2765.                         } else if (choixs1111.equalsIgnoreCase("AnneauGauche")) {
  2766.                             itemss1111 = _perso
  2767.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
  2768.                         } else if (choixs1111.equalsIgnoreCase("Ceinture")) {
  2769.                             itemss1111 = _perso
  2770.                                     .getObjetByPos(Constant.ITEM_POS_CEINTURE);
  2771.                         } else if (choixs1111.equalsIgnoreCase("Bottes")) {
  2772.                             itemss1111 = _perso
  2773.                                     .getObjetByPos(Constant.ITEM_POS_BOTTES);
  2774.                         } else if (choixs1111.equalsIgnoreCase("Amulette")) {
  2775.                             itemss1111 = _perso
  2776.                                     .getObjetByPos(Constant.ITEM_POS_AMULETTE);
  2777.                         } else if (choixs1111.equalsIgnoreCase("Familier")) {
  2778.                             itemss1111 = _perso
  2779.                                     .getObjetByPos(Constant.ITEM_POS_FAMILIER);
  2780.                         } else if (choixs1111.equalsIgnoreCase("Cac")) {
  2781.                             itemss1111 = _perso
  2782.                                     .getObjetByPos(Constant.ITEM_POS_ARME);
  2783.                         }
  2784.  
  2785.                         else if (itemss1111 == null) {
  2786.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2787.                                     "Vous ne portez pas l'item.",
  2788.                                     Config.CONFIG_MOTD_COLOR);
  2789.                             return true;
  2790.                         }
  2791.                         int id999 = ((Objects) itemss1111).getTemplate()
  2792.                                 .getLevel();
  2793.                         int id9999 = ((Objects) itemss1111).getStats()
  2794.                                 .getEffect(174);
  2795.                         if (id9999 > 29 && id999 < 30) {
  2796.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2797.                                     "Ton Item donne déjà  30 init.",
  2798.                                     Config.CONFIG_MOTD_COLOR);
  2799.                             return true;
  2800.                         }
  2801.                         if (id9999 > 49 && id999 < 100) {
  2802.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2803.                                     "Ton Item donne déjà  50 init.",
  2804.                                     Config.CONFIG_MOTD_COLOR);
  2805.                             return true;
  2806.                         }
  2807.                         if (id9999 > 149 && id999 < 149) {
  2808.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2809.                                     "Ton Item donne déjà  150 init.",
  2810.                                     Config.CONFIG_MOTD_COLOR);
  2811.                             return true;
  2812.                         }
  2813.                         if (id9999 > 149 && id999 <= 149) {
  2814.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2815.                                     "Ton Item donne déjà  150 init.",
  2816.                                     Config.CONFIG_MOTD_COLOR);
  2817.                             return true;
  2818.                         }
  2819.                         if (id9999 > 199 && id999 > 149) {
  2820.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2821.                                     "Ton Item donne déjà  200 init.",
  2822.                                     Config.CONFIG_MOTD_COLOR);
  2823.                             return true;
  2824.                         }
  2825.                         int newspoints11111 = maispoints11111 - taman1111;
  2826.                         SQLManager.UPDATE_ACCOUNT_point(newspoints11111,
  2827.                                 _perso.getAccID());
  2828.                         ((Objects) itemss1111).getStats().addOneStat(174, 10);
  2829.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  2830.                         SocketManager
  2831.                                 .GAME_SEND_MESSAGE(
  2832.                                         _perso,
  2833.                                         "Votre "
  2834.                                                 + ((Objects) itemss1111)
  2835.                                                         .getTemplate()
  2836.                                                         .getName()
  2837.                                                 + " donne désormais +10 init ! penser a deco/reco pour voir les effect.",
  2838.                                         Config.CONFIG_MOTD_COLOR);
  2839.                         return true;
  2840.                     case 966: // Commandes de choix levels.
  2841.                         // Buldo nique ta mere
  2842.                         // patou nique ton zder!
  2843.                         try {
  2844.                             level = Integer.parseInt(msg.substring(
  2845.                                     command.getName().length() + 2,
  2846.                                     msg.length() - 1).trim());
  2847.                             if (_perso.hasItemTemplate(683, 1))
  2848.                             if (level < 1)
  2849.                                 level = 1;
  2850.                             if (level < _perso.get_lvl())
  2851.                                 level = _perso.get_lvl();
  2852.                            
  2853.                             if (_perso.get_lvl() < level) {
  2854.                                 while (_perso.get_lvl() < level) {
  2855.                                     _perso.levelUp(false, true);
  2856.                                 }
  2857.                                 if (_perso.isOnline()) {
  2858.                                     SocketManager.GAME_SEND_SPELL_LIST(_perso);
  2859.                                     SocketManager.GAME_SEND_NEW_LVL_PACKET(
  2860.                                             _perso.get_compte().getGameThread()
  2861.                                                     .get_out(),
  2862.                                             _perso.get_lvl());
  2863.                                     SocketManager
  2864.                                             .GAME_SEND_STATS_PACKET(_perso);
  2865.                                 }
  2866.                             }
  2867.                             String mess1 = "Vous êtes maintenant niveau "
  2868.                                     + level + "";
  2869.                             SocketManager.GAME_SEND_MESSAGE(_perso, mess1,
  2870.                                     Config.CONFIG_MOTD_COLOR);
  2871.                             return true;
  2872.                         } catch (Exception e) {
  2873.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2874.                                     "Valeur incorrect.",
  2875.                                     Config.CONFIG_MOTD_COLOR);
  2876.                             return true;
  2877.                         }  
  2878.                     case 920: // Commandes de choix levels.
  2879.                         // Buldo nique ta mere
  2880.                         // patou nique ton zder!
  2881.                         try {
  2882.                             level = Integer.parseInt(msg.substring(
  2883.                                     command.getName().length() + 2,
  2884.                                     msg.length() - 1).trim());
  2885.                             if (_perso.hasItemTemplate(683, 1))
  2886.                             if (level < 1)
  2887.                                 level = 1;
  2888.                             if (level < _perso.get_lvl())
  2889.                                 level = _perso.get_lvl();
  2890.                             if (_perso.get_lvl() < level) {
  2891.                                 while (_perso.get_lvl() < level) {
  2892.                                     _perso.levelUp(false, true);
  2893.                                 }
  2894.                                 if (_perso.isOnline()) {
  2895.                                     SocketManager.GAME_SEND_SPELL_LIST(_perso);
  2896.                                     SocketManager.GAME_SEND_NEW_LVL_PACKET(
  2897.                                             _perso.get_compte().getGameThread()
  2898.                                                     .get_out(),
  2899.                                             _perso.get_lvl());
  2900.                                     SocketManager
  2901.                                             .GAME_SEND_STATS_PACKET(_perso);
  2902.                                 }
  2903.                             }
  2904.                             String mess1 = "Vous êtes maintenant niveau "
  2905.                                     + level + "";
  2906.                             SocketManager.GAME_SEND_MESSAGE(_perso, mess1,
  2907.                                     Config.CONFIG_MOTD_COLOR);
  2908.                             return true;
  2909.                         } catch (Exception e) {
  2910.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2911.                                     "Valeur incorrect.",
  2912.                                     Config.CONFIG_MOTD_COLOR);
  2913.                             return true;
  2914.                         }
  2915.                     case 74: // fm agi
  2916.                         int taman111 = 15;
  2917.                         String choixs111 = null;
  2918.                         Objects itemss111 = null;
  2919.                         int maispoints1111 = SQLManager.GET_POINTS(_perso
  2920.                                 .getAccID());
  2921.  
  2922.                         if (_perso.get_fight() != null) {
  2923.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2924.                                     "Commande inutilisable en combat.",
  2925.                                     Config.CONFIG_MOTD_COLOR);
  2926.                             break;
  2927.                         }
  2928.  
  2929.                         if (maispoints1111 < taman111) {
  2930.                             SocketManager
  2931.                                     .GAME_SEND_MESSAGE(
  2932.                                             _perso,
  2933.                                             "Il te faut "
  2934.                                                     + taman111
  2935.                                                     + " points pour utiliser cette commande.",
  2936.                                             Config.CONFIG_MOTD_COLOR);
  2937.                             break;
  2938.                         }
  2939.  
  2940.                         try {
  2941.                             choixs111 = msg.substring(command.getName()
  2942.                                     .length() + 2, msg.length() - 1);
  2943.                         } catch (Exception e) {
  2944.                             SocketManager
  2945.                                     .GAME_SEND_MESSAGE(
  2946.                                             _perso,
  2947.                                             "Liste (Faites .fmagi + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
  2948.                                             Config.CONFIG_MOTD_COLOR);
  2949.                             return true;
  2950.                         }
  2951.  
  2952.                         if (choixs111.equalsIgnoreCase("Coiffe")) {
  2953.                             itemss111 = _perso
  2954.                                     .getObjetByPos(Constant.ITEM_POS_COIFFE);
  2955.                         } else if (choixs111.equalsIgnoreCase("Cape")) {
  2956.                             itemss111 = _perso
  2957.                                     .getObjetByPos(Constant.ITEM_POS_CAPE);
  2958.                         } else if (choixs111.equalsIgnoreCase("AnneauDroite")) {
  2959.                             itemss111 = _perso
  2960.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
  2961.                         } else if (choixs111.equalsIgnoreCase("AnneauGauche")) {
  2962.                             itemss111 = _perso
  2963.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
  2964.                         } else if (choixs111.equalsIgnoreCase("Ceinture")) {
  2965.                             itemss111 = _perso
  2966.                                     .getObjetByPos(Constant.ITEM_POS_CEINTURE);
  2967.                         } else if (choixs111.equalsIgnoreCase("Bottes")) {
  2968.                             itemss111 = _perso
  2969.                                     .getObjetByPos(Constant.ITEM_POS_BOTTES);
  2970.                         } else if (choixs111.equalsIgnoreCase("Amulette")) {
  2971.                             itemss111 = _perso
  2972.                                     .getObjetByPos(Constant.ITEM_POS_AMULETTE);
  2973.                         } else if (choixs111.equalsIgnoreCase("Familier")) {
  2974.                             itemss111 = _perso
  2975.                                     .getObjetByPos(Constant.ITEM_POS_FAMILIER);
  2976.                         } else if (choixs111.equalsIgnoreCase("Cac")) {
  2977.                             itemss111 = _perso
  2978.                                     .getObjetByPos(Constant.ITEM_POS_ARME);
  2979.                         }
  2980.  
  2981.                         else if (itemss111 == null) {
  2982.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2983.                                     "Vous ne portez pas l'item.",
  2984.                                     Config.CONFIG_MOTD_COLOR);
  2985.                             return true;
  2986.                         }
  2987.                         int id33 = ((Objects) itemss111).getTemplate()
  2988.                                 .getLevel();
  2989.                         int id666 = ((Objects) itemss111).getStats().getEffect(
  2990.                                 119);
  2991.                         if (id666 > 29 && id33 < 30) {
  2992.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2993.                                     "Ton Item donne déjà  30 agi.",
  2994.                                     Config.CONFIG_MOTD_COLOR);
  2995.                             return true;
  2996.                         }
  2997.                         if (id666 > 49 && id33 < 100) {
  2998.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  2999.                                     "Ton Item donne déjà  50 agi.",
  3000.                                     Config.CONFIG_MOTD_COLOR);
  3001.                             return true;
  3002.                         }
  3003.                         if (id666 > 79 && id33 < 149) {
  3004.                             SocketManager
  3005.                                     .GAME_SEND_MESSAGE(
  3006.                                             _perso,
  3007.                                             "Ton Item donne déjà  80 agi ou dans un autre élement.",
  3008.                                             Config.CONFIG_MOTD_COLOR);
  3009.                             return true;
  3010.                         }
  3011.                         if (id666 > 79 && id33 <= 149) {
  3012.                             SocketManager
  3013.                                     .GAME_SEND_MESSAGE(
  3014.                                             _perso,
  3015.                                             "Ton Item donne déjà  80 agi ou dans un autre élement.",
  3016.                                             Config.CONFIG_MOTD_COLOR);
  3017.                             return true;
  3018.                         }
  3019.                         if (id666 > 99 && id33 > 149) {
  3020.                             SocketManager
  3021.                                     .GAME_SEND_MESSAGE(
  3022.                                             _perso,
  3023.                                             "Ton Item donne déjà  100 agi ou dans un autre élement.",
  3024.                                             Config.CONFIG_MOTD_COLOR);
  3025.                             return true;
  3026.                         }
  3027.                         int newspoints1111 = maispoints1111 - taman111;
  3028.                         SQLManager.UPDATE_ACCOUNT_point(newspoints1111,
  3029.                                 _perso.getAccID());
  3030.                         ((Objects) itemss111).getStats().addOneStat(119, 10);
  3031.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  3032.                         SocketManager
  3033.                                 .GAME_SEND_MESSAGE(
  3034.                                         _perso,
  3035.                                         "Votre "
  3036.                                                 + ((Objects) itemss111)
  3037.                                                         .getTemplate()
  3038.                                                         .getName()
  3039.                                                 + " donne désormais +10 agi ! penser a deco/reco pour voir les effect.",
  3040.                                         Config.CONFIG_MOTD_COLOR);
  3041.                         return true;
  3042.                     case 73: // fm vita
  3043.                         int taman11111 = 15;
  3044.                         String choixs11111 = null;
  3045.                         Objects itemss11111 = null;
  3046.                         int maispoints111111 = SQLManager.GET_POINTS(_perso
  3047.                                 .getAccID());
  3048.  
  3049.                         if (_perso.get_fight() != null) {
  3050.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3051.                                     "Commande inutilisable en combat.",
  3052.                                     Config.CONFIG_MOTD_COLOR);
  3053.                             break;
  3054.                         }
  3055.  
  3056.                         if (maispoints111111 < taman11111) {
  3057.                             SocketManager
  3058.                                     .GAME_SEND_MESSAGE(
  3059.                                             _perso,
  3060.                                             "Il te faut "
  3061.                                                     + taman11111
  3062.                                                     + " points pour utiliser cette commande.",
  3063.                                             Config.CONFIG_MOTD_COLOR);
  3064.                             break;
  3065.                         }
  3066.  
  3067.                         try {
  3068.                             choixs11111 = msg.substring(command.getName()
  3069.                                     .length() + 2, msg.length() - 1);
  3070.                         } catch (Exception e) {
  3071.                             SocketManager
  3072.                                     .GAME_SEND_MESSAGE(
  3073.                                             _perso,
  3074.                                             "Liste (Faites .fmvita + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
  3075.                                             Config.CONFIG_MOTD_COLOR);
  3076.                             return true;
  3077.                         }
  3078.  
  3079.                         if (choixs11111.equalsIgnoreCase("Coiffe")) {
  3080.                             itemss11111 = _perso
  3081.                                     .getObjetByPos(Constant.ITEM_POS_COIFFE);
  3082.                         } else if (choixs11111.equalsIgnoreCase("Cape")) {
  3083.                             itemss11111 = _perso
  3084.                                     .getObjetByPos(Constant.ITEM_POS_CAPE);
  3085.                         } else if (choixs11111.equalsIgnoreCase("AnneauDroite")) {
  3086.                             itemss11111 = _perso
  3087.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
  3088.                         } else if (choixs11111.equalsIgnoreCase("AnneauGauche")) {
  3089.                             itemss11111 = _perso
  3090.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
  3091.                         } else if (choixs11111.equalsIgnoreCase("Ceinture")) {
  3092.                             itemss11111 = _perso
  3093.                                     .getObjetByPos(Constant.ITEM_POS_CEINTURE);
  3094.                         } else if (choixs11111.equalsIgnoreCase("Bottes")) {
  3095.                             itemss11111 = _perso
  3096.                                     .getObjetByPos(Constant.ITEM_POS_BOTTES);
  3097.                         } else if (choixs11111.equalsIgnoreCase("Amulette")) {
  3098.                             itemss11111 = _perso
  3099.                                     .getObjetByPos(Constant.ITEM_POS_AMULETTE);
  3100.                         } else if (choixs11111.equalsIgnoreCase("Familier")) {
  3101.                             itemss11111 = _perso
  3102.                                     .getObjetByPos(Constant.ITEM_POS_FAMILIER);
  3103.                         } else if (choixs11111.equalsIgnoreCase("Cac")) {
  3104.                             itemss11111 = _perso
  3105.                                     .getObjetByPos(Constant.ITEM_POS_ARME);
  3106.                         }
  3107.  
  3108.                         else if (itemss11111 == null) {
  3109.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3110.                                     "Vous ne portez pas l'item.",
  3111.                                     Config.CONFIG_MOTD_COLOR);
  3112.                             return true;
  3113.                         }
  3114.                         int id1000 = ((Objects) itemss11111).getTemplate()
  3115.                                 .getLevel();
  3116.                         int id100 = ((Objects) itemss11111).getStats()
  3117.                                 .getEffect(125);
  3118.                         if (id100 > 49 && id1000 < 30) {
  3119.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3120.                                     "Ton Item donne déjà  50 vita.",
  3121.                                     Config.CONFIG_MOTD_COLOR);
  3122.                             return true;
  3123.                         }
  3124.                         if (id100 > 79 && id1000 < 100) {
  3125.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3126.                                     "Ton Item donne déjà  80 vita.",
  3127.                                     Config.CONFIG_MOTD_COLOR);
  3128.                             return true;
  3129.                         }
  3130.                         if (id100 > 149 && id1000 < 149) {
  3131.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3132.                                     "Ton Item donne déjà  150 vita.",
  3133.                                     Config.CONFIG_MOTD_COLOR);
  3134.                             return true;
  3135.                         }
  3136.                         if (id100 > 149 && id1000 <= 149) {
  3137.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3138.                                     "Ton Item donne déjà  150 vita.",
  3139.                                     Config.CONFIG_MOTD_COLOR);
  3140.                             return true;
  3141.                         }
  3142.                         if (id100 > 199 && id1000 > 149) {
  3143.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3144.                                     "Ton Item donne déjà  200 vita.",
  3145.                                     Config.CONFIG_MOTD_COLOR);
  3146.                             return true;
  3147.                         }
  3148.                         int newspoints111111 = maispoints111111 - taman11111;
  3149.                         SQLManager.UPDATE_ACCOUNT_point(newspoints111111,
  3150.                                 _perso.getAccID());
  3151.                         ((Objects) itemss11111).getStats().addOneStat(125, 10);
  3152.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  3153.                         SocketManager
  3154.                                 .GAME_SEND_MESSAGE(
  3155.                                         _perso,
  3156.                                         "Votre "
  3157.                                                 + ((Objects) itemss11111)
  3158.                                                         .getTemplate()
  3159.                                                         .getName()
  3160.                                                 + " donne désormais +10 vita ! penser a deco/reco pour voir les effect.",
  3161.                                         Config.CONFIG_MOTD_COLOR);
  3162.                         return true;
  3163.                     case 71: // fm force
  3164.                         int taman111111 = 15;
  3165.                         String choixs111111 = null;
  3166.                         Objects itemss111111 = null;
  3167.                         int maispoints1111111 = SQLManager.GET_POINTS(_perso
  3168.                                 .getAccID());
  3169.  
  3170.                         if (_perso.get_fight() != null) {
  3171.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3172.                                     "Commande inutilisable en combat.",
  3173.                                     Config.CONFIG_MOTD_COLOR);
  3174.                             break;
  3175.                         }
  3176.  
  3177.                         if (maispoints1111111 < taman111111) {
  3178.                             SocketManager
  3179.                                     .GAME_SEND_MESSAGE(
  3180.                                             _perso,
  3181.                                             "Il te faut "
  3182.                                                     + taman111111
  3183.                                                     + " points pour utiliser cette commande.",
  3184.                                             Config.CONFIG_MOTD_COLOR);
  3185.                             break;
  3186.                         }
  3187.  
  3188.                         try {
  3189.                             choixs111111 = msg.substring(command.getName()
  3190.                                     .length() + 2, msg.length() - 1);
  3191.                         } catch (Exception e) {
  3192.                             SocketManager
  3193.                                     .GAME_SEND_MESSAGE(
  3194.                                             _perso,
  3195.                                             "Liste (Faites .fmforce + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
  3196.                                             Config.CONFIG_MOTD_COLOR);
  3197.                             return true;
  3198.                         }
  3199.  
  3200.                         if (choixs111111.equalsIgnoreCase("Coiffe")) {
  3201.                             itemss111111 = _perso
  3202.                                     .getObjetByPos(Constant.ITEM_POS_COIFFE);
  3203.                         } else if (choixs111111.equalsIgnoreCase("Cape")) {
  3204.                             itemss111111 = _perso
  3205.                                     .getObjetByPos(Constant.ITEM_POS_CAPE);
  3206.                         } else if (choixs111111
  3207.                                 .equalsIgnoreCase("AnneauDroite")) {
  3208.                             itemss111111 = _perso
  3209.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
  3210.                         } else if (choixs111111
  3211.                                 .equalsIgnoreCase("AnneauGauche")) {
  3212.                             itemss111111 = _perso
  3213.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
  3214.                         } else if (choixs111111.equalsIgnoreCase("Ceinture")) {
  3215.                             itemss111111 = _perso
  3216.                                     .getObjetByPos(Constant.ITEM_POS_CEINTURE);
  3217.                         } else if (choixs111111.equalsIgnoreCase("Bottes")) {
  3218.                             itemss111111 = _perso
  3219.                                     .getObjetByPos(Constant.ITEM_POS_BOTTES);
  3220.                         } else if (choixs111111.equalsIgnoreCase("Amulette")) {
  3221.                             itemss111111 = _perso
  3222.                                     .getObjetByPos(Constant.ITEM_POS_AMULETTE);
  3223.                         } else if (choixs111111.equalsIgnoreCase("Familier")) {
  3224.                             itemss111111 = _perso
  3225.                                     .getObjetByPos(Constant.ITEM_POS_FAMILIER);
  3226.                         } else if (choixs111111.equalsIgnoreCase("Cac")) {
  3227.                             itemss111111 = _perso
  3228.                                     .getObjetByPos(Constant.ITEM_POS_ARME);
  3229.                         }
  3230.  
  3231.                         else if (itemss111111 == null) {
  3232.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3233.                                     "Vous ne portez pas l'item.",
  3234.                                     Config.CONFIG_MOTD_COLOR);
  3235.                             return true;
  3236.                         }
  3237.                         int id22 = ((Objects) itemss111111).getTemplate()
  3238.                                 .getLevel();
  3239.                         int id111111 = ((Objects) itemss111111).getStats()
  3240.                                 .getEffect(118);
  3241.                         if (id111111 > 29 && id22 < 30) {
  3242.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3243.                                     "Ton Item donne déjà  30 force.",
  3244.                                     Config.CONFIG_MOTD_COLOR);
  3245.                             return true;
  3246.                         }
  3247.                         if (id111111 > 59 && id22 < 100) {
  3248.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3249.                                     "Ton Item donne déjà  60 force.",
  3250.                                     Config.CONFIG_MOTD_COLOR);
  3251.                             return true;
  3252.                         }
  3253.                         if (id111111 > 79 && id22 < 149) {
  3254.                             SocketManager
  3255.                                     .GAME_SEND_MESSAGE(
  3256.                                             _perso,
  3257.                                             "Ton Item donne déjà  80 force ou dans un autre élement.",
  3258.                                             Config.CONFIG_MOTD_COLOR);
  3259.                             return true;
  3260.                         }
  3261.                         if (id111111 > 79 && id22 <= 149) {
  3262.                             SocketManager
  3263.                                     .GAME_SEND_MESSAGE(
  3264.                                             _perso,
  3265.                                             "Ton Item donne déjà  80 force ou dans un autre élement.",
  3266.                                             Config.CONFIG_MOTD_COLOR);
  3267.                             return true;
  3268.                         }
  3269.                         if (id111111 > 99 && id22 > 149) {
  3270.                             SocketManager
  3271.                                     .GAME_SEND_MESSAGE(
  3272.                                             _perso,
  3273.                                             "Ton Item donne déjà  100 force ou dans un autre élement.",
  3274.                                             Config.CONFIG_MOTD_COLOR);
  3275.                             return true;
  3276.                         }
  3277.                         int newspoints1111111 = maispoints1111111 - taman111111;
  3278.                         SQLManager.UPDATE_ACCOUNT_point(newspoints1111111,
  3279.                                 _perso.getAccID());
  3280.                         ((Objects) itemss111111).getStats().addOneStat(118, 10);
  3281.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  3282.                         SocketManager
  3283.                                 .GAME_SEND_MESSAGE(
  3284.                                         _perso,
  3285.                                         "Votre "
  3286.                                                 + ((Objects) itemss111111)
  3287.                                                         .getTemplate()
  3288.                                                         .getName()
  3289.                                                 + " donne désormais +10 force ! penser a deco/reco pour voir les effect.",
  3290.                                         Config.CONFIG_MOTD_COLOR);
  3291.                         return true;
  3292.                     case 70: // fm intel
  3293.                         int taman22 = 15;
  3294.                         String choixs22 = null;
  3295.                         Objects itemss22 = null;
  3296.                         int maispoints22 = SQLManager.GET_POINTS(_perso
  3297.                                 .getAccID());
  3298.                         if (_perso.get_fight() != null) {
  3299.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3300.                                     "Commande inutilisable en combat.",
  3301.                                     Config.CONFIG_MOTD_COLOR);
  3302.                             break;
  3303.                         }
  3304.  
  3305.                         if (maispoints22 < taman22) {
  3306.                             SocketManager
  3307.                                     .GAME_SEND_MESSAGE(
  3308.                                             _perso,
  3309.                                             "Il te faut "
  3310.                                                     + taman22
  3311.                                                     + " points pour utiliser cette commande.",
  3312.                                             Config.CONFIG_MOTD_COLOR);
  3313.                             break;
  3314.                         }
  3315.  
  3316.                         try {
  3317.                             choixs22 = msg.substring(
  3318.                                     command.getName().length() + 2,
  3319.                                     msg.length() - 1);
  3320.                         } catch (Exception e) {
  3321.                             SocketManager
  3322.                                     .GAME_SEND_MESSAGE(
  3323.                                             _perso,
  3324.                                             "Liste (Faites .fmintel + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
  3325.                                             Config.CONFIG_MOTD_COLOR);
  3326.                             return true;
  3327.                         }
  3328.  
  3329.                         if (choixs22.equalsIgnoreCase("Coiffe")) {
  3330.                             itemss22 = _perso
  3331.                                     .getObjetByPos(Constant.ITEM_POS_COIFFE);
  3332.                         } else if (choixs22.equalsIgnoreCase("Cape")) {
  3333.                             itemss22 = _perso
  3334.                                     .getObjetByPos(Constant.ITEM_POS_CAPE);
  3335.                         } else if (choixs22.equalsIgnoreCase("AnneauDroite")) {
  3336.                             itemss22 = _perso
  3337.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
  3338.                         } else if (choixs22.equalsIgnoreCase("AnneauGauche")) {
  3339.                             itemss22 = _perso
  3340.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
  3341.                         } else if (choixs22.equalsIgnoreCase("Ceinture")) {
  3342.                             itemss22 = _perso
  3343.                                     .getObjetByPos(Constant.ITEM_POS_CEINTURE);
  3344.                         } else if (choixs22.equalsIgnoreCase("Bottes")) {
  3345.                             itemss22 = _perso
  3346.                                     .getObjetByPos(Constant.ITEM_POS_BOTTES);
  3347.                         } else if (choixs22.equalsIgnoreCase("Amulette")) {
  3348.                             itemss22 = _perso
  3349.                                     .getObjetByPos(Constant.ITEM_POS_AMULETTE);
  3350.                         } else if (choixs22.equalsIgnoreCase("Familier")) {
  3351.                             itemss22 = _perso
  3352.                                     .getObjetByPos(Constant.ITEM_POS_FAMILIER);
  3353.                         } else if (choixs22.equalsIgnoreCase("Cac")) {
  3354.                             itemss22 = _perso
  3355.                                     .getObjetByPos(Constant.ITEM_POS_ARME);
  3356.                         }
  3357.  
  3358.                         else if (itemss22 == null) {
  3359.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3360.                                     "Vous ne portez pas l'item.",
  3361.                                     Config.CONFIG_MOTD_COLOR);
  3362.                             return true;
  3363.                         }
  3364.                         int id1111111111 = ((Objects) itemss22).getTemplate()
  3365.                                 .getLevel();
  3366.                         int id11111111 = ((Objects) itemss22).getStats()
  3367.                                 .getEffect(126);
  3368.                         if (id11111111 > 99 && id1111111111 > 149) {
  3369.                             SocketManager
  3370.                                     .GAME_SEND_MESSAGE(
  3371.                                             _perso,
  3372.                                             "Ton Item donne déjà  100 intel ou dans un autre élement.",
  3373.                                             Config.CONFIG_MOTD_COLOR);
  3374.                             return true;
  3375.                         }
  3376.                         if (id11111111 > 79 && id1111111111 <= 149) {
  3377.                             SocketManager
  3378.                                     .GAME_SEND_MESSAGE(
  3379.                                             _perso,
  3380.                                             "Ton Item donne déjà  80 intel ou dans un autre élement.",
  3381.                                             Config.CONFIG_MOTD_COLOR);
  3382.                             return true;
  3383.                         }
  3384.                         if (id11111111 > 59 && id1111111111 < 100) {
  3385.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3386.                                     "Ton Item donne déjà  60 intel.",
  3387.                                     Config.CONFIG_MOTD_COLOR);
  3388.                             return true;
  3389.                         }
  3390.                         if (id11111111 > 29 && id1111111111 < 30) {
  3391.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3392.                                     "Ton Item donne déjà  30 intel.",
  3393.                                     Config.CONFIG_MOTD_COLOR);
  3394.                             return true;
  3395.                         }
  3396.                         int newspoints11111111 = maispoints22 - taman22;
  3397.                         SQLManager.UPDATE_ACCOUNT_point(newspoints11111111,
  3398.                                 _perso.getAccID());
  3399.                         ((Objects) itemss22).getStats().addOneStat(126, 10);
  3400.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  3401.                         SocketManager
  3402.                                 .GAME_SEND_MESSAGE(
  3403.                                         _perso,
  3404.                                         "Votre "
  3405.                                                 + ((Objects) itemss22)
  3406.                                                         .getTemplate()
  3407.                                                         .getName()
  3408.                                                 + " donne désormais +10 intel ! penser a deco/reco pour voir les effect.",
  3409.                                         Config.CONFIG_MOTD_COLOR);
  3410.                         return true;
  3411.                     case 99: // reboot
  3412.                         long uptime1 = System.currentTimeMillis() - Config.gameServer.getStartTime();
  3413.                         int jour1 = (int) (uptime1 / (1000 * 3600 * 24));
  3414.                         uptime1 %= (1000 * 3600 * 24);
  3415.                         int hour1 = (int) (uptime1 / (1000 * 3600));
  3416.                         uptime1 %= (1000 * 3600);
  3417.                         int min1 = (int) (uptime1 / (1000 * 60));
  3418.                         uptime1 %= (1000 * 60);
  3419.                         int sec1 = (int) (uptime1 / (1000));
  3420.  
  3421.                         // RebootTime
  3422.  
  3423.                         String infos111111 = "<b>Informations Sufoko :</b>\n"
  3424.                                 + "Uptime : <b>"
  3425.                                 + jour1
  3426.                                 + "J "
  3427.                                 + hour1
  3428.                                 + "H "
  3429.                                 + min1
  3430.                                 + "M "
  3431.                                 + sec1
  3432.                                 + "S</b>\n"
  3433.                                 + "Joueurs Online : <b>"
  3434.                                 + World.getOnlinePersos().size()
  3435.                                 + " Joueur(s)</b>\n"
  3436.                                 + "Records de Connexions : <b>"
  3437.                                 + Config.gameServer.getMaxPlayer()
  3438.                                 + " Joueur(s)</b>\n"
  3439.                                 + "Reboot auto tout les : <b>"
  3440.                                 + 7
  3441.                                 + " Jours ";
  3442.                         SocketManager.GAME_SEND_INBOX(_perso, infos111111);
  3443.                         break;
  3444.                     case 43: // FM PA
  3445.                         int taman1111111 = 30;
  3446.                         String choixs1111111 = null;
  3447.                         Objects itemss1111111 = null;
  3448.                         int maispoints2111111111 = SQLManager.GET_POINTS(_perso
  3449.                                 .getAccID());
  3450.  
  3451.                         if (_perso.get_fight() != null) {
  3452.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3453.                                     "Commande inutilisable en combat.",
  3454.                                     Config.CONFIG_MOTD_COLOR);
  3455.                             break;
  3456.                         }
  3457.                         if (!(_perso.get_exo() == 0)){
  3458.                     } else if (maispoints2111111111 < taman1111111) {
  3459.                         SocketManager
  3460.                                 .GAME_SEND_MESSAGE(
  3461.                                         _perso,
  3462.                                         "Il te faut "
  3463.                                                 + taman1111111
  3464.                                                 + " points pour utiliser cette commande.",
  3465.                                         Config.CONFIG_MOTD_COLOR);
  3466.                         break;
  3467.                     }
  3468.                         try {
  3469.                             choixs1111111 = msg.substring(command.getName()
  3470.                                     .length() + 2, msg.length() - 1);
  3471.                         } catch (Exception e) {
  3472.                             SocketManager
  3473.                                     .GAME_SEND_MESSAGE(
  3474.                                             _perso,
  3475.                                             "Liste (Faites .fmpa + l'item (à porter sur le personnage) que vous voulez fm PA)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac",
  3476.                                             Config.CONFIG_MOTD_COLOR);
  3477.                             return true;
  3478.                         }
  3479.  
  3480.                         if (choixs1111111.equalsIgnoreCase("Coiffe")) {
  3481.                             itemss1111111 = _perso
  3482.                                     .getObjetByPos(Constant.ITEM_POS_COIFFE);
  3483.                         } else if (choixs1111111.equalsIgnoreCase("Cape")) {
  3484.                             itemss1111111 = _perso
  3485.                                     .getObjetByPos(Constant.ITEM_POS_CAPE);
  3486.                         } else if (choixs1111111
  3487.                                 .equalsIgnoreCase("AnneauDroite")) {
  3488.                             itemss1111111 = _perso
  3489.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
  3490.                         } else if (choixs1111111
  3491.                                 .equalsIgnoreCase("AnneauGauche")) {
  3492.                             itemss1111111 = _perso
  3493.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
  3494.                         } else if (choixs1111111.equalsIgnoreCase("Ceinture")) {
  3495.                             itemss1111111 = _perso
  3496.                                     .getObjetByPos(Constant.ITEM_POS_CEINTURE);
  3497.                         } else if (choixs1111111.equalsIgnoreCase("Bottes")) {
  3498.                             itemss1111111 = _perso
  3499.                                     .getObjetByPos(Constant.ITEM_POS_BOTTES);
  3500.                         } else if (choixs1111111.equalsIgnoreCase("Amulette")) {
  3501.                             itemss1111111 = _perso
  3502.                                   .getObjetByPos(Constant.ITEM_POS_AMULETTE);
  3503.                         } else if (choixs1111111.equalsIgnoreCase("Cac")) {
  3504.                             itemss1111111 = _perso
  3505.                                     .getObjetByPos(Constant.ITEM_POS_ARME);
  3506.                         }
  3507.                         if (itemss1111111 == null)
  3508.                         {
  3509.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3510.                                     "Vous ne portez pas l'item.",
  3511.                                     Config.CONFIG_MOTD_COLOR);
  3512.                             return true;
  3513.                         }
  3514.                         int id111111111 = ((Objects) itemss1111111).getStats()
  3515.                                 .getEffect(111);
  3516.                         if (id111111111 > 0) {
  3517.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3518.                                     "Ton Item donne déjà  1 PA.",
  3519.                                     Config.CONFIG_MOTD_COLOR);
  3520.                             return true;
  3521.                         }
  3522.                         if (!(_perso.get_exo() == 1))
  3523.                         updateMyPoints(_perso, maispoints2111111111 - taman1111111);
  3524.                         ((Objects) itemss1111111).getStats().addOneStat(111, 1);
  3525.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  3526.                         SocketManager
  3527.                                 .GAME_SEND_MESSAGE(
  3528.                                         _perso,
  3529.                                         "Votre "
  3530.                                                 + ((Objects) itemss1111111)
  3531.                                                         .getTemplate()
  3532.                                                         .getName()
  3533.                                                 + " donne désormais +1PA ! penser a deco/reco pour voir les effect.",
  3534.                                         Config.CONFIG_MOTD_COLOR);
  3535.                         return true;
  3536.                     case 44: // FM PM
  3537.                         int taman231111111 = 30;
  3538.                         String choixs2311111111 = null;
  3539.                         Objects itemsss21111111 = null;
  3540.                         int maispoints22111111111 = SQLManager.GET_POINTS(_perso
  3541.                                 .getAccID());
  3542.  
  3543.                         if (_perso.get_fight() != null) {
  3544.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3545.                                     "Commande inutilisable en combat.",
  3546.                                     Config.CONFIG_MOTD_COLOR);
  3547.                             break;
  3548.                         }
  3549.                         if (!(_perso.get_exo() == 0)){
  3550.                         } else if (maispoints22111111111 < taman231111111) {
  3551.                             SocketManager
  3552.                                     .GAME_SEND_MESSAGE(
  3553.                                             _perso,
  3554.                                             "Il te faut "
  3555.                                                     + taman231111111
  3556.                                                     + " points pour utiliser cette commande.",
  3557.                                             Config.CONFIG_MOTD_COLOR);
  3558.                             break;
  3559.                         }
  3560.  
  3561.                         try {
  3562.                             choixs2311111111 = msg.substring(command.getName()
  3563.                                     .length() + 2, msg.length() - 1);
  3564.                         } catch (Exception e) {
  3565.                             SocketManager
  3566.                                     .GAME_SEND_MESSAGE(
  3567.                                             _perso,
  3568.                                             "Liste (Faites .fmpm + l'item (à porter sur le personnage) que vous voulez fm PA)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac",
  3569.                                             Config.CONFIG_MOTD_COLOR);
  3570.                             return true;
  3571.                         }
  3572.  
  3573.                         if (choixs2311111111.equalsIgnoreCase("Coiffe")) {
  3574.                             itemsss21111111 = _perso
  3575.                                     .getObjetByPos(Constant.ITEM_POS_COIFFE);
  3576.                         } else if (choixs2311111111.equalsIgnoreCase("Cape")) {
  3577.                             itemsss21111111 = _perso
  3578.                                     .getObjetByPos(Constant.ITEM_POS_CAPE);
  3579.                         } else if (choixs2311111111
  3580.                                 .equalsIgnoreCase("AnneauDroite")) {
  3581.                             itemsss21111111 = _perso
  3582.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
  3583.                         } else if (choixs2311111111
  3584.                                 .equalsIgnoreCase("AnneauGauche")) {
  3585.                             itemsss21111111 = _perso
  3586.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
  3587.                         } else if (choixs2311111111.equalsIgnoreCase("Ceinture")) {
  3588.                             itemsss21111111 = _perso
  3589.                                     .getObjetByPos(Constant.ITEM_POS_CEINTURE);
  3590.                         } else if (choixs2311111111.equalsIgnoreCase("Bottes")) {
  3591.                             itemsss21111111 = _perso
  3592.                                     .getObjetByPos(Constant.ITEM_POS_BOTTES);
  3593.                         } else if (choixs2311111111.equalsIgnoreCase("Amulette")) {
  3594.                             itemsss21111111 = _perso
  3595.                                   .getObjetByPos(Constant.ITEM_POS_AMULETTE);
  3596.                         } else if (choixs2311111111.equalsIgnoreCase("Cac")) {
  3597.                             itemsss21111111 = _perso
  3598.                                     .getObjetByPos(Constant.ITEM_POS_ARME);
  3599.                         }
  3600.                         if (itemsss21111111 == null)
  3601.                         {
  3602.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3603.                                     "Vous ne portez pas l'item.",
  3604.                                     Config.CONFIG_MOTD_COLOR);
  3605.                             return true;
  3606.                         }
  3607.                         int id11111111111 = ((Objects) itemsss21111111).getStats()
  3608.                                 .getEffect(128);
  3609.                         if (id11111111111 > 0) {
  3610.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3611.                                     "Ton Item donne déjà  1 PM.",
  3612.                                     Config.CONFIG_MOTD_COLOR);
  3613.                             return true;
  3614.                         }
  3615.                         if (!(_perso.get_exo() == 1))
  3616.                         updateMyPoints(_perso, maispoints22111111111 - taman231111111);
  3617.                         ((Objects) itemsss21111111).getStats().addOneStat(128, 1);
  3618.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  3619.                         SocketManager
  3620.                                 .GAME_SEND_MESSAGE(
  3621.                                         _perso,
  3622.                                         "Votre "
  3623.                                                 + ((Objects) itemsss21111111)
  3624.                                                         .getTemplate()
  3625.                                                         .getName()
  3626.                                                 + " donne désormais +1PM ! penser a deco/reco pour voir les effect.",
  3627.                                         Config.CONFIG_MOTD_COLOR);
  3628.                         return true;
  3629.                     case 199: // FM PO
  3630.                         int taman111111111 = 70;
  3631.                         String choix11 = null;
  3632.                         itemss = null;
  3633.                         int maispoints2211111111111 = SQLManager
  3634.                                 .GET_POINTS(_perso.getAccID());
  3635.  
  3636.                         if (_perso.get_fight() != null) {
  3637.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3638.                                     "Commande inutilisable en combat.",
  3639.                                     Config.CONFIG_MOTD_COLOR);
  3640.                             break;
  3641.                         }
  3642.  
  3643.                         if (maispoints2211111111111 < taman111111111) {
  3644.                             SocketManager
  3645.                                     .GAME_SEND_MESSAGE(
  3646.                                             _perso,
  3647.                                             "Il te faut "
  3648.                                                     + taman111111111
  3649.                                                     + " points pour utiliser cette commande.",
  3650.                                             Config.CONFIG_MOTD_COLOR);
  3651.                             break;
  3652.                         }
  3653.  
  3654.                         try {
  3655.                             choix11 = msg.substring(
  3656.                                     command.getName().length() + 2,
  3657.                                     msg.length() - 1);
  3658.                         } catch (Exception e) {
  3659.                             SocketManager
  3660.                                     .GAME_SEND_MESSAGE(
  3661.                                             _perso,
  3662.                                             "Liste (Faites .fmpo + l'item (à porter sur le personnage) que vous voulez fm PA)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
  3663.                                             Config.CONFIG_MOTD_COLOR);
  3664.                             return true;
  3665.                         }
  3666.                         if (choix11 == null || choix11.trim().equalsIgnoreCase(""))
  3667.                             return true;
  3668.  
  3669.                         if (choix11.equalsIgnoreCase("Coiffe"))//
  3670.                         {
  3671.                             itemss = _perso
  3672.                                     .getObjetByPos(Constant.ITEM_POS_COIFFE);
  3673.                         } else if (choix11.equalsIgnoreCase("Cape")) {
  3674.                             itemss = _perso
  3675.                                     .getObjetByPos(Constant.ITEM_POS_CAPE);
  3676.                         } else if (choix11.equalsIgnoreCase("AnneauDroite")) {
  3677.                             itemss = _perso
  3678.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
  3679.                         } else if (choix11.equalsIgnoreCase("AnneauGauche")) {
  3680.                             itemss = _perso
  3681.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
  3682.                         } else if (choix11.equalsIgnoreCase("Ceinture")) {
  3683.                             itemss = _perso
  3684.                                     .getObjetByPos(Constant.ITEM_POS_CEINTURE);
  3685.                         } else if (choix11.equalsIgnoreCase("Bottes")) {
  3686.                             itemss = _perso
  3687.                                     .getObjetByPos(Constant.ITEM_POS_BOTTES);
  3688.                         } else if (choix11.equalsIgnoreCase("Amulette")) {
  3689.                             itemss = _perso
  3690.                                     .getObjetByPos(Constant.ITEM_POS_AMULETTE);
  3691.                         } else if (choix11.equalsIgnoreCase("Familier")) {
  3692.                             itemss = _perso
  3693.                                     .getObjetByPos(Constant.ITEM_POS_FAMILIER);
  3694.                         } else if (choix11.equalsIgnoreCase("Cac")) {
  3695.                             itemss = _perso
  3696.                                     .getObjetByPos(Constant.ITEM_POS_ARME);
  3697.                         }
  3698.                         if (itemss == null)
  3699.                         {
  3700.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3701.                                     "Vous ne portez pas l'item.",
  3702.                                     Config.CONFIG_MOTD_COLOR);
  3703.                             return true;
  3704.                         }
  3705.                         int id21 =  itemss.getStats()
  3706.                                 .getEffect(117);
  3707.                         if (id21 > 1) {
  3708.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3709.                                     "Ton Item donne déjà  1 PO.",
  3710.                                     Config.CONFIG_MOTD_COLOR);
  3711.                             return true;
  3712.                         }
  3713.                         int newspoints121 = maispoints2211111111111
  3714.                                 - taman111111111;
  3715.                         SQLManager.UPDATE_ACCOUNT_point(newspoints121,
  3716.                                 _perso.getAccID());
  3717.                         ((Objects) itemss).getStats().addOneStat(117,
  3718.                                 1);
  3719.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  3720.                         SocketManager
  3721.                                 .GAME_SEND_MESSAGE(
  3722.                                         _perso,
  3723.                                         "Votre "
  3724.                                                 + ((Objects) itemss)
  3725.                                                         .getTemplate()
  3726.                                                         .getName()
  3727.                                                 + " donne désormais +1PO ! penser a deco/reco pour voir les effect.",
  3728.                                         Config.CONFIG_MOTD_COLOR);
  3729.                         return true;
  3730.                        
  3731.                     case 88:
  3732.                         int pointsR = 50;
  3733.                         String choixI = null;
  3734.                         String choixE = null;
  3735.                         int element = 0;
  3736.                         Objects itemsP = null;
  3737.                         points = SQLManager.GET_POINTS(_perso.getAccID());
  3738.  
  3739.                         if (_perso.get_fight() != null) {
  3740.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3741.                                     "Commande inutilisable en combat.",
  3742.                                     Config.CONFIG_MOTD_COLOR);
  3743.                             break;
  3744.                         }
  3745.  
  3746.                         if (points < pointsR) {
  3747.                             SocketManager
  3748.                                     .GAME_SEND_MESSAGE(
  3749.                                             _perso,
  3750.                                             "Il te faut "
  3751.                                                     + pointsR
  3752.                                                     + " points pour utiliser cette commande.",
  3753.                                             Config.CONFIG_MOTD_COLOR);
  3754.                             break;
  3755.                         }
  3756.  
  3757.                         try {
  3758.                             choixI = msg.split("\\ ")[1];
  3759.                             choixE = msg.split("\\ ")[2];
  3760.                         } catch (Exception e) {
  3761.                             SocketManager
  3762.                                     .GAME_SEND_MESSAGE(
  3763.                                             _perso,
  3764.                                             "Faites .fm + l'item + l'élement(Feu,Air,Terre,Eau). L'item doit être porter sur le personnage que vous voulez fm. (Liste : Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier)",
  3765.                                             Config.CONFIG_MOTD_COLOR);
  3766.                             return true;
  3767.                         }
  3768.                         // Elements
  3769.                         if (choixE.equalsIgnoreCase("Feu|")) {
  3770.                             element = 126;
  3771.                         } else if (choixE.equalsIgnoreCase("Air|")) {
  3772.                             element = 119;
  3773.                         } else if (choixE.equalsIgnoreCase("Terre|")) {
  3774.                             element = 118;
  3775.                         } else if (choixE.equalsIgnoreCase("Eau|")) {
  3776.                             element = 123;
  3777.                         }
  3778.  
  3779.                         /*
  3780.                          * if(choixE != "Terre" || choixE != "Eau" ||choixE !=
  3781.                          * "Air" ||choixE != "Feu"){ SocketManager
  3782.                          * .GAME_SEND_MESSAGE( _perso, "Element inconnu.",
  3783.                          * Config.CONFIG_MOTD_COLOR); return true; }
  3784.                          */
  3785.  
  3786.                         // POS Item
  3787.                         if (choixI.equalsIgnoreCase("Coiffe")) {
  3788.                             itemsP = _perso
  3789.                                     .getObjetByPos(Constant.ITEM_POS_COIFFE);
  3790.                         } else if (choixI.equalsIgnoreCase("Cape")) {
  3791.                             itemsP = _perso
  3792.                                     .getObjetByPos(Constant.ITEM_POS_CAPE);
  3793.                         } else if (choixI.equalsIgnoreCase("AnneauDroite")) {
  3794.                             itemsP = _perso
  3795.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
  3796.                         } else if (choixI.equalsIgnoreCase("AnneauGauche")) {
  3797.                             itemsP = _perso
  3798.                                     .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
  3799.                         } else if (choixI.equalsIgnoreCase("Ceinture")) {
  3800.                             itemsP = _perso
  3801.                                     .getObjetByPos(Constant.ITEM_POS_CEINTURE);
  3802.                         } else if (choixI.equalsIgnoreCase("Bottes")) {
  3803.                             itemsP = _perso
  3804.                                     .getObjetByPos(Constant.ITEM_POS_BOTTES);
  3805.                         } else if (choixI.equalsIgnoreCase("Amulette")) {
  3806.                             itemsP = _perso
  3807.                                     .getObjetByPos(Constant.ITEM_POS_AMULETTE);
  3808.                         } else if (choixI.equalsIgnoreCase("Familier")) {
  3809.                             itemsP = _perso
  3810.                                     .getObjetByPos(Constant.ITEM_POS_FAMILIER);
  3811.                         } else if (choixI.equalsIgnoreCase("Cac")) {
  3812.                             itemsP = _perso
  3813.                                     .getObjetByPos(Constant.ITEM_POS_ARME);
  3814.                         }
  3815.  
  3816.                         else if (itemsP == null) {
  3817.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3818.                                     "Vous ne portez pas l'item.",
  3819.                                     Config.CONFIG_MOTD_COLOR);
  3820.                             return true;
  3821.                         }
  3822.                         int LvlItem = ((Objects) itemsP).getTemplate()
  3823.                                 .getLevel();
  3824.                         int EffectItem = ((Objects) itemsP).getStats()
  3825.                                 .getEffect(element);
  3826.                         if (EffectItem > 29 && LvlItem < 30) {
  3827.                             SocketManager
  3828.                                     .GAME_SEND_MESSAGE(
  3829.                                             _perso,
  3830.                                             "Ton Item donne déjà  30 en "
  3831.                                                     + Constant
  3832.                                                             .getElement(element)
  3833.                                                     + "",
  3834.                                             Config.CONFIG_MOTD_COLOR);
  3835.                             return true;
  3836.                         }
  3837.                         if (EffectItem > 59 && LvlItem < 100) {
  3838.                             SocketManager
  3839.                                     .GAME_SEND_MESSAGE(
  3840.                                             _perso,
  3841.                                             "Ton Item donne déjà 60 en "
  3842.                                                     + Constant
  3843.                                                             .getElement(element)
  3844.                                                     + "",
  3845.                                             Config.CONFIG_MOTD_COLOR);
  3846.                             return true;
  3847.                         }
  3848.                         if (EffectItem > 79 && LvlItem < 149) {
  3849.                             SocketManager
  3850.                                     .GAME_SEND_MESSAGE(
  3851.                                             _perso,
  3852.                                             "Ton Item donne déjà 80 en "
  3853.                                                     + Constant
  3854.                                                             .getElement(element)
  3855.                                                     + "",
  3856.                                             Config.CONFIG_MOTD_COLOR);
  3857.                             return true;
  3858.                         }
  3859.                         if (EffectItem > 89 && LvlItem > 149) {
  3860.                             SocketManager
  3861.                                     .GAME_SEND_MESSAGE(
  3862.                                             _perso,
  3863.                                             "Ton Item donne déjà 90 en "
  3864.                                                     + Constant
  3865.                                                             .getElement(element)
  3866.                                                     + "",
  3867.                                             Config.CONFIG_MOTD_COLOR);
  3868.                             return true;
  3869.                         }
  3870.                         // objet feu  different   air
  3871.                         if (itemsP.getFM() != element && itemsP.getFM() != 0) {
  3872.                             SocketManager
  3873.                                     .GAME_SEND_MESSAGE(
  3874.                                             _perso,
  3875.                                             "Ton item est déjà FM dans un autre élement.",
  3876.                                             Config.CONFIG_MOTD_COLOR);
  3877.                             return true;
  3878.                         }
  3879.                         int newPoints = points - pointsR;
  3880.                         SQLManager.UPDATE_ACCOUNT_point(newPoints,
  3881.                                 _perso.getAccID());
  3882.                         itemsP.getStats().addOneStat(element, 10);
  3883.                         itemsP.setFM(element);
  3884.                         SQLManager.SAVE_ITEM(itemsP);
  3885.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  3886.                         SocketManager
  3887.                                 .GAME_SEND_MESSAGE(
  3888.                                         _perso,
  3889.                                         "Votre "
  3890.                                                 + ((Objects) itemsP)
  3891.                                                         .getTemplate()
  3892.                                                         .getName()
  3893.                                                 + " donne désormais +10 en "
  3894.                                                 + Constant.getElement(element)
  3895.                                                 + " ! penser a deco/reco pour voir les effects.",
  3896.                                         Config.CONFIG_MOTD_COLOR);
  3897.                         return true;
  3898.                     case 94:// ChangeName
  3899.                         /** TROP BON CE PATOU **/
  3900.                         String nameP = _perso.get_name();
  3901.                         String newName;
  3902.                         int pointsAct = _compte.get_points();
  3903.                         int pointsReq = 30;
  3904.  
  3905.                         if (_perso.get_fight() != null) {
  3906.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3907.                                     "Tu ne peut pas changer de nom en combat.",
  3908.                                     Config.CONFIG_MOTD_COLOR);
  3909.                             break;
  3910.                         }
  3911.                         if (pointsAct < pointsReq) {
  3912.  
  3913.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3914.                                     "Tu n'as pas assez de points boutique.",
  3915.                                     Config.CONFIG_MOTD_COLOR);
  3916.                             break;     
  3917.                         }
  3918.  
  3919.                         try {
  3920.  
  3921.                             newName = msg.substring(
  3922.                                     command.getName().length() + 2,
  3923.                                     msg.length() - 1);
  3924.  
  3925.                         } catch (Exception e) {
  3926.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3927.                                     "Tape : .changename NAME",
  3928.                                     Config.CONFIG_MOTD_COLOR);
  3929.                             break;
  3930.                         }
  3931.                         if (SQLManager.persoExist(newName)) {
  3932.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3933.                                     "Nous sommes désolé, ce nom est déjà utilisé..",
  3934.                                     Config.CONFIG_MOTD_COLOR);
  3935.                             break;
  3936.                         }
  3937.                         // Pour pas qu'il foute le dawah dans son nom!
  3938.                         if (newName.length() < 2 || newName.length() > 10
  3939.                                 || newName.contains("modérateur")
  3940.                                 || newName.contains("créateur")
  3941.                                 || newName.contains(" ")
  3942.                                 || newName.contains("mj")
  3943.                                 || newName.contains("staff")
  3944.                                 || newName.contains(";")
  3945.                                 || newName.contains(",")
  3946.                                 || newName.contains(":")
  3947.                                 || newName.contains("§")
  3948.                                 || newName.contains("/")
  3949.                                 || newName.contains("?")
  3950.                                 || newName.contains("STAFF")
  3951.                                 || newName.contains("'")
  3952.                                 || newName.contains("MJ")
  3953.                                 || newName.contains("animateur")
  3954.                                 || newName.contains("ANIMATEUR")
  3955.                                 || newName.contains("CREATEUR")
  3956.                                 || newName.contains("MODERATEUR")
  3957.                                 || newName.contains("[")
  3958.                                 || newName.contains("]")
  3959.                                 || newName.contains("{")
  3960.                                 || newName.contains("}")
  3961.                                 || newName.contains("<")
  3962.                                 || newName.contains(">")
  3963.                                 || newName.contains("&")
  3964.                                 || newName.contains("[")
  3965.                                 || newName.contains("-")
  3966.                                 || newName.contains("\"")) {
  3967.                             SocketManager
  3968.                                     .GAME_SEND_MESSAGE(
  3969.                                             _perso,
  3970.                                             "Les conditions de votre nouveau nom ne sont pas acquises.",
  3971.                                             Config.CONFIG_MOTD_COLOR);
  3972.                             break;
  3973.                         }
  3974.                         // Si nouveau nom différent de l'ancien
  3975.                         if (newName != nameP) {
  3976.                             _perso.set_name(newName);
  3977.                             _perso.set_tag("");
  3978.                             _perso.set_Localname(newName);
  3979.                             SQLManager.SAVE_PERSONNAGE(_perso, false);
  3980.                             SocketManager.GAME_SEND_ALTER_GM_PACKET(
  3981.                                     _perso.get_curCarte(), _perso);
  3982.                             SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
  3983.                                     _perso.get_curCarte(), _perso.get_GUID());
  3984.                             SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
  3985.                                     _perso.get_curCarte(), _perso);
  3986.  
  3987.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  3988.                                     "Votre nouveau nom est : " + newName + "",
  3989.                                     Config.CONFIG_MOTD_COLOR);
  3990.  
  3991.                         } else {
  3992.                             SocketManager
  3993.                                     .GAME_SEND_MESSAGE(
  3994.                                             _perso,
  3995.                                             "Il faut que ton nouveau nom soit différent de l'ancien.",
  3996.                                             Config.CONFIG_MOTD_COLOR);
  3997.                             break;
  3998.                         }
  3999.  
  4000.                         break;
  4001.                     case 39: // Type LevelUp des sorts
  4002.                         String[] mySplit = args.split(",");
  4003.                         int levelUp = Integer.parseInt(mySplit[0]) > 6 ? (6)
  4004.                                 : (Integer.parseInt(mySplit[0]));
  4005.                         boolean isFree = Boolean.parseBoolean(mySplit[1]
  4006.                                 .toLowerCase());
  4007.  
  4008.                         for (SortStats spell : _perso.getSorts()) {
  4009.                             int curLevel = _perso.getSortStatBySortIfHas(
  4010.                                     spell.getSpellID()).getLevel();
  4011.                             if (curLevel != 6 || curLevel < levelUp) {
  4012.                                 while (curLevel < levelUp) {
  4013.                                     if (!isFree) {
  4014.                                         if (_perso.get_spellPts() >= curLevel
  4015.                                                 && World.getSort(
  4016.                                                         spell.getSpellID())
  4017.                                                         .getStatsByLevel(
  4018.                                                                 curLevel + 1)
  4019.                                                         .getReqLevel() <= _perso
  4020.                                                         .get_lvl()) {
  4021.                                             if (_perso.learnSpell(
  4022.                                                     spell.getSpellID(),
  4023.                                                     curLevel + 1, false, false)) {
  4024.                                                 _perso.set_spellPts(_perso
  4025.                                                         .get_spellPts()
  4026.                                                         - curLevel);
  4027.                                             }
  4028.                                         }
  4029.                                         curLevel++;
  4030.                                     } else {
  4031.                                         if (World.getSort(spell.getSpellID())
  4032.                                                 .getStatsByLevel(curLevel + 1)
  4033.                                                 .getReqLevel() <= _perso
  4034.                                                 .get_lvl())
  4035.                                             _perso.learnSpell(
  4036.                                                     spell.getSpellID(),
  4037.                                                     curLevel + 1, false, false);
  4038.                                         curLevel++;
  4039.                                     }
  4040.                                 }
  4041.                             }
  4042.                         }
  4043.                         SocketManager.GAME_SEND_STATS_PACKET(_perso);
  4044.                         SocketManager.GAME_SEND_SPELL_LIST(_perso);
  4045.                         break;
  4046.                     case 101:
  4047.                     {
  4048.                           if ((_perso != null) && (_perso.isOnline()))
  4049.                           if (!_perso.hasItemTemplate(683, 1)) {
  4050.                             SocketManager
  4051.                               .GAME_SEND_MESSAGE(
  4052.                                 _perso,
  4053.                                 "Les inscription dead match sont reserver pour la communaute des mondes PVP.",
  4054.                                 AllColor.GOLD);
  4055.                             break;
  4056.                           }}
  4057.                         Manager deathMatch = World.deathMatch;
  4058.                         try {
  4059.                             argument = msg.substring(
  4060.                                     command.getName().length() + 2,
  4061.                                     msg.length() - 1);
  4062.  
  4063.                         } catch (Exception e) {
  4064.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  4065.                                     "Faites .deathmatch off/on.",
  4066.                                     Config.CONFIG_MOTD_COLOR);
  4067.                             break;
  4068.                         }
  4069.  
  4070.                         switch (argument.toLowerCase()) {
  4071.  
  4072.                         case "on": {
  4073.                             if (_perso.getDeathMatch() != null) {
  4074.                                 SocketManager
  4075.                                         .GAME_SEND_MESSAGE(
  4076.                                                 _perso,
  4077.                                                 "<b>DeathMatch</b>: vous êtes dejà inscrit !",
  4078.                                                 Config.CONFIG_MOTD_COLOR);
  4079.                                 break;
  4080.                             }
  4081.                             deathMatch.addPlayer(_perso);
  4082.                             break;
  4083.                         }
  4084.  
  4085.                         case "off": {
  4086.                             if (_perso.getDeathMatch() == null) {
  4087.                                 SocketManager
  4088.                                         .GAME_SEND_MESSAGE(
  4089.                                                 _perso,
  4090.                                                 "<b>DeathMatch</b>: vous n'êtes pas inscrit !",
  4091.                                                 Config.CONFIG_MOTD_COLOR);
  4092.                                 break;
  4093.                             }
  4094.                             deathMatch.removePlayer(_perso);
  4095.                             break;
  4096.                         }
  4097.  
  4098.                         }
  4099.                         break;
  4100.                     case 18: //Lancer une traque
  4101.                         Stalk.newTraque(_perso);
  4102.                         break;
  4103.                     case 19: //Récompense de traque
  4104.                         Stalk.getRecompense(_perso);
  4105.                         break;
  4106.                     case 20: //Géoposition de la cible
  4107.                         Stalk.getTraquePosition(_perso);
  4108.                         break;
  4109.                     case 86: // Demorph
  4110.                         int morphID11 = 0;
  4111.                         try {
  4112.                             morphID11 = Integer.parseInt(msg.substring(
  4113.                                     command.getName().length() + 2,
  4114.                                     msg.length() - 1).trim());
  4115.                             if (Config.CONFIG_MORPH_UNPROHIBIDEN
  4116.                                     .contains(morphID11)) {
  4117.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  4118.                                         "MorphID non autorisé",
  4119.                                         Config.CONFIG_MOTD_COLOR);
  4120.                                 break;
  4121.                             }
  4122.                         } catch (Exception e) {
  4123.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  4124.                                     "MorphID non autorisé",
  4125.                                     Config.CONFIG_MOTD_COLOR);
  4126.                             break;
  4127.                         }
  4128.                         _perso.set_gfxID(morphID11);
  4129.                         SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
  4130.                                 _perso.get_curCarte(), _perso.get_GUID());
  4131.                         SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
  4132.                                 _perso.get_curCarte(), _perso);
  4133.                         break;
  4134.                     case 60:// Refresmobs
  4135.                         _perso.get_curCarte().refreshSpawns();
  4136.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  4137.                                 "Les monstre sur la map on etait refresh!.",
  4138.                                 AllColor.RED);
  4139.                         break;
  4140.                     case 50:// Listing des commandes
  4141.                         SocketManager.GAME_SEND_MESSAGE(_perso,
  4142.                                 SQLManager.LISTE_RECOMP(), AllColor.GOLD);
  4143.                         break;
  4144.                     case 127: // Commandes Kolizeum 2vs2
  4145.                         String split;
  4146.                         try {
  4147.                             split = msg.substring(
  4148.                                     command.getName().length() + 2,
  4149.                                     msg.length() - 1);
  4150.                         } catch (Exception e) {
  4151.                             if (_perso.getKolizeum2() == 0)
  4152.                                 SocketManager
  4153.                                         .GAME_SEND_MESSAGE(
  4154.                                                 _perso,
  4155.                                                 "Vous êtes déjà inscris au Kolizeum ! Faites |<b> ."
  4156.                                                         + command.getName()
  4157.                                                         + " off </b>| pour vous désinscrire...",
  4158.                                                 Config.CONFIG_MOTD_COLOR);
  4159.                             else if (_perso.getKolizeum2() == 1)
  4160.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  4161.                                         "Vous êtes en combat d'arène !",
  4162.                                         Config.CONFIG_MOTD_COLOR);
  4163.                             else
  4164.                                 SocketManager
  4165.                                         .GAME_SEND_MESSAGE(
  4166.                                                 _perso,
  4167.                                                 "Vous n'êtes pas inscris, faites |<b> ."
  4168.                                                         + command.getName()
  4169.                                                         + " on </b>| pour vous inscrire !",
  4170.                                                 Config.CONFIG_MOTD_COLOR);
  4171.                             break;
  4172.                         }
  4173.                         if (split.equals("on")) {
  4174.                             if (_perso.getKolizeum2() != -1) {
  4175.                                 SocketManager
  4176.                                         .GAME_SEND_MESSAGE(
  4177.                                                 _perso,
  4178.                                                 "Vous êtes déjà inscris ou participez déjà au Kolizeum !",
  4179.                                                 Config.CONFIG_MOTD_COLOR);
  4180.                                 break;
  4181.                             }
  4182.                             if (_perso.getGroup() != null) {
  4183.                                 if (_perso.getGroup().getPersos().size() > Config.PLAYER_KOLI2
  4184.                                         || _perso.getGroup().getPersos().size() < Config.PLAYER_KOLI2) {
  4185.                                     SocketManager.GAME_SEND_MESSAGE(_perso,
  4186.                                             "Votre groupe doit contenir exactement "
  4187.                                                     + Config.PLAYER_KOLI2
  4188.                                                     + " joueurs !",
  4189.                                             Config.CONFIG_MOTD_COLOR);
  4190.                                     break;
  4191.                                 } else if (!_perso.getGroup().isChief(
  4192.                                         _perso.get_GUID())) {
  4193.                                     SocketManager
  4194.                                             .GAME_SEND_MESSAGE(
  4195.                                                     _perso,
  4196.                                                     "Vous devez être le chef de groupe pour vous inscrire !",
  4197.                                                     Config.CONFIG_MOTD_COLOR);
  4198.                                     break;
  4199.                                 }
  4200.                                 for (Player c : _perso.getGroup().getPersos()) {
  4201.                                     try {
  4202.                                         if (c.getKolizeum2() != -1) {
  4203.                                             SocketManager
  4204.                                                     .GAME_SEND_MESSAGE(
  4205.                                                             _perso,
  4206.                                                             "Le joueur "
  4207.                                                                     + c.get_name()
  4208.                                                                     + " est déjà inscris ou participe actuellement au kolizeum !",
  4209.                                                             Config.CONFIG_MOTD_COLOR);
  4210.                                             break;
  4211.                                         }
  4212.  
  4213.                                         else if (!c.isOnline()) {
  4214.                                             SocketManager
  4215.                                                     .GAME_SEND_MESSAGE(
  4216.                                                             _perso,
  4217.                                                             "Le joueur "
  4218.                                                                     + c.get_name()
  4219.                                                                     + " n'est pas connecté !",
  4220.                                                             Config.CONFIG_MOTD_COLOR);
  4221.                                             break;
  4222.                                         } else if (c.get_fight() != null) {
  4223.                                             SocketManager
  4224.                                                     .GAME_SEND_MESSAGE(
  4225.                                                             _perso,
  4226.                                                             "Le joueur "
  4227.                                                                     + c.get_name()
  4228.                                                                     + " est en combat !",
  4229.                                                             Config.CONFIG_MOTD_COLOR);
  4230.                                             break;
  4231.                                         } else {
  4232.                                        
  4233.                                             break;
  4234.                                         }
  4235.                                     } catch (Exception e) {
  4236.                                     }
  4237.                                 }
  4238.                             } else {
  4239.                                 if (_perso.get_fight() != null) {
  4240.                                     SocketManager
  4241.                                             .GAME_SEND_MESSAGE(
  4242.                                                     _perso,
  4243.                                                     "Vous êtes actuellement en combat !",
  4244.                                                     Config.CONFIG_MOTD_COLOR);
  4245.                                     break;
  4246.                                 } else {
  4247.                                     K2.addPlayer(_perso);
  4248.                                     break;
  4249.                                 }
  4250.                             }
  4251.                         } else if (split.equals("off")) {
  4252.                             try {
  4253.  
  4254.                                 if (_perso.getKolizeum2() == 1
  4255.                                         && _perso.get_fight() != null) {
  4256.                                     SocketManager.GAME_SEND_MESSAGE(_perso,
  4257.                                             "Vous êtes en plein tournoi !",
  4258.                                             Config.CONFIG_MOTD_COLOR);
  4259.                                     break;
  4260.                                 } else if (_perso.getKolizeum2() == -1) {
  4261.                                     SocketManager
  4262.                                             .GAME_SEND_MESSAGE(
  4263.                                                     _perso,
  4264.                                                     "Vous n'êtes pas inscris au kolizeum !",
  4265.                                                     Config.CONFIG_MOTD_COLOR);
  4266.                                     break;
  4267.                                 } else {
  4268.                                     K2.delPlayer(_perso);
  4269.                                     break;
  4270.                                 }
  4271.                             } catch (Exception e) {
  4272.                             }
  4273.  
  4274.                         } else if (split.equals("infos")) {
  4275.                             if (_perso.getKolizeum2() == 1
  4276.                                     && _perso.get_fight() != null) {
  4277.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  4278.                                         "Vous êtes en plein tournoi !",
  4279.                                         Config.CONFIG_MOTD_COLOR);
  4280.                                 break;
  4281.                             } else if (_perso.getKolizeum2() == -1) {
  4282.                                 SocketManager
  4283.                                         .GAME_SEND_MESSAGE(
  4284.                                                 _perso,
  4285.                                                 "Vous n'êtes pas inscris au kolizeum !",
  4286.                                                 Config.CONFIG_MOTD_COLOR);
  4287.                                 break;
  4288.                             } else {
  4289.                                 String content = null;
  4290.                                 if (_perso.getKoliTeam().getkCharacters()
  4291.                                         .size() < Config.PLAYER_KOLI2)
  4292.                                     content = "Il manque <b>"
  4293.                                             + (Config.PLAYER_KOLI2 - _perso
  4294.                                                     .getKoliTeam()
  4295.                                                     .getkCharacters().size())
  4296.                                             + "</b> joueurs dans votre équipe !";
  4297.                                 else
  4298.                                     content = "Votre équipe est au complet ! Patientez le temps qu'une autre équipe soit formée..";
  4299.  
  4300.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  4301.                                         content, Config.CONFIG_MOTD_COLOR);
  4302.                                 break;
  4303.                             }
  4304.                         } else {
  4305.                             SocketManager
  4306.                                     .GAME_SEND_MESSAGE(
  4307.                                             _perso,
  4308.                                             "Tâche non reconnue, faites ."
  4309.                                                     + command.getName()
  4310.                                                     + " pour avoir des informations sur la commande.",
  4311.                                             AllColor.RED);
  4312.                             break;
  4313.                         }
  4314.                         break;
  4315.                     case 128: // Commandes Kolizeum 3vs3
  4316.                         try {
  4317.                             split = msg.substring(
  4318.                                     command.getName().length() + 2,
  4319.                                     msg.length() - 1);
  4320.                         } catch (Exception e) {
  4321.                             if (_perso.getKolizeum3() == 0)
  4322.                                 SocketManager
  4323.                                         .GAME_SEND_MESSAGE(
  4324.                                                 _perso,
  4325.                                                 "Vous êtes déjà inscris au Kolizeum ! Faites |<b> ."
  4326.                                                         + command.getName()
  4327.                                                         + " off </b>| pour vous désinscrire...",
  4328.                                                 Config.CONFIG_MOTD_COLOR);
  4329.                             else if (_perso.getKolizeum3() == 1)
  4330.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  4331.                                         "Vous êtes en combat d'arène !",
  4332.                                         Config.CONFIG_MOTD_COLOR);
  4333.                             else
  4334.                                 SocketManager
  4335.                                         .GAME_SEND_MESSAGE(
  4336.                                                 _perso,
  4337.                                                 "Vous n'êtes pas inscris, faites |<b> ."
  4338.                                                         + command.getName()
  4339.                                                         + " on </b>| pour vous inscrire !",
  4340.                                                 Config.CONFIG_MOTD_COLOR);
  4341.                             break;
  4342.                         }
  4343.                         if (split.equals("on")) {
  4344.                             if (_perso.getKolizeum3() != -1) {
  4345.                                 SocketManager
  4346.                                         .GAME_SEND_MESSAGE(
  4347.                                                 _perso,
  4348.                                                 "Vous êtes déjà inscris ou participez déjà au Kolizeum !",
  4349.                                                 Config.CONFIG_MOTD_COLOR);
  4350.                                 break;
  4351.                             }
  4352.                             if (_perso.getGroup() != null) {
  4353.                                 if (_perso.getGroup().getPersos().size() > Config.PLAYER_KOLI3
  4354.                                         || _perso.getGroup().getPersos().size() < Config.PLAYER_KOLI3) {
  4355.                                     SocketManager.GAME_SEND_MESSAGE(_perso,
  4356.                                             "Votre groupe doit contenir exactement "
  4357.                                                     + Config.PLAYER_KOLI3
  4358.                                                     + " joueurs !",
  4359.                                             Config.CONFIG_MOTD_COLOR);
  4360.                                     break;
  4361.                                 } else if (!_perso.getGroup().isChief(
  4362.                                         _perso.get_GUID())) {
  4363.                                     SocketManager
  4364.                                             .GAME_SEND_MESSAGE(
  4365.                                                     _perso,
  4366.                                                     "Vous devez être le chef de groupe pour vous inscrire !",
  4367.                                                     Config.CONFIG_MOTD_COLOR);
  4368.                                     break;
  4369.                                 }
  4370.                                 for (Player c : _perso.getGroup().getPersos()) {
  4371.                                     try {
  4372.                                         if (c.getKolizeum3() != -1) {
  4373.                                             SocketManager
  4374.                                                     .GAME_SEND_MESSAGE(
  4375.                                                             _perso,
  4376.                                                             "Le joueur "
  4377.                                                                     + c.get_name()
  4378.                                                                     + " est déjà inscris ou participe actuellement au kolizeum !",
  4379.                                                             Config.CONFIG_MOTD_COLOR);
  4380.                                             break;
  4381.                                         }
  4382.  
  4383.                                         else if (!c.isOnline()) {
  4384.                                             SocketManager
  4385.                                                     .GAME_SEND_MESSAGE(
  4386.                                                             _perso,
  4387.                                                             "Le joueur "
  4388.                                                                     + c.get_name()
  4389.                                                                     + " n'est pas connecté !",
  4390.                                                             Config.CONFIG_MOTD_COLOR);
  4391.                                             break;
  4392.                                         } else if (c.get_fight() != null) {
  4393.                                             SocketManager
  4394.                                                     .GAME_SEND_MESSAGE(
  4395.                                                             _perso,
  4396.                                                             "Le joueur "
  4397.                                                                     + c.get_name()
  4398.                                                                     + " est en combat !",
  4399.                                                             Config.CONFIG_MOTD_COLOR);
  4400.                                             break;
  4401.                                         } else {
  4402.                                             K3.addGroup(_perso.getGroup());
  4403.                                             break;
  4404.                                         }
  4405.                                     } catch (Exception e) {
  4406.                                     }
  4407.                                 }
  4408.                             } else {
  4409.                                 if (_perso.get_fight() != null) {
  4410.                                     SocketManager
  4411.                                             .GAME_SEND_MESSAGE(
  4412.                                                     _perso,
  4413.                                                     "Vous êtes actuellement en combat !",
  4414.                                                     Config.CONFIG_MOTD_COLOR);
  4415.                                     break;
  4416.                                 } else {
  4417.                                     K3.addPlayer(_perso);
  4418.                                     break;
  4419.                                 }
  4420.                             }
  4421.                         } else if (split.equals("off")) {
  4422.                             try {
  4423.  
  4424.                                 if (_perso.getKolizeum3() == 1
  4425.                                         && _perso.get_fight() != null) {
  4426.                                     SocketManager.GAME_SEND_MESSAGE(_perso,
  4427.                                             "Vous êtes en plein tournoi !",
  4428.                                             Config.CONFIG_MOTD_COLOR);
  4429.                                     break;
  4430.                                 } else if (_perso.getKolizeum3() == -1) {
  4431.                                     SocketManager
  4432.                                             .GAME_SEND_MESSAGE(
  4433.                                                     _perso,
  4434.                                                     "Vous n'êtes pas inscris au kolizeum !",
  4435.                                                     Config.CONFIG_MOTD_COLOR);
  4436.                                     break;
  4437.                                 } else {
  4438.                                     K3.delPlayer(_perso);
  4439.                                     break;
  4440.                                 }
  4441.                             } catch (Exception e) {
  4442.                             }
  4443.  
  4444.                         } else if (split.equals("infos")) {
  4445.                             if (_perso.getKolizeum3() == 1
  4446.                                     && _perso.get_fight() != null) {
  4447.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  4448.                                         "Vous êtes en plein tournoi !",
  4449.                                         Config.CONFIG_MOTD_COLOR);
  4450.                                 break;
  4451.                             } else if (_perso.getKolizeum3() == -1) {
  4452.                                 SocketManager
  4453.                                         .GAME_SEND_MESSAGE(
  4454.                                                 _perso,
  4455.                                                 "Vous n'êtes pas inscris au kolizeum !",
  4456.                                                 Config.CONFIG_MOTD_COLOR);
  4457.                                 break;
  4458.                             } else {
  4459.                                 String content = null;
  4460.                                 if (_perso.getKoliTeam().getkCharacters()
  4461.                                         .size() < Config.PLAYER_KOLI3)
  4462.                                     content = "Il manque <b>"
  4463.                                             + (Config.PLAYER_KOLI3 - _perso
  4464.                                                     .getKoliTeam()
  4465.                                                     .getkCharacters().size())
  4466.                                             + "</b> joueurs dans votre équipe !";
  4467.                                 else
  4468.                                     content = "Votre équipe est au complet ! Patientez le temps qu'une autre équipe soit formée..";
  4469.  
  4470.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  4471.                                         content, Config.CONFIG_MOTD_COLOR);
  4472.                                 break;
  4473.                             }
  4474.                         } else {
  4475.                             SocketManager
  4476.                                     .GAME_SEND_MESSAGE(
  4477.                                             _perso,
  4478.                                             "Tâche non reconnue, faites ."
  4479.                                                     + command.getName()
  4480.                                                     + " pour avoir des informations sur la commande.",
  4481.                                             AllColor.RED);
  4482.                             break;
  4483.                         }
  4484.                         break;
  4485.                     case -2:
  4486.                         if(_perso.get_fight() != null){
  4487.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  4488.                                     "Impossible de se téléporter en combat.",
  4489.                                     AllColor.RED);
  4490.                         }
  4491.                         mapID = 952;
  4492.                         cellID =  462;
  4493.                         SocketManager.GAME_SEND_BAIO_PACKET(_perso,"Bienvenue sur la map echangeur d'orbre.\n Tout les items en vente sur les PNJ sont à 1000 Orbres, ne vous fiez pas au prix affiché!");
  4494.                         _perso.teleport(mapID, cellID);
  4495.                        
  4496.                         break;//JP                 
  4497.                     case 150:
  4498.                         if(_perso.get_fight() != null){
  4499.                             SocketManager.GAME_SEND_MESSAGE(_perso,
  4500.                                     "Impossible de se téléporter en combat.",
  4501.                                     AllColor.RED);
  4502.                         }
  4503.                         mapID = 19345;
  4504.                         cellID =  462;
  4505.                         SocketManager.GAME_SEND_BAIO_PACKET(_perso,"Bienvenue sur la map Boutique.\n Tout les items en vente sur les PNJ sont à 60 points boutique, ne vous fiez pas au prix affiché!");
  4506.                         _perso.teleport(mapID, cellID);
  4507.                        
  4508.                         break;
  4509.                     case 730://creation de titre personalisee
  4510.                         String response = "";
  4511.                        
  4512.                         try {
  4513.                             String _infos = msg.substring(command.getName().length() + 2, msg.length() - 1);
  4514.                             String _color = _infos.split(" ")[_infos.split(" ").length-1];
  4515.                             String _title = _infos.substring(0, _infos.length() - _color.length());
  4516.                             int _colorToSend = Integer.parseInt(_color, 16);
  4517.                             response = Util.SendPost(_title+";"+_colorToSend, _perso);
  4518.                         } catch (Exception e) {
  4519.                             // TODO Auto-generated catch block
  4520.                             e.printStackTrace();
  4521.                         }
  4522.                         switch(response.charAt(0))
  4523.                         {
  4524.                         case 'Y':
  4525.                             String id = response.split("/")[1].trim();
  4526.                             _perso.set_title(Integer.parseInt(id));
  4527.                             SocketManager.GAME_SEND_MESSAGE(_perso, "Le titre vient d'être crée et ajouté à votre personnage ! \n Merci de vider la cache pour pouvoir le visualiser.", Config.CONFIG_MOTD_COLOR);
  4528.                             break;
  4529.                         case 'N':
  4530.                             SocketManager.GAME_SEND_MESSAGE(_perso, "Une erreur est survenu lors de la creation de votre titre.", Config.CONFIG_MOTD_COLOR);
  4531.                         break;
  4532.                         default:
  4533.                             SocketManager.GAME_SEND_MESSAGE(_perso, "Erreur inattendu", Config.CONFIG_MOTD_COLOR);
  4534.                             break;
  4535.                         }
  4536.                         break;
  4537.                         //JP
  4538.                     case 51:// Send des commandes
  4539.                         try {
  4540.                             int numero;
  4541.                             try {
  4542.                                 numero = Integer.parseInt(msg.replace(
  4543.                                         ".achatkoli ", "").replace("|", ""));
  4544.                             } catch (Exception e) {
  4545.                                 SocketManager.GAME_SEND_MESSAGE(
  4546.                                         _perso,
  4547.                                         msg.replace(".achatkoli ", "").replace(
  4548.                                                 "|", "")
  4549.                                                 + ":msg", AllColor.RED);
  4550.                                 SocketManager
  4551.                                         .GAME_SEND_MESSAGE(
  4552.                                                 _perso,
  4553.                                                 "Il semblerait que vous n'avez pas utiliser un format de commande correct, veuillez réessayer.",
  4554.                                                 AllColor.RED);
  4555.                                 break;
  4556.                             }
  4557.                             String Commande = SQLManager.RECOMPBYID(numero);
  4558.                             if (Commande == null) {
  4559.                                 SocketManager
  4560.                                         .GAME_SEND_MESSAGE(
  4561.                                                 _perso,
  4562.                                                 "Aucunes commandes ne correspond à ce numéro.",
  4563.                                                 AllColor.RED);
  4564.                                 break;
  4565.                             }
  4566.                             if (_perso.get_fight() != null) {
  4567.                                 SocketManager.GAME_SEND_MESSAGE(_perso,
  4568.                                         "Vous êtes en combat..", AllColor.RED);
  4569.                                 break;
  4570.                             }
  4571.                             String nom, arg;
  4572.                             int typ, cout;
  4573.                             try {
  4574.                                 nom = Commande.split("/")[0];
  4575.                                 cout = Integer.parseInt(Commande.split("/")[1]);
  4576.                                 typ = Integer.parseInt(Commande.split("/")[2]);
  4577.                                 arg = Commande.split("/")[3];
  4578.                             } catch (Exception e) {
  4579.                                 break;
  4580.                             }
  4581.                             if (!_perso.hasItemTemplate(100111, cout)) {
  4582.                                 SocketManager
  4583.                                         .GAME_SEND_MESSAGE(
  4584.                                                 _perso,
  4585.                                                 "Désolé, il semblerait que vous n'avez pas assez de kolizeton pour effectuer cette action.",
  4586.                                                 AllColor.RED);
  4587.                                 break;
  4588.                             }
  4589.                             switch (typ) {
  4590.                             case 1:// ItemMax
  4591.                                 int template = Integer
  4592.                                         .parseInt(arg.split(",")[0]);
  4593.                                 int nbrt = Integer.parseInt(arg.split(",")[1]);
  4594.                                 ObjTemplate recompt = World
  4595.                                         .getObjTemplate(template);
  4596.                                 Objects recomp = recompt.createNewItem(nbrt,
  4597.                                         true, -1);
  4598.                                 if (_perso.addObjet(recomp, true))
  4599.                                     World.addObjet(recomp, true);
  4600.                                 break;
  4601.                             case 2:// Titre
  4602.                                 _perso.set_title((byte) Integer.parseInt(arg));
  4603.                                 if (_perso.get_fight() == null)
  4604.                                     SocketManager.GAME_SEND_ALTER_GM_PACKET(
  4605.                                             _perso.get_curCarte(), _perso);
  4606.                                 break;
  4607.                             }
  4608.                             _perso.removeByTemplateID(100111, cout);
  4609.                             SocketManager
  4610.                                     .GAME_SEND_MESSAGE(
  4611.                                             _perso,
  4612.                                             "Vous venez d'acheter "
  4613.                                                     + nom
  4614.                                                     + " pour la somme de "
  4615.                                                     + cout
  4616.                                                     + " kolizetons ! Merci de la confiance que vous nous apporter. Le staff vous en remercie.",
  4617.                                             AllColor.RED);
  4618.                         } catch (Exception e) {
  4619.                             break;
  4620.                         }
  4621.                         break;
  4622.                     default:
  4623.                         break;
  4624.                     }
  4625.                 }
  4626.                 SQLManager.SAVE_PERSONNAGE(_perso, true);
  4627.                 return true;
  4628.             } else {
  4629.                 SocketManager.GAME_SEND_MESSAGE(_perso,
  4630.                         "Commande entré n'a pas pu être traité.",
  4631.                         Config.CONFIG_MOTD_COLOR);
  4632.                 return true;
  4633.             }
  4634.  
  4635.         }
  4636.         return false;
  4637.     }
  4638.    
  4639.         public static void updateMyPoints(Player player, int newcount)
  4640.         {
  4641.             SQLManager.UPDATE_ACCOUNT_point(newcount,
  4642.                     player.getAccID());
  4643.         }
  4644.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement