Help with making a ritual of dropped items which makes them go into a circle.

  • 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 comminuty!

    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!

fivebearspizza

New Member
Mar 25, 2024
5
0
1
17
I am making a thing so when you drop 9 of specific items (already done with that part) its gonna get all the items, make them spin around in a circle and then slowly go closer to the center. Any help is appreciated!
 
I need a way to find the location of the dropped item.

on drop:
if event-item is a yellow candle named "%{REFINED_GEM.NAME}%":
if {ritualitem1} is false:
set {ritualitem1} to true
add 1 to {count}
send "Added: %event-item% to [ritualitems::*]" to player
send "&fRitual: &6%{count}%/9" to player
wait 1 second
set {gemlocation} to event-location
send "Set {gemlocation} to %event-location%" to player

This is currently my code, event-location is the location of the player, not the dropped item...
 
on load:
set {ritualitem1} to false
set {ritualitem2} to false
set {ritualitem3} to false
set {ritualitem4} to false
set {ritualitem5} to false
set {ritualitem6} to false
set {ritualitem7} to false
set {ritualitem8} to false
set {ritualitem9} to false
set {count} to 0
set {ritual} to false
set {ongoingritual} to false

on drop:
if event-item is a yellow candle named "%{REFINED_GEM.NAME}%":
if {ritualitem1} is false:
set {ritualitem1} to true
add 1 to {count}
send "Added: %event-item% to [ritualitems::*]" to player
send "&fRitual: &6%{count}%/9" to player
wait 1 second
set {gemlocation} to event-location
send "Set {gemlocation} to %event-location%" to player
else if event-item is a honeycomb named "%{GOLDEN_FRAGMENT1.NAME}%":
if {ritualitem2} is false:
set {ritualitem2} to true
add 1 to {count}
add event-item to {ritualitems::*}
send "&fRitual: &6%{count}%/9" to player
else if event-item is a honeycomb named "%{GOLDEN_FRAGMENT2.NAME}%":
if {ritualitem3} is false:
set {ritualitem3} to true
add 1 to {count}
add event-item to {ritualitems::*}
send "&fRitual: &6%{count}%/9" to player
else if event-item is a honeycomb named "%{GOLDEN_FRAGMENT3.NAME}%":
if {ritualitem4} is false:
set {ritualitem4} to true
add 1 to {count}
add event-item to {ritualitems::*}
send "&fRitual: &6%{count}%/9" to player
else if event-item is a honeycomb named "%{GOLDEN_FRAGMENT4.NAME}%":
if {ritualitem5} is false:
set {ritualitem5} to true
add 1 to {count}
add event-item to {ritualitems::*}
send "&fRitual: &6%{count}%/9" to player
else if event-item is a honeycomb named "%{GOLDEN_FRAGMENT5.NAME}%":
if {ritualitem6} is false:
set {ritualitem6} to true
add 1 to {count}
add event-item to {ritualitems::*}
send "&fRitual: &6%{count}%/9" to player
else if event-item is a honeycomb named "%{GOLDEN_FRAGMENT6.NAME}%":
if {ritualitem7} is false:
set {ritualitem7} to true
add 1 to {count}
add event-item to {ritualitems::*}
send "&fRitual: &6%{count}%/9" to player
else if event-item is a honeycomb named "%{GOLDEN_FRAGMENT7.NAME}%":
if {ritualitem8} is false:
set {ritualitem8} to true
add 1 to {count}
add event-item to {ritualitems::*}
send "&fRitual: &6%{count}%/9" to player
else if event-item is a honeycomb named "%{GOLDEN_FRAGMENT8.NAME}%":
if {ritualitem9} is false:
set {ritualitem9} to true
add 1 to {count}
add event-item to {ritualitems::*}
send "&fRitual: &6%{count}%/9" to player

