Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /punish <offlineplayer> [<text>]:
- permission: skript.punish
- permission message: &cInsufficient permissions!
- usage: &c/punish <player> (reason)
- trigger:
- set {punisher::%player%} to arg-1
- set {reason::%player%} to arg-2
- punish(player, "main")
- function punish(p: Player, page: String):
- if {_page} = "main":
- set {setbantimeseconds::%{_p}%} to 0
- set {setbantimeminutes::%{_p}%} to 0
- set {setbantimehours::%{_p}%} to 0
- set {setbantimedays::%{_p}%} to 0
- set {setbantimeweeks::%{_p}%} to 0
- set {setbantimemonths::%{_p}%} to 0
- set {setbantimeyears::%{_p}%} to 0
- set {setmutetimeseconds::%{_p}%} to 0
- set {setmutetimeminutes::%{_p}%} to 0
- set {setmutetimehours::%{_p}%} to 0
- set {setmutetimedays::%{_p}%} to 0
- set {setmutetimeweeks::%{_p}%} to 0
- set {setmutetimemonths::%{_p}%} to 0
- set {setmutetimeyears::%{_p}%} to 0
- open virtual chest inventory with size 4 named "&3Punishment GUI" to {_p}
- set {_a} to 27
- loop 9 times:
- format gui slot {_a} of {_p} with gray stained glass pane named "&a"
- add 1 to {_a}
- format gui slot 10 of {_p} with red concrete named "&cBan Options" with lore "&7View all the player ban options!" to run function punish({_p}, "main_ban")
- format gui slot 12 of {_p} with orange concrete named "&6Mute Options" with lore "&7View all the player mute options!" to run function punish({_p}, "main_mute")
- format gui slot 14 of {_p} with green concrete named "&2Kick Options" with lore "&7View all the player kick options!" to run function punish({_p}, "main_kick")
- format gui slot 16 of {_p} with lime concrete named "&aWarn Options" with lore "&7View all the player warn options!" to run function punish({_p}, "main_warn")
- else if {_page} = "main_ban":
- open virtual chest inventory with size 4 named "&3Punishment GUI &8- &cMain Ban" to {_p}
- set {_a} to 27
- loop 9 times:
- format gui slot {_a} of {_p} with gray stained glass pane named "&a"
- add 1 to {_a}
- format gui slot 31 of {_p} with book named "&3Punishment GUI &8- &cMain Ban" with lore "&7Return to the main page!" to run function punish({_p}, "main")
- format gui slot 12 of {_p} with red concrete named "&cBan Player" to run function punish({_p}, "ban_ban")
- format gui slot 14 of {_p} with lime concrete named "&aUnban Player" to run function punish({_p}, "ban_unban")
- else if {_page} = "ban_ban":
- open virtual chest inventory with size 6 named "&3Punishment GUI &8- &cBan" to {_p}
- set {_a} to 45
- loop 9 times:
- format gui slot {_a} of {_p} with gray stained glass pane named "&a"
- add 1 to {_a}
- format gui slot 31 of {_p} with book named "&3Punishment GUI &8- &cBan" with lore "&7Return to the main ban page!" to run function punish({_p}, "main_ban")
- set {_a} to 0
- loop 9 times:
- format gui slot {_a} of {_p} with gray stained glass pane named "&a"
- add 1 to {_a}
- format gui slot 4 of {_p} with paper named "&cBan Time" with lore "&8[&7%{setbantime::%{_p}%}%]" to run function punish({_p}, "ban_confirm")
- format gui slot 10 of {_p} with lime concrete named "&a1 second" with lore "&7Add 1 second to the ban time!" to close:
- add 1 to {setbantimeseconds::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 19 of {_p} with lime concrete named "&a1 minute" with lore "&7Add 1 minute to the ban time!" to close:
- add 1 to {setbantimeminutes::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 28 of {_p} with lime concrete named "&a1 hour" with lore "&7Add 1 hour to the ban time!" to close:
- add 1 to {setbantimehours::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 37 of {_p} with lime concrete named "&a1 day" with lore "&7Add 1 day to the ban time!" to close:
- add 1 to {setbantimedays::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 11 of {_p} with lime concrete named "&a1 week" with lore "&7Add 1 week to the ban time!" to close:
- add 1 to {setbantimeweeks::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 20 of {_p} with lime concrete named "&a1 month" with lore "&7Add 1 month to the ban time!" to close:
- add 1 to {setbantimemonths::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 29 of {_p} with lime concrete named "&a1 year" with lore "&7Add 1 year to the ban time!" to close:
- add 1 to {setbantimeyears::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 31 of {_p} with green concrete named "&aFOREVER" with lore "&7Ban the player forever!" to run function punish({_p}, "permban_confirm")
- format gui slot 15 of {_p} with lime concrete named "&c1 second" with lore "&7Remove 1 second to the ban time!" to close:
- if {setbantimeseconds::%{_p}%} > 0:
- remove 1 from {setbantimeseconds::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 24 of {_p} with lime concrete named "&c1 minute" with lore "&7Remove 1 minute to the ban time!" to close:
- if {setbantimeminutes::%{_p}%} > 0:
- remove 1 from {setbantimeminutes::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 33 of {_p} with lime concrete named "&c1 hour" with lore "&7Remove 1 hour to the ban time!" to close:
- if {setbantimehours::%{_p}%} > 0:
- remove 1 from {setbantimehours::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 42 of {_p} with lime concrete named "&c1 day" with lore "&7Remove 1 day to the ban time!" to close:
- if {setbantimedays::%{_p}%} > 0:
- remove 1 from {setbantimedays::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 16 of {_p} with lime concrete named "&c1 week" with lore "&7Remove 1 week to the ban time!" to close:
- if {setbantimeweeks::%{_p}%} > 0:
- remove 1 from {setbantimeweeks::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 25 of {_p} with lime concrete named "&c1 month" with lore "&7Remove 1 month to the ban time!" to close:
- if {setbantimemonths::%{_p}%} > 0:
- remove 1 from {setbantimemonths::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- format gui slot 34 of {_p} with lime concrete named "&c1 year" with lore "&7Remove 1 year to the ban time!" to close:
- if {setbantimeyears::%{_p}%} > 0:
- remove 1 from {setbantimeyears::%{_p}%}
- setTempBanTime({_p})
- punish({_p}, "ban_ban")
- else if {_page} = "permban_confirm":
- open virtual chest inventory with size 1 named "&3Punish GUI &8- &cPermanent Ban" to {_p}
- format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the permanent ban." to close:
- console command "/advancedbans:ban %{punisher::%{_p}%}% -s %{reason::%{_p}%}%"
- broadcast ""
- broadcast "&3%{_p}% &bhas banned &3%{punisher::%{_p}%}% &bdue to &3%{reason::%{_p}%}% &b[FOREVER]"
- broadcast ""
- format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the permanent ban." to run function punish({_p}, "ban_ban")
- else if {_page} = "ban_confirm":
- open virtual chest inventory with size 1 named "&3Punish GUI &8- &cTemporary Ban" to {_p}
- format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the temporary ban." to close:
- console command "/advancedbans:tempban %{punisher::%{_p}%}% %{setbantime::%{_p}%}% -s %{reason::%{_p}%}%"
- broadcast ""
- broadcast "&3%{_p}% &bhas banned &3%{punisher::%{_p}%}% &bdue to &3%{reason::%{_p}%}% &b[%{setbantime::%{_p}%}%]"
- broadcast ""
- format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the temporary ban." to run function punish({_p}, "ban_ban")
- else if {_page} = "ban_unban":
- open virtual chest inventory with size 1 named "&3Punish GUI &8- &cUnban" to {_p}
- format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the unban." to close:
- console command "/advancedbans:unban %{punisher::%{_p}%}%"
- broadcast ""
- broadcast "&3%{_p}% &bhas unbanned &3%{punisher::%{_p}%}%"
- broadcast ""
- format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the unban." to run function punish({_p}, "main_ban")
- else if {_page} = "main_mute":
- open virtual chest inventory with size 4 named "&3Punishment GUI &8- &6Main Mute" to {_p}
- set {_a} to 27
- loop 9 times:
- format gui slot {_a} of {_p} with gray stained glass pane named "&a"
- add 1 to {_a}
- format gui slot 31 of {_p} with book named "&3Punishment GUI &8- &6Main Mute" with lore "&7Return to the main page!" to run function punish({_p}, "main")
- format gui slot 12 of {_p} with red concrete named "&cMute Player" to run function punish({_p}, "mute_mute")
- format gui slot 14 of {_p} with lime concrete named "&aUnmute Player" to run function punish({_p}, "mute_unmute")
- else if {_page} = "mute_mute":
- open virtual chest inventory with size 6 named "&3Punishment GUI &8- &6Mute" to {_p}
- set {_a} to 45
- loop 9 times:
- format gui slot {_a} of {_p} with gray stained glass pane named "&a"
- add 1 to {_a}
- format gui slot 31 of {_p} with book named "&3Punishment GUI &8- &6Mute" with lore "&7Return to the main mute page!" to run function punish({_p}, "main_mute")
- set {_a} to 0
- loop 9 times:
- format gui slot {_a} of {_p} with gray stained glass pane named "&a"
- add 1 to {_a}
- format gui slot 4 of {_p} with paper named "&6Mute Time" with lore "&8[&7%{setmutetime::%{_p}%}%]" to run function punish({_p}, "mute_confirm")
- format gui slot 10 of {_p} with lime concrete named "&a1 second" with lore "&7Add 1 second to the mute time!" to close:
- add 1 to {setmuteseconds::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 19 of {_p} with lime concrete named "&a1 minute" with lore "&7Add 1 minute to the mute time!" to close:
- add 1 to {setmutetimeminutes::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 28 of {_p} with lime concrete named "&a1 hour" with lore "&7Add 1 hour to the mute time!" to close:
- add 1 to {setmutetimehours::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 37 of {_p} with lime concrete named "&a1 day" with lore "&7Add 1 day to the mute time!" to close:
- add 1 to {setmutetimedays::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 11 of {_p} with lime concrete named "&a1 week" with lore "&7Add 1 week to the mute time!" to close:
- add 1 to {setmutetimeweeks::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 20 of {_p} with lime concrete named "&a1 month" with lore "&7Add 1 month to the mute time!" to close:
- add 1 to {setmutetimemonths::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 29 of {_p} with lime concrete named "&a1 year" with lore "&7Add 1 year to the mute time!" to close:
- add 1 to {setmutetimeyears::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 31 of {_p} with green concrete named "&aFOREVER" with lore "&7Mute the player forever!" to run function punish({_p}, "permmute_confirm")
- format gui slot 15 of {_p} with lime concrete named "&c1 second" with lore "&7Remove 1 second to the mute time!" to close:
- if {setmutetimeseconds::%{_p}%} > 0:
- remove 1 from {setmutetimeseconds::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 24 of {_p} with lime concrete named "&c1 minute" with lore "&7Remove 1 minute to the mute time!" to close:
- if {setmutetimeminutes::%{_p}%} > 0:
- remove 1 from {setmutetimeminutes::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 33 of {_p} with lime concrete named "&c1 hour" with lore "&7Remove 1 hour to the mute time!" to close:
- if {setmutetimehours::%{_p}%} > 0:
- remove 1 from {setmutetimehours::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 42 of {_p} with lime concrete named "&c1 day" with lore "&7Remove 1 day to the mute time!" to close:
- if {setmutetimedays::%{_p}%} > 0:
- remove 1 from {setmutetimedays::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 16 of {_p} with lime concrete named "&c1 week" with lore "&7Remove 1 week to the mute time!" to close:
- if {setmutetimeweeks::%{_p}%} > 0:
- remove 1 from {setmutetimeweeks::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 25 of {_p} with lime concrete named "&c1 month" with lore "&7Remove 1 month to the mute time!" to close:
- if {setmutetimemonths::%{_p}%} > 0:
- remove 1 from {setmutetimemonths::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- format gui slot 34 of {_p} with lime concrete named "&c1 year" with lore "&7Remove 1 year to the mute time!" to close:
- if {setmutetimeyears::%{_p}%} > 0:
- remove 1 from {setmutetimeyears::%{_p}%}
- setTempMuteTime({_p})
- punish({_p}, "mute_mute")
- else if {_page} = "permmute_confirm":
- open virtual chest inventory with size 1 named "&3Punish GUI &8- &6Permanent Mute" to {_p}
- format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the permanent mute." to close:
- console command "/advancedbans:mute %{punisher::%{_p}%}% -s %{reason::%{_p}%}%"
- broadcast ""
- broadcast "&3%{_p}% &bhas muted &3%{punisher::%{_p}%}% &bdue to &3%{reason::%{_p}%}% &b[FOREVER]"
- broadcast ""
- format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the permanent mute." to run function punish({_p}, "mute_mute")
- else if {_page} = "mute_confirm":
- open virtual chest inventory with size 1 named "&3Punish GUI &8- &6Temporary Mute" to {_p}
- format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the temporary mute." to close:
- console command "/advancedbans:tempmute %{punisher::%{_p}%}% %{setmutetime::%{_p}%}% -s %{reason::%{_p}%}%"
- broadcast ""
- broadcast "&3%{_p}% &bhas muted &3%{punisher::%{_p}%}% &bdue to &3%{reason::%{_p}%}% &b[%{setmutetime::%{_p}%}%]"
- broadcast ""
- format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the temporary mute." to run function punish({_p}, "mute_mute")
- else if {_page} = "mute_unmute":
- open virtual chest inventory with size 1 named "&3Punish GUI &8- &6Unmute" to {_p}
- format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the unmute." to close:
- console command "/advancedbans:unmute %{punisher::%{_p}%}%"
- broadcast ""
- broadcast "&3%{_p}% &bhas unmuted &3%{punisher::%{_p}%}%"
- broadcast ""
- format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the unmute." to run function punish({_p}, "main_mute")
- else if {_page} = "main_kick":
- open virtual chest inventory with size 4 named "&3Punish GUI &8- &2Main Kick" to {_p}
- set {_a} to 27
- loop 9 times:
- format gui slot {_a} of {_p} with gray stained glass pane named "&a"
- add 1 to {_a}
- format gui slot 13 of {_p} with red concrete named "&cKick Player" to run function punish({_p}, "kick_kick")
- else if {_page} = "kick_kick":
- open virtual chest inventory with size 1 named "&3Punish GUI &8- &2Kick Confirm" to {_p}
- format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the kick." to close:
- console command "/advancedbans:kick %{punisher::%{_p}%}% -s %{reason::%{_p}%}%"
- broadcast ""
- broadcast "&3%{_p}% &bhas kicked &3%{punisher::%{_p}%}% &bdue to &3%{reason::%{_p}%}%"
- broadcast ""
- format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the kick." to run function punish({_p}, "main_kick")
- else if {_page} = "main_warn":
- open virtual chest inventory with size 4 named "&3Punish GUI &8- &aMain Warn" to {_p}
- set {_a} to 27
- loop 9 times:
- format gui slot {_a} of {_p} with gray stained glass pane named "&a"
- add 1 to {_a}
- format gui slot 31 of {_p} with book named "&3Punishment GUI &8- &aMain Warn" with lore "&7Return to the main page!" to run function punish({_p}, "main")
- format gui slot 12 of {_p} with lime concrete named "&aView Warns" with lore "&7View all the warns!" to run function punish({_p}, "warn_list")
- format gui slot 14 of {_p} with red concrete named "&cWarn Player" to run function punish({_p}, "warn_warn")
- else if {_page} = "warn_warn":
- open virtual chest inventory with size 1 named "&3Punish GUI &8- &aWarn Player" to {_p}
- format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the warn." to close:
- console command "/advancedbans:warn %{punisher::%{_p}%}% -s %{reason::%{_p}%}%"
- broadcast ""
- broadcast "&3%{_p}% &bhas warned &3%{punisher::%{_p}%}% &bdue to &3%{reason::%{_p}%}%"
- broadcast ""
- set {_a} to {punisher::%{_p}%}
- add "&3Warned by: &b%{_p}% || &3Reason: &b%{reason::%{_p}%}% || &3User: &b%{punisher::%{_p}%}%" to {warns::%{_a}%::*}
- format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the warn." to run function punish({_p}, "main_warn")
- else if {_page} = "warn_list":
- open virtual chest inventory with size 6 named "&3Punishment GUI &8- &aWarn List" to {_p}
- set {_a} to 0
- loop 9 times:
- format gui slot {_a} of {_p} with gray stained glass pane named "&a"
- add 1 to {_a}
- set {_a} to 45
- loop 9 times:
- format gui slot {_a} of {_p} with gray stained glass pane named "&a"
- add 1 to {_a}
- set {_a} to {punisher::%{_p}%}
- format gui slot 4 of {_p} with paper named "&aWarns" with lore "&7Warns: %size of {warns::%{_a}%::*}%"
- format gui slot 49 of {_p} with book named "&3Punisment GUI &8- &aWarn List" with lore "&7Return to the main warn page!" to run function punish({_p}, "main_warn")
- loop {warns::%{_a}%::*}:
- set {_b} to "%{punisher::%{_p}%}%" parsed as offline player
- set {_c} to (loop-index - 1)
- format gui slot {_c} of {_p} with skull of {_b} named "&3Warn &8- &b%loop-index%" with lore "%{_b}%" to close:
- format gui slot {_c} of {_p} with air
- delete {warns::%{_a}%::%loop-index%}
- punish({_p}, "warn_list")
- function setTempBanTime(p: Player):
- set {setbantime::%{_p}%} to "%{setbantimeyears::%{_p}%}%y %{setbantimemonths::%{_p}%}%mo %{setbantimeweeks::%{_p}%}%w %{setbantimedays::%{_p}%}%d %{setbantimehours::%{_p}%}%h %{setbantimeminutes::%{_p}%}%m %{setbantimeseconds::%{_p}%}%s"
- function setTempMuteTime(p: Player):
- set {setmutetime::%{_p}%} to "%{setmutetimeyears::%{_p}%}%y %{setmutetimemonths::%{_p}%}%mo %{setmutetimeweeks::%{_p}%}%w %{setmutetimedays::%{_p}%}%d %{setmutetimehours::%{_p}%}%h %{setmutetimeminutes::%{_p}%}%m %{setmutetimeseconds::%{_p}%}%s"
- #00 01 02 03 04 05 06 07 08
- #09 10 11 12 13 14 15 16 17
- #18 19 20 21 22 23 24 25 26
- #27 28 29 30 31 32 33 34 35
- #36 37 38 39 40 41 42 43 44
- #45 46 47 48 49 50 51 52 53
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement