summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/quest_db.conf13
-rw-r--r--npc/003-10/kreist.txt114
-rw-r--r--npc/functions/mobpoint.txt1
3 files changed, 128 insertions, 0 deletions
diff --git a/db/quest_db.conf b/db/quest_db.conf
index 5b5992501..c13968ca1 100644
--- a/db/quest_db.conf
+++ b/db/quest_db.conf
@@ -369,6 +369,19 @@ quest_db: (
Id: 193
Name: "MineQuest_Caelum"
},
+// 194~199: Overflow Quests (Unused)
+{
+ Id: 200
+ Name: "General_MobHunting1"
+},
+{
+ Id: 201
+ Name: "General_MobHunting2"
+},
+{
+ Id: 202
+ Name: "General_MobHunting3"
+},
// ID 250 to 269: Lilit Quests
{
diff --git a/npc/003-10/kreist.txt b/npc/003-10/kreist.txt
index 8b55db0a1..e694bf3a2 100644
--- a/npc/003-10/kreist.txt
+++ b/npc/003-10/kreist.txt
@@ -5,8 +5,84 @@
// Tulimshar Guardhouse Taskmaster
003-10,41,63,0 script Kreist NPC_PLAYER,{
+ .@d=gettimeparam(GETTIME_DAYOFMONTH);
mesn l("Kreist, Taskmaster");
mesq l("Hello, and welcome to Tulimshar guard house.");
+ next;
+ mesn l("Kreist, Taskmaster");
+ mesq l("My name is @@ and I am the daily task master. Interested in keeping this world free from monsters, or to report back?");
+ next;
+ select
+ l("I want a EASY task!"),
+ l("I want a MODERATE task!"),
+ l("I want a EXPERT task!"),
+ l("It was nice seeing you.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ .@q1=getq(General_MobHunting1);
+ .@q2=getq2(General_MobHunting1);
+ .@q3=getq3(General_MobHunting1);
+ .@q=General_MobHunting1;
+ .@lv=1;
+ goto L_QuestMaster;
+ case 2:
+ .@q1=getq(General_MobHunting2);
+ .@q2=getq2(General_MobHunting2);
+ .@q3=getq3(General_MobHunting2);
+ .@q=General_MobHunting2;
+ .@lv=5;
+ goto L_QuestMaster;
+ case 3:
+ .@q1=getq(General_MobHunting3);
+ .@q2=getq2(General_MobHunting3);
+ .@q3=getq3(General_MobHunting3);
+ .@q=General_MobHunting3;
+ .@lv=14;
+ goto L_QuestMaster;
+ }
+ closeclientdialog;
+ goodbye();
+ close;
+
+L_QuestMaster:
+ // It's a new day, so we must generate a new quest!
+ if (.@q1 != .@d) {
+ .@q1=.@d;
+ if (.@lv == 1) {
+ .@q2=any(Maggot, Scorpion, Croc, FireGoblin, CaveMaggot, RedScorpion, Duck);
+ } else if (.@lv == 5) {
+ .@q2=any(GiantMaggot, CaveSnake, DesertBandit, Sarracenus, DesertLogHead);
+ } else if (.@lv == 14) {
+ .@q2=any(BlackScorpion, Snake);
+ } else {
+ Exception("Bad setting for GMH.LV: "+.@lv, RB_DEFAULT|RB_SPEECH|RB_ISFATAL);
+ }
+ setq .@q, .@q1, .@q2, .@q3;
+ }
+
+ // Maybe you finished the quest?
+ if (.@q3 >= 100) {
+ mesn l("Kreist, Taskmaster");
+ mesq l("Good job, you've killed the 100 @@ and reported back in time!", getmonsterlink(.@q2));
+ next;
+ mesn l("Kreist, Taskmaster");
+ mesq l("It's not much of a reward, but doesn't it feels great to help others in need?! HAHAHA!");
+ Zeny+=.@lv*5;
+ getexp BaseLevel*.@lv, .@lv;
+ setq2 .@q, 0;
+ close;
+ }
+
+ // Maybe there is no monster to kill
+ if (!.@q2) {
+ mesn l("Kreist, Taskmaster");
+ mesq l("You've already completed this quest today. Try again tomorrow.");
+ close;
+ }
+
+ mesn l("Kreist, Taskmaster");
+ mesq l("So, please kill @@/100 @@ for us and make the world a safer place!", .@q3, getmonsterlink(.@q2));
close;
OnInit:
@@ -27,3 +103,41 @@ OnInit:
}
+// What is with this stupidly long quest name?
+function script Guardhouse_RandQuestCheck {
+ if (!playerattached())
+ return;
+
+ .@mobId=getarg(0, killedrid);
+ .@d=gettimeparam(GETTIME_DAYOFMONTH);
+
+ // Easy Task
+ if (getq(General_MobHunting1) == .@d &&
+ getq2(General_MobHunting1) == .@mobId) {
+ .@q3=getq3(General_MobHunting1)+1;
+ setq3 General_MobHunting1, .@q3;
+ if (!(.@q3 % 10))
+ dispbottom l("@@/100 @@ killed", .@q3, getmonsterlink(.@mobId));
+ }
+
+ // Medium Task
+ if (getq(General_MobHunting2) == .@d &&
+ getq2(General_MobHunting2) == .@mobId) {
+ .@q3=getq3(General_MobHunting2)+1;
+ setq3 General_MobHunting2, .@q3;
+ if (!(.@q3 % 10))
+ dispbottom l("@@/100 @@ killed", .@q3, getmonsterlink(.@mobId));
+ }
+
+ // Hard Task
+ if (getq(General_MobHunting3) == .@d &&
+ getq2(General_MobHunting3) == .@mobId) {
+ .@q3=getq3(General_MobHunting3)+1;
+ setq3 General_MobHunting3, .@q3;
+ if (!(.@q3 % 10))
+ dispbottom l("@@/100 @@ killed", .@q3, getmonsterlink(.@mobId));
+ }
+
+ return;
+}
+
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index bca9c393a..8605f40ba 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -52,6 +52,7 @@ OnNPCKillEvent:
callfunc "SQuest_Hasan";
callfunc "SaggyMobCount";
callfunc "dausen_mobtutorial";
+ callfunc "Guardhouse_RandQuestCheck";
killedrid=0;
end;