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.
hello everyone !
I need help with a l2script Rev H5-Salvation/Classic build. I compiled the project, installed everything but I can't log in to the server, it won't log me in. I tried a thousand ways without good results. I leave you the error when logging in either with the H5-Salvation Client.
ERROR ---> WARN: IPBANMANAGER ---> IP !!!!
I'm waiting for help! Thank you!
Hello !
I have a problem when connecting to the pack with the Salvation client, it blocks my IP, I see that the account is created in the database but it remains logged in.
Any idea what it could be? ALso with H5 CLient !
Thank you !
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.