Mensajes recientes

Páginas: [1] 2 3 4 5 6 ... 10
1
Issues / Re:Errores - Eventos de Fin de Mes (Creo)
« Último mensaje por Mordor en Junio 17, 2018, 10:42:02 am »
Buenas, no he modificado nada en cuanto a los html del seven sings, aca te muestro una screem de como lo tengo al sql.

https://ibb.co/fc10Hy
2
Issues / Re:Errores - Eventos de Fin de Mes (Creo)
« Último mensaje por fissban en Junio 17, 2018, 01:59:44 am »
disculpa el retraso.

El primer error parece ser de algun html aunque no veo el problema ya q estos estan bien construidos, has realizado alguna modificacion en los html retails?

El segundo es sobre este query
Código
INSERT INTO olympiad_nobles_eom SELECT char_id, olympiad_points FROM olympiad_nobles
Su funcion es lleavr datos de una tabla a la otra y tanto "olympiad_nobles_eom" como "olympiad_nobles" tienen la misma estructura asique no deberia dar fallos....podrias verificarme esto.
3
Issues / Re:Mal funcionamiento en skills restringidos a "UNDEADS"
« Último mensaje por canonmagic en Junio 16, 2018, 02:43:27 pm »
Funciono perfectamente   :), gracias nuevamente por tu atencion fissban; ya te aviso si consigo algun otro problema mientras sigo testeandolo.
4
Issues / Mal funcionamiento en skills
« Último mensaje por canonmagic en Junio 16, 2018, 01:22:40 pm »
PD: estuve probando todos los skills y encontre problemas con: "Peace y Charm" que deberian hacer que los mob detengan su ataque y por mas que lo lanze siguen atacando; "Armor crush" el cual no funciona con espada a 2 manos y mazo a 2 manos; "Madness" que no causa ninguna confusion en los mob; "Seal mirage", el cual no lanza la habilidad al presionarla y con el Summon Big Boom el cual no activa su explosion.
5
Issues / Re:Mal funcionamiento en skills restringidos a "UNDEADS"
« Último mensaje por fissban en Junio 16, 2018, 11:53:25 am »
proba este cambio

Código
Index: java/net/sf/l2j/gameserver/data/NpcData.java
===================================================================
--- java/net/sf/l2j/gameserver/data/NpcData.java (revision 1093)
+++ java/net/sf/l2j/gameserver/data/NpcData.java (working copy)
@@ -31,6 +31,7 @@
 import net.sf.l2j.L2DatabaseFactory;
 import net.sf.l2j.gameserver.model.StatsSet;
 import net.sf.l2j.gameserver.model.actor.base.ClassId;
+import net.sf.l2j.gameserver.model.actor.enums.NpcRaceType;
 import net.sf.l2j.gameserver.model.actor.templates.NpcTemplate;
 import net.sf.l2j.gameserver.model.holder.MinionHolder;
 import net.sf.l2j.gameserver.model.skills.Skill;
@@ -190,12 +191,41 @@
  final int id = rset.getInt("skillid");
  final int level = rset.getInt("level");
 
- if (template.getRace() == 0)
+ if (mobId == 12899)
+ {
+ template.setRace(NpcRaceType.CREATURE_VALAKAS);
+ }
+ else if (template.getRace() == NpcRaceType.NONE)
  {
  if ((id >= 4290) && (id <= 4302))
  {
- template.setRace(id);
- continue;
+ switch (id)
+ {
+ case 4290:
+ template.setRace(NpcRaceType.UNDEAD);
+ break;
+ case 4292:
+ template.setRace(NpcRaceType.BEAST);
+ break;
+ case 4293:
+ template.setRace(NpcRaceType.ANIMAL);
+ break;
+ case 4294:
+ template.setRace(NpcRaceType.PLANT);
+ break;
+ case 4299:
+ template.setRace(NpcRaceType.DRAGON);
+ break;
+ case 4300:
+ template.setRace(NpcRaceType.GIANT);
+ break;
+ case 4301:
+ template.setRace(NpcRaceType.BUG);
+ break;
+ case 4302:
+ template.setRace(NpcRaceType.MAGIC_CREATURE);
+ break;
+ }
  }
  }
 
