Sense for Business
- ID
- 328
- Название
- Sense for Business
- start_npcs_json
- [30436]
- npc_ids_json
- []
- constants_json
- {"MONSTER_EYE_LENS":1366,"MONSTER_EYE_CARCASS":1347,"BASILISK_GIZZARD":1348}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00328_SenseForBusiness/Q00328_SenseForBusiness.java
NPC квеста
Записей нет.
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 21) ? "30436-01.htm" : "30436-02.htm";
Выдача предметов, адены и опыта: выражения из Java
giveAdena(player, (30 * carcasses) + (2000 * lenses) + (75 * gizzards) + ((all >= 10) ? 618 : 0), true); giveItems(player, rnd < chance ? MONSTER_EYE_CARCASS : MONSTER_EYE_LENS, 1); giveItems(player, BASILISK_GIZZARD, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30436-01.htm] Trader Sarien: I know it is hard to believe, but a long time ago southern Gludio also used to be fertile farmland. However, as you can see, now it is nothing more than barren wasteland. It may seem like barren land to normal people, but true businessmen like me find opportunities in any place. I believe there are valuable commodities to be found here in the Wastelands that cannot be found elsewhere. If I am able to find them, I may begin a new business here. When that time comes, I may need your help. (This quest may only be undertaken by a character of level 21 and above.)
[30436-02.htm] Trader Sarien: I know it is hard to believe, but a long time ago southern Gludio also used to be fertile farmland. However, as you can see, now it is nothing more than barren wastelands. It may seem like barren land to normal people, but true businessmen like me find opportunities in any place. In the end, I was able to find something valuable in these Wastelands that could not be found elsewhere. Therefore I have decided to begin a new business here. I would like to have a reliable partner. What do you think about working with me? Accept proposal
[30436-03.htm] Trader Sarien: Deal! Spit on the ground and let's shake on it. With this, our contract is sealed in the eyes of the goddess of earth, Maphr. Now listen to what I have to say. Do you remember the eight basic ingredients used for my magic research that I told you about earlier? We can find some of them in this area. If you'll hunt formonster eyes, you can get their useful Monster Eye Carcasses, and once in a while, you may even obtain a Monster Eye Lens. This is a very valuable item. They say Dwarves use these to make something called "eye glasses." Also, if you hunt the Basilisk, you can get its gizzard. The Basilisk swallows the pebbles of the wastelands to aid its digestion, but inside, they are mixed with jade shards. So we can obtain jade from the basilisk gizzard. You can find monster eyes at the bends of the Ruins of Agony or the Ruins of Despair. The basilisk can be found within the Wastelands. There are also monster eyes in the Wastelands, but they are much more dangerous than those at the bends of the Ruins, so you must be careful. But you may be able to find items that are that much more precious, so it is worth taking the challenge. From now on, the items you bring to me I will sell to the Ivory Tower. I have already signed a Contract with the magicians of the Ivory Tower and fixed the price as well. I will give you 30% of the item price I have agreed to take. So please bring back as much as possible. Well then, may the blessing of the earth be with you, partner.
[30436-04.htm] Trader Sarien: Hey, where's the stuff? Weren't you going to bring me some meat of monster eye, lenses, and Basilisk's Gizzards? You're not chickening out, are you? "I quit!" "I will continue."
[30436-05.htm] Trader Sarien: Come, partner. I am glad you have returned safely from the rugged land. First, relax and catch your breath. As your sack is bulging, you must have gathered quite a few products. Let us take a look at the outcome of the hunt! As promised, I will pay you according to how many items you brought. Say you will quit Say you will continue
[30436-06.htm] Trader Sarien: I am sorry to hear that. And there I was, thinking I had met a partner whom I could work with for a long time. However, I have no choice but to look for another partner ... Well, I wish you happiness in your future.
[30436-07.htm] Trader Sarien: Then please continue your efforts. I must look for a coach that will deliver the products to Oren's Ivory Tower. I must earn more money to achieve the large business I have planned in my head.
Исходник условий и наград (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.Q00328_SenseForBusiness;
import java.util.HashMap;
import java.util.Map;
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;
import org.l2jmobius.gameserver.mechanics.script.State;
public class Q00328_SenseForBusiness extends Quest
{
// Items
private static final int MONSTER_EYE_LENS = 1366;
private static final int MONSTER_EYE_CARCASS = 1347;
private static final int BASILISK_GIZZARD = 1348;
// Drop chances
private static final Map<Integer, Integer> CHANCES = new HashMap<>();
static
{
CHANCES.put(20055, 48);
CHANCES.put(20059, 52);
CHANCES.put(20067, 68);
CHANCES.put(20068, 76);
CHANCES.put(20070, 500000);
CHANCES.put(20072, 510000);
}
public Q00328_SenseForBusiness()
{
super(328, "Sense for Business");
registerQuestItems(MONSTER_EYE_LENS, MONSTER_EYE_CARCASS, BASILISK_GIZZARD);
addStartNpc(30436); // Sarien
addTalkId(30436);
addKillId(20055, 20059, 20067, 20068, 20070, 20072);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
if (event.equals("30436-03.htm"))
{
st.startQuest();
}
else if (event.equals("30436-06.htm"))
{
st.exitQuest(true, true);
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
switch (st.getState())
{
case State.CREATED:
{
htmltext = (player.getLevel() < 21) ? "30436-01.htm" : "30436-02.htm";
break;
}
case State.STARTED:
{
final int carcasses = getQuestItemsCount(player, MONSTER_EYE_CARCASS);
final int lenses = getQuestItemsCount(player, MONSTER_EYE_LENS);
final int gizzards = getQuestItemsCount(player, BASILISK_GIZZARD);
final int all = carcasses + lenses + gizzards;
if (all == 0)
{
htmltext = "30436-04.htm";
}
else
{
htmltext = "30436-05.htm";
takeItems(player, MONSTER_EYE_CARCASS, -1);
takeItems(player, MONSTER_EYE_LENS, -1);
takeItems(player, BASILISK_GIZZARD, -1);
giveAdena(player, (30 * carcasses) + (2000 * lenses) + (75 * gizzards) + ((all >= 10) ? 618 : 0), true);
}
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;
}
final int npcId = npc.getId();
final int chance = CHANCES.get(npcId);
if (npcId < 20069)
{
final int rnd = getRandom(100);
if (rnd < (chance + 1))
{
giveItems(player, rnd < chance ? MONSTER_EYE_CARCASS : MONSTER_EYE_LENS, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
else if (getRandom(1000000) < chance)
{
giveItems(player, BASILISK_GIZZARD, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}