diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-01-14 21:57:47 -0200 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-01-14 21:57:47 -0200 |
commit | f5b6bc263ade9ca22967584e146b02908ddab74f (patch) | |
tree | d8dc218aa2026dc3412eb386033300a16dfa857c /npc/items/shovel.txt | |
parent | dc184a3dc52158992e31d87a63ba9866482ce282 (diff) | |
download | serverdata-f5b6bc263ade9ca22967584e146b02908ddab74f.tar.gz serverdata-f5b6bc263ade9ca22967584e146b02908ddab74f.tar.bz2 serverdata-f5b6bc263ade9ca22967584e146b02908ddab74f.tar.xz serverdata-f5b6bc263ade9ca22967584e146b02908ddab74f.zip |
Enable some debug markers, if it still breaks, I'll try reducing random crap array
Diffstat (limited to 'npc/items/shovel.txt')
-rw-r--r-- | npc/items/shovel.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/npc/items/shovel.txt b/npc/items/shovel.txt index fc30b9168..18a2b2fc4 100644 --- a/npc/items/shovel.txt +++ b/npc/items/shovel.txt @@ -39,10 +39,15 @@ function script shovel_scatter { .@amount=getarg(5,1); freeloop(true); // DANGEROUS - for (.@i = 0; .@i < .@amount; .@i++) - shovel_scriptItem(.@map$, rand(.@x1,.@x2), rand(.@y1,.@y2), getarg(rand(getargcount()-6)+6)); + for (.@i = 0; .@i < .@amount; .@i++) { + .@id=getarg( rand(getargcount()-6) +6); + //shovel_scriptItem(.@map$, rand(.@x1,.@x2), rand(.@y1,.@y2), .id); + } freeloop(false); + // For testing + .@debugid=(getargcount()-6)+6; + debugmes("array len: %d, minimum index 6, maximum index %d (last was %d)", getargcount(), .@debugid, .@id); .@wtc = getarraysize($@WBT_Random_id); debugmes "Scattered "+.@amount+" items on "+.@map$+". Currently scattered: "+.@wtc; return; |