iEA 24 Опубликовано 30 мая, 2017 (изменено) Приветствую. Нужна помощь.. есть скрипт далб профи.. суть какая, береш 80 лвл и апаеш дабл профу, но прикол в том, что оно меняет внешность, например бил орком, взял саб ельфа, внешку на ельфа сменило, как ето можно исправить, чтоб не меняло внешность. Если брать на сабе далб, тогда все ок, внешность старая, остается вот собсно и сам код package custom.DablProffesia; import java.util.logging.Logger;import ru.catssoftware.gameserver.model.actor.instance.L2NpcInstance;import ru.catssoftware.gameserver.model.base.ClassId;import ru.catssoftware.gameserver.model.actor.instance.L2PcInstance;import ru.catssoftware.gameserver.model.quest.QuestState;import ru.catssoftware.gameserver.model.quest.Quest;public class DablProffesia extends Quest{private static String qn = "DablProffesia";private static final Logger _log = Logger.getLogger(DablProffesia.class.getName());public DablProffesia(){super(-1, qn, "custom");addStartNpc(990008);addFirstTalkId(990008);addTalkId(990008);_log.info("=================================");_log.info("INFO Loaded L2Dana Dabl Proffer ");_log.info("=================================");}public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) {//QuestState st = player.getQuestState(qn);//if (st == null) {return null;}QuestState st = player.getQuestState(getName());if (st == null)st = newQuestState(player);int osnova = st.getInt("osnova");int SabClass = st.getInt("sabclass");int level = player.getLevel();if(event.equalsIgnoreCase("proffs")){return "proffs.htm";}else if(event.equalsIgnoreCase("H_Dreadnought")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 89;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 89;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("H_PhoenixKnight")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 90;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 90;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("H_HellKnight")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 91;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 91;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("H_Adventurer")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 93;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 93;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("H_Sagittarius")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 92;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 92;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("H_Archmage")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 94;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 94;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("H_Soultaker")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 95;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 95;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("H_ArcanaLord")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 96;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 96;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("H_Cardinal")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 97;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 97;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("H_Hierophant")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 98;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 98;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("E_EvaTemplar")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 99;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 99;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("E_SwordMuse")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 100;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 100;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("E_WindRider")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 101;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 101;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("E_MoonlightSentinel")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 102;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 102;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("E_MysticMuse")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 103;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 103;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("E_ElementalMaster")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 104;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 104;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("E_EvaSaint")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 105;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 105;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("DE_ShillienTemplar")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 106;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 106;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("DE_SpectralDancer")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 107;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 107;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("DE_GhostHunter")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 108;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 108;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("DE_GhostSentinel")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 109;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 109;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("DE_StormScreamer")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 110;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 110;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("DE_SpectralMaster")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 111;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 111;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("DE_ShillienSaint")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 112;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 112;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("O_Titan")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 113;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 113;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("O_GrandKhauatari")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 114;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 114;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("O_Dominator")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 115;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 115;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("O_Doomcryer")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 116;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 116;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("D_FortuneSeeker")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 117;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 117;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}else if(event.equalsIgnoreCase("D_Maestro")){if (player.isSubClassActive() && (level >= 76) && SabClass == 2){st.set("sabclass", "1");int classidval = 118;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "oksab.htm";}}else if (level >= 76 && osnova == 2 && !player.isSubClassActive()){st.set("osnova", "1");int classidval = 118;boolean valid = false;for (ClassId classid : ClassId.values())if (classidval == classid.getId())valid = true;if (valid && (player.getClassId().getId() != classidval)){player.setClassId(classidval);if (!player.isSubClassActive())player.setBaseClass(classidval);String newclass = player.getTemplate().getClassName();player.store();player.sendMessage("A changed your class to " + newclass);player.broadcastUserInfo();return "okosn.htm";}}else {return "err.htm";}}return null;}public String onFirstTalk(L2NpcInstance npc, L2PcInstance player){QuestState st = player.getQuestState(qn);if (st == null)st = newQuestState(player);int osnova = st.getInt("osnova");int SabClass = st.getInt("sabclass");int level = player.getLevel();if(SabClass == 2 || osnova == 2 ){if ( level >= 76){return "default.htm";}else{return "lv.htm";}}if(SabClass == 1 ){return "err.htm";}if (osnova == 1 ){return "err.htm";}if (!(st.getQuestItemsCount(10910) == 0)){st.set("osnova", "2");st.set("sabclass", "2");st.takeItems(10910,1);}else{return "item.htm";}return null;}public String onTalk(L2NpcInstance npc, L2PcInstance player){String htmltext = "";QuestState st = player.getQuestState(getName());st = player.getQuestState(qn);htmltext = "default.htm";if (st == null){return htmltext;}int level = player.getLevel();if ( level >= 76 ){htmltext = "default.htm";}else{return "err.htm";}st.exitQuest(false);return htmltext;}public static void main(String[] args) {new DablProffesia();}} Изменено 30 мая, 2017 пользователем DoHParDon Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Energy 263 Опубликовано 30 мая, 2017 Если брать на сабе далб, тогда все ок, внешность старая, остается в этом и есть вся проблема) 1 Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
iEA 24 Опубликовано 30 мая, 2017 Если брать на сабе далб, тогда все ок, внешность старая, остается в этом и есть вся проблема) а как исправить? если на основе береш. чтоб не меняло? Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
zGosu 396 Опубликовано 30 мая, 2017 а как исправить? если на основе береш. чтоб не меняло? Сделай так, что бы при взятии на основной класс, добавлялся САБ КЛАСС. Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
iEA 24 Опубликовано 30 мая, 2017 (изменено) Сделай так, что бы при взятии на основной класс, добавлялся САБ КЛАСС. int osnova = st.getInt("sabclass"); int SabClass = st.getInt("sabclass"); Тоисть так ? Изменено 30 мая, 2017 пользователем DoHParDon Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Demoncool 1110 Опубликовано 30 мая, 2017 а не проще сделать чтобы просто все скилы давались 2-ое профы? Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
zGosu 396 Опубликовано 30 мая, 2017 int osnova = st.getInt("sabclass"); int SabClass = st.getInt("sabclass"); Тоисть так ? Я думаю сами разберетесь, Ваш же код) Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
iEA 24 Опубликовано 30 мая, 2017 Я думаю сами разберетесь, Ваш же код) код не я писал Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
zGosu 396 Опубликовано 30 мая, 2017 код не я писал ну сделайте так: а не проще сделать чтобы просто все скилы давались 2-ое профы? P.S. Это метод addSkill(skill_id) Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
iEA 24 Опубликовано 30 мая, 2017 ну сделайте так: P.S. Это метод addSkill(skill_id) и нужно каждий скил вписивать ?) там же скилов огого ) Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
zGosu 396 Опубликовано 30 мая, 2017 и нужно каждий скил вписивать ?) там же скилов огого ) Зачем? Просто берешь из SkillLearn умения, которые нужно выучить (там уже все записано. Вам только ID класса указать) и засунуть его в цикл на автообучение. Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
iEA 24 Опубликовано 30 мая, 2017 Зачем? Просто берешь из SkillLearn умения, которые нужно выучить (там уже все записано. Вам только ID класса указать) и засунуть его в цикл на автообучение. через тв показать сможеш ? 1 пример ? Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
zGosu 396 Опубликовано 30 мая, 2017 (изменено) через тв показать сможеш ? 1 пример ? Он и так один. Посмотрите как работает автоизучение скилов и по примеру сделайте так же, только не забывая менять ID класса в методе на добавление скилов. Изменено 30 мая, 2017 пользователем zGosu Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты