help needed with various stuff

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

famous

New Member
Oct 25, 2024
6
0
1
24
1. Implementing placeholders for variables for money: {tokens::%player's uuid%} / {coins::%player's uuid%} (got working)
2. Making custom items textured if not possible at least right click to claim stuff
3. Adding baltop to a blocks lore in a gui and removing <none> from the baltop
4. pinging in chat

baltop code:

Code:
command /baltop:

    trigger:

        set {_sortedList::*} to sorted {coins::*}

        set {_count} to 0

        loop {coins::*}:

            add 1 to {_count}

            set {_indexes::%loop-value%} to loop-index

            if mod({_count}, 20) = 0:

                wait 1 tick

     

        set {_n} to 0

        loop {_sortedList::*}:

            add 1 to {_n}

            set {_current} to {_indexes::%loop-value%} parsed as offline player

            set {_msg::%{_n}%} to "&7%{_current}% &f- &6%loop-value% bal"

            if {_n} >= 10:

                exit 1 loop

     

        message "&7&m      &7< &a&lTop Balances &7>&7&m      "

        set {_invertedList::*} to ""  # Initialize the inverted list as an empty list

     

        loop {_msg::*}:

            set {_current} to loop-index parsed as int - 1

            set {_c} to size of {_msg::*} - {_current}

            add {_msg::%{_c}%} to {_invertedList::*}

     

        set {_n} to 0

        loop {_invertedList::*}:

            add 1 to {_n}

            message "&a##%{_n}% %loop-value%"
 
Last edited:
When pasting your script make sure to press the code button, and then pasting your script there to make it easier for others to read your script
Screenshot 2024-10-29 at 4.06.24 AM.png
 
1. Implementing placeholders for variables for money: {tokens::%player's uuid%} / {coins::%player's uuid%} (got working)
2. Making custom items textured if not possible at least right click to claim stuff
3. Adding baltop to a blocks lore in a gui and removing <none> from the baltop
4. pinging in chat

baltop code:

Code:
command /baltop:

    trigger:

        set {_sortedList::*} to sorted {coins::*}

        set {_count} to 0

        loop {coins::*}:

            add 1 to {_count}

            set {_indexes::%loop-value%} to loop-index

            if mod({_count}, 20) = 0:

                wait 1 tick

    

        set {_n} to 0

        loop {_sortedList::*}:

            add 1 to {_n}

            set {_current} to {_indexes::%loop-value%} parsed as offline player

            set {_msg::%{_n}%} to "&7%{_current}% &f- &6%loop-value% bal"

            if {_n} >= 10:

                exit 1 loop

    

        message "&7&m      &7< &a&lTop Balances &7>&7&m      "

        set {_invertedList::*} to ""  # Initialize the inverted list as an empty list

    

        loop {_msg::*}:

            set {_current} to loop-index parsed as int - 1

            set {_c} to size of {_msg::*} - {_current}

            add {_msg::%{_c}%} to {_invertedList::*}

    

        set {_n} to 0

        loop {_invertedList::*}:

            add 1 to {_n}

            message "&a##%{_n}% %loop-value%"
Since I already have code on the 'pinging' thing, I can give you that if you want.
 
Code:
on chat:
    loop all players:
        if chat message contains "%loop-player%":
            # I don't know what permissions you have set, so I'm just gonna leave it like this
            replace "%loop-player%" with "&b@%loop-player%&r" in chat message
            play sound "minecraft:block.note_block.chime" with volume 1000 with pitch 0.6 at loop-player
            send title "" with subtitle "&6You have been pinged by &b&l%player%" to loop-player for 3 seconds
 
  • Like
Reactions: timbercat10
Code:
on chat:
    loop all players:
        if chat message contains "%loop-player%":
            # I don't know what permissions you have set, so I'm just gonna leave it like this
            replace "%loop-player%" with "&b@%loop-player%&r" in chat message
            play sound "minecraft:block.note_block.chime" with volume 1000 with pitch 0.6 at loop-player
            send title "" with subtitle "&6You have been pinged by &b&l%player%" to loop-player for 3 seconds
It worked thank you so much