Solved Different types of mine via 1 command

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

    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.

Nailes

Member
Apr 10, 2019
20
0
0
Hello i am using this /plotmine give command to give players plotmines, but i have 3 different plotmines, so how do i do id i type /plotmine give <player> small it will give the player a small one and the same if i type big or biggest.



Code:
command /plotmine give <player> <type>:
    description: Gives plotmines to player
    permission: plotmines.give
    permission message: &c&lFEJL&8&l» &cDu har ikke tilladelse til dette.
    executable by: players and console
    usage: &8/plotmine give <player> <type>
    trigger:
        add 1 to {plotmines.owned.%player%}
        message "&9&lPlotmine &8» &7Du har givet 1 %type% plotmine til %player%"
        
command /check plotmines:
    permission: plotmines.check
    trigger:
        message "Du har %{plotmines.small.%player%}% små plotmines"
        message "Du har %{plotmines.big.%player%} mellem plotmines%"
        message "Du har &{plotmines.biggest.%player%} store plotmines&"
 
for this --> command /plotmine give <player> <type>:

change <type> to <text> (since type isn't a thing)
And then in your command, check if your arg-2 = "big" or "biggest" and do different things
 
Ok i changed the part to text, but i did not udnerstand the bottom part. How would i do so that i if i write /plotmine give small then it grants them a small one and adds it to check under small. I also have another question to another part of the skript, i am making a gui menu to check plotmines i cannot get it to work with multiple lines in the lore of the item, i would like to set it up like this.
Small: 0/1
Big: 0/1
Biggest: 0/1
This is the whole skript:
Code:
#Styrer alle plotmine commands

command /plotmines:
    description: Opens plotmine overview
    permission: plotmines.view
    executable by: players
    trigger:
        set {_lore} to "&9Små:&7%{plotmines.owned.%player%}%/1||&9Mellem:&7%{plotmines.owned.%player%}%/1 || &9Store:&7%{plotmines.owned.%player%}%/1"
        open chest with 6 rows named "&9&lPlotmines" to player
        wait 1 tick
        format slot 0 of player with blue stained glass pane named "-" to be unstealable
        format slot 1 of player with blue stained glass pane named "-" to be unstealable
        format slot 2 of player with blue stained glass pane named "-" to be unstealable
        format slot 3 of player with blue stained glass pane named "-" to be unstealable
        format slot 4 of player with blue stained glass pane named "-" to be unstealable
        format slot 5 of player with blue stained glass pane named "-" to be unstealable
        format slot 6 of player with blue stained glass pane named "-" to be unstealable
        format slot 7 of player with blue stained glass pane named "-" to be unstealable
        format slot 8 of player with blue stained glass pane named "-" to be unstealable
        format slot 20 of player with book named "&9Dine plotmines" with lore {_lore} to be unstealable
        format slot 45 of player with blue stained glass pane named "-" to be unstealable
        format slot 46 of player with blue stained glass pane named "-" to be unstealable
        format slot 47 of player with blue stained glass pane named "-" to be unstealable
        format slot 48 of player with blue stained glass pane named "-" to be unstealable
        format slot 49 of player with blue stained glass pane named "-" to be unstealable
        format slot 50 of player with blue stained glass pane named "-" to be unstealable
        format slot 51 of player with blue stained glass pane named "-" to be unstealable
        format slot 52 of player with blue stained glass pane named "-" to be unstealable
        format slot 53 of player with blue stained glass pane named "-" to be unstealable
        
        
command /plotmine give <player> <text>:
    description: Gives plotmines to player
    permission: plotmines.give
    permission message: &c&lFEJL&8&l» &cDu har ikke tilladelse til dette.
    executable by: players and console
    usage: &8/plotmine give <player> <type>
    trigger:
        add 1 to {plotmines.owned.%player%}
        message "&9&lPlotmine &8» &7Du har givet 1 %type% plotmine til %player%"
        
command /check plotmines:
    permission: plotmines.check
    trigger:
        message "Du har %{plotmines.small.%player%}% små plotmines"
        message "Du har %{plotmines.big.%player%} mellem plotmines%"
        message "Du har &{plotmines.biggest.%player%} store plotmines&"
 
use a condition like `if arg-1 = "small:" then on the next line, execute the code for that
 
Thanks alot i got it working, and how about the lore part setting it up like this
Small: 0/1
Big: 0/1
Biggest: 0/1
How would i do that?
 
Vil du venligst sætte dit thread som "Solved" Would you please set this thread as "Solved"
 
Hi, i just found out it is still not working i am using this code:
Code:
command /plotmine give <player> <text>:
    description: Gives plotmines to player
    permission: plotmines.give
    permission message: &c&lFEJL&8&l» &cDu har ikke tilladelse til dette.
    executable by: players and console
    usage: &8/plotmine give <player> <type>
    trigger:
        if arg-1 is "small"
        add 1 to {plotmines.small.%player%}
        message "&9&lPlotmine &8» &7Du har givet 1 plotmine til %player%"
 
Your first argument is a player, second argument is a text, so use arg-2
 
Thanks, but how do i set up the arg line? i am getting an error saying text is not allowed.
Code:
    trigger:
        if arg 2 is "small"
        add 1 to {plotmines.small.%player%}
        message "&9&lPlotmine &8» &7Du har givet 1 plotmine til %player%"
 
this is an example of how its done

code_language.skript:
command /test <player> <text>:
    trigger:
        if arg-2 = "small":
            #do something here
        else if arg-2 = "big":
            #do something here

If this doesn't make sense to you, then I highly recommend learning more basic Skript stuff.
Heres a great tutorial on how to make your own Custom Commands
 
Thanks alot man, ill take a look at that. Its more complicated then i expected. But again thanks so much for the help, have a great day! :emoji_wink:
 
Status
Not open for further replies.