Under the Shadow of the Ivory Tower
- ID
- 343
- Название
- Under the Shadow of the Ivory Tower
- start_npcs_json
- [30834]
- npc_ids_json
- [30834,30835,30934,30935]
- constants_json
- {"CEMA":30834,"ICARUS":30835,"MARSHA":30934,"TRUMPIN":30935,"ORB":4364,"ECTOPLASM":4365,"CHANCE":50}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00343_UnderTheShadowOfTheIvoryTower/Q00343_UnderTheShadowOfTheIvoryTower.java
NPC квеста
Условия уровней: выражения из Java
if ((st.getPlayer().getPlayerClass().getId() == classId) && (st.getPlayer().getLevel() >= 40))
Выдача предметов, адены и опыта: выражения из Java
giveAdena(player, orbs * 125, true); giveItems(player, ORB, 10); giveItems(player, ORB, 20); giveItems(player, ORB, 20); giveItems(player, ORB, 10); giveItems(player, ORB, 20); giveItems(player, ORB, 10); giveItems(player, ORB, 150); giveItems(player, ORB, 10); giveItems(player, ORB, 30); giveItems(player, ORB, 70); giveItems(player, ORB, 150); giveItems(player, 955, 1); giveItems(player, 951, 1); giveItems(player, 2511, (getRandom(200) + 401)); giveItems(player, 2510, (getRandom(200) + 401)); giveItems(player, 316, 1); giveItems(player, 630, 1); giveItems(player, 188, 1); giveItems(player, 885, 1); giveItems(player, 103, 1); giveItems(player, 917, 1); giveItems(player, 736, 1); giveItems(player, ORB, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30834-01.htm] Magic Trader Cema: Have you heard about Nebulite? It is a mineral often found in meteorites. Processed properly, even a tiny amount tremendous energy. It is quite valuable to those who seek to amplify magical power. The Dwarwes say that Nebulite was used by Titans as their primary source of energy. At that time the mineral was abundant, but the expansion of the titan civilization exhausted most of the precious material. Nowadeys it is quite rare, and can only be found in a few places... Where can Nebulite be found?
[30834-02.htm] Magic Trader Cema: It is well-known that the crater of the Ivory Tower was created by a gigantic meteorite... Hovewer, not many known that the meteorite was composed almost entirely of Nebulite and is currently locked away in the basement of the tower! Those in the Ivory Tower want to keep all Nebulite themselves! Does this seem fair? Should the source of the most powerful magical power on earth be monopolized by few privileged groups? I think not! That Nebulite should be used for the greater public good! Don't you agree? I agree I disagree
[30834-03.htm] Magic Trader Cema: Will you join our research? We are investigation the use of Nebulite for the greater public good. However, we are having a hard time finding Nebilte for our study. The Dwarwen collectors we hired for this task have not been heard from in over a month. Would you do this work for us? Arround the crater of Ivory Tower you will find Manashen Gargoyles, Enchanted Monster Eyes, Enchanted Stone Golems, and Enchanted Iron Golems. They have fallen under the spell of Nebulite Orbs, which are fragments of the meteorite. If you kill these monsters you can easily collect the Nebulite samples we need for our research. You shall be well-compensated for you efforts. Tell me more about the Dwarwen collectors
[30834-04.htm] Magic Trader Cema: Ah yes, the Dwarwes... They are collectors, specialists in rare items. Most collectors belong to the Golden Key Guild, but I have since discovered that those two collectors are notorious for being lazy and playing tricks. I should never have hired them... Sigh...
[30834-05.htm] Magic Trader Cema: You expect something for nothing? Go and bring me those Nebulite Orbs. I quit!
[30834-06.htm] Magic Trader Cema: Good job! So, what do you want? Do you want adena in exchange for the orbs or would you prefer trading them for useful items? You may find a few things among the exchange items that you haven't seen elsewhere. If you have any questions, please ask me. I'll answer your question. Recive money I wish to exchange the orbs for useful items I wish to continue collecting Quit
[30834-07.htm] Magic Trader Cema: We need someone to gather materials for a research project that is being conducted at Harding's Academy. It is imperative that this person be cognizant of the forces of magic. If you know a well-trained Mystic, send him to me. (This quest can only be undertaken by non-orc Mistics level 40 and higher)
[30834-08.htm] Magic Trader Cema: Thank you for your work! Would you like to continue or would you like to quit? I quit! I will continue!
[30834-09.htm] Magic Trader Cema: What a pitty that you want to quit... See you soon!
[30835-01.htm] Lich King Icarus: What a miserable state I'm in, neither dead or alive, just here. What's the point? I'm undead... No hope for me. The liqueur supplied by my students is all that keeps me going these days. I get drunk and imagine that I can feel warmth of life folowing throught my veins once again... Oh, I suppose you are wondering how an undead can drink liqueur? Have you heard of Ectoplazm Liqueur? That stuff will raise a corpse from his grave to dance! It is so strong that even my old, rotten tongue twitches at its taste. Ahhhh... What I would give for a sip right now!.. Give him some Ectoplazm Liqueur
[30835-02.htm] Lich King Icarus: Ahhhh... Thanks! This is for you...
[30835-03.htm] Lich King Icarus: You don't have Ectoplazm Liqueur! Go away!
[30934-01.htm] Collector Marsha: Would you like to gamble for those orbs? "Yes!"
[30934-02.htm] Collector Marsha: We will play a game of Rock/Paper/Scissors with you for an ante of 10 nebulite orbs - you bet 10 orbs to begin the game. If you win you receive 20, if you draw you get your 10 orbs back, and if you lose I keep all orbs. "Ok I'm ready!"
[30934-03.htm] Collector Marsha: Ok! Let us begin! You choose! "Rock!" "Paper!" "Scissors!"
[30934-04.htm] Collector Marsha: Damn, you WON! "One more time!"
[30934-05.htm] Collector Marsha: It's a DRAW! "Lets try one more time!"
[30934-06.htm] Collector Marsha: Hahaha! You LOST! "Bring it on!"
[30935-01.htm] Collector Trumpin: Ah, it seems we have common interests... You also seek Nebulite Orbs for Magic Trader Cema? I can't continue right now, I must return to the village and rest my back... Would you care to play a game of chance to try and win the Nebulite Orbs I've collected so far? It's a simple coin-toss game. Tell me the rules of the game Play the game Quit
[30935-02.htm] Collector Trumpin: We will play a simple coin-tossing game - you choose head or tails, if you're right you win 10 orbs, if you're wrong you loose 10. If you get two right in a row, you will get 30 orbs! Ok I'm ready!
[30935-03.htm] Collector Trumpin: Ok! Let us begin! You choose! Tail! Head!
[30935-04.htm] Collector Trumpin: Damn, you WON! Do you want paly next round? One more time! No, give me my winnings
[30935-05.htm] Collector Trumpin: Hahaha, you LOST! Lets try one more time!
[30935-06.htm] Collector Trumpin: Congradulations! That's your reward! Do you want to play a new game? Play a new game Quit
[30935-07.htm] Collector Trumpin: You are excelent player! Sorry, but I can't continue palying this game. Do you want to play a new game? Play a new game Quit
[30935-quit.htm] Collector Trumpin: Oh well, it's your loss. What am I going to do with all these Nebulite Orbs? If you change your mind, come back to see me. I'll be here resting my back.
[30935-rules.htm] Collector Trumpin: The rules are simple: I will toss a coin in the air and you guess and call out which side you think it will land on, heads or tails. Let's try it. If you win the first round, you can either receive 10 Nebulite Orbs or play a second round. If you win in the second round, you can either receive 30 Nebulite Orbs or play a third round. As you keep winning rounds, the stakes will become progressively larger. Oh, there's one last thing I need to explain... If you lose you must give me 10 Nebulite Orbs. It's only fair, don't you think?
[default.htm] I have nothing to say you.
[noorbs.htm] You dont have enough orbs! Come back when you have some!
Исходник условий и наград (Java)
/*
* Copyright (c) 2013 L2jMobius
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package quests.Q00343_UnderTheShadowOfTheIvoryTower;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
/**
* Adapted from FirstTeam Interlude
*/
public class Q00343_UnderTheShadowOfTheIvoryTower extends Quest
{
// NPCs
private static final int CEMA = 30834;
private static final int ICARUS = 30835;
private static final int MARSHA = 30934;
private static final int TRUMPIN = 30935;
private static final int[] MONSTERS =
{
20563,
20564,
20565,
20566
};
// Items
private static final int ORB = 4364;
private static final int ECTOPLASM = 4365;
// Misc
private static final int CHANCE = 50;
private static final int[] ALLOWED_CLASSES =
{
11,
12,
13,
14,
26,
27,
28,
39,
40,
41
};
public Q00343_UnderTheShadowOfTheIvoryTower()
{
super(343, "Under the Shadow of the Ivory Tower");
addStartNpc(CEMA);
addTalkId(CEMA, ICARUS, MARSHA, TRUMPIN);
addKillId(MONSTERS);
registerQuestItems(ORB);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
final int random1 = getRandom(3);
final int random2 = getRandom(2);
final int orbs = getQuestItemsCount(player, ORB);
switch (event)
{
case "30834-03.htm":
{
st.startQuest();
break;
}
case "30834-08.htm":
{
if (orbs > 0)
{
giveAdena(player, orbs * 125, true);
takeItems(player, ORB, -1);
}
else
{
htmltext = "30834-08.htm";
}
break;
}
case "30834-09.htm":
{
st.exitQuest(true, true);
break;
}
case "30934-02.htm":
case "30934-03.htm":
{
if (orbs < 10)
{
htmltext = "noorbs.htm";
}
else if ("30934-03.htm".equals(event))
{
if (orbs >= 10)
{
takeItems(player, ORB, 10);
st.set("playing", "1");
}
else
{
htmltext = "noorbs.htm";
}
}
break;
}
case "30934-04.htm":
{
if (st.getInt("playing") > 0)
{
switch (random1)
{
case 0:
{
htmltext = "30934-05.htm";
giveItems(player, ORB, 10);
break;
}
case 1:
{
htmltext = "30934-06.htm";
break;
}
default:
{
htmltext = "30934-04.htm";
giveItems(player, ORB, 20);
break;
}
}
st.unset("playing");
}
else
{
htmltext = "Player is cheating";
takeItems(player, ORB, -1);
st.exitQuest(true);
}
break;
}
case "30934-05.htm":
{
if (st.getInt("playing") > 0)
{
switch (random1)
{
case 0:
{
htmltext = "30934-04.htm";
giveItems(player, ORB, 20);
break;
}
case 1:
{
htmltext = "30934-05.htm";
giveItems(player, ORB, 10);
break;
}
default:
{
htmltext = "30934-06.htm";
break;
}
}
st.unset("playing");
}
else
{
htmltext = "Player is cheating";
takeItems(player, ORB, -1);
st.exitQuest(true);
}
break;
}
case "30934-06.htm":
{
if (st.getInt("playing") > 0)
{
switch (random1)
{
case 0:
{
htmltext = "30934-04.htm";
giveItems(player, ORB, 20);
break;
}
case 1:
{
htmltext = "30934-06.htm";
break;
}
default:
{
htmltext = "30934-05.htm";
giveItems(player, ORB, 10);
break;
}
}
st.unset("playing");
}
else
{
htmltext = "Player is cheating";
takeItems(player, ORB, -1);
st.exitQuest(true);
}
break;
}
case "30935-02.htm":
case "30935-03.htm":
{
st.unset("toss");
if (orbs < 10)
{
htmltext = "noorbs.htm";
}
break;
}
case "30935-05.htm":
{
if (orbs >= 10)
{
if (random2 == 0)
{
final int toss = st.getInt("toss");
if (toss == 4)
{
st.unset("toss");
giveItems(player, ORB, 150);
htmltext = "30935-07.htm";
}
else
{
st.set("toss", String.valueOf(toss + 1));
htmltext = "30935-04.htm";
}
}
else
{
st.unset("toss");
takeItems(player, ORB, 10);
}
}
else
{
htmltext = "noorbs.htm";
}
break;
}
case "30935-06.htm":
{
if (orbs >= 10)
{
final int toss = st.getInt("toss");
st.unset("toss");
switch (toss)
{
case 1:
{
giveItems(player, ORB, 10);
break;
}
case 2:
{
giveItems(player, ORB, 30);
break;
}
case 3:
{
giveItems(player, ORB, 70);
break;
}
case 4:
{
giveItems(player, ORB, 150);
break;
}
}
}
else
{
htmltext = "noorbs.htm";
}
break;
}
case "30835-02.htm":
{
if (getQuestItemsCount(player, ECTOPLASM) > 0)
{
takeItems(player, ECTOPLASM, 1);
final int random3 = getRandom(1000);
if (random3 <= 119)
{
giveItems(player, 955, 1);
}
else if (random3 <= 169)
{
giveItems(player, 951, 1);
}
else if (random3 <= 329)
{
giveItems(player, 2511, (getRandom(200) + 401));
}
else if (random3 <= 559)
{
giveItems(player, 2510, (getRandom(200) + 401));
}
else if (random3 <= 561)
{
giveItems(player, 316, 1);
}
else if (random3 <= 578)
{
giveItems(player, 630, 1);
}
else if (random3 <= 579)
{
giveItems(player, 188, 1);
}
else if (random3 <= 581)
{
giveItems(player, 885, 1);
}
else if (random3 <= 582)
{
giveItems(player, 103, 1);
}
else if (random3 <= 584)
{
giveItems(player, 917, 1);
}
else
{
giveItems(player, 736, 1);
}
}
else
{
htmltext = "30835-03.htm";
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
switch (npc.getId())
{
case CEMA:
{
if (!st.isStarted())
{
for (int classId : ALLOWED_CLASSES)
{
if ((st.getPlayer().getPlayerClass().getId() == classId) && (st.getPlayer().getLevel() >= 40))
{
htmltext = "30834-01.htm";
}
}
if (!"30834-01.htm".equals(htmltext))
{
htmltext = "30834-07.htm";
st.exitQuest(true);
}
}
else if (getQuestItemsCount(player, ORB) > 0)
{
htmltext = "30834-06.htm";
}
else
{
htmltext = "30834-05.htm";
}
break;
}
case ICARUS:
{
htmltext = "30835-01.htm";
break;
}
case MARSHA:
{
htmltext = "30934-01.htm";
break;
}
case TRUMPIN:
{
htmltext = "30935-01.htm";
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getQuestState(player, false);
if ((st == null) || !st.isStarted())
{
return;
}
if (getRandom(100) < CHANCE)
{
giveItems(player, ORB, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}