Autor Tema: Bug en Scheme de Buffer  (Leído 59 veces)

andres14

  • Jr. Member
  • **
  • Mensajes: 62
  • Karma: +0/-0
    • Ver Perfil
Bug en Scheme de Buffer
« en: Octubre 23, 2018, 09:49:31 pm »
Al borrar un scheme ya creado el juego tira critico.
« Última modificación: Octubre 23, 2018, 10:11:22 pm por andres14 »

fissban

  • Administrador
  • Full Member
  • *
  • Mensajes: 196
  • Karma: +0/-0
    • Ver Perfil
Re:Bug en Scheme de Buffer
« Respuesta #1 en: Octubre 24, 2018, 10:29:15 am »
prueba estos cambios

Código
Index: src/main/engine/events/daily/normal/types/L2Day.java
===================================================================
--- src/main/engine/events/daily/normal/types/L2Day.java (revision 0)
+++ src/main/engine/events/daily/normal/types/L2Day.java (revision 0)
@@ -0,0 +1,190 @@
+package main.engine.events.daily.normal.types;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import main.data.ConfigData;
+import main.engine.events.daily.AbstractEvent;
+import main.holders.objects.CharacterHolder;
+import main.holders.objects.NpcHolder;
+import main.holders.objects.PlayerHolder;
+import main.util.Util;
+import main.util.UtilMessage;
+import main.util.UtilSpawn;
+import net.sf.l2j.gameserver.ThreadPoolManager;
+import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
+import net.sf.l2j.gameserver.model.actor.instance.enums.TeamType;
+import net.sf.l2j.gameserver.model.holder.LocationHolder;
+import net.sf.l2j.gameserver.model.world.L2World;
+import net.sf.l2j.util.lib.Rnd;
+
+/**
+ * @author fissban
+ */
+public class L2Day extends AbstractEvent
+{
+ // Npc
+ private final static int EVENT_HUMAN = 12260;
+ private final static int EVENT_ELF = 12261;
+ private final static int EVENT_DARK_ELF = 12262;
+ private final static int EVENT_DWARF = 12263;
+ private final static int EVENT_ORC = 12264;
+ // Html
+ private final static String HTML_PATH = "data/html/events/l2day/";
+ // Letters
+ private final static int LETTER_A = 3875;
+ private final static int LETTER_C = 3876;
+ private final static int LETTER_E = 3877;
+ private final static int LETTER_F = 3878;
+ private final static int LETTER_G = 3879;
+ private final static int LETTER_H = 3880;
+ private final static int LETTER_I = 3881;
+ private final static int LETTER_L = 3882;
+ private final static int LETTER_N = 3883;
+ private final static int LETTER_O = 3884;
+ private final static int LETTER_R = 3885;
+ private final static int LETTER_S = 3886;
+ private final static int LETTER_T = 3887;
+ private final static int LETTER_II = 3888;
+
+ private static final Map<Integer, String> TALKERS = new HashMap<>();
+ static
+ {
+ TALKERS.put(EVENT_HUMAN, "event_human001.htm");
+ TALKERS.put(EVENT_ELF, "event_elf001.htm");
+ TALKERS.put(EVENT_DARK_ELF, "event_darkelf001.htm");
+ TALKERS.put(EVENT_DWARF, "event_dwarf001.htm");
+ TALKERS.put(EVENT_ORC, "event_orc001.htm");
+ }
+
+ private static final List<LocationHolder> SPAWNS_HUMAN = new ArrayList<>();
+ static
+ {
+ SPAWNS_HUMAN.add(new LocationHolder(-13073, 122801, -3117, 0)); // gludio08_npc1921_lc01
+ SPAWNS_HUMAN.add(new LocationHolder(-13949, 121934, -2988, 32768)); // gludio08_npc1921_lc02
+ SPAWNS_HUMAN.add(new LocationHolder(-14822, 123708, -3117, 8192)); // gludio08_npc1921_lc03
+ SPAWNS_HUMAN.add(new LocationHolder(18178, 145149, -3054, 7400)); // dion09_npc2022_lc01
+ SPAWNS_HUMAN.add(new LocationHolder(19208, 144380, -3097, 32768)); // dion09_npc2022_lc02
+ SPAWNS_HUMAN.add(new LocationHolder(19508, 145775, -3086, 48000)); // dion09_npc2022_lc03
+ SPAWNS_HUMAN.add(new LocationHolder(17396, 170259, -3507, 30000)); // dion10_npc2023_lc01
+ SPAWNS_HUMAN.add(new LocationHolder(79806, 55570, -1560, 0)); // oren17_npc2219_lc01
+ SPAWNS_HUMAN.add(new LocationHolder(83328, 55824, -1525, 32768)); // oren17_npc2219_lc02
+ SPAWNS_HUMAN.add(new LocationHolder(80986, 54504, -1525, 32768)); // oren17_npc2219_lc03
+ SPAWNS_HUMAN.add(new LocationHolder(83332, 149160, -3405, 49152)); // giran11_npc2222_lc01
+ SPAWNS_HUMAN.add(new LocationHolder(82277, 148598, -3467, 0)); // giran11_npc2222_lc02
+ SPAWNS_HUMAN.add(new LocationHolder(81621, 148725, -3467, 32768)); // giran11_npc2222_lc03
+ SPAWNS_HUMAN.add(new LocationHolder(81680, 145656, -3533, 32768)); // giran11_npc2222_lc04
+ SPAWNS_HUMAN.add(new LocationHolder(-80762, 151118, -3043, 28672)); // gludio06_npc1722_lc01
+ SPAWNS_HUMAN.add(new LocationHolder(-84049, 150176, -3129, 4096)); // gludio06_npc1722_lc02
+ SPAWNS_HUMAN.add(new LocationHolder(-82623, 151666, -3129, 49152)); // gludio06_npc1722_lc03
+ SPAWNS_HUMAN.add(new LocationHolder(117498, 76630, -2695, 38000)); // aden14_npc2320_lc01
+ SPAWNS_HUMAN.add(new LocationHolder(115914, 76449, -2711, 59000)); // aden14_npc2320_lc02
+ SPAWNS_HUMAN.add(new LocationHolder(119536, 76988, -2275, 40960)); // aden14_npc2320_lc03
+ SPAWNS_HUMAN.add(new LocationHolder(-84516, 242971, -3730, 34000)); // gludio25_npc1725_lc01
+ SPAWNS_HUMAN.add(new LocationHolder(-86003, 243205, -3730, 60000)); // gludio24_npc1725_lc02
+ SPAWNS_HUMAN.add(new LocationHolder(147120, 27312, -2192, 40960)); // aden13_npc2418_lc01
+ SPAWNS_HUMAN.add(new LocationHolder(147920, 25664, -2000, 16384)); // aden13_npc2418_lc02
+ SPAWNS_HUMAN.add(new LocationHolder(147888, -58048, -2979, 49000)); // godard02_npc2416_lc01
+ SPAWNS_HUMAN.add(new LocationHolder(147285, -56461, -2776, 11500)); // godard02_npc2416_lc02
+ SPAWNS_HUMAN.add(new LocationHolder(44176, -48732, -800, 33000)); // rune02_npc2116_lc01
+ SPAWNS_HUMAN.add(new LocationHolder(44294, -47642, -792, 50000)); // rune02_npc2116_lc02
+ }
+
+ private static final List<LocationHolder> SPAWNS_ELF = new ArrayList<>();
+ static
+ {
+ SPAWNS_ELF.add(new LocationHolder(47151, 49436, -3059, 32000)); // oren04_npc2119_lc01
+ SPAWNS_ELF.add(new LocationHolder(44122, 50784, -3059, 57344)); // oren04_npc2119_lc01
+ SPAWNS_ELF.add(new LocationHolder(111776, 221104, -3543, 16384)); // innadril09_npc2324_lc01
+ SPAWNS_ELF.add(new LocationHolder(107904, 218096, -3675, 0)); // innadril09_npc2324_lc02
+ SPAWNS_ELF.add(new LocationHolder(114920, 220020, -3632, 32768)); // innadril09_npc2324_lc03
+ }
+
+ private static final List<LocationHolder> SPAWNS_DARKELF = new ArrayList<>();
+ static
+ {
+ SPAWNS_DARKELF.add(new LocationHolder(11281, 15652, -4584, 25000)); // oren09_npc2018_lc01
+ SPAWNS_DARKELF.add(new LocationHolder(11303, 17732, -4574, 57344)); // oren09_npc2018_lc02
+ }
+
+ private static final List<LocationHolder> SPAWNS_DWARF = new ArrayList<>();
+ static
+ {
+ SPAWNS_DWARF.add(new LocationHolder(114733, -178691, -821, 0)); // schuttgart03_npc2312_lc01
+ SPAWNS_DWARF.add(new LocationHolder(115708, -182362, -1449, 0)); // schuttgart03_npc2312_lc02
+ }
+
+ private static final List<LocationHolder> SPAWNS_ORC = new ArrayList<>();
+ static
+ {
+ SPAWNS_ORC.add(new LocationHolder(-44337, -113669, -224, 0)); // schuttgart03_npc2312_lc01
+ SPAWNS_ORC.add(new LocationHolder(-44628, -115409, -240, 22500)); // schuttgart03_npc2312_lc02
+ }
+
+ // Message
+ private static final String MESSAGE_START = "L2Day Event: Collect Letters and trade them for prizes at Event Cats in every town! Hurry up, since the event will end at Feb 28th!";
+
+ private static final List<NpcHolder> npcs = new ArrayList<>();
+
+ public L2Day()
+ {
+ registerEvent(true, ConfigData.HEAVY_MEDALS_DATE_START, ConfigData.HEAVY_MEDALS_DATE_END);
+ }
+
+ @Override
+ public void onModState()
+ {
+ switch (getState())
+ {
+ case START:
+ // send message
+ UtilMessage.sendAnnounceMsg(MESSAGE_START, L2World.getInstance().getAllPlayers());
+ // add npc spawns
+ ThreadPoolManager.getInstance().schedule(() ->
+ {
+ // Generate Spawns
+ SPAWNS_HUMAN.forEach(loc -> npcs.add(UtilSpawn.npc(EVENT_HUMAN, loc, 0, 0, TeamType.NONE, 0)));
+ SPAWNS_ELF.forEach(loc -> npcs.add(UtilSpawn.npc(EVENT_ELF, loc, 0, 0, TeamType.NONE, 0)));
+ SPAWNS_DARKELF.forEach(loc -> npcs.add(UtilSpawn.npc(EVENT_DARK_ELF, loc, 0, 0, TeamType.NONE, 0)));
+ SPAWNS_DWARF.forEach(loc -> npcs.add(UtilSpawn.npc(EVENT_DWARF, loc, 0, 0, TeamType.NONE, 0)));
+ SPAWNS_ORC.forEach(loc -> npcs.add(UtilSpawn.npc(EVENT_ORC, loc, 0, 0, TeamType.NONE, 0)));
+ SPAWNS_HUMAN.forEach(loc -> npcs.add(UtilSpawn.npc(EVENT_HUMAN, loc, 0, 0, TeamType.NONE, 0)));
+ SPAWNS_HUMAN.forEach(loc -> npcs.add(UtilSpawn.npc(EVENT_HUMAN, loc, 0, 0, TeamType.NONE, 0)));
+ }, 5000);
+
+ break;
+ case END:
+ // remove npc spawns
+ npcs.stream().filter(npc -> npc.getInstance() != null).forEach(npc -> npc.getInstance().deleteMe());
+ npcs.clear();
+ break;
+ }
+ }
+
+ @Override
+ public void onEnterWorld(PlayerHolder ph)
+ {
+ UtilMessage.sendAnnounceMsg(MESSAGE_START, ph);
+ }
+
+ @Override
+ public void onKill(CharacterHolder killer, CharacterHolder victim, boolean isPet)
+ {
+ if (Util.areObjectType(L2MonsterInstance.class, victim))
+ {
+ var itemId = 0;
+
+ var chance = Rnd.get(100);
+ if (chance < 10)
+ {
+ itemId = LETTER_A;
+ }
+ else if (chance < 10)
+ {
+
+ }
+ }
+ }
+}
Index: src/main/engine/npc/NpcBufferScheme.java
===================================================================
--- src/main/engine/npc/NpcBufferScheme.java (revision 1154)
+++ src/main/engine/npc/NpcBufferScheme.java (working copy)
@@ -328,7 +328,7 @@
  {
  if (UtilInventory.getItemsCount(ph, CONSUMABLE_ID) < BUFF_PRICE)
  {
- showText(ph, "Sorry", "You don't have the enough items:<br>You need: <font color=LEVEL>" + BUFF_PRICE + " " + getItemNameHtml(CONSUMABLE_ID) + "!", false, "0", "0");
+ showText(ph, "Sorry", "You don't have the enough items:<br>You need: <font color=\"LEVEL\">" + BUFF_PRICE + "</font> " + getItemNameHtml(CONSUMABLE_ID) + "!", false, "0", "0");
  return;
  }
  final boolean getPetbuff = isPetBuff(ph);
@@ -363,7 +363,7 @@
  {
  if (UtilInventory.getItemsCount(ph, CONSUMABLE_ID) < BUFF_REMOVE_PRICE)
  {
- showText(ph, "Sorry", "You don't have the enough items:<br>You need: <font color=LEVEL>" + BUFF_REMOVE_PRICE + " " + getItemNameHtml(CONSUMABLE_ID) + "!", false, "0", "0");
+ showText(ph, "Sorry", "You don't have the enough items:<br>You need: <font color=\"LEVEL\">" + BUFF_REMOVE_PRICE + "</font> " + getItemNameHtml(CONSUMABLE_ID) + "!", false, "0", "0");
  return;
  }
  final boolean getPetbuff = isPetBuff(ph);
@@ -433,7 +433,7 @@
  {
  if (UtilInventory.getItemsCount(ph, CONSUMABLE_ID) < SCHEME_BUFF_PRICE)
  {
- showText(ph, "Sorry", "You don't have the enough items:<br>You need: <font color=LEVEL>" + SCHEME_BUFF_PRICE + " " + getItemNameHtml(CONSUMABLE_ID) + "!", false, "0", "0");
+ showText(ph, "Sorry", "You don't have the enough items:<br>You need: <font color=\"LEVEL\">" + SCHEME_BUFF_PRICE + "</font> " + getItemNameHtml(CONSUMABLE_ID) + "!", false, "0", "0");
  return;
  }
  }
@@ -487,7 +487,7 @@
  {
  if (UtilInventory.getItemsCount(ph, CONSUMABLE_ID) < cost)
  {
- showText(ph, "Sorry", "You don't have the enough items:<br>You need: <font color=LEVEL>" + cost + " " + getItemNameHtml(CONSUMABLE_ID) + "!", false, "0", "0");
+ showText(ph, "Sorry", "You don't have the enough items:<br>You need: <font color=\"LEVEL\">" + cost + "</font> " + getItemNameHtml(CONSUMABLE_ID) + "!", false, "0", "0");
  return;
  }
  }
@@ -496,7 +496,7 @@
  {
  if (UtilInventory.getItemsCount(ph, skill.getItemConsumeId()) < skill.getItemConsumeCount())
  {
- showText(ph, "Sorry", "You don't have the enough items:<br>You need: <font color=LEVEL>" + skill.getItemConsumeCount() + " " + getItemNameHtml(skill.getItemConsumeId()) + "!", false, "0", "0");
+ showText(ph, "Sorry", "You don't have the enough items:<br>You need: <font color=\"LEVEL\">" + skill.getItemConsumeCount() + "</font> " + getItemNameHtml(skill.getItemConsumeId()) + "!", false, "0", "0");
  return;
  }
  }
@@ -556,7 +556,7 @@
  {
  if (UtilInventory.getItemsCount(ph, CONSUMABLE_ID) < BUFF_SET_PRICE)
  {
- showText(ph, "Sorry", "You don't have the enough items:<br>You need: <font color=LEVEL>" + BUFF_SET_PRICE + " " + getItemNameHtml(CONSUMABLE_ID) + "!", false, "0", "0");
+ showText(ph, "Sorry", "You don't have the enough items:<br>You need: <font color=\"LEVEL\">" + BUFF_SET_PRICE + " " + getItemNameHtml(CONSUMABLE_ID) + "</font>!", false, "0", "0");
  return;
  }
  }
@@ -623,7 +623,7 @@
  // Sacamos restriccion de vip
  if (ph.getInstance().getLevel() < MIN_LEVEL)
  {
- showText(ph, "Info", "Your level is too low!<br>You have to be at least level <font color=LEVEL>" + MIN_LEVEL + "</font>,<br>to use my services!", false, "Return", "main");
+ showText(ph, "Info", "Your level is too low!<br>You have to be at least level <font color=\"LEVEL\">" + MIN_LEVEL + "</font>,<br>to use my services!", false, "Return", "main");
  return true;
  }
  else if (ph.getInstance().isInCombat())
@@ -702,9 +702,9 @@
  hb.append("<center>");
 
  hb.append(Html.image(L2UI.SquareWhite, 264, 1));
- hb.append("<table width=275 border=0 cellspacing=0 cellpadding=1 bgcolor=000000>");
+ hb.append("<table width=275 border=0 cellspacing=0 cellpadding=1 bgcolor=\"000000\">");
  hb.append("<tr>");
- hb.append("<td align=center><font color=FFFF00>Buffs:</font></td>");
+ hb.append("<td align=center><font color=\"FFFF00\">Buffs:</font></td>");
  hb.append("</tr>");
  hb.append("</table>");
  hb.append(Html.image(L2UI.SquareWhite, 264, 1));
@@ -750,9 +750,9 @@
  hb.append("</table>");
  // ---------------------------------------------------------------------------------------------
  hb.append(Html.image(L2UI.SquareWhite, 264, 1));
- hb.append("<table width=275 border=0 cellspacing=0 cellpadding=1 bgcolor=000000>");
+ hb.append("<table width=275 border=0 cellspacing=0 cellpadding=1 bgcolor=\"000000\">");
  hb.append("<tr>");
- hb.append("<td align=center><font color=FFFF00>Preset:</font></td>");
+ hb.append("<td align=center><font color=\"FFFF00\">Preset:</font></td>");
  hb.append("</tr>");
  hb.append("</table>");
  hb.append(Html.image(L2UI.SquareWhite, 264, 1));
@@ -764,12 +764,12 @@
  hb.append("</tr>");
  hb.append("</table>");
 
- hb.append("");
+ // hb.append("");
  // generate html scheme
  hb.append(generateScheme(player));
 
  hb.append("<br>");
- hb.append("<font color=303030>" + TITLE_NAME + "</font>");
+ hb.append("<font color=\"303030\">" + TITLE_NAME + "</font>");
  hb.append("</center>");
  hb.append(Html.END);
 
@@ -783,11 +783,8 @@
  var hb = new HtmlBuilder(HtmlType.HTML);
  hb.append("<br1>");
  hb.append(Html.image(L2UI.SquareWhite, 264, 1));
- hb.append("<table width=271 border=0 cellspacing=0 cellpadding=1 bgcolor=000000>");
- hb.append("<tr>");
- hb.append("<td align=center><font color=FFFF00>Scheme:</font></td>");
- hb.append("<td align=right><font color=LEVEL></font></td>");
- hb.append("</tr>");
+ hb.append("<table width=271 bgcolor=\"000000\">");
+ hb.append("<tr><td align=center><font color=\"FFFF00\">Scheme:</font></td></tr>");
  hb.append("</table>");
  hb.append(Html.image(L2UI.SquareWhite, 264, 1));
 
@@ -910,13 +907,13 @@
  hb.append(Html.head("BUFFER"));
  hb.append("<center>");
  hb.append("<br>");
- hb.append("<font color=LEVEL>", type, "</font>");
+ hb.append("<font color=\"LEVEL\">", type, "</font>");
  hb.append("<br>", text, "<br>");
  if (buttonEnabled)
  {
  hb.append("<button value=\"" + buttonName + "\" action=\"bypass -h Engine NpcBufferScheme redirect_", location, " 0 0\" width=75 height=21  back=", L2UI_CH3.Btn1_normalOn, " fore=", L2UI_CH3.Btn1_normal, ">");
  }
- hb.append("<font color=303030>", TITLE_NAME, "</font></center>");
+ hb.append("<font color=\"303030\">", TITLE_NAME, "</font></center>");
  hb.append(Html.END);
  sendHtml(null, hb, ph);
  }
@@ -941,7 +938,7 @@
  hb.append("<br>Do you really want to delete '" + eventParam1 + "' scheme?<br><br>");
  hb.append("<button value=\"Yes\" action=\"bypass -h Engine NpcBufferScheme delete " + eventParam1 + "\" width=75 height=21 back=" + L2UI_CH3.Btn1_normalOn + " fore=" + L2UI_CH3.Btn1_normal + ">");
  hb.append("<button value=\"No\" action=\"bypass -h Engine NpcBufferScheme delete_1\" width=75 height=21 back=" + L2UI_CH3.Btn1_normalOn + " fore=" + L2UI_CH3.Btn1_normal + "><br>");
- hb.append("<font color=303030>" + TITLE_NAME + "</font></center></body></html>");
+ hb.append("<font color=\"303030\">" + TITLE_NAME + "</font></center></body></html>");
  hb.append(Html.END);
 
  sendHtml(null, hb, ph);
@@ -966,7 +963,7 @@
  hb.append("<br>");
  hb.append("<button value=\"Back\" action=\"bypass -h Engine NpcBufferScheme redirect_main\" width=75 height=21 back=", L2UI_CH3.Btn1_normalOn, " fore=", L2UI_CH3.Btn1_normal, ">");
  hb.append("<br>");
- hb.append("<font color=303030>", TITLE_NAME, "</font>");
+ hb.append("<font color=\"303030\">", TITLE_NAME, "</font>");
  hb.append("</center>");
  hb.append(Html.END);
  sendHtml(null, hb, ph);
@@ -990,7 +987,7 @@
  hb.append("<br>");
  hb.append("<button value=\"Back\" action=\"bypass -h Engine NpcBufferScheme redirect_main\" width=75 height=21 back=", L2UI_CH3.Btn1_normalOn, " fore=", L2UI_CH3.Btn1_normal, ">");
  hb.append("<br>");
- hb.append("<font color=303030>" + TITLE_NAME + "</font>");
+ hb.append("<font color=\"303030\">" + TITLE_NAME + "</font>");
  hb.append("</center>");
  hb.append(Html.END);
 
@@ -1016,7 +1013,7 @@
  hb.append("<br>");
  hb.append("<button value=\"Back\" action=\"bypass -h Engine NpcBufferScheme redirect_main\" width=75 height=21 back=", L2UI_CH3.Btn1_normalOn, " fore=", L2UI_CH3.Btn1_normal, ">");
  hb.append("<br>");
- hb.append("<font color=303030>" + TITLE_NAME + "</font>");
+ hb.append("<font color=\"303030\">" + TITLE_NAME + "</font>");
  hb.append("</center>");
  hb.append(Html.END);
 
@@ -1080,13 +1077,13 @@
  {
  if (FREE_BUFFS)
  {
- hb.append("All buffs are for <font color=LEVEL>free</font>!");
+ hb.append("All buffs are for <font color=\"LEVEL\">free</font>!");
  }
  else
  {
  int price = BUFF_PRICE;
 
- hb.append("All special buffs cost <font color=LEVEL>" + Html.formatAdena(price) + "</font> adena!");
+ hb.append("All special buffs cost <font color=\"LEVEL\">" + Html.formatAdena(price) + "</font> adena!");
  }
  hb.append("<br1>");
 
@@ -1109,7 +1106,7 @@
  continue;
  }
 
- hb.append("<table width=264", count % 2 == 0 ? " bgcolor=000000>" : ">");
+ hb.append("<table width=264", count % 2 == 0 ? " bgcolor=\"000000\">" : ">");
  String name = bh.getSkill().getName().replace("+", " ");
  hb.append("<tr>");
  hb.append("<td height=32 fixwidth=32>", getSkillIconHtml(bh.getId(), bh.getLevel()), "</td>");
@@ -1124,7 +1121,7 @@
 
  hb.append("<center>");
  hb.append(Html.image(L2UI.SquareWhite, 264, 1));
- hb.append("<table bgcolor=000000>");
+ hb.append("<table bgcolor=\"000000\">");
  hb.append("<tr>");
 
  int currentPage = 1;
@@ -1145,7 +1142,7 @@
  hb.append("<br>");
  hb.append("<button value=\"Back\" action=\"bypass -h Engine NpcBufferScheme redirect_main\" width=75 height=21 back=", L2UI_CH3.Btn1_normalOn, " fore=", L2UI_CH3.Btn1_normal, ">");
  hb.append("<br>");
- hb.append("<font color=303030>", TITLE_NAME, "</font>");
+ hb.append("<font color=\"303030\">", TITLE_NAME, "</font>");
  hb.append("</center>");
  hb.append(Html.END);
 
@@ -1218,7 +1215,7 @@
 
  if (action.equals("add"))
  {
- hb.append("You can add <font color=LEVEL>", MAX_SCHEME_BUFFS - BUFF_COUNT, "</font> Buffs and <font color=LEVEL>", MAX_SCHEME_DANCES - DANCE_SONG, "</font> Dances more!");
+ hb.append("You can add <font color=\"LEVEL\">", MAX_SCHEME_BUFFS - BUFF_COUNT, "</font> Buffs and <font color=\"LEVEL\">", MAX_SCHEME_DANCES - DANCE_SONG, "</font> Dances more!");
 
  for (BuffHolder bh : SchemeBufferPredefinedData.getAllGeneralBuffs())
  {
@@ -1243,7 +1240,7 @@
  }
  else if (action.equals("remove"))
  {
- hb.append("You have <font color=LEVEL>", BUFF_COUNT, "</font> Buffs and <font color=LEVEL>", DANCE_SONG, "</font> Dances");
+ hb.append("You have <font color=\"LEVEL\">", BUFF_COUNT, "</font> Buffs and <font color=\"LEVEL\">", DANCE_SONG, "</font> Dances");
 
  String buffList = getValueDB(ph.getObjectId(), schemeName).getString();
  if (buffList == null)
@@ -1266,7 +1263,7 @@
  throw new RuntimeException();
  }
 
- hb.append("<br1>", Html.image(L2UI.SquareWhite, 264, 1), "<table border=0 bgcolor=000000><tr>");
+ hb.append("<br1>", Html.image(L2UI.SquareWhite, 264, 1), "<table border=0 bgcolor=\"000000\"><tr>");
  final int buffsPerPage = 10;
  final String width;
  int pc = (buffs.size() - 1) / buffsPerPage + 1;
@@ -1286,7 +1283,7 @@
  // creamos la botonera con las paginas
  if (ii == Integer.parseInt(page))
  {
- hb.append("<td width=", width, " align=center><font color=LEVEL>", ii, "</font></td>");
+ hb.append("<td width=", width, " align=center><font color=\"LEVEL\">", ii, "</font></td>");
  }
  else if (action.equals("add"))
  {
@@ -1326,7 +1323,7 @@
  }
  else
  {
- hb.append("<br1>", Html.image(L2UI.SquareGray, 264, 1), "<table border=0 bgcolor=000000>");
+ hb.append("<br1>", Html.image(L2UI.SquareGray, 264, 1), "<table border=0 bgcolor=\"000000\">");
  }
 
  hb.append("<tr>");
@@ -1346,7 +1343,7 @@
  }
  else
  {
- hb.append("<br1>", Html.image(L2UI.SquareGray, 264, 1), "<table border=0 bgcolor=000000>");
+ hb.append("<br1>", Html.image(L2UI.SquareGray, 264, 1), "<table border=0 bgcolor=\"000000\">");
  }
  hb.append("<tr>");
  hb.append("<td width=35>", getSkillIconHtml(id, level), "</td>");
@@ -1361,7 +1358,7 @@
  hb.append("<button value=Back action=\"bypass -h Engine NpcBufferScheme manage_scheme_select ", schemeName, "\" width=75 height=21 back=", L2UI_CH3.Btn1_normalOn, " fore=", L2UI_CH3.Btn1_normal, ">");
  hb.append("<button value=Home action=\"bypass -h Engine NpcBufferScheme redirect_main\" width=75 height=21 back=", L2UI_CH3.Btn1_normalOn, " fore=", L2UI_CH3.Btn1_normal, ">");
  hb.append("<br>");
- hb.append("<font color=303030>", TITLE_NAME, "</font>");
+ hb.append("<font color=\"303030\">", TITLE_NAME, "</font>");
  hb.append("</center>");
  hb.append(Html.END);
 
Index: src/main/util/builders/html/Html.java
===================================================================
--- src/main/util/builders/html/Html.java (revision 1154)
+++ src/main/util/builders/html/Html.java (working copy)
@@ -21,7 +21,7 @@
 
  public static String fontColor(String color, String text)
  {
- return "<font color=" + color + ">" + text + "</font>";
+ return "<font color=\"" + color + "\">" + text + "</font>";
  }
 
  public static String image(String image, int width, int height)
@@ -35,7 +35,7 @@
  hb.append("<center>");
  hb.append("<br>");
  hb.append(image(L2UI_CH3.br_bar2_mp, 264, 1));
- hb.append("<table width=264 height=32 bgcolor=000000 cellspacing=0 cellpadding=0 border=0>");// 3A5B87
+ hb.append("<table width=264 height=32 bgcolor=\"000000\" cellspacing=0 cellpadding=0 border=0>");// 3A5B87
  hb.append("<tr>");
  hb.append("<td align=center>", name, "</td>");
  hb.append("</tr>");
@@ -52,7 +52,7 @@
  hb.append("<center>");
  hb.append("<br>");
  hb.append(image(L2UI_CH3.br_bar2_mp, 600, 1));
- hb.append("<table width=600 height=32 bgcolor=000000 cellspacing=0 cellpadding=0 border=0>");// 3A5B87
+ hb.append("<table width=600 height=32 bgcolor=\"000000\" cellspacing=0 cellpadding=0 border=0>");// 3A5B87
  hb.append("<tr>");
  hb.append("<td align=center>", name, "</td>");
  hb.append("</tr>");
@@ -95,7 +95,7 @@
  hb.append("<br>");
 
  hb.append(image(L2UI_CH3.br_bar2_mp, 280, 1));
- hb.append("<table width=280 bgcolor=000000>");
+ hb.append("<table width=280 bgcolor=\"000000\">");
  hb.append("<tr>");
  hb.append("<td width=16 align=center></td>");
  hb.append("<td width=214 align=center>Player</td>");
@@ -108,7 +108,7 @@
  for (Entry<String, Integer> entry : pointsOrdered.entrySet())
  {
  cont++;
- hb.append("<table width=280", cont % 2 == 0 ? " bgcolor=000000>" : ">");
+ hb.append("<table width=280", cont % 2 == 0 ? " bgcolor=\"000000\">" : ">");
  hb.append("<tr>");
  hb.append("<td width=16 height=22 align=center>", image(POS[cont - 1], 16, 16), "</td>");
  hb.append("<td width=214 align=center>", entry.getKey(), "</td>");

andres14

  • Jr. Member
  • **
  • Mensajes: 62
  • Karma: +0/-0
    • Ver Perfil
Re:Bug en Scheme de Buffer
« Respuesta #2 en: Octubre 25, 2018, 11:54:02 am »
Despues de instalar el parche me sale este error en la consola y no deja terminar de cargar el gameserver. Como lo aplique: le di a copiar todo el codigo luego cree un archivo .txt, pegue dentro el codigo y luego le cambie la extension a .diff.
Hecho eso fui a Eclipse y aplique el parche. Por si las dudas lo instale mal.

fissban

  • Administrador
  • Full Member
  • *
  • Mensajes: 196
  • Karma: +0/-0
    • Ver Perfil
Re:Bug en Scheme de Buffer
« Respuesta #3 en: Octubre 25, 2018, 05:35:58 pm »
Actualiza tambien el server.jar

andres14

  • Jr. Member
  • **
  • Mensajes: 62
  • Karma: +0/-0
    • Ver Perfil
Re:Bug en Scheme de Buffer
« Respuesta #4 en: Octubre 25, 2018, 08:47:21 pm »
Ok haré eso!

andres14

  • Jr. Member
  • **
  • Mensajes: 62
  • Karma: +0/-0
    • Ver Perfil
Re:Bug en Scheme de Buffer
« Respuesta #5 en: Octubre 25, 2018, 11:50:14 pm »
Bueno pude correr el servidor pero igualmente el buffer sigue tirando critico al momento de borrar un scheme,no hay problema igual se puede eliminar el boton y listo,no es algo grave. En lugar de borrar solo editan el que ya tienen. No te preocupes por estas pequeñeces Fiss