From 0a114ce944a018cbe7bd607cb20e27b8d9f2a6ef Mon Sep 17 00:00:00 2001 From: NetSysFire <59517351+NetSysFire@users.noreply.github.com> Date: Sun, 26 Feb 2023 22:26:23 +0100 Subject: more work on treasure --- npc/functions/treasure.txt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/npc/functions/treasure.txt b/npc/functions/treasure.txt index a14317a8c..5de1c19bc 100644 --- a/npc/functions/treasure.txt +++ b/npc/functions/treasure.txt @@ -14,7 +14,7 @@ function script TreasureBox { .@key=getarg(1, TreasureKey); mesc l("Open the chest?"); - mesc l("Cost: 1 @@", getitemlink(.@key)), 1; + mesc l("Cost: 1 %s", getitemlink(.@key)), 1; if (!countitem(.@key)) close; next; @@ -51,19 +51,29 @@ function script TreasureBox { // ultra rare if (.@t % 149 == 0 || .@r < .@ur_rate) { .@money=rand(1000, 2000); - .@loot=any(ScrollMagnusHealC, SaviorBlueprint, DivineApple, MercBoxE, ScrollSDragon, Shemagh, Shemagh, EverburnPowder, IridiumOre, PlatinumOre, SacredImmortalityPotion, MagicApple, ElixirOfLife); + .@loot=any(ScrollMagnusHealC, SaviorBlueprint, DivineApple, MercBoxE, ScrollSDragon, EverburnPowder, IridiumOre, PlatinumOre, SacredImmortalityPotion, MagicApple, ElixirOfLife); // super rare } else if (.@t % 50 == 0 || .@r < 200) { .@money=rand(500, 750); .@loot=any(MercBoxC, ScrollMagnusHealB, SnakeEgg, LachesisBrew, ArrowAmmoBox, GoldPieces, SilverGift, TerraniteOre, LeadOre, TinOre, SilverOre, GoldOre, TitaniumOre, FluoPowder, Lockpicks, EquipmentBlueprintC, AlchemyBlueprintC, AlchemyBlueprintD, AncientBlueprint, YerbaMate, JasmineTea, DeathPotion, SacredLifePotion, SacredManaPotion, BrokenWarpCrystal, PurificationPotion, GoldenApple); + if (.@loot == SnakeEgg) + .@count=rand(2, 6); + else if (.@loot == Lockpicks) + .@count=rand(3, 6); + else if (.@loot == DeathPotion) + .@count=rand(2, 5); // rare } else if (.@r < 1600 || .@t == 0) { .@money=rand(100, 300); - .@loot=any(MercBoxB, MoubooSteak, ClothoLiquor, Coal, RedPlushWine, PrecisionPotion, CoinBag, DodgePotion, MoveSpeedPotion, Dagger, Lockpicks, BronzeGift, IronOre, CopperOre, BlueDye, EquipmentBlueprintB, AlchemyBlueprintB, AlchemyBlueprintC, OolongTea, Curshroom); + .@loot=any(MercBoxB, MoubooSteak, ClothoLiquor, Coal, RedPlushWine, PrecisionPotion, CoinBag, DodgePotion, MoveSpeedPotion, Lockpicks, BronzeGift, IronOre, CopperOre, BlueDye, EquipmentBlueprintB, AlchemyBlueprintB, AlchemyBlueprintC, OolongTea, Curshroom); if (.@loot == Coal) .@count=rand(6, 10); else if (.@loot == Lockpicks) .@count=rand(1, 3); + else if (.@loot == IronOre) + .@count=rand(2, 5); + else if (.@loot == CopperOre) + .@count=rand(1, 3); // uncommon } else if (.@r < 5200) { .@money=rand(20, 80); @@ -101,6 +111,7 @@ function script TreasureBox { dispbottom l("I must have been naughty."); else dispbottom l("My devilish actions have been rewarded!"); + // Get Monster points for treasure hunting (20% from job level) if (MPQUEST) Mobpt+=(JobLevel/5); -- cgit v1.2.3-60-g2f50