Hi @xFranky,
You need someone like @Tryskell (or himself) to have a good understanding of the project and not to rush on committing 2 lines suggested by a random guy. Everything has to be organized in order to success. If you don't control the changes/commits, the project will end up like any other L2J fork from 2009 when everyone was having one. You really need to think it thru when doing a commit
what is it fixing
what else may that affect
how can you improve it
how can you make sure you're following a coding style
and testing it in every possible way
Adding customs is definitely easier. But how will this project of yours save the community?
Server owners can pay several (if not one) developers to code whatever he/she wants.
Perhaps it will only help the community if server owners would be more open minded and cooperative.
I'm reading every single new reply on aCis forums weekly. I'm not opening a server, but I'm very attached to the project. I'm occasionally helping people (so called "L2 buddies") with their servers, for free.
If I were you, I'd make a separated project, self-styled "engine" with listeners, like we/I used to be working on aCis, thanks to Seth that opened my eyes many years ago.
If you do this, you'll have one file for each feature/custom. I will c/p one example below for you.
You and your developers that wanna join you will be more satisfied with this.
Maybe you can join an existing community, such as aCis with your engine -separated categories on the forum. Try to talk to @Tryskell, @Sido and @SweeTs about it.
# True or false.
OlympiadSkillsSystem = False
# Skill level set to 0 will auto select max skill level.
# [classId: = skillId-skillLv];
OlympiadSkills = [101:92: = 7100-1];
public class OlympiadSkills implements EventListener
{
private static final Logger LOG = Logger.getLogger(OlympiadSkills.class.getName());
protected static final HashMap<Integer, L2Skill[]> olympiadSkills = new HashMap<>();
public OlympiadSkills()
{
CorvusConfig config = Corax.config();
String data = config.getProperty("OlympiadSkills", "");
String[] dataHash = data.split(";");
for (String data2 : dataHash)
{
String[] skillIds = data2.split("=")[1].split(",");
L2Skill[] leIds = new L2Skill[skillIds.length];
SkillTable table = SkillTable.getInstance();
for (int i = 0; i < skillIds.length; i++)
{
String[] defs = skillIds[i].split("-");
String skillIdValue = defs[0].replaceAll("[^\\p{L}\\p{N}]", "");
String skillLevelValue = defs[1].replaceAll("[^\\p{L}\\p{N}]", "");
int skillId = Integer.parseInt(skillIdValue);
int level = Integer.parseInt(skillLevelValue);
boolean max = level <= 0;
L2Skill skill = table.getInfo(skillId, max ? table.getMaxLevel(skillId) : level);
if (skill != null)
leIds[i] = skill;
else
LOG.warning(getClass().getSimpleName() + ": Failed loading skill: " + skillId + " level: " + (max ? table.getMaxLevel(skillId) : level) + ". Skill dose not exist!");
}
String[] dataHash2 = data2.split("=")[0].split(":");
for (int i = 0; i < dataHash2.length; i++)
{
String classIdValue = dataHash2[i].replaceAll("[^\\p{L}\\p{N}]", "");
int classId = -1;
if (classIdValue.isEmpty())
continue;
try
{
classId = Integer.parseInt(classIdValue);
olympiadSkills.put(classId, leIds);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
LOG.info(getClass().getSimpleName() + ": Loaded " + olympiadSkills.size() + " balance entry(s).");
}
@Override
public void listen(Event event, Object... params)
{
switch (event.eventId)
{
case EventKeys.Olympiad.portPlayerToArena:
{
Player player = (Player) params[0];
L2Skill[] skills = olympiadSkills.get(player.getClassId().getId());
if (skills != null)
{
for (L2Skill skill : skills)
player.addSkill(skill, false);
}
else
LOG.warning(getClass().getSimpleName() + ": Missing skill for classId: " + player.getClassId().getId());
break;
}
case EventKeys.Olympiad.portPlayerBack:
case EventKeys.Cleanup:
{
Player player = (Player) params[0];
L2Skill[] skills = olympiadSkills.get(player.getClassId().getId());
if (skills != null)
{
for (L2Skill skill : skills)
player.removeSkill(skill.getId(), true);
}
break;
}
}
}
}