I was able to successfully (and easily) infuse Kryten2's code into the script. I've tested it with 6 files and it worked.
A test from work today with the previous code failed, which doesn't make any sense as it works from website tests, from other computers in my home, having drop box delete the test files then restore them, and even from a friend dropping into a shared folder a state away. I'll test the new code in the morning.
I chose the range of width/height so that the script can be used unaltered by most people with modern set ups. Despite the random generation of the location, the script appears to like to bunch stickies near each other, but assuming Applescript's random function is more or less "true random", that's just the way it goes.
Code:
on adding folder items to this_folder after receiving these_items
repeat with i from 1 to number of items in these_items
set this_item to item i of these_items
-- insert actions here
if this_item is not ".DS_Store" then
set xx to random number from 15 to 1000
set yy to random number from 30 to 800
set the_file to (read this_item)
set the clipboard to the_file
tell application "Stickies" to activate
tell application "System Events"
tell process "Stickies"
tell window 1
delay 1
keystroke "n" using command down
keystroke "v" using command down
set position to {xx, yy}
end tell
set the_colors_list to {"blue", "gray", "pink", "yellow", "green", "purple"}
set rand_color to some item of the_colors_list
click menu item rand_color of menu "Color" of menu bar 1
end tell
end tell
end if
end repeat
end adding folder items to
Unless anyone (well, Kryton2

) has any other suggestions, I'll clean up the script and call it good to go!
Edit: I'm thinking that instead of choosing a random number out of hundreds of numbers, for the positions, changing it to choosing from an array of just 100,200,300,400 etc for each coordinate. which should put the notes essentially in some position on a grid. Not sure if this would help with the bunching up issue or speed things or whatnot..