Trying to make /grant 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 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.

Redblock6

Member
Apr 13, 2019
12
1
3
45
Hi,
I'm trying to make a grant command in Skript. I do believe its possible. Here is the code so far:
Code:
command /grant:
    description: Grant players things
    usage: &e/grant
    permission: mcredblock.admin.grant
    trigger:
        open chest with 6 rows named "&e&lSelect a rank" to player
        format slot 0 of player with redstone_block named "&c&lOWNER" to close then run [make player execute command /granttime]
When they click the block named owner, I want it to close and then send a title saying "Say Player Name", I can do that but, I was wondering how would I do it so that when you say a player name in chat it will record that and when you are finished with the grant process then it Will record everything and make it into a big command, for example:

/upc addGroup (player) (Group) (Time)

Thanks,
Redblock6
 
I did it with TuSke:
Code:
command /grant:
    permission: mcredblock.admin.grant
    permission message: &cYou do not have access to this command.
    trigger:
        open virtual chest with 1 row named "&e&lSelect a rank" to player
        format gui slot 0 of player with redstone block named "&c&lOWNER" to run:
            set {rankchat.%player%} to false
            close player's inventory
            send "&aPlease type a player name in chat."
on chat:
    if {rankchat.%player%} if false:
        cancel event
        loop all players:
            if message contains loop-player:
                set {rankchat.%player%} to true
                make player execute command "/upc addgroup %loop-player% owner"
                send "&a%loop-player%'s rank is now &c&lOwner&a."
            else:
                send "&aPlease type an &a&lONLINE &aplayer."
 
Status
Not open for further replies.