Mostrar Mensajes

Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.


Mensajes - fissban

Páginas: [1] 2 3 4 5 6 7
1
Issues / Re:Error de Attack
« en: Hoy a las 01:33:31 am »
Al parecer el error se genera al usar root o silence sobre un mob q tiene minions.
proba este "parche" y decime si va todo con normalidad.

Código
Index: java/net/sf/l2j/gameserver/model/actor/ai/AttackableAI.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/ai/AttackableAI.java (revision 1091)
+++ java/net/sf/l2j/gameserver/model/actor/ai/AttackableAI.java (working copy)
@@ -1079,6 +1079,14 @@
 
  private void callMinions(L2Attackable me, L2Character attacker)
  {
+ if (attacker == null)
+ {
+ if (me.getMostHated() == null)
+ {
+ return;
+ }
+ attacker = me.getMostHated();
+ }
  // If this attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle
  if (me instanceof L2MonsterInstance)
  {

2
Issues / Re:What Java Version using for L2Jadmin
« en: Mayo 17, 2018, 11:58:42 pm »
confirmo lo que dice @Carlos2200, ahora usamos java 10 en el servidor.
Debes tener tu versión de "Eclipse" actualizado para poder trabajar con esta versión, cualquier problema para actualizarte solo avísame que te guió en el proceso.

Hablando sobre las variables "var" en java10 para las variables de tipo local no es necesario indicar el tipo ya que al inicializarlas es mas que obvio y del cambio se encarga el compilador.

Citar
java9 o menor:
List<String> list = new ArrayList<>();
java10:
var list = new ArrayList<String>();

Citar
java9 o menor:
String text = "fissban te amo";
java10:
var text = "fissban te amo";

3
Issues / Re:Error de Consola
« en: Mayo 15, 2018, 04:44:23 am »
acabo de subir unos ajustes sobre este tema, espero tu confirmacion para dar el tema por cerrado o no xD

4
Issues / Re:Some issues!
« en: Mayo 14, 2018, 04:17:45 am »

5
General / Re:Consulta - Plataforma Java
« en: Mayo 13, 2018, 08:06:00 pm »
Entiendo tu preocupación pero ya puedo decirte que no tiene nada que ver la version de java que se use.
Aun no eh recivido informes de que alguien halla tenido problemas en ese campo con el pack pero de tenerlos me pondre q trabajar tan rapido como sea posible para solucionarlo

6
Issues / Re:Bugg - Consumo de Key's
« en: Mayo 12, 2018, 07:38:11 am »
prueba esto por favor

Código
Index: java/net/sf/l2j/gameserver/handler/item/ItemChestKey.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/item/ItemChestKey.java (revision 1060)
+++ java/net/sf/l2j/gameserver/handler/item/ItemChestKey.java (working copy)
@@ -78,6 +78,8 @@
  return;
  }
 
+ // destroy key
+ activeChar.getInventory().destroyItem("open chest", item, activeChar, false);
  // box key skill
  activeChar.useMagic(SkillData.getInstance().getSkill(2229, item.getId() - 6664), false, false);
  }

7
Issues / Re:Consulta - Enchant Skills
« en: Mayo 11, 2018, 03:35:52 pm »
sin codear? la forma sencilla es que los personajes cambien a la sub a la q pertenece el skill a encantar, de esta forma no se borran

8
Issues / Re:Granboss HP
« en: Mayo 11, 2018, 09:11:50 am »
por favor actualiza y vuelve a chequearlo, ya deberia estar solucionado

9
Issues / Re:Problema (SUMMONS) Rev: 1060
« en: Mayo 11, 2018, 09:11:26 am »
por favor actualiza y vuelve a chequearlo, ya deberia estar solucionado

10
Issues / Re:.Sellbuff (Problema) Rev: 1053 L2jAdmins
« en: Mayo 10, 2018, 04:49:30 am »
aun no termino pero si quieres puedes darle una mirada de como va quedando

