falyptus

Commands

Jun 9th, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. case '*'://Canal noir
  2. if(!_perso.get_canaux().contains(packet.charAt(2)+""))return;
  3. msg = packet.split("\\|",2)[1];
  4. //Commandes joueurs
  5. if(msg.charAt(0) == '.')
  6. {
  7. //Retour au point de sauvegarde
  8. if(World.isCommand(msg))
  9. {
  10. FastCmd fastCmd = World.getCommand(command);
  11. new Action(fastCmd.getActionId(), fastCmd.getArgs(), "").apply(_perso, null, 0, -1);
  12. return;
  13. }
  14. if(msg.length() > 4 && msg.substring(1, 5).equalsIgnoreCase("help"))
  15. {
  16. String mess = "";
  17. for(common.World.FastCmd fastCmd : World.getFastCmds())
  18. {
  19. if(!mess.isEmpty())
  20. mess += "\n";
  21. mess += "- "+fastCmd.getName()+": "+fastCmd.getCommandInfos();
  22. }
  23. SocketManager.GAME_SEND_MESSAGE(_perso, mess, Ancestra.CONFIG_MOTD_COLOR);
  24. return;
  25. }
  26. //Tes autres commandes genre .infos etc
  27. }
  28. if(_perso.get_fight() == null)
  29. SocketManager.GAME_SEND_cMK_PACKET_TO_MAP(_perso.get_curCarte(), "", _perso.get_GUID(), _perso.get_name(), msg);
  30. else
  31. SocketManager.GAME_SEND_cMK_PACKET_TO_FIGHT(_perso.get_fight(), 7, "", _perso.get_GUID(), _perso.get_name(), msg);
  32. break;
Advertisement
Add Comment
Please, Sign In to add comment