[SOLVED] Follow these two tutorials
1. https://lucera2.com/threads/how-to-add-your-quests-or-subsystems-to-an-assembly.1406/ (In the same post there is another more detailed video of the process)
2. https://mmo-dev.info/threads/Создае...убрика-копировать-вставить.25191/#post-190973
(In addition to the steps in this step, you will need to add the quest in strings_en.properties and quest_rates.propeties. And if you want to disable the copied quest use the DisableQuestId property in server.properties)
Special thanks to our friend Deazer, Uncle Bob's son, for the comment below.
===================================================
Hey guys, I modified the onKill method of a quest so that all drops have a 100% chance of falling. But the method is not being executed. Does anyone have any tips as to why? Here's my code:
The onLoad message is shown in the terminal when booting, but the onKill message does not appear
1. https://lucera2.com/threads/how-to-add-your-quests-or-subsystems-to-an-assembly.1406/ (In the same post there is another more detailed video of the process)
2. https://mmo-dev.info/threads/Создае...убрика-копировать-вставить.25191/#post-190973
(In addition to the steps in this step, you will need to add the quest in strings_en.properties and quest_rates.propeties. And if you want to disable the copied quest use the DisableQuestId property in server.properties)
Special thanks to our friend Deazer, Uncle Bob's son, for the comment below.
===================================================
Hey guys, I modified the onKill method of a quest so that all drops have a 100% chance of falling. But the method is not being executed. Does anyone have any tips as to why? Here's my code:
The onLoad message is shown in the terminal when booting, but the onKill message does not appear
Java:
package Simple;
import l2.gameserver.model.instances.NpcInstance;
import l2.gameserver.model.quest.QuestState;
import quests._639_GuardiansOfTheHolyGrail;
public class _639_GuardiansOfTheHolyGrail_Custom extends _639_GuardiansOfTheHolyGrail {
@Override
public void onLoad() {
super.onLoad();
System.out.println("LOADED MY CUSTOM QUEST _639_GuardiansOfTheHolyGrail_Custom");
}
@Override
public String onKill(NpcInstance var1, QuestState var2) {
System.out.println("EXECUTING METHOD onKill");
int var3 = var1.getNpcId();
if (var3 == 22123) {
var2.rollAndGive(8069, 1, (double)100.0F);
} else if (var3 == 22122) {
var2.rollAndGive(8069, 1, (double)100.0F);
} else if (var3 == 22128) {
var2.rollAndGive(8069, 1, (double)100.0F);
} else if (var3 == 22130) {
var2.rollAndGive(8056, 1, (double)17.0F);
var2.rollAndGive(8069, 1, (double)100.0F);
} else if (var3 == 22135) {
var2.rollAndGive(8056, 1, (double)30.0F);
var2.rollAndGive(8069, 1, (double)100.0F);
} else if (var3 == 22132) {
var2.rollAndGive(8056, 1, 3.4);
var2.rollAndGive(8069, 1, (double)100.0F);
} else if (var3 == 22131) {
var2.rollAndGive(8056, 1, 3.4);
var2.rollAndGive(8069, 1, (double)100.0F);
} else if (var3 == 22129) {
var2.rollAndGive(8056, 1, 3.4);
var2.rollAndGive(8069, 1, (double)100.0F);
} else if (var3 == 22133) {
var2.rollAndGive(8056, 1, 3.4);
var2.rollAndGive(8069, 1, (double)100.0F);
} else if (var3 == 22134) {
var2.rollAndGive(8056, 1, 3.4);
var2.rollAndGive(8069, 1, (double)100.0F);
} else if (var3 != 22127 && var3 != 22125) {
if (var3 == 22126 || var3 == 22124) {
var2.rollAndGive(8069, 1, (double)100.0F);
}
} else {
var2.rollAndGive(8069, 1, (double)100.0F);
}
return null;
}
}
Last edited: