Solved Is It Possible ? Help !

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

Status
Not open for further replies.

Yaşarhan

Active Member
May 16, 2020
87
6
8
23
Turkey Istanbul
First of all thank you for your interest.

There is no problem in the code up to the marked place and there is no error.
I am trying to randomly the drops into a single player in the looped data.

Code:
on death:
    if attacker is a player:
        if victim isn't a player:
            set {_drops::*} to drops
            remove drops from the drops
            if {Ownerofparty.%attacker%} is set:
                #PROBLEM
                loop {party.%{Ownerofparty.%attacker%}%.list::*}:
                    add loop-variable to {gdrops::*}
                set {gdroplanan} to random element of {gdrops::*}
                add {_drops::*} to {gdroplanan} inventory
            else:
                add {_drops::*} to attacker's inventory

Thanks to those who helped.
[doublepost=1592403551,1592337268][/doublepost]Does anyone understand ?
[doublepost=1592496108][/doublepost]I think it must be a very hard job.
Great skUnity form left unanswered.
 
Maybe:
Code:
add {_drops::*} to ("%{gdroplanan}%" parsed as player)'s inventory
Also I do not understand why are you creating another list when the same one already exists:
Code:
set {gdroplanan} to random element out of {party.%{Ownerofparty.%attacker%}%.list::*}
Maybe I did not understand you very well and you did not specify what is (not) happening. I hope this helps at least a bit.
 
  • Like
Reactions: Yaşarhan
Maybe:
Code:
add {_drops::*} to ("%{gdroplanan}%" parsed as player)'s inventory
Also I do not understand why are you creating another list when the same one already exists:
Code:
set {gdroplanan} to random element out of {party.%{Ownerofparty.%attacker%}%.list::*}
Maybe I did not understand you very well and you did not specify what is (not) happening. I hope this helps at least a bit.

I do not know what to say, you are a master, you are a king, you are perfect !
I needed this a lot.
I just had a little mistake but thanks to you.
Thank you very very much man. :emoji_ok_hand::emoji_slight_smile:
 
Status
Not open for further replies.