게임강의
아이온 분류

종족변경

컨텐츠 정보

본문

옆집 펌-검은사막_슈퍼맨

/*
 * Copyright (C) 2010  AION-KOREA
 *
 * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
 */
package admincommands;

import org.aionkorea.aion.gameserver.configs.administration.CommandConfig;
import org.aionkorea.aion.gameserver.model.Race;
import org.aionkorea.aion.gameserver.model.gameobjects.VisibleObject;
import org.aionkorea.aion.gameserver.model.gameobjects.player.Player;
import org.aionkorea.aion.gameserver.services.TeleportService;
import org.aionkorea.aion.gameserver.utils.PacketSendUtility;
import org.aionkorea.aion.gameserver.utils.chathandlers.AdminCommand;
import org.aionkorea.aion.gameserver.world.WorldMapType;

/**
 * @author Centisgood(Barahime)
 */
public class SetRace extends AdminCommand
{
 public SetRace()
 {
  super("종족변경");
 }

 @Override
 public void executeCommand(Player admin, String[] params)
 {
  if(admin.getAccessLevel() < CommandConfig.COMMAND_SETRACE)
  {
  PacketSendUtility.sendMessage(admin, "이 명령어를 실행 할 권한이 없습니다!");
  return;
  }

  if(params == null || params.length < 1)
  {
  PacketSendUtility.sendMessage(admin, "사용법: //종족변경 <천족 | 마족>");
  return;
  }

  VisibleObject visibleobject = admin.getTarget();

  if(!(visibleobject instanceof Player) || visibleobject == null)
  {
  PacketSendUtility.sendMessage(admin, "플레이어 지정이 잘못되었거나 타겟팅 되지 않았습니다.");
  return;
  }

  Player target = (Player) visibleobject;
  if(params[0].equals("천족"))
  {
  target.getCommonData().setRace(Race.ELYOS);
  TeleportService.teleportTo(target, WorldMapType.SANCTUM.getId(), 1322, 1511, 568, 0);
  PacketSendUtility.sendMessage(target, "엘리시움으로 강제이동 되었습니다.");
  }
  else if(params[0].equals("마족"))
  {
  target.getCommonData().setRace(Race.ASMODIANS);
  TeleportService.teleportTo(target, WorldMapType.PANDAEMONIUM.getId(), 1679, 1400, 195, 0);
  PacketSendUtility.sendMessage(target, "판데모니움으로 강제이동 되었습니다.");
  }
  PacketSendUtility.sendMessage(admin,
  target.getName() + "의 종족이 " + params[0] + "으로 변경되었습니다.\n" + target.getName() + "은(는) 해당 종족의 대도시로 이동되었습니다.");

관련자료

댓글 0
등록된 댓글이 없습니다.
전체 6 / 1 페이지
번호
제목
이름

강의실

🏆 포인트 랭킹 TOP 10
순위 닉네임 포인트
1 no_profile 타키야겐지쪽지보내기 자기소개 아이디로 검색 전체게시물 102,949
2 no_profile 동가리쪽지보내기 자기소개 아이디로 검색 전체게시물 58,099
3 no_profile 라프텔쪽지보내기 자기소개 아이디로 검색 전체게시물 51,771
4 no_profile 불멸의행복쪽지보내기 자기소개 아이디로 검색 전체게시물 36,923
5 서번트쪽지보내기 자기소개 아이디로 검색 전체게시물 35,011
6 no_profile 보거스쪽지보내기 자기소개 아이디로 검색 전체게시물 29,969
7 no_profile 닥터스쪽지보내기 자기소개 아이디로 검색 전체게시물 29,470
8 no_profile 검은고양이쪽지보내기 자기소개 아이디로 검색 전체게시물 29,077
9 no_profile Revolution쪽지보내기 자기소개 아이디로 검색 전체게시물 28,199
10 no_profile 호롤롤로쪽지보내기 자기소개 아이디로 검색 전체게시물 17,020
알림 0