Alguem poderia dizer como dividir em quantidade de paginas que podem aparecer ?
se puder fazer ficaria melhor :D
else if(_command.startsWith("buff")){
+ String[] val = _command.split(" ");
+ String x = val[1];
+ int id = Integer.parseInt(x);
+ L2PcInstance target = null;
+
+ if(activeChar.getTarget() instanceof L2PcInstance)
+ target = (L2PcInstance) activeChar.getTarget();
+
+ if(target == null)
+ return;
+
+ if(activeChar.getInventory().getItemByItemId(57) == null || activeChar.getInventory().getItemByItemId(57).getCount() < ((L2PcInstance) activeChar.getTarget()).getBuffPrize()){
+ activeChar.sendMessage("* No tienes adena!");
+ return;
+ }
+
+
+ try{
+ L2Skill s = SkillTable.getInstance().getInfo(id, 3);
+ s.getEffects(activeChar, activeChar);
+ activeChar.sendMessage("* Has Comprado: "+s.getName());
+ activeChar.getInventory().destroyItemByItemId("", 57, target.getBuffPrize(), activeChar, null);
+ target.getInventory().addItem("", 57, target.getBuffPrize(), target, null);
+ TextBuilder tb = new TextBuilder();
+ NpcHtmlMessage n = new NpcHtmlMessage(0);
+
+ tb.append("<html><body>");
+ tb.append("<br><br>");
+ tb.append("<center>Hola <font color=LEVEL>Campesin@</font> Quieres Buff!</center>");
+ tb.append("<br><center>Mis Buff Cuestan: <font color=LEVEL>"+target.getBuffPrize()+"</font> Adenas cada uno!</center><br><center><table><tr>");
+
+
+ L2Skill[] skills = target.getAllSkills();
+ FastList<L2Skill> ba = new FastList<L2Skill>();
+
+ for(L2Skill skill : skills){
+ if(skill == null)
+ continue;
+
+
+ if(skill.getSkillType() == L2SkillType.BUFF && skill.isActive() && skill.getId() != 970 && skill.getId() != 357 && skill.getId() != 1323 && skill.getId() != 327 && skill.getId() != 1325 && skill.getId() != 1326 && skill.getId() != 1327)
+ ba.add(skill);
+ }
+
+ for(L2Skill p : ba){
+ tb.append("<td><button action=\"bypass -h buff "+p.getId()+"\" width=32 height=32 back=\"Icon.skill"+p.getId()+"\" fore=\"Icon.skill"+p.getId()+"\"></td>");
+ tb.append("<td><button value=\""+p.getName()+"\" action=\"bypass -h buff "+p.getId()+"\" width=200 height=32 back=\"L2UI_CT1.Windows_DF_Drawer_Bg_Darker\" fore=\"L2UI_CT1.Windows_DF_Drawer_Bg_Darker\"></td>");
+ tb.append("<td><button action=\"bypass -h buff "+p.getId()+"\" width=32 height=32 back=\"Icon.skill"+p.getId()+"\" fore=\"Icon.skill"+p.getId()+"\"></td></tr><tr>");
+ }
+
+ tb.append("</tr></table></center></body></html>");
+
+ n.setHtml(tb.toString());
+ activeChar.sendPacket(n);
+ }
+ catch(Exception e){
+ e.printStackTrace();
+ }
+ }
+ else if(_command.startsWith("actr")){
+ String l = _command.substring(5);
+
+ int p = 0;
+
+ p = Integer.parseInt(l);
+
+
+ if(p == 0)
+ return;
+
+ if(p > 2000000000){
+ activeChar.sendMessage("* Te has colado el limite de Adena!");
+ return;
+ }
+
+ activeChar.setBuffPrize(p);
+ activeChar.sitDown();
+ activeChar.setTeam(1);
+ activeChar.setSellBuff(true);
+ activeChar.setOldTitle(activeChar.getTitle());
+ activeChar.setOldNameColor(activeChar.getAppearance().getNameColor());
+ /*activeChar.getAppearance().setNameColor(0x55155);*/
+ activeChar.getAppearance().setNameColor(99, 22, 11);
+ activeChar.setTitle(Config.ADD_TITULO_PJ_SELLBUFS);
+ activeChar.broadcastUserInfo();
+ activeChar.broadcastTitleInfo();
+ }
[Hidden Content]