Código
Index: src/main/engine/mods/OfflineShop.java
===================================================================
--- src/main/engine/mods/OfflineShop.java (revision 1051)
+++ src/main/engine/mods/OfflineShop.java (working copy)
@@ -79,7 +79,7 @@
  else if (ObjectData.get(PlayerHolder.class, player).isSellBuff() && ConfigData.OFFLINE_SELLBUFF_ENABLE)
  {
  title = "SellBuff"; // TODO You could add to save this data as something custom.
- storeItems += ObjectData.get(PlayerHolder.class, player).getSellBuffPrice();
+ // storeItems += ObjectData.get(PlayerHolder.class, player).getSellBuffPrice();
  storeType = "SELL_BUFF";
  saveValue = true;
  }
@@ -87,7 +87,7 @@
  if (saveValue)
  {
  // saved state and items in memory
- setValueDB(player.getObjectId(), "offlineShop", storeType + "#" + ((title == null) || (title.length() == 0) ? "null" : title.replaceAll("#", " ")) + "#" + storeItems);
+ setValueDB(player.getObjectId(), "offlineShop", storeType + "#" + (title == null || title.length() == 0 ? "null" : title.replaceAll("#", " ")) + "#" + storeItems);
  }
  }
  catch (Exception e)
@@ -142,7 +142,7 @@
  }
 
  // Handle removal from olympiad game
- if (OlympiadManager.getInstance().isRegistered(player) || (player.getOlympiadGameId() != -1))
+ if (OlympiadManager.getInstance().isRegistered(player) || player.getOlympiadGameId() != -1)
  {
  OlympiadManager.getInstance().removeDisconnectedCompetitor(player);
  }
Index: src/main/engine/mods/SellBuffs.java
===================================================================
--- src/main/engine/mods/SellBuffs.java (revision 1051)
+++ src/main/engine/mods/SellBuffs.java (working copy)
@@ -33,7 +33,6 @@
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 import net.sf.l2j.gameserver.model.actor.instance.enums.TeamType;
 import net.sf.l2j.gameserver.model.skills.Skill;
-import net.sf.l2j.gameserver.model.skills.enums.SkillTargetType;
 import net.sf.l2j.gameserver.model.skills.enums.SkillType;
 import net.sf.l2j.gameserver.model.world.L2World;
 import net.sf.l2j.gameserver.model.zone.enums.ZoneType;
@@ -44,7 +43,7 @@
  */
 public class SellBuffs extends AbstractMod
 {
- private static final int MAX_SKILL_PER_PAGE = 12;
+ private static final int MAX_SKILL_PER_PAGE = 11;
 
  public SellBuffs()
  {
@@ -67,7 +66,7 @@
  return true;
  }
 
- ph.setSellBuff(false, 0);
+ ph.setSellBuff(false);
 
  ph.getInstance().standUp();
  ph.getInstance().setIsImmobilized(false);
@@ -88,17 +87,17 @@
  hb.append("<html><body><center>");
  hb.append(Html.head("SELL BUFF"));
  hb.append("<font color=LEVEL>Welcome </font><font color=00C3FF>", ph.getName(), "</font> system selling buffs.<br1>");
- hb.append("You can only sell buffs if your class<br1>");
+ hb.append("<br1>");
  hb.append("is the type of support.<br1>");
- hb.append("All your buffs will be sold at a single price.<br1>");
- hb.append("To cancel this state should use<br1>");
- hb.append("the command. <font color=LEVEL>CancelSellBuffs</font>");
+ hb.append("You can sell your buffs at the price you want,");
+ hb.append("those to which you do not define a price will not be sold.");
+ hb.append("<br1>");
+ hb.append("To cancel this state should use the command<br1>");
+ hb.append("<font color=LEVEL>CancelSellBuffs</font>");
  hb.append("<br><br>");
- hb.append("<font color=00C3FF>Choose the price of your services</font>");
- hb.append("<br>");
- hb.append("<edit var=price width=200 height=15>");
+ hb.append("<font color=00C3FF>Do you want to continue?</font>");
  hb.append("<br>");
- hb.append("<button value=Next action=\"bypass -h Engine SellBuffs sell $price\" width=80 height=25 back=L2UI_CH3.Btn1_normalOn fore=L2UI_CH3.btn1_normal>");
+ hb.append("<button value=START action=\"bypass -h Engine SellBuffs start\" width=80 height=25 back=L2UI_CH3.Btn1_normalOn fore=L2UI_CH3.btn1_normal>");
  hb.append("</center></body></html>");
  sendHtml(null, hb, ph);
  return true;
@@ -131,19 +130,9 @@
  getBuffList(ph, ph.getTarget(), page);
  break;
  }
