Не работают евенты (christmas, Valentines ...)
5 replies72 viewsCurrently viewing: 1
· 12/13/2009, 10:00 PM
Сборка: L2j-Equal 323rev. [Stable Version] Interlude
Краткое изложение СУТИ проблемы: Не работают евенты, такие как Christmas, Valentines и т.д.
Вопрос: в чем причина и как исправить?
Мои соображения по этому поводу: Ниже выкладываю больше информации
Error в логах:
Код
2009.12.13 23:30:39,080 WARNING 10 com.equal.gameserver.script.faenor.FaenorEventParser Event ID: (Chrismas Event) has passed... Ignored.
2009.12.13 23:30:39,084 WARNING 10 com.equal.gameserver.script.faenor.FaenorEventParser Event ID: (Valentines Event) has passed... Ignored.
2009.12.13 23:30:39,084 WARNING 10 com.equal.gameserver.script.faenor.FaenorEventParser Event ID: (Valentines Event) has passed... Ignored.
com.equal.gameserver.script.faenor.FaenorEventParser
Раскрывающийся текст
/*
* This program 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.
*
* This program 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 com.equal.gameserver.script.faenor;
import org.apache.bsf.BSFManager;
import org.w3c.dom.Node;
import com.equal.gameserver.script.Parser;
import com.equal.gameserver.script.ParserFactory;
import com.equal.gameserver.script.ScriptEngine;
/**
* @author Luis Arias
*
*/
public class FaenorQuestParser extends FaenorParser
{
@Override
public void parseScript(Node questNode, BSFManager context)
{
if (DEBUG) System.out.println("Parsing Quest.");
String questID = attribute(questNode, "ID");
for (Node node = questNode.getFirstChild(); node != null; node = node.getNextSibling()) {
if (isNodeName(node, "DROPLIST"))
{
parseQuestDropList(node.cloneNode(true), questID);
}
else if (isNodeName(node, "DIALOG WINDOWS"))
{
//parseDialogWindows(node.cloneNode(true));
}
else if (isNodeName(node, "INITIATOR"))
{
//parseInitiator(node.cloneNode(true));
}
else if (isNodeName(node, "STATE"))
{
//parseState(node.cloneNode(true));
}
}
}
private void parseQuestDropList(Node dropList, String questID) throws NullPointerException
{
if (DEBUG) System.out.println("Parsing Droplist.");
for (Node node = dropList.getFirstChild(); node != null; node = node.getNextSibling()) {
if (isNodeName(node, "DROP"))
{
parseQuestDrop(node.cloneNode(true), questID);
}
}
}
private void parseQuestDrop(Node drop, String questID)// throws NullPointerException
{
if (DEBUG) System.out.println("Parsing Drop.");
int npcID;
int itemID;
int min;
int max;
int chance;
String[] states;
try
{
npcID = getInt(attribute(drop, "NpcID"));
itemID = getInt(attribute(drop, "ItemID"));
min = getInt(attribute(drop, "Min"));
max = getInt(attribute(drop, "Max"));
chance = getInt(attribute(drop, "Chance"));
states = (attribute(drop, "States")).split(",");
}
catch (NullPointerException e)
{
throw new NullPointerException("Incorrect Drop Data");
}
if (DEBUG) System.out.println("Adding Drop to NpcID: "+npcID);
_bridge.addQuestDrop(npcID, itemID, min, max, chance, questID, states);
}
static class FaenorQuestParserFactory extends ParserFactory
{
@Override
public Parser create()
{
return(new FaenorQuestParser());
}
}
static
{
ScriptEngine.parserFactories.put(getParserName("Quest"), new FaenorQuestParserFactory());
}
}
* This program 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.
*
* This program 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 com.equal.gameserver.script.faenor;
import org.apache.bsf.BSFManager;
import org.w3c.dom.Node;
import com.equal.gameserver.script.Parser;
import com.equal.gameserver.script.ParserFactory;
import com.equal.gameserver.script.ScriptEngine;
/**
* @author Luis Arias
*
*/
public class FaenorQuestParser extends FaenorParser
{
@Override
public void parseScript(Node questNode, BSFManager context)
{
if (DEBUG) System.out.println("Parsing Quest.");
String questID = attribute(questNode, "ID");
for (Node node = questNode.getFirstChild(); node != null; node = node.getNextSibling()) {
if (isNodeName(node, "DROPLIST"))
{
parseQuestDropList(node.cloneNode(true), questID);
}
else if (isNodeName(node, "DIALOG WINDOWS"))
{
//parseDialogWindows(node.cloneNode(true));
}
else if (isNodeName(node, "INITIATOR"))
{
//parseInitiator(node.cloneNode(true));
}
else if (isNodeName(node, "STATE"))
{
//parseState(node.cloneNode(true));
}
}
}
private void parseQuestDropList(Node dropList, String questID) throws NullPointerException
{
if (DEBUG) System.out.println("Parsing Droplist.");
for (Node node = dropList.getFirstChild(); node != null; node = node.getNextSibling()) {
if (isNodeName(node, "DROP"))
{
parseQuestDrop(node.cloneNode(true), questID);
}
}
}
private void parseQuestDrop(Node drop, String questID)// throws NullPointerException
{
if (DEBUG) System.out.println("Parsing Drop.");
int npcID;
int itemID;
int min;
int max;
int chance;
String[] states;
try
{
npcID = getInt(attribute(drop, "NpcID"));
itemID = getInt(attribute(drop, "ItemID"));
min = getInt(attribute(drop, "Min"));
max = getInt(attribute(drop, "Max"));
chance = getInt(attribute(drop, "Chance"));
states = (attribute(drop, "States")).split(",");
}
catch (NullPointerException e)
{
throw new NullPointerException("Incorrect Drop Data");
}
if (DEBUG) System.out.println("Adding Drop to NpcID: "+npcID);
_bridge.addQuestDrop(npcID, itemID, min, max, chance, questID, states);
}
static class FaenorQuestParserFactory extends ParserFactory
{
@Override
public Parser create()
{
return(new FaenorQuestParser());
}
}
static
{
ScriptEngine.parserFactories.put(getParserName("Quest"), new FaenorQuestParserFactory());
}
}
0
· 12/15/2009, 06:07 PM
ап
0
· 12/15/2009, 08:23 PM
может время их уже прошло вот сервер и игнорирует (проверь в скриптах ивентов год месяц и день)
0
· 12/16/2009, 06:24 AM
Ай ну да прошло время это. Увеличил и теперь загружает. Потом проверб в самой игре
А как писать, чтобы евент был бы до 2010-01-03 ?
Код
<Event ID="Christmas Event" Active="20 Dec 2005-3 Jan 2007">
0
Topic is closed for replies

