Solved All items in a list

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

Status
Not open for further replies.

angrybeezz

Member
May 31, 2022
4
0
1
Hello, i'm trying to put all items and blocks into a list in minecraft but i don't know how to do it, i wan't to do something like this:

On break stone:
set all items in {list}
set {drop} to random an random integer of {list}
drop {drop}

I would really apreciate any help. The version and the plugins:

Paper 1.17.1
Skript
Skbee
 
drop random element of all items

Problem would be that it tries to drop items that can't be dropped like air, potted stuff
What might could do the job is

Code:
on load:
  loop all items:
      set {_i} to raw name of loop-value
      replace "minecraft:" with "" in {_i}
      add {_i} to {-items::*}

on block break:
  cancel drops
  drop random element of {-items::*}

u will might have to fix stuff

(lolzy will have 101% a better awnser using skript-reflect)
 
Status
Not open for further replies.