Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01.html
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01.html (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01.html (working copy)
- @@ -0,0 +1,9 @@
- +<html><body>Roiental:<br>
- +Heroes whose strength grows day after day can put their abilities to the test and ascend the renovated Throne of Heroes.<br>
- +If you want to challenge Goldberg, you need to be a member of a <font color="LEVEL">Lv. 7 clan</font>. To fight Mary Reed your clan needs to be at least <font color="LEVEL">Lv. 10</font>, while Tauti can only be confronted by a <font color="LEVEL">Lv. 13 clan</font>.<br>
- +The request to enter the Throne of Heroes can only be submitted by the clan leader of a clan member who has been granted the requisite authority.<br>
- +So, what would you like?<br>
- +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Roiental enterGoldberg">Go to Throne of Heroes - Goldberg</Button>
- +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Roiental enterMaryReed">Go to Throne of Heroes - Mary Reed</Button>
- +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Roiental enterTauti">Go to Throne of Heroes - Tauti</Button>
- +</body></html>
- \ No newline at end of file
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01a.html
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01a.html (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01a.html (working copy)
- @@ -0,0 +1,7 @@
- +<html><body>Roiental:<br>
- +Heroes whose strength grows day after day can put their abilities to the test and ascend the renovated Throne of Heroes.<br>
- +If you want to challenge Goldberg, you need to be a member of a <font color="LEVEL">Lv. 7 clan</font>.<br>
- +The request to enter the Throne of Heroes can only be submitted by the clan leader of a clan member who has been granted the requisite authority.<br>
- +So, would you like to enter?<br>
- +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ThroneOfHeroesGoldberg enterInstance">Yes go to Throne of Heroes - Goldberg</Button>
- +</body></html>
- \ No newline at end of file
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01b.html
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01b.html (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01b.html (working copy)
- @@ -0,0 +1,7 @@
- +<html><body>Roiental:<br>
- +Heroes whose strength grows day after day can put their abilities to the test and ascend the renovated Throne of Heroes.<br>
- +If you want to challenge Mary Reed your clan needs to be at least <font color="LEVEL">Lv. 10</font>.<br>
- +The request to enter the Throne of Heroes can only be submitted by the clan leader of a clan member who has been granted the requisite authority.<br>
- +So, would you like to enter?<br>
- +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ThroneOfHeroesMaryReed enterInstance">Yes go to Throne of Heroes - Mary Reed</Button>
- +</body></html>
- \ No newline at end of file
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01c.html
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01c.html (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01c.html (working copy)
- @@ -0,0 +1,7 @@
- +<html><body>Roiental:<br>
- +Heroes whose strength grows day after day can put their abilities to the test and ascend the renovated Throne of Heroes.<br>
- +If you want to challenge Tauti, you need to be a member of a <font color="LEVEL">Lv. 13 clan</font>.<br>
- +The request to enter the Throne of Heroes can only be submitted by the clan leader of a clan member who has been granted the requisite authority.<br>
- +So, would you like to enter?<br>
- +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ThroneOfHeroesTauti enterInstance">Yes go to Throne of Heroes - Tauti</Button>
- +</body></html>
- \ No newline at end of file
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02a.html
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02a.html (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02a.html (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>Roiental:<br>
- +Your party members are participating in battle. I'll move you to them.<br>
- +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ThroneOfHeroesGoldberg reenterInstance">"Thanks!"</Button>
- +</body></html>
- \ No newline at end of file
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02b.html
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02b.html (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02b.html (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>Roiental:<br>
- +Your party members are participating in battle. I'll move you to them.<br>
- +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ThroneOfHeroesMaryReed reenterInstance">"Thanks!"</Button>
- +</body></html>
- \ No newline at end of file
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02c.html
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02c.html (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02c.html (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>Roiental:<br>
- +Your party members are participating in battle. I'll move you to them.<br>
- +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ThroneOfHeroesTauti reenterInstance">"Thanks!"</Button>
- +</body></html>
- \ No newline at end of file
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03a.html
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03a.html (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03a.html (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>Roiental:<br>
- +You are not a clan member or your clan hasn't reached Lv. 7 yet.<br>
- +(The Throne of Heroes can only be ascended by members of a command channel from the same clan (4-100 participants). The clan must have reached Lv. 7.)
- +</body></html>
- \ No newline at end of file
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03b.html
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03b.html (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03b.html (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>Roiental:<br>
- +You are not a clan member or your clan hasn't reached Lv. 10 yet.<br>
- +(The Throne of Heroes can only be ascended by members of a command channel from the same clan (4-100 participants). The clan must have reached Lv. 10.)
- +</body></html>
- \ No newline at end of file
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03c.html
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03c.html (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03c.html (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>Roiental:<br>
- +You are not a clan member or your clan hasn't reached Lv. 13 yet.<br>
- +(The Throne of Heroes can only be ascended by members of a command channel from the same clan (4-100 participants). The clan must have reached Lv. 13.)
- +</body></html>
- \ No newline at end of file
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-AlreadyDone.html
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-AlreadyDone.html (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-AlreadyDone.html (working copy)
- @@ -0,0 +1,3 @@
- +<html><body>Roiental:<br>
- +Your clan mates already challenged one of the Throne of Heroes raids today.<br>
- +</body></html>
- \ No newline at end of file
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-NoLevel.html
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-NoLevel.html (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-NoLevel.html (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>Roiental:<br>
- +You are not strong enough yet.<br>
- +(The Throne of Heroes can only be ascended by characters of level 110 or above.)
- +</body></html>
- \ No newline at end of file
- Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental.java
- ===================================================================
- --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental.java (nonexistent)
- +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental.java (working copy)
- @@ -0,0 +1,142 @@
- +/*
- + * 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.areas.Rune.Roiental;
- +
- +import org.l2jmobius.gameserver.instancemanager.InstanceManager;
- +import org.l2jmobius.gameserver.model.actor.Npc;
- +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- +import org.l2jmobius.gameserver.model.instancezone.Instance;
- +
- +import ai.AbstractNpcAI;
- +
- +/**
- + * Roiental AI.
- + * @author CostyKiller
- + */
- +public class Roiental extends AbstractNpcAI
- +{
- + // NPCs
- + private static final int ROIENTAL = 34571;
- + // Misc
- + private static final int TOH_GB_TEMPLATE_ID = 307; // Throne of Heroes - Goldberg
- + private static final int TOH_MR_TEMPLATE_ID = 308; // Throne of Heroes - Mary Reed
- + private static final int TOH_TA_TEMPLATE_ID = 309; // Throne of Heroes - Tauti
- + private static final int MIN_LVL = 110;
- + private static final int CLAN_MIN_LVL_GB = 7;
- + private static final int CLAN_MIN_LVL_MR = 10;
- + private static final int CLAN_MIN_LVL_TA = 13;
- +
- + private Roiental()
- + {
- + addStartNpc(ROIENTAL);
- + addFirstTalkId(ROIENTAL);
- + addTalkId(ROIENTAL);
- + }
- +
- + @Override
- + public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- + {
- + String htmltext = null;
- + if (event.equals("enterGoldberg"))
- + {
- + if (player.getLevel() < MIN_LVL)
- + {
- + htmltext = "Roiental-NoLevel.html";
- + }
- + else if ((player.getClan() == null) || (player.getClan().getLevel() < CLAN_MIN_LVL_GB))
- + {
- + htmltext = "Roiental-03a.html";
- + }
- + else if ((player.getClan() == null) || player.getClan().getVariables().hasVariable("TOH_DONE"))
- + {
- + htmltext = "Roiental-AlreadyDone.html";
- + }
- + else
- + {
- + htmltext = "Roiental-01a.html";
- + }
- + }
- + if (event.equals("enterMaryReed"))
- + {
- + if (player.getLevel() < MIN_LVL)
- + {
- + htmltext = "Roiental-NoLevel.html";
- + }
- + else if ((player.getClan() == null) || (player.getClan().getLevel() < CLAN_MIN_LVL_MR))
- + {
- + htmltext = "Roiental-03b.html";
- + }
- + else if ((player.getClan() == null) || player.getClan().getVariables().hasVariable("TOH_DONE"))
- + {
- + htmltext = "Roiental-AlreadyDone.html";
- + }
- + else
- + {
- + htmltext = "Roiental-01b.html";
- + }
- + }
- + if (event.equals("enterTauti"))
- + {
- + if (player.getLevel() < MIN_LVL)
- + {
- + htmltext = "Roiental-NoLevel.html";
- + }
- + else if ((player.getClan() == null) || (player.getClan().getLevel() < CLAN_MIN_LVL_TA))
- + {
- + htmltext = "Roiental-03c.html";
- + }
- + else if ((player.getClan() == null) || player.getClan().getVariables().hasVariable("TOH_DONE"))
- + {
- + htmltext = "Roiental-AlreadyDone.html";
- + }
- + else
- + {
- + htmltext = "Roiental-01c.html";
- + }
- + }
- + return htmltext;
- + }
- +
- + @Override
- + public String onFirstTalk(Npc npc, PlayerInstance player)
- + {
- + String htmltext = null;
- + final Instance instance = InstanceManager.getInstance().getPlayerInstance(player, false);
- + if ((instance != null) && ((instance.getTemplateId() == TOH_GB_TEMPLATE_ID)))
- + {
- + htmltext = "Roiental-02a.html";
- + }
- + else if ((instance != null) && ((instance.getTemplateId() == TOH_MR_TEMPLATE_ID)))
- + {
- + htmltext = "Roiental-02b.html";
- + }
- + else if ((instance != null) && ((instance.getTemplateId() == TOH_TA_TEMPLATE_ID)))
- + {
- + htmltext = "Roiental-02c.html";
- + }
- + else
- + {
- + htmltext = "Roiental-01.html";
- + }
- + return htmltext;
- + }
- +
- + public static void main(String[] args)
- + {
- + new Roiental();
- + }
- +}
- \ No newline at end of file
- Index: dist/game/data/spawns/Rune/TownOfRune.xml
- ===================================================================
- --- dist/game/data/spawns/Rune/TownOfRune.xml (revision 8419)
- +++ dist/game/data/spawns/Rune/TownOfRune.xml (working copy)
- @@ -151,6 +151,7 @@
- <npc id="30981" x="44040" y="-47336" z="-804" heading="16383" respawnTime="60sec" /> <!-- Dark Judge -->
- <npc id="31126" x="43712" y="-47208" z="-802" heading="21220" respawnTime="60sec" /> <!-- Blacksmith of Mammon -->
- <npc id="33737" x="43790" y="-47194" z="-802" heading="19739" respawnTime="60sec" /> <!-- Merchant of Mammon -->
- + <npc id="34571" x="45432" y="-49880" z="-799" heading="23924" respawnTime="60sec" /> <!-- Roiental -->
- </group>
- </spawn>
- </list>
- \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement