summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2025-08-02 21:57:50 -0300
committerJesusaves <cpntb1@ymail.com>2025-08-02 21:57:50 -0300
commitb98388a5fc81472c78c832db3fa3a51bd58a584e (patch)
tree5e5e9e6c3a441e124e87cd0a15fb5eba61d2e6ac
parentb1b344f7611f146e9a06254245552bebf999c74d (diff)
downloadserverdata-b98388a5fc81472c78c832db3fa3a51bd58a584e.tar.gz
serverdata-b98388a5fc81472c78c832db3fa3a51bd58a584e.tar.bz2
serverdata-b98388a5fc81472c78c832db3fa3a51bd58a584e.tar.xz
serverdata-b98388a5fc81472c78c832db3fa3a51bd58a584e.zip
(Untested) Allow you to acquire Monster Grants
-rw-r--r--npc/003-1/ishi.txt95
1 files changed, 92 insertions, 3 deletions
diff --git a/npc/003-1/ishi.txt b/npc/003-1/ishi.txt
index fbc81292d..14e114696 100644
--- a/npc/003-1/ishi.txt
+++ b/npc/003-1/ishi.txt
@@ -36,6 +36,19 @@
@mpq_cost+=(BaseLevel/3)*3;
}
+ if (TotalBaseLevel() >= 100) {
+ mesn l("Ishi, the Rewards Master");
+ mesq l("Welcome! You're now officially eligible to issue Monster Grants to other adventurers, whom you deem to have done significant deeds to the Alliance equiparable to slaying a lot of monsters.");
+ dnext;
+ mesq l("Do you wish to trade your monster points for items, or do you want to acquire monster grants?");
+ select
+ l("Trade monster points"),
+ l("Acquire monster grants");
+ mes "";
+ clear;
+ if (@menu == 2) goto L_Grants;
+ }
+
if (Mobpt < @mpq_cost)
{
mesn l("Ishi, the Rewards Master");
@@ -105,6 +118,8 @@
array_push(@Items, PlatinumOre);
array_push(@Items, CursedAmmoBox);
+ array_remove(@Items, RustyKnife);
+
array_push(@Rares, MercBoxB);
array_push(@Rares, 30);
array_push(@Rares, AlchemyBlueprintD);
@@ -117,6 +132,8 @@
if (TotalBaseLevel() >= 300) {
array_push(@Items, ThornAmmoBox);
+ array_remove(@Items, PiouLegs);
+
array_push(@Rares, MercBoxC);
array_push(@Rares, 20);
array_push(@Rares, AlchemyBlueprintE);
@@ -125,13 +142,11 @@
array_push(@Rares, (JobLevel/21));
}
- // Remove some useless Loot for level 500+
+ // Additional Loot for level 500+
if (TotalBaseLevel() >= 500) {
array_remove(@Items, Plushroom);
array_remove(@Items, Candy);
array_remove(@Items, BugLeg);
- array_remove(@Items, PiouLegs);
- array_remove(@Items, RustyKnife);
array_push(@Rares, MercBoxD);
array_push(@Rares, 10);
@@ -262,6 +277,80 @@ L_Give_all:
goto L_Items;
close;
+L_Grants:
+ clear;
+ mesn l("Ishi, the Rewards Master");
+ mesq l("Perfect! You have %s Monster Points. Here's the grant selection.", fnum(Mobpt));
+ select
+ l("On hindsight, I've changed my mind."),
+ rif(REBIRTH >= 1, l("I want a Monster Grant I")),
+ rif(REBIRTH >= 2, l("I want a Monster Grant II")),
+ rif(REBIRTH >= 3, l("I want a Monster Grant III")),
+ rif(REBIRTH >= 4, l("I want a Monster Grant IV")),
+ rif(REBIRTH >= 5, l("I want a Monster Grant V"));
+ mes "";
+ switch (@menu) {
+ case 2:
+ .@grant = MonsterGrantI;
+ .@value = 1000;
+ break;
+ case 3:
+ .@grant = MonsterGrantII;
+ .@value = 2500;
+ break;
+ case 4:
+ .@grant = MonsterGrantIII;
+ .@value = 10000;
+ break;
+ case 5:
+ .@grant = MonsterGrantIV;
+ .@value = 25000;
+ break;
+ case 6:
+ .@grant = MonsterGrantV;
+ .@value = 100000;
+ break;
+ default:
+ closeclientdialog;
+ close;
+ }
+
+ // Base purchase tax
+ .@value += 500;
+
+ // World Hero reverse discount (30%)
+ if ($WORLD_HERO$ != strcharinfo(0))
+ .@value = .@value * 4 / 3;
+
+ // Legendary Heroes reverse discount (10%)
+ if (!islegendary())
+ .@value = .@value * 11 / 10;
+
+ // Evil alignment discount
+ if (alignment() < 0)
+ .@value -= 100;
+
+ // Academy reverse base tax (up to 200)
+ .@value += 25 * min(1, 8-ACADEMIC_RANK);
+
+ // Base price (+20%)
+ .@value = .@value * 6 / 5;
+
+ mesc l("A %s will cost you %s Monster Points.", getitemlink(.@grant), fnum(.@value));
+ if (Mobpt < .@value) {
+ mesc l("You do not have enough monster points."), 1;
+ next;
+ goto L_Grants;
+ }
+ mesc l("Do you wish to purchase it?");
+ if (askyesno() == ASK_YES) {
+ inventoryplace .@grant, 1;
+ Mobpt -= .@value;
+ getitem .@grant, 1;
+ }
+ next;
+ goto L_Grants;
+
OnInit:
.@npcId = getnpcid(.name$);
//setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);