summaryrefslogtreecommitdiff
path: root/npc/functions/treasure.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/treasure.txt')
-rw-r--r--npc/functions/treasure.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/npc/functions/treasure.txt b/npc/functions/treasure.txt
index f8eab3175..a0d0a000d 100644
--- a/npc/functions/treasure.txt
+++ b/npc/functions/treasure.txt
@@ -4,6 +4,7 @@
// Description:
// Random Treasure Box Utils
+// TreasureBox ( { bonus chance } )
function script TreasureBox {
.@id=getnpcid();
if (RNGTREASURE_DATE[.@id] > gettimetick(2)) {
@@ -28,6 +29,8 @@ function script TreasureBox {
TREASURE_OPEN=TREASURE_OPEN+1;
.@t=TREASURE_OPEN;
.@r=rand(0,10000)-(readparam2(bLuk)*2);
+ // Some chests may have different rates
+ .@r-=getarg(0, 0);
// Select treasure list
// You're warranted an ultra rare (0.1%) every 149 open chests
@@ -35,13 +38,13 @@ function script TreasureBox {
// There's also rares (14%), uncommons (35%) and commons (50%)
.@ur_rate=min(10, (TREASURE_OPEN/10));
if (.@t % 149 == 0 || .@r < .@ur_rate)
- .@loot=any(ScrollMagnusHealC, GoldenApple, DivineApple, MercBoxC, ScrollSDragon, Shemagh, EverburnPowder, IridiumOre, PlatinumOre, YerbaMate);
+ .@loot=any(ScrollMagnusHealC, GoldenApple, DivineApple, MercBoxE, ScrollSDragon, Shemagh, EverburnPowder, IridiumOre, PlatinumOre);
else if (.@t % 50 == 0 || .@r < 100)
- .@loot=any(MercBoxB, ScrollMagnusHealB, SnakeEgg, LachesisBrew, ArrowAmmoBox, GoldPieces, SilverGift, MoveSpeedPotion, TerraniteOre, LeadOre, TinOre, SilverOre, GoldOre, TitaniumOre, FluoPowder, EquipmentBlueprintC, AlchemyBlueprintC, AlchemyBlueprintD, AncientBlueprint, JasmineTea);
+ .@loot=any(MercBoxC, ScrollMagnusHealB, SnakeEgg, LachesisBrew, ArrowAmmoBox, GoldPieces, SilverGift, MoveSpeedPotion, TerraniteOre, LeadOre, TinOre, SilverOre, GoldOre, TitaniumOre, FluoPowder, EquipmentBlueprintC, AlchemyBlueprintC, AlchemyBlueprintD, AncientBlueprint, YerbaMate, JasmineTea);
else if (.@r < 1500 || .@t == 0)
- .@loot=any(MercBoxA, MoubooSteak, SmokeGrenade, ClothoLiquor, Coal, RedPlushWine, HastePotion, CoinBag, StrengthPotion, Dagger, BronzeGift, IronOre, CopperOre, BlueDye, EquipmentBlueprintB, AlchemyBlueprintB, AlchemyBlueprintC, OolongTea);
+ .@loot=any(MercBoxB, MoubooSteak, SmokeGrenade, ClothoLiquor, Coal, RedPlushWine, HastePotion, CoinBag, StrengthPotion, Dagger, BronzeGift, IronOre, CopperOre, BlueDye, EquipmentBlueprintB, AlchemyBlueprintB, AlchemyBlueprintC, OolongTea);
else if (.@r < 5000)
- .@loot=any(Croconut, Potatoz, MoubooSteak, ClothoLiquor, Coal, SmallMushroom, HastePotion, StrengthPotion, WoodenLog, LeatherPatch, Beer, EquipmentBlueprintA, EquipmentBlueprintB, AlchemyBlueprintA, SpearmintTea, TreasureMap);
+ .@loot=any(MercBoxA, Croconut, Potatoz, MoubooSteak, ClothoLiquor, Coal, SmallMushroom, HastePotion, StrengthPotion, WoodenLog, LeatherPatch, Beer, EquipmentBlueprintA, EquipmentBlueprintB, AlchemyBlueprintA, SpearmintTea, TreasureMap);
else
.@loot=any(FatesPotion, ChocolateBar, Plushroom, Chagashroom, RawLog, LeatherPatch, BugLeg, ScorpionStinger, SmallKnife, StrangeCoin, ChamomileTea, EquipmentBlueprintA);