Index: java/net/sf/l2j/gameserver/handler/skill/SkillDisablers.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/skill/SkillDisablers.java (revision 1091)
+++ java/net/sf/l2j/gameserver/handler/skill/SkillDisablers.java (working copy)
@@ -21,6 +21,7 @@
 import net.sf.l2j.gameserver.model.L2Object;
 import net.sf.l2j.gameserver.model.actor.L2Character;
 import net.sf.l2j.gameserver.model.actor.ai.enums.CtrlEventType;
+import net.sf.l2j.gameserver.model.actor.enums.NpcRaceType;
 import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 import net.sf.l2j.gameserver.model.actor.instance.enums.ShotType;
@@ -157,18 +158,19 @@
  // these skills needs to be rechecked
  if (target instanceof L2MonsterInstance)
  {
- if (Formulas.calcEffectSuccess(activeChar, target, skill, true, false, sps, bss))
+ L2MonsterInstance monster = (L2MonsterInstance) target;
+ if (Formulas.calcEffectSuccess(activeChar, monster, skill, true, false, sps, bss))
  {
  if (skill.getTargetType() == SkillTargetType.TARGET_UNDEAD)
  {
- if (target.isUndead())
+ if (monster.getTemplate().getRace() == NpcRaceType.UNDEAD)
  {
- target.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -((L2MonsterInstance) target).getHating(((L2MonsterInstance) target).getMostHated()));
+ monster.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -((L2MonsterInstance) target).getHating(((L2MonsterInstance) target).getMostHated()));
  }
  }
  else
  {
- target.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -((L2MonsterInstance) target).getHating(((L2MonsterInstance) target).getMostHated()));
+ monster.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -((L2MonsterInstance) target).getHating(((L2MonsterInstance) target).getMostHated()));
  }
  }
  }
Index: java/net/sf/l2j/gameserver/handler/target/TargetAreaCorpseMob.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/target/TargetAreaCorpseMob.java (revision 1091)
+++ java/net/sf/l2j/gameserver/handler/target/TargetAreaCorpseMob.java (working copy)
@@ -60,6 +60,11 @@
 
  L2PcInstance src = activeChar.getActingPlayer();
 
+ if (src == null)
+ {
+ return EMPTY_TARGET_LIST;
+ }
+
  for (L2Character obj : target.getKnownList().getObjectTypeInRadius(L2Character.class, skill.getSkillRadius()))
  {
  if (!((obj instanceof L2Attackable) || (obj instanceof L2Playable)) || obj.isDead() || (obj == activeChar))
@@ -67,66 +72,63 @@
  continue;
  }
 
