xXObanXx Posted April 23, 2012 Posted April 23, 2012 Hello Guys! so as i say on the title i need a code to when a player is in combat, he will cannot change or add any subclass! can anyone help me please? is Important! Thank's!
0 Fanky Posted April 23, 2012 Posted April 23, 2012 You know the basics of java? if yes,go and find in your source where the subclass system is done,and add the method for dissallow players which are in combact to make a subclass or even change.. now,if you do not know such things,reply here and we'll help you with the full code(even if its quite easy..)
0 xXObanXx Posted April 24, 2012 Author Posted April 24, 2012 You know the basics of java? if yes,go and find in your source where the subclass system is done,and add the method for dissallow players which are in combact to make a subclass or even change.. now,if you do not know such things,reply here and we'll help you with the full code(even if its quite easy..) I know some thing's but not exactly this! e.g. i know: if (activeChar.isInCombat) && player.(any code for subclass) { player.sendMessage("bla bla bla") return; }
0 Fanky Posted April 24, 2012 Posted April 24, 2012 not correct at all. just search on l2villagemasterinstance where the sub is taking place,and add a check for combact,like trys told you.
0 xXObanXx Posted April 24, 2012 Author Posted April 24, 2012 not correct at all. just search on l2villagemasterinstance where the sub is taking place,and add a check for combact,like trys told you. i edit that... is it true? - if (allowAddition && !Config.ALT_GAME_SUBCLASS_WITHOUT_QUESTS) + if (allowAddition && !Config.ALT_GAME_SUBCLASS_WITHOUT_QUESTS && !player.isInCombat()) allowAddition = checkQuests(player); if (allowAddition && isValidNewSubClass(player, paramOne)) { if (!player.addSubClass(paramOne, player.getTotalSubClasses() + 1)) return;
0 xXObanXx Posted April 25, 2012 Author Posted April 25, 2012 seems yes. ok! i will test it now and i will tell you!
0 SweeTs Posted April 25, 2012 Posted April 25, 2012 Search for else if (command.startsWith("Subclass")) { // Subclasses may not be changed while a skill is in use. if (player.isCastingNow() || player.isAllSkillsDisabled()) { player.sendPacket(SystemMessageId.SUBCLASS_NO_CHANGE_OR_CREATE_WHILE_SKILL_IN_USE); return; } or something like that and add there player.isInCombat() :)
0 xXObanXx Posted April 25, 2012 Author Posted April 25, 2012 Search for else if (command.startsWith("Subclass")) { // Subclasses may not be changed while a skill is in use. if (player.isCastingNow() || player.isAllSkillsDisabled()) { player.sendPacket(SystemMessageId.SUBCLASS_NO_CHANGE_OR_CREATE_WHILE_SKILL_IN_USE); return; } or something like that and add there player.isInCombat() :) o thank you very much! i edit a line from this code and it work perfectly! thank you very much all!!! Someone can close the topic now!
Question
xXObanXx
Hello Guys! so as i say on the title i need a code to when a player is in combat, he will cannot change or add any subclass!
can anyone help me please? is Important!
Thank's!
9 answers to this question
Recommended Posts