1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Kit Skript with 1 use

Discussion in 'Skript' started by iOranged, Dec 18, 2020.

Thread Status:
Not open for further replies.
  1. iOranged

    iOranged Member

    Joined:
    Aug 8, 2020
    Messages:
    2
    Likes Received:
    0
    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 (Text):
    1. command /kitrank:
    2.     permission: kit.ranks
    3.     permission message: &cYou don't allowed this.
    4.     trigger:
    5.         if {server::command::kitrank::%player%} is not set:
    6.             set {server::command::kitrank::%player%} to "&cSolo puedes reclamar este kit 1 vez"
    7.         else:
    8.             equip player with air
    9.             equip player with elytra of unbreakable 3 named "&c[Luxor&fAlas]"
    10.             equip player with air
    11.             equip player with air
    12.             set slot 0 of player's inventory to 1 diamond pickaxe of efficiency 3 and unbreakable 3 named "&c[Luxor&fPico]"
    13.             set slot 1 of player's inventory to 64 firework rocket
    14.             set slot 2 of player's inventory to 64 firework rocket
    15.             set slot 7 of player's inventory to 1 red shulker box
    Error:
     

    Attached Files:

  2. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    Code (Text):
    1. command /kitrank:
    2.     permission: kit.ranks
    3.     permission message: &cYou don't allowed this.
    4.     trigger:
    5.         if {server::command::kitrank::*} do not contain player:
    6.             add player to {server::command::kitrank::*}
    7.         else:
    8.             equip player with air
    9.             equip player with unbreakable elytra named "&c[Luxor&fAlas]"
    10.             equip player with air
    11.             equip player with air
    12.             set slot 0 of player's inventory to unbreakable 1 diamond pickaxe of efficiency 3 named "&c[Luxor&fPico]"
    13.             set slot 1 of player's inventory to 64 firework rocket
    14.             set slot 2 of player's inventory to 64 firework rocket
    15.             set slot 7 of player's inventory to 1 red shulker box
    16.            
    17. command /removelist <player>:
    18.     trigger:
    19.         remove arg-1 from {server::command::kitrank::*}
    20.         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.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...