Jump to content

Recommended Posts

Posted

I Found This Java Code And I  Shared Here !

Gredits To L2Smirnof And Me :P

[move]Need Test[/move]

Trunk/L2jServer/java/config/l2jmods.properties ¶

 

# Disable Grade Penalty

DisableGradePenalty = False

Line 222

+

+ #---------------------------------------------------------------

+ # Augmentation      ------By Olympus   -----                                        -

+ #---------------------------------------------------------------

+ # These controls the chance to get a skill in the augmentation process

+ # Retail: 15, 30, 45, 60

+ AugmentationNGSkillChance = 15

+ AugmentationMidSkillChance = 30

+ AugmentationHighSkillChance = 45

+ AugmentationTopSkillChance = 60

+

+ # These controls the chance to get a Base Stat Modifier in the augmentation process

+ # Note:

+ # No dependancy on LS grade

+ # Retail: 1

+ AugmentationBaseStatChance = 1

+

+ # These controls the chance to get a glow effect in the augmentation process

+ # Note:

+ # No/Mid Grade Life Stone can not have glow effect

+ # if you do not get a skill or Base Stat Modifier

+ # On Retail you can not get glow effect with NoGrade LS

+ # Retail: 0, 40, 70, 100

+ AugmentationNGGlowChance = 0

+ AugmentationMidGlowChance = 40

+ AugmentationHighGlowChance = 70

+ AugmentationTopGlowChance = 100

 

 

TabularUnified Trunk/L2jServer/java/net/sf/l2j/Config.java ¶

Line 991

   public static int ENCHANT_SAFE_MAX_FULL;

 

+    /** Chance to get a skill while using a NoGrade Life Stone*/

+    public static int AUGMENTATION_NG_SKILL_CHANCE;

+    

+    /** Chance to get a Glow effect while using a NoGrade Life Stone(only if you get a skill)*/

+    public static int AUGMENTATION_NG_GLOW_CHANCE;

+    

+    /** Chance to get a skill while using a MidGrade Life Stone*/

+    public static int AUGMENTATION_MID_SKILL_CHANCE;

+    

+    /** Chance to get a Glow effect while using a MidGrade Life Stone(only if you get a skill)*/

+    public static int AUGMENTATION_MID_GLOW_CHANCE;

+    

+    /** Chance to get a skill while using a HighGrade Life Stone*/

+    public static int AUGMENTATION_HIGH_SKILL_CHANCE;

+    

+    /** Chance to get a Glow effect while using a HighGrade Life Stone*/

+    public static int AUGMENTATION_HIGH_GLOW_CHANCE;

+    

+    /** Chance to get a skill while using a TopGrade Life Stone*/

+    public static int AUGMENTATION_TOP_SKILL_CHANCE;

+    

+    /** Chance to get a Glow effect while using a TopGrade Life Stone*/

+    public static int AUGMENTATION_TOP_GLOW_CHANCE;

+    

+    /** Chance to get a BaseStatModifier in the augmentation process*/

+    public static int AUGMENTATION_BASESTAT_CHANCE;

+    

1018 +    

   // Character multipliers

   /** Multiplier for character HP regeneration */

 

               ANNOUNCE_CASTLE_LORDS                                   = Boolean.parseBoolean(L2JModSettings.getProperty("AnnounceCastleLords", "False"));

               DISABLE_GRADE_PENALTY                               = Boolean.parseBoolean(L2JModSettings.getProperty("DisableGradePenalty", "False"));

-

Line 1974

+                AUGMENTATION_NG_SKILL_CHANCE                = Integer.parseInt(L2JModSettings.getProperty("AugmentationNGSkillChance", "15"));

+                AUGMENTATION_NG_GLOW_CHANCE                         = Integer.parseInt(L2JModSettings.getProperty("AugmentationNGGlowChance", "0"));