- if (src != null)
+ if (!GeoEngine.getInstance().canSeeTarget(target, obj))
+ {
+ continue;
+ }
+
+ L2PcInstance trg = obj.getActingPlayer();
+
+ if (trg != null)
  {
- L2PcInstance trg = obj.getActingPlayer();
+ if (trg == src)
+ {
+ continue;
+ }
 
- if (trg != null)
+ if (trg.isInsideZone(ZoneType.PEACE))
  {
- if (trg == src)
+ continue;
+ }
+
+ if ((src.getParty() != null) && (trg.getParty() != null))
+ {
+ if (src.getParty().getLeader().getObjectId() == trg.getParty().getLeader().getObjectId())
  {
  continue;
  }
 
- if ((src.getParty() != null) && (trg.getParty() != null))
+ if ((src.getParty().getCommandChannel() != null) && (trg.getParty().getCommandChannel() != null))
  {
- if (src.getParty().getLeader().getObjectId() == trg.getParty().getLeader().getObjectId())
+ if (src.getParty().getCommandChannel() == trg.getParty().getCommandChannel())
  {
  continue;
  }
-
- if ((src.getParty().getCommandChannel() != null) && (trg.getParty().getCommandChannel() != null))
- {
- if (src.getParty().getCommandChannel() == trg.getParty().getCommandChannel())
- {
- continue;
- }
- }
  }
-
- if (trg.isInsideZone(ZoneType.PEACE))
+ }
+
+ if (!srcInArena && !(trg.isInsideZone(ZoneType.PVP) && !trg.isInsideZone(ZoneType.SIEGE)))
+ {
+ if ((src.getAllyId() == trg.getAllyId()) && (src.getAllyId() != 0))
  {
  continue;
  }
 
- if (!srcInArena && !(trg.isInsideZone(ZoneType.PVP) && !trg.isInsideZone(ZoneType.SIEGE)))
+ if ((src.getClan() != null) && (trg.getClan() != null))
  {
- if ((src.getAllyId() == trg.getAllyId()) && (src.getAllyId() != 0))
- {
- continue;
- }
-
- if ((src.getClan() != null) && (trg.getClan() != null))
- {
- if (src.getClan().getId() == trg.getClan().getId())
- {
- continue;
- }
- }
-
- if (!src.checkPvpSkill(obj, skill, activeChar instanceof L2Summon))
+ if (src.getClan().getId() == trg.getClan().getId())
  {
  continue;
  }
  }
+
+ if (!src.checkPvpSkill(obj, skill, activeChar instanceof L2Summon))
+ {
+ continue;
+ }
  }
  }
 
- if (!GeoEngine.getInstance().canSeeTarget(target, obj))
- {
- continue;
- }
-
  targetList.add(obj);
  }
 
Index: java/net/sf/l2j/gameserver/handler/target/TargetAuraUndead.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/target/TargetAuraUndead.java (revision 1091)
+++ java/net/sf/l2j/gameserver/handler/target/TargetAuraUndead.java (working copy)
@@ -25,6 +25,7 @@
 import net.sf.l2j.gameserver.model.L2Object;
 import net.sf.l2j.gameserver.model.actor.L2Character;
 import net.sf.l2j.gameserver.model.actor.L2Npc;
+import net.sf.l2j.gameserver.model.actor.enums.NpcRaceType;
 import net.sf.l2j.gameserver.model.actor.instance.L2SummonInstance;
 import net.sf.l2j.gameserver.model.skills.Skill;
 import net.sf.l2j.gameserver.model.skills.enums.SkillTargetType;
