[중복] 자세히 클래스변경물약
예전 꺼라 전사케릭은 추가 하셔야 합니다
남자 캐릭터는 남자 캐릭터로만 변경되고, 여성은 여성 캐릭터로만 변경됨
나비켓 etc_item
7065 \f>클래스 변경: \f<군주 \f>클래스 변경: \f<군주 potion normal gemstone 1000 5088 7088 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1
7066 \f>클래스 변경: \f<기사 \f>클래스 변경: \f<기사 potion normal gemstone 1000 5090 7088 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1
7067 \f>클래스 변경: \f<요정 \f>클래스 변경: \f<요정 potion normal gemstone 1000 5096 7088 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1
7068 \f>클래스 변경: \f<법사 \f>클래스 변경: \f<법사 potion normal gemstone 1000 5094 7088 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1
7069 \f>클래스 변경: \f<다크엘프 \f>클래스 변경: \f<다크엘프 potion normal gemstone 1000 5092 7088 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1
7070 \f>클래스 변경: \f<용기사 \f>클래스 변경: \f<용기사 potion normal gemstone 1000 5099 7088 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1
7071 \f>클래스 변경: \f<환술사 \f>클래스 변경: \f<환술사 potion normal gemstone 1000 5101 7088 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1
C_ItemUSe 자바
import l1j.server.server.serverpackets.S_DelSkill;
import l1j.server.server.serverpackets.S_Disconnect;
import l1j.server.server.utils.SQLUtil;
.
.
.
.
} else if (itemId >= 7065 && itemId <= 7071){
if (pc.getClanid() != 0) {
pc.sendPackets(new S_SystemMessage("\\fS******** 혈맹을 먼저 탈퇴하여 주시기 바랍니다. ********"));
return;
} else if(itemId == 7065 && pc.getType() == 0) { // 자네 군주?
pc.sendPackets(new S_SystemMessage("\\fS*********** 당신은 이미 군주 클래스 입니다. ***********"));
return;
} else if (itemId == 7066 && pc.getType() == 1) { // 자네 기사?
pc.sendPackets(new S_SystemMessage("\\fS*********** 당신은 이미 기사 클래스 입니다. ***********"));
return;
} else if (itemId == 7067 && pc.getType() == 2) { // 자네 요정?
pc.sendPackets(new S_SystemMessage("\\fS*********** 당신은 이미 요정 클래스 입니다. ***********"));
return;
} else if (itemId == 7068 && pc.getType() == 3) { // 자네 마법사?
pc.sendPackets(new S_SystemMessage("\\fS********** 당신은 이미 마법사 클래스 입니다. **********"));
return;
} else if (itemId == 7069 && pc.getType() == 4) { // 자네 다크엘프?
pc.sendPackets(new S_SystemMessage("\\fS********* 당신은 이미 다크엘프 클래스 입니다. *********"));
return;
} else if (itemId == 7070 && pc.getType() == 5) { // 자네 용기사?
pc.sendPackets(new S_SystemMessage("\\fS********** 당신은 이미 용기사 클래스 입니다. **********"));
return;
} else if (itemId == 7071 && pc.getType() == 6) { // 자네 환술사?
pc.sendPackets(new S_SystemMessage("\\fS********** 당신은 이미 환술사 클래스 입니다. **********"));
return;
}
int[] Mclass = new int[] { 0, 61, 138, 734, 2786, 6658, 6671 };
int[] Wclass = new int[] { 1, 48, 37, 1186, 2796, 6661, 6650 };
if (itemId == 7065 && pc.getType() != 0 && pc.get_sex() == 0) {
pc.setType(0);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 7065 && pc.getType() != 0 && pc.get_sex() == 1) {
pc.setType(0);
pc.setClassId(Wclass[pc.getType()]);
} else if (itemId == 7066 && pc.getType() != 1 && pc.get_sex() == 0) { // 변경: 기사
pc.setType(1);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 7066 && pc.getType() != 1 && pc.get_sex() == 1) {
pc.setType(1);
pc.setClassId(Wclass[pc.getType()]);
} else if (itemId == 7067 && pc.getType() != 2 && pc.get_sex() == 0) { // 변경: 요정
pc.setType(2);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 7067 && pc.getType() != 2 && pc.get_sex() == 1) {
pc.setType(2);
pc.setClassId(Wclass[pc.getType()]);
} else if (itemId == 7068 && pc.getType() != 3 && pc.get_sex() == 0) { // 변경: 마법사
pc.setType(3);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 7068 && pc.getType() != 3 && pc.get_sex() == 1) {
pc.setType(3);
pc.setClassId(Wclass[pc.getType()]);
} else if (itemId == 7069 && pc.getType() != 4 && pc.get_sex() == 0) { // 변경: 다크엘프
pc.setType(4);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 7069 && pc.getType() != 4 && pc.get_sex() == 1) {
pc.setType(4);
pc.setClassId(Wclass[pc.getType()]);
} else if (itemId == 7070 && pc.getType() != 5 && pc.get_sex() == 0) { // 변경: 용기사
pc.setType(5);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 7070 && pc.getType() != 5 && pc.get_sex() == 1) {
pc.setType(5);
pc.setClassId(Wclass[pc.getType()]);
} else if (itemId == 7071 && pc.getType() != 6 && pc.get_sex() == 0) { // 변경: 환술사
pc.setType(6);
pc.setClassId(Mclass[pc.getType()]);
} else if (itemId == 7071 && pc.getType() != 6 && pc.get_sex() == 1) {
pc.setType(6);
pc.setClassId(Wclass[pc.getType()]);
}
pc.getInventory().takeoffEquip(945);
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();
pc.sendPackets(new S_Disconnect());
.
.
.
.
.
.
.
.
private void deleteSpell(L1PcInstance pc) {
int player = pc.getId();
Connection con = null;
PreparedStatement pstm = null;
try {
con = L1DatabaseFactory.getInstance().getConnection();
pstm = con.prepareStatement("DELETE FROM character_skills WHERE char_obj_id=?");
pstm.setInt(1, player);
pstm.execute();
} catch (Exception e) {
_log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} finally {
SQLUtil.close(pstm);
SQLUtil.close(con);
}
}

이드1 님의 최근 댓글
db는 2015년 2월 입니다 2016 09.28 접속기만있습니다 2016 04.27 이건 어디에 사용하는거에요 ?? 2016 04.26 ㅎㅇㅎㅇ 2016 04.26 다운이 안됨 ㅠ.ㅠ 2016 04.25