From 6959823a2d6ba00ee54db5bbaabc5ad91ea7bdc5 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 14 Jul 2019 20:03:27 -0300 Subject: Fix an infinity error on shovel (possible) --- npc/items/shovel.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'npc/items') diff --git a/npc/items/shovel.txt b/npc/items/shovel.txt index 6ed100dff..ab794ebae 100644 --- a/npc/items/shovel.txt +++ b/npc/items/shovel.txt @@ -101,6 +101,7 @@ function script shovel_scatter { } } // Second check: Perhaps here is a rare, random ore? + freeloop(true); for (.@i = 0; .@i < getarraysize($@WBT_Random_id); .@i++) { if (!strcmp($@WBT_Random_map$[.@i], .@map$) && @@ -126,6 +127,7 @@ function script shovel_scatter { return 1; } } + freeloop(false); dispbottom l("Sadly, you found nothing but dirt."); return 0; } @@ -269,7 +271,8 @@ function PlayerIsTired { } if (@ShovelLastUsed + max(5, .@playertick) > .@tick) { - dispbottom lg("You are exhausted, you should rest a bit."); + .@time$=FuzzyTime(.@tick-(@ShovelLastUsed + max(5, .@playertick))); + dispbottom lg("You are exhausted, you should rest "+.@time$); return 1; } @ShovelLastUsed = .@tick; -- cgit v1.2.3-70-g09d2