From 0f445fb1e9b591e1b39f2c41eaf0520673436fc3 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 1 Jul 2018 01:02:46 -0300 Subject: [skip ci] Insane Code Added --- npc/items/shovel.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'npc/items') diff --git a/npc/items/shovel.txt b/npc/items/shovel.txt index b33cbbfae..fb73c82ee 100644 --- a/npc/items/shovel.txt +++ b/npc/items/shovel.txt @@ -36,8 +36,12 @@ function script shovel_scatter { .@wtc = getarraysize($@WBT_Random_id); debugmes "Asked to scatter "+.@amount+" items. Currently scattered: "+.@wtc; + + freeloop(true); // DANGEROUS for (.@i = 0; .@i < .@amount; .@i++) shovel_scriptItem(.@map$, rand(.@x1,.@x2), rand(.@y1,.@y2), any_of(.@id)); + freeloop(false); + debugmes "Scattered "+.@amount+" items on "+.@map$; return; -- cgit v1.2.3-60-g2f50