#Sk-YAML Lore with Variables

1 messages · Page 1 of 1 (latest)

white glen
#

time to make your own "placeholder" system

forest rover
#

link?

#

I just need a link on how to make one and I'll be good

forest rover
forest rover
#

So like how would I be able to put a placeholder in a function?

white glen
#

depends if you wanna make your own system or use placeholderapi

#

my idea would be that you put ${idk} in your yml and in skript do smth like replace "${idk}" with "100" in text

forest rover
#

that works ty

#

I'm trynna make a plugin shop plugin and I'm trynna to keep it as low as addons as possible

#

but honestly how does that look to you too many loops or is just good?

#

everything works fine but i know there is always a better way of doing stuff

white glen
#

yaml isnt the best way for doing shops but for that it looks nearly fine

forest rover
#

what's a better way? I'm making it fully configure able for all people that wanna use it I'm trynna to keep it as user friendly as possible and ymls are the only thing I thought that was worth it

#

like this is just one of the configs

white glen
#

then yml is the best way

#

for performance i would say the best way would be json but yeah

forest rover
#

that's true, but I'm trynna to keep it basic for new people

#

I usually use json for like datastorage

forest rover
#
    loop all items in {_p}'s current inventory:
        if loop-item is air:
            send "Hey" to {_p}
        else:
            send "Hey2" to {_p}``` any idea no error but also no text
white glen
#

what should this function do?

forest rover
#

I'm trynna make a function that will loop thru this gui and tell me if the slot is air or not if not, I want it to grab the item which is there and then i can get the rest of the data needed

#

I have searched for the past 2 hours looking for a way to do this and nothing

#

I also did just try this ```if event-inventory = (metadata tag "SellAll" of player):
loop all items in player's current inventory:
if type of loop-item = air:
send "hey" to player

#

so if event-inventory = (metadata tag "SellAll" of player): loop all items in metadata tag "SellAll" of player: loop-item = black stained glass pane: send "hey" to player this works but air doesn't?

tame stag
#

the item can't be air, so just check if the item is set and if it is, then there's an item.

forest rover
#

Example?

tame stag
#

dude.
use the code you already have, and replace = yourItemHere with is set