summaryrefslogtreecommitdiff
path: root/npc/006-8/kage.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-12-26 12:03:29 -0300
committerJesusaves <cpntb1@ymail.com>2021-12-26 12:03:29 -0300
commit87163b498a7c09439239f7e8f1077c5224043c49 (patch)
tree9d6c298bf297bff9e1e355a37513d01f73cde53e /npc/006-8/kage.txt
parent5322a4f98b3f49bb713622ea03ff095659315a65 (diff)
downloadserverdata-87163b498a7c09439239f7e8f1077c5224043c49.tar.gz
serverdata-87163b498a7c09439239f7e8f1077c5224043c49.tar.bz2
serverdata-87163b498a7c09439239f7e8f1077c5224043c49.tar.xz
serverdata-87163b498a7c09439239f7e8f1077c5224043c49.zip
Add rewards to Kage's fight. But it won't be as nice with splash...
Diffstat (limited to 'npc/006-8/kage.txt')
-rw-r--r--npc/006-8/kage.txt40
1 files changed, 35 insertions, 5 deletions
diff --git a/npc/006-8/kage.txt b/npc/006-8/kage.txt
index f6284cd46..6e60f0002 100644
--- a/npc/006-8/kage.txt
+++ b/npc/006-8/kage.txt
@@ -2,7 +2,7 @@
// Author:
// Jesusalva
-// Mapflags
+// Mapflags (FIXME: Disable splash... Or weapons and magic in general)
006-8 mapflag zone MMO No Revive
006-8 mapflag battleground
@@ -88,11 +88,35 @@ OnSpark2:
end;
OnSkip:
end;
+OnFinish:
+ if (getcharid(4) == .win) {
+ Zeny+=670;
+ Mobpt+=500;
+ dispbottom l("You earned %s Monster Points for winning.", fnum(500));
+ CAPTURE_FLAG += 1;
+ switch (CAPTURE_FLAG % 11) {
+ case 1: getitem MercBoxA, 1;
+ case 2: getitem any(Aquada, Piberries, Cheese, Bread), 1;
+ case 3: getitem any(Coffee, ChamomileTea, MysteriousBottle), 1;
+ case 4: getitem any(Aquada, Piberries, Cheese, Bread), 1;
+ case 5: getitem any(ReturnPotion, TreasureMap), 1;
+ case 6: getitem any(Aquada, Piberries, Cheese, Bread), 1;
+ case 7: getitem any(SmokeGrenade, DodgePotion), 1;
+ case 8: getitem any(Aquada, Piberries, Cheese, Bread), 1;
+ case 9: getitem any(ScrollSCave, InsuranceContract, Insurance), 1;
+ case 10: getitem any(Aquada, Piberries, Cheese, Bread), 1;
+ default: getitem any(IcedBottle, PurificationPotion, ScrollSMaggot), 1;
+ }
+ }
+ bg_leave();
+ warp "006-8", 44, 66;
+ end;
OnInit:
.distance=4;
.sp1 = 0; // Sparks killed by Team 1
.sp2 = 0; // Sparks killed by Team 2
+ .win = -2; // Last match winner
$@CAPTURE_FLAG = false;
$@CAPTURE_INSC = false;
$@CAPTURE_T1 = bgnew("006-8", 34, 28, "Kage::OnForfeit1", "Kage::OnForfeit1");
@@ -194,8 +218,10 @@ OnMinute25:
consolebug("BG %d is not valid (%d, %d)", .@bg, $@CAPTURE_T1, $@CAPTURE_T2);
}
// Calc. averages
- .@t1a = .@t1lv / .@t1p;
- .@t2a = .@t2lv / .@t2p;
+ if (.@t1p)
+ .@t1a = .@t1lv / .@t1p;
+ if (.@t2p)
+ .@t2a = .@t2lv / .@t2p;
/* Spawn guards as needed... */
// Normalize player count
while (.@t1p < .@t2p) {
@@ -234,7 +260,6 @@ OnMinute28:
OnMinute29:
/* New wave of sparks */
.@am = 7 + getmapusers("006-8");
- // TODO (and a loop)
freeloop(true);
for (.@i=0; .@i < .@am; .@i++) {
bg_monster($@CAPTURE_T1, "006-8", rand2(31, 44), rand2(21, 35), "Magenta Spark", MagentaSpark, "Kage::OnSpark1");
@@ -246,15 +271,20 @@ OnMinute29:
OnMinute30:
/* Finish the duel! */
+ killmonsterall("006-8");
if (.sp2 > .sp1) {
// More spark 2 killed than spark 1
mapannounce "006-8", "Kage : ##BMagenta Team##b is the victor!", 0;
+ .win = $@CAPTURE_T1;
} else if (.sp1 > .sp2) {
mapannounce "006-8", "Kage : ##BYellow Team##b is the victor!", 0;
+ .win = $@CAPTURE_T2;
} else {
mapannounce "006-8", "Kage : ##BDraw##b! No one has won!", 0;
+ .win = -2;
}
- // TODO: Rewards & Victor
+ // Assign rewards
+ maptimer("006-8", 10, "Kage::OnFinish");
/* Cleanup */
$@CAPTURE_FLAG = false;
.sp1 = 0;