~Ge0rge~ Posted December 5, 2010 Share Posted December 5, 2010 I Need a java code that tell players cant change subclass when they are combat or when they are on a party Link to comment Share on other sites More sharing options...
0 Akken Posted December 5, 2010 Share Posted December 5, 2010 error on return false; damn i am not concetrated.. Bahh i go to study for my test when i will finish i will give you the right code except if someone give it earlier :D brb in 1-1:30 hours gz :D Link to comment Share on other sites More sharing options...
0 DominiQue Posted December 5, 2010 Share Posted December 5, 2010 Index: /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 345) +++ /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 346) @@ -8425,4 +8425,6 @@ public boolean addSubClass(int classId, int classIndex) { if (getTotalSubClasses() == 3 || classIndex == 0) return false; @@ -8430,4 +8432,8 @@ if (getSubClasses().containsKey(classIndex)) return false; + if(isInCombat()) + return false; + if(isInParty()) + return false; [\code] Link to comment Share on other sites More sharing options...
0 ~Ge0rge~ Posted December 5, 2010 Author Share Posted December 5, 2010 Index: /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 345) +++ /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 346) @@ -8425,4 +8425,6 @@ public boolean addSubClass(int classId, int classIndex) { if (getTotalSubClasses() == 3 || classIndex == 0) return false; @@ -8430,4 +8432,8 @@ if (getSubClasses().containsKey(classIndex)) return false; + if(isInCombat()) + return false; + if(isInParty()) + return false; [\code] it is only to add subclass Link to comment Share on other sites More sharing options...
0 Akken Posted December 5, 2010 Share Posted December 5, 2010 Index: /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 345) +++ /java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 346) @@ -8425,4 +8425,6 @@ public boolean addSubClass(int classId, int classIndex) { if (getTotalSubClasses() == 3 || classIndex == 0) return false; @@ -8430,4 +8432,8 @@ if (getSubClasses().containsKey(classIndex)) return false; + if(isInCombat()) + return false; + if(isInParty()) + return false; [\code] same code is given by me :D Link to comment Share on other sites More sharing options...
0 Akken Posted December 5, 2010 Share Posted December 5, 2010 xD Link to comment Share on other sites More sharing options...
0 Versus Posted December 5, 2010 Share Posted December 5, 2010 For the love of God! Akken please delete your last post, totally dysfunctional. Index: D:/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2VillageMasterInstance.java =================================================================== --- D:/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 4425) +++ D:/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2VillageMasterInstance.java (working copy) @@ -417,6 +417,12 @@ return; } + if (player.isInCombat() || player.isInParty()) + { + player.sendMessage("Your status don't allow a subclass change."); + return; + } + if (player.getClassIndex() == paramOne) { html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Current.htm"); Link to comment Share on other sites More sharing options...
0 Akken Posted December 5, 2010 Share Posted December 5, 2010 I gaved him L2VillageMaster code i thing and he told me didnt work and yes i had tons of wrong types thnx versus for mention it :D Link to comment Share on other sites More sharing options...
0 ~Ge0rge~ Posted December 5, 2010 Author Share Posted December 5, 2010 For the love of God! Akken please delete your last post, totally dysfunctional. Index: D:/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2VillageMasterInstance.java =================================================================== --- D:/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 4425) +++ D:/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2VillageMasterInstance.java (working copy) @@ -417,6 +417,12 @@ return; } + if (player.isInCombat() || player.isInParty()) + { + player.sendMessage("Your status don't allow a subclass change."); + return; + } + if (player.getClassIndex() == paramOne) { html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Current.htm"); soor is for c6? i search for if (player.getClassIndex() == paramOne) and nothing.the same for html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Current.htm");. so in which line i add the code? Link to comment Share on other sites More sharing options...
0 Akken Posted December 5, 2010 Share Posted December 5, 2010 as i see versus you got com.l2jserver.. but anyway if (Olympiad.getInstance().isRegisteredInComp(player) || player.getOlympiadGameId() > 0) { player.sendPacket(new SystemMessage( SystemMessageId.YOU_HAVE_ALREADY_BEEN_REGISTERED_IN_A_WAITING_LIST_OF_AN_EVENT)); return; } + if (player.isInCombat() || player.isInParty()) + { + player.sendMessage("Your status don't allow a subclass change."); + return; + } player.setActiveClass(paramOne); content.append("Change Subclass:<br>Your active sub class is now a <font color=\"LEVEL\">" + CharTemplateTable.getClassNameById(player.getActiveClass()) + "</font>."); Link to comment Share on other sites More sharing options...
0 ~Ge0rge~ Posted December 5, 2010 Author Share Posted December 5, 2010 versus the party one works...but the combat dont work Link to comment Share on other sites More sharing options...
0 ~Ge0rge~ Posted December 5, 2010 Author Share Posted December 5, 2010 Soz for double post. Versus a big thanks!! solved...done...bye thanks all. locked Link to comment Share on other sites More sharing options...
Question
~Ge0rge~
I Need a java code that tell players cant change subclass when they are combat or when they are on a party
Link to comment
Share on other sites
26 answers to this question
Recommended Posts