I needed code to put a Cap on Elemental resists. I want to cap them at 40.
What ive got so far done in CharStat.java is only visual in game, it does not really put a cap, only looks like it. I need help making code to actually cap it, I guess where formulas are done.
Heres what I got so far done in CharStat.java that is only visual:
/**ReturntheElementalAttributeCapForFire*/
publicdouble getElementAttributeFire()
{
if (_activeChar == null)
return 1;
int val = (int) (100 - 100 * calcStat(Stats.FIRE_VULN, _activeChar.getTemplate().baseFireVuln, null, null));
if (val > Config.MAX_STAT && !_activeChar.isGM())
val = Config.MAX_STAT;
return val;
}
/**ReturntheElementalAttributeCapForWater*/
publicdouble getElementAttributeWater()
{
if (_activeChar == null)
return 1;
int val = (int) (100 - 100 * calcStat(Stats.WATER_VULN, _activeChar.getTemplate().baseWaterVuln, null, null));
if (val > Config.MAX_STAT && !_activeChar.isGM())
val = Config.MAX_STAT;
return val;
}
/**ReturntheElementalAttributeCapForEarth*/
publicdouble getElementAttributeEarth()
{
if (_activeChar == null)
return 1;
int val = (int) (100 - 100 * calcStat(Stats.EARTH_VULN, _activeChar.getTemplate().baseEarthVuln, null, null));
if (val > Config.MAX_STAT && !_activeChar.isGM())
val = Config.MAX_STAT;
return val;
}
/**ReturntheElementalAttributeCapForWind*/
publicdouble getElementAttributeWind()
{
if (_activeChar == null)
return 1;
int val = (int) (100 - 100 * calcStat(Stats.WIND_VULN, _activeChar.getTemplate().baseWindVuln, null, null));
if (val > Config.MAX_STAT && !_activeChar.isGM())
val = Config.MAX_STAT;
return val;
}
/**ReturntheElementalAttributeCapForHoly*/
publicdouble getElementAttributeHoly()
{
if (_activeChar == null)
return 1;
int val = (int) (100 - 100 * calcStat(Stats.HOLY_VULN, _activeChar.getTemplate().baseHolyVuln, null, null));
if (val > Config.MAX_STAT && !_activeChar.isGM())
val = Config.MAX_STAT;
return val;
}
/**ReturntheElementalAttributeCapForUnHoly*/
publicdouble getElementAttributeUnholy()
{
if (_activeChar == null)
return 1;
int val = (int) (100 - 100 * calcStat(Stats.DARK_VULN, _activeChar.getTemplate().baseDarkVuln, null, null));
if (val > Config.MAX_STAT && !_activeChar.isGM())
val = Config.MAX_STAT;
return val;
}
}
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
People really like my server. But whenever someone mentions L2Mid, the haters show up and start throwing shits 🙂 I can't really say much about the 50–100 online players. I’m thinking of giving L2Mid a try later this yearif anyone’s interested, let’s keep it positive.
LF a skilled (& affordable 😆 ) developer to help me create some stuff for a project.
Message me your discord or type it as a response here and I'll be adding you if you're providing services.
Im writing for someone that share my vision a good L2 gold style server that won't just randomly shut like L2 Gold.in and will help me maybe build the server for the comunity
Question
SilverDeath
I needed code to put a Cap on Elemental resists. I want to cap them at 40.
What ive got so far done in CharStat.java is only visual in game, it does not really put a cap, only looks like it. I need help making code to actually cap it, I guess where formulas are done.
Heres what I got so far done in CharStat.java that is only visual:
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.