Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.74 KB | None | 0 0
  1. # █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  2. # █ █
  3. # █ Author | Készítő: Majorka_ █
  4. # █ BanManager █
  5. # █ Version: 0.1 █
  6. # █ █
  7. # █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  8.  
  9. options:
  10.     p: &f&lDream&3&lGaming &8»
  11.     np: &cNincs jogosultságod a parancs használatára!
  12.  
  13. on connect:
  14.     if {ban.%player%} is true:
  15.         if {bantype.%player%} is "PERM":
  16.             kick player due to "&7Ki vagy tiltva a szerverről.%nl%&7Indok: &a%{banr.%player%}%%nl%&7Kitiltott: &a%{banner.%player%}%"
  17.             loop all players:
  18.                 if loop-player has permission "essentials.ban":
  19.                     send "{@p} &a%player% &7csatlakozni próbált de ki van tiltva van." to loop-player
  20.         if {bantype.%player%} is "TEMP":
  21.             set {_tempban} to difference between now and {bannedat.%player%}
  22.             set {_tempban2} to difference between {bannedat.%player%} and now
  23.             reduce {_tempban} by {bant.%player%}
  24.             set {_bant} to {bant.%player%}
  25.             set {_timeleft} to difference between now and {bannedat.%player%}
  26.             reduce {_bant} by {_timeleft}
  27.             set {_timeleft} to "%{_bant}%"
  28.             replace all "days" in {_timeleft} with "nap"
  29.             replace all "day" in {_timeleft} with "nap"
  30.             replace all "hours" in {_timeleft} with "óra"
  31.             replace all "hour" in {_timeleft} with "óra"
  32.             replace all "minutes" in {_timeleft} with "perc"
  33.             replace all "minute" in {_timeleft} with "perc"
  34.             replace all "seconds" in {_timeleft} with "másodperc"
  35.             replace all "second" in {_timeleft} with "másodperc"
  36.             replace all "and" in {_timeleft} with "és"
  37.             if difference between now and {bannedat.%player%} is bigger than {bant.%player%}:
  38.                 set {ban.%player%} to false
  39.                 delete {bantype.%player%}
  40.                 delete {banr.%player%}
  41.                 delete {banner.%player%}
  42.                 delete {bant.%player%}
  43.                 delete {bannedat.%player%}
  44.             else:
  45.                 kick player due to "&7Ideiglenesen ki vagy tiltva a szerverről.%nl%&7Indok: &a%{banr.%player%}%%nl%&7Lejárat: &7%{_timeleft}%%nl%&7Kitiltott: &a%{banner.%player%}%"
  46.                 loop all players:
  47.                     if loop-player has permission "essentials.tempban":
  48.                         send "{@p} &b%player% &7csatlakozni próbált de ki van tiltva.%nl%{@p}&7 Lejárat: &a%{_timeleft}%re&7." to loop-player
  49.  
  50. command /unban [<offline player>]:
  51.     permission: essentials.unban
  52.     permission message: {@np}
  53.     trigger:
  54.         if arg-1 is not set:
  55.             send "{@p} &7Használd: &a/unban <játékos>"
  56.         else:
  57.             if arg-1 is banned:
  58.                 unban arg-1
  59.                 send "&aSikeresen feloldottad &7%arg-1% &ajátékos kitiltását!"
  60.             if {ban.%arg-1%} is true:
  61.                 broadcast ""
  62.                 broadcast "{@p} &a%player% &7feloldotta &a%arg-1% &7játékos kitiltását."
  63.                 broadcast ""
  64.                 set {ban.%arg-1%} to false
  65.                 delete {bantype.%arg-1%}
  66.                 delete {banr.%arg-1%}
  67.                 delete {banner.%arg-1%}
  68.                 delete {bant.%arg-1%}
  69.                 delete {bannedat.%arg-1%}
  70.                 send "&aSikeresen feloldottad &7%arg-1% &ajátékos kitiltását!"
  71.             else:
  72.                 send "{@p} &c%arg-1% jelenleg nincs kitiltva."
  73.            
  74. command /ban [<offline player>] [<text>]:
  75.     permission: essentials.ban
  76.     permission message: {@np}
  77.     trigger:
  78.         if arg-1 is not set:
  79.             send "{@p} &cHasználd: /ban <játékos> <indok>"
  80.         if arg-1 is "iTzKillR3kted" or "Majorka_":
  81.             send "{@p} &4Ezt a játékost nem bannolhatod."
  82.             stop trigger
  83.         else:
  84.             if arg-2 is not set:
  85.                 send "{@p} &cHasználd: /ban <játékos> <indok>"
  86.             else:
  87.                 if {ban.%arg-1%} is true:
  88.                     if player doesn't have permission "ban.admin":
  89.                         send "{@p} &cA játékos már ki van tiltva, és nincs jogod felülírni a kitiltást."
  90.                         stop
  91.                 broadcast ""
  92.                 broadcast "{@p} &c%player% &7kitiltotta &c%arg-1% &7játékost."
  93.                 broadcast "{@p} &7Indok: &c%colored arg-2%"
  94.                 broadcast ""
  95.                 set {ban.%arg-1%} to true
  96.                 set {bantype.%arg-1%} to "PERM"
  97.                 set {banr.%arg-1%} to "%colored arg-2%"
  98.                 set {banner.%arg-1%} to player
  99.                 add 1 to {staffbans}
  100.                 send "&aSikeresen kitiltottad &7%arg-1% &ajátékost. Indok: &7%arg-2%."
  101.                 if arg-1 is online:
  102.                     kick arg-1 due to "&7Ki lettél tiltva a szerverről.%nl%&7Indok: &a%{banr.%arg-1%}%%nl%&7Kitiltott: &a%{banner.%arg-1%}%"
  103.                
  104. command /tempban [<offline player>] [<text>] [<text>]:
  105.     permission: essentials.tempban
  106.     permission message: {@np}
  107.     trigger:
  108.         if arg-1 is not set:
  109.             send "{@p} &cHasználd: /tempban <játékos> <időtartam> <indok>"
  110.         else:
  111.             if arg-2 is not set:
  112.                 send "{@p} &cHasználd: /tempban <játékos> <időtartam> <indok>"
  113.             else:
  114.                 if arg-3 is not set:
  115.                     send "{@p} &cHasználd: /tempban <játékos> <időtartam> <indok>"
  116.                 else:
  117.                     set {_t} to "%arg-2%" parsed as text
  118.                     replace all "d" in {_t} with " day "
  119.                     replace all "s" in {_t} with " second "
  120.                     replace all "m" in {_t} with " minute "
  121.                     replace all "h" in {_t} with " hour "
  122.                     set {_t2} to "%{_t}%"
  123.                     replace all "day" in {_t2} with "nap"
  124.                     replace all "hour" in {_t2} with "óra"
  125.                     replace all "minute" in {_t2} with "perc"
  126.                     replace all "second" in {_t2} with "másodperc"
  127.                     replace all "and" in {_t2} with "és"
  128.                     set {_time} to {_t} parsed as timespan
  129.                     set {bant.%arg-1%} to {_time}
  130.                     set {ban.%arg-1%} to true
  131.                     set {bantype.%arg-1%} to "TEMP"
  132.                     set {banr.%arg-1%} to "%colored arg-3%"
  133.                     set {banner.%arg-1%} to player
  134.                     set {bannedat.%arg-1%} to now
  135.                     add 1 to {staffbans}
  136.                     broadcast ""
  137.                     broadcast "{@p} &c%player% &7ideiglenesen kitiltotta &c%arg-1% &7játékost."
  138.                     broadcast "{@p} &7Indok: &c%colored arg-3%"
  139.                     broadcast "{@p} &7Időtartam: &c%{_t2}%"
  140.                     broadcast ""
  141.                     send "&7Sikeresen kitiltottad &a%arg-1% &7játékost.%nl%&7Indok: &a%arg-3%.%nl%&7Lejárat: &a%{_t2}%"
  142.                     if arg-1 is online:
  143.                         kick arg-1 due to "&7Ideiglenesen ki lettél tiltva a szerverről.%nl%&7Indok: &a%{banr.%arg-1%}%%nl%&7Időtartam: &a%{_t2}%%nl%&7Kitiltott: &a%{banner.%arg-1%}%"
  144.                        
  145. command /kick [<offline player>] [<text>]:
  146.     permission: essentials.kick
  147.     permission message: {@np}
  148.     trigger:
  149.         if arg-1 is not set:
  150.             send "&7Helyes használat: &a/kick [játékosnév] [indok]"
  151.         else:
  152.             if arg-2 is not set:
  153.                 send "&7Helyes használat: &a/kick [játékosnév] [indok]"
  154.             else:
  155.                 if arg-1 is not online:
  156.                     send "&7Ez a játékos nem elérhető."
  157.                 else:
  158.                     set {kickreason.%arg-1%} to arg-2
  159.                     set {kicker.%player%} to player
  160.                     kick arg-1 due to "&7Ki lettél kickelve.%nl%&7Kickelés indoka: &a%{kickreason.%arg-1%}% %nl%&7Kickelt: &a%{kicker.%player%}%"
  161.                     send " " to player
  162.                     send "&aSikeresen kirúgtad &7%arg-1% játékost." to player
  163.                     send "&aIndok: &7%{kickreason.%arg-1%}%" to player
  164.                     send " " to player
  165.                     wait 1 tick
  166.                     delete {kickreason.%arg-1%}
  167.                     delete {kicker.%player%}
  168.                    
  169. command /warn [<offline player>] [<text>]:
  170.     permission: warn.use
  171.     permission message: {@np}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement