summaryrefslogtreecommitdiff
path: root/npc/craft/alchemy.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-09-14 23:17:42 -0300
committerJesusaves <cpntb1@ymail.com>2020-09-14 23:17:42 -0300
commitef6309d9be8d750b3138052e278410f7306b58a1 (patch)
treef66ee0625a9cc7e1458c770fd2c9b9c9546cbc18 /npc/craft/alchemy.txt
parent9284a1c3406be2783c68aa05f11afee435887e57 (diff)
downloadserverdata-ef6309d9be8d750b3138052e278410f7306b58a1.tar.gz
serverdata-ef6309d9be8d750b3138052e278410f7306b58a1.tar.bz2
serverdata-ef6309d9be8d750b3138052e278410f7306b58a1.tar.xz
serverdata-ef6309d9be8d750b3138052e278410f7306b58a1.zip
Validate batch crafting - We made the code unstable anyway
Diffstat (limited to 'npc/craft/alchemy.txt')
-rw-r--r--npc/craft/alchemy.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/npc/craft/alchemy.txt b/npc/craft/alchemy.txt
index 6e0084596..9022edb84 100644
--- a/npc/craft/alchemy.txt
+++ b/npc/craft/alchemy.txt
@@ -43,9 +43,15 @@ function script AlchemySystem {
// Alchemy loop
.@i=0;
while (.@i < .@m) {
+ .@s=validatecraft(.@craft);
+ // Could not validate (not enough resources)
+ if (!.@s) {
+ mesc l("Not crafting - insufficient materials!"), 1;
+ break;
+ }
.@s=usecraft(.@craft);
.@i++;
- // Failed for whatever reason
+ // Exploiting?!
if (!.@s)
break;
}