Kit Skript with 1 use

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

iOranged

Member
Aug 8, 2020
2
0
1
24
hi, i need help, i make a kit with 1 use, but i dont remember how make that. So i have 2 errors 1 with the list, example if player use /kitrank this add in a list and he cant reclaim anymore, and with other command "/removelist" i can remove the player from this list and he can reclaim again. i make this in the past, but i dont know if this work how i want.
and the other error is with the elytras and diamond pickaxe.

i use the last skript version for 1.16

My code:

Code:
command /kitrank:
    permission: kit.ranks
    permission message: &cYou don't allowed this.
    trigger:
        if {server::command::kitrank::%player%} is not set:
            set {server::command::kitrank::%player%} to "&cSolo puedes reclamar este kit 1 vez"
        else:
            equip player with air
            equip player with elytra of unbreakable 3 named "&c[Luxor&fAlas]"
            equip player with air
            equip player with air
            set slot 0 of player's inventory to 1 diamond pickaxe of efficiency 3 and unbreakable 3 named "&c[Luxor&fPico]"
            set slot 1 of player's inventory to 64 firework rocket
            set slot 2 of player's inventory to 64 firework rocket
            set slot 7 of player's inventory to 1 red shulker box

Error:
 

Attachments

  • error.PNG
    error.PNG
    17.8 KB · Views: 94
Code:
command /kitrank:
    permission: kit.ranks
    permission message: &cYou don't allowed this.
    trigger:
        if {server::command::kitrank::*} do not contain player:
            add player to {server::command::kitrank::*}
        else:
            equip player with air
            equip player with unbreakable elytra named "&c[Luxor&fAlas]"
            equip player with air
            equip player with air
            set slot 0 of player's inventory to unbreakable 1 diamond pickaxe of efficiency 3 named "&c[Luxor&fPico]"
            set slot 1 of player's inventory to 64 firework rocket
            set slot 2 of player's inventory to 64 firework rocket
            set slot 7 of player's inventory to 1 red shulker box
            
command /removelist <player>:
    trigger:
        remove arg-1 from {server::command::kitrank::*}
        send "Player %arg-1% has been removed from the list!" to executor
  • You don't have to enchant items with `unbreakable` enchantment, just make them unbreakable.
  • For determining if player already does something you can create array and then `push` or `remove` player to/from that array and check if array contains player.
Note: Since I've changed data structure of your variable, you should clear it before first run of my code.
 
Status
Not open for further replies.