- 0
This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
b0rto
This part is completely up --> private static final String SKILL_LIST = "%clanskills%"; private void clanhome(L2PcInstance activeChar, int clanId) { L2Clan cl = ClanTable.getInstance().getClan(clanId); if (cl != null) { if (cl.getLevel() < 2) { activeChar.sendPacket(SystemMessageId.NO_CB_IN_MY_CLAN); cbByPass("_bbsmemo_clanlist", activeChar); } else { ClanHall clanhall = ClanHallManager.getInstance().getClanHallByOwner(cl); Castle castle = CastleManager.getInstance().getCastleById(cl.getCastleId()); Fort fort = FortManager.getInstance().getFortById(cl.getFortId()); String content = ""; String path = "data/html/CommunityBoard/clanInfo.htm"; content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), path); content = content.replaceAll("%clan_name%", cl.getName()); content = content.replaceAll("%leader_name%", cl.getLeaderName()); content = content.replaceAll("%alliance%", (cl.getAllyName() != null ? cl.getAllyName() : "No")); content = content.replaceAll("%level%", String.valueOf(cl.getLevel())); content = content.replaceAll("%base%", (castle != null ? castle.getName() + " Castle" : (fort != null ? fort.getName() + " Fortress" : "No"))); content = content.replaceAll("%hall%", (clanhall != null ? clanhall.getName() : "No")); content = content.replaceAll("%members%", (cl.getMembersCount() > 0 ? String.valueOf(cl.getMembersCount()) : "No")); content = content.replaceAll("%reputation%", (cl.getReputationScore() > 0 ? String.valueOf(cl.getReputationScore()) : "No")); content = content.replaceAll("%memberson%", (cl.getOnlineMembersCount() > 0 ? String.valueOf(cl.getOnlineMembersCount()) : "0")); String list = ""; final Map<Integer, L2Skill> skills = cl.getSkills(); for (L2Skill s : skills.values()) { String largo = Integer.toString(s.getId()); String largo3 = "0" + largo; list += SKILL_LIST; list = list.replace("%clanskills%", "<td align=center><button width=32 height=32 back=\"Icon.skill" + (largo.length() > 3 ? largo : largo3) + "\" fore=\"Icon.skill" + (largo.length() > 3 ? largo : largo3) + "\"></td>"); } content = content.replace("%clanskills%", list); separateAndSend(content, activeChar); } } }int cantidad = 0; for (L2Skill s : skills.values()) { String largo = Integer.toString(s.getId()); String largo3 = "0" + largo; list += SKILL_LIST; list = list.replace("%clanskills%", "<td align=center><button width=32 height=32 back=\"Icon.skill" + (largo.length() > 3 ? largo : largo3) + "\" fore=\"Icon.skill" + (largo.length() > 3 ? largo : largo3) + "\"></td>"); cantidad++; if (cantidad == 12) { break; } } content = content.replace("%clanskills%", list); separateAndSend(content, activeChar); }when i test , it break the loop when 12 results but how can i do to change line and continue the results till the next change line? sorry for my english,
3 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