summaryrefslogtreecommitdiff
path: root/npc/007-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-01-26 15:33:44 -0200
committerJesusaves <cpntb1@ymail.com>2019-01-26 15:33:44 -0200
commit7c33d9f46270227afdc29c2203b47495463429f2 (patch)
treea328668b4fc303537eefa085d412226afc4214bf /npc/007-1
parent2837174f65d7ab1a749d3ac3ac9d4f8fd88fe4cc (diff)
downloadserverdata-7c33d9f46270227afdc29c2203b47495463429f2.tar.gz
serverdata-7c33d9f46270227afdc29c2203b47495463429f2.tar.bz2
serverdata-7c33d9f46270227afdc29c2203b47495463429f2.tar.xz
serverdata-7c33d9f46270227afdc29c2203b47495463429f2.zip
Ok, random treasure chests works, scatter them on the major dungeons.
Diffstat (limited to 'npc/007-1')
-rw-r--r--npc/007-1/treasure.txt38
1 files changed, 1 insertions, 37 deletions
diff --git a/npc/007-1/treasure.txt b/npc/007-1/treasure.txt
index 0f8397651..96ed036e2 100644
--- a/npc/007-1/treasure.txt
+++ b/npc/007-1/treasure.txt
@@ -31,43 +31,7 @@ OnInit:
007-1,0,0,0 script #chest_00710 NPC_CHEST,{
if (!.busy && !.empty) {
- mesc l("Open the chest?");
- mesc l("Cost: 1 @@", getitemlink(TreasureKey)), 1;
- if (!countitem(TreasureKey))
- close;
- next;
- if (askyesno() == ASK_NO)
- close;
-
- delitem TreasureKey, 1;
- mesc l("You open the chest!");
- if (!.empty) {
- TREASURE_OPEN=TREASURE_OPEN+1;
- .@t=TREASURE_OPEN;
- .@r=rand(0,10000);
-
- // Select treasure list
- // You're warranted an ultra rare (0.1%) every 99 open chests
- // You're warranted a super rare (1%) every 50 open chests
- // There's also rares (10%), uncommons (40%) and commons (60%)
- if (.@t % 99 == 0 || .@r < 10)
- .@loot=any(AtroposMixture, GoldenApple, DivineApple, MercBoxA, SilverGift, Shemagh, EverburnPowder, IridiumOre, PlatinumOre);
- else if (.@t % 50 == 0 || .@r < 100)
- .@loot=any(Grenade, SnakeEgg, LachesisBrew, ArrowAmmoBox, CoinBag, BronzeGift, TerraniteOre, LeadOre, TinOre, SilverOre, GoldOre, TitaniumOre, FluoPowder);
- else if (.@r < 1000)
- .@loot=any(MoubooSteak, ClothoLiquor, Coal, SmallMushroom, HastePotion, StrengthPotion, Dagger, StrangeCoin, IronOre, CopperOre);
- else if (.@r < 4000)
- .@loot=any(Croconut, Potatoz, MoubooSteak, ClothoLiquor, Coal, SmallMushroom, HastePotion, StrengthPotion, StrangeCoin);
- else
- .@loot=any(FatesPotion, ChocolateBar, Plushroom, Chagashroom, RawLog, LeatherPatch);
-
-
- inventoryplace .@loot, 1;
- mesc l("You find @@ inside!", getitemlink(.@loot));
- getitem .@loot, 1;
- } else {
- mesc l("You find @@ inside!", l("nothing"));
- }
+ TreasureBox();
.empty=true;
specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing