This commit is contained in:
118
trunk/dist/game/data/scripts/ai/npc/MonumentOfHeroes/MonumentOfHeroes.java
vendored
Normal file
118
trunk/dist/game/data/scripts/ai/npc/MonumentOfHeroes/MonumentOfHeroes.java
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 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.MonumentOfHeroes;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Monument of Heroes AI.
|
||||
* @author Adry_85
|
||||
*/
|
||||
public final class MonumentOfHeroes extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int[] MONUMENTS =
|
||||
{
|
||||
31690,
|
||||
31769,
|
||||
31770,
|
||||
31771,
|
||||
31772
|
||||
};
|
||||
// Items
|
||||
private static final int WINGS_OF_DESTINY_CIRCLET = 6842;
|
||||
private static final int[] WEAPONS =
|
||||
{
|
||||
6611, // Infinity Blade
|
||||
6612, // Infinity Cleaver
|
||||
6613, // Infinity Axe
|
||||
6614, // Infinity Rod
|
||||
6615, // Infinity Crusher
|
||||
6616, // Infinity Scepter
|
||||
6617, // Infinity Stinger
|
||||
6618, // Infinity Fang
|
||||
6619, // Infinity Bow
|
||||
6620, // Infinity Wing
|
||||
6621, // Infinity Spear
|
||||
9388, // Infinity Rapier
|
||||
9389, // Infinity Sword
|
||||
9390, // Infinity Shooter
|
||||
};
|
||||
|
||||
private MonumentOfHeroes()
|
||||
{
|
||||
super(MonumentOfHeroes.class.getSimpleName(), "ai/npc");
|
||||
addStartNpc(MONUMENTS);
|
||||
addTalkId(MONUMENTS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "HeroWeapon":
|
||||
{
|
||||
if (player.isHero())
|
||||
{
|
||||
return hasAtLeastOneQuestItem(player, WEAPONS) ? "already_have_weapon.htm" : "weapon_list.htm";
|
||||
}
|
||||
return "no_hero_weapon.htm";
|
||||
}
|
||||
case "HeroCirclet":
|
||||
{
|
||||
if (player.isHero())
|
||||
{
|
||||
if (!hasQuestItems(player, WINGS_OF_DESTINY_CIRCLET))
|
||||
{
|
||||
giveItems(player, WINGS_OF_DESTINY_CIRCLET, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return "already_have_circlet.htm";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "no_hero_circlet.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
int weaponId = Integer.parseInt(event);
|
||||
if (Util.contains(WEAPONS, weaponId))
|
||||
{
|
||||
giveItems(player, weaponId, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new MonumentOfHeroes();
|
||||
}
|
||||
}
|
11
trunk/dist/game/data/scripts/ai/npc/MonumentOfHeroes/already_have_circlet.htm
vendored
Normal file
11
trunk/dist/game/data/scripts/ai/npc/MonumentOfHeroes/already_have_circlet.htm
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<html><body scroll="no">
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td height=34></td></tr>
|
||||
<tr><td align=center>You already received the Wings of Destiny Circlet.</td></tr>
|
||||
<tr><td height=10></td></tr>
|
||||
<tr><td align=center>You cannot receive again.</td></tr>
|
||||
<tr><td height=34></td></tr>
|
||||
<tr><td align=center><button action="bypass -h npc_%objectId%_Chat 0" value="Back" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Back_Down" fore="L2UI_CT1.OlympiadWnd_DF_Back"></td></tr>
|
||||
<tr><td height=200></td></tr>
|
||||
</table>
|
||||
</body></html>
|
11
trunk/dist/game/data/scripts/ai/npc/MonumentOfHeroes/already_have_weapon.htm
vendored
Normal file
11
trunk/dist/game/data/scripts/ai/npc/MonumentOfHeroes/already_have_weapon.htm
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<html><body scroll="no">
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td height=34></td></tr>
|
||||
<tr><td align=center>You already received a weapon.</td></tr>
|
||||
<tr><td height=10></td></tr>
|
||||
<tr><td align=center>You cannot receive another weapon.</td></tr>
|
||||
<tr><td height=34></td></tr>
|
||||
<tr><td align=center><button action="bypass -h npc_%objectId%_Chat 0" value="Back" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Back_Down" fore="L2UI_CT1.OlympiadWnd_DF_Back"></td></tr>
|
||||
<tr><td height=200></td></tr>
|
||||
</table>
|
||||
</body></html>
|
11
trunk/dist/game/data/scripts/ai/npc/MonumentOfHeroes/no_hero_circlet.htm
vendored
Normal file
11
trunk/dist/game/data/scripts/ai/npc/MonumentOfHeroes/no_hero_circlet.htm
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<html><body scroll="no">
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td height=34></td></tr>
|
||||
<tr><td align=center>You cannot receive the circlet if you are not a hero.</td></tr>
|
||||
<tr><td height=10></td></tr>
|
||||
<tr><td align=center>Please come back next time as a hero.</td></tr>
|
||||
<tr><td height=34></td></tr>
|
||||
<tr><td align=center><button action="bypass -h npc_%objectId%_Chat 0" value="Back" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Back_Down" fore="L2UI_CT1.OlympiadWnd_DF_Back"></td></tr>
|
||||
<tr><td height=200></td></tr>
|
||||
</table>
|
||||
</body></html>
|
11
trunk/dist/game/data/scripts/ai/npc/MonumentOfHeroes/no_hero_weapon.htm
vendored
Normal file
11
trunk/dist/game/data/scripts/ai/npc/MonumentOfHeroes/no_hero_weapon.htm
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<html><body scroll="no">
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td height=34></td></tr>
|
||||
<tr><td align=center>If you are not a hero, you cannot receive a weapon.</td></tr>
|
||||
<tr><td height=10></td></tr>
|
||||
<tr><td align=center>Please come back next time as a hero.</td></tr>
|
||||
<tr><td height=34></td></tr>
|
||||
<tr><td align=center><button action="bypass -h npc_%objectId%_Chat 0" value="Back" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Back_Down" fore="L2UI_CT1.OlympiadWnd_DF_Back"></td></tr>
|
||||
<tr><td height=200></td></tr>
|
||||
</table>
|
||||
</body></html>
|
26
trunk/dist/game/data/scripts/ai/npc/MonumentOfHeroes/weapon_list.htm
vendored
Normal file
26
trunk/dist/game/data/scripts/ai/npc/MonumentOfHeroes/weapon_list.htm
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<html><body>
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="L2UI_CH3.refinewnd_back_Pattern">
|
||||
<tr><td height=34></td></tr>
|
||||
<tr><td align=center>Select a weapon that suits you.</td></tr>
|
||||
<tr><td height=30></td></tr>
|
||||
<tr><td align=center>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 6611" msg="1484;">Infinity Blade (One-Handed Sword)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 6612" msg="1484;">Infinity Cleaver (Two-Handed Sword)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 6613" msg="1484;">Infinity Axe (One-Handed Blunt Weapon)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 6614" msg="1484;">Infinity Rod (One-Handed Blunt Weapon)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 6615" msg="1484;">Infinity Crusher (Two-Handed Blunt Weapon)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 6616" msg="1484;">Infinity Scepter (Two-Handed Staff)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 6617" msg="1484;">Infinity Stinger (Dagger)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 6618" msg="1484;">Infinity Fang (Fist Weapon)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 6619" msg="1484;">Infinity Bow (Bow)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 6620" msg="1484;">Infinity Wing (Dualsword)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 6621" msg="1484;">Infinity Spear (Pole Arm)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 9388" msg="2234;">Infinity Rapier (Kamael-Exclusive Short Sword)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 9389" msg="2234;">Infinity Sword (Kamael-Exclusive Ancient Sword)</a><br>
|
||||
<a action="bypass -h Quest MonumentOfHeroes 9390" msg="2234;">Infinity Shooter (Kamael-Exclusive Crossbow)</a><br>
|
||||
</td></tr>
|
||||
<tr><td height=34></td></tr>
|
||||
<tr><td align=center><button action="bypass -h npc_%objectId%_Chat 0" value="Back" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Back_Down" fore="L2UI_CT1.OlympiadWnd_DF_Back"></td></tr>
|
||||
<tr><td height=30></td></tr>
|
||||
</table>
|
||||
</body></html>
|
Reference in New Issue
Block a user