@@ -47,7 +48,9 @@
  {
  if ((character instanceof L2Npc) || (character instanceof L2SummonInstance))
  {
- if (!character.isUndead())
+ L2Npc npc = (L2Npc) character;
+
+ if (npc.getTemplate().getRace() != NpcRaceType.UNDEAD)
  {
  continue;
  }
Index: java/net/sf/l2j/gameserver/handler/target/TargetUndead.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/target/TargetUndead.java (revision 1091)
+++ java/net/sf/l2j/gameserver/handler/target/TargetUndead.java (working copy)
@@ -22,6 +22,7 @@
 import net.sf.l2j.gameserver.model.L2Object;
 import net.sf.l2j.gameserver.model.actor.L2Character;
 import net.sf.l2j.gameserver.model.actor.L2Npc;
+import net.sf.l2j.gameserver.model.actor.enums.NpcRaceType;
 import net.sf.l2j.gameserver.model.actor.instance.L2SummonInstance;
 import net.sf.l2j.gameserver.model.skills.Skill;
 import net.sf.l2j.gameserver.model.skills.enums.SkillTargetType;
@@ -47,7 +48,15 @@
  return EMPTY_TARGET_LIST;
  }
 
- if (!target.isUndead() || target.isDead())
+ L2Npc npc = (L2Npc) target;
+
+ if (npc.getTemplate().getRace() != NpcRaceType.UNDEAD)
+ {
+ activeChar.sendPacket(SystemMessage.INCORRECT_TARGET);
+ return EMPTY_TARGET_LIST;
+ }
+
+ if (target.isDead())
  {
  activeChar.sendPacket(SystemMessage.INCORRECT_TARGET);
  return EMPTY_TARGET_LIST;
Index: java/net/sf/l2j/gameserver/model/actor/L2Character.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Character.java (revision 1094)
+++ java/net/sf/l2j/gameserver/model/actor/L2Character.java (working copy)
@@ -1664,11 +1664,6 @@
  isSingleSpear = value;
  }
 
- public boolean isUndead()
- {
- return template.isUndead();
- }
-
  public CharTemplate getTemplate()
  {
  return template;
Index: java/net/sf/l2j/gameserver/model/actor/L2Npc.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Npc.java (revision 1091)
+++ java/net/sf/l2j/gameserver/model/actor/L2Npc.java (working copy)
@@ -306,15 +306,6 @@
  }
 
  /**
- * Return True if this npc is undead in function of the L2NpcTemplate.
- */
- @Override
- public boolean isUndead()
- {
- return getTemplate().isUndead();
- }
-
- /**
  * @return True if this npc is quest monster in function of the L2NpcTemplate.
  */
  public boolean isQuestMonster()
Index: java/net/sf/l2j/gameserver/model/actor/enums/NpcRaceType.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/enums/NpcRaceType.java (revision 0)
+++ java/net/sf/l2j/gameserver/model/actor/enums/NpcRaceType.java (revision 0)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2014-2018 L2jAdmins
+ *
+ * This file is part of L2jAdmins.
+ *
+ * L2jAdmins is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2jAdmins is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package net.sf.l2j.gameserver.model.actor.enums;
+
+/**
+ * @author fissban
+ */
+public enum NpcRaceType
+{
+ NONE,
+ UNDEAD,
+ BEAST,
+ ANIMAL,
+ PLANT,
+ DRAGON,
+ GIANT,
+ MAGIC_CREATURE,
+ CREATURE_VALAKAS,
+ BUG
+}
Index: java/net/sf/l2j/gameserver/model/actor/templates/CharTemplate.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/templates/CharTemplate.java (revision 1091)
+++ java/net/sf/l2j/gameserver/model/actor/templates/CharTemplate.java (working copy)
@@ -77,8 +77,6 @@
  private final double baseHolyVuln;
  private final double baseDarkVuln;
 
- private final boolean isUndead;
-
  // C4 Stats
  private final int baseMpConsumeRate;
  private final int baseHpConsumeRate;
@@ -140,8 +138,6 @@
  baseHolyVuln = set.getDouble("holyVuln", 1.0);
  baseDarkVuln = set.getDouble("darkVuln", 1.0);
 
- isUndead = (set.getInteger("isUndead", 0) == 1);
-
  // C4 Stats
  baseMpConsumeRate = set.getInteger("mpConsumeRate", 0);
  baseHpConsumeRate = set.getInteger("hpConsumeRate", 0);
@@ -350,11 +346,6 @@
  return baseDarkVuln;
  }
 
- public boolean isUndead()
- {
- return isUndead;
- }
-
  public int getBaseMpConsumeRate()
  {
  return baseMpConsumeRate;
Index: java/net/sf/l2j/gameserver/model/actor/templates/NpcTemplate.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/templates/NpcTemplate.java (revision 1093)
+++ java/net/sf/l2j/gameserver/model/actor/templates/NpcTemplate.java (working copy)
@@ -28,6 +28,7 @@
 
 import net.sf.l2j.gameserver.model.StatsSet;
 import net.sf.l2j.gameserver.model.actor.base.ClassId;
+import net.sf.l2j.gameserver.model.actor.enums.NpcRaceType;
 import net.sf.l2j.gameserver.model.drop.DropCategory;
 import net.sf.l2j.gameserver.model.drop.DropInstance;
 import net.sf.l2j.gameserver.model.holder.MinionHolder;
@@ -68,7 +69,7 @@
  private boolean isAuctioner = false;
  private boolean isWarehouse = false;
 
- private int race;
+ private NpcRaceType race;
  private final String jClass;
 
  /** The table containing all Item that can be dropped by L2NpcInstance using this L2NpcTemplate */
@@ -120,7 +121,7 @@
  ss = (short) set.getInteger("ss", 0);
  bss = (short) set.getInteger("bss", 0);
  ssRate = (short) set.getInteger("ssRate", 0);
- race = 0;
+ race = NpcRaceType.NONE;
  jClass = set.getString("jClass");
  }
 
