summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-07 09:49:54 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-07 09:49:54 -0300
commita82d70c73f42c1fb1ca154208424efece0fb8f1e (patch)
tree8259c42245d564f51b59f0166adeef6e9f56c0fa
parent2bd1916b5e19244d7b8045a4fe0ecc7e9727732a (diff)
downloadserverdata-a82d70c73f42c1fb1ca154208424efece0fb8f1e.tar.gz
serverdata-a82d70c73f42c1fb1ca154208424efece0fb8f1e.tar.bz2
serverdata-a82d70c73f42c1fb1ca154208424efece0fb8f1e.tar.xz
serverdata-a82d70c73f42c1fb1ca154208424efece0fb8f1e.zip
Override default bury version with Moubootaur Legends rules
-rw-r--r--npc/items/shovel.txt31
1 files changed, 19 insertions, 12 deletions
diff --git a/npc/items/shovel.txt b/npc/items/shovel.txt
index ae7815d6..46e2fdc4 100644
--- a/npc/items/shovel.txt
+++ b/npc/items/shovel.txt
@@ -104,21 +104,28 @@
}
function Bury {
- narrator(S_FIRST_BLANK_LINE | S_LAST_NEXT,
- l("What would you like to bury?"));
+ narrator S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, l("What would you like to bury?");
+ .@items$ = "";
+
+ mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
- mes("##B" + l("Drag and drop an item from your inventory.") + "##b");
.@id = requestitem();
- // You cannot bury: Items you don't have, your shovel, Bound Items, and items which are not dropped by any mobs.
- // The "item not dropped by any mob" is temporary, and should be replaced by "items with trade restrictions" later. [JESUS]
- // event coordinators can always bury
- if (!is_evtc() && (.@id < 1 || countitem(.@id) < 1 ||
- compare(getitemname(.@id), "shovel") || checkbound(.@id) ||
- !getiteminfo(.@id, ITEMINFO_MAXCHANCE)))
- {
- mesc(l("You cannot bury this item!"));
- return false;
+ // If ID is invalid, there's not enough items, it is an Iron Shovel, it is bound = Cannot bury
+ // NOBODY bypass notrade check. (ITR_NONE is 0)
+ if (.@id < 1) close;
+ if (.@id < 1 || countitem(.@id) < 1 || .@id == IronShovel || .@id == SteelShovel || checkbound(.@id) ||
+ (!getiteminfo(.@id, ITEMINFO_TRADE))
+ ) {
+ @ShovelLastUsed = 0;
+ if (.@id == IronShovel || .@id == SteelShovel || checkbound(.@id))
+ mesc l("You cannot bury this item!");
+ else if (!getiteminfo(.@id, ITEMINFO_TRADE))
+ mesc l("This item is too precious, you cannot part with it!");
+ else
+ mesc l("You give up.");
+ close;
+ return;
}
.@amount = 1;