I have a multiskill server (L2JFrozen rev) and I've recently had some hacker enter my server and he was able to learn monster passive skills/active skills and some skills that aren't in any character skill tree, like valakas buff, super haste, etc.
Since it happened i activated the AllowedSkills function (plus also activating it on the Protected folder CheckSkillsOnEnter), and added on the list only the character skills on the list (1-500 and 1000-1500), however, the function doesn't seem to be working.
Is there a way a can put a verification on L2PcInstance or some other java instance to automatically ban player/delete skills between 3000-7000 or something like that? My source code already has something like this (i'll be posting below), but it doesn't seem to be working (i tested with another character and nothing happened to it).
/**
* check player skills and remove unlegit ones (excludes hero, noblesse and cursed weapon skills).
*/
public void checkAllowedSkills()
{
boolean foundskill = false;
if (!isGM())
{
Collection<L2SkillLearn> skillTree = SkillTreeTable.getInstance().getAllowedSkills(getClassId());
// loop through all skills of player
for (final L2Skill skill : getAllSkills())
{
final int skillid = skill.getId();
// int skilllevel = skill.getLevel();
foundskill = false;
// loop through all skills in players skilltree
for (final L2SkillLearn temp : skillTree)
{
// if the skill was found and the level is possible to obtain for his class everything is ok
if (temp.getId() == skillid)
{
foundskill = true;
}
}
// exclude noble skills
if (isNoble() && skillid >= 325 && skillid <= 397)
{
foundskill = true;
}
if (isNoble() && skillid >= 1323 && skillid <= 1327)
{
foundskill = true;
}
// exclude hero skills
if (isHero() && skillid >= 395 && skillid <= 396)
{
foundskill = true;
}
if (isHero() && skillid >= 1374 && skillid <= 1376)
{
foundskill = true;
}
// exclude cursed weapon skills
if (isCursedWeaponEquiped() && skillid == CursedWeaponsManager.getInstance().getCursedWeapon(_cursedWeaponEquipedId).getSkillId())
{
foundskill = true;
}
// exclude clan skills
if (getClan() != null && skillid >= 370 && skillid <= 391)
{
foundskill = true;
}
// exclude seal of ruler / build siege hq
if (getClan() != null && (skillid == 246 || skillid == 247))
if (getClan().getLeaderId() == getObjectId())
{
foundskill = true;
}
// exclude fishing skills and common skills + dwarfen craft
if (skillid >= 1312 && skillid <= 1322)
{
foundskill = true;
}
if (skillid >= 1368 && skillid <= 1373)
{
foundskill = true;
}
// exclude sa / enchant bonus / penality etc. skills
if (skillid >= 3000 && skillid < 7000)
{
foundskill = true;
}
// exclude Skills from AllowedSkills in options.properties
if (Config.ALLOWED_SKILLS_LIST.contains(skillid))
{
foundskill = true;
}
// exclude Donator character
if (isDonator())
{
foundskill = true;
}
// exclude Aio character
if (isAio())
{
foundskill = true;
}
// remove skill and do a lil LOGGER message
if (!foundskill)
{
removeSkill(skill);
if (Config.DEBUG)
{
// sendMessage("Skill " + skill.getName() + " removed and gm informed!");
LOGGER.warn("Character " + getName() + " of Account " + getAccountName() + " got skill " + skill.getName() + ".. Removed!"/* + IllegalPlayerAction.PUNISH_KICK */);
}
}
}
// Update skill list
sendSkillList();
skillTree = null;
}
}
Hello, Adena is for sale in the r33team.com store
L2classic.club Talking island x3 - 5€/bil
L2classic.club Dion x3 - 27.00€/100mil
l2reborn.com Origin x1 - 0,25€/1mil
L2Reborn.org - x15 Forever - 0.05€/1mil
L2Reborn.org - x1 Signature -0.11€/1k
elmorelab.com x2 - 0.46€/1mil
elmorelab.com x3 - 0.15€/1mil
elmorelab.com x1 - 2.06€/1mil
Scryde.net x2 - 9.18€/100mil
Payment method:
Paypal
Visa/Mastercard
Crypto
You can find out more information on our website: https://r33team.com/
When I have free time, I will update it for version 409.
I might also make some changes, such as allowing you to choose whether you want the berserker at level 1 or 2.
Question
dextroy
Hello, i need some help if anyone know:
I have a multiskill server (L2JFrozen rev) and I've recently had some hacker enter my server and he was able to learn monster passive skills/active skills and some skills that aren't in any character skill tree, like valakas buff, super haste, etc.
Since it happened i activated the AllowedSkills function (plus also activating it on the Protected folder CheckSkillsOnEnter), and added on the list only the character skills on the list (1-500 and 1000-1500), however, the function doesn't seem to be working.
Is there a way a can put a verification on L2PcInstance or some other java instance to automatically ban player/delete skills between 3000-7000 or something like that? My source code already has something like this (i'll be posting below), but it doesn't seem to be working (i tested with another character and nothing happened to it).
50 answers to this question
Recommended Posts