From f55be65c4c6f3cc59cd950a53c3c9faf8fef7621 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 17 Feb 2021 22:32:44 -0300 Subject: Give reward to all Fortress Siege combatants and survivors. Failure to conquest will obviously forsake the rewards. --- npc/025-1/ctrl.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'npc/025-1/ctrl.c') 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; } -- cgit v1.2.3-70-g09d2