diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-09-14 23:17:42 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-09-14 23:17:42 -0300 |
commit | ef6309d9be8d750b3138052e278410f7306b58a1 (patch) | |
tree | f66ee0625a9cc7e1458c770fd2c9b9c9546cbc18 /npc/craft | |
parent | 9284a1c3406be2783c68aa05f11afee435887e57 (diff) | |
download | serverdata-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')
-rw-r--r-- | npc/craft/alchemy.txt | 8 |
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; } |