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

Confirmation

Discussion in 'Skript' started by NeonFox__, Nov 10, 2019.

  1. NeonFox__

    NeonFox__ Member

    Joined:
    Oct 25, 2019
    Messages:
    16
    Likes Received:
    0
    Hello! I'm making a granting ranks GUI and I am not too sure how to make a confirmation page. So like when you click a rank it shows a red or green button to confirm. here is a part of the code:
    Code (Text):
    1. command /SetRank1 [<offline player>]:
    2.     aliases: /SR1 , /sk1
    3.     permission: system.rank
    4.     permission message: &1SetRank> &7No Permission
    5.     trigger:
    6.         if arg-1 is not set:
    7.             send "&4"
    8.         else:
    9.             open chest with 6 rows named "&cStaff Ranks" to player
    10.             wait 4 tick
    11.  
    12.             format slot 0 of player with paper named "&3&lBack" to run [make player execute command "grant %arg-1%"]
    13.             format slot 1 of player with red wool named "&4&lOwner Group" with lore "&9Rank players to Owner" to close then run [make player execute command "pex user %arg-1% group set Owner"]
    14.             format slot 2 of player with pink wool named "&c&lManager Group" with lore "&9Rank players to Manager" to close then run [make player execute command "pex user %arg-1% group set Manager"]
    15.             format slot 3 of player with light blue wool named "&bDeveloper" with lore "&9Rank players to Developer." to close then run [make player execute command "pex user %arg-1% group set Developer"]
    16.             format slot 4 of player with purple wool named "&cSR.Admin" with lore "&9Rank players to SR.Admin." to close then run [make player execute command "pex user %arg-1% group set sr.admin"]
    17.             format slot 5 of player with light gray wool named "&cAdmin Group" with lore "&9Rank players to Admin." to close then run [make player execute command "pex user %arg-1% group set Admin"]
    18.             format slot 6 of player with yellow wool named "&eModerator Group" with lore "&9Rank players to Moderator." to close then run [make player execute command "pex user %arg-1% group set Moderator"]
    19.             format slot 7 of player with lime wool named "&2&lHead Builder Group" with lore "&9Rank players to head Builder." to close then run [make player execute command "pex user %arg-1% group set Head-Builder"]
    20.             format slot 8 of player with green wool named "&eBuilder Group" with lore "&9Rank players to Builder." to close then run [make player execute command "pex user %arg-1% group set Builder"]
    21.             format slot 9 of player with lime wool named "&eHelper Group" with lore "&9Rank players to Helper." to close then run [make player execute command "pex user %arg-1% group set helper"]
    22.             format slot 10 of player with white wool named "&eTrainee Group" with lore "&9Rank players to Trainee." to close then run [make player execute command "pex user %arg-1% group set Trainee"]
    23.  
     
  2. RunaYoutube

    RunaYoutube Member

    Joined:
    Nov 10, 2019
    Messages:
    16
    Likes Received:
    0
    Hello there, the best solulation for this would be for you to change the executing commands in the gui to the group name like this here [make player execute command "/owner"] do that for all your groups then add more guis with for example /owner then when you click owner group it will go into a confirmiation gui.

    Hope this helps. :emoji_slight_smile:
     
    #2 RunaYoutube, Nov 10, 2019
    Last edited: Nov 10, 2019
  3. NeonFox__

    NeonFox__ Member

    Joined:
    Oct 25, 2019
    Messages:
    16
    Likes Received:
    0
    Ok, thanks! It is gonna be hell skripting it!
    --- Double Post Merged, Nov 10, 2019, Original Post Date: Nov 10, 2019 ---
    @RunaYoutube How would I make it know who to grant
    Code (Text):
    1. command /owner:
    2.     permission: system.rank.owner
    3.     permission message: &1SetRank> &7No Permission
    4.     trigger:
    5.         open chest with 7 rows named "&cConfirmation" to player
    6.         wait 4 tick
    7.      
    8.         format slot 10 of player with green wool named "&a&lConfirm" with lore "&a&lConfirm" to close then run [make player execute command "pex user ? group set Owner"]
     
    #3 NeonFox__, Nov 10, 2019
    Last edited: Nov 10, 2019
  4. RunaYoutube

    RunaYoutube Member

    Joined:
    Nov 10, 2019
    Messages:
    16
    Likes Received:
    0
    do format slot 10 of player with green wool named "&a&lConfirm" with lore "&a&lConfirm" to close then run [make player execute command "pex user %arg-1% group set Owner"]
     
  5. NeonFox__

    NeonFox__ Member

    Joined:
    Oct 25, 2019
    Messages:
    16
    Likes Received:
    0
    Ok, thank you.
    --- Double Post Merged, Nov 10, 2019, Original Post Date: Nov 10, 2019 ---
    Also there is a problem with chat format
    https://gyazo.com/71d7481f80a3910c4829164ff05cf1f1
     
  6. RunaYoutube

    RunaYoutube Member

    Joined:
    Nov 10, 2019
    Messages:
    16
    Likes Received:
    0
    Hmmm, I'm not sure
     
  7. NeonFox__

    NeonFox__ Member

    Joined:
    Oct 25, 2019
    Messages:
    16
    Likes Received:
    0
    That sucks, do you know any other way to format it?
     
  8. RunaYoutube

    RunaYoutube Member

    Joined:
    Nov 10, 2019
    Messages:
    16
    Likes Received:
    0
    Could you give me all the code and I'll see what is wrong?
     
  9. NeonFox__

    NeonFox__ Member

    Joined:
    Oct 25, 2019
    Messages:
    16
    Likes Received:
    0
    Ok just PLEASE do not use it or claim it as ur own
    Code (Text):
    1. (deleted due to people might copy)
     
    #9 NeonFox__, Nov 10, 2019
    Last edited: Nov 10, 2019
  10. RunaYoutube

    RunaYoutube Member

    Joined:
    Nov 10, 2019
    Messages:
    16
    Likes Received:
    0
    Hmmmm, nothing looks to be off with this skript
     
  11. NeonFox__

    NeonFox__ Member

    Joined:
    Oct 25, 2019
    Messages:
    16
    Likes Received:
    0
    The only thing I think is off is
    Code (Text):
    1.         format slot 10 of player with green wool named "&a&lConfirm" to close then run [make player execute command "pex user %arg-1% group set Owner"]
    Because it is format slot 10 of player <----- | but yet again I have tried GUI and chest to replace player but it does not work...
     
  12. RunaYoutube

    RunaYoutube Member

    Joined:
    Nov 10, 2019
    Messages:
    16
    Likes Received:
    0
    Me neither I would've helped you but physically cant
     
  13. NeonFox__

    NeonFox__ Member

    Joined:
    Oct 25, 2019
    Messages:
    16
    Likes Received:
    0
  14. Juvius

    Juvius Member

    Joined:
    Oct 28, 2019
    Messages:
    7
    Likes Received:
    0
    Code (Text):
    1. command /confirmgrant [<player>] [<text>]:
    2.     permission: server.grant
    3.     permission message: &cInsufficient permissions!
    4.     trigger:
    5.         if arg-1 is set:
    6.             if arg-2 is "cancel":
    7.                 send "&cGrant has been cancelled." to player
    8.                 stop
    9.             else:
    10.                 set {_p} to "%arg-1%" parsed as player
    11.                 wait 2 ticks
    12.                 open chest with 5 rows named "&8Confirm your grant" to player
    13.                 format slot 10 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
    14.                 format slot 11 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
    15.                 format slot 12 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
    16.                 format slot 19 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
    17.                 format slot 20 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
    18.                 format slot 21 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
    19.                 format slot 22 of the player with skull of {_p} named "&6&l%arg-1%" with lore "&fYou currently selected this user." to be unstealable
    20.                 format slot 28 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
    21.                 format slot 29 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
    22.                 format slot 30 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
    23.                 format slot 14 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
    24.                 format slot 15 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
    25.                 format slot 16 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
    26.                 format slot 23 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
    27.                 format slot 24 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
    28.                 format slot 25 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
    29.                 format slot 32 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
    30.                 format slot 33 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
    31.                 format slot 34 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
    32.                 stop
    Give this a try? Maybe next time include your server's version, addons you use, Skript version you are using, etc.
     
  15. NeonFox__

    NeonFox__ Member

    Joined:
    Oct 25, 2019
    Messages:
    16
    Likes Received:
    0
    Does not work, the code has no errors but this keeps happening: (my version is 1.14.4 and im on minehut)
    https://gyazo.com/bdb753996de48ed35807ae8e45c71ab5
     
  16. Juvius

    Juvius Member

    Joined:
    Oct 28, 2019
    Messages:
    7
    Likes Received:
    0
    Try /confirmgrant <player> <rank>?
     
  17. NeonFox__

    NeonFox__ Member

    Joined:
    Oct 25, 2019
    Messages:
    16
    Likes Received:
    0
    Does not work, I don't think skript supports permissionsex. I have TuSKe but I don't know if TuSKe supports it and I don't know any addons that do support [<rank>]
     
  18. Juvius

    Juvius Member

    Joined:
    Oct 28, 2019
    Messages:
    7
    Likes Received:
    0
    Oh, sorry. I meant like in-game. /confirmgrant <your in-game name> Owner.
     
  19. NeonFox__

    NeonFox__ Member

    Joined:
    Oct 25, 2019
    Messages:
    16
    Likes Received:
    0
    Yes, that works but any admin can give themself owner if I give them permission to that command, that's why I need a GUI like so when they click it it closes and says "&cNO PERMISSION" It will be weird if you do "/divine (player)" for a rank
     
Loading...