summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-20 14:10:10 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-20 14:10:10 -0200
commite3dac0c139cc8b3c2753a94cb73062a1f82e6b1c (patch)
tree30ca1394aed4f733ca5fbbee8cfadef81abf126b
parent885cb4cbfd5df4e71b0f7b2673c887b4181ede48 (diff)
downloadserverdata-e3dac0c139cc8b3c2753a94cb73062a1f82e6b1c.tar.gz
serverdata-e3dac0c139cc8b3c2753a94cb73062a1f82e6b1c.tar.bz2
serverdata-e3dac0c139cc8b3c2753a94cb73062a1f82e6b1c.tar.xz
serverdata-e3dac0c139cc8b3c2753a94cb73062a1f82e6b1c.zip
Empty box core logic/mechanic. Still Unobtanium.
-rw-r--r--db/re/item_db.conf18
-rw-r--r--npc/items/emptybox.txt42
-rw-r--r--npc/scripts.conf1
3 files changed, 59 insertions, 2 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index 4119e0015..62dbea4ce 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -426,14 +426,14 @@ item_db: (
Id: 513
AegisName: "Croconut"
Name: "Croconut"
- Type: "IT_HEALING"
+ Type: "IT_USABLE"
Buy: 100
Sell: 35
Weight: 80
Refine: false
ViewSprite: 513
Script: <"
- doevent "Croconut::OnUse";
+ doevent "Empty Box#it::OnUse";
">
},
{
@@ -2504,6 +2504,20 @@ item_db: (
}
">
},
+{
+ Id: 631
+ AegisName: "EmptyBox"
+ Name: "Empty Box"
+ Type: "IT_USABLE"
+ Buy: 100
+ Sell: 35
+ Weight: 80
+ Refine: false
+ ViewSprite: 513
+ Script: <"
+ doevent "Croconut::OnUse";
+ ">
+},
// Mounts
{
diff --git a/npc/items/emptybox.txt b/npc/items/emptybox.txt
new file mode 100644
index 000000000..0243cac6c
--- /dev/null
+++ b/npc/items/emptybox.txt
@@ -0,0 +1,42 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Allows to mount your own fish/plushroom/croconut box
+
+000-0,0,0,0 script Empty Box#it NPC_HIDDEN,{
+ close;
+
+OnUse:
+ mesn;
+ mesc l("You can fill this box with the following:");
+ mesc l("- @@ @@", 17, getitemlink(Croconut));
+ mesc l("- @@ @@", 20, getitemlink(CommonCarp));
+ mesc l("- @@ @@", 87, getitemlink(Plushroom));
+ mes "";
+ mesc l("Fill with what?");
+ select
+ l("Don't fill"),
+ rif(countitem(Croconut) >= 17, l("17 Croconut")),
+ rif(countitem(CommonCarp) >= 20, l("20 Common Carp")),
+ rif(countitem(Plushroom) >= 87, l("87 Plushroom"));
+ mes "";
+ switch (@menu) {
+ case 2:
+ delitem Croconut, 17;
+ getitem CroconutBox, 1;
+ break;
+ case 3:
+ delitem CommonCarp, 17;
+ getitem FishBox, 1;
+ break;
+ case 4:
+ delitem Plushroom, 17;
+ getitem PlushroomBox, 1;
+ break;
+ default:
+ getitem EmptyBox, 1;
+ }
+ closedialog;
+ close;
+}
diff --git a/npc/scripts.conf b/npc/scripts.conf
index f9f6c6c5d..0065c2d95 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -60,6 +60,7 @@
// Item functions
"npc/items/books.txt",
"npc/items/croconut.txt",
+"npc/items/emptybox.txt",
"npc/items/shovel.txt",
"npc/items/teleporter.txt",