summaryrefslogtreecommitdiff
path: root/npc/craft/tweak.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-05 02:27:06 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-05 02:27:06 -0300
commitb09a9318b419bd5bfcbc4a5b4b706ac9e04a4111 (patch)
treecea809289fcd4030ebddf35a75cb2dda576484ba /npc/craft/tweak.txt
parent97fb3413c7b0e431a54a9157eff3bd29f75de511 (diff)
downloadserverdata-b09a9318b419bd5bfcbc4a5b4b706ac9e04a4111.tar.gz
serverdata-b09a9318b419bd5bfcbc4a5b4b706ac9e04a4111.tar.bz2
serverdata-b09a9318b419bd5bfcbc4a5b4b706ac9e04a4111.tar.xz
serverdata-b09a9318b419bd5bfcbc4a5b4b706ac9e04a4111.zip
Add a warning about duplicated crafts.
Forbid entirely duplicated tweaks (it could also be used as a bug exploit)
Diffstat (limited to 'npc/craft/tweak.txt')
-rw-r--r--npc/craft/tweak.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/npc/craft/tweak.txt b/npc/craft/tweak.txt
index 4110bd3a1..ef1614e3d 100644
--- a/npc/craft/tweak.txt
+++ b/npc/craft/tweak.txt
@@ -72,6 +72,12 @@ function script SmithTweakSystem {
return false;
}
+ // No duplicates
+ if (countitem(.@x) > 1) {
+ mesc l("You are carrying duplicates of the same item. Sorry, but I have no idea which one you want to tweak."), 1;
+ return false;
+ }
+
// Take the money and AP away
POL_PlayerMoney(.@price);
SMITH_TWEAKS+=1;