summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/005-1/_mobs.txt2
-rw-r--r--npc/005-3/_mobs.txt2
-rw-r--r--npc/005-7/trainer.txt118
3 files changed, 101 insertions, 21 deletions
diff --git a/npc/005-1/_mobs.txt b/npc/005-1/_mobs.txt
index 55cd93258..d7f349937 100644
--- a/npc/005-1/_mobs.txt
+++ b/npc/005-1/_mobs.txt
@@ -6,5 +6,5 @@
005-1,82,87,8,9 monster CandorScorpion 1073,8,35000,300000,Trainer::OnKillCandorScorpion
005-1,36,105,6,3 monster Piou 1002,1,35000,300000
005-1,80,33,16,15 monster CandorScorpion 1073,16,35000,300000,Trainer::OnKillCandorScorpion
-005-1,71,39,28,10 monster ManaBug 1075,4,35000,300000,Trainer::OnKillManaBug
+005-1,71,39,28,10 monster ManaBug 1075,4,35000,300000
005-1,30,39,12,14 monster Scorpion 1071,2,35000,300000,Trainer::OnKillScorpion
diff --git a/npc/005-3/_mobs.txt b/npc/005-3/_mobs.txt
index 02272b984..c2cfcaa6f 100644
--- a/npc/005-3/_mobs.txt
+++ b/npc/005-3/_mobs.txt
@@ -1,3 +1,3 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 005-3: Storage House mobs
-005-3,34,37,10,3 monster House Maggot 1084,8,40000,300000
+005-3,34,37,10,3 monster House Maggot 1084,8,40000,300000,Trainer::OnKillHouseMaggot
diff --git a/npc/005-7/trainer.txt b/npc/005-7/trainer.txt
index 6f4b7ec33..e3b0ef3ae 100644
--- a/npc/005-7/trainer.txt
+++ b/npc/005-7/trainer.txt
@@ -56,34 +56,53 @@ L_Trainment:
mes "";
if (BaseLevel < 3) goto L_NoLevel;
if (.@b == 0) goto L_NoKnife;
+ .@k=getq2(CandorQuest_Trainer); // Get number of kills (via getq2)
mesn;
- if (.@q == 0)
- mesq l("Ok, you have some level. I will assign you a task.");
- if (.@q == 1)
+ if (.@q == 0) {
+ mesq l("Ok, you have some level. I will assign you a task to kill maggots.");
+ mesq l("I'll ask to kill 10 @@", getmonsterlink(Maggot));
+ setq CandorQuest_Trainer, 1, 0;
+ } else if (.@q == 1) {
mesq l("You are killing Maggots");
- if (.@q == 2)
+ } else if (.@q == 2) {
mesq l("Here is your reward (40 xp 25 gp)");
- if (.@q == 3)
- mesq l("I'll ask to kill House Maggots");
- if (.@q == 4)
+ getexp 40, 0;
+ set Zeny, Zeny + 25;
+ setq CandorQuest_Trainer, 3, 0;
+ } else if (.@q == 3) {
+ mesq l("I'll ask to kill 5 @@", getmonsterlink(HouseMaggot));
+ setq CandorQuest_Trainer, 4, 0;
+ } else if (.@q == 4) {
mesq l("You are killing House Maggots");
- if (.@q == 5)
+ } else if (.@q == 5) {
mesq l("Here is your reward (40 xp 25 gp)");
- if (.@q == 6)
- mesq l("I'll ask to kill Candor Scorpions");
- if (.@q == 7)
+ getexp 40, 0;
+ set Zeny, Zeny + 25;
+ setq CandorQuest_Trainer, 6, 0;
+ } else if (.@q == 6) {
+ mesq l("I'll ask to kill 3 @@", getmonsterlink(CandorScorpion));
+ setq CandorQuest_Trainer, 7, 0;
+ } else if (.@q == 7) {
mesq l("You are killing Candor Scorpions");
- if (.@q == 8)
+ } else if (.@q == 8) {
mesq l("Here is your reward (40 xp 25 gp)");
- if (.@q == 9)
- mesq l("I'll ask to kill Scorpions");
- if (.@q == 10)
+ getexp 40, 0;
+ set Zeny, Zeny + 25;
+ setq CandorQuest_Trainer, 9, 0;
+ } else if (.@q == 9) {
+ mesq l("I'll ask to kill 1 @@", getmonsterlink(Scorpion));
+ setq CandorQuest_Trainer, 9, 0;
+ } else if (.@q == 10) {
mesq l("You are killing Scorpions");
- if (.@q == 11)
+ } else if (.@q == 11) {
mesq l("Here is your reward (40 xp 25 gp) + Graduation! (+50 xp)");
- if (.@q == 12)
+ getexp 90, 0;
+ set Zeny, Zeny + 25;
+ setq CandorQuest_Trainer, 12, 0;
+ } else {
mesq l("Thanks!");
+ }
goto L_PreMenu;
@@ -377,11 +396,72 @@ L_Menu_gap:
mes "";
goto L_PreMenu;
+ function trainer_add_kills
+ {
+ .@qp=getq(CandorQuest_Trainer);
+ .@kp=getq2(CandorQuest_Trainer); // Get number of kills (via getq2)
+ setq CandorQuest_Trainer, .@qp, .@kp+1;
+ message strcharinfo(0), l("Set status @@ with @@ kills", .@qp, .@kp);
+ }
+
+ function trainer_max_kills
+ {
+ .@qp=getq(CandorQuest_Trainer);
+ setq CandorQuest_Trainer, .@qp+1, 0;
+ message strcharinfo(0), l("End status @@", .@qp);
+ }
+
OnKillMaggot:
-OnKillManaBug:
+ .@q=getq(CandorQuest_Trainer);
+ .@k=getq2(CandorQuest_Trainer); // Get number of kills (via getq2)
+ if (.@q == 1) {
+ if (.@k+1 >= 10) {
+ trainer_max_kills();
+ message strcharinfo(0), l("All maggots are dead!");
+ } else {
+ trainer_add_kills();
+ message strcharinfo(0), l("@@/10 Maggots", .@k+1);
+ }
+ }
+ end;
+OnKillHouseMaggot:
+ .@q=getq(CandorQuest_Trainer);
+ .@k=getq2(CandorQuest_Trainer); // Get number of kills (via getq2)
+ if (.@q == 4) {
+ if (.@k+1 >= 5) {
+ trainer_max_kills();
+ message strcharinfo(0), l("All house maggots are dead!");
+ } else {
+ trainer_add_kills();
+ message strcharinfo(0), l("@@/5 House Maggots", .@k+1);
+ }
+ }
+ end;
OnKillCandorScorpion:
+ .@q=getq(CandorQuest_Trainer);
+ .@k=getq2(CandorQuest_Trainer); // Get number of kills (via getq2)
+ if (.@q == 7) {
+ if (.@k+1 >= 3) {
+ trainer_max_kills();
+ message strcharinfo(0), l("All candor scorpions are dead!");
+ } else {
+ trainer_add_kills();
+ message strcharinfo(0), l("@@/3 Candor Scorpions", .@k+1);
+ }
+ }
+ end;
OnKillScorpion:
- message strcharinfo(0), "You monster!";
+ .@q=getq(CandorQuest_Trainer);
+ .@k=getq2(CandorQuest_Trainer); // Get number of kills (via getq2)
+ if (.@q == 10) {
+ if (.@k+1 >= 1)
+ trainer_max_kills();
+ message strcharinfo(0), l("All scorpions are dead!");
+ } else {
+ trainer_add_kills();
+ message strcharinfo(0), l("@@/1 Scorpion", .@k+1);
+ }
+ }
end;
OnInit: