Jump to content

[Share-Java Code]Pop Up Window For Class Change


Recommended Posts

Hello MaxCheaters

Twra den xreiazete na phgenete Town gia change class , ena pop up window 8a emfanizete sthn o8onh sas sta lvl 20/40/76 gia change class..

 

[b]Index: java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java  (revision 2705)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java  (working copy)
@@ -18,9 +18,11 @@
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.ai.CtrlIntention;
import net.sf.l2j.gameserver.datatables.CharTemplateTable;
+import net.sf.l2j.gameserver.datatables.NpcTable;
import net.sf.l2j.gameserver.model.base.ClassId;
import net.sf.l2j.gameserver.model.base.ClassLevel;
import net.sf.l2j.gameserver.model.base.PlayerClass;
+import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.quest.Quest;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
@@ -40,7 +42,11 @@
       //private static Logger _log = Logger.getLogger(L2ClassMasterInstance.class.getName());
       private static final int[] SECONDN_CLASS_IDS = {2,3,5,6,9,8,12,13,14,16,17,20,21,23,24,27,
                                                                                                       28,30,33,34,36,37,40,41,43,46,48,51,52,55,57};
-
+       public static L2ClassMasterInstance ClassMaster = new L2ClassMasterInstance(31228, NpcTable.getInstance().getTemplate(31228));
+       static
+       {
+               L2World.getInstance().storeObject(ClassMaster);
+       }
       /**
        * @param template
        */
@@ -52,8 +58,8 @@
       @Override
       public void onAction(L2PcInstance player)
       {
-               if (!canTarget(player)) return;
-
+               //if (!canTarget(player)) return;
+/*
               // Check if the L2PcInstance already target the L2NpcInstance
               if (getObjectId() != player.getTargetId())
               {
@@ -73,7 +79,7 @@
                               player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
                               return;
                       }
-
+*/
                       if (Config.DEBUG)
                               _log.fine("ClassMaster activated");

@@ -94,19 +100,16 @@
                                       jobLevel = 3;
                       }

-                       if (!Config.ALLOW_CLASS_MASTERS)
-                               jobLevel = 3;
-
                       if(player.isGM())
                       {
                               showChatWindowChooseClass(player);
                       }
-                       else if (((level >= 20 && jobLevel == 1 ) ||
-                               (level >= 40 && jobLevel == 2 )) && Config.ALLOW_CLASS_MASTERS)
+                       else if ((level >= 20 && jobLevel == 1 ) ||
+                               (level >= 40 && jobLevel == 2 ))
                       {
                               showChatWindow(player, classId.getId());
                       }
-                       else if (level >= 76 && Config.ALLOW_CLASS_MASTERS && classId.getId() < 88)
+                       else if (level >= 76 && classId.getId() < 88)
                       {
                               for (int i = 0; i < SECONDN_CLASS_IDS.length; i++)
                               {
@@ -126,7 +129,7 @@
                                       }
                               }
                       }
-            else if (level >= 76 && Config.ALLOW_CLASS_MASTERS && ((classId.getId() >= 123 && classId.getId() < 131 ) || classId.getId() == 135)) // this is for Kamael Race 3rd Transfer
+            else if (level >= 76 && ((classId.getId() >= 123 && classId.getId() < 131 ) || classId.getId() == 135)) // this is for Kamael Race 3rd Transfer
            {
                showChatWindow(player, classId.getId());
            }
@@ -155,7 +158,7 @@
                               html.setHtml(sb.toString());
                               player.sendPacket(html);
                       }
-               }
+               //}
               player.sendPacket(ActionFailed.STATIC_PACKET);
       }

Index: java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java     (revision 2705)
+++ java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java     (working copy)
@@ -16,6 +16,7 @@

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.model.L2Character;
+import net.sf.l2j.gameserver.model.actor.instance.L2ClassMasterInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
import net.sf.l2j.gameserver.model.base.Experience;
@@ -151,6 +152,17 @@
               if (getLevel() + value > Experience.MAX_LEVEL - 1) return false;

        boolean levelIncreased = super.addLevel(value);
+        
+        switch (getLevel())
+        {
+               case 20:
+               case 40:
+               case 76:
+                       L2ClassMasterInstance.ClassMaster.onAction(getActiveChar());
+                       break;
+               default:
+                       break;
+        }

        if (levelIncreased)
        {
Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 2705)
+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (working copy)
@@ -28,6 +28,7 @@
import net.sf.l2j.gameserver.model.L2CharPosition;
import net.sf.l2j.gameserver.model.L2Object;
import net.sf.l2j.gameserver.model.L2World;
+import net.sf.l2j.gameserver.model.actor.instance.L2ClassMasterInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.L2Event;
@@ -113,9 +114,9 @@
                               try
                               {
                                       L2Object object = L2World.getInstance().findObject(Integer.parseInt(id));
-
+                                               
                                       if (_command.substring(endOfId+1).startsWith("event_participate")) L2Event.inscribePlayer(activeChar);
-                                       else if (object instanceof L2NpcInstance && endOfId > 0 && activeChar.isInsideRadius(object, L2NpcInstance.INTERACTION_DISTANCE, false, false))
+                                       else if (object instanceof L2ClassMasterInstance || (object instanceof L2NpcInstance && endOfId > 0 && activeChar.isInsideRadius(object, L2NpcInstance.INTERACTION_DISTANCE, false, false)))
                                       {
                                               ((L2NpcInstance)object).onBypassFeedback(activeChar, _command.substring(endOfId+1));
                                       }[/b]

 

 

credits:Ao KiJi From l2jForum

Link to comment
Share on other sites

exei 3anaginei kai auto share edw http://www.maxcheaters.com/forum/index.php?topic=50288.0....

 

epidi blepw pws kanei shares apo to "[share] Lineage II Develop [L2J Server]" xwris lgol...

toulaxiston dine credits...

Link to comment
Share on other sites

exei 3anaginei kai auto share edw http://www.maxcheaters.com/forum/index.php?topic=50288.0....

 

epidi blepw pws kanei shares apo to "[share] Lineage II Develop [L2J Server]" xwris lgol...

toulaxiston dine credits...

Παρακαλαει να βρει κανεναν αφελη VIP να του δωσει καρμα για τα c/p
Link to comment
Share on other sites

Παρακαλαει να βρει κανεναν αφελη VIP να του δωσει καρμα για τα c/p

ego nomizo pos an sinexisei etsi oloi tha ton peran sto ntoukou para tha tou dosoun karma...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Posts

    • I think him dont have mxc account
    • not even offi got 15k online including all the bots   15k online means atleast 5000 players in siege which is absolutly impossible for a server to handle
    • Send me the corect pass pls!!  thanks in advance!!
    • Welcome back to L2Etina! We are coming back with a new  x3 Interlude Chronicle  For those who didn't play before, L2Etina is Interlude Chronicle with Classic Client. It means game interface is new and that we have a lot of cool features like radar, mail, Item Search Window, Seed Auction, Buff Stores. Gameplay stays the same as on Interlude though, so there aren't any changes to skills, bosses, drops etc. We are aiming to provide a long-term server without any kind of wipe.   Rates: Experience: 3x Skill Points: 3x Adena Drop: 2x Item Drop: 2x Seal Stones Drop: 2x Spoil Rate: 2x Raid/Epic Boss Experience: 1x Raid/Epic Boss Skill Points: 1x Raid/Epic Boss Drop: 1x No Dual Box No Bots No Donate No Auto Pick Up Siege of each castle takes place every 2 weeks First Castle Siege starts date TBD Heroes are selected every 2 weeks First Olympiad Period starts date TBD     Classic Game Client: Modern look of the game Improved performance No Critical Errors Tons of new Game Settings and Interface Windows Damage on the Screen Healths Bars Mail Radar Cloaks Party Tokens Skill Learning Panel New Skills Enchanting Items on Chat Npc Debuff Info Improved Clan Notice Editing Quick Status Actions Exp Bar and redesigned Main Menu Friend Manager Quest Areas on the Map Redesigned Character Creation Clan Ranking Redesigned Past Olympiad Ranking Colorful System Messages No Adena Limit   Custom Features: Guide Window provides all important information about Lineage II and L2Etina Soul Crystal Window shows which monsters you need to hunt and which Soul Crystal you need for your weapon Bot Reporting Function and Smart Guard provides playing without Bots Item Search Window allows you to find every possible source of getting item that you are interested in Buff Store allows automatic buff sales Offline Private Store Sales Seed Auction allows everyone to take part in manor Shady Man allows to purchase info about respawn of Subclass Raid Bosses & exchanges Pipette Knife for Red Pipette Knife Shadow weapons are disabled Fishing system is disabled Automatic Twitch Rewards Ranking Window Automatic Crystallization Sales Exit Game Statistics     Enchant Rates: Safe Enchant: +3 Safe Enchant Full-Armor: +4 Max Enchant: +16 Enchanting Chance: 66%   Skills: Skills learned by Skills Panel Spell Books are required for Skill Learning Retail amount of Buff Slots Retail Buff Duration Skills can be enchanted by Skills Panel   Bosses Respawn Duration: Cabrio, Kernon, Golkonda, Hallate: 20 - 24 hours Flame of Splendor Barakiel: 16 - 20 hours Queen Ant: 34 - 36 hours Orfen: 46 - 48 hours Core: 58 - 60 hours Zaken: 58 - 60 hours Baium: 164 - 168 hours Frintezza: 44 - 48 hours Antharas: 260 - 264 hours Valakas: 260 - 264 hours     Quest Item Drop Rate: Dangerous Seduction: Requires first class transfer Kamael: A Window to the Future: Requires first class transfer Gather the Flames: 1x Relics of the Old Empire: 1x Alliance with Varka Silenos: 1x Alliance with Ketra Orcs: 1x War with Ketra: 1x War with Varka: 1x Third Class Quests: 1x Seekers of the Holy Grail: 1x Guardians of the Holy Grail: 1x The Finest Food: 1x Four Goblets: 1x Legacy of Insolence: 1x Exploration of the Giants' Cave, Part I & II: 1x Coins of Magic: 3x Other Quests: 2x     Beta Testing: 22th of August Grand Opening: 16th of September Visit us at https://l2etina.com Discord : https://discord.gg/l2etina
  • Topics

×
×
  • Create New...