Help with skript

Discussion in 'Programming' started by ThreshGaming, Jan 14, 2018 at 6:24 AM.

  1. Hello, I just got into skripting the other day and today I was trying to make a punish GUI. I got all of it working except when I click an item in the GUI to ban a player instead of banning the player it bans <none>. Here is what i have coded so far. I only coded a few on inventory clicks because I was testing to see if this kind of thing would happen. If anyone knows how to make it ban the player instead of <none> please help me.

    Code (Text):
    command /p <player>:
        permission: punish.open
        permission message: &9&lImfamy System >> &cYou do not have permission This command require the rank [Trial-Mod]!
        trigger:
            open chest with 9 rows named "&3&lPunish Player" to player
            set slot 0 of player's current inventory to diamond ore named "&5Xray, Chest ESP, Radar" with lore "&d&oRender hack - Punishments "
            set slot 2 of player's current inventory to iron sword named "&4Trigger Bot, Auto clicker" with lore "&c&oMinor Combat Hack - Punishments"
            set slot 4 of player's current inventory to diamond sword named "&6KillAura, Reach, Regen, Criticals" with lore "&e&oMajor Combat Hacks - Punishments"
            set slot 6 of player's current inventory to feather named "&9Fly, Speed, Bhop, Phase" with lore "&b&oMovement Hacks - Punishments"
            set slot 8 of player's current inventory to ender pearl named "&aAbusing Bugs, Insiding, Glitching" with lore "&d&oGlitch - Punishments"




            set slot 18 of player's current inventory to green dye named "&57 day ban" with lore "&d&oFirst offence, Admitting - &9[Trial-Mod]"
            set slot 27 of player's current inventory to yellow dye named "&514 day ban" with lore "&d&oSecond offence, Blatent - &9[Trial-Mod]"
            set slot 36 of player's current inventory to orange dye named "&530 day ban" with lore "&d&oThird offence - &3[Mod]"
            set slot 45 of player's current inventory to red dye named "&5120 day ban" with lore "&d&oFourth offence, Found in SS - &3[Mod]"


            set slot 20 of player's current inventory to green dye named "&414 day ban" with lore "&c&oFirst offence, Admitting - &9[Trial-Mod]"
            set slot 29 of player's current inventory to yellow dye named "&430 day ban" with lore "&c&oSecond offence, Blatent - &3[Mod]"
            set slot 38 of player's current inventory to orange dye named "&4120 day ban" with lore "&c&oThird offence - &3[Mod]"
            set slot 47 of player's current inventory to red dye named "&4Perm ban" with lore "&c&oFourth offence, Found in SS - &3[Mod]"


            set slot 22 of player's current inventory to green dye named "&6120 day ban" with lore "&e&oFirst offense, Blatent, Admitting - &3[Mod]"
            set slot 31 of player's current inventory to yellow dye named "&6Perm ban" with lore "&e&oSecond offense, Found in SS - &3[Mod]"


            set slot 24 of player's current inventory to green dye named "&930 day ban" with lore "&b&oFirst offense, Admitting - &3[Mod]"
            set slot 33 of player's current inventory to yellow dye named "&9120 day ban" with lore "&b&oSecond offense, Blatent - &3[Mod]"
            set slot 42 of player's current inventory to orange dye named "&9Perm ban" with lore "&b&oThird offense, Found in SS - &3[Mod]"


            set slot 26 of player's current inventory to green dye named "&aAbusing Bugs - 14 day ban" with lore "&d&oAll offenses - &9[Trial-Mod]"
            set slot 35 of player's current inventory to yellow dye named "&aPearl Glitching/Block - 1 day ban" with lore "&d&oAll offenses - &9[Trial-Mod]"
            set slot 44 of player's current inventory to orange dye named "&aInsiding - 5 day ban" with lore "&d&oAll offenses - &9[Trial-Mod]"
            set slot 53 of player's current inventory to red dye named "&aIllegal Traps - 5 day ban" with lore "&d&oAll offenses - &9[Trial-Mod]"


            set slot 63 of player's current inventory to book named "&8Spamming chat - Warning" with lore "&7&oFirst offence - &9[Trial-Mod]"
            set slot 64 of player's current inventory to book named "&8Spamming chat - 1 hour mute" with lore "&7&oSecond offence - &9[Trial-Mod]"
            set slot 65 of player's current inventory to book named "&8Spamming chat - 1 day mute" with lore "&7&oThird offence - &9[Trial-Mod]"
            set slot 67 of player's current inventory to enchanted book named "&8Advertising - Perm mute" with lore "&7&oAll offences - &9[Trial-Mod]"
            set slot 69 of player's current inventory to book named "&8Racism - 1 day mute" with lore "&7&oAll offences - &9[Trial-Mod]"
            set slot 70 of player's current inventory to book named "&8Threats/Suicidal encouragement  - 5 day mute" with lore "&7&oAll offences - &9[Trial-Mod]"
            set slot 71 of player's current inventory to book named "&8Circumventing filter - 12 hour mute" with lore "&7&oAll offences - &9[Trial-Mod]"


            set slot 72 of player's current inventory to sugar named "&2Unmute" with lore "&9[Trial-Mod]"
            set slot 73 of player's current inventory to sugar named "&2Unban" with lore "&9[Trial-Mod]"
            set slot 74 of player's current inventory to clock named "&7History Check" with lore "&9[Trial-Mod]"
            set slot 75 of player's current inventory to sugar named "&2History Clear" with lore "&c[Admin]"
            set slot 77 of player's current inventory to nether star named "&2Perm ban - Broken TOS" with lore "&3[Mod]"
            set slot 78 of player's current inventory to nether star named "&2IP-Ban - Ban Evasion" with lore "&3[Senior-Mod]"
            set slot 79 of player's current inventory to nether star named "&2IP-Ban - Broken TOS" with lore "&3[Senior-Mod]"
            set slot 80 of player's current inventory to bedrock named "&2Blacklist" with lore "&c[Senior-Admin]"
           





    on inventory click:
        if inventory name of player's current inventory is "&3&lPunish Player":
            if clicked slot is 0:
                close inventory of player
    on inventory click:
        if inventory name of player's current inventory is "&3&lPunish Player":
            if clicked slot is 2:
                close inventory of player
    on inventory click:
        if inventory name of player's current inventory is "&3&lPunish Player":
            if clicked slot is 4:
                close inventory of player
    on inventory click:
        if inventory name of player's current inventory is "&3&lPunish Player":
            if clicked slot is 6:
                close inventory of player
    on inventory click:
        if inventory name of player's current inventory is "&3&lPunish Player":
            if clicked slot is 8:
                close inventory of player


    on inventory click:
        if inventory name of player's current inventory is "&3&lPunish Player":
            if clicked slot is 18:
                execute player command "ban %arg-1% 7d Hacked Client"
                close inventory of player
     
  2. There's a section for Skript development; Plugin Development -> Skript
     
  3. the problem is, there are no arguments in events and you are trying to ban arg 1 in on inventory click
     
  4. U never told the skript to ban players, do it like this:
    format slot 1 with paper named “7 day ban” to run [make console execute command “/ban %arg 1%”]
    You’ll have to edit that of course but that’s how u can ban players by clicking on something in a gui!
     
  5. he/she did at the last lines, also using format slot is a very bad idea.
     
  6. Well I don’t really ever use gui s anymore so I Wasn’t really sure. Thanks for informing me tho :D
     

Share This Page