#Backpack Skript

1 messages · Page 1 of 1 (latest)

hardy junco
#

I want a backpack skript but per player and not serverwide, rn this doesnt even save what I put in

command /bp:
    trigger:
        backpack(player)
function backpack(P: player):
    set {_u} to {_P}'s uuid
    open chest inventory with 6 rows named "&e&lBACKPACK" to {_p}
    loop {backpack::%{_U}%::*}:
        add 1 to {_N}
        set {_I} to loop-value
        set slot {_N} - 1 of {_P}'s current inventory to {_I}
on inventory click:
    if name of player's current inventory contains "&e&lBACKPACK":
        set {backpack::%player's uuid%::*} to all items in player's current inventory
hardy junco
#

im too stupid for that bro

#

I know nothing about arrays

tender mirage
#

you mean a list?

tender mirage
hardy junco
#

the command runs a function _u is player's uuid chest inventory opens loops. backpack slots? then I have no clue

keen kindle
spark light
#

But isnt a list an array?

tender mirage
spark light
#

Hashmap map or what then?

keen kindle
tribal olive
#

also, java has lists too

tribal olive
#

internally, many implementations of a list use a simple array

keen kindle
#

maybe skript reflect does

tribal olive
#

skript reflect has arrays