레벨업 시켜준 후 경험치까지 ㅋㅋㅋ 영자님들힘내삼
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package l1j.server.server.command.executor;
import java.util.StringTokenizer;
import java.util.logging.Logger;
import l1j.server.server.datatables.ExpTable;
import l1j.server.server.model.L1World;
import l1j.server.server.model.Instance.L1PcInstance;
import l1j.server.server.serverpackets.S_SystemMessage;
import l1j.server.server.utils.IntRange;
public class L1Percent implements L1CommandExecutor {
@SuppressWarnings("unused")
private static Logger _log = Logger.getLogger(L1Percent.class.getName());
private L1Percent() {
}
public static L1CommandExecutor getInstance() {
return new L1Percent();
}
@Override
public void execute(L1PcInstance pc, String cmdName, String arg) {
try {
StringTokenizer tok = new StringTokenizer(arg);
String user = tok.nextToken();
L1PcInstance target = L1World.getInstance().getPlayer(user);
int perent = Integer.parseInt(tok.nextToken());
if (! IntRange.includes(perent, 1, 99)) {
pc.sendPackets(new S_SystemMessage("1-99의 범위에서 지정해 주세요"));
return;
}
target.setExp((ExpTable.getNeedExpNextLevel(target.getLevel() + 1) / 100) * perent);
pc.sendPackets(new S_SystemMessage(target.getName()+"님의 경험치 변경됨! .정보 [케릭명]으로 확인요망"));
} catch (Exception e) {
pc.sendPackets(new S_SystemMessage(cmdName+" [경험치] 최대99 라고 입력"));
}
}
}
[출처] 레벨업 시켜준 후 경험치까지 ㅋㅋㅋ 영자님들힘내삼 (비공개 카페)

준희미니 님의 최근 댓글
rt 2021 05.25 ㄳ 2021 05.11 ㄳ 2021 05.11 rt 2021 05.09 rt 2021 04.25