- case "sell": // sit to sell buffs
+ case "finish": // sit to sell buffs
  {
- int price = 0;
- try
- {
- price = Integer.parseInt(st.nextToken());
- }
- catch (Exception e)
- {
- //
- }
-
- ph.setSellBuff(true, price);
+ ph.setSellBuff(true);
 
  ph.getInstance().sitDown();
  ph.getInstance().setIsImmobilized(true);
@@ -172,13 +161,19 @@
  return;
  }
 
- // Check if target get skill
- if (sellerBuff.getSkillLevel(id) != lvl)
+ // prevent bypass exploit
+ if (sellerBuff.getSkillLevel(id) == -1 && sellerBuff.getSkillLevel(id) != lvl)
  {
  return;
  }
 
- int price = phSeller.getSellBuffPrice();
+ int price = phSeller.getSellBuffPrice(id);
+
+ // prevent bypass exploit
+ if (price == -1)
+ {
+ return;
+ }
 
  if (!ph.getInstance().getInventory().reduceAdena("sell buff", price, sellerBuff, true))
  {
@@ -205,9 +200,100 @@
  getBuffList(ph, phSeller, page);
  break;
  }
+ case "start":
+ {
+ int page = st.hasMoreTokens() ? Integer.parseInt(st.nextToken()) : 1;
+
+ startHtml(ph, page);
+ break;
+ }
+ case "set":
+ {
+ try
+ {
+ int skillId = Integer.parseInt(st.nextToken());
+ int price = Integer.parseInt(st.nextToken());
+
+ ph.setSellBuffPrice(skillId, price);
+ }
+ catch (Exception e)
+ {
+ UtilMessage.sendCreatureMsg(ph, SayType.TELL, "sellbuff", "Wrong price!!!!!");
+ }
+ startHtml(ph, 1);
+ break;
+ }
  }
  }
 