if {count} is more than or equal to 9:
if {ritual} is false:
set {count} to 0
set {ritual} to true
set {ongoingritual} to true
## Ritual Broadcasting
broadcast "&6[???] &fThe %{GOLDEN_GEM.NAME}% &fritual is starting. Brace yourselves, mortals, for the cosmic symphony unfolds, weaving threads of fate and destiny into the tapestry of eternity."
broadcast ""
wait 1 tick
loop {ritualitems::*}:
send "looped ritualitems::*" to player
if loop-value is a honeycomb:
send "if loopvalue is honeycomb" to player
if name of loop-value contains "&6Golden Fragment":
send "name of loopvalue contains golden fragment*" to player
set {gem_x} to x-coordinate of {gemlocation}
set {gem_y} to y-coordinate of {gemlocation}
set {gem_z} to z-coordinate of {gemlocation}
teleport loop-value to location ({gem_x}, {gem_y}, {gem_z}) in world "%world%"
send "teleporedt %loop-value% to %{gem_x}%, %{gem_y}%, %{gem_z}% in world %world%" to player
clear {ritualitems::*}
play sound "minecraft:entity.ender_dragon.growl" at volume 1 at pitch 1 at player's location
wait 10 second
broadcast "&6[???] &fBehold as the heavens tremble and the very stars bow in reverence to the power that stirs within. Let the echoes of creation resound through the void, for the dawn of a new era beckons, and the fate of worlds hangs in the balance."
broadcast ""
play sound "minecraft:entity.ender_dragon.growl" at volume 1 at pitch 1 at player's location
wait 10 seconds
broadcast "&6[???] &fMay fortune favor the bold, for the path ahead is fraught with peril and the shadows of oblivion loom ever closer."
broadcast ""
play sound "minecraft:entity.ender_dragon.growl" at volume 1 at pitch 1 at player's location
wait 10 seconds
broadcast "&6[???] &fAre you prepared to embrace the destiny that awaits, or will you falter in the face of cosmic upheaval? The choice is yours, but remember, the universe holds no mercy for the faint of heart."
broadcast ""
play sound "minecraft:entity.ender_dragon.growl" at volume 1 at pitch 1 at player's location
wait 3 seconds
drop 1 of {CUSTOM.GOLDEN_GEM} at location ({gem_x}, {gem_y}, {gem_z}) in world "world"
set {ongoingritual} to false
else:
set {count} to 0
broadcast "Ritual has already been activated before!"
else if {count} is less than 0:
set {count} to 0

on pickup:
if {ritual} is false:
if event-item's name is "%{REFINED_GEM.NAME}%":
subtract 1 from {count}
set {ritualitem1} to false
send "&fRitual: &6%{count}%/9" to player
clear {gemlocation}
else if event-item's name is "%{GOLDEN_FRAGMENT1.NAME}%":
subtract 1 from {count}
set {ritualitem2} to false
send "&fRitual &6%{count}%/9" to player
else if event-item's name is "%{GOLDEN_FRAGMENT2.NAME}%":
subtract 1 from {count}
set {ritualitem3} to false
send "&fRitual &6%{count}%/9" to player
else if event-item's name is "%{GOLDEN_FRAGMENT3.NAME}%":
subtract 1 from {count}
set {ritualitem4} to false
send "&fRitual &6%{count}%/9" to player
else if event-item's name is "%{GOLDEN_FRAGMENT4.NAME}%":
subtract 1 from {count}
set {ritualitem5} to false
send "&fRitual &6%{count}%/9" to player
else if event-item's name is "%{GOLDEN_FRAGMENT5.NAME}%":
subtract 1 from {count}
set {ritualitem6} to false
send "&fRitual &6%{count}%/9" to player
else if event-item's name is "%{GOLDEN_FRAGMENT6.NAME}%":
subtract 1 from {count}
set {ritualitem7} to false
send "&fRitual &6%{count}%/9" to player
else if event-item's name is "%{GOLDEN_FRAGMENT7.NAME}%":
subtract 1 from {count}
set {ritualitem8} to false
send "&fRitual &6%{count}%/9" to player
else if event-item's name is "%{GOLDEN_FRAGMENT8.NAME}%":
subtract 1 from {count}
set {ritualitem9} to false
send "&fRitual &6%{count}%/9" to player
else:
stop
else:
stop

every 0.25 seconds:
if {count} is less than 0:
set {count} to 0

on pickup:
if {ongoingritual} is true:
if event-item's name is "%{REFINED_GEM.NAME}%":
cancel event
else if event-item's name is "%{GOLDEN_FRAGMENT1.NAME}%":
cancel event
else if event-item's name is "%{GOLDEN_FRAGMENT2.NAME}%":
cancel event
else if event-item's name is "%{GOLDEN_FRAGMENT3.NAME}%":
cancel event
else if event-item's name is "%{GOLDEN_FRAGMENT4.NAME}%":
cancel event
else if event-item's name is "%{GOLDEN_FRAGMENT5.NAME}%":
cancel event
else if event-item's name is "%{GOLDEN_FRAGMENT6.NAME}%":
cancel event
else if event-item's name is "%{GOLDEN_FRAGMENT7.NAME}%":
cancel event
else if event-item's name is "%{GOLDEN_FRAGMENT8.NAME}%":
cancel event
else:
stop
else:
stop

This is currently the full code of the skript, if anyone was wondering.