From 1fb1700771fcda34ee25337f7c4e77a40d0e232c Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 7 Mar 2019 16:42:04 -0300 Subject: Final checks at localhost. Craft [Red Wine] is done roughly as Saulc planned. --- npc/017-3/chagashroom.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'npc/017-3') diff --git a/npc/017-3/chagashroom.txt b/npc/017-3/chagashroom.txt index 12bc44429..3adf9e56a 100644 --- a/npc/017-3/chagashroom.txt +++ b/npc/017-3/chagashroom.txt @@ -23,11 +23,18 @@ .@c=REDWINE_DONE-.@base; //-gettimetick(2); .@d=REDWINE_DATE-.@base; //-REDWINE_DONE; .@e=gettimetick(2)-.@base; - debugmes "%d - %d - %d", .@d, .@e, .@c; - debugmes "Start - Now - Finish"; + + // We must divide everything by 10 to cause imprecision + // aka. don't cause overflow bug + .@c=.@c/10; + .@d=.@d/10; + .@e=.@e/10; + + //debugmes "%d - %d - %d", .@d, .@e, .@c; + //debugmes "Start - Now - Finish"; if (.@c == 0) return .@max; - debugmes "Ratio: %d/%d = %d", .@e, .@c, (.@e*.@max)/.@c; + if ($@GM_OVERRIDE) debugmes "Ratio: %d/%d = %d", .@e, .@c, (.@e*.@max)/.@c; return min(10000, (.@e*.@max)/.@c); } -- cgit v1.2.3-60-g2f50