goodnight hello people , I 'll post a problem that took several days fighting with and you do not know what do to with the solution I tried to copy pieces of code with similar operations and have not gotten more than what you see in the image below . I 'm trying to leave the skills clan organized in the table on the right and when it exceeds the width of the table rather than leapfrog continue straight breaking the width of the table are 35 skill in all that I have and just 13 appear others lost in the table ... , here you will see the image when the clan has skills:
i try to add a counter variable called "cantidad" to count the result in a loop, and it work, but i dont know what to do to make it working fine, look the changes;
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,
if anyone knows where the error may be what I will be grateful 've tried everything and no where to take her to repair it , thanks in advance.
Hello everyone, we are one of the top gaming currency stores. We work exclusively with top projects.
If you are interested in anything like Adena, Coins, Equip, write to us
Discord - pchelacoin
Telegram - https://t.me/ipchelacoin
BOHPTS, KETRAWARS, EURO-PVP, L2REBORN, E-GLOBAL, LA2DREAM
TOP PRICE !!!!!!!
L2Elixir – Patch 4 Is Live!
We’re working non-stop, day and night, to deliver the best possible quality and bring back what made L2Elixir special. This project is built with passion, not shortcuts — for the old-school players who remember, and the new ones who want to experience it properly. Thank you for being part of the journey. Together, we’re making L2Elixir great again ❤️ The legends never fade.
⚙️ General
Enabled Class Change service (same class type only)
ALT + B → Services → Character Development
Enabled Shift + Click on Treasure Chests Players can now identify real chests (Adena, scroll drops) and use Key / Unlock
Event deaths now cancel only debuffs, All self buffs are preserved, fixes issues with Root and similar effects
Bladedancer class can now log in even when Max Clients (2) is reached. Since an active Bladedancer is not available for every damage dealer and some players tried to abuse this via VPN or a second PC, this feature was added to keep things fair. protections applies, requires testing!
🎒 Items
Crystallizing enchanted items now gives the correct increased crystal amount (retail-like behavior)
Removed Agathion Seal Bracelet: Rudolph from Santa rewards (Gracia Final item)
Added Dualsword Craft Stamp into Milestone Exchange list
🧙 Skills
Fixed Banish Undead lethal chance
Hot Springs Malaria and similar effects now level up faster while being attacked
Warning: This guy is a big scammer, trying to sell everything, advertising for servers etc.
That's his mail address evgesha.nrnr@gmail.com , stay away!
@Atom @Celestine
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