Ban GUI help

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

SandyVerse

Active Member
Mar 19, 2017
51
0
0
33
Using this code
code_language.skript:
command /bangui <text>:
    permission: ban.gui
    usage: /bangui <player>
    trigger:
        open chest with 3 rows named "&4Ban GUI" to player
        format slot 0 of player with diamond named "&bXray" with lore "&aClick this to ban a player for Xray!" to run [make player execute command "/ban %arg-1% Xray"]
        format slot 1 of player with iron pickaxe named "&8Illegal Mining" with lore "&aClick this to ban a player for illegal mining!" to run [make player execute command "/tempban %arg-1% 1 week Illegal Mining"]
        format slot 2 of player with wither skeleton head named "&4Blacklisted Modifications" with lore "&aClick this to ban a player for any blacklisted mods!" to run [make player execute command "/tempban %arg-1% 1 month Blacklisted Modifications"]   
        format slot 3 of player with diamond armor named "Benefitting" with lore "&aClick this to ban a player for benefitting!" to run [make player execute command "/tempban %arg-1% 2 month Benefitting from hacked/unfair gameplay"]
        format slot 4 of player with sign item named "&6Harassment" with lore "&aClick this to ban a player for harassment!" to run [make player execute command "/tempban %arg-1% 2 month Harassment"]
        format slot 5 of player with beacon named "&9DDos Threats" with lore "&aClick this to ban a player for Ddos Threats!" to run [make player execute command "/tempban %arg-1% 10 month DDoS Threats"]
        format slot 6 of player with anvil named "&cBan Evasion" with lore "&aClick this to ban a player for ban evasion!" to run [make player execute command "/tempban %arg-1% 2 month Ban Evasion"]
        format slot 7 of player with lava bucket named "&5IPvP during Grace Period" with lore "&aClick this to ban a player for IPvP!" to run [make player execute command "/tempban %arg-1% 1 week iPvP"]
        format slot 8 of player with compass named "Teaming in FFA" with lore "&aClick this to ban a player for Teaming in FFA!" to run [make player execute command "/tempban %arg-1% 3 day Teaming in FFA"]
        format slot 9 of player with diamond sword named "Hacked Client" with lore "&aClick this to ban a player for Hacked Client!" to run [make player execute command "/ban %arg-1% Hacked Client"]
        format slot 10 of player with 166 named "&1Going over the team limit/crossteaming" with lore "&aClick this to ban a player for going over the team limit!!" to run [make player execute command "/tempban %arg-1% 3 day Going over the Team Limit"]
        format slot 11 of player with eye of ender named "&6Racism" with lore "&aClick this to ban a player for Racism!" to run [make player execute command "/tempban %arg-1% 1 month Racism"]     
        format slot 12 of player with book named "&0Death Threats" with lore "&aClick this to ban a player for Death Threats!" to run [make player execute command "/tempban %arg-1% 2 month Death Threats"]
        format slot 13 of player with pumpkin named "Arguing with staff members" with lore "&aClick this to ban a player for arguing with staff!" to run [make player execute command "/tempban %arg-1% 3 day Arguing with staff members"]   
        format slot 14 of player with iron sword named "PvP logging" with lore "&aClick this to ban a player for PvP logging!" to run [make player execute command "/tempban %arg-1% 2 day PvP logging"]
        format slot 15 of player with player head named "Staff Disrespect" with lore "&aClick this to ban a player for Staff Disrespect!" to run [make player execute command "/tempban %arg-1% 2 month Staff Disrespect"]
        format slot 16 of player with diamond pickaxe named "&eCaveFinder" with lore "&aClick this to ban a player for Cave Finder!" to run [make player execute command "/ban %arg-1% Cave Finder"]   
        format slot 17 of player with oak wood plank named "&eSkybasing after MU" with lore "&aClick this to ban a player for Skying After MU!" to run [make player execute command "/tempban %arg-1% 2 d Skybasing after Meetup"]   
        format slot 18 of player with stone named "&6Avoiding Meetup" with lore "&aClick this to ban a player for avoiding meetup" to run [make player execute command "/tempban %arg-1% 3 d Avoiding Meetup"]
        format slot 19 of player with stick named "&3Stalking" with lore "&aClick this to ban a player for Stalking" to run [make player execute command "/tempban %arg-1% 3 d Stalking"]
        format slot 20 of player with skeleton head named "&cLeaving Random Teams" with lore "&aClick this to ban a player for Leaving Random Teams" to run [make player execute command "/tempban %arg-1% 3 d Leaving Random Teams"]
        format slot 21 of player with beacon named "&9Not joining TS/Skype in random teams" with lore "&aClick this to ban a player for Not joining TS/Skype in random teams" to run [make player execute command "/tempban %arg-1% 3 d Not joining TS/Skype in random teams"]
        
        
on click of anvil named "&cBan Evasion":
    open anvil named "&cOriginal Account?" to player
    wait 5 ticks
    set slot 0 of current inventory of player to 1 name tag named "&aAccount name" with lore "" to run [make console execute command "/ban %arg-1% Ban Evasion (Alt of "]


How would I use the "on click of anvil" event to correspond with the naming of the item for the ban? Ex: I wanted to ban someone for ban evasion, so I click the anvil in the ban gui, it prompts me for an additional IGN, which I would fill in the "naming" section. After clicking the end of the anvil, how would I make the console execute the command for the alt? Kinda confusing to explain, but I hope you get the gist.
 
Using this code
code_language.skript:
command /bangui <text>:
    permission: ban.gui
    usage: /bangui <player>
    trigger:
        open chest with 3 rows named "&4Ban GUI" to player
        format slot 0 of player with diamond named "&bXray" with lore "&aClick this to ban a player for Xray!" to run [make player execute command "/ban %arg-1% Xray"]
        format slot 1 of player with iron pickaxe named "&8Illegal Mining" with lore "&aClick this to ban a player for illegal mining!" to run [make player execute command "/tempban %arg-1% 1 week Illegal Mining"]
        format slot 2 of player with wither skeleton head named "&4Blacklisted Modifications" with lore "&aClick this to ban a player for any blacklisted mods!" to run [make player execute command "/tempban %arg-1% 1 month Blacklisted Modifications"]  
        format slot 3 of player with diamond armor named "Benefitting" with lore "&aClick this to ban a player for benefitting!" to run [make player execute command "/tempban %arg-1% 2 month Benefitting from hacked/unfair gameplay"]
        format slot 4 of player with sign item named "&6Harassment" with lore "&aClick this to ban a player for harassment!" to run [make player execute command "/tempban %arg-1% 2 month Harassment"]
        format slot 5 of player with beacon named "&9DDos Threats" with lore "&aClick this to ban a player for Ddos Threats!" to run [make player execute command "/tempban %arg-1% 10 month DDoS Threats"]
        format slot 6 of player with anvil named "&cBan Evasion" with lore "&aClick this to ban a player for ban evasion!" to run [make player execute command "/tempban %arg-1% 2 month Ban Evasion"]
        format slot 7 of player with lava bucket named "&5IPvP during Grace Period" with lore "&aClick this to ban a player for IPvP!" to run [make player execute command "/tempban %arg-1% 1 week iPvP"]
        format slot 8 of player with compass named "Teaming in FFA" with lore "&aClick this to ban a player for Teaming in FFA!" to run [make player execute command "/tempban %arg-1% 3 day Teaming in FFA"]
        format slot 9 of player with diamond sword named "Hacked Client" with lore "&aClick this to ban a player for Hacked Client!" to run [make player execute command "/ban %arg-1% Hacked Client"]
        format slot 10 of player with 166 named "&1Going over the team limit/crossteaming" with lore "&aClick this to ban a player for going over the team limit!!" to run [make player execute command "/tempban %arg-1% 3 day Going over the Team Limit"]
        format slot 11 of player with eye of ender named "&6Racism" with lore "&aClick this to ban a player for Racism!" to run [make player execute command "/tempban %arg-1% 1 month Racism"]    
        format slot 12 of player with book named "&0Death Threats" with lore "&aClick this to ban a player for Death Threats!" to run [make player execute command "/tempban %arg-1% 2 month Death Threats"]
        format slot 13 of player with pumpkin named "Arguing with staff members" with lore "&aClick this to ban a player for arguing with staff!" to run [make player execute command "/tempban %arg-1% 3 day Arguing with staff members"]  
        format slot 14 of player with iron sword named "PvP logging" with lore "&aClick this to ban a player for PvP logging!" to run [make player execute command "/tempban %arg-1% 2 day PvP logging"]
        format slot 15 of player with player head named "Staff Disrespect" with lore "&aClick this to ban a player for Staff Disrespect!" to run [make player execute command "/tempban %arg-1% 2 month Staff Disrespect"]
        format slot 16 of player with diamond pickaxe named "&eCaveFinder" with lore "&aClick this to ban a player for Cave Finder!" to run [make player execute command "/ban %arg-1% Cave Finder"]  
        format slot 17 of player with oak wood plank named "&eSkybasing after MU" with lore "&aClick this to ban a player for Skying After MU!" to run [make player execute command "/tempban %arg-1% 2 d Skybasing after Meetup"]  
        format slot 18 of player with stone named "&6Avoiding Meetup" with lore "&aClick this to ban a player for avoiding meetup" to run [make player execute command "/tempban %arg-1% 3 d Avoiding Meetup"]
        format slot 19 of player with stick named "&3Stalking" with lore "&aClick this to ban a player for Stalking" to run [make player execute command "/tempban %arg-1% 3 d Stalking"]
        format slot 20 of player with skeleton head named "&cLeaving Random Teams" with lore "&aClick this to ban a player for Leaving Random Teams" to run [make player execute command "/tempban %arg-1% 3 d Leaving Random Teams"]
        format slot 21 of player with beacon named "&9Not joining TS/Skype in random teams" with lore "&aClick this to ban a player for Not joining TS/Skype in random teams" to run [make player execute command "/tempban %arg-1% 3 d Not joining TS/Skype in random teams"]
       
       
on click of anvil named "&cBan Evasion":
    open anvil named "&cOriginal Account?" to player
    wait 5 ticks
    set slot 0 of current inventory of player to 1 name tag named "&aAccount name" with lore "" to run [make console execute command "/ban %arg-1% Ban Evasion (Alt of "]


How would I use the "on click of anvil" event to correspond with the naming of the item for the ban? Ex: I wanted to ban someone for ban evasion, so I click the anvil in the ban gui, it prompts me for an additional IGN, which I would fill in the "naming" section. After clicking the end of the anvil, how would I make the console execute the command for the alt? Kinda confusing to explain, but I hope you get the gist.
You dont' make a argument ...
[doublepost=1495255157,1495255117][/doublepost]Psdt: good idea
 
You need to check if the argument is set:
code_language.skript:
command /bangui <player>:
    permission: ban.gui
    trigger:
        if arg-1 is set:
            open chest with 3 rows named "&4Ban GUI" to player
            # other code..
         else:
            message "&cYou need to mention a Player!"
Untested Code.
 
Status
Not open for further replies.