Hello everyone.
I want to copy the quest and rewrite it to suit my needs.
I copied it, set the ID and replaced the ID of the main NPC giving the quest.
The quest stopped screaming when the server starts, and the pet manager has it, but my NPC doesn't. But in the quest itself, instead of the ID of the participants, there are these things:
addStartNpc(PET_MENAGER_MARTIN);
addTalkId(PET_MENAGER_MARTIN, GUARD_METTY, ACCESSORY_MERCHANT_ELICE, GATEKEEPER_BELLA);
addKillId(LESSER_DARK_HORROR, PROWLER, GIANT_SPIDER, DARK_HORROR, TALON_SPIDER, BLADE_SPIDER, HOOK_SPIDER, HUNTER_TARANTULA, CRIMSON_SPIDER, PINCER_SPIDER, KASHA_SPIDER, KASHA_FANG_SPIDER, KASHA_BLADE_SPIDER, PLUNDER_TARANTULA, CRIMSON_SPIDER2);
registerQuestItems(ANIMAL_LOVERS_LIST, ANIMAL_SLAYERS_1ST_LIST, ANIMAL_SLAYERS_2ND_LIST, ANIMAL_SLAYERS_3RD_LIST, ANIMAL_SLAYERS_4TH_LIST, ANIMAL_SLAYERS_5TH_LIST, BLOODY_FANG, BLOODY_CLAW, BLOODY_NAIL, BLOODY_KASHA_FANG, BLOODY_TARANTULA_NAIL, ANIMAL_SLAYERS_LIST, BLOODY_RED_CLAW);
And I searched through both the source and the build, but these tags are nowhere to be found.
How does this even work? On the old build from l2J dev, everything was rewritten and found normally, but what is here then?
Tell me, good people!!??
Well, ok, let me rephrase, how do I rebind a quest to my NPC? Thanks!
Is my code:
private static final int QUEST_MANAGER = 40021;
public class Q00554_GetAPotion extends Quest
{
// NPCs
private static final int GUARD_METTY = 30072;
private static final int ACCESSORY_MERCHANT_ELICE = 30091;
private static final int GATEKEEPER_BELLA = 30256;
private static final int QUEST_MANAGER = 40021;
// Items
private static final int ANIMAL_LOVERS_LIST = 3417;
private static final int ANIMAL_SLAYERS_1ST_LIST = 3418;
private static final int ANIMAL_SLAYERS_2ND_LIST = 3419;
private static final int ANIMAL_SLAYERS_3RD_LIST = 3420;
private static final int ANIMAL_SLAYERS_4TH_LIST = 3421;
private static final int ANIMAL_SLAYERS_5TH_LIST = 3422;
private static final int BLOODY_FANG = 3423;
private static final int BLOODY_CLAW = 3424;
private static final int BLOODY_NAIL = 3425;
private static final int BLOODY_KASHA_FANG = 3426;
private static final int BLOODY_TARANTULA_NAIL = 3427;
private static final int ANIMAL_SLAYERS_LIST = 10164;
private static final int BLOODY_RED_CLAW = 10165;
// Reward
private static final int WOLF_COLLAR = 2375;
// Monster
private static final int LESSER_DARK_HORROR = 20025;
private static final int PROWLER = 20034;
private static final int GIANT_SPIDER = 20103;
private static final int DARK_HORROR = 20105;
private static final int TALON_SPIDER = 20106;
private static final int BLADE_SPIDER = 20108;
private static final int HOOK_SPIDER = 20308;
private static final int HUNTER_TARANTULA = 20403;
private static final int CRIMSON_SPIDER = 20460;
private static final int PINCER_SPIDER = 20466;
private static final int KASHA_SPIDER = 20474;
private static final int KASHA_FANG_SPIDER = 20476;
private static final int KASHA_BLADE_SPIDER = 20478;
private static final int PLUNDER_TARANTULA = 20508;
private static final int CRIMSON_SPIDER2 = 22244;
// Misc
private static final int MIN_LEVEL = 1;
// Links
private static final Map<Integer, String> LINKS = new HashMap<>();
static
{
LINKS.put(1110001, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Can be used for item transportation.</a><br>");
LINKS.put(1110002, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Can help during hunting by assisting in attacks.</a><br>");
LINKS.put(1110003, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">Can be sent to the village to buy items.</a><br>");
LINKS.put(1110004, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Can be traded or sold to a new owner for adena.</a><br>");
LINKS.put(1110005, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">None of the above.</a><br>");
LINKS.put(1110006, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">When taking down a monster, always have a pet's company.</a><br>");
LINKS.put(1110007, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Tell your pet to pick up items.</a><br>");
LINKS.put(1110008, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Tell your pet to attack monsters first.</a><br>");
LINKS.put(1110009, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Let your pet do what it wants.</a><br>");
LINKS.put(1110010, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">None of the above.</a><br>");
LINKS.put(1110011, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">10 hours</a><br>");
LINKS.put(1110012, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">15 hours</a><br>");
LINKS.put(1110013, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">It won't disappear.</a><br>");
LINKS.put(1110014, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">25 hours</a><br>");
LINKS.put(1110015, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">None of the above.</a><br>");
LINKS.put(1110016, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">Dire Wolf</a><br>");
LINKS.put(1110017, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Air Wolf</a><br>");
LINKS.put(1110018, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Turek Wolf</a><br>");
LINKS.put(1110019, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Kasha Wolf</a><br>");
LINKS.put(1110020, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">None of the above.</a><br>");
LINKS.put(1110021, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">It's tail is always pointing straight down.</a><br>");
LINKS.put(1110022, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">It's tail is always curled up.</a><br>");
LINKS.put(1110023, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">It's tail is always wagging back and forth.</a><br>");
LINKS.put(1110024, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">What are you talking about?! A wolf doesn't have a tail.</a><br>");
LINKS.put(1110025, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">None of the above.</a><br>");
LINKS.put(1110026, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Raccoon</a><br>");
LINKS.put(1110027, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Jackal</a><br>");
LINKS.put(1110028, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Fox</a><br>");
LINKS.put(1110029, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Shepherd Dog</a><br>");
LINKS.put(1110030, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">None of the above.</a><br>");
LINKS.put(1110031, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">1.4 km</a><br>");
LINKS.put(1110032, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">2.4 km</a><br>");
LINKS.put(1110033, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">3.4 km</a><br>");
LINKS.put(1110034, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">4.4 km</a><br>");
LINKS.put(1110035, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">None of the above.</a><br>");
LINKS.put(1110036, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">Male</a><br>");
LINKS.put(1110037, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Female</a><br>");
LINKS.put(1110038, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">A baby that was born last year</a><br>");
LINKS.put(1110039, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">A baby that was born two years ago</a><br>");
LINKS.put(1110040, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">None of the above.</a><br>");
LINKS.put(1110041, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Goat</a><br>");
LINKS.put(1110042, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Meat of a dead animal</a><br>");
LINKS.put(1110043, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Berries</a><br>");
LINKS.put(1110044, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Wild Bird</a><br>");
LINKS.put(1110045, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">None of the above.</a><br>");
LINKS.put(1110046, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Breeding season is January-February.</a><br>");
LINKS.put(1110047, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">Pregnancy is nine months.</a><br>");
LINKS.put(1110048, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Babies are born in April-June.</a><br>");
LINKS.put(1110049, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Has up to ten offspring at one time.</a><br>");
LINKS.put(1110050, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">None of the above.</a><br>");
LINKS.put(1110051, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">3-6 years</a><br>");
LINKS.put(1110052, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">6-9 years</a><br>");
LINKS.put(1110053, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">9-12 years</a><br>");
LINKS.put(1110054, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">12-15 years</a><br>");
LINKS.put(1110055, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">None of the above.</a><br>");
LINKS.put(1110056, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Wolves gather and move in groups of 7-13 animals.</a><br>");
LINKS.put(1110057, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Wolves can eat a whole calf in one sitting.</a><br>");
LINKS.put(1110058, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">If they have water, wolves can live for 5-6 days without eating anything.</a><br>");
LINKS.put(1110059, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">A pregnant wolf makes its home in a wide open place to have its babies.</a><br>");
LINKS.put(1110060, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">None of the above.</a><br>");
LINKS.put(1110061, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">A grown wolf is still not as heavy as a fully-grown male adult human.</a><br>");
LINKS.put(1110062, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">A wolf changes into a werewolf during a full-moon.</a><br>");
LINKS.put(1110063, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">The color of a wolf's fur is the same as the place where it lives.</a><br>");
LINKS.put(1110064, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">A wolf enjoys eating Dwarves.</a><br>");
LINKS.put(1110065, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">None of the above.</a><br>");
LINKS.put(1110066, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Talking Island - Wolf</a><br>");
LINKS.put(1110067, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Dark Forest - Ashen Wolf</a><br>");
LINKS.put(1110068, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">Elven Forest - Gray Wolf</a><br>");
LINKS.put(1110069, "<a action=\"bypass -h Quest Q00554_GetAPotion QUESTIONS\">Orc - Black Wolf</a><br>");
LINKS.put(1110070, "<a action=\"bypass -h Quest Q00554_GetAPotion 40021-14.html\">None of the above.</a><br>");
}
public Q00554_GetAPotion()
{
super(554);
[COLOR=rgb(184, 49, 47)]addStartNpc(QUEST_MANAGER);
addTalkId(QUEST_MANAGER, [/COLOR]GUARD_METTY, ACCESSORY_MERCHANT_ELICE, GATEKEEPER_BELLA);
addKillId(LESSER_DARK_HORROR, PROWLER, GIANT_SPIDER, DARK_HORROR, TALON_SPIDER, BLADE_SPIDER, HOOK_SPIDER, HUNTER_TARANTULA, CRIMSON_SPIDER, PINCER_SPIDER, KASHA_SPIDER, KASHA_FANG_SPIDER, KASHA_BLADE_SPIDER, PLUNDER_TARANTULA, CRIMSON_SPIDER2);
registerQuestItems(ANIMAL_LOVERS_LIST, ANIMAL_SLAYERS_1ST_LIST, ANIMAL_SLAYERS_2ND_LIST, ANIMAL_SLAYERS_3RD_LIST, ANIMAL_SLAYERS_4TH_LIST, ANIMAL_SLAYERS_5TH_LIST, BLOODY_FANG, BLOODY_CLAW, BLOODY_NAIL, BLOODY_KASHA_FANG, BLOODY_TARANTULA_NAIL, ANIMAL_SLAYERS_LIST, BLOODY_RED_CLAW);
}
He is also mentioned there once in the middle!
public String onTalk(Npc npc, Player player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (qs.isCreated())
{
if (npc.getId() == QUEST_MANAGER)
{
if (player.getLevel() < MIN_LEVEL)
{
htmltext = "40021-01.htm";
}
else
{
htmltext = "40021-02.htm";
}
}
}
And it still doesn't work. Tell me why?