From d2603a1d4892c71180063f71a0eb30388754c456 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 17 Apr 2021 17:01:05 -0300 Subject: Remove unequipcb (deprecated) --- npc/items/unequipcb.txt | 22 ---------------------- npc/items/unreleased_item.txt | 10 ++++++---- npc/scripts.conf | 1 - 3 files changed, 6 insertions(+), 27 deletions(-) delete mode 100644 npc/items/unequipcb.txt (limited to 'npc') diff --git a/npc/items/unequipcb.txt b/npc/items/unequipcb.txt deleted file mode 100644 index a1c7881d..00000000 --- a/npc/items/unequipcb.txt +++ /dev/null @@ -1,22 +0,0 @@ -- script UnequipCB NPC32767,{ - end; - -OnUnequip: - unequipbyid (@unequip_slot - 1); - @unequip_slot = 0; - end; -} - -function script UnequipLater { - // if there are multiple items that want to be removed, - // only schedule one timer - scripts will be called again - if (@unequip_slot) - goto L_Return; - - @unequip_slot = (@slotId + 1); - addtimer 0, "UnequipCB::OnUnequip"; - goto L_Return; - -L_Return: - return; -} diff --git a/npc/items/unreleased_item.txt b/npc/items/unreleased_item.txt index c88df137..de7ac0f0 100644 --- a/npc/items/unreleased_item.txt +++ b/npc/items/unreleased_item.txt @@ -1,10 +1,12 @@ - +// Unreleased items function script UnreleasedItem { // If the server allows equipping unreleased items or if the active character is staff, do nothing. - if (debug || getgmlevel()) - goto L_Return; + // If you can equip *anything*, this restriction is moot + if (debug || has_permission(PERM_USE_ALL_EQUIPMENT, getcharid(3))) + return; + .@me=getarg(0); message strcharinfo(0), "You have difficulties equipping this item, as if it is not yet fully in this world."; - callfunc "UnequipLater"; + unequip(.@me); goto L_Return; L_Return: diff --git a/npc/scripts.conf b/npc/scripts.conf index 52ac9b26..938eaea7 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -61,7 +61,6 @@ "npc/items/unreleased_item.txt", "npc/items/require_stat.txt", "npc/items/warpTowels.txt", -"npc/items/unequipcb.txt", "npc/items/check_wand.txt", "npc/items/mirror.txt", "npc/items/rubber_bat.txt", -- cgit v1.2.3-60-g2f50