+                AUGMENTATION_MID_SKILL_CHANCE               = Integer.parseInt(L2JModSettings.getProperty("AugmentationMidSkillChance", "30"));

+                AUGMENTATION_MID_GLOW_CHANCE                = Integer.parseInt(L2JModSettings.getProperty("AugmentationMidGlowChance", "40"));

+                AUGMENTATION_HIGH_SKILL_CHANCE              = Integer.parseInt(L2JModSettings.getProperty("AugmentationHighSkillChance", "45"));

+                AUGMENTATION_HIGH_GLOW_CHANCE               = Integer.parseInt(L2JModSettings.getProperty("AugmentationHighGlowChance", "70"));

+                AUGMENTATION_TOP_SKILL_CHANCE               = Integer.parseInt(L2JModSettings.getProperty("AugmentationTopSkillChance", "60"));

+                AUGMENTATION_TOP_GLOW_CHANCE                = Integer.parseInt(L2JModSettings.getProperty("AugmentationTopGlowChance", "100"));

+                AUGMENTATION_BASESTAT_CHANCE                = Integer.parseInt(L2JModSettings.getProperty("AugmentationBaseStatChance", "1"));

               if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)

               {

 

Line 2511

       else if (pName.equalsIgnoreCase("TvTEventRunningTime")) TVT_EVENT_RUNNING_TIME = Integer.parseInt(pValue);

       else if (pName.equalsIgnoreCase("TvTEventParticipationNpcId")) TVT_EVENT_PARTICIPATION_NPC_ID = Integer.parseInt(pValue);

+        else if (pName.equalsIgnoreCase("AugmentationNGSkillChance")) AUGMENTATION_NG_SKILL_CHANCE = Integer.parseInt(pValue);

+        else if (pName.equalsIgnoreCase("AugmentationNGGlowChance")) AUGMENTATION_NG_GLOW_CHANCE = Integer.parseInt(pValue);

+        else if (pName.equalsIgnoreCase("AugmentationMidSkillChance")) AUGMENTATION_MID_SKILL_CHANCE = Integer.parseInt(pValue);

+        else if (pName.equalsIgnoreCase("AugmentationMidGlowChance")) AUGMENTATION_MID_GLOW_CHANCE = Integer.parseInt(pValue);

+        else if (pName.equalsIgnoreCase("AugmentationHighSkillChance")) AUGMENTATION_HIGH_SKILL_CHANCE = Integer.parseInt(pValue);

+        else if (pName.equalsIgnoreCase("AugmentationHighGlowChance")) AUGMENTATION_HIGH_GLOW_CHANCE = Integer.parseInt(pValue);

+        else if (pName.equalsIgnoreCase("AugmentationTopSkillChance")) AUGMENTATION_TOP_SKILL_CHANCE = Integer.parseInt(pValue);

+        else if (pName.equalsIgnoreCase("AugmentationTopGlowChance")) AUGMENTATION_TOP_GLOW_CHANCE = Integer.parseInt(pValue);

+        else if (pName.equalsIgnoreCase("AugmentationBaseStatChance")) AUGMENTATION_BASESTAT_CHANCE = Integer.parseInt(pValue);

       // PvP settings

       else if (pName.equalsIgnoreCase("MinKarma")) KARMA_MIN_KARMA = Integer.parseInt(pValue);

 

 

TabularUnified Trunk/L2jServer/java/net/sf/l2j/gameserver/datatables/AugmentationData.java ¶

 

 

public class AugmentationData

 

       // =========================================================

       // Data Field

-

-        // chances

-        //private static final int CHANCE_STAT = 88;

-        private static final int CHANCE_SKILL = 11;

-        private static final int CHANCE_BASESTAT = 1;

 

       // stats

… …

       //private static final int STAT_NUMBEROF_SUBBLOCKS = 40;

 

Line 74 +        

+        // skills

+        // private static final int BLUE_START = 14561;

+        private static final int PURPLE_START = 14578;

+        private static final int RED_START = 14685;      

+        

       // basestats

       private static final int BASESTAT_STR = 16341;

 

Line 87

       private FastList _augmentationStats[];

-        private FastList<augmentationSkill> _activeSkills;

-        private FastList<augmentationSkill> _passiveSkills;

-        private FastList<augmentationSkill> _chanceSkills;

+        private FastList<augmentationSkill> _blueSkills;

+        private FastList<augmentationSkill> _purpleSkills;

+        private FastList<augmentationSkill> _redSkills;

+        private int _skillsCount;

 

       // =========================================================

Line 104

               _augmentationStats[3] = new FastList<augmentationStat>();

 

-                _activeSkills = new FastList<augmentationSkill>();

-                _passiveSkills = new FastList<augmentationSkill>();

-                _chanceSkills = new FastList<augmentationSkill>();

+                _blueSkills = new FastList<augmentationSkill>();

+                _purpleSkills = new FastList<augmentationSkill>();

+                _redSkills = new FastList<augmentationSkill>();

 

               load();

 

+                _skillsCount = _blueSkills.size() + _purpleSkills.size() + _redSkills.size();

+                

               // Use size*4: since theres 4 blocks of stat-data with equivalent size

               _log.info("AugmentationData: Loaded: "+(_augmentationStats[0].size()*4)+" augmentation stats.");

-                _log.info("AugmentationData: Loaded: "+_activeSkills.size()+" active, "+_passiveSkills.size()+" passive and "+_chanceSkills.size()+" chance skills");

+                _log.info("AugmentationData: Loaded: " + _blueSkills.size() + " blue, " + _purpleSkills.size() + " purple and " + _redSkills.size() + " red skills");

       }

 

 

                                                       NamedNodeMap attrs = d.getAttributes();

                                                       int skillId=0, augmentationId = Integer.parseInt(attrs.getNamedItem("id").getNodeValue());

