diff options
author | Fedja Beader <fedja@protonmail.ch> | 2023-06-07 20:29:09 +0000 |
---|---|---|
committer | Jesusalva Jesusalva <jesusalva@themanaworld.org> | 2023-06-07 20:29:09 +0000 |
commit | c0b3d5dc5732a8f7b185235b0771abf635155db4 (patch) | |
tree | f861b9612ffb5eb9baad9345cf2f0df25cfeba5f /npc | |
parent | dc895c38b314ca243c791ecf93037eb71af56afe (diff) | |
download | serverdata-c0b3d5dc5732a8f7b185235b0771abf635155db4.tar.gz serverdata-c0b3d5dc5732a8f7b185235b0771abf635155db4.tar.bz2 serverdata-c0b3d5dc5732a8f7b185235b0771abf635155db4.tar.xz serverdata-c0b3d5dc5732a8f7b185235b0771abf635155db4.zip |
Arkim: put an end to spacebar abuse
This includes an option to donate "all teeth" or "all wings".
Diffstat (limited to 'npc')
-rw-r--r-- | npc/015-3/arkim.txt | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/npc/015-3/arkim.txt b/npc/015-3/arkim.txt index af83aa179..32a28b93d 100644 --- a/npc/015-3/arkim.txt +++ b/npc/015-3/arkim.txt @@ -17,6 +17,7 @@ function pmap_intro; function pmap_wrong; function pmap_right; + function handle_donation; mesn; mesq lg("Hello, young girl...", "Hello, young boy..."); next; @@ -35,35 +36,43 @@ L_Loop: // Daily limit reached .@q2=getq2(HurnscaldQuest_Arkim); - if (.@q2 >= (BaseLevel-17)/3) goto L_Timer; + .@donations_limit = (BaseLevel-17)/3 - .@q2; + .@teeth_limit = min(countitem(BatTeeth), .@donations_limit); + .@wings_limit = min(countitem(BatWing), .@donations_limit); + + if (.@donations_limit <= 0) + goto L_Timer; + select rif(countitem(BatTeeth) >= 1, l("Donate a Bat Teeth")), rif(countitem(BatWing) >= 1, l("Donate a Bat Wing")), + rif(.@teeth_limit >= 2, l("Donate all Bat Teeth")), + rif(.@wings_limit >= 2, l("Donate all Bat Wings")), l("I better leave this crazy man to his ordeals..."), l("Had you any breakthrough?"); mes ""; switch (@menu) { case 1: - delitem BatTeeth, 1; - getexp 36, 0; - Zeny=Zeny+70; + handle_donation(BatTeeth, 1, 70, 36); break; case 2: - delitem BatWing, 1; - getexp 25, 0; - Zeny=Zeny+50; + handle_donation(BatWing, 1, 50, 25); break; case 3: + handle_donation(BatTeeth, .@teeth_limit, 70, 36); + break; + case 4: + handle_donation(BatWing, .@wings_limit, 50, 25); + break; + case 5: goto L_Assign; close; // Will never reach. break; - case 4: + case 6: goto L_Research; break; } - $ARKIM_ST=$ARKIM_ST+1; - setq2 HurnscaldQuest_Arkim, .@q2+1; goto L_Loop; L_Timer: @@ -169,6 +178,19 @@ L_PirateMap: if (.@q == 5) pmap_right(); close; +function handle_donation { // (partID, Amount, Zeny, bEXP) + .@partID = getarg(0); + .@amount = getarg(1); + .@zeny = getarg(2); + .@bEXP = getarg(3); + + delitem .@partID, .@amount; + getexp (.@amount * .@bEXP), 0; + Zeny += (.@amount * .@zeny); + $ARKIM_ST += .@amount; + setq2 HurnscaldQuest_Arkim, (getq2(HurnscaldQuest_Arkim) + .@amount); +} + function pmap_intro { mesn; mesq l("There's no one who knows Butterfly Caves better than me, child. These are MY caves, after all."); |