[Classic] Addition/Removal of NPC XMLs.
This commit is contained in:
@@ -1,142 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.npc.AdventurersGuide;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* Adventurers Guide AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class AdventurersGuide extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int[] ADVENTURERS_GUIDE =
|
||||
{
|
||||
32327,
|
||||
33454, // Newbie Helper
|
||||
};
|
||||
// Skills
|
||||
private static final SkillHolder BLESS_PROTECTION = new SkillHolder(5182, 1); // Blessing of Protection
|
||||
private static final SkillHolder KNIGHT = new SkillHolder(15648, 1); // Knight's Harmony (Adventurer)
|
||||
private static final SkillHolder WARRIOR = new SkillHolder(15649, 1); // Warrior's Harmony (Adventurer)
|
||||
private static final SkillHolder WIZARD = new SkillHolder(15650, 1); // Wizard's Harmony (Adventurer)
|
||||
private static final SkillHolder[] GROUP_BUFFS =
|
||||
{
|
||||
new SkillHolder(15642, 1), // Horn Melody (Adventurer)
|
||||
new SkillHolder(15643, 1), // Drum Melody (Adventurer)
|
||||
new SkillHolder(15644, 1), // Pipe Organ Melody (Adventurer)
|
||||
new SkillHolder(15645, 1), // Guitar Melody (Adventurer)
|
||||
new SkillHolder(15646, 1), // Harp Melody (Adventurer)
|
||||
new SkillHolder(15647, 1), // Lute Melody (Adventurer)
|
||||
new SkillHolder(15651, 1), // Prevailing Sonata (Adventurer)
|
||||
new SkillHolder(15652, 1), // Daring Sonata (Adventurer)
|
||||
new SkillHolder(15653, 1), // Refreshing Sonata (Adventurer)
|
||||
};
|
||||
|
||||
private AdventurersGuide()
|
||||
{
|
||||
super(AdventurersGuide.class.getSimpleName(), "ai/npc");
|
||||
addStartNpc(ADVENTURERS_GUIDE);
|
||||
addTalkId(ADVENTURERS_GUIDE);
|
||||
addFirstTalkId(ADVENTURERS_GUIDE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "guide-01.html":
|
||||
case "guide-02.html":
|
||||
case "guide-03.html":
|
||||
case "guide-04.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "weakenBreath":
|
||||
{
|
||||
if (player.getShilensBreathDebuffLevel() < 3)
|
||||
{
|
||||
htmltext = "guide-noBreath.html";
|
||||
break;
|
||||
}
|
||||
|
||||
player.setShilensBreathDebuffLevel(2);
|
||||
htmltext = ""; // TODO: Any success html?
|
||||
break;
|
||||
}
|
||||
case "knight":
|
||||
{
|
||||
htmltext = applyBuffs(npc, player, KNIGHT.getSkill());
|
||||
break;
|
||||
}
|
||||
case "warrior":
|
||||
{
|
||||
htmltext = applyBuffs(npc, player, WARRIOR.getSkill());
|
||||
break;
|
||||
}
|
||||
case "wizard":
|
||||
{
|
||||
htmltext = applyBuffs(npc, player, WIZARD.getSkill());
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
return "guide.html";
|
||||
}
|
||||
|
||||
private String applyBuffs(L2Npc npc, L2PcInstance player, Skill skill)
|
||||
{
|
||||
if (player.getLevel() > 90)
|
||||
{
|
||||
return "guide-noBuffs.html";
|
||||
}
|
||||
|
||||
for (SkillHolder holder : GROUP_BUFFS)
|
||||
{
|
||||
holder.getSkill().applyEffects(npc, player);
|
||||
}
|
||||
skill.applyEffects(npc, player);
|
||||
|
||||
if ((player.getLevel() < 40) && (player.getClassId().level() <= 1))
|
||||
{
|
||||
BLESS_PROTECTION.getSkill().applyEffects(npc, player);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new AdventurersGuide();
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
<html><body>
|
||||
I can offer you the following buffs, if you're below Lv. 91.<br>
|
||||
Horn Melody / Drum Melody / Pipe Organ Melody<br1>
|
||||
Guitar Melody / Harp Melody / Lute Melody<br1>
|
||||
Prevailing Sonata / Daring Sonata / Refreshing Sonata<br1>
|
||||
You can receive the above buffs as a group.<br>
|
||||
For Knight's Harmony / Warrior's Harmony / Wizard's Harmony, you will have to choose one.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest AdventurersGuide knight">"I want the Knight's Harmony."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest AdventurersGuide warrior">"Warrior's Harmony, please."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest AdventurersGuide wizard">"Wizard's Harmony, of course!"</Button>
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Adventurers' Guide:<br>
|
||||
The Steel Door Guild tops all Dwarven guilds in power and prestige. As such, it is our duty to aid adventurers who work to restore peace unto this war-torn land. We will be happy to offer special assistance if you have Steel Door Guild Coins.<br>
|
||||
Well?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest AdventurersGuide guide-03.html">"How do I use Steel Door Guild Coins?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest AdventurersGuide guide-04.html">"Here, I have some Steel Door Guild Coins..."</Button>
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Adventurers' Guide:<br>
|
||||
You can use Steel Door Guild Coins to purchase <font color="LEVEL">weapons, armor, and accessories of each grade</font>. These items may be restricted in terms of augmentations or attribute options, but they will be more than enough to help you on your journey.<br>
|
||||
Once you outgrow the equipment, <font color="LEVEL">you can trade them back for Steel Door Guild Coins again</font>! You can also invest in the Aden Reconstruction project if it suits your fancy, or even gamble. Don't forget that Steel Weapon Packs and Steel Armor Packs have a chance of yielding Requiem, Apocalypse, or Specter equipment!<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Quest AdventurersGuide guide-02.html">Back</Button>
|
||||
</body></html>
|
@@ -1,14 +0,0 @@
|
||||
<html><body>Adventurers' Guide:<br>
|
||||
You can use Steel Door Guild Coins to receive equipment, and trade them back for coins again. Just remember, <font color="LEVEL">you cannot bring us junk to exchange for coins!</font><br>
|
||||
So, what would you like to do?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 893">"I'd like a weapon or a shield / Sigil."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 894">"I want to buy a top."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 895">"I am looking for some pants."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 896">"Do you have any good helmets?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 897">"Gloves would be nice."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 898">"Give me the best boots you got."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 899">"Can I take a look at your necklaces?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 900">"I'm up for a ring..."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 901">"I want some earrings."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 903">"I want to return my Steel equipment."</Button>
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Adventurers' Guide<br>
|
||||
I can only weaken Shilen's Breath Lv. 3 or above.<br>
|
||||
There is nothing I can do for you.
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>
|
||||
Characters who are Lv. 91 or above cannot receive Newbie Buffs.
|
||||
</body></html>
|
@@ -1,9 +0,0 @@
|
||||
<html><body>Adventurers' Guide:<br>
|
||||
Greetings, traveler! How may I be of assistance?<br>
|
||||
My job is to offer what little assistance I can as you charge into all this endless evil and intense fighting!<br>
|
||||
Even now, the monster attacks on this village grow stronger each day; it is only due to your tireless efforts that we have remained safe this long.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest AdventurersGuide guide-01.html"><font color="LEVEL">"Can I see the list of available buffs?"</font></Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest AdventurersGuide guide-02.html">"Here, I have some Steel Door Guild Coins..."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest AdventurersGuide weakenBreath">"I heard you could weaken Shilen's Breath Lv.3 or above."</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
@@ -1,204 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.npc.ForgeOfTheGods;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* Forge of the Gods AI
|
||||
* @author nonom, malyelfik
|
||||
*/
|
||||
public final class ForgeOfTheGods extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int[] FOG_MOBS =
|
||||
{
|
||||
22634, // Scarlet Stakato Worker
|
||||
22635, // Scarlet Stakato Soldier
|
||||
22636, // Scarlet Stakato Noble
|
||||
22637, // Tepra Scorpion
|
||||
22638, // Tepra Scarab
|
||||
22639, // Assassin Beetle
|
||||
22640, // Mercenary of Destruction
|
||||
22641, // Knight of Destruction
|
||||
22642, // Lavastone Golem
|
||||
22643, // Magma Golem
|
||||
22644, // Arimanes of Destruction
|
||||
22645, // Balor of Destruction
|
||||
22646, // Ashuras of Destruction
|
||||
22647, // Lavasillisk
|
||||
22648, // Blazing Ifrit
|
||||
22649, // Magma Drake
|
||||
};
|
||||
|
||||
private static final int[] LAVASAURUSES =
|
||||
{
|
||||
18799, // Newborn Lavasaurus
|
||||
18800, // Fledgling Lavasaurus
|
||||
18801, // Adult Lavasaurus
|
||||
18802, // Elderly Lavasaurus
|
||||
18803, // Ancient Lavasaurus
|
||||
};
|
||||
|
||||
private static final int REFRESH = 15;
|
||||
|
||||
private static final int MOBCOUNT_BONUS_MIN = 3;
|
||||
|
||||
private static final int BONUS_UPPER_LV01 = 5;
|
||||
private static final int BONUS_UPPER_LV02 = 10;
|
||||
private static final int BONUS_UPPER_LV03 = 15;
|
||||
private static final int BONUS_UPPER_LV04 = 20;
|
||||
private static final int BONUS_UPPER_LV05 = 35;
|
||||
|
||||
private static final int BONUS_LOWER_LV01 = 5;
|
||||
private static final int BONUS_LOWER_LV02 = 10;
|
||||
private static final int BONUS_LOWER_LV03 = 15;
|
||||
|
||||
private static final int FORGE_BONUS01 = 20;
|
||||
private static final int FORGE_BONUS02 = 40;
|
||||
|
||||
private static int _npcCount = 0;
|
||||
|
||||
// private static int _npcsAlive = 0; TODO: Require zone spawn support
|
||||
|
||||
private ForgeOfTheGods()
|
||||
{
|
||||
super(ForgeOfTheGods.class.getSimpleName(), "ai/npc");
|
||||
addKillId(FOG_MOBS);
|
||||
addSpawnId(LAVASAURUSES);
|
||||
startQuestTimer("refresh", REFRESH * 1000, null, null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "suicide":
|
||||
if (npc != null)
|
||||
{
|
||||
npc.doDie(null);
|
||||
}
|
||||
break;
|
||||
case "refresh":
|
||||
_npcCount = 0;
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
int rand = getRandom(100);
|
||||
L2Npc mob = null;
|
||||
_npcCount++;
|
||||
|
||||
// For monsters at Forge of the Gods - Lower level
|
||||
if (npc.getSpawn().getZ() < -5000) // && (_npcsAlive < 48))
|
||||
{
|
||||
if ((_npcCount > BONUS_LOWER_LV03) && (rand <= FORGE_BONUS02))
|
||||
{
|
||||
mob = addSpawn(LAVASAURUSES[4], npc, true);
|
||||
}
|
||||
else if (_npcCount > BONUS_LOWER_LV02)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[4], LAVASAURUSES[3]);
|
||||
}
|
||||
else if (_npcCount > BONUS_LOWER_LV01)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[3], LAVASAURUSES[2]);
|
||||
}
|
||||
else if (_npcCount >= MOBCOUNT_BONUS_MIN)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[2], LAVASAURUSES[1]);
|
||||
}
|
||||
}
|
||||
else
|
||||
// if (_npcsAlive < 32)
|
||||
{
|
||||
if ((_npcCount > BONUS_UPPER_LV05) && (rand <= FORGE_BONUS02))
|
||||
{
|
||||
mob = addSpawn(LAVASAURUSES[1], npc, true);
|
||||
}
|
||||
else if (_npcCount > BONUS_UPPER_LV04)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[4], LAVASAURUSES[3]);
|
||||
}
|
||||
else if (_npcCount > BONUS_UPPER_LV03)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[3], LAVASAURUSES[2]);
|
||||
}
|
||||
else if (_npcCount > BONUS_UPPER_LV02)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[2], LAVASAURUSES[1]);
|
||||
}
|
||||
else if (_npcCount > BONUS_UPPER_LV01)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[1], LAVASAURUSES[0]);
|
||||
}
|
||||
else if ((_npcCount >= MOBCOUNT_BONUS_MIN) && (rand <= FORGE_BONUS01))
|
||||
{
|
||||
mob = addSpawn(LAVASAURUSES[0], npc, true);
|
||||
}
|
||||
}
|
||||
if (mob != null)
|
||||
{
|
||||
((L2Attackable) mob).addDamageHate(killer, 0, 9999);
|
||||
mob.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK);
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("suicide", 60000, npc, null);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
private L2Npc spawnLavasaurus(L2Npc npc, int rand, int... mobs)
|
||||
{
|
||||
if (mobs.length < 2)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
L2Npc mob = null;
|
||||
if (rand <= FORGE_BONUS01)
|
||||
{
|
||||
mob = addSpawn(mobs[0], npc, true);
|
||||
}
|
||||
else if (rand <= FORGE_BONUS02)
|
||||
{
|
||||
mob = addSpawn(mobs[1], npc, true);
|
||||
}
|
||||
return mob;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new ForgeOfTheGods();
|
||||
}
|
||||
}
|
@@ -1,136 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.npc.ForgeOfTheGods;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Rooney AI
|
||||
* @author malyelfik
|
||||
*/
|
||||
public final class Rooney extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int ROONEY = 32049;
|
||||
// Locations
|
||||
private static final Location[] LOCATIONS =
|
||||
{
|
||||
new Location(175937, -112167, -5550),
|
||||
new Location(178896, -112425, -5860),
|
||||
new Location(180628, -115992, -6135),
|
||||
new Location(183010, -114753, -6135),
|
||||
new Location(184496, -116773, -6135),
|
||||
new Location(181857, -109491, -5865),
|
||||
new Location(178917, -107633, -5853),
|
||||
new Location(178804, -110080, -5853),
|
||||
new Location(182221, -106806, -6025),
|
||||
new Location(186488, -109715, -5915),
|
||||
new Location(183847, -119231, -3113),
|
||||
new Location(185193, -120342, -3113),
|
||||
new Location(188047, -120867, -3113),
|
||||
new Location(189734, -120471, -3113),
|
||||
new Location(188754, -118940, -3313),
|
||||
new Location(190022, -116803, -3313),
|
||||
new Location(188443, -115814, -3313),
|
||||
new Location(186421, -114614, -3313),
|
||||
new Location(185188, -113307, -3313),
|
||||
new Location(187378, -112946, -3313),
|
||||
new Location(189815, -113425, -3313),
|
||||
new Location(189301, -111327, -3313),
|
||||
new Location(190289, -109176, -3313),
|
||||
new Location(187783, -110478, -3313),
|
||||
new Location(185889, -109990, -3313),
|
||||
new Location(181881, -109060, -3695),
|
||||
new Location(183570, -111344, -3675),
|
||||
new Location(182077, -112567, -3695),
|
||||
new Location(180127, -112776, -3698),
|
||||
new Location(179155, -108629, -3695),
|
||||
new Location(176282, -109510, -3698),
|
||||
new Location(176071, -113163, -3515),
|
||||
new Location(179376, -117056, -3640),
|
||||
new Location(179760, -115385, -3640),
|
||||
new Location(177950, -119691, -4140),
|
||||
new Location(177037, -120820, -4340),
|
||||
new Location(181125, -120148, -3702),
|
||||
new Location(182212, -117969, -3352),
|
||||
new Location(186074, -118154, -3312)
|
||||
};
|
||||
|
||||
private Rooney()
|
||||
{
|
||||
super(Rooney.class.getSimpleName(), "ai/npc");
|
||||
addSeeCreatureId(ROONEY);
|
||||
addSpawn(ROONEY, LOCATIONS[getRandom(LOCATIONS.length)], false, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("teleport") && !npc.isDecayed())
|
||||
{
|
||||
final int aiVal = npc.getScriptValue();
|
||||
switch (aiVal)
|
||||
{
|
||||
case 1:
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.HURRY_HURRY);
|
||||
break;
|
||||
case 2:
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_AM_NOT_THAT_TYPE_OF_PERSON_WHO_STAYS_IN_ONE_PLACE_FOR_A_LONG_TIME);
|
||||
break;
|
||||
case 3:
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IT_S_HARD_FOR_ME_TO_KEEP_STANDING_LIKE_THIS);
|
||||
break;
|
||||
case 4:
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WHY_DON_T_I_GO_THAT_WAY_THIS_TIME);
|
||||
break;
|
||||
default:
|
||||
npc.teleToLocation(LOCATIONS[getRandom(LOCATIONS.length)], false);
|
||||
npc.setScriptValue(0);
|
||||
return null;
|
||||
}
|
||||
npc.setScriptValue(aiVal + 1);
|
||||
startQuestTimer("teleport", 60000, npc, null);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
|
||||
{
|
||||
if (creature.isPlayer() && npc.isScriptValue(0))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WELCOME);
|
||||
startQuestTimer("teleport", 60000, npc, null);
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
return super.onSeeCreature(npc, creature, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Rooney();
|
||||
}
|
||||
}
|
@@ -1,104 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.npc.ForgeOfTheGods;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* Tar Beetle AI
|
||||
* @author nonom, malyelfik
|
||||
*/
|
||||
public final class TarBeetle extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int TAR_BEETLE = 18804;
|
||||
// Skills
|
||||
private static final int TAR_SPITE = 6142;
|
||||
private static SkillHolder[] SKILLS =
|
||||
{
|
||||
new SkillHolder(TAR_SPITE, 1),
|
||||
new SkillHolder(TAR_SPITE, 2),
|
||||
new SkillHolder(TAR_SPITE, 3)
|
||||
};
|
||||
|
||||
private static final TarBeetleSpawn spawn = new TarBeetleSpawn();
|
||||
|
||||
private TarBeetle()
|
||||
{
|
||||
super(TarBeetle.class.getSimpleName(), "ai/npc");
|
||||
addAggroRangeEnterId(TAR_BEETLE);
|
||||
addSpellFinishedId(TAR_BEETLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
if (npc.getScriptValue() > 0)
|
||||
{
|
||||
final BuffInfo info = player.getEffectList().getBuffInfoBySkillId(TAR_SPITE);
|
||||
final int level = (info != null) ? info.getSkill().getAbnormalLvl() : 0;
|
||||
if (level < 3)
|
||||
{
|
||||
final Skill skill = SKILLS[level].getSkill();
|
||||
if (!npc.isSkillDisabled(skill))
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.doCast(skill);
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onAggroRangeEnter(npc, player, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpellFinished(L2Npc npc, L2PcInstance player, Skill skill)
|
||||
{
|
||||
if ((skill != null) && (skill.getId() == TAR_SPITE))
|
||||
{
|
||||
final int val = npc.getScriptValue() - 1;
|
||||
if ((val <= 0) || (SKILLS[0].getSkill().getMpConsume() > npc.getCurrentMp()))
|
||||
{
|
||||
spawn.removeBeetle(npc);
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(val);
|
||||
}
|
||||
}
|
||||
return super.onSpellFinished(npc, player, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean unload()
|
||||
{
|
||||
spawn.unload();
|
||||
return super.unload();
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new TarBeetle();
|
||||
}
|
||||
}
|
@@ -1,272 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.npc.ForgeOfTheGods;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.model.L2Spawn;
|
||||
import com.l2jserver.gameserver.model.L2Territory;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.util.Rnd;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Tar Beetle zone spawn
|
||||
* @author malyelfik
|
||||
*/
|
||||
public class TarBeetleSpawn implements IXmlReader
|
||||
{
|
||||
private final List<SpawnZone> zones = new ArrayList<>();
|
||||
private ScheduledFuture<?> spawnTask;
|
||||
private ScheduledFuture<?> shotTask;
|
||||
|
||||
public TarBeetleSpawn()
|
||||
{
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
parseDatapackFile("spawnZones/tar_beetle.xml");
|
||||
if (!zones.isEmpty())
|
||||
{
|
||||
spawnTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(() -> zones.forEach(SpawnZone::refreshSpawn), 1000, 60000);
|
||||
shotTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(() -> zones.forEach(SpawnZone::refreshShots), 300000, 300000);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseDocument(Document doc)
|
||||
{
|
||||
int i = 0;
|
||||
for (Node d = doc.getFirstChild(); d != null; d = d.getNextSibling())
|
||||
{
|
||||
if (d.getNodeName().equals("list"))
|
||||
{
|
||||
for (Node r = d.getFirstChild(); r != null; r = r.getNextSibling())
|
||||
{
|
||||
if (r.getNodeName().equals("spawnZone"))
|
||||
{
|
||||
NamedNodeMap attrs = r.getAttributes();
|
||||
final int npcCount = parseInteger(attrs, "maxNpcCount");
|
||||
final SpawnZone sp = new SpawnZone(npcCount, i);
|
||||
for (Node b = r.getFirstChild(); b != null; b = b.getNextSibling())
|
||||
{
|
||||
if (b.getNodeName().equals("zone"))
|
||||
{
|
||||
attrs = b.getAttributes();
|
||||
final int minZ = parseInteger(attrs, "minZ");
|
||||
final int maxZ = parseInteger(attrs, "maxZ");
|
||||
final Zone zone = new Zone();
|
||||
for (Node c = b.getFirstChild(); c != null; c = c.getNextSibling())
|
||||
{
|
||||
attrs = c.getAttributes();
|
||||
if (c.getNodeName().equals("point"))
|
||||
{
|
||||
final int x = parseInteger(attrs, "x");
|
||||
final int y = parseInteger(attrs, "y");
|
||||
zone.add(x, y, minZ, maxZ, 0);
|
||||
}
|
||||
else if (c.getNodeName().equals("bannedZone"))
|
||||
{
|
||||
final Zone bannedZone = new Zone();
|
||||
final int bMinZ = parseInteger(attrs, "minZ");
|
||||
final int bMaxZ = parseInteger(attrs, "maxZ");
|
||||
for (Node f = c.getFirstChild(); f != null; f = f.getNextSibling())
|
||||
{
|
||||
if (f.getNodeName().equals("point"))
|
||||
{
|
||||
attrs = f.getAttributes();
|
||||
int x = parseInteger(attrs, "x");
|
||||
int y = parseInteger(attrs, "y");
|
||||
bannedZone.add(x, y, bMinZ, bMaxZ, 0);
|
||||
}
|
||||
}
|
||||
zone.addBannedZone(bannedZone);
|
||||
}
|
||||
}
|
||||
sp.addZone(zone);
|
||||
}
|
||||
}
|
||||
zones.add(i++, sp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void unload()
|
||||
{
|
||||
if (spawnTask != null)
|
||||
{
|
||||
spawnTask.cancel(false);
|
||||
}
|
||||
if (shotTask != null)
|
||||
{
|
||||
shotTask.cancel(false);
|
||||
}
|
||||
zones.forEach(SpawnZone::unload);
|
||||
zones.clear();
|
||||
}
|
||||
|
||||
public final void removeBeetle(L2Npc npc)
|
||||
{
|
||||
zones.get(npc.getVariables().getInt("zoneIndex", 0)).removeSpawn(npc);
|
||||
npc.deleteMe();
|
||||
}
|
||||
|
||||
private final class Zone extends L2Territory
|
||||
{
|
||||
private List<Zone> _bannedZones;
|
||||
|
||||
public Zone()
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location getRandomPoint()
|
||||
{
|
||||
Location location = super.getRandomPoint();
|
||||
while ((location != null) && isInsideBannedZone(location))
|
||||
{
|
||||
location = super.getRandomPoint();
|
||||
}
|
||||
return location;
|
||||
}
|
||||
|
||||
public final void addBannedZone(Zone bZone)
|
||||
{
|
||||
if (_bannedZones == null)
|
||||
{
|
||||
_bannedZones = new ArrayList<>();
|
||||
}
|
||||
_bannedZones.add(bZone);
|
||||
}
|
||||
|
||||
private final boolean isInsideBannedZone(Location location)
|
||||
{
|
||||
if (_bannedZones != null)
|
||||
{
|
||||
for (Zone z : _bannedZones)
|
||||
{
|
||||
if (z.isInside(location.getX(), location.getY()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private final class SpawnZone
|
||||
{
|
||||
private final List<Zone> _zones = new ArrayList<>();
|
||||
private final List<L2Npc> _spawn = new CopyOnWriteArrayList<>();
|
||||
private final int _maxNpcCount;
|
||||
private final int _index;
|
||||
|
||||
public SpawnZone(int maxNpcCount, int index)
|
||||
{
|
||||
_maxNpcCount = maxNpcCount;
|
||||
_index = index;
|
||||
}
|
||||
|
||||
public final void addZone(Zone zone)
|
||||
{
|
||||
_zones.add(zone);
|
||||
}
|
||||
|
||||
public final void removeSpawn(L2Npc obj)
|
||||
{
|
||||
_spawn.remove(obj);
|
||||
}
|
||||
|
||||
public final void unload()
|
||||
{
|
||||
_spawn.forEach(L2Npc::deleteMe);
|
||||
_spawn.clear();
|
||||
_zones.clear();
|
||||
}
|
||||
|
||||
public final void refreshSpawn()
|
||||
{
|
||||
try
|
||||
{
|
||||
while (_spawn.size() < _maxNpcCount)
|
||||
{
|
||||
final Location location = _zones.get(Rnd.get(_zones.size())).getRandomPoint();
|
||||
if (location != null)
|
||||
{
|
||||
final L2Spawn spawn = new L2Spawn(18804);
|
||||
spawn.setHeading(Rnd.get(65535));
|
||||
spawn.setX(location.getX());
|
||||
spawn.setY(location.getY());
|
||||
spawn.setZ(GeoData.getInstance().getSpawnHeight(location));
|
||||
|
||||
final L2Npc npc = spawn.doSpawn();
|
||||
npc.setIsNoRndWalk(true);
|
||||
npc.setIsImmobilized(true);
|
||||
npc.setIsInvul(true);
|
||||
npc.disableCoreAI(true);
|
||||
npc.setScriptValue(5);
|
||||
npc.getVariables().set("zoneIndex", _index);
|
||||
_spawn.add(npc);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public final void refreshShots()
|
||||
{
|
||||
if (_spawn.size() > 0)
|
||||
{
|
||||
for (L2Npc npc : _spawn)
|
||||
{
|
||||
final int val = npc.getScriptValue();
|
||||
if (val == 5)
|
||||
{
|
||||
npc.deleteMe();
|
||||
_spawn.remove(npc);
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(val + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Blacksmith of Mammon:<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 778">Craft R-Grade Dual Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 779">Bestow Special Ability on R-Grade Weapon</Button>
|
||||
<!--<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262517">Change Special Ability of R-Grade Weapon</Button>-->
|
||||
<!--<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262518">Change Special Ability of R95-Grade Weapon</Button>-->
|
||||
</body></html>
|
@@ -1,8 +0,0 @@
|
||||
<html><body>Blacksmith of Mammon:<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 216">Craft S-Grade Dual Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262501">Bestow Special Ability on S-Grade Weapon</Button>
|
||||
<!--<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262514">Change Special Ability of S-Grade Weapon</Button>-->
|
||||
<!--<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262515">Change Special Ability of S80-Grade Weapon</Button>-->
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262504">Remove Seal from S-Grade Armor</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262505">Remove Seal from S-Grade Accessory</Button>
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Blacksmith of Mammon:<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 311262502">Craft A-Grade Dual Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262510">Bestow Special Ability on A-Grade Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-03.html">Change Special Ability of A-Grade Weapon</Button>
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Blacksmith of Mammon:<br>
|
||||
I'll exchange the weapon that you've been using for a weapon that is one level stronger. Pay me the difference in Ancient Adena.<br>
|
||||
There's something you should know. <font color="LEVEL">Special abilities</font> don't transfer. And if you transfer <font color="LEVEL">enchantments</font>, the new weapon will not be enchanted.<br>
|
||||
<Button ALIGN=LEFT ICON="normal" action="bypass -h npc_%objectId%_exc_multisell 311262511">Replace a weapon with an even stronger weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="return" action="bypass -h npc_%objectId%_Quest Mammons 31126.html">Back</Button>
|
||||
</body></html>
|
@@ -1,8 +0,0 @@
|
||||
<html><head><body>Blacksmith of Mammon:<br>
|
||||
I will exchange the weapon for another type of the same grade. For example, you can exchange a mithril dagger for a two-handed claymore of the same grade. But, I have to warn you.<br>
|
||||
First, weapons with <font color="LEVEL">special abilities</font> cannot be exchanged.<br>
|
||||
Second, when exchanging a weapon that has been <font color="LEVEL">enchanted</font> the exchanged weapon will have the same enchantment.<br>
|
||||
<Button ALIGN=LEFT ICON="normal" action="bypass -h npc_%objectId%_exc_multisell 311262512">Exchange a weapon of D-grade to B-grade for a different type</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262519">Exchange an A-grade weapon for a different type</Button>
|
||||
<Button ALIGN=LEFT ICON="return" action="bypass -h npc_%objectId%_Quest Mammons 31126.html">Back</Button>
|
||||
</body></html>
|
@@ -1,8 +0,0 @@
|
||||
<html><head><body>Blacksmith of Mammon:<br>
|
||||
Do you know about the Foundation Items? Even we blacksmiths see them only infrequently.<br>
|
||||
These uncommon items are brought into being by a power than goes beyond mere chance. We Dwarves say that it is the blessing of Maphr.<br>
|
||||
That perfect craftsmanship is beyond the Human race's capacity.<br>
|
||||
It is not, however, beyond mine. Bring me <font color="LEVEL">Mammon's Varnish Enhancer, which is sold by the Merchant of Mammon</font>. Then I will use techniques known only to me to transform the item into something accessible to mortals.<br>
|
||||
Be sure to select a helmet among the rare items that provides you with a useful power. Don't worry if you make the wrong choice, though. You will have another chance to make a selection.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 311262513">Complete a Foundation Item</Button>
|
||||
</body></html>
|
@@ -1,17 +0,0 @@
|
||||
<html><body>Blacksmith of Mammon:<br>
|
||||
May Mammon bless you! I, the Blacksmith of Mammon, have come to offer you arms of the highest quality.<br>
|
||||
I shall mend your weapons and armor with skills that no novice blacksmith could ever hope to imitate.<br>
|
||||
Yet there are a few things I must tell you. Although we Dwarves of Mammon didn't deal in coins of the outside world before, we have changed with the times and now accept them. Also remember that you can only remove seals from A-grade items with village blacksmiths now. Lastly, I can change the status of Bound items for you, if you provide an Unbind Scroll for me.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-01.html">R-grade</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-02.html">S-grade</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-03.html">A-grade</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262509">Remove the special ability from a weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-04.html">Replace a weapon with an even stronger weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-05.html">Replace a weapon with another type of the same grade</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-06.html">Finish a chaotic masterwork item</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262516">Exchange masterwork upper armor for common upper armor.</Button>
|
||||
<!--<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262520">Remove the curse contained in an item or upgrade the item to a blessed item</Button>-->
|
||||
<!--<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262521">Upgrade Amaranthine/Eternal equipment</Button>-->
|
||||
<!--<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262522">Switch Amaranthine/Eternal equipment</Button>-->
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Priest of Mammon:<br>
|
||||
The door to the Necropolis and Catacombs is closed. I heard that the monsters inside were cleaned out by the Goddess of Destruction but... hmm... I don't know.<br>
|
||||
No matter, both the Dawn and Dusk were caught horribly unprepared by Shilen's resurrection. Haha... Because of this, I started taking on the work normally done by the priests of Dawn and Dusk.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 208">"I want to buy some supplies."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 2021">"I'd like to exchange a seal stone for an item."</Button>
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Merchant of Mammon:<br>
|
||||
Elcyum is a mineral found by the Gray Pillar dwarves in the deepest part of the Spine Mountains.<br>
|
||||
Its energies increase an item's upgrade chances. It can also be exchanged for a <font color="LEVEL">Giant's Augmenting Stone</font> that provides advanced augmentation.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 2030">"I want to exchange Elcyum for something."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 2031">"I want to exchange a Giant's Augmenting Stone for something."</Button>
|
||||
</body></html>
|
@@ -1,9 +0,0 @@
|
||||
<html><body>Merchant of Mammon:<br>
|
||||
May Mammon's blessings be upon you! Mammon's guild is here to present our special collection of rare items.<br>
|
||||
Before you start shopping, there's a few things you should know. While we dealt only in Ancient Adena in the past, now we take Adena like any other merchant. Also, you must bring a <font color="LEVEL">Blank Scroll</font> if you plan to purchase an Enchant Scroll. If you bring us Soul Crystal Fragments, we can make them into whole Soul Crystals. We also have <font color="LEVEL">Elcyum</font> upgrade items. And don't forget to check out our Augmenting Stones!.<br>
|
||||
Remember, local tax rates apply! <br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 207">"I want to buy something."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 777">"I want to exchange a Rare Soul Crystal for something else."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_TerritoryStatus">"Can you tell me about the local lord and tax rate?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 33739-01.html">"I want to take a look at some Elcyum."</Button>
|
||||
</body></html>
|
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.npc.Mammons;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.util.Broadcast;
|
||||
|
||||
/**
|
||||
* Mammons AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Mammons extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int MAMMONS[] =
|
||||
{
|
||||
31126, // Blacksmith of Mammon
|
||||
33739, // Priest of Mammon
|
||||
33511, // Merchant of Mammon
|
||||
};
|
||||
// Locations
|
||||
private static final Location[] BLACKSMITH_LOC =
|
||||
{
|
||||
new Location(146873, 29448, -2264, 0), // Aden
|
||||
new Location(81266, 150091, -3528, 891), // Giran
|
||||
new Location(42825, -41337, -2184), // Rune
|
||||
};
|
||||
private static Location[] MERCHANT_LOC =
|
||||
{
|
||||
new Location(146872, 29569, -2264, 0), // Aden
|
||||
new Location(81272, 150041, -3528, 891), // Giran
|
||||
new Location(42803, -41283, -2184, 37972), // Rune
|
||||
};
|
||||
private static Location[] PRIEST_LOC =
|
||||
{
|
||||
new Location(146882, 29665, -2264, 0), // Aden
|
||||
new Location(81284, 150155, -3528, 891), // Giran
|
||||
new Location(42784, -41236, -2192, 37972), // Rune
|
||||
};
|
||||
// Misc
|
||||
private static String[] TOWN_NAME =
|
||||
{
|
||||
"Town of Aden",
|
||||
"Town of Giran",
|
||||
"Town of Rune",
|
||||
};
|
||||
private static final int TELEPORT_DELAY = 1800000; // 30min
|
||||
private static final List<L2Npc> _mammons = new ArrayList<>();
|
||||
|
||||
private Mammons()
|
||||
{
|
||||
super(Mammons.class.getSimpleName(), "ai/npc");
|
||||
addStartNpc(MAMMONS);
|
||||
addTalkId(MAMMONS);
|
||||
addFirstTalkId(MAMMONS);
|
||||
|
||||
onAdvEvent("RESPAWN_MAMMONS", null, null);
|
||||
startQuestTimer("RESPAWN_MAMMONS", TELEPORT_DELAY, null, null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "31126.html":
|
||||
case "31126-01.html":
|
||||
case "31126-02.html":
|
||||
case "31126-03.html":
|
||||
case "31126-04.html":
|
||||
case "31126-05.html":
|
||||
case "31126-06.html":
|
||||
case "33739-01.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "RESPAWN_MAMMONS":
|
||||
{
|
||||
if (!_mammons.isEmpty())
|
||||
{
|
||||
_mammons.stream().filter(Objects::nonNull).forEach(L2Npc::deleteMe);
|
||||
_mammons.clear();
|
||||
}
|
||||
final int town = getRandom(3);
|
||||
final L2Npc blacksmith = addSpawn(MAMMONS[0], BLACKSMITH_LOC[town]);
|
||||
final L2Npc merchant = addSpawn(MAMMONS[1], MERCHANT_LOC[town]);
|
||||
final L2Npc priest = addSpawn(MAMMONS[2], PRIEST_LOC[town]);
|
||||
_mammons.addAll(Arrays.asList(blacksmith, merchant, priest));
|
||||
|
||||
if (blacksmith != null)
|
||||
{
|
||||
broadcastNpcSay(blacksmith, ChatType.NPC_GENERAL, NpcStringId.I_HAVE_SOME_EXCELLENT_WEAPONS_TO_SHOW_YOU);
|
||||
}
|
||||
|
||||
if (Config.ANNOUNCE_MAMMON_SPAWN)
|
||||
{
|
||||
Broadcast.toAllOnlinePlayers("Mammon's has been spawned in " + TOWN_NAME[town] + ".", false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Mammons();
|
||||
}
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Rignos:<br>
|
||||
Marvellous! So, have you collected all 4 Race Stamps? You haven't taken any shortcuts or copied any of them, have you? Excellent! Then take this key -- it will prove useful when rescuing Parme!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Rignos exchange">Exchange Race Stamps for the Secret Garden Key.</Button>
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Rignos:<br>
|
||||
Welcome, welcome! I am Rignos. Parme and I are old friends, so I've come here to help. It's been a long time since I've traveled this far, but beautiful Isle of Prayer always makes me feel like I'm on vacation. Now then, how can I help? A race! You know what I always say, "Joy and energy, all the time and in every way!" I call it the <font color="LEVEL">Grand Isle of Prayer Race</font>!<br>
|
||||
You're a little late, though -- the race is already underway!<br>
|
||||
Come back another time.
|
||||
</body></html>
|
@@ -1,5 +0,0 @@
|
||||
<html><body>Rignos:<br>
|
||||
You have 30 minutes to find three other structures just like the one behind me. They are scattered around the island. Once you find them, go inside and battle the opponents you find there. One of these combatants will drop a Race Stamp. Bring 4 Race Stamps to me within the allotted time, and I will give you a reward that will aid you in your endeavor to rescue Parme.<br>
|
||||
Don't forget to include the building behind me!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Rignos startRace">I'm ready! Let's start the race.</Button>
|
||||
</body></html>
|
@@ -1,6 +0,0 @@
|
||||
<html><body>Rignos:<br>
|
||||
Welcome, welcome! I am Rignos. Parme and I are old friends, so I've come here to help. It's been a long time since I've traveled this far, but the beautiful Isle of Prayer always makes me feel like I'm on vacation. Now then, how can I help? A race! You know what I always say, "Joy and energy, all the time and in every way!" I call it the <font color="LEVEL">Grand Isle of Prayer Race</font>!<br>
|
||||
You do know what this means, don't you?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Rignos 32349-03.html">Ask about the Grand Isle of Prayer Race.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Rignos startRace">Start the Race.</Button>
|
||||
</body></html>
|
@@ -1,118 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.npc.Rignos;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
|
||||
/**
|
||||
* Rignos AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public class Rignos extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private static final int RIGNOS = 32349; // Rignos
|
||||
// Item
|
||||
private static final int STAMP = 10013; // Race Stamp
|
||||
private static final int KEY = 9694; // Secret Key
|
||||
// Skill
|
||||
private static final SkillHolder TIMER = new SkillHolder(5239, 5); // Event Timer
|
||||
// Misc
|
||||
private static final int MIN_LV = 78;
|
||||
|
||||
private Rignos()
|
||||
{
|
||||
super(Rignos.class.getSimpleName(), "ai/npc");
|
||||
addStartNpc(RIGNOS);
|
||||
addTalkId(RIGNOS);
|
||||
addFirstTalkId(RIGNOS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "32349-03.html":
|
||||
{
|
||||
return event;
|
||||
}
|
||||
case "startRace":
|
||||
{
|
||||
if (npc.isScriptValue(0))
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
startQuestTimer("TIME_OUT", 1800000, npc, null);
|
||||
TIMER.getSkill().applyEffects(player, player);
|
||||
final L2Summon pet = player.getPet();
|
||||
if (pet != null)
|
||||
{
|
||||
TIMER.getSkill().applyEffects(pet, pet);
|
||||
}
|
||||
player.getServitors().values().forEach(s ->
|
||||
{
|
||||
TIMER.getSkill().applyEffects(s, s);
|
||||
});
|
||||
|
||||
if (hasQuestItems(player, STAMP))
|
||||
{
|
||||
takeItems(player, STAMP, -1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "exchange":
|
||||
{
|
||||
if (getQuestItemsCount(player, STAMP) >= 4)
|
||||
{
|
||||
giveItems(player, KEY, 3);
|
||||
takeItems(player, STAMP, -1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "TIME_OUT":
|
||||
{
|
||||
npc.setScriptValue(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = (npc.isScriptValue(0) && (player.getLevel() >= MIN_LV)) ? "32349.html" : "32349-02.html";
|
||||
if (getQuestItemsCount(player, STAMP) >= 4)
|
||||
{
|
||||
htmltext = "32349-01.html";
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Rignos();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user