-                                                        String type="passive";

+                                                        // type of the skill is not needed anymore but I do not erase the code.

+                                                        // maybe someone can use it for something

+                                                        // String type = "passive";

 

                                                       for (Node cd=d.getFirstChild(); cd != null; cd = cd.getNextSibling())

 

                                       skillId = Integer.parseInt(attrs.getNamedItem("val").getNodeValue());

                                                               }

-                                                                else if ("type".equalsIgnoreCase(cd.getNodeName()))

+                                                                /* else if ("type".equalsIgnoreCase(cd.getNodeName()))

                                                               {

                                                                       attrs = cd.getAttributes();

                                       type = attrs.getNamedItem("val").getNodeValue();

-                                                                }

+                                                                }*/

                                                       }

 

-                                                        if (type.equalsIgnoreCase("active")) _activeSkills.add(new augmentationSkill(skillId, st.getMaxLevel(skillId, 1), augmentationId));

-                                                        else if (type.equalsIgnoreCase("passive")) _passiveSkills.add(new augmentationSkill(skillId, st.getMaxLevel(skillId, 1), augmentationId));

-                                                        else _chanceSkills.add(new augmentationSkill(skillId, st.getMaxLevel(skillId, 1), augmentationId));

+                                                        if (augmentationId < PURPLE_START)

+                                                                        _blueSkills.add(new augmentationSkill(skillId, st.getMaxLevel(skillId, 1), augmentationId));

+                                                        else if (augmentationId < RED_START)

+                                                                    _purpleSkills.add(new augmentationSkill(skillId, st.getMaxLevel(skillId, 1), augmentationId));

+                                                        else

+                                                                    _redSkills.add(new augmentationSkill(skillId, st.getMaxLevel(skillId, 1), augmentationId));

                                               }

                                       }

 

 

               // Note: lifeStoneGrade: (0 means low grade, 3 top grade)

-                // First: decide which grade the augmentation result is going to have:

+                // First: determine whether we will add a skill/baseStatModifier or not

