클래스 변경물약
/** 클래스 변경 물약 */
} else if (itemId >= 51093 && itemId <= 51099) {
if (pc.getClanid() != 0) {
pc.sendPackets(new S_SystemMessage(
"혈맹을 먼저 탈퇴하여 주시기 바랍니다."));
return;
} else if (itemId == 51093 && pc.getType() == 0) { // 자네 군주?
pc.sendPackets(new S_SystemMessage("당신은 이미 군주 클래스 입니다."));
return;
} else if (itemId == 51094 && pc.getType() == 1) { // 자네 기사?
pc.sendPackets(new S_SystemMessage("당신은 이미 기사 클래스 입니다."));
return;
} else if (itemId == 51095 && pc.getType() == 2) { // 자네 요정?
pc.sendPackets(new S_SystemMessage("당신은 이미 요정 클래스 입니다."));
return;
} else if (itemId == 51096 && pc.getType() == 3) { // 자네
// 마법사?
pc.sendPackets(new S_SystemMessage(
"당신은 이미 마법사 클래스 입니다."));
return;
} else if (itemId == 51097 && pc.getType() == 4) { // 자네
// 다크엘프?
pc.sendPackets(new S_SystemMessage(
"당신은 이미 다크엘프 클래스 입니다."));
return;
} else if (itemId == 51098 && pc.getType() == 5) { // 자네
// 용기사?
pc.sendPackets(new S_SystemMessage(
"당신은 이미 용기사 클래스 입니다."));
return;
} else if (itemId == 51099 && pc.getType() == 6) { // 자네
// 환술사?
pc.sendPackets(new S_SystemMessage(
"당신은 이미 환술사 클래스 입니다."));
return;
}
int[] Mclass = new int[] { 1, 61, 138, 734, 2786, 6658,
6671 };
int[] Wclass = new int[] { 1, 48, 37, 1186, 2796, 6661,
6650 };
if (itemId == 51093 && pc.getType() != 0
&& pc.get_sex() == 0) {
pc.setType(0);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 51093 && pc.getType() != 0
&& pc.get_sex() == 1) {// 군주
pc.setType(0);
pc.setClassId(Wclass[pc.getType()]);
} else if (itemId == 51094 && pc.getType() != 1
&& pc.get_sex() == 0) { // 변경: 기사
pc.setType(1);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 51094 && pc.getType() != 1
&& pc.get_sex() == 1) {
pc.setType(1);
pc.setClassId(Wclass[pc.getType()]);
} else if (itemId == 51095 && pc.getType() != 2
&& pc.get_sex() == 0) { // 변경: 요정
pc.setType(2);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 51095 && pc.getType() != 2
&& pc.get_sex() == 1) {
pc.setType(2);
pc.setClassId(Wclass[pc.getType()]);
} else if (itemId == 51096 && pc.getType() != 3
&& pc.get_sex() == 0) { // 변경: 마법사
pc.setType(3);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 51096 && pc.getType() != 3
&& pc.get_sex() == 1) {
pc.setType(3);
pc.setClassId(Wclass[pc.getType()]);
} else if (itemId == 51097 && pc.getType() != 4
&& pc.get_sex() == 0) { // 변경: 다크엘프
pc.setType(4);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 51097 && pc.getType() != 4
&& pc.get_sex() == 1) {
pc.setType(4);
pc.setClassId(Wclass[pc.getType()]);
} else if (itemId == 51098 && pc.getType() != 5
&& pc.get_sex() == 0) { // 변경: 용기사
pc.setType(5);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 51098 && pc.getType() != 5
&& pc.get_sex() == 1) {
pc.setType(5);
pc.setClassId(Wclass[pc.getType()]);
} else if (itemId == 51099 && pc.getType() != 6
&& pc.get_sex() == 0) { // 변경: 환술사
pc.setType(6);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 51099 && pc.getType() != 6
&& pc.get_sex() == 1) {
pc.setType(6);
pc.setClassId(Wclass[pc.getType()]);
}
if (pc.getWeapon() != null)
pc.getInventory().setEquipped(pc.getWeapon(), false,
false, false);
pc.getInventory().takeoffEquip(945);
pc.sendPackets(new S_CharVisualUpdate(pc));
for (L1ItemInstance armor : pc.getInventory().getItems()) {
for (int type = 0; type <= 12; type++) {
if (armor != null) {
pc.getInventory().setEquipped(armor, false,
false, false);
}
}
}
pc.sendPackets(new S_DelSkill(255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255));
deleteSpell(pc);
pc.getGfxId().setTempCharGfx(pc.getClassId());
pc.sendPackets(new S_ChangeShape(pc.getId(), pc
.getClassId()));
Broadcaster.broadcastPacket(pc,
new S_ChangeShape(pc.getId(), pc.getClassId()));
pc.getInventory().removeItem(useItem, 1);
pc.save();
Thread.sleep(500);
pc.sendPackets(new S_Disconnect());
/** 클래스 변경 물약 */
디비부분은 알아서 아이템만드시면됩니다.

댓글3
- 1
오징어소녀 님의 최근 댓글
db 부분에서 추가 하시면 됩니다 2016 04.18