//[ALL Skill get start]-------------------ここから else if (command.startsWith("AlumpSkill")) { player.setSkillLearningClassId(player.getClassId()); getAlumpSkill(player); } // [ALL Skill get end]--------------------ここまで追加 else { // this class dont know any other commands, let forward // the command to the parent class super.onBypassFeedback(player, command); } }
//---------------------------------------------------------------- // [ALL Skill get start] GM comand public void getAlumpSkill(L2PcInstance player) { boolean countUnlearnable = true; int unLearnable = 0; int skillCounter = 0; L2SkillLearn[] skills = SkillTreeTable.getInstance().getAvailableSkills(player, player.getClassId()); while(skills.length > unLearnable) { for (L2SkillLearn s : skills) { L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel()); if (sk == null || !sk.getCanLearn(player.getClassId())) { if(countUnlearnable) unLearnable++; continue; } if(player.getSkillLevel(sk.getId()) == -1) { skillCounter++; } player.addSkill(sk); } countUnlearnable = false; skills = SkillTreeTable.getInstance().getAvailableSkills(player, player.getClassId()); } player.sendMessage("You get " + skillCounter + " skills."); } // [ALL Skill get end] //------------------------------------------------------------------