@@ -257,14 +258,14 @@
  return scriptEvents;
  }
 
- public int getRace()
+ public NpcRaceType getRace()
  {
  return race;
  }
 
- public void setRace(int race)
+ public void setRace(NpcRaceType npcRaceType)
  {
- this.race = race;
+ this.race = npcRaceType;
  }
 
  public int getId()
Index: java/net/sf/l2j/gameserver/model/skills/stats/Formulas.java
===================================================================
--- java/net/sf/l2j/gameserver/model/skills/stats/Formulas.java (revision 1094)
+++ java/net/sf/l2j/gameserver/model/skills/stats/Formulas.java (working copy)
@@ -30,6 +30,7 @@
 import net.sf.l2j.gameserver.model.actor.L2Character;
 import net.sf.l2j.gameserver.model.actor.L2Npc;
 import net.sf.l2j.gameserver.model.actor.L2Playable;
+import net.sf.l2j.gameserver.model.actor.enums.NpcRaceType;
 import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
@@ -498,9 +499,9 @@
 
  if (attacker instanceof L2Npc)
  {
- int raceId = ((L2Npc) attacker).getTemplate().getRace();
+ NpcRaceType raceId = ((L2Npc) attacker).getTemplate().getRace();
  // Skill Race : Undead
- if (raceId == 4290)
+ if (raceId == NpcRaceType.UNDEAD)
  {
  pAtk /= attacker.calcStat(StatsType.PHYSICAL_DEF_UNDEAD, 1, target, null);
  }
@@ -512,43 +513,33 @@
  }
  if (target instanceof L2Npc)
  {
- int raceId = ((L2Npc) target).getTemplate().getRace();
-
- if (raceId == 4290)// Skill Race : Undead
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_MONSTERS, 1, target, null);
- }
- if (raceId == 4292) // Skill Race : Beast
+ switch (((L2Npc) target).getTemplate().getRace())
  {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_MONSTERS, 1, target, null);
- }
- if (raceId == 4293)// Skill Race : Animal
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_ANIMALS, 1, target, null);
- }
- if (raceId == 4294)// Skill Race : Plant
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_PLANTS, 1, target, null);
- }
- if (raceId == 4299)// Skill Race : Dragon
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_DRAGONS, 1, target, null);
- }
- if (raceId == 4300)// Skill Race : Giant
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_GIANTS, 1, target, null);
- }
- if (raceId == 4301)// Skill Race : Bug
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_INSECTS, 1, target, null);
- }
- if (raceId == 4302)// Skill Race : Magic Creatures
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_MAGIC_CREATURES, 1, target, null);
- }
- if (((L2Npc) target).getId() == 12899)// For amulets of Valakas
- {
- pAtk *= attacker.calcStat(StatsType.VALAKAS_PHYSICAL_DMG, 1, null, null);
+ case UNDEAD:
+ case BEAST:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_MONSTERS, 1, target, null);
+ break;
+ case ANIMAL:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_ANIMALS, 1, target, null);
+ break;
+ case PLANT:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_PLANTS, 1, target, null);
+ break;
+ case DRAGON:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_DRAGONS, 1, target, null);
+ break;
+ case GIANT:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_GIANTS, 1, target, null);
+ break;
+ case MAGIC_CREATURE:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_MAGIC_CREATURES, 1, target, null);
+ break;
+ case BUG:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_INSECTS, 1, target, null);
+ break;
+ case CREATURE_VALAKAS:
+ pAtk *= attacker.calcStat(StatsType.VALAKAS_PHYSICAL_DMG, 1, null, null);
+ break;
  }
  }
 