+ private void startHtml(PlayerHolder ph, int page)
+ {
+ HtmlBuilder hb = new HtmlBuilder();
+ hb.append(Html.START);
+ hb.append(Html.head("SELL BUFF"));
+ hb.append("<br>");
+ hb.append("<center>");
+ hb.append("<table border=0 cellspacing=0 cellpadding=0>");
+
+ int searchPage = MAX_SKILL_PER_PAGE * (page - 1);
+ int skillCount = 0;
+
+ int count = 0;
+ for (Skill sk : ((L2Character) ph.getInstance()).getSkills().values())
+ {
+ if (!checkSkil(sk))
+ {
+ continue;
+ }
+
+ count++;
+
+ // min
+ if (skillCount < searchPage)
+ {
+ skillCount++;
+ continue;
+ }
+ // max
+ if (skillCount >= searchPage + MAX_SKILL_PER_PAGE)
+ {
+ continue;
+ }
+ int price = ph.getSellBuffPrice(sk.getId());
+
+ hb.append("<tr>");
+ hb.append("<td width=64 align=center><font color=LEVEL>price: ", Html.formatAdena(price), "</font></td>");
+ hb.append("<td width=32 align=center><img src=\"", SkillInfoData.getSkillIcon(sk.getId()), "\" width=32 height=25></td>");
+ hb.append("<td width=50 align=center><edit var=price" + sk.getId() + " width=50 height=25></td>");
+ hb.append("<td width=80 align=center><button value=Set action=\"bypass -h Engine SellBuffs set " + sk.getId() + " $price" + sk.getId() + "\" width=80 height=25 back=L2UI_CH3.Btn1_normalOn fore=L2UI_CH3.btn1_normal></td>");
+ hb.append("</tr>");
+ }
+ hb.append("</table>");
+ hb.append("<br><button value=Set action=\"bypass -h Engine SellBuffs finish\" width=80 height=25 back=L2UI_CH3.Btn1_normalOn fore=L2UI_CH3.btn1_normal>");
+
+ hb.append("<img src=L2UI.SquareGray width=264 height=1>");
+ hb.append("<table bgcolor=000000>");
+ hb.append("<tr>");
+
+ int currentPage = 1;
+
+ for (int i = 0; i < count; i++)
+ {
+ if (i % MAX_SKILL_PER_PAGE == 0)
+ {
+ hb.append("<td width=18 align=center><a action=\"bypass -h Engine SellBuffs start " + currentPage + "\">" + currentPage + "</a></td>");
+ currentPage++;
+ }
+ }
+
+ hb.append("</tr>");
+ hb.append("</table>");
+ hb.append("<img src=L2UI.SquareGray width=264 height=1>");
+ hb.append("</center>");
+ hb.append(Html.END);
+ sendHtml(null, hb, ph);
+ }
+
  @Override
  public boolean onInteract(PlayerHolder ph, CharacterHolder sellerBuff)
  {
@@ -235,7 +321,7 @@
  hb.append("<center>");
  hb.append("<br><br>");
  hb.append("Hello <font color=00C3FF>", ph.getName(), "</font>");
- hb.append("<br><center>My Buff Cost: <font color=\"LEVEL\">", ph.getSellBuffPrice(), "</font> adena each!</center>");
+ hb.append("<br>");
  hb.append("<br>");
  hb.append("<center><button value=\"View my Buffs\" action=\"bypass -h Engine SellBuffs view\" width=80 height=25 back=L2UI_CH3.Btn1_normalOn fore=L2UI_CH3.btn1_normal>");
  hb.append("</center>");
@@ -260,7 +346,7 @@
  hb.append("<br><br>");
  hb.append("<center>");
  hb.append("<font color=LEVEL>Hello </font><font color=00C3FF>", ph.getName(), "</font><font color=LEVEL> want my Buff!</font>");
- hb.append("<br>My Buff Cost: <font color=00C3FF>", ph.getSellBuffPrice(), "</font><font color=LEVEL> adena each!</font><br>");
+ hb.append("<br>");
 
  int searchPage = MAX_SKILL_PER_PAGE * (page - 1);
  int skillCount = 0;
@@ -268,7 +354,7 @@
  int count = 0;
  for (Skill sk : ((L2Character) sellerBuff.getInstance()).getSkills().values())
  {
- if (sk.isPassive() || sk.getTargetType() == SkillTargetType.TARGET_SELF || sk.isOffensive() || sk.getSkillType() != SkillType.BUFF)
+ if (!checkSkil(sk))
  {
  continue;
  }
@@ -287,10 +373,17 @@
  continue;
  }
 
+ int price = ((PlayerHolder) sellerBuff).getSellBuffPrice(sk.getId());
+
+ if (price == -1)
+ {
+ continue;
+ }
+
  hb.append("<table>");
  hb.append("<tr>");
  hb.append("<td width=32 align=center><img src=\"", SkillInfoData.getSkillIcon(sk.getId()), "\" width=32 height=16></td>");
- hb.append("<td width=180 align=center><a action=\"bypass -h Engine SellBuffs buy ", sk.getId(), " ", sk.getLevel(), " ", ((PlayerHolder) sellerBuff).getName(), " ", page, "\">", sk.getName(), "</td>");
+ hb.append("<td width=180 align=center><a action=\"bypass -h Engine SellBuffs buy ", sk.getId(), " ", sk.getLevel(), " ", ((PlayerHolder) sellerBuff).getName(), " ", page, "\">", sk.getName(), " (", price, ")</td>");
  hb.append("<td width=32 align=center><img src=\"", SkillInfoData.getSkillIcon(sk.getId()), "\" width=32 height=16></td>");
  hb.append("</tr>");
  hb.append("</table>");
@@ -322,4 +415,24 @@
 
  sendHtml(null, hb, ph);
  }
