레벨업 할때마다 아이템랜덤지급 스크립트
MapleCharacter.java
levelup() 메소드부분에 추가
int Rand = (int) Math.floor(Math.random() * 100) + 1;
if (Rand > 0 && Rand <= 30) {
if (level <= 200) {
MapleInventoryManipulator.addById(client, 4310000, (short) 1, null);
dropMessage(1, "레벨업을 축하드립니다! 절대음감 1개를 드립니다.");
}
} else if (Rand > 30 && Rand <= 60) {
if (level <= 200) {
MapleInventoryManipulator.addById(client, 4310000, (short) 2, null);
dropMessage(1, "레벨업을 축하드립니다! 절대음감 2개를 드립니다.");
}
} else if (Rand > 60 && Rand <= 90) {
if (level <= 200) {
MapleInventoryManipulator.addById(client, 4310000, (short) 3, null);
dropMessage(1, "레벨업을 축하드립니다! 절대음감 3개를 드립니다.");
}
} else {
dropMessage(1, "당신은 레벨업을 하였지만 절대음감을 받지 못하였습니다.");
}

늅늅 님의 최근 댓글