Solved Drop item in a specific location

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

lordmanu

Member
Apr 25, 2022
21
1
3
hello, I'm on version 1.8.9 of my server and I'm trying to use a skript I'm making. basically, I need items to be dropped randomly around the map. to do this, I took the coordinates of each point in the map where I wanted the items to be born, and then through this string I got on skunity "drop 1 stone at location(283,65,201, world "world") without velocity" I put in my coordinates. however, it doesn't work, and it gives me this error
 
I would recommend here that you use random integers for this. It allows you to find different values every time.
Code:
set x coord {_drop} to random integer between -100 and 100
set z coord {_drop} to random integer betwen -100 and 100
set y coord {_drop} to 100
drop 1 stone at location {_drop}
 
You can also use a shorter version.
Code:
drop 1 stone at location(random integer from -100 to 100, 100, random integer from -100 to 100, world("world"))