summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2023-01-03 17:51:55 -0300
committerJesusaves <cpntb1@ymail.com>2023-01-03 17:51:55 -0300
commitc1b16ac31a17a7b18eadbed188a1a1db7a074733 (patch)
tree4c1688c29a410fcb4ffd757db9ea7885b96e5d34 /npc
parent189693804983bd1deb61273d3048586fca283c4b (diff)
downloadserverdata-c1b16ac31a17a7b18eadbed188a1a1db7a074733.tar.gz
serverdata-c1b16ac31a17a7b18eadbed188a1a1db7a074733.tar.bz2
serverdata-c1b16ac31a17a7b18eadbed188a1a1db7a074733.tar.xz
serverdata-c1b16ac31a17a7b18eadbed188a1a1db7a074733.zip
Lets try again...
Diffstat (limited to 'npc')
-rw-r--r--npc/020-5/bracco.txt13
1 files changed, 9 insertions, 4 deletions
diff --git a/npc/020-5/bracco.txt b/npc/020-5/bracco.txt
index a6e91f7da..6dce774bd 100644
--- a/npc/020-5/bracco.txt
+++ b/npc/020-5/bracco.txt
@@ -122,7 +122,7 @@
return;
}
- // MassMeltdown( item, price )
+ // MassMeltdown( item, price{, override} )
function MassMeltdown {
.@id=getarg(0);
.@price=getarg(1);
@@ -149,16 +149,18 @@
debugmes "Requested to melt down %d %s (%s)", .@total, getitemname(.@id), strcharinfo(0);
freeloop(true);
+ .@cnt = 0;
for (.@index=0; .@index < @inventorylist_count; .@index++) {
.@x=@inventorylist_id[.@index];
if (.@x == getarg(0) && Zeny >= .@price) {
+ .@cnt += 1;
//delitemidx .@index, 1;
POL_PlayerMoney(.@price);
// Report it was done
mesc l("@@ melt down your @@...", .name$, getitemlink(.@x)), 2;
// Really melt it down
- if (!.@overid) {
+ if (.@overid < 1) {
NewMeltdown(getarg(0));
} else {
// Override system (no recipe)
@@ -183,7 +185,10 @@
// TODO: Put this in a timer so it can't be exploited
// For now, we'll produce logs so I can go after cheaters with a banhammer
delitem .@id, .@total; // Delete first, no refunds
- debugmes "Success melting down %d %s (%s)", .@total, getitemname(.@id), strcharinfo(0);
+ if (.@cnt == .@total)
+ debugmes "Success melting down %d %s (%s)", .@total, getitemname(.@id), strcharinfo(0);
+ else
+ debugmes "Failed melting down (%d/%d) %s (%s)", .@cnt, .@total, getitemname(.@id), strcharinfo(0);
@indexisbroken=true;
return;
@@ -307,7 +312,7 @@ L_Irreversible:
switch (@menuret) {
// Copy Paste from normal Meltdown
case RustyKnife:
- MassMeltdown(.@it, 15, IronOre);
+ MassMeltdown(.@it, 15, Coal);
break;
case SmallKnife:
MassMeltdown(.@it, 15, IronOre);