Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 99:
- String[] arg;
- Objects o;
- String exp = "." + command.getName() + " position element ";
- String pos = "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, exp, 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, exp, Config.CONFIG_MOTD_COLOR);
- break;
- }
- switch(arg[0])
- {
- case "cape":
- o = _perso.getObjetByPos(Constant.ITEM_POS_CAPE);
- break;
- case "coiffe":
- o = _perso.getObjetByPos(Constant.ITEM_POS_COIFFE);
- break;
- case "anneau1":
- o = _perso.getObjetByPos(Constant.ITEM_POS_ANNEAU1);
- break;
- case "anneau2":
- o = _perso.getObjetByPos(Constant.ITEM_POS_ANNEAU2);
- break;
- case "amulette":
- o = _perso.getObjetByPos(Constant.ITEM_POS_AMULETTE);
- break;
- case "bottes":
- o = _perso.getObjetByPos(Constant.ITEM_POS_BOTTES);
- break;
- case "ceinture":
- o = _perso.getObjetByPos(Constant.ITEM_POS_CEINTURE);
- break;
- case "arme":
- o = _perso.getObjetByPos(Constant.ITEM_POS_ARME);
- break;
- case "bouclier":
- o = _perso.getObjetByPos(Constant.ITEM_POS_BOUCLIER);
- break;
- case "familier":
- o = _perso.getObjetByPos(Constant.ITEM_POS_FAMILIER);
- break;
- default:
- o = null;
- }
- if(o == null)
- {
- SocketManager.GAME_SEND_MESSAGE(_perso, pos, Config.CONFIG_MOTD_COLOR);
- break;
- }
- int element = -1;
- switch(arg[1])
- {
- case "pa":
- element = Constant.STATS_ADD_PA;
- break;
- case "pm":
- element = Constant.STATS_ADD_PM;
- break;
- case "po":
- element = Constant.STATS_ADD_PO;
- break;
- default:
- SocketManager.GAME_SEND_MESSAGE(_perso, "L'élément " + arg[1] + " n'existe pas ! Liste des élément : pa, pm, po", Config.CONFIG_MOTD_COLOR);
- break;
- }
- if(o.getStats().getEffect(element) > 0)
- {
- SocketManager.GAME_SEND_MESSAGE(_perso, "L'élément " + arg[1] + " est déjà dans l'item !", Config.CONFIG_MOTD_COLOR);
- break;
- }
- if(element == -1) break;
- o.getStats().addOneStat(element, 1);
- SocketManager.GAME_SEND_STATS_PACKET(_perso);
- SocketManager.GAME_SEND_MESSAGE(_perso, "Votre objet <b>" + o.getTemplate().getName() + "</b> a été forgemagé avec succès ! Il a 1 " + arg[1] + " de plus !", Config.CONFIG_MOTD_COLOR);
- SocketManager.GAME_SEND_MESSAGE(_perso, "Pensez à vous déconnecter pour voir les modifications apportés à votre objet !", Config.CONFIG_MOTD_COLOR);
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement