loop and give player items

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

XSKRIPTX

Member
Dec 26, 2017
47
1
8
35
Hello i have

Code:
set {test.lvl.1::*} to items in the player's inventory
set player's inventory to {test.lvl.1::*}
but i will have

loop {mw.lvl.%player's level%::*} and give player all looped items of {mw.lvl.%player's level%::*}

can anybody make a Example or help me
[doublepost=1570820121,1570809335][/doublepost]
Hello i have

Code:
set {test.lvl.1::*} to items in the player's inventory
set player's inventory to {test.lvl.1::*}
but i will have

loop {mw.lvl.%player's level%::*} and give player all looped items of {mw.lvl.%player's level%::*}

can anybody make a Example or help me

NEWS:
my test code but it doesnt work
Code:
loop all items of inventory of {test.lvl.1::*}:
        give player "%loop-index%"
 
Hello i have

Code:
set {test.lvl.1::*} to items in the player's inventory
set player's inventory to {test.lvl.1::*}
but i will have

loop {mw.lvl.%player's level%::*} and give player all looped items of {mw.lvl.%player's level%::*}

can anybody make a Example or help me
[doublepost=1570820121,1570809335][/doublepost]

NEWS:
my test code but it doesnt work
Code:
loop all items of inventory of {test.lvl.1::*}:
        give player "%loop-index%"
Example:
code_language.skript:
command /saveinv:
    trigger:
        delete {test.lvl.1::*}
        set {_slot} to 0
        loop 36 times:
            add slot {_slot} of player's inventory to {test.lvl.1::*}
            add 1 to {_slot}

command /retrieve:
    trigger:
        set {_c} to 0
        loop {test.lvl.1::*}:
            set slot {_c} of player's inventory to loop-value
            add 1 to {_c}
 
Status
Not open for further replies.