summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-17 17:01:05 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-17 17:01:05 -0300
commitd2603a1d4892c71180063f71a0eb30388754c456 (patch)
treef6dc9e94f5f8e57c809c7a225d8b7cacfcec302f /npc
parentbfac8120f277238c03ff8cc55514a645f943a67c (diff)
downloadserverdata-d2603a1d4892c71180063f71a0eb30388754c456.tar.gz
serverdata-d2603a1d4892c71180063f71a0eb30388754c456.tar.bz2
serverdata-d2603a1d4892c71180063f71a0eb30388754c456.tar.xz
serverdata-d2603a1d4892c71180063f71a0eb30388754c456.zip
Remove unequipcb (deprecated)
Diffstat (limited to 'npc')
-rw-r--r--npc/items/unequipcb.txt22
-rw-r--r--npc/items/unreleased_item.txt10
-rw-r--r--npc/scripts.conf1
3 files changed, 6 insertions, 27 deletions
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",