def apply(self, client, args):
     target = DAO.getPlayers().getCharacter(args[0])
     if target is None:
         client.send(ConsoleMessage(0, "The target is missing"))
     else:
         sb = StringBuilder()
         for player in DAO.getPlayers().getByIp(target.getClient().getIP()):
             sb.append("Player ").append(player.getNickName())
             sb.append(" Level ").append(player.getLevel())
             sb.append(" PH ").append(player.getHonor())
             sb.append(" MapPos ").append(
                 player.getCurrentMap().posToString()).append("\n")
         sb.append("IP ").append(target.getClient().getIP())
         sb.append(" Nickname ").append(target.getAccount().nickName)
         client.send(ConsoleMessage(0, sb.toString()))
예제 #2
0
 def apply(self, client, args):
     target = DAO.getPlayers().getCharacter(args[0])
     if target is None or target.getClient() is None:
         client.send(ConsoleMessage(0, "The target is missing"))
     else:
         target.getClient().timeOut()
         client.send(ConsoleMessage(0, "The target has been expelled"))
예제 #3
0
 def apply(self, client, args):
     target = DAO.getPlayers().getCharacter(args[1])
     if target is None or target.getClient() is None:
         client.send(ConsoleMessage(0, "The target is missing"))
     else:
         target.addExperience((DAO.getExps().getPlayerMinExp(int(args[0])) +
                               1) - target.getExperience())
         client.send(ConsoleMessage(0, "The level has been upped"))
예제 #4
0
    def apply(self,client,args):
        target = DAO.getPlayers().getCharacterOwner(args[0]);

        if target == -1 :
            client.send(ConsoleMessage(0, "The target is missing"));
        else:
            Main.getInterClient().send(AccountTookAwayMessage(target));
            client.send(ConsoleMessage(0, "The target has been unsuspended"));
예제 #5
0
 def apply(self,client,args):
     target = DAO.getPlayers().getCharacter(args[0]);
     if target is None or target.getClient() is None :
         client.send(ConsoleMessage(0, "The target is missing"));
     else:
         time = Instant.now().plus(int(args[1]), ChronoUnit.HOURS).toEpochMilli();
         Main.getInterClient().send(PlayerSuspendedMessage(time,target.getAccount().getId()));
         target.getClient().timeOut();
         client.send(ConsoleMessage(0, "The target has been banned for "+ args[1] +" hours"));
예제 #6
0
 def apply(self,client,args):
     target = DAO.getPlayers().getCharacter(args[1]);
     if target is None or target.getClient() is None :
         client.send(ConsoleMessage(0, "The target is missing"));
     elif ArrayUtils.contains(client.getCharacter().getTitles(), int(args[0])):
         client.send(ConsoleMessage(0, "The target possesses already the title"));
     else:
         client.getCharacter().setTitles(ArrayUtils.add(client.getCharacter().getTitles(), int(args[0])));
         client.send(TitleGainedMessage(int(args[0])));
         client.send(ConsoleMessage(0, "The title has been added"));
예제 #7
0
 def apply(self, client, args):
     target = DAO.getPlayers().getCharacter(args[1])
     if target is None or target.getClient() is None:
         client.send(ConsoleMessage(0, "The target is missing"))
     elif ArrayUtils.contains(target.getOrnaments(), int(args[0])):
         client.send(
             ConsoleMessage(0, "The target possesses already the ornament"))
     else:
         target.setOrnaments(
             ArrayUtils.add(target.getOrnaments(), int(args[0])))
         target.send(OrnamentGainedMessage(int(args[0])))
         client.send(ConsoleMessage(0, "The ornament has been added"))
예제 #8
0
 def apply(self, client, args):
     target = DAO.getPlayers().getCharacter(args[0])
     if target is None or target.getClient() is None:
         client.send(ConsoleMessage(0, "The target is missing"))
     else:
         time = Instant.now().plus(int(args[1]),
                                   ChronoUnit.MINUTES).toEpochMilli()
         PlayerInst.getPlayerInst(target.getID()).setMutedTime(time)
         target.send(TextInformationMessage(1, 123, str(int(args[1]) * 60)))
         client.send(
             ConsoleMessage(
                 0,
                 "The target has been muted for " + args[1] + " minutes"))
예제 #9
0
 def apply(self, client, args):
     target = DAO.getPlayers().getCharacter(args[1])
     if target is None or target.getClient() is None:
         client.send(ConsoleMessage(0, "The target is missing"))
     else:
         target.addHonor(int(args[0]), True)
예제 #10
0
 def apply(self,client,args):
     target = DAO.getPlayers().getCharacter(args[0]);
     if target is None:
         client.send(ConsoleMessage(0, "The target is missing"));
     else:
         client.teleport(target.getMapid(),target.getCell().getId());
예제 #11
0
 def apply(self, client, args):
     players = DAO.getPlayers().getPlayers()
     for player in players:
         player.save(False)
     client.send(ConsoleMessage(0, "Save ended"))