+                //        because this determine which color could be the result  

+                int skill_Chance = 0;

+                int stat34 = 0;

+                boolean generateSkill = false;

+                int resultColor = 0;

+                boolean generateGlow = false;

+                switch (lifeStoneGrade)

+                {

+                                        case 0:

+                                                skill_Chance = Config.AUGMENTATION_NG_SKILL_CHANCE;

+                                                if (Rnd.get(1,100) <= Config.AUGMENTATION_NG_GLOW_CHANCE)

+                                                        generateGlow = true;

+                                                break;

+                                        case 1:

+                                                skill_Chance = Config.AUGMENTATION_MID_SKILL_CHANCE;

+                                                if (Rnd.get(1,100) <= Config.AUGMENTATION_MID_GLOW_CHANCE)

+                                                        generateGlow = true;

+                                                break;

+                                        case 2:

+                                                skill_Chance = Config.AUGMENTATION_HIGH_SKILL_CHANCE;

+                                                if (Rnd.get(1,100) <= Config.AUGMENTATION_HIGH_GLOW_CHANCE)

+                                                        generateGlow = true;

+                                                break;

+                                        case 3:

+                                                skill_Chance = Config.AUGMENTATION_TOP_SKILL_CHANCE;

+                                                if (Rnd.get(1,100) <= Config.AUGMENTATION_TOP_GLOW_CHANCE)

+                                                        generateGlow = true;

+                                }

+                

+                                if (Rnd.get(1, 100) <= skill_Chance)

+                                        generateSkill = true;

+                                else if (Rnd.get(1, 100) <= Config.AUGMENTATION_BASESTAT_CHANCE)

+                                        stat34 = Rnd.get(BASESTAT_STR, BASESTAT_MEN);

+                

+                // Second: decide which grade the augmentation result is going to have:

               // 0:yellow, 1:blue, 2:purple, 3:red

-                int resultColor = 0;

+                

               // The chances used here are most likely custom,

-                // whats known is: u can also get a red result from a normal grade lifeStone

-                // however I will make it so that a higher grade lifeStone will more likely result in a

-                // higher grade augmentation... and the augmentation result will at least have the grade

-                // of the life stone

-                resultColor = Rnd.get(0, 100);

-                if (lifeStoneGrade == 3 || resultColor <= (15*lifeStoneGrade)+10) resultColor = 3;

-                else if (lifeStoneGrade == 2 || resultColor <= (15*lifeStoneGrade)+20) resultColor = 2;

-                else if (lifeStoneGrade == 1 || resultColor <= (15*lifeStoneGrade)+30) resultColor = 1;

-                else resultColor = 0;

-

-                // Second: Calculate the subblock offset for the choosen color,

+                // whats known is: you cant have yellow with skill(or baseStatModifier)

+        //                 noGrade stone can not have glow, mid only with skill, high has a chance(custom), top allways glow

+                if (stat34 == 0 && !generateSkill)

+                {

+                                resultColor = Rnd.get(0, 100);

+                                if (resultColor <= (15 * lifeStoneGrade) + 40)

+                                                resultColor = 1;

+                                else

+                                                resultColor = 0;

+                }

+                

+                {

+                                resultColor = Rnd.get(0, 100);

+                                if (resultColor <= (10 * lifeStoneGrade) + 5 || stat34 != 0)

+                                                resultColor = 3;

+                                else if (resultColor <= (10 * lifeStoneGrade) + 10)

+                                        resultColor = 1;

+                                else

+                                                resultColor = 2;

+                }

+

+                // Third: Calculate the subblock offset for the choosen color,

               // and the level of the lifeStone

-                int colorOffset = (resultColor*(STAT_SUBBLOCKSIZE*10))

-                                                        +((lifeStoneLevel-1)*STAT_SUBBLOCKSIZE);

-

-                int offset = ((3-lifeStoneGrade)*STAT_BLOCKSIZE)+colorOffset;

