summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNetSysFire <59517351+NetSysFire@users.noreply.github.com>2023-02-26 22:26:23 +0100
committerNetSysFire <59517351+NetSysFire@users.noreply.github.com>2023-02-26 22:26:29 +0100
commit0a114ce944a018cbe7bd607cb20e27b8d9f2a6ef (patch)
treee9ad98c6108af0a500e861a3dbe12a9731a93517
parentf99f524373f46bcf4810d4414ee5f7a9d80e943b (diff)
downloadserverdata-0a114ce944a018cbe7bd607cb20e27b8d9f2a6ef.tar.gz
serverdata-0a114ce944a018cbe7bd607cb20e27b8d9f2a6ef.tar.bz2
serverdata-0a114ce944a018cbe7bd607cb20e27b8d9f2a6ef.tar.xz
serverdata-0a114ce944a018cbe7bd607cb20e27b8d9f2a6ef.zip
more work on treasure
-rw-r--r--npc/functions/treasure.txt17
1 files 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);