From c342c020190d64a9a5d19b6005e88ac68f02dec5 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 8 Aug 2021 17:15:51 -0300 Subject: Missing NPC file (???) and update Iilia --- npc/items/nobow_item.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 npc/items/nobow_item.txt (limited to 'npc/items') diff --git a/npc/items/nobow_item.txt b/npc/items/nobow_item.txt new file mode 100644 index 00000000..0584c524 --- /dev/null +++ b/npc/items/nobow_item.txt @@ -0,0 +1,29 @@ + +function script NoBowItem { + .@me = getarg(0); + + // Developers are always allowed to use this item + if (is_dev()) + return; + + // If you can equip *anything*, this restriction is moot + if (has_permission(PERM_USE_ALL_EQUIPMENT, getcharid(3))) + return; + + // Bows which are not allowed + if (countitem(BansheeBow)) + goto L_Abort; + if (countitem(DesertBow)) + goto L_Abort; + if (countitem(ForestBow)) + goto L_Abort; + // Don't care with Bow/ShortBow/slings and darts + + return; + +// Has to be a goto so `.@me` is loaded properly +L_Abort: + message strcharinfo(0), l("This item is too cumbersome to use and could potentially break your valuable bow by accident. So you give up."); + unequip(.@me); + return; +} -- cgit v1.2.3-60-g2f50