summaryrefslogtreecommitdiff
path: root/npc/005-7
diff options
context:
space:
mode:
authorjesusalva <cpntb1@ymail.com>2018-02-25 16:41:55 -0300
committerjesusalva <cpntb1@ymail.com>2018-02-25 16:48:33 -0300
commit58cace86e4df6160fd8dfbf1089ddb35597c2c63 (patch)
tree9d9951a2cbd0639ad9e75aaa41b10d4a52e4e63e /npc/005-7
parent4594c392072680830070e530f27d577aa1b10b6f (diff)
downloadserverdata-58cace86e4df6160fd8dfbf1089ddb35597c2c63.tar.gz
serverdata-58cace86e4df6160fd8dfbf1089ddb35597c2c63.tar.bz2
serverdata-58cace86e4df6160fd8dfbf1089ddb35597c2c63.tar.xz
serverdata-58cace86e4df6160fd8dfbf1089ddb35597c2c63.zip
Trainer (aka Valon Quest) basic implementation done by a sleeping person
Diffstat (limited to 'npc/005-7')
-rw-r--r--npc/005-7/trainer.txt118
1 files changed, 99 insertions, 19 deletions
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: