Hello, I created a new zone and when I reload zones in order to check if my zone works I get at gameserver the following error:
Error while loading zones.
net.sf.l2j.gameserver.model.zone.type.L2SpecialZone.<init><int>
And zone doesn't load.
Zone code:
/*
* 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 net.sf.l2j.gameserver.model.zone.type;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.datatables.MapRegionTable;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.zone.L2ZoneType;
import net.sf.l2j.gameserver.model.zone.ZoneId;
/**
* @author Devlin
*
*/
public class L2SpecialZone extends L2ZoneType
{
protected L2SpecialZone(int id)
{
super(id);
}
@Override
protected void onEnter(L2Character character)
{
character.setInsideZone(ZoneId.SPECIAL, true);
if (character instanceof L2PcInstance)
{
L2PcInstance p = (L2PcInstance)character;
if (!Config.ALLOW_BISHOP_ENTER_SPECIAL_ZONE)
{
if (p.getClassId().getId() == 16 || p.getClassId().getId() == 97)
{
p.setInsideZone(ZoneId.SPECIAL, false);
p.teleToLocation(MapRegionTable.TeleportWhereType.Town);
p.sendMessage("Your class is not allowed to enter this zone.");
return;
}
}
p.updatePvPStatus();
p.sendMessage("You have entered special pvp zone.");
}
}
@Override
protected void onExit(L2Character character)
{
character.setInsideZone(ZoneId.SPECIAL, false);
if (character instanceof L2PcInstance)
{
L2PcInstance p = (L2PcInstance)character;
p.setPvpFlag(0);
p.broadcastUserInfo();
p.sendMessage("You have exited special pvp zone.");
}
}
@Override
public void onDieInside(L2Character character)
{
// nothing.
}
@Override
public void onReviveInside(L2Character character)
{
if (character instanceof L2PcInstance)
{
L2PcInstance p = (L2PcInstance)character;
p.setCurrentHpMp(p.getMaxHp(), p.getMaxMp());
p.setCurrentCp(p.getMaxCp());
}
}
}
SELLING EMPTY TELEGRAM BOTS WITH AGE
Registration date: November 2024
High-quality & clean bots — no subscribers, no bans, created on fresh IPs.
y rested and reliable — perfect for:
— Telegram search ranking
— any technical or marketing tasks
Delivery options:
tdata, by phone number, ownership transfer, or via tokens.
Current price list:
From 3 pcs — $3 each
From 20 pcs — $2.5 each
From 60 pcs — $2.3 each
From 100 pcs — $2.2 each
From 400 pcs — $1.9 each
Over 15,000+ bots available — ready for instant delivery.
Contact on Telegram: t.me/smmtg_link
My project is based on this files i bought data files from dude, got good support everything was perfect, yea needed to spend some time editing but still you have really good extensions for interlude server from here.
Question
Devlin
Hello, I created a new zone and when I reload zones in order to check if my zone works I get at gameserver the following error:
And zone doesn't load.
Zone code:
/* * 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 net.sf.l2j.gameserver.model.zone.type; import net.sf.l2j.Config; import net.sf.l2j.gameserver.datatables.MapRegionTable; import net.sf.l2j.gameserver.model.actor.L2Character; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.zone.L2ZoneType; import net.sf.l2j.gameserver.model.zone.ZoneId; /** * @author Devlin * */ public class L2SpecialZone extends L2ZoneType { protected L2SpecialZone(int id) { super(id); } @Override protected void onEnter(L2Character character) { character.setInsideZone(ZoneId.SPECIAL, true); if (character instanceof L2PcInstance) { L2PcInstance p = (L2PcInstance)character; if (!Config.ALLOW_BISHOP_ENTER_SPECIAL_ZONE) { if (p.getClassId().getId() == 16 || p.getClassId().getId() == 97) { p.setInsideZone(ZoneId.SPECIAL, false); p.teleToLocation(MapRegionTable.TeleportWhereType.Town); p.sendMessage("Your class is not allowed to enter this zone."); return; } } p.updatePvPStatus(); p.sendMessage("You have entered special pvp zone."); } } @Override protected void onExit(L2Character character) { character.setInsideZone(ZoneId.SPECIAL, false); if (character instanceof L2PcInstance) { L2PcInstance p = (L2PcInstance)character; p.setPvpFlag(0); p.broadcastUserInfo(); p.sendMessage("You have exited special pvp zone."); } } @Override public void onDieInside(L2Character character) { // nothing. } @Override public void onReviveInside(L2Character character) { if (character instanceof L2PcInstance) { L2PcInstance p = (L2PcInstance)character; p.setCurrentHpMp(p.getMaxHp(), p.getMaxMp()); p.setCurrentCp(p.getMaxCp()); } } }Xml:
Pack: aCis last rev.
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now