summaryrefslogtreecommitdiff
path: root/npc/craft
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2023-12-07 15:55:30 -0300
committerJesusaves <cpntb1@ymail.com>2023-12-07 15:55:30 -0300
commit0b23910ba921703b7d2013f876c072f600f8b0c6 (patch)
tree15dae037b1f8205d6cae46e5df9658393e317a58 /npc/craft
parente51ff8eb6af4d3b00070fb1cfc5503715ef6c9f2 (diff)
downloadserverdata-0b23910ba921703b7d2013f876c072f600f8b0c6.tar.gz
serverdata-0b23910ba921703b7d2013f876c072f600f8b0c6.tar.bz2
serverdata-0b23910ba921703b7d2013f876c072f600f8b0c6.tar.xz
serverdata-0b23910ba921703b7d2013f876c072f600f8b0c6.zip
Harden Barzil's code
Diffstat (limited to 'npc/craft')
-rw-r--r--npc/craft/smith.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/npc/craft/smith.txt b/npc/craft/smith.txt
index 9b8387c91..ae7872527 100644
--- a/npc/craft/smith.txt
+++ b/npc/craft/smith.txt
@@ -27,6 +27,13 @@ function script SmithSystem {
copyarray(.knowledge,RECIPES_EQUIPMENT,getarraysize(RECIPES_EQUIPMENT));
.success=false;
+ // Hack check
+ if (checkbound(SunnyCrystal)) {
+ mesc l("The %s in your backpack reacts violently. You should first dispose of it before attempting to craft anything.", getitemlink(SunnyCrystal)), 1;
+ return false;
+ }
+
+ // Main craft loop
mesc l("WARNING: Strange bugs may happen if you attempt to craft an item you already have on inventory!"), 1;
setskin "craft4";
.@var$ = requestcraft(4);