Addition of zones package.
This commit is contained in:
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* 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 ai.atelia_fortess;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author hlwrave
|
||||
*/
|
||||
final class AteliaDoorGuard extends AbstractNpcAI
|
||||
{
|
||||
private static final int GUARD = 23539;
|
||||
private static int _killCount = 0;
|
||||
|
||||
private AteliaDoorGuard()
|
||||
{
|
||||
super(AteliaDoorGuard.class.getSimpleName(), "ai/atelia_fortess");
|
||||
addKillId(GUARD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "Close_Atelia_Door":
|
||||
{
|
||||
closeDoor(18190002, 0);
|
||||
closeDoor(18190004, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
if (npc.getId() == GUARD)
|
||||
{
|
||||
_killCount++;
|
||||
}
|
||||
if (_killCount == 2)
|
||||
{
|
||||
openDoor(18190002, 0);
|
||||
openDoor(18190004, 0);
|
||||
startQuestTimer("Close_Atelia_Door", 3600000, null, null);
|
||||
_killCount = 0;
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new AteliaDoorGuard();
|
||||
}
|
||||
}
|
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* 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 ai.atelia_fortess;
|
||||
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Devianne AI.
|
||||
* @author hlwrave
|
||||
* @URL https://l2wiki.com/Atelia_Fortress
|
||||
*/
|
||||
final class Devianne extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int BURNSTAIN = 23587;
|
||||
private static final int DEVIANNE = 34089;
|
||||
// Location
|
||||
private static final Location DEVIANNE_LOC = new Location(-50063, 49439, -1760, 40362);
|
||||
// Other
|
||||
private static final int DESPAWN_DELAY = 3600000; // Time 1 Hour
|
||||
|
||||
private Devianne()
|
||||
{
|
||||
super(Devianne.class.getSimpleName(), "ai/atelia_fortess");
|
||||
addKillId(BURNSTAIN);
|
||||
addSpawnId(DEVIANNE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
addSpawn(DEVIANNE, DEVIANNE_LOC, false, DESPAWN_DELAY);
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Devianne();
|
||||
}
|
||||
}
|
@@ -14,7 +14,6 @@
|
||||
* 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 ai.group_template;
|
||||
|
||||
/**
|
||||
* Group Template AI:<br>
|
||||
@@ -33,3 +32,4 @@ package ai.group_template;
|
||||
* @see quests
|
||||
* @author Fulminus, Zoey76
|
||||
*/
|
||||
package ai.group_template;
|
||||
|
@@ -14,7 +14,6 @@
|
||||
* 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 ai.npc.Teleports;
|
||||
|
||||
/**
|
||||
* Teleporter AIs are used for teleports that are too advanced to be done under normal means.<br>
|
||||
@@ -25,3 +24,4 @@ package ai.npc.Teleports;
|
||||
* All implementation details are fully covered by quests.<br>
|
||||
* @author Zoey76
|
||||
*/
|
||||
package ai.npc.Teleports;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* 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 ai.atelia_fortess.AteliaStatus;
|
||||
package ai.zones.AteliaFortress.AteliaManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -36,7 +36,7 @@ import ai.npc.AbstractNpcAI;
|
||||
* URL https://l2wiki.com/Atelia_Fortress
|
||||
* @author hlwrave, Stayway, Mobius
|
||||
*/
|
||||
final class AteliaStatus extends AbstractNpcAI
|
||||
final class AteliaManager extends AbstractNpcAI
|
||||
{
|
||||
// Npc Devianne
|
||||
private static final int DEVIANNE = 34089;
|
||||
@@ -310,9 +310,9 @@ final class AteliaStatus extends AbstractNpcAI
|
||||
|
||||
static ArrayList<L2Npc> FortessSpawns = new ArrayList<>();
|
||||
|
||||
private AteliaStatus()
|
||||
private AteliaManager()
|
||||
{
|
||||
super(AteliaStatus.class.getSimpleName(), "ai/atelia_fortess");
|
||||
super(AteliaManager.class.getSimpleName(), "ai/zones/AteliaFortress");
|
||||
addStartNpc(BARTON, GLENKI, HAYUK, HURAK, ELISE, LAFFIAN, JULIA, MION, ELIYAH, SHERRY, SAYLEM, NIKA);
|
||||
addFirstTalkId(BARTON, GLENKI, HAYUK, HURAK, ELISE, LAFFIAN, JULIA, MION, ELIYAH, SHERRY, SAYLEM, NIKA);
|
||||
addTalkId(BARTON, GLENKI, HAYUK, HURAK, ELISE, LAFFIAN, JULIA, MION, ELIYAH, SHERRY, SAYLEM, NIKA);
|
||||
@@ -702,6 +702,6 @@ final class AteliaStatus extends AbstractNpcAI
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new AteliaStatus();
|
||||
new AteliaManager();
|
||||
}
|
||||
}
|
@@ -14,7 +14,7 @@
|
||||
* 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 ai.fantasy_isle;
|
||||
package ai.zones.FantasyIsle;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.instancemanager.HandysBlockCheckerManager;
|
@@ -14,7 +14,7 @@
|
||||
* 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 ai.fantasy_isle;
|
||||
package ai.zones.FantasyIsle;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
@@ -127,7 +127,7 @@ final class Parade extends AbstractNpcAI
|
||||
|
||||
public Parade()
|
||||
{
|
||||
super(Parade.class.getSimpleName(), "ai/fantasy_isle");
|
||||
super(Parade.class.getSimpleName(), "ai/zones/FantasyIsle");
|
||||
|
||||
// Starts at 8:00 and repeats every 6 hours.
|
||||
final long diff = timeLeftMilli(8, 0, 0), cycle = 3600000L;
|
@@ -14,15 +14,13 @@
|
||||
* 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 ai.fantasy_isle;
|
||||
package ai.zones.FantasyIsle;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
@@ -35,10 +33,10 @@ import com.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* MC Show AI.
|
||||
* Talent Show AI.
|
||||
* @author Kerberos
|
||||
*/
|
||||
final class MC_Show extends AbstractNpcAI
|
||||
final class TalentShow extends AbstractNpcAI
|
||||
{
|
||||
private static int MC = 32433;
|
||||
// @formatter:off
|
||||
@@ -167,9 +165,9 @@ final class MC_Show extends AbstractNpcAI
|
||||
private static final Map<String, ShoutInfo> TALKS = new HashMap<>();
|
||||
private static final Map<String, WalkInfo> WALKS = new HashMap<>();
|
||||
|
||||
private MC_Show()
|
||||
private TalentShow()
|
||||
{
|
||||
super(MC_Show.class.getSimpleName(), "ai/fantasy_isle");
|
||||
super(TalentShow.class.getSimpleName(), "ai/zones/FantasyIsle");
|
||||
addSpawnId(32433, 32431, 32432, 32442, 32443, 32444, 32445, 32446, 32424, 32425, 32426, 32427, 32428);
|
||||
load();
|
||||
scheduleTimer();
|
||||
@@ -306,13 +304,8 @@ final class MC_Show extends AbstractNpcAI
|
||||
hourDiff *= 3600000;
|
||||
minDiff *= 60000;
|
||||
diff = hourDiff + minDiff;
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
_log.info("Fantasy Isle: MC show script starting at " + (new SimpleDateFormat("dd/MM/yyyy HH:mm:ss")).format(System.currentTimeMillis() + diff) + " and is scheduled each next 4 hours.");
|
||||
}
|
||||
// TODO startRepeatingQuestTimer("Start", diff, 14400000, null, null);
|
||||
// missing option to provide different initial delay
|
||||
ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new StartMCShow(), diff, 14400000L);
|
||||
_log.info("Fantasy Isle: MC show script starting at " + (new SimpleDateFormat("dd/MM/yyyy HH:mm:ss")).format(System.currentTimeMillis() + diff) + " and is scheduled each next 4 hours.");
|
||||
startQuestTimer("Start", diff, null, null); // first start
|
||||
}
|
||||
|
||||
private void autoChat(L2Npc npc, NpcStringId npcString, ChatType type)
|
||||
@@ -384,6 +377,7 @@ final class MC_Show extends AbstractNpcAI
|
||||
{
|
||||
IS_STARTED = true;
|
||||
addSpawn(MC, -56698, -56430, -2008, 32768, false, 0);
|
||||
startQuestTimer("Start", 14400000L, null, null); // repeat
|
||||
}
|
||||
else if ((npc != null) && IS_STARTED)
|
||||
{
|
||||
@@ -524,6 +518,6 @@ final class MC_Show extends AbstractNpcAI
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new MC_Show();
|
||||
new TalentShow();
|
||||
}
|
||||
}
|
@@ -14,18 +14,10 @@
|
||||
* 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 ai.fantasy_isle;
|
||||
|
||||
import com.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
|
||||
/**
|
||||
* Start MC Show.
|
||||
* Zone AIs:<br>
|
||||
* This folder contains AI scripts for specific zones.
|
||||
* @author Mobius
|
||||
*/
|
||||
class StartMCShow implements Runnable
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
QuestManager.getInstance().getQuest("MC_Show").notifyEvent("Start", null, null);
|
||||
}
|
||||
}
|
||||
package ai.zones;
|
@@ -14,12 +14,12 @@
|
||||
* 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 custom;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Scripts added in the custom folder define quests and/or AI that are not normally part of the original Lineage 2 game.<br>
|
||||
* In addition, "custom" is sometimes used as a temporary implementation of aspects of the original game that are not yet fully implementable by L2J.<br>
|
||||
* In this manner, partially accurate emulation may be offered until a better method is implemented.<br>
|
||||
* The mechanics and syntax of custom scripts are the same as all quest scripts.
|
||||
* @author Zoey76
|
||||
*/
|
||||
package custom;
|
||||
|
Reference in New Issue
Block a user