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.
Added: a brand-new default dashboard template.
You can now add multiple game/login server builds.
Full support for running both PTS & L2J servers simultaneously, with switching between them.
Payment systems: added OmegaPay and Pally (new PayPal-style API).
Account history now stores everything: donations, items delivered to characters, referrals, transfers between game accounts, and coin transfers to another master account.
Personal Promo Code System: you can create a promo code and assign it to a user or promoter. When donating, a player can enter this promo code to receive bonus coins, and the promo code owner also receives a bonus — all fully configurable in the admin panel.
Look demo site: demo
MoMoProxy has updated more static residential proxies for USA location, anyone interested in can view: https://momoproxy.com/static-residential-proxies
To manually override it you got to use command //field_cycle set_step 1 11
1 is the field cycle id for hellbound island from db (fiy 2 & 3 are the seeds in gracia sod and soi) and 11 is the level you want to change it to. Anywhere from 1 to 11 will work for different stages.
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