+
+ private boolean checkSkil(Skill sk)
+ {
+ if (sk.isPassive() || sk.isOffensive() || sk.getSkillType() != SkillType.BUFF)
+ {
+ return false;
+ }
+
+ switch (sk.getTargetType())
+ {
+ case TARGET_SELF:
+ case TARGET_PET:
+ case TARGET_CORPSE:
+ case TARGET_CORPSE_PLAYER:
+ case TARGET_CORPSE_PET:
+ return false;
+ }
+
+ return true;
+ }
 }
Index: src/main/holders/objects/PlayerHolder.java
===================================================================
--- src/main/holders/objects/PlayerHolder.java (revision 1051)
+++ src/main/holders/objects/PlayerHolder.java (working copy)
@@ -132,7 +132,8 @@
  // XXX sell buff ------------------------------------------------------------------------------------------------------
 
  private boolean isSellBuff = false;
- private int sellBuffPrice;
+
+ private Map<Integer, Integer> sellBuffs = new HashMap<>();
 
  /**
  * If a character is in sellBuff mode or not
@@ -143,24 +144,28 @@
  return isSellBuff;
  }
 
+ public Integer getSellBuffPrice(int skillId)
+ {
+ if (sellBuffs.containsKey(skillId))
+ {
+ return sellBuffs.get(skillId);
+ }
+ return -1;
+ }
+
+ public void setSellBuffPrice(int skillId, int price)
+ {
+ sellBuffs.put(skillId, price);
+ }
+
  /**
  * The status of a character is defined if it is in sellBuff mode or not.
  * @param isSellBuff
  * @param sellBuffPrice
  */
- public void setSellBuff(boolean isSellBuff, int sellBuffPrice)
+ public void setSellBuff(boolean isSellBuff)
  {
  this.isSellBuff = isSellBuff;
- this.sellBuffPrice = sellBuffPrice;
- }
-
- /**
- * Sale price of sellBuffs.
- * @return
- */
- public int getSellBuffPrice()
- {
- return sellBuffPrice;
  }
 
  // XXX AIO -----------------------------------------------------------------------------------------------------------

11
Issues / Re:Null point html when killing NPC has summon mimion
« en: Mayo 08, 2018, 10:37:55 am »
check this
Código
Index: java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (revision 1054)
+++ java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (working copy)
@@ -333,6 +333,10 @@
  return false;
  }
 
+ if (killer == null)
+ {
+ return true;
+ }
  // Notify the Quest Engine of the L2Attackable death if necessary
  try
  {

12
Issues / Re:Consulta - Lvl de Skills
« en: Mayo 08, 2018, 04:22:15 am »
Hola Fiss, testie la ultima revision y sigue igual, los skilles en cuestion son Servitor Heal, el otro que cura MP del Servitor.

chequear con la ultima version, acabo de aplicar un fix para el tema
https://sourceforge.net/p/l2jadminsc4/code/1058/

14
Issues / Re:Null point html when killing NPC has summon mimion
« en: Mayo 08, 2018, 02:18:25 am »
if you define that parameter inside "doDie" it will give reward to that person when "disappearing" the npc.

Fixed: https://sourceforge.net/p/l2jadminsc4/code/1054/

Thx

15
General / MOVIDO: Bugg - Bss Skilles
« en: Mayo 07, 2018, 11:14:56 pm »

Páginas: [1] 2 3 4 5 6 7