summaryrefslogtreecommitdiff
path: root/npc/025-1/ctrl.c
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-02-17 22:32:44 -0300
committerJesusaves <cpntb1@ymail.com>2021-02-17 22:32:44 -0300
commitf55be65c4c6f3cc59cd950a53c3c9faf8fef7621 (patch)
treebf6233472b3eb9b58a31405d53272442c7f56033 /npc/025-1/ctrl.c
parente7f3365d53d5cf1155cf02b1c32f97ff2f088d13 (diff)
downloadserverdata-f55be65c4c6f3cc59cd950a53c3c9faf8fef7621.tar.gz
serverdata-f55be65c4c6f3cc59cd950a53c3c9faf8fef7621.tar.bz2
serverdata-f55be65c4c6f3cc59cd950a53c3c9faf8fef7621.tar.xz
serverdata-f55be65c4c6f3cc59cd950a53c3c9faf8fef7621.zip
Give reward to all Fortress Siege combatants and survivors.
Failure to conquest will obviously forsake the rewards.
Diffstat (limited to 'npc/025-1/ctrl.c')
-rw-r--r--npc/025-1/ctrl.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/npc/025-1/ctrl.c b/npc/025-1/ctrl.c
index d11291552..49d8467ed 100644
--- a/npc/025-1/ctrl.c
+++ b/npc/025-1/ctrl.c
@@ -109,12 +109,7 @@ function script FTStatue {
return false;
}
-// FTRodex(char id)
-function script FTRodex {
- .@cid=getarg(0);
- rodex_sendmail(.@cid, "Commander Povo", "Fortress Town Reward", "For your bravure in Fortress Town conquest! Cheers!", 0, StrangeCoin, 1+$MK_TEMPVAR);
- return;
-}
+
@@ -436,6 +431,14 @@ OnTue0000:
OnConquest:
$MK_TEMPVAR+=1;
+ // Handle rewards in low priority
+ freeloop(true);
+ for (.@i=0; .@i < getarraysize($@FORT_BLACKLIST); .@i++) {
+ .@cid=$@FORT_BLACKLIST[.@i];
+ rodex_sendmail(.@cid, "Commander Povo", "Fortress Town Reward", "For your bravure in Fortress Town conquest! Cheers!", 0, StrangeCoin, 1+$MK_TEMPVAR);
+ }
+ freeloop(false);
+ // Clean up the remainders of the fight
FTCleanup(true);
kamibroadcast("Fortress Town has been captured by the Allied Forces!");
// Experience injection to the brave (500k EXP, 100k JEXP)
@@ -443,9 +446,20 @@ OnConquest:
getexp 500000, 100000;
getitem StrangeCoin, rand2(40,50);
}
+ // Experience injection to the survivors
+ maptimer("025-1", 10, "Gate#F::OnConBonus");
stopnpctimer;
- // Handle rewards in low priority
- array_filter($@FORT_BLACKLIST, "FTRodex");
+ end;
+
+OnConBonus:
+ message strcharinfo(0), l("Commander Povo : Good job %s. You did well.", lg("girl", "man"));
+ .@it=any(ApanaCake, SacredLifePotion, SacredManaPotion, SacredImmortalityPotion, DeathPotion, PurificationPotion, ApanaCake);
+ if (.@it == ApanaCake || .@it == PurificationPotion)
+ .@qn = rand2(2, 5);
+ else
+ .@qn = 1;
+ getitem .@it, .@qn;
+ getexp 25000, 10000;
end;
}