-

-                int stat12 = Rnd.get(offset, offset+STAT_SUBBLOCKSIZE);

-                int stat34 = 0;

-                boolean generateSkill=false;

-

-                // use a chance to determine whether we will add a skill or not

-                if (Rnd.get(1, 100) <= CHANCE_SKILL) generateSkill = true;

-                // only if no skill is going to be applyed

-                else if (Rnd.get(1, 100) <= CHANCE_BASESTAT) stat34 = Rnd.get(BASESTAT_STR, BASESTAT_MEN);

+                // from large number of retail augmentations:

+                // no skill part

+                // Id for stat12:

+                // A:1-910 B:911-1820 C:1821-2730 D:2731-3640 E:3641-4550 F:4551-5460 G:5461-6370 H:6371-7280

+                // Id for stat34(this defines the color):

+                // I:7281-8190(yellow) K:8191-9100(blue) L:10921-11830(yellow) M:11831-12740(blue)

+                // you can combine I-K with A-D and L-M with E-H

+                // using C-D or G-H Id you will get a glow effect

+                // there seems no correlation in which grade use which Id except for the glowing restriction

+                // skill part

+                // Id for stat12:

+                // same for no skill part

+                // A same as E, B same as F, C same as G, D same as H

+                // A - no glow, no grade LS

+                // B - weak glow, mid grade LS?

+                // C - glow, high grade LS?

+                // D - strong glow, top grade LS?

+                

 

               // is neither a skill nor basestat used for stat34? then generate a normal stat

               int stat12 = 0;

               if (stat34 == 0 && !generateSkill)

               {

-                        offset = (lifeStoneGrade*STAT_BLOCKSIZE)+colorOffset;

-

-                        stat34 = Rnd.get(offset, offset+STAT_SUBBLOCKSIZE);

-                }

-

+                        int temp = Rnd.get(2,3);

+                        int colorOffset = resultColor * (10 * STAT_SUBBLOCKSIZE) + temp * STAT_BLOCKSIZE + 1;

+                        int offset = ((lifeStoneLevel - 1) * STAT_SUBBLOCKSIZE) + colorOffset;

+

+                        stat34 = Rnd.get(offset, offset + STAT_SUBBLOCKSIZE - 1);

+                        if (generateGlow && lifeStoneGrade >= 2)

+                                        offset = ((lifeStoneLevel - 1) * STAT_SUBBLOCKSIZE) + (temp - 2) * STAT_BLOCKSIZE + lifeStoneGrade * (10 * STAT_SUBBLOCKSIZE) + 1;

+                        else    

+                                    offset = ((lifeStoneLevel - 1) * STAT_SUBBLOCKSIZE) + (temp - 2) * STAT_BLOCKSIZE + Rnd.get(0, 1) * (10 * STAT_SUBBLOCKSIZE) + 1;

+                        stat12 = Rnd.get(offset, offset + STAT_SUBBLOCKSIZE - 1);

+                }

+                else

+                {

+                        int offset;

+                        if (!generateGlow)

+                                        offset = ((lifeStoneLevel - 1) * STAT_SUBBLOCKSIZE) + Rnd.get(0, 1) * STAT_BLOCKSIZE + 1;

+                        else

+                                        offset = ((lifeStoneLevel - 1) * STAT_SUBBLOCKSIZE) + Rnd.get(0, 1) * STAT_BLOCKSIZE + (lifeStoneGrade + resultColor) / 2 * (10 * STAT_SUBBLOCKSIZE) + 1;

+                        stat12 = Rnd.get(offset, offset + STAT_SUBBLOCKSIZE - 1);

+                }

+                

               // generate a skill if neccessary

               L2Skill skill = null;

 

               {

                       augmentationSkill temp=null;

-                        switch (Rnd.get(1,3))

-                        {

-                                case 1: // chance skill

-                                        temp = _chanceSkills.get(Rnd.get(0,_chanceSkills.size()-1));

+                        switch (resultColor)

+                        {

+                                        case 1: // blue skill

+                                        temp = _blueSkills.get(Rnd.get(0, _blueSkills.size() - 1));

                                       skill = temp.getSkill(lifeStoneLevel);

-                                        stat34 = temp.getAugmentationSkillId();

+                                        stat34 = temp.getAugmentationSkillId() + (lifeStoneLevel - 1) * _skillsCount;

                                       break;

-                                case 2: // active skill

-                                        temp = _activeSkills.get(Rnd.get(0,_activeSkills.size()-1));

+                                        case 2: // purple skill

+                                        temp = _purpleSkills.get(Rnd.get(0, _purpleSkills.size() - 1));

-                                        skill = temp.getSkill(lifeStoneLevel);

-                                        stat34 = temp.getAugmentationSkillId();

+                                        stat34 = temp.getAugmentationSkillId() + (lifeStoneLevel - 1) * _skillsCount;

                                       break;

-                                case 3: // passive skill

-                                        temp = _passiveSkills.get(Rnd.get(0,_passiveSkills.size()-1));

+                                        case 3: // red skill

+                                        temp = _redSkills.get(Rnd.get(0, _redSkills.size() - 1));

                                       skill = temp.getSkill(lifeStoneLevel);

-                                        stat34 = temp.getAugmentationSkillId();

+                                        stat34 = temp.getAugmentationSkillId() + (lifeStoneLevel - 1) * _skillsCount;

                                       break;

                       }

               }

-

+                if (Config.DEBUG)

+                                _log.info("Augmentation success: stat12=" + stat12 + "; stat34=" + stat34 + "; resultColor=" + resultColor + "; level=" + lifeStoneLevel + "; grade=" + lifeStoneGrade);

               return new L2Augmentation(item, ((stat34<<16)+stat12), skill, true);

       }

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • This update resaves 25_25 from the original (with sounds) (without the cave below) Some emitter fixes (removed waterfalls with high-poly meshes) The geodata is old, but it works Everything else is unchanged Download P.S. The effect files are taken from the high client for Interlude, so if you're experiencing critical skills, use the default ones for your Version.  
    • GX-Ext Which file of the svn files should i edit to make blow skills to have 100% chance so i can add the settings in the IlExt.ini? because when im changing it from the skilldata.txt it just helps
    • 我们感谢您的 反馈 并希望让服务变得更加 优秀! 如果您使用过我们的服务并愿意分享您的体验(任何体验——积极或建设性),请在Trustpilot上留下评价,并获得$1作为感谢。 链接: https://www.trustpilot.com/review/socnet.pro 如何获得奖励: 1. 前往Trustpilot并留下您的评价 2. 向我们发送发布确认截图,以及带有与评价用户名一致的授权账户截图。 3. 指定哪个商店应收到这 $1 奖励。根据商店不同,可能需要您的用户名/电子邮箱。 您的反馈帮助我们成长,并让项目对社区中的每一位成员变得更好。感谢您与我们同行! 条款: 此活动仅适用于一个唯一用户。不允许多账号行为。 项目有效链接: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram 方便访问商店。 虚拟号码服务: 前往 用于购买 Telegram Stars 的 Telegram 机器人: 前往 – 在 Telegram 中快捷且优惠地购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们想向您展示当前的 促销和特别优惠列表 用于购买我们提供的产品与服务: 1. 您可在首次购买时使用优惠码:SOCNET(15% 折扣) 2. 获得 $1 商店余额或 10–20% 折扣——只需在我们网站注册后,按照模板填写您的用户名:“SEND ME BONUS, MY USERNAME IS...”并在我们的论坛主题中发布! 3. 首次启动 SMM 面板可获得 $1:只需在我们的网站(Support)提交主题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道以及 Stars 购买机器人中每周都有 Telegram Stars 抽奖! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock