A Project for Chronicle 4 based on L2JServer.


    6 Java Mods for C4Lisvus.

    Share
    avatar
    yusuketh

    Posts : 58
    Join date : 2013-07-12

    6 Java Mods for C4Lisvus.

    Post  yusuketh on 9th July 2014, 07:43

    Some mods adapted to C4Lisvus.

    Class Balance 1:
    Code:
    Index: java/config/custom.properties
    ===================================================================
    # ------------------------------------------------------------
    # Allow use Event Managers for changing occupation
    # ------------------------------------------------------------
    # If you need change occupation only use quest then set this to False
    # Class transfers can also be configured seperately.
    # Also, you can activate html pop up for class change
    # Default = False
    AllowClassMasters = True
    AllowMobileClassChange = True
    AllowFirstClass = True
    AllowSecondClass = True
    AllowThirdClass = True
    +
    +#--------------------------------------------------
    +# Balance Class By KhiLer
    +#--------------------------------------------------
    +#Classes Damage multiplier (Ex: in DuelistDamage = 2.0 class Duelist will do 2x damage, values can be float).
    +DuelistDamage = 1.0
    +DreadnoughtDamage = 1.0
    +PhoenixKnightDamage = 1.0
    +HellKnightDamage = 1.0
    +AdventurerDamage = 1.0
    +SaggitariusDamage = 1.0
    +ArchmageDamage = 1.0
    +SoultakerDamage = 1.0
    +ArcanaLordDamage = 1.0
    +CardinalDamage = 1.0
    +HierophantDamage = 1.0
    +EvasTemplarDamage = 1.0
    +SwordMuseDamage = 1.0
    +WindRiderDamage = 1.0
    +MoonlightSentinelDamage = 1.0
    +MysticMuseDamage = 1.0
    +ElementalMasterDamage = 1.0
    +EvasSaintDamage = 1.0
    +ShilenTemplarDamage = 1.0
    +SpectralDancerDamage = 1.0
    +GhostHunterDamage = 1.0
    +GhostSentinelDamage = 1.0
    +StormScreamerDamage = 1.0
    +SpectralMasterDamage = 1.0
    +ShillienSaintDamage = 1.0
    +TitanDamage = 1.0
    +GKhavatariDamage = 1.0
    +DominatorDamage = 1.0
    +DoomcryerDamage = 1.0
    +MaestroDamage = 1.0
    +FortuneSeekerDamage = 1.0

    Index: java/net/sf/l2j/Config.java
    ===================================================================
        /** Enable custom data tables ?*/
        public static boolean       CUSTOM_SPAWNLIST_TABLE;
        public static boolean       SAVE_GMSPAWN_ON_CUSTOM;
        public static boolean       CUSTOM_NPC_TABLE;
        public static boolean       CUSTOM_NPC_SKILLS_TABLE;
        public static boolean       CUSTOM_ITEM_TABLES;
        public static boolean       CUSTOM_ARMORSETS_TABLE;
        public static boolean       CUSTOM_TELEPORT_TABLE;
        public static boolean       CUSTOM_DROPLIST_TABLE;
        public static boolean       CUSTOM_MERCHANT_TABLES;

        +/** CLASSES BALANCE BY KhiLer Declaration Start */
        +public static float DUELIST_DAMAGE;
        +public static float DREADNOUGHT_DAMAGE;
        +public static float PHOENIXKNIGHT_DAMAGE;
        +public static float HELLKNIGHT_DAMAGE;
        +public static float ADVENTURER_DAMAGE;
        +public static float SAGITTARIUS_DAMAGE;
        +public static float ARCHMAGE_DAMAGE;
        +public static float SOULTAKER_DAMAGE;
        +public static float ARCANALORD_DAMAGE;
        +public static float CARDINAL_DAMAGE;
        +public static float HIEROPHANT_DAMAGE;
        +public static float EVASTEMPLAR_DAMAGE;
        +public static float SWORDMUSE_DAMAGE;
        +public static float WINDRIDER_DAMAGE;
        +public static float MOONLIGHTSENTINEL_DAMAGE;
        +public static float MYSTICMUSE_DAMAGE;
        +public static float ELEMENTALMASTER_DAMAGE;
        +public static float EVASSAINT_DAMAGE;
        +public static float SHILENTEMPLAR_DAMAGE;
        +public static float SPECTRALDANCER_DAMAGE;
        +public static float GHOSTHUNTER_DAMAGE;
        +public static float GHOSTSENTINEL_DAMAGE;
        +public static float STORMSCREAMER_DAMAGE;
        +public static float SPECTRALMASTER_DAMAGE;
        +public static float SHILLIENSAINT_DAMAGE;
        +public static float TITAN_DAMAGE;
        +public static float GKHAVATARI_DAMAGE;
        +public static float DOMINATOR_DAMAGE;
        +public static float DOOMCRYER_DAMAGE;
        +public static float MAESTRO_DAMAGE;
        +public static float FORTUNESEEKER_DAMAGE;
        +


                    ALLOW_AUTO_REWARDER           = Boolean.valueOf(customSettings.getProperty("AllowAutoRewarder", "False"));
                    AUTO_REWARD_DELAY             = Integer.parseInt(customSettings.getProperty("AutoRewardDelay", "1200"));
                    AUTO_REWARD_ID                = Integer.parseInt(customSettings.getProperty("AutoRewardID", "57"));
                    AUTO_REWARD_COUNT             = Integer.parseInt(customSettings.getProperty("AutoRewardCount", "1000"));

                    +DUELIST_DAMAGE = Float.parseFloat(customSettings.getProperty("DuelistDamage", "1.0"));
                    +DREADNOUGHT_DAMAGE = Float.parseFloat(customSettings.getProperty("DreadnoughtDamage", "1.0"));
                    +PHOENIXKNIGHT_DAMAGE = Float.parseFloat(customSettings.getProperty("PhoenixKnightDamage", "1.0"));
                    +HELLKNIGHT_DAMAGE = Float.parseFloat(customSettings.getProperty("HellKnightDamage", "1.0"));
                    +ADVENTURER_DAMAGE = Float.parseFloat(customSettings.getProperty("AdventurerDamage", "1.0"));
                    +SAGITTARIUS_DAMAGE = Float.parseFloat(customSettings.getProperty("SaggitariusDamage", "1.0"));
                    +ARCHMAGE_DAMAGE = Float.parseFloat(customSettings.getProperty("ArchmageDamage", "1.0"));
                    +SOULTAKER_DAMAGE = Float.parseFloat(customSettings.getProperty("SoultakerDamage", "1.0"));
                    +ARCANALORD_DAMAGE = Float.parseFloat(customSettings.getProperty("ArcanaLordDamage", "1.0"));
                    +CARDINAL_DAMAGE = Float.parseFloat(customSettings.getProperty("CardinalDamage", "1.0"));
                    +HIEROPHANT_DAMAGE = Float.parseFloat(customSettings.getProperty("HierophantDamage", "1.0"));
                    +EVASTEMPLAR_DAMAGE = Float.parseFloat(customSettings.getProperty("EvasTemplarDamage", "1.0"));
                    +SWORDMUSE_DAMAGE = Float.parseFloat(customSettings.getProperty("SwordMuseDamage", "1.0"));
                    +WINDRIDER_DAMAGE = Float.parseFloat(customSettings.getProperty("WindRiderDamage", "1.0"));
                    +MOONLIGHTSENTINEL_DAMAGE = Float.parseFloat(customSettings.getProperty("MoonlightSentinelDamage", "1.0"));
                    +MYSTICMUSE_DAMAGE = Float.parseFloat(customSettings.getProperty("MysticMuseDamage", "1.0"));
                    +ELEMENTALMASTER_DAMAGE = Float.parseFloat(customSettings.getProperty("ElementalMasterDamage", "1.0"));
                    +EVASSAINT_DAMAGE = Float.parseFloat(customSettings.getProperty("EvasSaintDamage", "1.0"));
                    +SHILENTEMPLAR_DAMAGE = Float.parseFloat(customSettings.getProperty("ShilenTemplarDamage", "1.0"));
                    +SPECTRALDANCER_DAMAGE = Float.parseFloat(customSettings.getProperty("SpectralDancerDamage", "1.0"));
                    +GHOSTHUNTER_DAMAGE = Float.parseFloat(customSettings.getProperty("GhostHunterDamage", "1.0"));
                    +GHOSTSENTINEL_DAMAGE = Float.parseFloat(customSettings.getProperty("GhostSentinelDamage", "1.0"));
                    +STORMSCREAMER_DAMAGE = Float.parseFloat(customSettings.getProperty("StormScreamerDamage", "1.0"));
                    +SPECTRALMASTER_DAMAGE = Float.parseFloat(customSettings.getProperty("SpectralMasterDamage", "1.0"));
                    +SHILLIENSAINT_DAMAGE = Float.parseFloat(customSettings.getProperty("ShillienSaintDamage", "1.0"));
                    +TITAN_DAMAGE = Float.parseFloat(customSettings.getProperty("TitanDamage", "1.0"));
                    +GKHAVATARI_DAMAGE = Float.parseFloat(customSettings.getProperty("GKhavatariDamage", "1.0"));
                    +DOMINATOR_DAMAGE = Float.parseFloat(customSettings.getProperty("DominatorDamage", "1.0"));
                    +DOOMCRYER_DAMAGE = Float.parseFloat(customSettings.getProperty("DoomcryerDamage", "1.0"));
                    +MAESTRO_DAMAGE = Float.parseFloat(customSettings.getProperty("MaestroDamage", "1.0"));
                    +FORTUNESEEKER_DAMAGE = Float.parseFloat(customSettings.getProperty("FortuneSeekerDamage", "1.0"));
     
    Index: java/net/sf/l2j/gameserver/skills/Formulas.java
    ===================================================================
     // Failure calculation
     if (Config.ALT_GAME_MAGICFAILURES && !calcMagicSuccess(attacker, target, skill))
     {
     if (attacker instanceof L2PcInstance)
     {
    + if (((L2PcInstance) attacker).getClassId().getId() == 88)
    + damage *= Config.DUELIST_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 89)
    + damage *= Config.DREADNOUGHT_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 90)
    + damage *= Config.PHOENIXKNIGHT_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 91)
    + damage *= Config.HELLKNIGHT_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 93)
    + damage *= Config.ADVENTURER_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 92)
    + damage *= Config.SAGITTARIUS_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 94)
    + damage *= Config.ARCHMAGE_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 95)
    + damage *= Config.SOULTAKER_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 96)
    + damage *= Config.ARCANALORD_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 97)
    + damage *= Config.CARDINAL_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 98)
    + damage *= Config.HIEROPHANT_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 99)
    + damage *= Config.EVASTEMPLAR_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 100)
    + damage *= Config.SWORDMUSE_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 101)
    + damage *= Config.WINDRIDER_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 102)
    + damage *= Config.MOONLIGHTSENTINEL_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 103)
    + damage *= Config.MYSTICMUSE_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 104)
    + damage *= Config.ELEMENTALMASTER_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 105)
    + damage *= Config.EVASSAINT_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 106)
    + damage *= Config.SHILENTEMPLAR_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 107)
    + damage *= Config.SPECTRALDANCER_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 108)
    + damage *= Config.GHOSTHUNTER_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 109)
    + damage *= Config.GHOSTSENTINEL_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 110)
    + damage *= Config.STORMSCREAMER_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 111)
    + damage *= Config.SPECTRALMASTER_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 112)
    + damage *= Config.SHILLIENSAINT_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 113)
    + damage *= Config.TITAN_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 114)
    + damage *= Config.GKHAVATARI_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 115)
    + damage *= Config.DOMINATOR_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 116)
    + damage *= Config.DOOMCRYER_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 118)
    + damage *= Config.MAESTRO_DAMAGE;
    + if (((L2PcInstance) attacker).getClassId().getId() == 117)
    + damage *= Config.FORTUNESEEKER_DAMAGE;
    +
     if (calcMagicSuccess(attacker, target, skill)
     && (target.getLevel() - attacker.getLevel()) <= 9)
     {

    Class Balance 2: "Can be used simultaneously with the first class balance"
    Code:
    Index: java/config/custom.properties
    ===================================================================

    +# Classes balance
    +# Note:
    +#      Weapons type: DAGGER; BOW; BLUNT; BIGBLUNT; DUALFIST; DUAL; SWORD; BIGSWORD; POLE
    +#      Class: Too long...
    +#      Damage: Current damage emperor to 2
    +# ClassID 90 = Phoenix Knight
    +ClassID = 90
    +WeaponType = DAGGER
    +Damage = 2

    Index: java/net/sf/l2j/Config.java
    ===================================================================
        /** Enable custom data tables ?*/
        public static boolean       CUSTOM_SPAWNLIST_TABLE;
        public static boolean       SAVE_GMSPAWN_ON_CUSTOM;
        public static boolean       CUSTOM_NPC_TABLE;
        public static boolean       CUSTOM_NPC_SKILLS_TABLE;
        public static boolean       CUSTOM_ITEM_TABLES;
        public static boolean       CUSTOM_ARMORSETS_TABLE;
        public static boolean       CUSTOM_TELEPORT_TABLE;
        public static boolean       CUSTOM_DROPLIST_TABLE;
        public static boolean       CUSTOM_MERCHANT_TABLES;

    +       public static int ALT_CLASSID;
    +       public static float ALT_DAMAGE;
    +
    +       public static boolean ALT_DAGGER;
    +       public static boolean ALT_BOW;
    +       public static boolean ALT_BLUNT;
    +       public static boolean ALT_BIGBLUNT;
    +       public static boolean ALT_DUALFIST;
    +       public static boolean ALT_DUAL;
    +       public static boolean ALT_SWORD;
    +       public static boolean ALT_BIGSWORD;
    +       public static boolean ALT_POLE;
    +


                    ALLOW_AUTO_REWARDER           = Boolean.valueOf(customSettings.getProperty("AllowAutoRewarder", "False"));
                    AUTO_REWARD_DELAY             = Integer.parseInt(customSettings.getProperty("AutoRewardDelay", "1200"));
                    AUTO_REWARD_ID                = Integer.parseInt(customSettings.getProperty("AutoRewardID", "57"));
                    AUTO_REWARD_COUNT             = Integer.parseInt(customSettings.getProperty("AutoRewardCount", "1000"));


                    +ALT_CLASSID = Integer.parseInt(customSettings.getProperty("ClassID", "90"));
                    +ALT_DAMAGE = Float.parseFloat(customSettings.getProperty("Damage", "1.5"));
                    +ALT_DAGGER = customSettings.getProperty("WeaponType", "DAGGER").equalsIgnoreCase("DAGGER");
                    +ALT_BOW = customSettings.getProperty("WeaponType", "DAGGER").equalsIgnoreCase("BOW");
                    +ALT_BLUNT = customSettings.getProperty("WeaponType", "DAGGER").equalsIgnoreCase("BLUNT");
                    +ALT_BIGBLUNT = customSettings.getProperty("WeaponType", "DAGGER").equalsIgnoreCase("BIGBLUNT");
                    +ALT_DUALFIST = customSettings.getProperty("WeaponType", "DAGGER").equalsIgnoreCase("DUALFIST");
                    +ALT_DUAL = customSettings.getProperty("WeaponType", "DAGGER").equalsIgnoreCase("DUAL");
                    +ALT_SWORD = customSettings.getProperty("WeaponType", "DAGGER").equalsIgnoreCase("SWORD");
                    +ALT_BIGSWORD = customSettings.getProperty("WeaponType", "DAGGER").equalsIgnoreCase("BIGSWORD");



            else if (pName.equalsIgnoreCase("ChampionRewardItemID")) CHAMPION_REWARD_ID = Integer.parseInt(pValue);
            else if (pName.equalsIgnoreCase("ChampionRewardItemQty")) CHAMPION_REWARD_QTY = Integer.parseInt(pValue);

    +        else if (pName.equalsIgnoreCase("WeaponType"))
    +        {
    +         ALT_DAGGER              = pValue.equalsIgnoreCase("DAGGER");
    +         ALT_BOW                 = pValue.equalsIgnoreCase("BOW");
    +         ALT_BLUNT               = pValue.equalsIgnoreCase("BLUNT");
    +         ALT_BIGBLUNT            = pValue.equalsIgnoreCase("BIGBLUNT");
    +         ALT_DUALFIST            = pValue.equalsIgnoreCase("DUALFIST");
    +         ALT_DUAL                = pValue.equalsIgnoreCase("DUAL");
    +         ALT_SWORD               = pValue.equalsIgnoreCase("SWORD");
    +         ALT_BIGSWORD            = pValue.equalsIgnoreCase("BIGSWORD");
    +         ALT_POLE                = pValue.equalsIgnoreCase("POLE");
    +        }
        

     
    Index: java/net/sf/l2j/gameserver/skills/Formulas.java
    ===================================================================
                    // Dmg bonusses in PvP fight
                    if ((attacker instanceof L2PlayableInstance)
                                    && (target instanceof L2PlayableInstance))
                    {
                            if (skill == null)
                                    damage *= attacker.calcStat(Stats.PVP_PHYSICAL_DMG, 1, null, null);
                            else
                                    damage *= attacker.calcStat(Stats.PVP_PHYS_SKILL_DMG, 1, null, null);
                    }
    +                if (attacker instanceof L2PcInstance)
    +                {
    +                 L2PcInstance pcInst = (L2PcInstance)attacker;
    +                 if (pcInst.getClassId().getId() == Config.ALT_CLASSID)
    +                 {
    +                     if (Config.ALT_DAGGER)
    +                     {
    +                               L2Weapon wpn = pcInst.getActiveWeaponItem();
    +                               if (wpn != null && wpn.getItemType() == L2WeaponType.DAGGER)
    +                                        damage /= (int) (damage / Config.ALT_DAMAGE);
    +                     }else if (Config.ALT_BOW)
    +                     {
    +                               L2Weapon wpn = pcInst.getActiveWeaponItem();
    +                               if (wpn != null && wpn.getItemType() == L2WeaponType.BOW)
    +                                        damage /= (int) (damage / Config.ALT_DAMAGE);
    +                     }else if (Config.ALT_BLUNT)
    +                     {
    +                               L2Weapon wpn = pcInst.getActiveWeaponItem();
    +                               if (wpn != null && wpn.getItemType() == L2WeaponType.BLUNT)
    +                                        damage /= (int) (damage / Config.ALT_DAMAGE);
    +                     }else if (Config.ALT_BIGBLUNT)
    +                     {
    +                               L2Weapon wpn = pcInst.getActiveWeaponItem();
    +                               if (wpn != null && wpn.getItemType() == L2WeaponType.BIGBLUNT)
    +                                        damage /= (int) (damage / Config.ALT_DAMAGE);
    +                     }else if (Config.ALT_DUALFIST)
    +                     {
    +                               L2Weapon wpn = pcInst.getActiveWeaponItem();
    +                               if (wpn != null && wpn.getItemType() == L2WeaponType.DUALFIST)
    +                                        damage /= (int) (damage / Config.ALT_DAMAGE);
    +                      }else if (Config.ALT_DUAL)
    +                      {
    +                                L2Weapon wpn = pcInst.getActiveWeaponItem();
    +                                if (wpn != null && wpn.getItemType() == L2WeaponType.DUAL)
    +                                         damage /= (int) (damage / Config.ALT_DAMAGE);
    +                       }else if (Config.ALT_SWORD)
    +                       {
    +                                 L2Weapon wpn = pcInst.getActiveWeaponItem();
    +                                 if (wpn != null && wpn.getItemType() == L2WeaponType.SWORD)
    +                                          damage /= (int) (damage / Config.ALT_DAMAGE);
    +                       }else if (Config.ALT_BIGSWORD)
    +                       {
    +                                 L2Weapon wpn = pcInst.getActiveWeaponItem();
    +                                 if (wpn != null && wpn.getItemType() == L2WeaponType.BIGSWORD)
    +                                          damage /= (int) (damage / Config.ALT_DAMAGE);
    +                           }else if (Config.ALT_POLE)
    +                       {
    +                                 L2Weapon wpn = pcInst.getActiveWeaponItem();
    +                                 if (wpn != null && wpn.getItemType() == L2WeaponType.POLE)
    +                                          damage /= (int) (damage / Config.ALT_DAMAGE);
    +                        }
    +                 }
    +    }

    Index: Classes
    ================================================
    -- HUMANS
    -- 0=Human Fighter                      | 1=Human Warrior               | 2=Gladiator                   | 3=Warlord                     | 4=Human Knight
    -- 5=Paladin                            | 6=Dark Avenger                        | 7=Rogue                               | 8=Treasure Hunter     | 9=Hawkeye
    -- 10=Human Mage                        | 11=Human Wizard               | 12=Sorcerer/ss                        | 13=Necromancer        | 14=Warlock
    -- 15=Cleric                            | 16=Bishop                             | 17=Prophet

    -- ELVES
    -- 18=Elven Fighter                     | 19=Elven Knight               | 20=Temple Knight              | 21=Swordsinger        | 22=Elven Scout
    -- 23=Plainswalker                      | 24=Silver Ranger              | 25=Elven Mage                 | 26=Elven Wizard       | 27=Spellsinger
    -- 28=Elemental Summoner        | 29=Elven Oracle               | 30=Elven Elder

    -- DARK ELVES
    -- 31=Dark Elven Fighter        | 32=Palus Knight               | 33=Shillien Knight    | 34=Bladedancer        | 35=Assassin
    -- 36=Abyss Walker                      | 37=Phantom Ranger             | 38=Dark Elven Mage    | 39=Dark Wizard        | 40=Spellhowler
    -- 41=Phantom Summoner          | 42=Shillien Oracle    | 43=Shillien Elder

    -- ORCS
    -- 44=Orc Fighter                       | 45=Orc Raider                 | 46=Destroyer                  | 47=Monk                       | 48=Tyrant
    -- 49=Orc Mage                          | 50=Orc Shaman                 | 51=Overlord                   | 52=Warcryer

    -- DWARVES
    -- 53=Dwarven Fighter           | 54=Scavenger                  | 55=Bounty Hunter              | 56=Artisan            | 57=Warsmith

    -- HUMANS 3rd Professions
    -- 88=Duelist                           | 89=Dreadnought                | 90=Phoenix Knight             | 91=Hell Knight        | 92=Sagittarius
    -- 93=Adventurer                        | 94=Archmage                   | 95=Soultaker                  | 96=Arcana Lord        | 97=Cardinal
    -- 98=Hierophant

    -- ELVES 3rd Professions
    -- 99=Evas Templar                      | 100=Sword Muse                | 101=Wind Rider                | 102=Moonlight Sentinel
    -- 103=Mystic Muse                      | 104=Elemental Master                                                  | 105=Evas Saint

    -- DARK ELVES 3rd Professions
    -- 106=Shillien Templar         | 107=Spectral Dancer   | 108=Ghost Hunter              | 109=Ghost Sentinel
    -- 110=Storm Screamer           | 111=Spectral Master   | 112=Shillien Saint

    -- ORCS 3rd Professions
    -- 113=Titan                            | 114=Grand Khavatari
    -- 115=Dominator                        | 116=Doomcryer

    -- DWARVES 3rd Professions
    -- 117=Fortune Seeker           | 118=Maestro

    Custom Start Spawn:
    Code:
    Index: java/config/custom.properties
    ===================================================================

    +# Set true for custom spawn location.
    +CustomSpawn = false
    +SpawnX = 85331
    +SpawnY = 16192
    +SpawnZ = -1255

    Index: java/net/sf/l2j/Config.java
    ===================================================================
        public static int CHAMPION_REWARD_ID;
        public static int CHAMPION_REWARD_QTY;

    +    public static boolean SPAWN_CHAR;
    +    public static int SPAWN_X;
    +    public static int SPAWN_Y;
    +    public static int SPAWN_Z;



                    CHAMPION_REWARD_ID            = Integer.parseInt(customSettings.getProperty("ChampionRewardItemID", "6393"));
                    CHAMPION_REWARD_QTY           = Integer.parseInt(customSettings.getProperty("ChampionRewardItemQty", "1"));

    +                SPAWN_CHAR = Boolean.parseBoolean(customSettings.getProperty("CustomSpawn", "false"));
    +                SPAWN_X = Integer.parseInt(customSettings.getProperty("SpawnX", ""));
    +                SPAWN_Y = Integer.parseInt(customSettings.getProperty("SpawnY", ""));
    +                SPAWN_Z = Integer.parseInt(customSettings.getProperty("SpawnZ", ""));

    Index: java/net/sf/l2j/gameserver/clientpackets/CharacterCreate.java
    ===================================================================

    -              
    -               newChar.setXYZInvisible(template.spawnX, template.spawnY, template.spawnZ);
    -  
    +               if (Config.SPAWN_CHAR)
    +               {
    +                       newChar.setXYZInvisible(Config.SPAWN_X, Config.SPAWN_Y, Config.SPAWN_Z);
    +               }
    +          else
    +               {
    +                       newChar.setXYZInvisible(template.spawnX, template.spawnY, template.spawnZ);
    +               }
    +
    +              

    Custom Start LvL and Start Sub LvL:
    Code:
    Index: java/config/custom.properties
    ===================================================================

    # Specified reward item rnd qty
    ChampionRewardItemQty = 1
    +
    +# Allow custom starting lvl default:false
    +AllowCustomStartLvl = false
    +#Custom Start lvl for 78 lvl and 100% put 79
    +CustomStartLvl = 1
    +#Custom lvl when player add new subclass
    +#min = 40 max = 78
    +#default = 40
    +CustomSubclassLvl = 40
    +

    Index: java/net/sf/l2j/Config.java
    ===================================================================

    public static int CHAMPION_REWARD_HIGHER_CHANCE;
    public static int CHAMPION_REWARD_ID;
    public static int CHAMPION_REWARD_QTY;
    +
    +/** custom start lvl */
    +public static boolean ALLOW_CUSTOM_CHAR_LVL;
    +public static int CUSTOM_CHAR_LVL;
    +public static int CUSTOM_SUBCLASS_LVL;
    +


                    CHAMPION_REWARD_HIGHER_CHANCE = Integer.parseInt(customSettings.getProperty("ChampionRewardHigherLvlItemChance", "0"));
                    CHAMPION_REWARD_ID            = Integer.parseInt(customSettings.getProperty("ChampionRewardItemID", "6393"));
                    CHAMPION_REWARD_QTY           = Integer.parseInt(customSettings.getProperty("ChampionRewardItemQty", "1"));
    +
    +                ALLOW_CUSTOM_CHAR_LVL        = Boolean.parseBoolean(customSettings.getProperty("AllowCustomStartLvl", "false"));
    +                CUSTOM_CHAR_LVL              = Integer.parseInt(customSettings.getProperty("CustomStartLvl", "1"));
    +                CUSTOM_SUBCLASS_LVL          = Integer.parseInt(customSettings.getProperty("CustomSubclassLvl", "40"));
    +              
     
    Index: java/net/sf/lj/gameserver/clientpackets/EnterWorld.java
    ===================================================================
     import net.sf.l2j.gameserver.model.L2World;
     import net.sf.l2j.gameserver.model.actor.instance.L2ClassMasterInstance;
     import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
    +import net.sf.l2j.gameserver.model.base.Experience;
     import net.sf.l2j.gameserver.model.entity.ClanHall;
     import net.sf.l2j.gameserver.model.entity.L2Event;
     import net.sf.l2j.gameserver.model.entity.Siege;


                getConnection().close();

                _log.warning("EnterWorld failed! activeChar is null...");
                return;
            }
            
    +        if (Config.ALLOW_CUSTOM_CHAR_LVL && (activeChar.getLevel() == 1))
    +        {
    +         activeChar.getStat().addExp(Experience.LEVEL[Config.CUSTOM_CHAR_LVL]);
    +        }
    +
            // Register in flood protector
            FloodProtector.getInstance().registerNewPlayer(activeChar.getObjectId());

    Index: java/net/sf/l2j/gameserver/model/base/SubClass.java
    ===================================================================

    package net.sf.l2j.gameserver.model.base;
    +
    +import net.sf.l2j.Config;
    +

    -    private PlayerClass _class;
    -    private int _exp = Experience.LEVEL[40];
    -    private int _sp = 0;
    -    private int _level = 40;    
    -    private int _classIndex = 1;
     


    +    private PlayerClass _class;
    +    private int _exp = Experience.LEVEL[Config.CUSTOM_SUBCLASS_LVL];
    +    private int _sp = 0;
    +    private int _level = (byte)Config.CUSTOM_SUBCLASS_LVL;
    +    private int _classIndex = 1;

    flagged players cant use gk:
    Code:
    ===================================================================
    Index: java/config/altsettings.properties
    ===================================================================

    # Can the player use gatekeepers (GK)?
    AltKarmaPlayerCanUseGK = False
    AltKarmaPlayerCanTrade = True
    AltKarmaPlayerCanUseWareHouse = True
    +# Can the flaged player use gatekeepers (GK)?
    +AltFlagedPlayerCanUseGK = False

    ===================================================================
    Index: java/net/sf/l2j/Config.java
    ===================================================================

        /** Allow player with karma to use gatekeepers ? */
        public static boolean ALT_GAME_KARMA_PLAYER_CAN_USE_GK;
    +    /** Allow flaged player to use gatekeepers ? */
    +    public static boolean ALT_GAME_FLAGED_PLAYER_CAN_USE_GK;

                    ALT_GAME_KARMA_PLAYER_CAN_TELEPORT                  = Boolean.valueOf(altSettings.getProperty("AltKarmaPlayerCanTeleport", "true"));
    +                ALT_GAME_FLAGED_PLAYER_CAN_USE_GK                   = Boolean.parseBoolean(altSettings.getProperty("AltFlagedPlayerCanUseGK", "false"));

            else if (pName.equalsIgnoreCase("AltKarmaPlayerCanTeleport")) ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = Boolean.valueOf(pValue);
            +else if (pName.equalsIgnoreCase("AltFlagedPlayerCanUseGK")) ALT_GAME_FLAGED_PLAYER_CAN_USE_GK = Boolean.parseBoolean(pValue);

    ===================================================================
    Index: java/net/sf/l2j/gameserver/model/actor/instance/L2TeleporterInstance.java
    ===================================================================

                else if (player.getKarma() > 0 && !Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK) //karma
                {
                    SystemMessage sm = new SystemMessage(614);
                    sm.addString("Go away, you're not welcome here.");
                    player.sendPacket(sm);
                    return;
                }
    +            else if (!Config.ALT_GAME_FLAGED_PLAYER_CAN_USE_GK && player.getPvpFlag() > 0)
    +            {
    +             player.sendMessage("Flaged player can not use GK!!");
    +             return;
    +            }

    some restrictions to enchant:
    Code:
    Gameserver/clientpackets/RequestEnchantItem.java

            // can't enchant rods and hero weapons
            if (item.getItem().getItemType() == L2WeaponType.ROD || item.getItemId() >= 6611 && item.getItemId() <= 6621 || item.getItemId() >= 7816 && item.getItemId() <= 7831)
            {
                activeChar.sendPacket(new SystemMessage(SystemMessage.INAPPROPRIATE_ENCHANT_CONDITION));
                activeChar.setActiveEnchantItem(null);
                activeChar.sendPacket(new EnchantResult(2));
                return;
            }

    +        if(activeChar.isInCraftMode())
    +        {
    +           activeChar.setActiveEnchantItem(null);
    +           activeChar.sendMessage("Can't enchant");
    +           return;
    +        }
    +        if(activeChar.isTeleporting())
    +        {
    +           activeChar.setActiveEnchantItem(null);
    +           activeChar.sendMessage("Can't enchant while You Teleporting");
    +           return;
    +        }
    +        if(activeChar.isDead())
    +        {
    +           activeChar.setActiveEnchantItem(null);
    +           activeChar.sendMessage("Can't enchant while You Are Dead");
    +           return;
    +        }
    +        if(activeChar.isSleeping())
    +        {
    +           activeChar.setActiveEnchantItem(null);
    +           activeChar.sendMessage("Can't enchant while You Are In Sleep");
    +           return;
    +        }
    +        if(activeChar.isParalyzed())
    +        {
    +           activeChar.setActiveEnchantItem(null);
    +           activeChar.sendMessage("Can't enchant while You Are In Para");
    +           return;
    +        }
    +
    +        
    +        if(activeChar.isCastingNow())
    +        {
    +           activeChar.setActiveEnchantItem(null);
    +           activeChar.sendMessage("Can't enchant while Casting");
    +           return;
    +        }
    +

                    if(item.isWear())
                    {
                            Util.handleIllegalPlayerAction(activeChar,"Player "+activeChar.getName()+" tried to enchant a weared Item", IllegalPlayerAction.PUNISH_KICK);

    was wanting to adapt this mod, but it's hitting me, if someone can adapt it I thank

    Interlude - L2JFrozen
    Interlude - aCis 309
    Interlude - aCis 299


    Quickly enumeration of which configs it has:
    -Enable/Disable pvp flag on enter
    -Enable/Disable revive delay & set the time
    -Specify (unlimited) random respawns if revive enabled
    -Specify random respawn radius
    -Enable/Disable noblesse blessing on enter
    -Enable/Disable remove buffs on enter
    -Enable/Disable remove pets on enter
    -Specify special reward when hunting inside
    -Specify items that will be unequiped & blocked to use inside the zone
    -Specify items by grades that will be unequiped & blocked to use inside the zone
    -Specify an enchant level. Items with that level or more, will be unequiped & blocked to use inside the zone
    -Specify classes id's that won't be able to enter to this zone

    Créditos

    Wyatt criação.

    avoegio

    Posts : 75
    Join date : 2014-04-18

    :))

    Post  avoegio on 10th July 2014, 11:40

    good job man !! Smile))) respect

    avoegio

    Posts : 75
    Join date : 2014-04-18

    java

    Post  avoegio on 10th July 2014, 11:41

    it will be great if you adapt for lisvus profesion selling from classmaster on adena . or premium xp/sp

    Sponsored content

    Re: 6 Java Mods for C4Lisvus.

    Post  Sponsored content


      Current date/time is 19th November 2017, 14:03