Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package command;
- import java.util.ArrayList;
- import java.util.Iterator;
- import org.Wokama.client.Account;
- import org.Wokama.client.Player;
- import org.Wokama.client.Player.BoostSpellStats;
- import org.Wokama.client.Player.Stats;
- import client.tool.RapidStuff;
- import common.ConditionParser;
- import common.Constant;
- import common.SQLManager;
- import common.SocketManager;
- import common.World;
- import fight.arena.Arena;
- import fight.arena.Team;
- import fight.deathmatch.Manager;
- import fight.extending.Stalk;
- import fight.kolizeum.K2;
- import fight.kolizeum.K3;
- import game.GameSendThread;
- import game.parse.ParseObject;
- import game.tool.AllColor;
- import game.tool.Util;
- import kernel.Config;
- import object.Gmap;
- import object.Gmap.MountPark;
- import object.Objects;
- import object.Objects.ObjTemplate;
- import object.job.Job.StatsMetier;
- import object.spell.Spell.SortStats;
- import object.spell.SpellEffect;
- public class PlayerCommand {
- public static boolean launchNewCommand(String msg, Player _perso,
- Account _compte, long _timeLastsave, GameSendThread _out) {
- if (msg.charAt(0) == '.') {
- CommandManager command = CommandManager.getCommandByName(msg
- .substring(1, msg.length() - 1));
- if (command != null) {
- if (command.getCond() != null
- && !ConditionParser.validConditions(_perso,
- command.getCond())) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous ne faite pas partie du bon monde pour executer cette commande!",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (command.getPrice() > 0) {
- int points = Util.loadPointsByAccount(_perso.get_compte());
- int price = command.getPrice();
- int diff = 0;
- if (points < price) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous n'avez pas assez de points, il vous manque "
- + (price - points) + " points !",
- Config.CONFIG_MOTD_COLOR);
- return true;
- } else {
- diff = (points - price);
- Util.updatePointsByAccount(_perso.get_compte(), diff);
- int accountPoints = Util.loadPointsByAccount(_perso
- .get_compte());
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous venez de perdre "
- + price
- + " points boutiques. Votre compte contient "
- + accountPoints
- + " points boutiques !Pour continuer à acheter. Merci de votre confiance que vous nous apportée !",
- Config.CONFIG_MOTD_COLOR);
- }
- }
- for (String f : command.getFunction().split(";")) {
- int type = -1;
- String args = null;
- if (f.contains("-")) {
- args = f.split("-")[1];
- type = Integer.parseInt(f.split("-")[0]);
- } else {
- type = Integer.parseInt(f);
- }
- switch (type) {
- case 0: // Liste des commandes général
- String infos = "<b>.utilepvp129</b> - permet de vous montrer les commandes pvp 1.29.\n"
- + "<b>.pvp2</b> - permet de vous montrer les commandes pvp 1.29/2.0.\n"
- + "<b>.semi1</b> - permet de vous montrer les commandes semi 1.29/2.0.\n"
- + "<b>.wakfu</b> - permet de vous montrer les commandes wakfu.";
- SocketManager.GAME_SEND_INBOX(_perso, infos);
- break;
- case 108: // Liste des commandes boutique pvp 1.29
- String infos108 = "<b>.FMPA</b> - permet de mettre 1 pa sur un item [10]pts.\n"
- + "<b>.FMPM</b> - permet de mettre 1 pm sur un item [10]pts.\n"
- + "<b>.changename</b> - permet de changer son nom [50].\n";
- SocketManager.GAME_SEND_INBOX(_perso, infos108);
- break;
- case 105: // Liste des commandes alignement
- String infos5 = "<b>.demon</b> - permet de vous mettre demon.\n"
- + "<b>.ange</b> - permet de vous mettre ange.\n"
- + "<b>.neutre</b> - permet de vous mettre neutre.\n";
- SocketManager.GAME_SEND_INBOX(_perso, infos5);
- break;
- case 107: // Liste des commandes boutique
- {
- if (_perso.get_exo() == 0){ //item requis//
- String infos7 = "<b>.FMPA</b> - permet de mettre 1 pa sur un item [30]pts.\n"
- + "<b>.FMPM</b> - permet de mettre 1 pm sur un item [30]pts.\n"
- + "<b>.changename</b> - permet de changer son nom [50].\n";
- SocketManager.GAME_SEND_INBOX(_perso, infos7);
- break;
- }
- {
- if (_perso.get_exo() == 1){ //item requis//
- String infos7 = "<b>.FMPA</b> - permet de mettre 1 pa sur un item.\n"
- + "<b>.FMPM</b> - permet de mettre 1 pm sur un item.\n"
- + "<b>.changename</b> - permet de changer son nom [50].\n";
- SocketManager.GAME_SEND_INBOX(_perso, infos7);}
- break;
- }}
- case 106: // Liste des commandes serveur
- String infos6 = "<b>.staff</b> - permet de vous afficher le staff dispo.\n"
- + "<b>.infos</b> - permet de voir luptime du serveur.\n"
- + "<b>.reboot</b> - permet de lancer un vote reboot.\n"
- + "<b>.votereboot</b> - permet de votez pour un reboot.\n";
- SocketManager.GAME_SEND_INBOX(_perso, infos6);
- break;
- case 103: // Liste des commandes pvp 1.29
- String infos1 = "<b>.utile129</b> - Vous montrera les commandes utiles.\n"
- + "<b>.serveur</b> - permet de voir les différents commandes du serveur.\n"
- + "<b>.alignement</b> - permet de chosir son alignement.\n"
- + "<b>.boutique</b> - permet de voir les commandes boutique.\n";
- SocketManager.GAME_SEND_INBOX(_perso, infos1);
- break;
- case 102: //Liste des commandes pvp 1.29 utile1
- if (_perso.get_monde() == 1){ //item requis//
- String infos2 = "<b>.level</b> - Vous permet de uplevel.\n"
- + "<b>.shop</b> - permet de vous tp dans la shop de votre monde.\n"
- + "<b>.pvp</b> - permet de vous tp dans la pvp de votre monde.\n"
- + "<b>.delsort</b> - permet de delete les points de sort dun sort.\n"
- + "<b>.points</b> - permet de voir vos points boutique.\n"
- + "<b>.guilde</b> - permet de creer une guilde.\n"
- + "<b>.delsuiveur</b> - permet de delete un suiveur.\n"
- + "<b>.all</b> - permet de parler dans le canal monde.\n"
- + "<b>.fmcac</b> - permet de fm son cac.\n"
- + "<b>.morph</b> - permet de changer son aparence.\n"
- + "<b>.size</b> - permet de changer sa taille.\n"
- + "<b>.demorph</b> - permet de retrouver sa morph.\n"
- + "<b>.boutique</b> - permet de voir les commandes boutique.\n";
- SocketManager.GAME_SEND_INBOX(_perso, infos2);
- break;
- }
- if (_perso.get_monde() == 2){ //item requis//
- String infos2 = "<b>.shop</b> - permet de vous tp dans la shop de votre monde.\n"
- + "<b>.pvp</b> - permet de vous tp dans la pvp de votre monde.\n"
- + "<b>.delsort</b> - permet de delete les points de sort dun sort.\n"
- + "<b>.points</b> - permet de voir vos points boutique.\n"
- + "<b>.guilde</b> - permet de creer une guilde.\n"
- + "<b>.delsuiveur</b> - permet de delete un suiveur.\n"
- + "<b>.all</b> - permet de parler dans le canal monde.\n"
- + "<b>.fmcac</b> - permet de fm son cac.\n"
- + "<b>.size</b> - permet de changer sa taille.\n"
- + "<b>.morph</b> - permet de changer son aparence.\n"
- + "<b>.demorph</b> - permet de retrouver sa morph.\n"
- + "<b>.boutique</b> - permet de voir les commandes boutique.\n";
- SocketManager.GAME_SEND_INBOX(_perso, infos2);
- break;
- }
- if (_perso.get_monde() == 3){ //item requis//
- String infos2 = "<b>.level</b> - Vous permet de uplevel.\n"
- + "<b>.shop</b> - permet de vous tp dans la shop de votre monde.\n"
- + "<b>.pvp</b> - permet de vous tp dans la pvp de votre monde.\n"
- + "<b>.delsort</b> - permet de delete les points de sort dun sort.\n"
- + "<b>.points</b> - permet de voir vos points boutique.\n"
- + "<b>.guilde</b> - permet de creer une guilde.\n"
- + "<b>.delsuiveur</b> - permet de delete un suiveur.\n"
- + "<b>.all</b> - permet de parler dans le canal monde.\n"
- + "<b>.fmcac</b> - permet de fm son cac.\n"
- + "<b>.morph</b> - permet de changer son aparence.\n"
- + "<b>.size</b> - permet de changer sa taille.\n"
- + "<b>.demorph</b> - permet de retrouver sa morph.\n"
- + "<b>.boutique</b> - permet de voir les commandes boutique.\n";
- SocketManager.GAME_SEND_INBOX(_perso, infos2);
- break;
- }
- if (_perso.get_monde() == 5){ //item requis//
- String infos2 = "<b>.shop</b> - permet de vous tp dans la shop de votre monde.\n"
- + "<b>.pvp</b> - permet de vous tp dans la pvp de votre monde.\n"
- + "<b>.delsort</b> - permet de delete les points de sort dun sort.\n"
- + "<b>.points</b> - permet de voir vos points boutique.\n"
- + "<b>.guilde</b> - permet de creer une guilde.\n"
- + "<b>.delsuiveur</b> - permet de delete un suiveur.\n"
- + "<b>.all</b> - permet de parler dans le canal monde.\n"
- + "<b>.fmcac</b> - permet de fm son cac.\n"
- + "<b>.size</b> - permet de changer sa taille.\n"
- + "<b>.morph</b> - permet de changer son aparence.\n"
- + "<b>.demorph</b> - permet de retrouver sa morph.\n"
- + "<b>.boutique</b> - permet de voir les commandes boutique.\n";
- SocketManager.GAME_SEND_INBOX(_perso, infos2);
- break;
- }
- case 950: //staff les mondes
- if (_perso.get_compte().get_gmLvl() > 1){
- String infos2 = "<b>pvp full 1.29</b> - monde 1 /console monde 1.\n"
- + "<b>semi anka 1.29/2.0</b> - monde 2 /console monde 2.\n"
- + "<b>pvp 1.29/2.0</b> - monde 3 /console monde 3.\n"
- + "<b>semi anka 1.29</b> - monde 5 /console monde 5.\n";
- SocketManager.GAME_SEND_INBOX(_perso, infos2);
- break;
- }
- case 1: //Liste des commandes VIP
- SocketManager.GAME_SEND_MESSAGE(_perso, CommandManager.getCommandList(true), Config.CONFIG_MOTD_COLOR);
- break;
- case 935: //multi monde
- short newMapID = Short.parseShort(args.split(",")[0]);
- int newCellID = Integer.parseInt(args.split(",")[1]);
- if ((_perso != null) && (_perso.isOnline()))
- _perso.teleport(newMapID,newCellID);
- break;
- case 206: // mimibiote .mibi item_equipé id_item_skin
- String[] _arg;
- Objects o_stats;
- ObjTemplate t_skin, t_stat;
- int id_skin;
- String explication = "." + command.getName() + " position id_skin ";
- String position = "Liste des positions : cape, coiffe, anneau1, anneau2, amulette, ceinture bottes, arme, bouclier, familier";
- if(msg.length() <= command.getName().length()+2)
- {
- SocketManager.GAME_SEND_MESSAGE(_perso, explication, Config.CONFIG_MOTD_COLOR);
- break;
- }
- _arg = msg.substring(command.getName().length()+2, msg.length()-1).split(" ");
- if(_arg.length < 2)
- {
- SocketManager.GAME_SEND_MESSAGE(_perso, explication, Config.CONFIG_MOTD_COLOR);
- break;
- }
- try
- {
- id_skin = Integer.parseInt(_arg[1]);
- }catch(Exception e)
- {
- SocketManager.GAME_SEND_MESSAGE(_perso, "Vous n'avez un saisi une valeur correct", Config.CONFIG_MOTD_COLOR);
- break;
- }
- switch(_arg[0])
- {
- case "cape":
- o_stats = _perso.getObjetByPos(Constant.ITEM_POS_CAPE);
- break;
- case "coiffe":
- o_stats = _perso.getObjetByPos(Constant.ITEM_POS_COIFFE);
- break;
- case "anneau1":
- o_stats = _perso.getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- break;
- case "anneau2":
- o_stats = _perso.getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- break;
- case "amulette":
- o_stats = _perso.getObjetByPos(Constant.ITEM_POS_AMULETTE);
- break;
- case "bottes":
- o_stats = _perso.getObjetByPos(Constant.ITEM_POS_BOTTES);
- break;
- case "ceinture":
- o_stats = _perso.getObjetByPos(Constant.ITEM_POS_CEINTURE);
- break;
- case "arme":
- o_stats = _perso.getObjetByPos(Constant.ITEM_POS_ARME);
- break;
- case "bouclier":
- o_stats = _perso.getObjetByPos(Constant.ITEM_POS_BOUCLIER);
- break;
- case "familier":
- o_stats = _perso.getObjetByPos(Constant.ITEM_POS_FAMILIER);
- break;
- default:
- o_stats = null;
- }
- if(o_stats == null)
- {
- SocketManager.GAME_SEND_MESSAGE(_perso, position, Config.CONFIG_MOTD_COLOR);
- break;
- }
- t_skin = World.getObjTemplate(id_skin);
- t_stat = o_stats.getTemplate();
- if (t_skin == null) //Si les objets n'existent pas
- {
- SocketManager.GAME_SEND_MESSAGE(_perso, "ID item skin n'existe pas", Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (t_skin.getType() != t_stat.getType())
- {
- SocketManager.GAME_SEND_MESSAGE(_perso, "Les objets ne sont pas du même type", Config.CONFIG_MOTD_COLOR);
- break;
- }
- if(t_skin.getLevel() < t_stat.getLevel())
- {
- SocketManager.GAME_SEND_MESSAGE(_perso, "Impossible, vous essayez de mettre des stats d'un item plus haut level", Config.CONFIG_MOTD_COLOR);
- break;
- }
- Stats s_stat = o_stats.getStats();
- ArrayList<SpellEffect> a_s_stat = o_stats.getEffects();
- BoostSpellStats b_stat = o_stats.getBoostSpellStats();
- Objects new_obj1 = new Objects(World.getNewItemGuid(), t_skin.getID(), 1,
- Constant.ITEM_POS_NO_EQUIPED,
- s_stat,
- a_s_stat,
- b_stat);
- if (_perso.addObjet(new_obj1, true))
- World.addObjet(new_obj1, true);
- SocketManager.GAME_SEND_MESSAGE(_perso, "Création de l'item réussi", Config.CONFIG_MOTD_COLOR);
- break;
- case 940: //teleportation des zone shop
- if (_perso.get_monde() == 2){ //item requis//
- _perso.teleport((short) 10131,255);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous avez bien etait teleporter a votre zone shop.",
- AllColor.GREEN);
- break;
- }
- if (_perso.get_monde() == 1){ //item requis//
- _perso.teleport((short) 13103,380);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous avez bien etait teleporter a votre zone shop.",
- AllColor.GREEN);
- break;
- }
- if (_perso.get_monde() == 3){ //item requis//
- _perso.teleport((short) 10124,251);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous avez bien etait teleporter a votre zone shop.",
- AllColor.GREEN);
- break;
- }
- if (_perso.get_monde() == 5){ //item requis//
- _perso.teleport((short) 10114,282);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous avez bien etait teleporter a votre zone shop.",
- AllColor.GREEN);
- break;
- }
- break;
- case 941: //teleportation des zone PVP
- if (_perso.get_monde() == 2){ //item requis//
- _perso.teleport((short) 10131,241);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous avez bien etait teleporter a votre zone pvp.",
- AllColor.GREEN);
- break;
- }
- if (_perso.get_monde() == 1){ //item requis//
- _perso.teleport((short) 952,297);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous avez bien etait teleporter a votre zone pvp.",
- AllColor.GREEN);
- break;
- }
- if (_perso.get_monde() == 3){ //item requis//
- _perso.teleport((short) 952,297);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous avez bien etait teleporter a votre zone pvp.",
- AllColor.GREEN);
- break;
- }
- if (_perso.get_monde() == 5){ //item requis//
- _perso.teleport((short) 10123,297);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous avez bien etait teleporter a votre zone pvp.",
- AllColor.GREEN);
- break;
- }
- break;
- case 97:// Echange hydriglace!
- {
- if ((_perso != null) && (_perso.isOnline()))
- if (!_perso.hasItemTemplate(95214, 1500)) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il vous faut 1500 Sufoglace pour effectuée cette commande.",
- AllColor.GOLD);
- break;
- }
- if ((_perso != null) && (_perso.isOnline()))
- _perso.removeByTemplateID(95214, 1500);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous venez de perdre 1500 lace. ",
- AllColor.GOLD);
- }
- int tID1 = Integer.parseInt(args.split(",")[0]);
- int nbr = Integer.parseInt(args.split(",")[1]);
- boolean isMax = Boolean.parseBoolean(args.split(",")[2]);
- Objects.ObjTemplate t1 = World.getObjTemplate(tID1);
- Objects obj1 = t1.createNewItem(nbr, isMax, -1);
- if (_perso.addObjet(obj1, true))
- World.addObjet(obj1, true);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous venez dobtenir votre dofus frigost!. ",
- AllColor.RED);
- break;
- case 2: // Envoyer une message
- String boxMess = args;
- SocketManager.GAME_SEND_MESSAGE(_perso, boxMess,
- AllColor.GOLD);
- break;
- case 5: // Staff en ligne
- String staff = "Membres du staff Sufoko connectés :\n";
- boolean allOffline = true;
- for (int i = 0; i < World.getOnlinePersos().size(); i++) {
- if (World.getOnlinePersos().get(i).get_compte()
- .get_name().equalsIgnoreCase("diego")
- && !World.getOnlinePersos().get(i)
- .get_name()
- .equalsIgnoreCase("[diego]"))
- continue;
- if (World.getOnlinePersos().get(i).get_compte()
- .get_gmLvl() > 0) {
- staff += "- "
- + World.getOnlinePersos().get(i)
- .get_name() + " (";
- if (World.getOnlinePersos().get(i).get_compte()
- .get_gmLvl() > 1
- && _perso.get_monde() == 1)
- staff += "staff pvp 1.29)";
- else if (World.getOnlinePersos().get(i)
- .get_compte().get_gmLvl() > 1
- && _perso.get_monde() == 2)
- staff += "staff semi 2.0)";
- else if (World.getOnlinePersos().get(i)
- .get_compte().get_gmLvl() > 3
- && _perso.get_monde() == 3)
- staff += "staff pvp 2.0)";
- else if (World.getOnlinePersos().get(i)
- .get_compte().get_gmLvl() > 1
- && _perso.get_monde() == 5)
- staff += "staff semi 2.0)";
- else
- staff += "Unknown";
- staff += "\n";
- allOffline = false;
- }
- }
- if (!staff.isEmpty() && !allOffline) {
- SocketManager.GAME_SEND_INBOX(_perso, staff);
- } else if (allOffline) {
- SocketManager
- .GAME_SEND_INBOX(_perso,
- "Aucun membre du staff Sufoko est présent !");
- }
- break;//bon c koi le truk
- case 6: // Sauvegarde du personnage
- if ((System.currentTimeMillis() - _timeLastsave) < 360000
- || _perso.get_fight() != null)
- break;
- _timeLastsave = System.currentTimeMillis();
- SQLManager.SAVE_PERSONNAGE(_perso, true);
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Votre personnage <b>" + _perso.get_name()
- + "</b> est sauvegardé.", AllColor.RED);
- break;
- case 7: // Rafraichissement de Map
- Gmap map = _perso.get_curCarte();
- map.refreshSpawns();
- break;
- case 8: // Vitalité Max
- /*int count = 100;
- Player perso = _perso;
- int newPDV = (perso.get_PDVMAX() * count) / 100;
- perso.set_PDV(newPDV);
- if (perso.isOnline())
- SocketManager.GAME_SEND_STATS_PACKET(perso);
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Votre vie est désormais au maximum !",
- Config.CONFIG_MOTD_COLOR);*/
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Si tu veux ta vitalité, va t'acheter du pain !",
- Config.CONFIG_MOTD_COLOR);
- break;
- case 9: // Création de guilde
- if (_perso.get_guild() != null
- || _perso.getGuildMember() != null
- || !_perso.isOnline() || _perso == null) {
- break;
- } else {
- SocketManager.GAME_SEND_gn_PACKET(_perso);
- }
- break;
- case 79: // Parchotage
- if (_perso.get_fight() != null)
- break;
- int nbreElement = 150;
- if (_perso.get_baseStats().getEffect(125) < 150) {
- _perso.get_baseStats()
- .addOneStat(
- 125,
- 150 - _perso.get_baseStats()
- .getEffect(125));
- nbreElement++;
- }
- if (_perso.get_baseStats().getEffect(124) < 150) {
- _perso.get_baseStats()
- .addOneStat(
- 124,
- 150 - _perso.get_baseStats()
- .getEffect(124));
- nbreElement++;
- }
- if (_perso.get_baseStats().getEffect(118) < 150) {
- _perso.get_baseStats()
- .addOneStat(
- 118,
- 150 - _perso.get_baseStats()
- .getEffect(118));
- if (nbreElement == 0)
- nbreElement++;
- }
- if (_perso.get_baseStats().getEffect(126) < 150) {
- _perso.get_baseStats()
- .addOneStat(
- 126,
- 150 - _perso.get_baseStats()
- .getEffect(126));
- if (nbreElement == 0)
- nbreElement++;
- }
- if (_perso.get_baseStats().getEffect(119) < 150) {
- _perso.get_baseStats()
- .addOneStat(
- 119,
- 150 - _perso.get_baseStats()
- .getEffect(119));
- if (nbreElement == 0)
- nbreElement++;
- }
- if (_perso.get_baseStats().getEffect(123) < 150) {
- _perso.get_baseStats()
- .addOneStat(
- 123,
- 150 - _perso.get_baseStats()
- .getEffect(123));
- if (nbreElement == 0)
- nbreElement++;
- }
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "1500 points boutique vous on etait debité vous ête desormais parcho 150 all.",
- AllColor.RED);
- if (nbreElement == 150) {
- SocketManager.GAME_SEND_Im_PACKET(_perso,
- "Vous ête dejas parchoté 150 ALL.!");
- } else {
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- }
- break;
- case 303: // Téléportation pour le monde pvp 1.29 monde 1
- short mapID303 = (short) Integer
- .parseInt(args.split(",")[0]);
- int cellID303 = Integer.parseInt(args.split(",")[1]);
- if (_perso.get_monde() == 1){ //item requis//
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous ne faite pas partie du bon mondes pour vous tp a cette endroit!.",
- AllColor.GREEN);
- break;
- }
- _perso.teleport(mapID303, cellID303);
- break;
- case 10: // Parchotage
- if (_perso.get_fight() != null)
- break;
- int nbreElement1 = 0;
- if (_perso.get_baseStats().getEffect(125) < 101) {
- _perso.get_baseStats()
- .addOneStat(
- 125,
- 101 - _perso.get_baseStats()
- .getEffect(125));
- nbreElement1++;
- }
- if (_perso.get_baseStats().getEffect(124) < 101) {
- _perso.get_baseStats()
- .addOneStat(
- 124,
- 101 - _perso.get_baseStats()
- .getEffect(124));
- nbreElement1++;
- }
- if (_perso.get_baseStats().getEffect(118) < 101) {
- _perso.get_baseStats()
- .addOneStat(
- 118,
- 101 - _perso.get_baseStats()
- .getEffect(118));
- if (nbreElement1 == 0)
- nbreElement1++;
- }
- if (_perso.get_baseStats().getEffect(126) < 101) {
- _perso.get_baseStats()
- .addOneStat(
- 126,
- 101 - _perso.get_baseStats()
- .getEffect(126));
- if (nbreElement1 == 0)
- nbreElement1++;
- }
- if (_perso.get_baseStats().getEffect(119) < 101) {
- _perso.get_baseStats()
- .addOneStat(
- 119,
- 101 - _perso.get_baseStats()
- .getEffect(119));
- if (nbreElement1 == 0)
- nbreElement1++;
- }
- if (_perso.get_baseStats().getEffect(123) < 101) {
- _perso.get_baseStats()
- .addOneStat(
- 123,
- 101 - _perso.get_baseStats()
- .getEffect(123));
- SocketManager
- .GAME_SEND_Im_PACKET(_perso,
- "parcho effectue avec succes!");
- if (nbreElement1 == 0)
- nbreElement1++;
- }
- if (nbreElement1 == 0) {
- SocketManager
- .GAME_SEND_Im_PACKET(_perso,
- "116;<i>Serveur: </i>Vous êtes déjà parchotté dans tous les éléments !");
- } else {
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- }
- break;
- case 11: // Apprendre un sort
- int spellID = Integer.parseInt(args.split(",")[0]);
- int level = Integer.parseInt(args.split(",")[1]);
- _perso.learnSpell(spellID, level, true, true);
- break;
- case 12: // Alignement
- byte align = (byte) Integer.parseInt(args);
- _perso.modifAlignement(align);
- if (_perso.isOnline())
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- break;
- case 13: // Ajouter Kamas
- int kamas = Integer.parseInt(args);
- _perso.addKamas(kamas);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- break;
- case 601:
- if(_perso.get_fight() != null){
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Impossible de se téléporter en combat.",
- AllColor.RED);
- }
- int delsuiveur = 0;//Ne pas toucher a la valeur 0, 0= delete du perso suiveur!
- _perso.set_suiveur(delsuiveur);
- SocketManager.GAME_SEND_ALTER_GM_PACKET(
- _perso.get_curCarte(), _perso);
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Votre perso suiveur a bien etait enlever!.",
- AllColor.RED);
- break;
- case 14: // Ajouter Item
- int tID = 0;
- int taman2222 = 10;
- int maispoints2222 = SQLManager.GET_POINTS(_perso
- .getAccID());
- if (maispoints2222 < taman2222) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il te faut "
- + taman2222
- + " points pour utiliser cette commande.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- tID = Integer.parseInt(msg.substring(
- command.getName().length() + 2,
- msg.length() - 1).trim());
- } catch (Exception e) {
- String liste_item = "Liste d'ids :\n";
- for (String valid_id : args.split(",")) {
- int tp_id = -1;
- try {
- tp_id = Integer.parseInt(valid_id);
- } catch (Exception xe) {
- continue;
- }
- ObjTemplate t = World.getObjTemplate(tp_id);
- if (t == null)
- continue;
- liste_item += "<b>" + t.getID() + "</b> - "
- + t.getName() + "\n";
- }
- SocketManager.GAME_SEND_INBOX(_perso,
- "Vous devez faire ." + command.getName()
- + " (id du template)\n"
- + liste_item);
- break;
- }
- if (tID < 0)
- break;
- boolean valid_tp = false;
- for (String valid_id : args.split(",")) {
- if (Integer.parseInt(valid_id) == tID)
- valid_tp = true;
- }
- if (!valid_tp) {
- String liste_item = "Liste d'ids :\n";
- for (String valid_id : args.split(",")) {
- int tp_id = -1;
- try {
- tp_id = Integer.parseInt(valid_id);
- } catch (Exception e) {
- continue;
- }
- ObjTemplate t = World.getObjTemplate(tp_id);
- if (t == null)
- continue;
- liste_item += "<b>" + t.getID() + "</b> - "
- + t.getName() + "\n";
- }
- SocketManager.GAME_SEND_INBOX(_perso, liste_item);
- break;
- }
- int accountPoints = Util.loadPointsByAccount(_perso
- .get_compte());
- int newspoints2222 = maispoints2222 - taman2222;
- SQLManager.UPDATE_ACCOUNT_point(newspoints2222,
- _perso.getAccID());
- ObjTemplate t = World.getObjTemplate(tID);
- if (t == null)
- break;
- Objects obj = t.createNewItem(1, true, -1);
- if (obj == null)
- break;
- if (_perso.addObjet(obj, true))// Si le joueur n'avait
- // pas d'item
- // similaire
- World.addObjet(obj, true);
- SocketManager.GAME_SEND_Ow_PACKET(_perso);
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous venez de recevoir l'item " + t.getName()
- + " jet parfait ! Tu vien de perdre "
- + taman2222
- + " points boutique! Il te reste "
- + accountPoints
- + " Pour continuer a acheté",
- Config.CONFIG_MOTD_COLOR);
- break;
- case 15: // Devenir VIP
- Account account = _perso.get_compte();
- if (account == null)
- return true;
- if (account.get_vip() == 0) {
- account.set_vip(1);
- SQLManager.UPDATE_ACCOUNT_VIP(account);
- }
- break;
- case 16: // Ajouter un titre
- _perso.set_title((byte) Integer.parseInt(args));
- if (_perso.get_fight() == null)
- SocketManager.GAME_SEND_ALTER_GM_PACKET(
- _perso.get_curCarte(), _perso);
- break;
- case 17: // Reset des caractéristiques
- _perso.get_baseStats().addOneStat(125,
- -_perso.get_baseStats().getEffect(125) + 0);
- _perso.get_baseStats().addOneStat(124,
- -_perso.get_baseStats().getEffect(124) + 0);
- _perso.get_baseStats().addOneStat(118,
- -_perso.get_baseStats().getEffect(118) + 0);
- _perso.get_baseStats().addOneStat(123,
- -_perso.get_baseStats().getEffect(123) + 0);
- _perso.get_baseStats().addOneStat(119,
- -_perso.get_baseStats().getEffect(119) + 0);
- _perso.get_baseStats().addOneStat(126,
- -_perso.get_baseStats().getEffect(126) + 0);
- _perso.addCapital((_perso.get_lvl() - 1) * 5
- - _perso.get_capital());
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vos points de caractéristique on etait remis à 0.",
- AllColor.RED);
- break;
- case 400: // Lancer une traque
- Stalk.newTraque(_perso);
- break;
- case 401: // Récompense de traque
- Stalk.getRecompense(_perso);
- break;
- case 402: // Géoposition de la cible
- Stalk.getTraquePosition(_perso);
- break;
- case 21: // Désaprendre un sort
- _perso.setisForgetingSpell(true);
- SocketManager.GAME_SEND_FORGETSPELL_INTERFACE('+',
- _perso);
- break;
- case 22: // Morph
- int morphID = 0;
- try {
- morphID = Integer.parseInt(msg.substring(
- command.getName().length() + 2,
- msg.length() - 1).trim());
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "////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",
- AllColor.RED);
- break;
- }
- if (Config.CONFIG_MORPH_PROHIBIDEN.contains(morphID)) {
- _perso.set_gfxID(morphID);
- SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
- _perso.get_curCarte(), _perso.get_GUID());
- SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
- _perso.get_curCarte(), _perso);
- }
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Votre Morph à bien etait mise en place.",
- AllColor.RED);
- break;
- case 23: // Donner une statistique
- int statID = Integer.parseInt(args.split(",")[0]);
- int value = Integer.parseInt(args.split(",")[1]);
- _perso.get_baseStats().addOneStat(statID, value);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- break;
- case 123: // Donner une statistique
- String packet = "/ui itemsummoner";
- _perso.get_compte().getGameThread().setCommand(new GmCommand(_perso));
- _perso.get_compte().getGameThread().getCommand().consoleCommand(packet);
- break;
- case 24: // Ouvrir la banque
- SocketManager.GAME_SEND_Im_PACKET(_perso, "1128;" + 0);
- break;
- case 999: // Ouvrir lenclos
- if (_perso.getInMountPark() == null)
- _perso.set_away(true);
- MountPark park = World.getCarte((short) 8745)
- .getMountPark();
- _perso.setPark(park);
- String str = park.parseData(_perso.get_GUID(),
- (park.get_owner() == -1 ? true : false));
- SocketManager.GAME_SEND_ECK_PACKET(_perso, 16, str);
- break;
- case 777: //Morph item
- int id_item_apparance;
- int id_item_jet;
- try {
- String morph_item[] = msg.substring(command.getName().length()+2, msg.length() - 1).split(" ");
- id_item_apparance = Integer.parseInt(morph_item[0]);
- id_item_jet = Integer.parseInt(morph_item[1]);
- }catch(Exception e){
- 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);
- return true;
- }
- ObjTemplate T = World.getObjTemplate(id_item_apparance);
- Objects morphitem = T.createNewMorphItem(id_item_apparance, World.getObjet(id_item_jet));
- if(_perso.addObjet(morphitem, true))World.addObjet(morphitem, true);
- SocketManager.GAME_SEND_Ow_PACKET(_perso);
- SocketManager.GAME_SEND_MESSAGE(_perso, "Item a bien étais transformer !", Config.CONFIG_MOTD_COLOR);
- break;
- case 25: // Ajouter des points de sort
- int points = Integer.parseInt(args);
- _perso.addSpellPoint(points);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- break;
- case 26: // Ajouter des points de capital
- int capital = Integer.parseInt(args);
- _perso.addCapital(capital);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- break;
- case 80: // DEMORPH
- Player target = _perso;
- int morphID1 = target.get_classe() * 10
- + target.get_sexe();
- target.set_gfxID(morphID1);
- SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
- target.get_curCarte(), target.get_GUID());
- SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
- target.get_curCarte(), target);
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Votre morph a bien etait enlevé!.",
- AllColor.RED);
- break;
- case 27: // Commandes Kolizeum 1vs1
- Manager k1 = World.kolizeum;
- String argument;
- try {
- argument = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Faites .kolizeum off/on.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- switch (argument.toLowerCase()) {
- case "on": {
- if (_perso.getKolizeum1() != null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "<b>Kolizeum </b>: vous êtes dejà inscrit !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- break;
- }
- case "off": {
- if (_perso.getKolizeum1() == null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "<b>Kolizeum</b>: vous n'êtes pas inscrit !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- k1.removePlayer(_perso);
- break;
- }
- }
- break;
- case 28: // Canal sans limite
- String RangP = "";
- if (_perso.get_monde() == 0)
- RangP = "Nouveau";
- if (_perso.get_monde() == 1)
- RangP = "pvp 1.29";
- if (_perso.get_monde() == 2)
- RangP = "semi 2.0";
- if (_perso.get_monde() == 3)
- RangP = "pvp 2.0";
- if (_perso.get_monde() == 5)
- RangP = "semi 1.29";
- if (_perso.get_monde() == 1
- && _perso.get_compte().get_gmLvl() > 1)
- RangP = "Staff PVP 1.29";
- if (_perso.get_monde() == 2
- && _perso.get_compte().get_gmLvl() > 1)
- RangP = "Staff semi 2.0";
- if (_perso.get_monde() == 3
- && _perso.get_compte().get_gmLvl() > 1)
- RangP = "Staff PVP 2.0";
- if (_perso.get_monde() == 5
- && _perso.get_compte().get_gmLvl() > 1)
- RangP = "Staff semi 1.29";
- String prefix = _perso.get_name();
- String sp = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- String clicker_name = "<a href='asfunction:onHref,ShowPlayerPopupMenu,"
- + _perso.get_name() + "'>" + prefix + "</a>";
- SocketManager.GAME_SEND_MESSAGE_TO_ALL(
- (new StringBuilder("(" + RangP + ")<b> "))
- .append(clicker_name).append("</b> : ")
- .append(sp).toString(), "000099");
- break;
- case 29: // Création de Team Arena
- String s;
- try {
- s = msg.substring(command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Pour créer une équipe, invitez votre partenaire dans votre groupe, puis éxécutez .createteam + Nom de votre Team",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (s.length() > 20 || s.contains("#")
- || s.contains(",") || s.contains(";")
- || s.contains("/") || s.contains("!")
- || s.contains(".") || s.contains("'")
- || s.contains("*") || s.contains("$")
- || s.contains("+") || s.contains("-")
- || s.contains("|") || s.contains("~")
- || s.contains("(") || s.contains(")")
- || s.contains("[") || s.contains("]")
- || s.contains("%"))
- {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le nom de votre équipe ne doit pas contenir de caractères spéciaux !",
- AllColor.RED);
- break;
- }
- if (_perso.getGroup() != null) {
- if (_perso.getGroup().getPersos().size() > 2) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre groupe comporte plus de 2 joueurs ! L'arène est de type 2v2, ne l'oubliez pas !",
- AllColor.RED);
- break;
- }
- if (!_perso.getGroup().isChief(_perso.get_GUID())) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous n'êtes pas chef de groupe !",
- AllColor.RED);
- break;
- }
- String players = "";
- boolean first = true;
- int classe = 0;
- for (Player c : _perso.getGroup().getPersos()) {
- if (classe == c.get_classe()) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous ne pouvez pas créer de team avec deux mêmes classes !",
- AllColor.RED);
- break;
- }
- if (!Arena.isVerifiedTeam(_perso.get_classe(),
- c.get_classe())) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous ne pouvez pas créer de team avec deux classes type pillier ! (Xélor, Sacrieur, Eniripsa, Osamodas)",
- AllColor.RED);
- break;
- }
- if (first) {
- classe = c.get_classe();
- players = String.valueOf(c.get_GUID());
- first = false;
- } else if (!first) {
- players += "," + c.get_GUID();
- }
- }
- if (Team.addTeam(s, players, 0, 0)) {
- for (Player c : _perso.getGroup().getPersos()) {
- SocketManager
- .GAME_SEND_MESSAGE(
- c,
- "La Team '<b>"
- + Team.getTeamByID(
- _perso.getTeamID())
- .getName()
- + "</b>' a été créée avec succès !",
- AllColor.RED);
- }
- }
- break;
- } else {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous n'avez pas de groupe, et par conséquent, aucun partenaire à ajouter dans votre Team !",
- AllColor.RED);
- break;
- }
- case 30: // Delete de Team Arena
- String string;
- try {
- string = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- if (_perso.getTeamID() != -1)
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Etes vous sûr de vouloir détruire votre team ? (Quôte d'arène: "
- + Team.getTeamByID(
- _perso.getTeamID())
- .getCote()
- + ")\n Si oui, faites .removeteam ok !",
- Config.CONFIG_MOTD_COLOR);
- else
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous n'avez actuellement aucune team !",
- AllColor.RED);
- break;
- }
- if (string.equals("ok")) {
- if (_perso.getArena() > -1)
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Action impossible, vous êtes inscris, ou déjà en combat d'arène !",
- AllColor.RED);
- else
- Team.removeTeam(
- Team.getTeamByID(_perso.getTeamID()),
- _perso);
- break;
- } else {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Tâche non reconnue, faites ."
- + command.getName()
- + " pour avoir des informations sur la commande.",
- AllColor.RED);
- break;
- }
- case 31: // Informations de Team Arena
- if (_perso.getTeamID() != -1) {
- Player coep = Team.getPlayer(
- Team.getTeamByID(_perso.getTeamID()), 1);
- if (Team.getPlayer(
- Team.getTeamByID(_perso.getTeamID()), 1) == _perso)
- coep = Team
- .getPlayer(Team.getTeamByID(_perso
- .getTeamID()), 2);
- SocketManager.GAME_SEND_MESSAGE(_perso, "<b>"
- + Team.getTeamByID(_perso.getTeamID())
- .getName()
- + "</b>\n"
- + "Partenaire: <b>"
- + coep.get_name()
- + "</b>\n"
- + "Côte: <b>"
- + Team.getTeamByID(_perso.getTeamID())
- .getCote()
- + "</b>\n"
- + "Rang: <b>"
- + Team.getTeamByID(_perso.getTeamID())
- .getRank() + "</b>", AllColor.RED);
- break;
- } else {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous n'avez pas d'équipe d'arène 2v2 !",
- AllColor.RED);
- break;
- }
- case 32: // Arena Inscription/Désinscription
- String arena;
- try {
- arena = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- if (_perso.getArena() == 0)
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous êtes déjà inscris au tournoi d'arène 2v2 ! Faites |<b> ."
- + command.getName()
- + " off </b>| pour vous désinscrire...",
- Config.CONFIG_MOTD_COLOR);
- else if (_perso.getArena() == 1)
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous êtes en combat d'arène !",
- Config.CONFIG_MOTD_COLOR);
- else
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous n'êtes pas inscris, faites |<b> ."
- + command.getName()
- + " on </b>| pour vous inscrire !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (arena.equals("on")) {
- if (_perso.getTeamID() < 0) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous ne possédez aucune Team ! (<b>."
- + command.getName()
- + "</b> pour plus d'informations)",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (_perso.getGroup() == null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous devez être grouppé avec votre partenaire de Team ! (<b>."
- + command.getName()
- + "</b> pour plus d'informations)",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else {
- if (_perso.getGroup().getPersos().size() > 2
- || _perso.getGroup().getPersos().size() < 2) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre groupe doit contenir exactement deux joueurs ! Vous, et votre partenaire de Team !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (!_perso.getGroup().isChief(
- _perso.get_GUID())) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous devez être le chef de groupe pour vous inscrire !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- for (Player c : _perso.getGroup().getPersos()) {
- try {
- if (!Team.getPlayers(
- Team.getTeamByID(_perso
- .getTeamID()))
- .contains(c)) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le joueur "
- + c.get_name()
- + " n'est pas votre partenaire de Team !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- else if (!c.isOnline()) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le joueur "
- + c.get_name()
- + " n'est pas connecté !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (c.get_fight() != null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le joueur "
- + c.get_name()
- + " est en combat !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (c.getArena() != -1) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le joueur "
- + c.get_name()
- + " est déjà inscris au tournoi d'arène 2v2 !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else {
- Arena.addTeam(Team
- .getTeamByID(_perso
- .getTeamID()));
- break;
- }
- } catch (Exception e) {
- }
- }
- }
- } else if (arena.equals("off")) {
- try {
- if (_perso.getTeamID() < 0) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous ne possédez aucune Team ! (<b>."
- + command.getName()
- + "</b> pour plus d'informations)",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (_perso.getArena() == 1
- && _perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous êtes en plein tournoi !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else {
- Arena.delTeam(Team.getTeamByID(_perso
- .getTeamID()));
- break;
- }
- } catch (Exception e) {
- }
- } else {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Tâche non reconnue, faites ."
- + command.getName()
- + " pour avoir des informations sur la commande.",
- AllColor.RED);
- break;
- }
- break;
- case 33: // RapidStuffs
- String rs;
- try {
- rs = msg.substring(command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "<b>Equipements rapides: </b>\n"
- + "<b>."
- + command.getName()
- + " create [name]</b> pour créer un nouveau stuff\n"
- + "<b>."
- + command.getName()
- + " remove [name]</b> pour supprimer un stuff\n"
- + "<b>."
- + command.getName()
- + " view</b> pour voir tous vos stuffs rapides disponibles\n"
- + "<b>."
- + command.getName()
- + " equip [name]</b> pour équiper un stuff rapidement",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (msg.length() >= command.getName().length() + 8
- && msg.substring(
- command.getName().length() + 2,
- command.getName().length() + 8).equals(
- "create")) {
- if (_perso.getRapidStuffs().size() > 9) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous ne pouvez pas avoir plus de 10 stuffs rapides !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- String name = "";
- try {
- name = msg.substring(
- command.getName().length() + 9,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Erreur ! Entrez un nom à votre stuff rapide: ."
- + command.getName()
- + " create [name]",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- int coiffe = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_COIFFE);
- int cape = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_CAPE);
- int arme = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_ARME);
- int anneau1 = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_ANNEAU1);
- int amulette = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_AMULETTE);
- int ceinture = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_CEINTURE);
- int bottes = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_BOTTES);
- int bouclier = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_BOUCLIER);
- int anneau2 = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_ANNEAU2);
- int dofus1 = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_DOFUS1);
- int dofus2 = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_DOFUS2);
- int dofus3 = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_DOFUS3);
- int dofus4 = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_DOFUS4);
- int dofus5 = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_DOFUS5);
- int dofus6 = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_DOFUS6);
- int familier = _perso
- .getObjetByPosSpece(Constant.ITEM_POS_FAMILIER);
- if (!RapidStuff.addRapidStuff(_perso, name, coiffe
- + "," + cape + "," + anneau1 + ","
- + amulette + "," + ceinture + "," + bottes
- + "," + familier + "," + bouclier + ","
- + arme + "," + anneau2 + "," + dofus1 + ","
- + dofus2 + "," + dofus3 + "," + dofus4
- + "," + dofus5 + "," + dofus6))
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Erreur ! Un stuff rapide est identique ou le nom est déjà utilisé !",
- Config.CONFIG_MOTD_COLOR);
- else
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Nouveau stuff enregistré avec succès !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- else if (msg.length() >= command.getName().length() + 8
- && msg.substring(
- command.getName().length() + 2,
- command.getName().length() + 8).equals(
- "remove")) {
- String name = "";
- try {
- name = msg.substring(
- command.getName().length() + 9,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Erreur ! Entrez le nom du stuff rapide à supprimer: "
- + command.getName()
- + " remove [name]",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (_perso.getRapidStuffByName(name) != null
- && RapidStuff.removeRapidStuff(_perso
- .getRapidStuffByName(name)))
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le stuff <b>"
- + name
- + "</b> a été supprimé avec succès !",
- Config.CONFIG_MOTD_COLOR);
- else
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le stuff rapide <b>"
- + name
- + "</b> est innéxistant ! Faites ."
- + command.getName()
- + " view pour avoir la liste.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- else if (rs.equals("view")) {
- String list = null;
- if (_perso.getRapidStuffs().isEmpty()) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous n'avez aucun équipement rapide !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else {
- for (RapidStuff ss : _perso.getRapidStuffs()) {
- if (list == null) {
- list = "-" + ss.getName();
- } else {
- list += "\n-" + ss.getName();
- }
- }
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "\n\n<b>Faites " + command.getName()
- + " equip + [name] :</b>\n"
- + list,
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- }
- else if (msg.length() >= command.getName().length() + 7
- && msg.substring(
- command.getName().length() + 2,
- command.getName().length() + 7).equals(
- "equip")) {
- String name = "";
- try {
- name = msg.substring(
- command.getName().length() + 8,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Erreur ! Entrez le nom du stuff rapide à équiper: "
- + command.getName()
- + " equip [name]",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (_perso.getRapidStuffByName(name) != null) {
- boolean first = true;
- int number = 1;
- for (Objects rapidStuff : _perso
- .getRapidStuffByName(name).getObjects()) {
- if (!_perso.hasItemGuid(rapidStuff
- .getGuid())) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "L'item <b>"
- + World.getObjet(
- rapidStuff
- .getGuid())
- .getTemplate()
- .getName()
- + "</b> ne vous appartient plus et n'a pas pu être équipé !",
- Config.CONFIG_MOTD_COLOR);
- continue;
- } else {
- int pos = Constant
- .getObjectPosByType(rapidStuff
- .getTemplate()
- .getType()); // Bordel
- // de
- // pos,
- // ça
- // m'aura
- // bien
- // fais
- // chié
- if (rapidStuff.getTemplate().isArm())
- pos = 1;
- if (rapidStuff.getTemplate().getType() == Constant.ITEM_TYPE_ANNEAU) {
- if (first) {
- pos = 2;
- first = false;
- } else
- pos = 4;
- }
- if (rapidStuff.getTemplate().getType() == Constant.ITEM_TYPE_DOFUS) {
- switch (number) {
- case 1:
- pos = Constant.ITEM_POS_DOFUS1;
- number++;
- break;
- case 2:
- pos = Constant.ITEM_POS_DOFUS2;
- number++;
- break;
- case 3:
- pos = Constant.ITEM_POS_DOFUS3;
- number++;
- break;
- case 4:
- pos = Constant.ITEM_POS_DOFUS4;
- number++;
- break;
- case 5:
- pos = Constant.ITEM_POS_DOFUS5;
- number++;
- break;
- case 6:
- number = Constant.ITEM_POS_DOFUS6;
- break;
- }
- }
- ParseObject.Object_move(_perso, _out,
- 1, rapidStuff.getGuid(), pos,
- true); // On double pour les
- // déséquipements autos
- if (_perso.isEquip()) { // C'est balow
- ParseObject.Object_move(_perso,
- _out, 1,
- rapidStuff.getGuid(), pos,
- false);
- _perso.setEquip(false);
- }
- }
- }
- break;
- } else {
- SocketManager.GAME_SEND_MESSAGE(
- _perso,
- "Erreur ! Nom incorrect: "
- + command.getName()
- + " equip [name]",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- }
- else {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "<b>Equipements rapides: </b>\n\n"
- + "<b>"
- + command.getName()
- + " create [name]</b> pour créer un nouveau stuff\n"
- + "<b>"
- + command.getName()
- + " remove [name]</b> pour supprimer un stuff\n"
- + "<b>"
- + command.getName()
- + " view</b> pour voir tous vos stuffs rapides disponbiles\n"
- + "<b>"
- + command.getName()
- + " equip [name]</b> pour équiper un stuff rapidement",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- case 34: // Affichage des points du compte
- int accountPoints1 = Util.loadPointsByAccount(_perso
- .get_compte());
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Votre compte contient " + accountPoints1
- + " points boutiques !",
- Config.CONFIG_MOTD_COLOR);
- break;
- case 35: // Job levelUp
- String st;
- int job = 0;
- int item = 0;
- try {
- st = msg.substring(command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "<b>Liste(Faites .learn + Job):<br /></b> Cordomage,joaillomage,costumage,dague,epee,marteau,pelle,hache,arc,baguette,baton",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (st.equalsIgnoreCase("cordomage")) {
- item = 7495;
- job = 62;
- } else if (st.equalsIgnoreCase("joaillomage")) {
- item = 7493;
- job = 63;
- } else if (st.equalsIgnoreCase("costumage")) {
- item = 7494;
- job = 64;
- } else if (st.equalsIgnoreCase("dague")) {
- item = 1520;
- job = 43;
- } else if (st.equalsIgnoreCase("epee")) {
- item = 1339;
- job = 44;
- } else if (st.equalsIgnoreCase("marteau")) {
- item = 1561;
- job = 45;
- } else if (st.equalsIgnoreCase("pelle")) {
- item = 1560;
- job = 46;
- } else if (st.equalsIgnoreCase("hache")) {
- item = 1562;
- job = 47;
- } else if (st.equalsIgnoreCase("arc")) {
- item = 1563;
- job = 72;
- } else if (st.equalsIgnoreCase("baguette")) {
- item = 1564;
- job = 49;
- } else if (st.equalsIgnoreCase("baton")) {
- item = 1565;
- job = 50;
- } else {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Metier non reconnu, faites .learn pour avoir la liste",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- _perso.learnJob(World.getMetier(job));
- ObjTemplate a = World.getObjTemplate(item);
- Objects objs = a.createNewItem(1, false, -1);
- if (_perso.addObjet(objs, true))// Si le joueur n'avait
- // pas d'item similaire
- World.addObjet(objs, true);
- StatsMetier SM = _perso.getMetierByID(job);
- SM.addXp(_perso, 1000000);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous avez appris le métier avec succès et avez reçu l'arme de FM disponibles dans votre inventaire",
- Config.CONFIG_MOTD_COLOR);
- break;
- case 180:
- if (((Reboot.lastReboot == 0L) || (System
- .currentTimeMillis() - Reboot.lastReboot <= 600000L))
- && (System.currentTimeMillis()
- - Config.gameServer.getStartTime() > 3600000L)) {
- if ((!Reboot.wait) && (Reboot.shutdown == null)) {
- new Reboot(_perso);
- } else {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous ne pouvez pas fair de demande de reboot, car il y a déjà un demande en cour.",
- AllColor.GOLD);
- return true;
- }
- } else {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous ne pouvez pas encore faire de demande de reboot.",
- AllColor.GOLD);
- return true;
- }
- break;
- case 181:
- if ((Reboot.wait) && (Reboot.shutdown == null)) {
- String nuhter = null;
- try {
- nuhter = msg.substring(command.getName()
- .length() + 2, msg.length() - 1);
- } catch (Exception e) {
- SocketManager.GAME_SEND_MESSAGE(
- _perso,
- "Indiquer votre avis en faisant <b>."
- + command.getName()
- + " pour</b> ou <b>."
- + command.getName()
- + " contre</b>", AllColor.GOLD);
- return true;
- }
- if (nuhter != null) {
- if (nuhter.equals("pour")) {
- Reboot.addVote(_perso, true);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre vote a bien étais prit en compte.",
- AllColor.GOLD);
- return true;
- }
- if (nuhter.equals("contre")) {
- Reboot.addVote(_perso, false);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre vote a bien étais prit en compte.",
- AllColor.GOLD);
- return true;
- }
- }
- } else {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous ne pouvez pas voter, car il n'y a pas de demande en cour ou un redémmarage programmer.",
- AllColor.GOLD);
- return true;
- }
- break;
- case 36: // Modifier la taille du personnage
- int potion = Integer.parseInt(args.split(",")[0]);
- if ((_perso != null) && (_perso.isOnline()))
- if (!_perso.hasItemTemplate(potion, 1)) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Acheter la potion au PNJ boutique pour pouvoir utiliser cette commande en illimiter size 75 a 125 autoriser..",
- AllColor.GREEN);
- break;
- }
- int sizeID = 0;
- try {
- sizeID = Integer.parseInt(msg.substring(
- command.getName().length() + 2,
- msg.length() - 1).trim());
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Size autorisé de 75 à 125. Exemple:.size 125 pour revenir à votre taille normal .size 100",
- AllColor.GREEN);
- break;
- }
- if (sizeID > 125)
- sizeID = 125;
- if (sizeID < 75)
- sizeID = 75;
- _perso.set_size(sizeID);
- SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
- _perso.get_curCarte(), _perso.get_GUID());
- SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
- _perso.get_curCarte(), _perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre size a bien etait modifier avec succes.",
- AllColor.GREEN);
- break;
- case 37: //FmCac
- try{
- Objects object = _perso.getObjetByPos(Constant.ITEM_POS_ARME);
- int price = Integer.parseInt(args);
- if(_perso.get_kamas() < price) {
- SocketManager.GAME_SEND_MESSAGE(_perso, "Action impossible : vous avez moins de "+price+" k", Config.CONFIG_MOTD_COLOR);
- return true;
- } else if(_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso, "Action impossible : vous ne devez pas être en combat", Config.CONFIG_MOTD_COLOR);
- return true;
- } else if(object == null) {
- SocketManager.GAME_SEND_MESSAGE(_perso, "Action impossible : vous ne portez pas d'arme", Config.CONFIG_MOTD_COLOR);
- return true;
- }
- boolean containNeutre = false;
- for(SpellEffect effect : object.getEffects()) {
- if(effect.getEffectID() == 100 || effect.getEffectID() == 95)
- containNeutre = true;
- }
- if(!containNeutre) {
- SocketManager.GAME_SEND_MESSAGE(_perso, "Action impossible : votre arme n'a pas de dégats neutre", Config.CONFIG_MOTD_COLOR);
- return true;
- }
- String answer;
- try {
- answer = msg.substring(command.getName().length()+2, msg.length() - 1);
- } catch(Exception e) {
- 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);
- return true;
- }
- if(!answer.equalsIgnoreCase("air") && !answer.equalsIgnoreCase("terre") && !answer.equalsIgnoreCase("feu") && !answer.equalsIgnoreCase("eau")) {
- SocketManager.GAME_SEND_MESSAGE(_perso, "Action impossible : l'élément " + answer + " n'existe pas ! (dispo : air, feu, terre, eau)", Config.CONFIG_MOTD_COLOR);
- return true;
- }
- for(int i = 0; i < object.getEffects().size(); i++) {
- if(object.getEffects().get(i).getEffectID() == 100) {
- if(answer.equalsIgnoreCase("air"))
- object.getEffects().get(i).setEffectID(98);
- if(answer.equalsIgnoreCase("feu"))
- object.getEffects().get(i).setEffectID(99);
- if(answer.equalsIgnoreCase("terre"))
- object.getEffects().get(i).setEffectID(97);
- if(answer.equalsIgnoreCase("eau"))
- object.getEffects().get(i).setEffectID(96);
- }
- if(object.getEffects().get(i).getEffectID() == 95) {
- if(answer.equalsIgnoreCase("air"))
- object.getEffects().get(i).setEffectID(93);
- if(answer.equalsIgnoreCase("feu"))
- object.getEffects().get(i).setEffectID(94);
- if(answer.equalsIgnoreCase("terre"))
- object.getEffects().get(i).setEffectID(92);
- if(answer.equalsIgnoreCase("eau"))
- object.getEffects().get(i).setEffectID(91);
- }
- }
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager.GAME_SEND_MESSAGE(_perso, "Votre objet <b>" + object.getTemplate().getName() + "</b> a été forgemagé avec succès en " + answer, Config.CONFIG_MOTD_COLOR);
- SocketManager.GAME_SEND_MESSAGE(_perso, "Pensez à vous déconnecter pour voir les modifications apportés à votre arme !", Config.CONFIG_MOTD_COLOR);
- }catch(Exception e){}
- break;
- case 30007: // FmCac
- int pointsRS = 0;
- Objects object = _perso
- .getObjetByPos(Constant.ITEM_POS_ARME);
- int price = Integer.parseInt(args);
- if (_perso.get_kamas() < price) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Action impossible : vous avez moins de "
- + price + " k",
- Config.CONFIG_MOTD_COLOR);
- return true;
- } else if (_perso.get_fight() != null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Action impossible : vous ne devez pas être en combat",
- Config.CONFIG_MOTD_COLOR);
- return true;
- } else if (object == null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Action impossible : vous ne portez pas d'arme",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- boolean containNeutre = false;
- for (SpellEffect effect : object.getEffects()) {
- if (effect.getEffectID() == 100
- || effect.getEffectID() == 95)
- containNeutre = true;
- }
- if (!containNeutre) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Action impossible : votre arme n'a pas de dégats neutre",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- String answer;
- try {
- answer = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- 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);
- return true;
- }
- if (!answer.equalsIgnoreCase("air")
- && !answer.equalsIgnoreCase("terre")
- && !answer.equalsIgnoreCase("feu")
- && !answer.equalsIgnoreCase("eau")) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Action impossible : l'élément "
- + answer
- + " n'existe pas ! (dispo : air, feu, terre, eau)",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- for (int i = 0; i < object.getEffects().size(); i++) {
- if (object.getEffects().get(i).getEffectID() == 100) {
- if (answer.equalsIgnoreCase("air"))
- object.getEffects().get(i).setEffectID(98);
- if (answer.equalsIgnoreCase("feu"))
- object.getEffects().get(i).setEffectID(99);
- if (answer.equalsIgnoreCase("terre"))
- object.getEffects().get(i).setEffectID(97);
- if (answer.equalsIgnoreCase("eau"))
- object.getEffects().get(i).setEffectID(96);
- }
- if (object.getEffects().get(i).getEffectID() == 95) {
- if (answer.equalsIgnoreCase("air"))
- object.getEffects().get(i).setEffectID(93);
- if (answer.equalsIgnoreCase("feu"))
- object.getEffects().get(i).setEffectID(94);
- if (answer.equalsIgnoreCase("terre"))
- object.getEffects().get(i).setEffectID(92);
- if (answer.equalsIgnoreCase("eau"))
- object.getEffects().get(i).setEffectID(91);
- }
- }
- long new_kamas = _perso.get_kamas() - price;
- if (new_kamas < 0)
- new_kamas = 0;
- _perso.set_kamas(new_kamas);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre objet <b>"
- + object.getTemplate()
- .getName()
- + "</b> a été forgemagé avec succès en "
- + answer,
- Config.CONFIG_MOTD_COLOR);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Pensez à vous déconnecter pour voir les modifications apportés à votre arme !",
- Config.CONFIG_MOTD_COLOR);
- int pointspersoRS1 = pointsRS - pointsRS;
- SQLManager.UPDATE_ACCOUNT_point(pointspersoRS1,
- _perso.getAccID());
- break;
- case 38: // Téléportation
- short mapID = (short) Integer
- .parseInt(args.split(",")[0]);
- int cellID = Integer.parseInt(args.split(",")[1]);
- _perso.teleport(mapID, cellID);
- break;
- case 40: // Personnage suiveur
- int id_morph = -1;// On initi
- try {// Si valeur autre quechiffre
- id_morph = Integer.parseInt(msg.substring(
- command.getName().length() + 2,
- msg.length() - 1).trim());
- } catch (Exception e) {
- String list_morph = "Liste des skin :\n";
- for (String morph_id : args.split("\\|")) {
- try {
- list_morph += "<b>"
- + (morph_id.contains(",") ? morph_id
- .split(",")[0] : morph_id)
- + "</b>";
- if (morph_id.contains(","))
- list_morph += " - "
- + morph_id.split(",")[1];
- list_morph += "\n";
- } catch (Exception ce) {
- continue;
- }
- }
- SocketManager.GAME_SEND_INBOX(_perso,
- "Vous devez faire ." + command.getName()
- + " (id de la morph)\n"
- + list_morph);
- break;
- }
- boolean valid_morph = false;
- for (String morph_id : args.split("\\|")) {
- try {
- if (Integer
- .parseInt((morph_id.contains(",") ? morph_id
- .split(",")[0] : morph_id)) == id_morph)
- valid_morph = true;
- } catch (Exception e) {
- continue;
- }
- }
- if (!valid_morph) {
- String list_morph = "Liste des skin :\n";
- for (String morph_id : args.split("\\|")) {
- try {
- list_morph += "<b>"
- + (morph_id.contains(",") ? morph_id
- .split(",")[0] : morph_id)
- + "</b>";
- if (morph_id.contains(","))
- list_morph += " - "
- + morph_id.split(",")[1];
- list_morph += "\n";
- } catch (Exception e) {
- continue;
- }
- }
- SocketManager.GAME_SEND_INBOX(_perso, list_morph);
- break;
- }
- if (_perso.get_suiveur() == id_morph) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous avez déjà se personnage suiveur !",
- AllColor.GOLD);
- break;
- }
- _perso.set_suiveur(id_morph);
- SocketManager.GAME_SEND_ALTER_GM_PACKET(
- _perso.get_curCarte(), _perso);
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Le personnages suiveur à bien été mit.",
- AllColor.GOLD);
- break;
- case 977: //Prestige Level
- int prestue= _perso.getprestue();
- if (_perso.get_lvl() < 200)
- {
- SocketManager.GAME_SEND_MESSAGE(_perso,"<b> Le mode prestige est accesible au niveau 205. </b>",Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (_perso.getprestue() > 10)
- {
- SocketManager.GAME_SEND_MESSAGE(_perso,"<b> Bravo ! Vous avez atteint le prestige maximal ! </b>",Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int level1 = 10;
- @SuppressWarnings("unused")
- int maxLevel = 200;
- @SuppressWarnings("unused")
- int minLevel = 10;
- if ((level1 > 200) || (level1 < 10))
- {
- String text = level1 > 200 ? "maximal" : "minimal";
- SocketManager.GAME_SEND_MESSAGE(_perso, "<b>Valeur incorrecte</b>: le niveau " + text + " est <b>" + 200 + "</b> !", Config.CONFIG_MOTD_COLOR);
- }
- if (level1 < _perso.get_lvl())
- {
- _perso.set_lvl(level1);
- _perso.set_curExp(World.getExpLevel(level1).perso);
- try
- {
- _perso.get_baseStats().addOneStat(125, -_perso.get_baseStats().getEffect(125));
- _perso.get_baseStats().addOneStat(124, -_perso.get_baseStats().getEffect(124));
- _perso.get_baseStats().addOneStat(118, -_perso.get_baseStats().getEffect(118));
- _perso.get_baseStats().addOneStat(123, -_perso.get_baseStats().getEffect(123));
- _perso.get_baseStats().addOneStat(119, -_perso.get_baseStats().getEffect(119));
- _perso.get_baseStats().addOneStat(126, -_perso.get_baseStats().getEffect(126));
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- finally
- {
- _perso.addCapital((_perso.get_lvl() - 1) * 5 - _perso.get_capital());
- _perso.addCapital(0);
- }
- boolean unEquip = false;
- for (Iterator<Objects> localIterator1 = _perso.getItems().values().iterator(); localIterator1.hasNext();)
- {
- object = (Objects)localIterator1.next();
- if ((object.getPosition() != -1) && (
- ((!object.getTemplate().getConditions().equalsIgnoreCase("")) && (!ConditionParser.validConditions(_perso, object.getTemplate().getConditions()))) ||
- (object.getTemplate().getLevel() > level1)))
- {
- _perso.DesequiperItem(object);
- unEquip = true;
- }
- }
- if (unEquip) {
- SocketManager.GAME_SEND_Im_PACKET(_perso, "119|43");
- }
- }
- else
- {
- while (_perso.get_lvl() < level1)
- {
- @SuppressWarnings("unused")
- boolean unEquip;
- @SuppressWarnings({ "unused", "rawtypes" })
- Iterator localIterator1;
- @SuppressWarnings("unused")
- Objects object1;
- _perso.levelUp(false, true);
- }
- }
- if ((_perso != null) && (_perso.isOnline()))
- {
- SocketManager.GAME_SEND_NEW_LVL_PACKET(_perso.get_compte().getGameThread().get_out(), level1);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager.GAME_SEND_SPELL_LIST(_perso);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- int actualprestige = _perso.getprestue() + 1;
- _perso.setprestige(actualprestige);
- int titleid1 = 70 + actualprestige;
- _perso.set_title(titleid1);
- SocketManager.GAME_SEND_ALTER_GM_PACKET(_perso.get_curCarte(),
- _perso);
- SocketManager.GAME_SEND_MESSAGE(_perso, "<b>Vous venez de passer votre prestige vous ête prestige</b>: " + prestue + "!", Config.CONFIG_MOTD_COLOR);
- }
- break;
- case 100:// Prestige PH
- if (_perso.get_honor() < 18000) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "<b> Le mode prestige est accesible à partir de 18.000 PH. </b>",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (_perso.getprestue() > 4) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "<b> Bravo ! Vous avez atteint le prestige maximal ! </b>",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- _perso.setpoints(_perso.getpoints() + 25);
- if ((_perso != null) && (_perso.isOnline())) {
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- int actualprestige = _perso.getprestue() + 1;
- _perso.setprestige(actualprestige);
- int titleid1 = 104 + actualprestige;
- _perso.set_title(titleid1);
- _perso.set_honor(0);
- SocketManager.GAME_SEND_ALTER_GM_PACKET(
- _perso.get_curCarte(), _perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Tu vien de passer ton prestige tu vien de gagner 25 points boutique, tes points d'honneur sont desormais remis à 0!",
- AllColor.GOLD);
- return true;
- }
- break;
- case 799:
- if (_perso.get_fight() != null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous êtes en <b>Combat</b> , Action impossible.",
- "B30016");
- return true;
- }
- short mapIDo = (short) Integer
- .parseInt(args.split(",")[0]);
- int cellIDo = Integer.parseInt(args.split(",")[1]);
- int niveau = Integer.parseInt(args.split(",")[2]);
- if (_perso.get_lvl() < niveau) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous n'avez pas le level <b>requis</b> pour utiliser cette commande !",
- AllColor.RED);
- } else if (_perso.get_lvl() >= niveau) {
- _perso.teleport(mapIDo, cellIDo);
- }
- break;
- case 45:// TAG
- String split1;
- String name = _perso.get_name();
- try {
- split1 = msg.substring(5, msg.length() - 1);
- } catch (Exception e) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "<b>Effectuez .tag + TAG:</b>",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (split1.length() < 2 || split1.length() > 10
- || split1.contains("modérateur")
- || split1.contains("créateur")
- || split1.contains(" ")
- || split1.contains("mj")
- || split1.contains("staff")
- || split1.contains(";") || split1.contains(",")
- || split1.contains(":") || split1.contains("§")
- || split1.contains("/") || split1.contains("?")
- || split1.contains("STAFF")
- || split1.contains("'")
- || split1.contains("MJ")
- || split1.contains("animateur")
- || split1.contains("ANIMATEUR")
- || split1.contains("CREATEUR")
- || split1.contains("MODERATEUR")
- || split1.contains("[") || split1.contains("]")
- || split1.contains("{") || split1.contains("}")
- || split1.contains("<") || split1.contains("&")
- || name.contains("[") || split1.contains("-")
- || split1.contains("\"")) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Les conditions du TAG ne sont pas acquises.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- _perso.set_tag("[" + split1 + "]");
- _perso.set_Localname(_perso.get_tag()+_perso.get_name());
- SQLManager.SAVE_PERSONNAGE(_perso, false);
- SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
- _perso.get_curCarte(), _perso.get_GUID());
- SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
- _perso.get_curCarte(), _perso);
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Votre nouveau tag est : " + split1 + "",
- Config.CONFIG_MOTD_COLOR);
- break;
- // DELTAG
- case 46:
- _perso.set_tag("");
- _perso.set_Localname(_perso.get_name());
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Votre TAG à bien été enlevé",
- Config.CONFIG_MOTD_COLOR);
- SQLManager.SAVE_PERSONNAGE(_perso, false);
- SocketManager.GAME_SEND_ALTER_GM_PACKET(
- _perso.get_curCarte(), _perso);
- SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
- _perso.get_curCarte(), _perso.get_GUID());
- SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
- _perso.get_curCarte(), _perso);
- break;
- case 72: // fm chance
- int taman = 15;
- String choixs = null;
- Objects itemss = null;
- int maispoints1 = SQLManager.GET_POINTS(_perso
- .getAccID());
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande inutilisable en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (maispoints1 < taman) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il te faut "
- + taman
- + " points pour utiliser cette commande.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- choixs = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Liste (Faites .fmchance + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (choixs.equalsIgnoreCase("Coiffe")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_COIFFE);
- } else if (choixs.equalsIgnoreCase("Cape")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_CAPE);
- } else if (choixs.equalsIgnoreCase("AnneauDroite")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- } else if (choixs.equalsIgnoreCase("AnneauGauche")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- } else if (choixs.equalsIgnoreCase("Ceinture")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_CEINTURE);
- } else if (choixs.equalsIgnoreCase("Bottes")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_BOTTES);
- } else if (choixs.equalsIgnoreCase("Amulette")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_AMULETTE);
- } else if (choixs.equalsIgnoreCase("Familier")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_FAMILIER);
- } else if (choixs.equalsIgnoreCase("Cac")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_ARME);
- }
- else if (itemss == null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous ne portez pas l'item.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int id44 = ((Objects) itemss).getTemplate().getLevel();
- int id1 = ((Objects) itemss).getStats().getEffect(123);
- if (id1 > 29 && id44 < 30) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 30 chance.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id1 > 59 && id44 < 100) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 60 chance.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id1 > 79 && id44 < 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 80 chance ou dans un autre élement.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id1 > 79 && id44 <= 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 80 chance ou dans un autre élement.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id1 > 99 && id44 > 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 100 chance ou dans un autre élement.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int newspoints1 = maispoints1 - taman;
- SQLManager.UPDATE_ACCOUNT_point(newspoints1,
- _perso.getAccID());
- ((Objects) itemss).getStats().addOneStat(123, 10);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre "
- + ((Objects) itemss)
- .getTemplate()
- .getName()
- + " donne désormais +10 chance ! penser a deco/reco pour voir les effect.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- case 975:// Echange koli For fun!
- {
- if ((_perso != null) && (_perso.isOnline()))
- if (!_perso.hasItemTemplate(100111, 100)) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il vous faut 100 Kolizetons pour effectuée cette commande.",
- AllColor.GOLD);
- break;
- }
- if ((_perso != null) && (_perso.isOnline()))
- _perso.removeByTemplateID(100111, 100);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous venez de perdre 100 kolizetons pour 50 points boutique. ",
- AllColor.GOLD);
- }
- _perso.setpoints(_perso.getpoints() + 50);
- if ((_perso != null) && (_perso.isOnline()))
- break;
- case 42:// addLvl
- int lvl = 0;
- try {
- lvl = Integer.parseInt(msg.substring(
- command.getName().length() + 2,
- msg.length() - 1).trim());
- } catch (Exception e) {
- if (_perso.get_lvl() < 100) {
- _perso.levelUp(false, true);
- }
- if (_perso.isOnline()) {
- if (lvl < 0)
- break;
- SocketManager.GAME_SEND_SPELL_LIST(_perso);
- SocketManager.GAME_SEND_NEW_LVL_PACKET(
- _perso.get_compte().getGameThread()
- .get_out(), _perso.get_lvl());
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "<b>Votre lvl à bien etait mis!</b>",
- Config.CONFIG_MOTD_COLOR);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- }
- }
- break;
- case 925: //morphitem2
- try {
- msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "faite .morphteim (IDITEM qui a les stats) (IDITEM aparence) et encore une fois (IDITEM aparence).",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int Item1 = 0;
- int Item2 = 0;
- int maispoints756451523549661 = SQLManager.GET_POINTS(_perso
- .getAccID());
- int taman756451523549661 = 100;
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande inutilisable en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- Item1 = Integer.parseInt(msg.split(" ")[1]);// solomonk
- Item2 = Integer.parseInt(msg.split(" ")[2]); //piou
- }catch (Exception e){
- String mess = "Votre morphitem n'ai pas valide!";
- SocketManager.GAME_SEND_MESSAGE(_perso, mess, Config.CONFIG_MOTD_COLOR);
- break;
- };
- ObjTemplate temp = World.getObjTemplate(Item1);
- Objects morphitem1 = temp.createNewMorphItem(Item1, Item2);
- if(temp.getType() != morphitem1.getTemplate().getType()) {
- SocketManager.GAME_SEND_MESSAGE(_perso, "Vous ne pouvez pas morphitem un item de type different", Config.CONFIG_MOTD_COLOR);
- break;
- }
- if(_perso.addObjet(morphitem1, true))
- World.addObjet(morphitem1, true);
- String mess = "Morphitem généré.";
- SocketManager.GAME_SEND_MESSAGE(_perso, mess, Config.CONFIG_MOTD_COLOR);
- SocketManager.GAME_SEND_Ow_PACKET(_perso);
- int newspoints756451523549661 = maispoints756451523549661 - taman756451523549661;
- SQLManager.UPDATE_ACCOUNT_point(newspoints756451523549661,
- _perso.getAccID());
- break;
- case 76: //fm soin
- int taman1 = 15;
- String choixs1 = null;
- Objects itemss1 = null;
- int maispoints11 = SQLManager.GET_POINTS(_perso
- .getAccID());
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande inutilisable en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (maispoints11 < taman1) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il te faut "
- + taman1
- + " points pour utiliser cette commande.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- choixs1 = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Liste (Faites .fmsoin + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (choixs1.equalsIgnoreCase("Coiffe")) {
- itemss1 = _perso
- .getObjetByPos(Constant.ITEM_POS_COIFFE);
- } else if (choixs1.equalsIgnoreCase("Cape")) {
- itemss1 = _perso
- .getObjetByPos(Constant.ITEM_POS_CAPE);
- } else if (choixs1.equalsIgnoreCase("AnneauDroite")) {
- itemss1 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- } else if (choixs1.equalsIgnoreCase("AnneauGauche")) {
- itemss1 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- } else if (choixs1.equalsIgnoreCase("Ceinture")) {
- itemss1 = _perso
- .getObjetByPos(Constant.ITEM_POS_CEINTURE);
- } else if (choixs1.equalsIgnoreCase("Bottes")) {
- itemss1 = _perso
- .getObjetByPos(Constant.ITEM_POS_BOTTES);
- } else if (choixs1.equalsIgnoreCase("Amulette")) {
- itemss1 = _perso
- .getObjetByPos(Constant.ITEM_POS_AMULETTE);
- } else if (choixs1.equalsIgnoreCase("Familier")) {
- itemss1 = _perso
- .getObjetByPos(Constant.ITEM_POS_FAMILIER);
- } else if (choixs1.equalsIgnoreCase("Cac")) {
- itemss1 = _perso
- .getObjetByPos(Constant.ITEM_POS_ARME);
- }
- else if (itemss1 == null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous ne portez pas l'item.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int id111 = ((Objects) itemss1).getStats().getEffect(
- 178);
- if (id111 > 4) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 5 soins.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int newspoints11 = maispoints11 - taman1;
- SQLManager.UPDATE_ACCOUNT_point(newspoints11,
- _perso.getAccID());
- ((Objects) itemss1).getStats().addOneStat(178, 5);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre "
- + ((Objects) itemss1)
- .getTemplate()
- .getName()
- + " donne désormais +5 soins ! penser a deco/reco pour voir les effect.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- case 75: // fm init
- int taman1111 = 15;
- String choixs1111 = null;
- Objects itemss1111 = null;
- int maispoints11111 = SQLManager.GET_POINTS(_perso
- .getAccID());
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande inutilisable en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (maispoints11111 < taman1111) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il te faut "
- + taman1111
- + " points pour utiliser cette commande.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- choixs1111 = msg.substring(command.getName()
- .length() + 2, msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Liste (Faites .init + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (choixs1111.equalsIgnoreCase("Coiffe")) {
- itemss1111 = _perso
- .getObjetByPos(Constant.ITEM_POS_COIFFE);
- } else if (choixs1111.equalsIgnoreCase("Cape")) {
- itemss1111 = _perso
- .getObjetByPos(Constant.ITEM_POS_CAPE);
- } else if (choixs1111.equalsIgnoreCase("AnneauDroite")) {
- itemss1111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- } else if (choixs1111.equalsIgnoreCase("AnneauGauche")) {
- itemss1111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- } else if (choixs1111.equalsIgnoreCase("Ceinture")) {
- itemss1111 = _perso
- .getObjetByPos(Constant.ITEM_POS_CEINTURE);
- } else if (choixs1111.equalsIgnoreCase("Bottes")) {
- itemss1111 = _perso
- .getObjetByPos(Constant.ITEM_POS_BOTTES);
- } else if (choixs1111.equalsIgnoreCase("Amulette")) {
- itemss1111 = _perso
- .getObjetByPos(Constant.ITEM_POS_AMULETTE);
- } else if (choixs1111.equalsIgnoreCase("Familier")) {
- itemss1111 = _perso
- .getObjetByPos(Constant.ITEM_POS_FAMILIER);
- } else if (choixs1111.equalsIgnoreCase("Cac")) {
- itemss1111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ARME);
- }
- else if (itemss1111 == null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous ne portez pas l'item.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int id999 = ((Objects) itemss1111).getTemplate()
- .getLevel();
- int id9999 = ((Objects) itemss1111).getStats()
- .getEffect(174);
- if (id9999 > 29 && id999 < 30) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 30 init.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id9999 > 49 && id999 < 100) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 50 init.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id9999 > 149 && id999 < 149) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 150 init.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id9999 > 149 && id999 <= 149) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 150 init.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id9999 > 199 && id999 > 149) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 200 init.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int newspoints11111 = maispoints11111 - taman1111;
- SQLManager.UPDATE_ACCOUNT_point(newspoints11111,
- _perso.getAccID());
- ((Objects) itemss1111).getStats().addOneStat(174, 10);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre "
- + ((Objects) itemss1111)
- .getTemplate()
- .getName()
- + " donne désormais +10 init ! penser a deco/reco pour voir les effect.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- case 966: // Commandes de choix levels.
- // Buldo nique ta mere
- // patou nique ton zder!
- try {
- level = Integer.parseInt(msg.substring(
- command.getName().length() + 2,
- msg.length() - 1).trim());
- if (_perso.hasItemTemplate(683, 1))
- if (level < 1)
- level = 1;
- if (level < _perso.get_lvl())
- level = _perso.get_lvl();
- if (_perso.get_lvl() < level) {
- while (_perso.get_lvl() < level) {
- _perso.levelUp(false, true);
- }
- if (_perso.isOnline()) {
- SocketManager.GAME_SEND_SPELL_LIST(_perso);
- SocketManager.GAME_SEND_NEW_LVL_PACKET(
- _perso.get_compte().getGameThread()
- .get_out(),
- _perso.get_lvl());
- SocketManager
- .GAME_SEND_STATS_PACKET(_perso);
- }
- }
- String mess1 = "Vous êtes maintenant niveau "
- + level + "";
- SocketManager.GAME_SEND_MESSAGE(_perso, mess1,
- Config.CONFIG_MOTD_COLOR);
- return true;
- } catch (Exception e) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Valeur incorrect.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- case 920: // Commandes de choix levels.
- // Buldo nique ta mere
- // patou nique ton zder!
- try {
- level = Integer.parseInt(msg.substring(
- command.getName().length() + 2,
- msg.length() - 1).trim());
- if (_perso.hasItemTemplate(683, 1))
- if (level < 1)
- level = 1;
- if (level < _perso.get_lvl())
- level = _perso.get_lvl();
- if (_perso.get_lvl() < level) {
- while (_perso.get_lvl() < level) {
- _perso.levelUp(false, true);
- }
- if (_perso.isOnline()) {
- SocketManager.GAME_SEND_SPELL_LIST(_perso);
- SocketManager.GAME_SEND_NEW_LVL_PACKET(
- _perso.get_compte().getGameThread()
- .get_out(),
- _perso.get_lvl());
- SocketManager
- .GAME_SEND_STATS_PACKET(_perso);
- }
- }
- String mess1 = "Vous êtes maintenant niveau "
- + level + "";
- SocketManager.GAME_SEND_MESSAGE(_perso, mess1,
- Config.CONFIG_MOTD_COLOR);
- return true;
- } catch (Exception e) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Valeur incorrect.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- case 74: // fm agi
- int taman111 = 15;
- String choixs111 = null;
- Objects itemss111 = null;
- int maispoints1111 = SQLManager.GET_POINTS(_perso
- .getAccID());
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande inutilisable en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (maispoints1111 < taman111) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il te faut "
- + taman111
- + " points pour utiliser cette commande.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- choixs111 = msg.substring(command.getName()
- .length() + 2, msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Liste (Faites .fmagi + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (choixs111.equalsIgnoreCase("Coiffe")) {
- itemss111 = _perso
- .getObjetByPos(Constant.ITEM_POS_COIFFE);
- } else if (choixs111.equalsIgnoreCase("Cape")) {
- itemss111 = _perso
- .getObjetByPos(Constant.ITEM_POS_CAPE);
- } else if (choixs111.equalsIgnoreCase("AnneauDroite")) {
- itemss111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- } else if (choixs111.equalsIgnoreCase("AnneauGauche")) {
- itemss111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- } else if (choixs111.equalsIgnoreCase("Ceinture")) {
- itemss111 = _perso
- .getObjetByPos(Constant.ITEM_POS_CEINTURE);
- } else if (choixs111.equalsIgnoreCase("Bottes")) {
- itemss111 = _perso
- .getObjetByPos(Constant.ITEM_POS_BOTTES);
- } else if (choixs111.equalsIgnoreCase("Amulette")) {
- itemss111 = _perso
- .getObjetByPos(Constant.ITEM_POS_AMULETTE);
- } else if (choixs111.equalsIgnoreCase("Familier")) {
- itemss111 = _perso
- .getObjetByPos(Constant.ITEM_POS_FAMILIER);
- } else if (choixs111.equalsIgnoreCase("Cac")) {
- itemss111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ARME);
- }
- else if (itemss111 == null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous ne portez pas l'item.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int id33 = ((Objects) itemss111).getTemplate()
- .getLevel();
- int id666 = ((Objects) itemss111).getStats().getEffect(
- 119);
- if (id666 > 29 && id33 < 30) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 30 agi.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id666 > 49 && id33 < 100) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 50 agi.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id666 > 79 && id33 < 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 80 agi ou dans un autre élement.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id666 > 79 && id33 <= 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 80 agi ou dans un autre élement.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id666 > 99 && id33 > 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 100 agi ou dans un autre élement.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int newspoints1111 = maispoints1111 - taman111;
- SQLManager.UPDATE_ACCOUNT_point(newspoints1111,
- _perso.getAccID());
- ((Objects) itemss111).getStats().addOneStat(119, 10);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre "
- + ((Objects) itemss111)
- .getTemplate()
- .getName()
- + " donne désormais +10 agi ! penser a deco/reco pour voir les effect.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- case 73: // fm vita
- int taman11111 = 15;
- String choixs11111 = null;
- Objects itemss11111 = null;
- int maispoints111111 = SQLManager.GET_POINTS(_perso
- .getAccID());
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande inutilisable en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (maispoints111111 < taman11111) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il te faut "
- + taman11111
- + " points pour utiliser cette commande.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- choixs11111 = msg.substring(command.getName()
- .length() + 2, msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Liste (Faites .fmvita + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (choixs11111.equalsIgnoreCase("Coiffe")) {
- itemss11111 = _perso
- .getObjetByPos(Constant.ITEM_POS_COIFFE);
- } else if (choixs11111.equalsIgnoreCase("Cape")) {
- itemss11111 = _perso
- .getObjetByPos(Constant.ITEM_POS_CAPE);
- } else if (choixs11111.equalsIgnoreCase("AnneauDroite")) {
- itemss11111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- } else if (choixs11111.equalsIgnoreCase("AnneauGauche")) {
- itemss11111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- } else if (choixs11111.equalsIgnoreCase("Ceinture")) {
- itemss11111 = _perso
- .getObjetByPos(Constant.ITEM_POS_CEINTURE);
- } else if (choixs11111.equalsIgnoreCase("Bottes")) {
- itemss11111 = _perso
- .getObjetByPos(Constant.ITEM_POS_BOTTES);
- } else if (choixs11111.equalsIgnoreCase("Amulette")) {
- itemss11111 = _perso
- .getObjetByPos(Constant.ITEM_POS_AMULETTE);
- } else if (choixs11111.equalsIgnoreCase("Familier")) {
- itemss11111 = _perso
- .getObjetByPos(Constant.ITEM_POS_FAMILIER);
- } else if (choixs11111.equalsIgnoreCase("Cac")) {
- itemss11111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ARME);
- }
- else if (itemss11111 == null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous ne portez pas l'item.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int id1000 = ((Objects) itemss11111).getTemplate()
- .getLevel();
- int id100 = ((Objects) itemss11111).getStats()
- .getEffect(125);
- if (id100 > 49 && id1000 < 30) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 50 vita.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id100 > 79 && id1000 < 100) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 80 vita.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id100 > 149 && id1000 < 149) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 150 vita.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id100 > 149 && id1000 <= 149) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 150 vita.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id100 > 199 && id1000 > 149) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 200 vita.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int newspoints111111 = maispoints111111 - taman11111;
- SQLManager.UPDATE_ACCOUNT_point(newspoints111111,
- _perso.getAccID());
- ((Objects) itemss11111).getStats().addOneStat(125, 10);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre "
- + ((Objects) itemss11111)
- .getTemplate()
- .getName()
- + " donne désormais +10 vita ! penser a deco/reco pour voir les effect.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- case 71: // fm force
- int taman111111 = 15;
- String choixs111111 = null;
- Objects itemss111111 = null;
- int maispoints1111111 = SQLManager.GET_POINTS(_perso
- .getAccID());
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande inutilisable en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (maispoints1111111 < taman111111) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il te faut "
- + taman111111
- + " points pour utiliser cette commande.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- choixs111111 = msg.substring(command.getName()
- .length() + 2, msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Liste (Faites .fmforce + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (choixs111111.equalsIgnoreCase("Coiffe")) {
- itemss111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_COIFFE);
- } else if (choixs111111.equalsIgnoreCase("Cape")) {
- itemss111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_CAPE);
- } else if (choixs111111
- .equalsIgnoreCase("AnneauDroite")) {
- itemss111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- } else if (choixs111111
- .equalsIgnoreCase("AnneauGauche")) {
- itemss111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- } else if (choixs111111.equalsIgnoreCase("Ceinture")) {
- itemss111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_CEINTURE);
- } else if (choixs111111.equalsIgnoreCase("Bottes")) {
- itemss111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_BOTTES);
- } else if (choixs111111.equalsIgnoreCase("Amulette")) {
- itemss111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_AMULETTE);
- } else if (choixs111111.equalsIgnoreCase("Familier")) {
- itemss111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_FAMILIER);
- } else if (choixs111111.equalsIgnoreCase("Cac")) {
- itemss111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ARME);
- }
- else if (itemss111111 == null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous ne portez pas l'item.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int id22 = ((Objects) itemss111111).getTemplate()
- .getLevel();
- int id111111 = ((Objects) itemss111111).getStats()
- .getEffect(118);
- if (id111111 > 29 && id22 < 30) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 30 force.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id111111 > 59 && id22 < 100) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 60 force.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id111111 > 79 && id22 < 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 80 force ou dans un autre élement.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id111111 > 79 && id22 <= 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 80 force ou dans un autre élement.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id111111 > 99 && id22 > 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 100 force ou dans un autre élement.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int newspoints1111111 = maispoints1111111 - taman111111;
- SQLManager.UPDATE_ACCOUNT_point(newspoints1111111,
- _perso.getAccID());
- ((Objects) itemss111111).getStats().addOneStat(118, 10);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre "
- + ((Objects) itemss111111)
- .getTemplate()
- .getName()
- + " donne désormais +10 force ! penser a deco/reco pour voir les effect.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- case 70: // fm intel
- int taman22 = 15;
- String choixs22 = null;
- Objects itemss22 = null;
- int maispoints22 = SQLManager.GET_POINTS(_perso
- .getAccID());
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande inutilisable en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (maispoints22 < taman22) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il te faut "
- + taman22
- + " points pour utiliser cette commande.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- choixs22 = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Liste (Faites .fmintel + l'item (à porter sur le personnage) que vous voulez fm intel)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (choixs22.equalsIgnoreCase("Coiffe")) {
- itemss22 = _perso
- .getObjetByPos(Constant.ITEM_POS_COIFFE);
- } else if (choixs22.equalsIgnoreCase("Cape")) {
- itemss22 = _perso
- .getObjetByPos(Constant.ITEM_POS_CAPE);
- } else if (choixs22.equalsIgnoreCase("AnneauDroite")) {
- itemss22 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- } else if (choixs22.equalsIgnoreCase("AnneauGauche")) {
- itemss22 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- } else if (choixs22.equalsIgnoreCase("Ceinture")) {
- itemss22 = _perso
- .getObjetByPos(Constant.ITEM_POS_CEINTURE);
- } else if (choixs22.equalsIgnoreCase("Bottes")) {
- itemss22 = _perso
- .getObjetByPos(Constant.ITEM_POS_BOTTES);
- } else if (choixs22.equalsIgnoreCase("Amulette")) {
- itemss22 = _perso
- .getObjetByPos(Constant.ITEM_POS_AMULETTE);
- } else if (choixs22.equalsIgnoreCase("Familier")) {
- itemss22 = _perso
- .getObjetByPos(Constant.ITEM_POS_FAMILIER);
- } else if (choixs22.equalsIgnoreCase("Cac")) {
- itemss22 = _perso
- .getObjetByPos(Constant.ITEM_POS_ARME);
- }
- else if (itemss22 == null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous ne portez pas l'item.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int id1111111111 = ((Objects) itemss22).getTemplate()
- .getLevel();
- int id11111111 = ((Objects) itemss22).getStats()
- .getEffect(126);
- if (id11111111 > 99 && id1111111111 > 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 100 intel ou dans un autre élement.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id11111111 > 79 && id1111111111 <= 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 80 intel ou dans un autre élement.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id11111111 > 59 && id1111111111 < 100) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 60 intel.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (id11111111 > 29 && id1111111111 < 30) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 30 intel.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int newspoints11111111 = maispoints22 - taman22;
- SQLManager.UPDATE_ACCOUNT_point(newspoints11111111,
- _perso.getAccID());
- ((Objects) itemss22).getStats().addOneStat(126, 10);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre "
- + ((Objects) itemss22)
- .getTemplate()
- .getName()
- + " donne désormais +10 intel ! penser a deco/reco pour voir les effect.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- case 99: // reboot
- long uptime1 = System.currentTimeMillis() - Config.gameServer.getStartTime();
- int jour1 = (int) (uptime1 / (1000 * 3600 * 24));
- uptime1 %= (1000 * 3600 * 24);
- int hour1 = (int) (uptime1 / (1000 * 3600));
- uptime1 %= (1000 * 3600);
- int min1 = (int) (uptime1 / (1000 * 60));
- uptime1 %= (1000 * 60);
- int sec1 = (int) (uptime1 / (1000));
- // RebootTime
- String infos111111 = "<b>Informations Sufoko :</b>\n"
- + "Uptime : <b>"
- + jour1
- + "J "
- + hour1
- + "H "
- + min1
- + "M "
- + sec1
- + "S</b>\n"
- + "Joueurs Online : <b>"
- + World.getOnlinePersos().size()
- + " Joueur(s)</b>\n"
- + "Records de Connexions : <b>"
- + Config.gameServer.getMaxPlayer()
- + " Joueur(s)</b>\n"
- + "Reboot auto tout les : <b>"
- + 7
- + " Jours ";
- SocketManager.GAME_SEND_INBOX(_perso, infos111111);
- break;
- case 43: // FM PA
- int taman1111111 = 30;
- String choixs1111111 = null;
- Objects itemss1111111 = null;
- int maispoints2111111111 = SQLManager.GET_POINTS(_perso
- .getAccID());
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande inutilisable en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (!(_perso.get_exo() == 0)){
- } else if (maispoints2111111111 < taman1111111) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il te faut "
- + taman1111111
- + " points pour utiliser cette commande.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- choixs1111111 = msg.substring(command.getName()
- .length() + 2, msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Liste (Faites .fmpa + l'item (à porter sur le personnage) que vous voulez fm PA)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (choixs1111111.equalsIgnoreCase("Coiffe")) {
- itemss1111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_COIFFE);
- } else if (choixs1111111.equalsIgnoreCase("Cape")) {
- itemss1111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_CAPE);
- } else if (choixs1111111
- .equalsIgnoreCase("AnneauDroite")) {
- itemss1111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- } else if (choixs1111111
- .equalsIgnoreCase("AnneauGauche")) {
- itemss1111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- } else if (choixs1111111.equalsIgnoreCase("Ceinture")) {
- itemss1111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_CEINTURE);
- } else if (choixs1111111.equalsIgnoreCase("Bottes")) {
- itemss1111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_BOTTES);
- } else if (choixs1111111.equalsIgnoreCase("Amulette")) {
- itemss1111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_AMULETTE);
- } else if (choixs1111111.equalsIgnoreCase("Cac")) {
- itemss1111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ARME);
- }
- if (itemss1111111 == null)
- {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous ne portez pas l'item.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int id111111111 = ((Objects) itemss1111111).getStats()
- .getEffect(111);
- if (id111111111 > 0) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 1 PA.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (!(_perso.get_exo() == 1))
- updateMyPoints(_perso, maispoints2111111111 - taman1111111);
- ((Objects) itemss1111111).getStats().addOneStat(111, 1);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre "
- + ((Objects) itemss1111111)
- .getTemplate()
- .getName()
- + " donne désormais +1PA ! penser a deco/reco pour voir les effect.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- case 44: // FM PM
- int taman231111111 = 30;
- String choixs2311111111 = null;
- Objects itemsss21111111 = null;
- int maispoints22111111111 = SQLManager.GET_POINTS(_perso
- .getAccID());
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande inutilisable en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (!(_perso.get_exo() == 0)){
- } else if (maispoints22111111111 < taman231111111) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il te faut "
- + taman231111111
- + " points pour utiliser cette commande.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- choixs2311111111 = msg.substring(command.getName()
- .length() + 2, msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Liste (Faites .fmpm + l'item (à porter sur le personnage) que vous voulez fm PA)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (choixs2311111111.equalsIgnoreCase("Coiffe")) {
- itemsss21111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_COIFFE);
- } else if (choixs2311111111.equalsIgnoreCase("Cape")) {
- itemsss21111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_CAPE);
- } else if (choixs2311111111
- .equalsIgnoreCase("AnneauDroite")) {
- itemsss21111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- } else if (choixs2311111111
- .equalsIgnoreCase("AnneauGauche")) {
- itemsss21111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- } else if (choixs2311111111.equalsIgnoreCase("Ceinture")) {
- itemsss21111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_CEINTURE);
- } else if (choixs2311111111.equalsIgnoreCase("Bottes")) {
- itemsss21111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_BOTTES);
- } else if (choixs2311111111.equalsIgnoreCase("Amulette")) {
- itemsss21111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_AMULETTE);
- } else if (choixs2311111111.equalsIgnoreCase("Cac")) {
- itemsss21111111 = _perso
- .getObjetByPos(Constant.ITEM_POS_ARME);
- }
- if (itemsss21111111 == null)
- {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous ne portez pas l'item.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int id11111111111 = ((Objects) itemsss21111111).getStats()
- .getEffect(128);
- if (id11111111111 > 0) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 1 PM.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (!(_perso.get_exo() == 1))
- updateMyPoints(_perso, maispoints22111111111 - taman231111111);
- ((Objects) itemsss21111111).getStats().addOneStat(128, 1);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre "
- + ((Objects) itemsss21111111)
- .getTemplate()
- .getName()
- + " donne désormais +1PM ! penser a deco/reco pour voir les effect.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- case 199: // FM PO
- int taman111111111 = 70;
- String choix11 = null;
- itemss = null;
- int maispoints2211111111111 = SQLManager
- .GET_POINTS(_perso.getAccID());
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande inutilisable en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (maispoints2211111111111 < taman111111111) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il te faut "
- + taman111111111
- + " points pour utiliser cette commande.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- choix11 = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Liste (Faites .fmpo + l'item (à porter sur le personnage) que vous voulez fm PA)Coiffe, Cape, AnneauDroite, AnneauGauche, Amulette, Ceinture, Bottes, Cac, Familier",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (choix11 == null || choix11.trim().equalsIgnoreCase(""))
- return true;
- if (choix11.equalsIgnoreCase("Coiffe"))//
- {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_COIFFE);
- } else if (choix11.equalsIgnoreCase("Cape")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_CAPE);
- } else if (choix11.equalsIgnoreCase("AnneauDroite")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- } else if (choix11.equalsIgnoreCase("AnneauGauche")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- } else if (choix11.equalsIgnoreCase("Ceinture")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_CEINTURE);
- } else if (choix11.equalsIgnoreCase("Bottes")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_BOTTES);
- } else if (choix11.equalsIgnoreCase("Amulette")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_AMULETTE);
- } else if (choix11.equalsIgnoreCase("Familier")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_FAMILIER);
- } else if (choix11.equalsIgnoreCase("Cac")) {
- itemss = _perso
- .getObjetByPos(Constant.ITEM_POS_ARME);
- }
- if (itemss == null)
- {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous ne portez pas l'item.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int id21 = itemss.getStats()
- .getEffect(117);
- if (id21 > 1) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Ton Item donne déjà 1 PO.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int newspoints121 = maispoints2211111111111
- - taman111111111;
- SQLManager.UPDATE_ACCOUNT_point(newspoints121,
- _perso.getAccID());
- ((Objects) itemss).getStats().addOneStat(117,
- 1);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre "
- + ((Objects) itemss)
- .getTemplate()
- .getName()
- + " donne désormais +1PO ! penser a deco/reco pour voir les effect.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- case 88:
- int pointsR = 50;
- String choixI = null;
- String choixE = null;
- int element = 0;
- Objects itemsP = null;
- points = SQLManager.GET_POINTS(_perso.getAccID());
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande inutilisable en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (points < pointsR) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il te faut "
- + pointsR
- + " points pour utiliser cette commande.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- choixI = msg.split("\\ ")[1];
- choixE = msg.split("\\ ")[2];
- } catch (Exception e) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "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)",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- // Elements
- if (choixE.equalsIgnoreCase("Feu|")) {
- element = 126;
- } else if (choixE.equalsIgnoreCase("Air|")) {
- element = 119;
- } else if (choixE.equalsIgnoreCase("Terre|")) {
- element = 118;
- } else if (choixE.equalsIgnoreCase("Eau|")) {
- element = 123;
- }
- /*
- * if(choixE != "Terre" || choixE != "Eau" ||choixE !=
- * "Air" ||choixE != "Feu"){ SocketManager
- * .GAME_SEND_MESSAGE( _perso, "Element inconnu.",
- * Config.CONFIG_MOTD_COLOR); return true; }
- */
- // POS Item
- if (choixI.equalsIgnoreCase("Coiffe")) {
- itemsP = _perso
- .getObjetByPos(Constant.ITEM_POS_COIFFE);
- } else if (choixI.equalsIgnoreCase("Cape")) {
- itemsP = _perso
- .getObjetByPos(Constant.ITEM_POS_CAPE);
- } else if (choixI.equalsIgnoreCase("AnneauDroite")) {
- itemsP = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- } else if (choixI.equalsIgnoreCase("AnneauGauche")) {
- itemsP = _perso
- .getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- } else if (choixI.equalsIgnoreCase("Ceinture")) {
- itemsP = _perso
- .getObjetByPos(Constant.ITEM_POS_CEINTURE);
- } else if (choixI.equalsIgnoreCase("Bottes")) {
- itemsP = _perso
- .getObjetByPos(Constant.ITEM_POS_BOTTES);
- } else if (choixI.equalsIgnoreCase("Amulette")) {
- itemsP = _perso
- .getObjetByPos(Constant.ITEM_POS_AMULETTE);
- } else if (choixI.equalsIgnoreCase("Familier")) {
- itemsP = _perso
- .getObjetByPos(Constant.ITEM_POS_FAMILIER);
- } else if (choixI.equalsIgnoreCase("Cac")) {
- itemsP = _perso
- .getObjetByPos(Constant.ITEM_POS_ARME);
- }
- else if (itemsP == null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous ne portez pas l'item.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int LvlItem = ((Objects) itemsP).getTemplate()
- .getLevel();
- int EffectItem = ((Objects) itemsP).getStats()
- .getEffect(element);
- if (EffectItem > 29 && LvlItem < 30) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 30 en "
- + Constant
- .getElement(element)
- + "",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (EffectItem > 59 && LvlItem < 100) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 60 en "
- + Constant
- .getElement(element)
- + "",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (EffectItem > 79 && LvlItem < 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 80 en "
- + Constant
- .getElement(element)
- + "",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- if (EffectItem > 89 && LvlItem > 149) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton Item donne déjà 90 en "
- + Constant
- .getElement(element)
- + "",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- // objet feu different air
- if (itemsP.getFM() != element && itemsP.getFM() != 0) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Ton item est déjà FM dans un autre élement.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- int newPoints = points - pointsR;
- SQLManager.UPDATE_ACCOUNT_point(newPoints,
- _perso.getAccID());
- itemsP.getStats().addOneStat(element, 10);
- itemsP.setFM(element);
- SQLManager.SAVE_ITEM(itemsP);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Votre "
- + ((Objects) itemsP)
- .getTemplate()
- .getName()
- + " donne désormais +10 en "
- + Constant.getElement(element)
- + " ! penser a deco/reco pour voir les effects.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- case 94:// ChangeName
- /** TROP BON CE PATOU **/
- String nameP = _perso.get_name();
- String newName;
- int pointsAct = _compte.get_points();
- int pointsReq = 30;
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Tu ne peut pas changer de nom en combat.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (pointsAct < pointsReq) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Tu n'as pas assez de points boutique.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- try {
- newName = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Tape : .changename NAME",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (SQLManager.persoExist(newName)) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Nous sommes désolé, ce nom est déjà utilisé..",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- // Pour pas qu'il foute le dawah dans son nom!
- if (newName.length() < 2 || newName.length() > 10
- || newName.contains("modérateur")
- || newName.contains("créateur")
- || newName.contains(" ")
- || newName.contains("mj")
- || newName.contains("staff")
- || newName.contains(";")
- || newName.contains(",")
- || newName.contains(":")
- || newName.contains("§")
- || newName.contains("/")
- || newName.contains("?")
- || newName.contains("STAFF")
- || newName.contains("'")
- || newName.contains("MJ")
- || newName.contains("animateur")
- || newName.contains("ANIMATEUR")
- || newName.contains("CREATEUR")
- || newName.contains("MODERATEUR")
- || newName.contains("[")
- || newName.contains("]")
- || newName.contains("{")
- || newName.contains("}")
- || newName.contains("<")
- || newName.contains(">")
- || newName.contains("&")
- || newName.contains("[")
- || newName.contains("-")
- || newName.contains("\"")) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Les conditions de votre nouveau nom ne sont pas acquises.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- // Si nouveau nom différent de l'ancien
- if (newName != nameP) {
- _perso.set_name(newName);
- _perso.set_tag("");
- _perso.set_Localname(newName);
- SQLManager.SAVE_PERSONNAGE(_perso, false);
- SocketManager.GAME_SEND_ALTER_GM_PACKET(
- _perso.get_curCarte(), _perso);
- SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
- _perso.get_curCarte(), _perso.get_GUID());
- SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
- _perso.get_curCarte(), _perso);
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Votre nouveau nom est : " + newName + "",
- Config.CONFIG_MOTD_COLOR);
- } else {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il faut que ton nouveau nom soit différent de l'ancien.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- break;
- case 39: // Type LevelUp des sorts
- String[] mySplit = args.split(",");
- int levelUp = Integer.parseInt(mySplit[0]) > 6 ? (6)
- : (Integer.parseInt(mySplit[0]));
- boolean isFree = Boolean.parseBoolean(mySplit[1]
- .toLowerCase());
- for (SortStats spell : _perso.getSorts()) {
- int curLevel = _perso.getSortStatBySortIfHas(
- spell.getSpellID()).getLevel();
- if (curLevel != 6 || curLevel < levelUp) {
- while (curLevel < levelUp) {
- if (!isFree) {
- if (_perso.get_spellPts() >= curLevel
- && World.getSort(
- spell.getSpellID())
- .getStatsByLevel(
- curLevel + 1)
- .getReqLevel() <= _perso
- .get_lvl()) {
- if (_perso.learnSpell(
- spell.getSpellID(),
- curLevel + 1, false, false)) {
- _perso.set_spellPts(_perso
- .get_spellPts()
- - curLevel);
- }
- }
- curLevel++;
- } else {
- if (World.getSort(spell.getSpellID())
- .getStatsByLevel(curLevel + 1)
- .getReqLevel() <= _perso
- .get_lvl())
- _perso.learnSpell(
- spell.getSpellID(),
- curLevel + 1, false, false);
- curLevel++;
- }
- }
- }
- }
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager.GAME_SEND_SPELL_LIST(_perso);
- break;
- case 101:
- {
- if ((_perso != null) && (_perso.isOnline()))
- if (!_perso.hasItemTemplate(683, 1)) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Les inscription dead match sont reserver pour la communaute des mondes PVP.",
- AllColor.GOLD);
- break;
- }}
- Manager deathMatch = World.deathMatch;
- try {
- argument = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Faites .deathmatch off/on.",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- switch (argument.toLowerCase()) {
- case "on": {
- if (_perso.getDeathMatch() != null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "<b>DeathMatch</b>: vous êtes dejà inscrit !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- deathMatch.addPlayer(_perso);
- break;
- }
- case "off": {
- if (_perso.getDeathMatch() == null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "<b>DeathMatch</b>: vous n'êtes pas inscrit !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- deathMatch.removePlayer(_perso);
- break;
- }
- }
- break;
- case 18: //Lancer une traque
- Stalk.newTraque(_perso);
- break;
- case 19: //Récompense de traque
- Stalk.getRecompense(_perso);
- break;
- case 20: //Géoposition de la cible
- Stalk.getTraquePosition(_perso);
- break;
- case 86: // Demorph
- int morphID11 = 0;
- try {
- morphID11 = Integer.parseInt(msg.substring(
- command.getName().length() + 2,
- msg.length() - 1).trim());
- if (Config.CONFIG_MORPH_UNPROHIBIDEN
- .contains(morphID11)) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "MorphID non autorisé",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- } catch (Exception e) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "MorphID non autorisé",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- _perso.set_gfxID(morphID11);
- SocketManager.GAME_SEND_ERASE_ON_MAP_TO_MAP(
- _perso.get_curCarte(), _perso.get_GUID());
- SocketManager.GAME_SEND_ADD_PLAYER_TO_MAP(
- _perso.get_curCarte(), _perso);
- break;
- case 60:// Refresmobs
- _perso.get_curCarte().refreshSpawns();
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Les monstre sur la map on etait refresh!.",
- AllColor.RED);
- break;
- case 50:// Listing des commandes
- SocketManager.GAME_SEND_MESSAGE(_perso,
- SQLManager.LISTE_RECOMP(), AllColor.GOLD);
- break;
- case 127: // Commandes Kolizeum 2vs2
- String split;
- try {
- split = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- if (_perso.getKolizeum2() == 0)
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous êtes déjà inscris au Kolizeum ! Faites |<b> ."
- + command.getName()
- + " off </b>| pour vous désinscrire...",
- Config.CONFIG_MOTD_COLOR);
- else if (_perso.getKolizeum2() == 1)
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous êtes en combat d'arène !",
- Config.CONFIG_MOTD_COLOR);
- else
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous n'êtes pas inscris, faites |<b> ."
- + command.getName()
- + " on </b>| pour vous inscrire !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (split.equals("on")) {
- if (_perso.getKolizeum2() != -1) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous êtes déjà inscris ou participez déjà au Kolizeum !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (_perso.getGroup() != null) {
- if (_perso.getGroup().getPersos().size() > Config.PLAYER_KOLI2
- || _perso.getGroup().getPersos().size() < Config.PLAYER_KOLI2) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Votre groupe doit contenir exactement "
- + Config.PLAYER_KOLI2
- + " joueurs !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (!_perso.getGroup().isChief(
- _perso.get_GUID())) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous devez être le chef de groupe pour vous inscrire !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- for (Player c : _perso.getGroup().getPersos()) {
- try {
- if (c.getKolizeum2() != -1) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le joueur "
- + c.get_name()
- + " est déjà inscris ou participe actuellement au kolizeum !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- else if (!c.isOnline()) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le joueur "
- + c.get_name()
- + " n'est pas connecté !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (c.get_fight() != null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le joueur "
- + c.get_name()
- + " est en combat !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else {
- break;
- }
- } catch (Exception e) {
- }
- }
- } else {
- if (_perso.get_fight() != null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous êtes actuellement en combat !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else {
- K2.addPlayer(_perso);
- break;
- }
- }
- } else if (split.equals("off")) {
- try {
- if (_perso.getKolizeum2() == 1
- && _perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous êtes en plein tournoi !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (_perso.getKolizeum2() == -1) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous n'êtes pas inscris au kolizeum !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else {
- K2.delPlayer(_perso);
- break;
- }
- } catch (Exception e) {
- }
- } else if (split.equals("infos")) {
- if (_perso.getKolizeum2() == 1
- && _perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous êtes en plein tournoi !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (_perso.getKolizeum2() == -1) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous n'êtes pas inscris au kolizeum !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else {
- String content = null;
- if (_perso.getKoliTeam().getkCharacters()
- .size() < Config.PLAYER_KOLI2)
- content = "Il manque <b>"
- + (Config.PLAYER_KOLI2 - _perso
- .getKoliTeam()
- .getkCharacters().size())
- + "</b> joueurs dans votre équipe !";
- else
- content = "Votre équipe est au complet ! Patientez le temps qu'une autre équipe soit formée..";
- SocketManager.GAME_SEND_MESSAGE(_perso,
- content, Config.CONFIG_MOTD_COLOR);
- break;
- }
- } else {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Tâche non reconnue, faites ."
- + command.getName()
- + " pour avoir des informations sur la commande.",
- AllColor.RED);
- break;
- }
- break;
- case 128: // Commandes Kolizeum 3vs3
- try {
- split = msg.substring(
- command.getName().length() + 2,
- msg.length() - 1);
- } catch (Exception e) {
- if (_perso.getKolizeum3() == 0)
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous êtes déjà inscris au Kolizeum ! Faites |<b> ."
- + command.getName()
- + " off </b>| pour vous désinscrire...",
- Config.CONFIG_MOTD_COLOR);
- else if (_perso.getKolizeum3() == 1)
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous êtes en combat d'arène !",
- Config.CONFIG_MOTD_COLOR);
- else
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous n'êtes pas inscris, faites |<b> ."
- + command.getName()
- + " on </b>| pour vous inscrire !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (split.equals("on")) {
- if (_perso.getKolizeum3() != -1) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous êtes déjà inscris ou participez déjà au Kolizeum !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- if (_perso.getGroup() != null) {
- if (_perso.getGroup().getPersos().size() > Config.PLAYER_KOLI3
- || _perso.getGroup().getPersos().size() < Config.PLAYER_KOLI3) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Votre groupe doit contenir exactement "
- + Config.PLAYER_KOLI3
- + " joueurs !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (!_perso.getGroup().isChief(
- _perso.get_GUID())) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous devez être le chef de groupe pour vous inscrire !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- for (Player c : _perso.getGroup().getPersos()) {
- try {
- if (c.getKolizeum3() != -1) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le joueur "
- + c.get_name()
- + " est déjà inscris ou participe actuellement au kolizeum !",
- Config.CONFIG_MOTD_COLOR);
- break;
- }
- else if (!c.isOnline()) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le joueur "
- + c.get_name()
- + " n'est pas connecté !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (c.get_fight() != null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Le joueur "
- + c.get_name()
- + " est en combat !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else {
- K3.addGroup(_perso.getGroup());
- break;
- }
- } catch (Exception e) {
- }
- }
- } else {
- if (_perso.get_fight() != null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous êtes actuellement en combat !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else {
- K3.addPlayer(_perso);
- break;
- }
- }
- } else if (split.equals("off")) {
- try {
- if (_perso.getKolizeum3() == 1
- && _perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous êtes en plein tournoi !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (_perso.getKolizeum3() == -1) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous n'êtes pas inscris au kolizeum !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else {
- K3.delPlayer(_perso);
- break;
- }
- } catch (Exception e) {
- }
- } else if (split.equals("infos")) {
- if (_perso.getKolizeum3() == 1
- && _perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous êtes en plein tournoi !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else if (_perso.getKolizeum3() == -1) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous n'êtes pas inscris au kolizeum !",
- Config.CONFIG_MOTD_COLOR);
- break;
- } else {
- String content = null;
- if (_perso.getKoliTeam().getkCharacters()
- .size() < Config.PLAYER_KOLI3)
- content = "Il manque <b>"
- + (Config.PLAYER_KOLI3 - _perso
- .getKoliTeam()
- .getkCharacters().size())
- + "</b> joueurs dans votre équipe !";
- else
- content = "Votre équipe est au complet ! Patientez le temps qu'une autre équipe soit formée..";
- SocketManager.GAME_SEND_MESSAGE(_perso,
- content, Config.CONFIG_MOTD_COLOR);
- break;
- }
- } else {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Tâche non reconnue, faites ."
- + command.getName()
- + " pour avoir des informations sur la commande.",
- AllColor.RED);
- break;
- }
- break;
- case -2:
- if(_perso.get_fight() != null){
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Impossible de se téléporter en combat.",
- AllColor.RED);
- }
- mapID = 952;
- cellID = 462;
- 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é!");
- _perso.teleport(mapID, cellID);
- break;//JP
- case 150:
- if(_perso.get_fight() != null){
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Impossible de se téléporter en combat.",
- AllColor.RED);
- }
- mapID = 19345;
- cellID = 462;
- 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é!");
- _perso.teleport(mapID, cellID);
- break;
- case 730://creation de titre personalisee
- String response = "";
- try {
- String _infos = msg.substring(command.getName().length() + 2, msg.length() - 1);
- String _color = _infos.split(" ")[_infos.split(" ").length-1];
- String _title = _infos.substring(0, _infos.length() - _color.length());
- int _colorToSend = Integer.parseInt(_color, 16);
- response = Util.SendPost(_title+";"+_colorToSend, _perso);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- switch(response.charAt(0))
- {
- case 'Y':
- String id = response.split("/")[1].trim();
- _perso.set_title(Integer.parseInt(id));
- 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);
- break;
- case 'N':
- SocketManager.GAME_SEND_MESSAGE(_perso, "Une erreur est survenu lors de la creation de votre titre.", Config.CONFIG_MOTD_COLOR);
- break;
- default:
- SocketManager.GAME_SEND_MESSAGE(_perso, "Erreur inattendu", Config.CONFIG_MOTD_COLOR);
- break;
- }
- break;
- //JP
- case 51:// Send des commandes
- try {
- int numero;
- try {
- numero = Integer.parseInt(msg.replace(
- ".achatkoli ", "").replace("|", ""));
- } catch (Exception e) {
- SocketManager.GAME_SEND_MESSAGE(
- _perso,
- msg.replace(".achatkoli ", "").replace(
- "|", "")
- + ":msg", AllColor.RED);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Il semblerait que vous n'avez pas utiliser un format de commande correct, veuillez réessayer.",
- AllColor.RED);
- break;
- }
- String Commande = SQLManager.RECOMPBYID(numero);
- if (Commande == null) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Aucunes commandes ne correspond à ce numéro.",
- AllColor.RED);
- break;
- }
- if (_perso.get_fight() != null) {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Vous êtes en combat..", AllColor.RED);
- break;
- }
- String nom, arg;
- int typ, cout;
- try {
- nom = Commande.split("/")[0];
- cout = Integer.parseInt(Commande.split("/")[1]);
- typ = Integer.parseInt(Commande.split("/")[2]);
- arg = Commande.split("/")[3];
- } catch (Exception e) {
- break;
- }
- if (!_perso.hasItemTemplate(100111, cout)) {
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Désolé, il semblerait que vous n'avez pas assez de kolizeton pour effectuer cette action.",
- AllColor.RED);
- break;
- }
- switch (typ) {
- case 1:// ItemMax
- int template = Integer
- .parseInt(arg.split(",")[0]);
- int nbrt = Integer.parseInt(arg.split(",")[1]);
- ObjTemplate recompt = World
- .getObjTemplate(template);
- Objects recomp = recompt.createNewItem(nbrt,
- true, -1);
- if (_perso.addObjet(recomp, true))
- World.addObjet(recomp, true);
- break;
- case 2:// Titre
- _perso.set_title((byte) Integer.parseInt(arg));
- if (_perso.get_fight() == null)
- SocketManager.GAME_SEND_ALTER_GM_PACKET(
- _perso.get_curCarte(), _perso);
- break;
- }
- _perso.removeByTemplateID(100111, cout);
- SocketManager
- .GAME_SEND_MESSAGE(
- _perso,
- "Vous venez d'acheter "
- + nom
- + " pour la somme de "
- + cout
- + " kolizetons ! Merci de la confiance que vous nous apporter. Le staff vous en remercie.",
- AllColor.RED);
- } catch (Exception e) {
- break;
- }
- break;
- default:
- break;
- }
- }
- SQLManager.SAVE_PERSONNAGE(_perso, true);
- return true;
- } else {
- SocketManager.GAME_SEND_MESSAGE(_perso,
- "Commande entré n'a pas pu être traité.",
- Config.CONFIG_MOTD_COLOR);
- return true;
- }
- }
- return false;
- }
- public static void updateMyPoints(Player player, int newcount)
- {
- SQLManager.UPDATE_ACCOUNT_point(newcount,
- player.getAccID());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement