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;
}
}
So, make me understand one thing, you consider your previous work a crap? Everyone who has payd for l2jmobius subscription since 2018 untill 2024 had access to a crap version of your server and the best is the latest you release in this very moment to your actual subscribers?
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