summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/020-5/bracco.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/npc/020-5/bracco.txt b/npc/020-5/bracco.txt
index 3716642d6..240197798 100644
--- a/npc/020-5/bracco.txt
+++ b/npc/020-5/bracco.txt
@@ -31,7 +31,7 @@
if (.@item <= 0) {
// target item not found
consolebug("ERROR, INVALID ITEM ID DETECTED at NewMeltdown");
- return;
+ return 0;
}
// More shady code by gumi
for (.@inv = 0; .@inv < 9; ++.@inv) {
@@ -40,10 +40,12 @@
if (.@size < 0) {
if (.@size == -1) {
// recipe does not exist
+ consolebug("ERROR, INVALID RECIPE DETECTED at NewMeltdown");
return 0;
break;
}
// inventory does not exist
+ consolewarn("INVENTORY ERROR at NewMeltdown");
return 0;
break;
}
@@ -76,6 +78,11 @@
.@ammo = rand2(.@mini, .@maxi);
+ if (.@ammo < 1) {
+ .@ammo = 1;
+ consolewarn("AMOUNT ERROR at NewMeltdown: %s", getitemname(.@recipe_item));
+ }
+
getitem .@recipe_item, .@ammo;
mesc l("* Acquired @@ @@!", .@ammo, getitemlink(.@recipe_item));
}