summaryrefslogtreecommitdiff
path: root/npc/functions/treasure.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-06-20 12:24:58 -0300
committerJesusaves <cpntb1@ymail.com>2022-06-20 12:24:58 -0300
commit79eb59f7569fb5aece07046e4d27835de47aaeb9 (patch)
tree4f2f6b9c6fcefe148283fc539b30d0153f492839 /npc/functions/treasure.txt
parent4e34948ab751c193c40e1865779308af6b2263eb (diff)
downloadserverdata-79eb59f7569fb5aece07046e4d27835de47aaeb9.tar.gz
serverdata-79eb59f7569fb5aece07046e4d27835de47aaeb9.tar.bz2
serverdata-79eb59f7569fb5aece07046e4d27835de47aaeb9.tar.xz
serverdata-79eb59f7569fb5aece07046e4d27835de47aaeb9.zip
Copper Key can now be used in Saulc's Palace.
Gives from 1.5% to 3% bonus compared to normal treasure chest
Diffstat (limited to 'npc/functions/treasure.txt')
-rw-r--r--npc/functions/treasure.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/npc/functions/treasure.txt b/npc/functions/treasure.txt
index 086978178..d55caedc8 100644
--- a/npc/functions/treasure.txt
+++ b/npc/functions/treasure.txt
@@ -4,7 +4,7 @@
// Description:
// Random Treasure Box Utils
-// TreasureBox ( { bonus chance } )
+// TreasureBox ( { bonus chance{, TreasureKey} } )
function script TreasureBox {
.@id=getnpcid();
if (RNGTREASURE_DATE[.@id] > gettimetick(2)) {
@@ -12,15 +12,16 @@ function script TreasureBox {
close;
}
+ .@key=getarg(1, TreasureKey);
mesc l("Open the chest?");
- mesc l("Cost: 1 @@", getitemlink(TreasureKey)), 1;
- if (!countitem(TreasureKey))
+ mesc l("Cost: 1 @@", getitemlink(.@key)), 1;
+ if (!countitem(.@key))
close;
next;
if (askyesno() == ASK_NO)
close;
- delitem TreasureKey, 1;
+ delitem .@key, 1;
mesc l("You open the chest!");
RNGTREASURE_DATE[.@id]=gettimetick(2)+CHEST_WAITTIME; // Minimum 15 minutes