6
Issues / Mal funcionamiento en skills restringidos a "UNDEADS"
« Último mensaje por canonmagic en Junio 16, 2018, 10:05:23 am »
Buenas, Les escribo para avisarles que me he encontrado un problema con las skills como Disrupt Undead que estan restringidas para atacar solo a los Type undead... Hoy anduve andando un rato jugando con un Cleric y me encontre que al intentar lanzar la habilidad Disrupt Undead a un ghoul me mandaba el mensaje "Target cannot be found" y "Incorrect Target", asi que con un admin probe todas las habilidades hacia los undead y ninguna funciono... tambien probe con otros undead como Strains y nada...
7
General / Re:Ayuda adaptando Evento Medallas a L2JAdmins fissban rev 1093
« Último mensaje por canonmagic en Junio 13, 2018, 08:32:15 pm »
Vaya, muchisimas gracias nuevamente fissban  ;D tenia ya alrededor de 3 dias dandole vueltas al script sin saber donde se encontraba el error  ::).
8
General / Re:Ayuda adaptando Evento Medallas a L2JAdmins fissban rev 1093
« Último mensaje por fissban en Junio 13, 2018, 02:40:36 pm »
esto no lo necesitas
Código
	public static void main(String[] args)
{
new EventMedalQuest(-1, "Event Medal", "events");
}

