Квест A Powerful Primeval Creature

DeCont

Heir
Всем привет, возможно ли поменять в квесте A Powerful Primeval Creature рецепты на свои?
1674418284814.png
 
Конечно можно. Берешь этот квест в scripts.jar вытаскиваешь этот квест он 642
После этого переписываешь, компилишь его в например questcustom.ext.jar и закидываешь к другим либам.
Есть же гайд как через Idea компилить.
Я декомпилом открыл scripts.jar
package quests;

import l2.gameserver.model.instances.NpcInstance;
import l2.gameserver.model.quest.QuestState;
import l2.gameserver.scripts.ScriptFile;
import l2.gameserver.model.quest.Quest;

public class _642_APowerfulPrimevalCreature extends Quest implements ScriptFile
{
private static final int bTk = 32105;
private static final int bTl = 18344;
private static final int aGQ = 22204;
private static final int aGP = 22203;
private static final int aGV = 22225;
private static final int aGT = 22220;
private static final int aGR = 22205;
private static final int aGN = 22201;
private static final int aGM = 22200;
private static final int bTm = 22224;
private static final int aGS = 22219;
private static final int aGO = 22202;
private static final int bTn = 22199;
private static final int bTo = 22197;
private static final int bTp = 22196;
private static final int bTq = 22223;
private static final int bTr = 22218;
private static final int bTs = 22198;
private static final int bTt = 8774;
private static final int bTu = 8775;
private static final int bTv = 8690;
private static final int bTw = 8692;
private static final int bTx = 8694;
private static final int bTy = 8696;
private static final int bTz = 8698;
private static final int bTA = 8700;
private static final int bTB = 8702;
private static final int bTC = 8704;
private static final int bTD = 8706;
private static final int bTE = 8708;
private static final int bTF = 8710;

public _642_APowerfulPrimevalCreature() {
super(1);
this.addStartNpc(32105);
this.addKillId(new int[] { 18344, 22204, 22203, 22225, 22220, 22205, 22201, 22200, 22224, 22219, 22202, 22199, 22197, 22196, 22223, 22218, 22198 });
this.addQuestItem(new int[] { 8774, 8775 });
}

public String onEvent(final String s, final QuestState questState, final NpcInstance npcInstance) {
String s2 = s;
if (s.equalsIgnoreCase("quest_accept")) {
if (questState.getPlayer().getLevel() >= 75) {
questState.setCond(1);
questState.setState(2);
questState.playSound("ItemSound.quest_accept");
s2 = "dindin_q0642_04.htm";
}
else {
s2 = "dindin_q0642_01a.htm";
questState.exitCurrentQuest(true);
}
}
else if (s.equalsIgnoreCase("reply_1")) {
s2 = "dindin_q0642_02.htm";
}
else if (s.equalsIgnoreCase("reply_2")) {
s2 = "dindin_q0642_03.htm";
}
else if (s.equalsIgnoreCase("reply_3")) {
if (questState.getQuestItemsCount(8774) >= 1L) {
questState.giveItems(57, 5000L * questState.getQuestItemsCount(8774));
questState.takeItems(8774, -1L);
s2 = "dindin_q0642_08.htm";
}
else {
s2 = "dindin_q0642_08a.htm";
}
}
else if (s.equalsIgnoreCase("reply_5")) {
if (questState.getQuestItemsCount(8774) >= 150L && questState.getQuestItemsCount(8775) >= 1L) {
s2 = "dindin_q0642_10.htm";
}
else {
s2 = "dindin_q0642_11a.htm";
}
}
else if (s.equalsIgnoreCase("reply_100") || s.equalsIgnoreCase("reply_101") || s.equalsIgnoreCase("reply_102") || s.equalsIgnoreCase("reply_103") || s.equalsIgnoreCase("reply_104") || s.equalsIgnoreCase("reply_105") || s.equalsIgnoreCase("reply_106") || s.equalsIgnoreCase("reply_107") || s.equalsIgnoreCase("reply_108") || s.equalsIgnoreCase("reply_109") || s.equalsIgnoreCase("reply_110")) {
if (s.equalsIgnoreCase("reply_100")) {
questState.giveItems(8690, 1L);
}
else if (s.equalsIgnoreCase("reply_101")) {
questState.giveItems(8692, 1L);
}
else if (s.equalsIgnoreCase("reply_102")) {
questState.giveItems(8694, 1L);
}
else if (s.equalsIgnoreCase("reply_103")) {
questState.giveItems(8696, 1L);
}
else if (s.equalsIgnoreCase("reply_104")) {
questState.giveItems(8698, 1L);
}
else if (s.equalsIgnoreCase("reply_105")) {
questState.giveItems(8700, 1L);
}
else if (s.equalsIgnoreCase("reply_106")) {
questState.giveItems(8702, 1L);
}
else if (s.equalsIgnoreCase("reply_107")) {
questState.giveItems(8704, 1L);
}
else if (s.equalsIgnoreCase("reply_108")) {
questState.giveItems(8706, 1L);
}
else if (s.equalsIgnoreCase("reply_109")) {
questState.giveItems(8708, 1L);
}
else if (s.equalsIgnoreCase("reply_110")) {
questState.giveItems(8710, 1L);
}
questState.giveItems(57, 44000L);
questState.takeItems(8775, 1L);
questState.takeItems(8774, 150L);
s2 = "dindin_q0642_10a.htm";
}
else if (s.equalsIgnoreCase("reply_200")) {
s2 = "dindin_q0642_11.htm";
}
else if (s.equalsIgnoreCase("reply_6")) {
s2 = "dindin_q0642_12.htm";
}
else if (s.equalsIgnoreCase("reply_7")) {
if (questState.getQuestItemsCount(8775) > 0L || questState.getQuestItemsCount(8774) > 0L) {
if (questState.getQuestItemsCount(8775) > 0L) {
questState.giveItems(57, questState.getQuestItemsCount(8775));
}
else if (questState.getQuestItemsCount(8774) > 0L) {
questState.giveItems(57, questState.getQuestItemsCount(8774) * 5000L);
}
questState.takeItems(8775, -1L);
questState.takeItems(8774, -1L);
questState.exitCurrentQuest(true);
questState.playSound("ItemSound.quest_finish");
this.giveExtraReward(questState.getPlayer());
s2 = "dindin_q0642_13.htm";
}
else {
questState.exitCurrentQuest(true);
questState.playSound("ItemSound.quest_finish");
s2 = "dindin_q0642_14.htm";
}
}
return s2;
}

public String onTalk(final NpcInstance npcInstance, final QuestState questState) {
String s = "no-quest";
switch (questState.getState()) {
case 1: {
if (questState.getPlayer().getLevel() >= 75) {
s = "dindin_q0642_01.htm";
break;
}
s = "dindin_q0642_01a.htm";
questState.exitCurrentQuest(true);
break;
}
case 2: {
if (questState.getQuestItemsCount(8774) <= 0L && questState.getQuestItemsCount(8775) <= 0L) {
s = "dindin_q0642_06.htm";
break;
}
if (questState.getQuestItemsCount(8774) > 0L || questState.getQuestItemsCount(8775) > 0L) {
s = "dindin_q0642_07.htm";
break;
}
break;
}
}
return s;
}

public String onKill(final NpcInstance npcInstance, final QuestState questState) {
final int npcId = npcInstance.getNpcId();
if (npcId == 18344) {
questState.rollAndGive(8775, 1, 100.0);
}
else if (npcId == 22204) {
questState.rollAndGive(8774, 1, 31.3);
}
else if (npcId == 22203) {
questState.rollAndGive(8774, 1, 32.1);
}
else if (npcId == 22225) {
questState.rollAndGive(8774, 1, 28.9);
}
else if (npcId == 22220) {
questState.rollAndGive(8774, 1, 26.4);
}
else if (npcId == 22205) {
questState.rollAndGive(8774, 1, 32.1);
}
else if (npcId == 22201) {
questState.rollAndGive(8774, 1, 32.6);
}
else if (npcId == 22200) {
questState.rollAndGive(8774, 1, 32.6);
}
else if (npcId == 22224) {
questState.rollAndGive(8774, 1, 30.5);
}
else if (npcId == 22219) {
questState.rollAndGive(8774, 1, 29.7);
}
else if (npcId == 22202) {
questState.rollAndGive(8774, 1, 32.6);
}
else if (npcId == 22199) {
questState.rollAndGive(8774, 1, 100.0);
}
else if (npcId == 22197) {
questState.rollAndGive(8774, 1, 31.4);
}
else if (npcId == 22196) {
questState.rollAndGive(8774, 1, 72.0);
}
else if (npcId == 22223) {
questState.rollAndGive(8774, 1, 30.8);
}
else if (npcId == 22218) {
questState.rollAndGive(8774, 1, 29.6);
}
else if (npcId == 22198) {
questState.rollAndGive(8774, 1, 72.0);
}
return null;
}

public void onLoad() {
}

public void onReload() {
}

public void onShutdown() {
}
}
public class _642_APowerfulPrimevalCreature extends Quest implements ScriptFile
Должно выглядеть так
public class _999_СustomQuest extends Quest implements ScriptFile
Ну это как пример. Дальше разберешься.
 
Ну и после этого ищешь html нпс и переписываешь. Только не забудь отключить стандартный квест в конфигах и в string добавить его название что бы отображался корректно.
По сути ничего сложного. Но я потратил пол дня когда первый раз делал.
 
Ну и после этого ищешь html нпс и переписываешь. Только не забудь отключить стандартный квест в конфигах и в string добавить его название что бы отображался корректно.
По сути ничего сложного. Но я потратил пол дня когда первый раз делал.
Спасибо, сегодня буду пробовать)
 
Конечно можно. Берешь этот квест в scripts.jar вытаскиваешь этот квест он 642
После этого переписываешь, компилишь его в например questcustom.ext.jar и закидываешь к другим либам.
Есть же гайд как через Idea компилить.
Я декомпилом открыл scripts.jar

public class _642_APowerfulPrimevalCreature extends Quest implements ScriptFile
Должно выглядеть так
public class _999_СustomQuest extends Quest implements ScriptFile
Ну это как пример. Дальше разберешься.
Класс не нужно менять. Оставляешь с таким-же именем класс и он загружается поверх дефолтного квеста.
 
Back
Top