Messed with configs for hours, but nothing changed until I tried splitting the slots differently and testing with just a few items first. Kind of like checking what actually works before going full scale. Came across https://www.mega888reviews.com/ while taking a break, and reading through their simple, clear tips made me think maybe less complicated approaches often work best.
Question
nery
I'm trying to adapt clanfull mode for fandc H5
Mode original:
package net.sf.l2j.gameserver.handler.admincommandhandlers; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.handler.IAdminCommandHandler; import net.sf.l2j.gameserver.model.L2Object; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage; /** * @author Bluur * */ public class AdminClanFull implements IAdminCommandHandler { private static final String[] commands = {"admin_clanfull"}; private static final int reputation = 30000000; private static final byte level = 8; //id skills private static final int[] clanSkills = { 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391 }; @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { L2Object target = activeChar.getTarget(); L2PcInstance player = null; if (target != null && target instanceof L2PcInstance) player = (L2PcInstance) target; else return false; if (player.isClanLeader()) { player.getClan().changeLevel(level); player.getClan().addReputationScore(reputation); for (int s : clanSkills) { L2Skill clanSkill = SkillTable.getInstance().getInfo(s, SkillTable.getInstance().getMaxLevel(s)); player.getClan().addNewSkill(clanSkill); } player.getClan().updateClanInDB(); player.sendSkillList(); player.sendPacket(new ExShowScreenMessage("Seu Clan esta Full! Obrigado!", 8000)); activeChar.sendMessage("[Clan Full]: Foi adicionado com sucesso!"); } else activeChar.sendMessage("O target precisa ser Lider de clan."); return true; } @Override public String[] getAdminCommandList() { return commands; } }-------------------
my adaptation
public class AdminClanFull implements IAdminCommandHandler { private static enum Commands { admin_clanfull } private static final int reputation = 10000; private static final byte level = 11; //id skills private static final int[] clanSkills = { 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391 }; @SuppressWarnings("rawtypes") @Override public boolean useAdminCommand(Enum comm, String[] wordList, String fullString, Player activeChar) { GameObject target = activeChar.getTarget(); Player player = activeChar; if (target != null && target instanceof Player) player = (Player) target; else return false; if (player.isClanLeader()) { player.getClan().setLevel(level); player.getClan().updateClanInDB(); activeChar.sendPacket(new SkillList(activeChar)); player.sendMessage("Server Reports: Dear reader, you now have full Clan, Congratulations."); activeChar.sendMessage("[Clan Full]: It was successfully added!"); } else activeChar.sendMessage("The target needs to be clan leader."); return true; } @Override public Enum[] getAdminCommandEnum() { return Commands.values(); } }I'm in trouble this part
player.getClan().addReputationScore(reputation); for (int s : clanSkills) { L2Skill clanSkill = SkillTable.getInstance().getInfo(s, SkillTable.getInstance().getMaxLevel(s)); player.getClan().addNewSkill(clanSkill); }0 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now