esto
Código
	public EventMedalQuest(int questId, String name, String descr)
{
super(5000, "EventMedalQuest");

por

Código
	public EventMedalQuest()
{
super(5000, "EventMedalQuest");
9
General / [Solved] Ayuda adaptando Evento Medallas a L2JAdmins fissban rev 1093
« Último mensaje por canonmagic en Junio 11, 2018, 06:17:25 pm »
Buenas, les escribo para pedirles una pequeña ayuda, estoy aprendiendo poco a poco el comportamiento del datapack L2Jadmins, para ir aprendiendo poco a poco maneras de crear scripts y mods me he tomado la tarea de traer algunos de otros datapacks y adaptarlos. Pero me he encontrado un pequeño percance con el evento de las event medals. Ya hize un script aparte para los drops globales y me funciono perfectamente, pero al intentar adaptar la quest de los gatos "Roy the cat" y "Winnie the cat" me tira el siguiente error el GameServer:

Código
------------------------------------------------------------------=[ Scripts ]
java.lang.NoSuchMethodException: net.sf.l2j.gameserver.scripts.quests.normal.Eve
ntMedalQuest.<init>()
        at java.base/java.lang.Class.getConstructor0(Unknown Source)
        at java.base/java.lang.Class.getDeclaredConstructor(Unknown Source)
        at net.sf.l2j.gameserver.data.ScriptsData.parseFile(ScriptsData.java:58)

        at net.sf.l2j.util.XmlParser.loadFile(XmlParser.java:94)
        at net.sf.l2j.util.XmlParser.loadFile(XmlParser.java:67)
        at net.sf.l2j.gameserver.data.ScriptsData.load(ScriptsData.java:43)
        at net.sf.l2j.gameserver.GameServer.<init>(GameServer.java:296)
        at net.sf.l2j.gameserver.GameServer.main(GameServer.java:356)

y revisando el script detenidamente:

Código
/*
 * Copyright (C) 2014-2018 L2jAdmins
 *
 * This file is part of L2jAdmins.
 *
 * L2jAdmins is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * L2jAdmins is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package net.sf.l2j.gameserver.scripts.quests.normal;

import net.sf.l2j.gameserver.model.actor.L2Npc;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

/**
 * @author Noname
 *
 */

import net.sf.l2j.gameserver.scripts.Script;
import net.sf.l2j.gameserver.scripts.ScriptState;
import net.sf.l2j.util.lib.Rnd;

public class EventMedalQuest extends Script
{
private final static int CAT_ROY = 6228;
private final static int CAT_WINNIE = 6229;
private final static int GLITTERING_MEDAL = 6393;

private final static int WIN_CHANCE = 50;

private final static int[] MEDALS =
{
5,
10,
20,
40
};
private final static int[] BADGES =
{
6399,
6400,
6401,
6402
};

private static final int[][] _spawns_winnie =
{
{
-44342,
-113726,
-240,
0
},
{
-44671,
-115437,
-240,
22500
},
{
-13073,
122841,
-3117,
0
},
{
-13972,
121893,
-2988,
32768
},
{
-14843,
123710,
-3117,
8192
},
{
11327,
15682,
-4584,
25000
},
{
11243,
17712,
-4574,
57344
},
{
18154,
145192,
-3054,
7400
},
{
19214,
144327,
-3097,
32768
},
{
19459,
145775,
-3086,
48000
},
{
17418,
170217,
-3507,
36000
},
{
47146,
49382,
-3059,
32000
},
{
44157,
50827,
-3059,
57344
},
{
79798,
55629,
-1560,
0
},
{
83328,
55769,
-1525,
32768
},
{
80986,
54452,
-1525,
32768
},
{
83329,
149095,
-3405,
49152
},
{
82277,
148564,
-3467,
0
},
{
81620,
148689,
-3464,
32768
},
{
81691,
145610,
-3467,
32768
},
{
114719,
-178742,
-821,
0
},
{
115708,
-182422,
-1449,
0
},
{
-80731,
151152,
-3043,
28672
},
{
-84097,
150171,
-3129,
4096
},
{
-82678,
151666,
-3129,
49152
},
{
117459,
76664,
-2695,
38000
},
{
115936,
76488,
-2711,
59000
},
{
119576,
76940,
-2275,
40960
},
{
-84516,
243015,
-3730,
34000
},
{
-86031,
243153,
-3730,
60000
},
{
147124,
27401,
-2192,
40960
},
{
147985,
25664,
-2000,
16384
},
{
111724,
221111,
-3543,
16384
},
{
107899,
218149,
-3675,
0
},
{
114920,
220080,
-3632,
32768
},
{
147924,
-58052,
-2979,
49000
},
{
147285,
-56461,
-2776,
33000
},
{
44176,
-48688,
-800,
33000
},
{
44294,
-47642,
-792,
50000
}
};

private static final int[][] _spawns_roy =
{
{
-44337,
-113669,
-224,
0
},
{
-44628,
-115409,
-240,
22500
},
{
-13073,
122801,
-3117,
0
},
{
-13949,
121934,
-2988,
32768
},
{
-14786,
123686,
-3117,
8192
},
{
11281,
15652,
-4584,
25000
},
{
11303,
17732,
-4574,
57344
},
{
18178,
145149,
-3054,
7400
},
{
19208,
144380,
-3097,
32768
},
{
19508,
145775,
-3086,
48000
},
{
17396,
170259,
-3507,
36000
},
{
47151,
49436,
-3059,
32000
},
{
44122,
50784,
-3059,
57344
},
{
79806,
55570,
-1560,
0
},
{
83328,
55824,
-1525,
32768
},
{
80986,
54504,
-1525,
32768
},
{
83332,
149160,
-3405,
49152
},
{
82277,
148598,
-3467,
0
},
{
81621,
148725,
-3467,
32768
},
{
81680,
145656,
-3467,
32768
},
{
114733,
-178691,
-821,
0
},
{
115708,
-182362,
-1449,
0
},
{
-80789,
151073,
-3043,
28672
},
{
-84049,
150176,
-3129,
4096
},
{
-82623,
151666,
-3129,
49152
},
{
117498,
76630,
-2695,
38000
},
{
115914,
76449,
-2711,
59000
},
{
119536,
76988,
-2275,
40960
},
{
-84516,
242971,
-3730,
34000
},
{
-86003,
243205,
-3730,
60000
},
{
147184,
27405,
-2192,
17000
},
{
147920,
25664,
-2000,
16384
},
{
111776,
221104,
-3543,
16384
},
{
107904,
218096,
-3675,
0
},
{
114920,
220020,
-3632,
32768
},
{
147888,
-58048,
-2979,
49000
},
{
147262,
-56450,
-2776,
33000
},
{
44176,
-48732,
-800,
33000
},
{
44319,
-47640,
-792,
50000
}
};

public EventMedalQuest(int questId, String name, String descr)
{
super(5000, "EventMedalQuest");
addStartNpc(CAT_ROY);
addStartNpc(CAT_WINNIE);
addTalkId(CAT_ROY);
addTalkId(CAT_WINNIE);
addFirstTalkId(CAT_ROY);
addFirstTalkId(CAT_WINNIE);
for (int[] _spawn : _spawns_roy)
{
addSpawn(CAT_ROY, _spawn[0], _spawn[1], _spawn[2], _spawn[3], false, 0);
}
for (int[] _spawn : _spawns_winnie)
{
addSpawn(CAT_WINNIE, _spawn[0], _spawn[1], _spawn[2], _spawn[3], false, 0);
}
}

@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = "";
ScriptState st = player.getScriptState(getName());
htmltext = event;

int level = checkLevel(st);

if (event.equalsIgnoreCase("game"))
{
if (st.getItemsCount(GLITTERING_MEDAL) < MEDALS[level])
return "8229-no.htm";
else
return "8229-game.htm";
}
else if (event.equalsIgnoreCase("heads") || event.equalsIgnoreCase("tails"))
{
if (st.getItemsCount(GLITTERING_MEDAL) < MEDALS[level])
return "8229-" + event.toLowerCase() + "-10.htm";

st.takeItems(GLITTERING_MEDAL, MEDALS[level]);

if (Rnd.get(100) > WIN_CHANCE)
{
level = 0;
}
else
{
if (level>0)
st.takeItems(BADGES[level-1], -1);
st.giveItems(BADGES[level], 1);
st.playSound("Itemsound.quest_itemget");
level++;
}
return "8229-" + event.toLowerCase() + "-" + String.valueOf(level) + ".htm";
}
else if (event.equalsIgnoreCase("talk"))
{
return String.valueOf(npc.getId()) + "-lvl-" + String.valueOf(level) + ".htm";
}
return htmltext;
}

@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
ScriptState st = player.getScriptState(getName());
if (st == null)
{
ScriptState q = player.getScriptState(getName());
st = q.setState(player);
}
return npc.getId() + ".htm";
}

public int checkLevel(ScriptState st)
{
int _lev = 0;
if (st == null)
{
return 0;
}
else if (st.getItemsCount(6402) > 0)
{
_lev = 4;
}
else if (st.getItemsCount(6401) > 0)
{
_lev = 3;
}
else if (st.getItemsCount(6400) > 0)
{
_lev = 2;
}
else if (st.getItemsCount(6399) > 0)
{
_lev = 1;
}

return _lev;
}

public static void main(String[] args)
{
new EventMedalQuest(-1, "Event Medal", "events");
}

{
}

}

El problema parece que esta en esta parte... pero no he logrado entender todavía el problema.

Código
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
ScriptState st = player.getScriptState(getName());
if (st == null)
{
ScriptState q = player.getScriptState(getName());
st = q.setState(player);
}
return npc.getId() + ".htm";
}

¿Tienen alguna idea de que puede estar causándome el problema para poder solucionarlo?, Disculpen mi ignorancia por adelantado apenas es el 2do script que intento hacer funcionar  :-\
10
Issues / Re:Char Freez
« Último mensaje por Mordor en Junio 05, 2018, 06:48:53 pm »
Si me fije en todo, lo raro es que en windows no pasa, yo estoy usando linux.. ahora el 15 me cambio de host y de so a ver si es  eso.
Páginas: [1] 2 3 4 5 6 ... 10