patison234

PVPGuild 1.5.5

Jul 6th, 2014
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 29.09 KB | None | 0 0
  1.  
  2. # # # # # # # # # # # # # # # #
  3. # Script by Patek             #
  4. # Name: PVPGuild              #
  5. # Version: 1.5.1              #
  6. # Skript: 2.1/2.1.2           #
  7. # # # # # # # # # # # # # # # #
  8.  
  9.  
  10.  
  11. #=============================================#
  12. #  Licencja PVPGuild by Patek!                #
  13. # + Nie zezwalam na:                          #
  14. # - Usuwanie tresci o autorze!                #
  15. # - Udostepnaniu skryptu innym!               #
  16. # - Podszywanie sie pod autora!               #
  17. # - Uzywanie kodu skryptu w swoich skryptach! #
  18. # - Zarabianie na skrypcie!                   #
  19. # + Zezwalam na:                              #
  20. # - Dodawanie kodu na swoja potrzebe!         #
  21. # - Modyfikowanie wiadomosci!                 #
  22. #=============================================#
  23. options:
  24.  
  25.     # Tag wyswietlany przed wiadomosciami skryptu!:
  26.     tag: &7[&4PVP&8Guild&7]
  27.    
  28.     # Wyglad chatu:
  29.     chat: &7[&6{TAG}&7] {NICK}: &f{MSG}
  30.    
  31.     # Czy trzeba placic za gildie? (true|false):
  32.     payment-for-guild: true
  33.    
  34.     # Jaka zaplata ma byc przyjmowana (money|item):
  35.     payment-type: item
  36.    
  37.     # Ilosc pieniedzy do zalozenia gildi:
  38.     payment-money-amount: 1000
  39.    
  40.     # Itemki na zalozenie gildii. Jezeli chcesz wiecej niz 5 wystarczy ze 1 jednej linice wpisz np. 3 cobblestone, 2 redstone and 1 torch , a jezeli nic wpisz none|air:
  41.     payment-item-1: 3 stone
  42.     payment-item-2: 2 redstone
  43.     payment-item-3: 5 cobblestone
  44.     payment-item-4: 6 torch
  45.     payment-item-5: air
  46. on load:
  47.     send "&7[&4PVP&8Guild&7] PVPGuild &aEnabled!" to console
  48.     send "&7[&4PVP&8Guild&7] PVPGuild by Patek" to console
  49.     send "&7[&4PVP&8Guild&7] PVPGuild version 1.5.5" to console
  50.  
  51. command /pvpguild [<text>] [<text>] [<text>]:
  52.     aliases: g, guild, gildia
  53.     trigger:
  54.         if arg 1 is not set:
  55.             if arg 2 is not set:
  56.                 execute player command "/pvpguild help"
  57.                 stop
  58.             if arg 2 is "2":
  59.                 execute player command "/pvpguild help 2"
  60.                 stop   
  61.             if arg 2 is "1":
  62.                 execute player command "/pvpguild help"
  63.                 stop
  64.         if arg 1 is "2":
  65.             execute player command "/pvpguild help 2"
  66.             stop   
  67.         if arg 1 is "reload":
  68.             if player has permission "pvpguild.admin":
  69.                 execute console command "/sk reload %script%"
  70.                 send "{@tag} &aPrzeladowano!"
  71.                 stop
  72.             send "{@tag} &cNie masz uprwanien do tej komendy!"
  73.             stop
  74.         if arg 1 is "pomoc" or "help" or "?":
  75.             if arg 2 is not set:
  76.                 send "&8========&6PVPGuild&8========"
  77.                 send "&e/gildia &a- &7Wszystkie komendy dla gildii!"
  78.                 send "&e/gildia stworz [TAG] [Nazwa] &a- &7Tworzy gildie!"
  79.                 send "&e/gildia usun &a- &7Usuwa gildie!"
  80.                 send "&e/gildia info [Nazwa] &a- &7Informacje o gildii!"
  81.                 send "&e/gildia zapros [Nick] &a- &7Zaprasza gracza do gildii!"
  82.                 send "&e/gildia wypros [Nick] &a- &7Usuwa gracza z gildii!"
  83.                 send "&e/gildia oficer [Nick] &a- &7Nadaje oficera gildii!"
  84.                 send "&e/gildia list &a- &7Lista wszystkich gildiii!"
  85.                 send "&e/gildia akceptuj [Nazwa] &a- &7Akceptuje zaproszenie od gildii!"
  86.                 stop
  87.             if arg 2 is "1":
  88.                 execute player command "/pvpguild help"
  89.                 stop
  90.             if arg 2 is "2":
  91.                 send "&8========&6PVPGuild&8========"
  92.                 send "&e/gildia opusc &a- &7Opuszcza gildie!"
  93.                 send "&e/gildia pvp &a- &7Wlacza/Wylacz pvp miedzy czlonkami gildii!"
  94.                 send "&e/gildia chat &a- &7Chat gildijny"
  95.                 send "&e/gildia degrad [Nick] &a- &7Degraduje gracza z oficera!"
  96.                 stop
  97.             if arg 2 is "3" or "4" or "5":
  98.                 send "{@tag} &cTa strona nie istnieje!"
  99.                 stop
  100.         if arg 1 is "stworz" or "create" or "c":
  101.             if player has permission "pvpguild.create" or "pvpguild.admin" or "pvpguild.gracz":
  102.                 if {pvpguild.guild::%arg 3%} is not set:
  103.                     if {pvpguild.inguild::%name of player%} is not set:
  104.                         if arg 2 is set:
  105.                             if length of argument 2 is smaller than 5:
  106.                                 if arg 3 is set:
  107.                                     if length of arg 3 is smaller than 21:
  108.                                         if {@payment-for-guild} is true:
  109.                                             if "{@payment-type}" is "money":
  110.                                                 set {_amount.money} to {@payment-money-amount}
  111.                                                 if PLAYER'S MONEY is greater than {_amount.money}-1:
  112.                                                     remove {_amount.money} from the player's balance
  113.                                                     set {pvpguild.guild::%arg 3%} to true
  114.                                                     set {pvpguild.%arg 3%.lider} to "%name of player%"
  115.                                                     set {pvpguild.%arg 3%.tag} to "%arg 2%"
  116.                                                     set {pvpguild.inguild::%name of player%} to "%arg 3%"
  117.                                                     add "%arg 2%" to {pvpguild.taglist::*}
  118.                                                     add "%arg 3%" to {pvpguild.guildlist::*}
  119.                                                     broadcast "{@tag} &7%name of player% &aUtworzyl gildie o nazwie &9%arg 3% &a i tagu &9%arg 2%"
  120.                                                     stop
  121.                                                 send "{@tag} &cNie masz wystarczająco pieniędzy na zalozenie gildii!"
  122.                                                 stop
  123.                                             if "{@payment-type}" is "item":
  124.                                                 if player has {@payment-item-1}:
  125.                                                     if player has {@payment-item-2}:
  126.                                                         if player has {@payment-item-3}:
  127.                                                             if player has {@payment-item-4}:
  128.                                                                 if player has {@payment-item-5}:
  129.                                                                     remove {@payment-item-1} from the player
  130.                                                                     remove {@payment-item-2} from the player
  131.                                                                     remove {@payment-item-3} from the player
  132.                                                                     remove {@payment-item-4} from the player
  133.                                                                     remove {@payment-item-5} from the player
  134.                                                                     set {pvpguild.guild::%arg 3%} to true
  135.                                                                     set {pvpguild.%arg 3%.lider} to "%name of player%"
  136.                                                                     set {pvpguild.%arg 3%.tag} to "%arg 2%"
  137.                                                                     set {pvpguild.inguild::%name of player%} to "%arg 3%"
  138.                                                                     add "%arg 2%" to {pvpguild.taglist::*}
  139.                                                                     add "%arg 3%" to {pvpguild.guildlist::*}
  140.                                                                     broadcast "{@tag} &7%name of player% &aUtworzyÂł gildie o nazwie &9%arg 3% &a i tagu &9%arg 2%"
  141.                                                                     stop
  142.                                                                 send "{@tag} &cNie posiadasz odpowiednich itemow!"
  143.                                                                 stop
  144.                                                             send "{@tag} &cNie posiadasz odpowiednich itemow!"
  145.                                                             stop
  146.                                                         send "{@tag} &cNie posiadasz odpowiednich itemow!"
  147.                                                         stop
  148.                                                     send "{@tag} &cNie posiadasz odpowiednich itemow!"
  149.                                                     stop
  150.                                                 send "{@tag} &cNie posiadasz odpowiednich itemow!"
  151.                                                 stop
  152.                                             stop
  153.                                         set {pvpguild.guild::%arg 3%} to true
  154.                                         set {pvpguild.%arg 3%.lider} to "%name of player%"
  155.                                         set {pvpguild.%arg 3%.tag} to "%arg 2%"
  156.                                         set {pvpguild.inguild::%name of player%} to "%arg 3%"
  157.                                         add "%arg 2%" to {pvpguild.taglist::*}
  158.                                         add "%arg 3%" to {pvpguild.guildlist::*}
  159.                                         broadcast "{@tag} &7%name of player% &aUtworzyÂł gildie o nazwie &9%arg 3% &a i tagu &9%arg 2%"
  160.                                         stop
  161.                                     send "{@tag} &cNazwa gildi nie moze miec wiecej niz 20 znakow!"
  162.                                     stop
  163.                                 send "{@tag} &cPodaj nazwe swojej gildi!"
  164.                                 stop
  165.                             send "{@tag} &cTag gildi nie moze miec wiecej niz 4 znaki!"
  166.                             stop
  167.                         send "{@tag} &cPodaj tag gildi!"
  168.                         stop
  169.                     send "{@tag} &cAby zalozyc gildie najpierw musisz oposcic aktualna!"
  170.                     stop
  171.                 send "{@tag} &cTaka gildia juz istnieje!"
  172.                 stop
  173.             send "{@tag} &cNie masz uprwanien do tej komendy!"
  174.             stop
  175.         if arg 1 is "info" or "informacje" or "i":
  176.             if player has permission "pvpguild.info" or "pvpguild.admin" or "pvpguild.gracz":
  177.                 if arg 2 is set:
  178.                     if {pvpguild.guild::%arg 2%} is set:
  179.                         if {pvpguild.%arg 2%.members::*} is set:
  180.                             if {pvpguild.%arg 2%.oficers::*} is set:
  181.                                 send "&7Nazwa gildi: &9%arg 2%"
  182.                                 send "&7Tag gildi: &9%{pvpguild.%arg 2%.tag}%"
  183.                                 send "&7Lider gildi: &9%{pvpguild.%arg 2%.lider}%"
  184.                                 loop {pvpguild.%arg 2%.oficers::*}:
  185.                                     if loop-value PARSED AS player is online:
  186.                                         add loop-value to {_online.oficers::*}
  187.                                     if loop-value parsed as player is offline:
  188.                                         add loop-value to {_offline.oficers::*}
  189.                                 if {_online.oficers::*} is set:
  190.                                     if {_offline.oficers::*} is set:
  191.                                         send "&7Oficerowie gildi: &a%{_online.oficers::*}% &c%{_offline.oficers::*}%"
  192.                                 loop {pvpguild.%arg 2%.members::*}:
  193.                                     if loop-value parsed as player is online:
  194.                                         add loop-value to {_online.members::*}
  195.                                     if loop-value parsed as player is offline:
  196.                                         add loop-value to {_offline.members::*}
  197.                                 if {_online.members::*} is set:
  198.                                     if {_offline.members::*} is set:
  199.                                         send "&7Czlonkowie gildi: &a%{_online.members::*}% &c%{_offline.members::*}%"
  200.                                         stop
  201.                                     send "&7Czlonkowie gildi: &a%{_online.members::*}%"
  202.                                     stop
  203.                                 send "&7Czlonkowie gildi: &c%{_offline.members::*}%"
  204.                                 stop
  205.                             send "&7Nazwa gildi: &9%arg 2%"
  206.                             send "&7Tag gildi: &9%{pvpguild.%arg 2%.tag}%"
  207.                             send "&7Lider gildi: &9%{pvpguild.%arg 2%.lider}%"
  208.                             send "&7Oficerowie gildi: &9Brak"
  209.                             loop {pvpguild.%arg 2%.members::*}:
  210.                                 if loop-value parsed as player is online:
  211.                                     add loop-value to {_online.members::*}
  212.                                 if loop-value parsed as player is offline:
  213.                                     add loop-value to {_offline.members::*}
  214.                             if {_online.members::*} is set:
  215.                                 if {_offline.members::*} is set:
  216.                                     send "&7Czlonkowie gildi: &a%{_online.members::*}% &c%{_offline.members::*}%"
  217.                                     stop
  218.                                 send "&7Czlonkowie gildi: &a%{_online.members::*}%"
  219.                                 stop
  220.                             send "&7Czlonkowie gildi: &c%{_offline.members::*}%"
  221.                             stop                               
  222.                         send "&7Nazwa gildi: &9%arg 2%"
  223.                         send "&7Tag gildi: &9%{pvpguild.%arg 2%.tag}%"
  224.                         send "&7Lider gildi: &9%{pvpguild.%arg 2%.lider}%"
  225.                         send "&7Oficerowie gildi: &9Brak"
  226.                         send "&7Czlonkowie gildi: &9Brak"
  227.                         stop
  228.                     send "{@tag} &cTaka gildia nie istnieje!"
  229.                     stop
  230.                 else:
  231.                     if {pvpguild.inguild::%name of player%} is set:
  232.                         if {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*} is set:
  233.                             if {pvpguild.%{pvpguild.inguild::%name of player%}%.oficers::*} is set:
  234.                                 send "&7Nazwa gildi: &9%{pvpguild.inguild::%name of player%}%"
  235.                                 send "&7Tag gildi: &9%{pvpguild.%{pvpguild.inguild::%name of player%}%.tag}%"
  236.                                 send "&7Lider gildi: &9%{pvpguild.%{pvpguild.inguild::%name of player%}%.lider}%"
  237.                                 loop {pvpguild.%{pvpguild.inguild::%name of player%}%.oficers::*}:
  238.                                     if loop-value parsed as player is online:
  239.                                         add loop-value to {_online.oficers::*}
  240.                                     if loop-value parsed as player is offline:
  241.                                         add loop-value to {_offline.oficers::*}
  242.                                 if {_online.oficers::*} is set:
  243.                                     if {_offline.oficers::*} is set:
  244.                                         send "&7Oficerowie gildi: &a%{_online.oficers::*}% &c%{_offline.oficers::*}%"
  245.                                         stop
  246.                                     send "&7Oficerowie gildi: &a%{_online.oficers::*}%"
  247.                                     stop
  248.                                 send "&7Oficerowie gildi: &c%{_offline.oficers::*}%"
  249.                                 stop
  250.                                 loop {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}:
  251.                                     if loop-value parsed as player is online:
  252.                                         add loop-value to {_online.members::*}
  253.                                     if loop-value parsed as player is offline:
  254.                                         add loop-value to {_offline.members::*}
  255.                                 if {_online.members::*} is set:
  256.                                     if {_offline.members::*} is set:
  257.                                         send "&7Czlonkowie gildi: &a%{_online.members::*}% &c%{_offline.members::*}%"
  258.                                         stop
  259.                                     send "&7Czlonkowie gildi: &a%{_online.members::*}% "
  260.                                     stop                                       
  261.                                 send "&7Czlonkowie gildi: &c%{_offline.members::*}%"
  262.                                 stop                                   
  263.                             send "&7Nazwa gildi: &9%{pvpguild.inguild::%name of player%}%"
  264.                             send "&7Tag gildi: &9%{pvpguild.%{pvpguild.inguild::%name of player%}%.tag}%"
  265.                             send "&7Lider gildi: &9%{pvpguild.%{pvpguild.inguild::%name of player%}%.lider}%"
  266.                             send "&7Oficerowie gildi: &9Brak"
  267.                             loop {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}:
  268.                                 if loop-value parsed as player is online:
  269.                                     add loop-value to {_online.members::*}
  270.                                 if loop-value parsed as player is offline:
  271.                                     add loop-value to {_offline.members::*}
  272.                             if {_online.members::*} is set:
  273.                                 if {_offline.members::*} is set:
  274.                                     send "&7Czlonkowie gildi: &a%{_online.members::*}% &c%{_offline.members::*}%"
  275.                                     stop
  276.                                 send "&7Czlonkowie gildi: &a%{_online.members::*}% "
  277.                                 stop                                       
  278.                             send "&7Czlonkowie gildi: &c%{_offline.members::*}%"
  279.                             stop   
  280.                         send "&7Nazwa gildi: &9%{pvpguild.inguild::%name of player%}%"
  281.                         send "&7Tag gildi: &9%{pvpguild.%{pvpguild.inguild::%name of player%}%.tag}%"
  282.                         send "&7Lider gildi: &9%{pvpguild.%{pvpguild.inguild::%name of player%}%.lider}%"
  283.                         send "&7Oficerowie gildi: &9Brak"
  284.                         send "&7Czlonkowie gildi: &9Brak"
  285.                         stop
  286.                     send "{@tag} &cNie posiadasz gildi!"
  287.                     stop
  288.             send "{@tag} &cNie masz uprwanien do tej komendy!"
  289.             stop
  290.         if arg 1 is "usun" or "delete" or "u":
  291.             if player has permission "pvpguild.delete" or "pvpguild.admin" or "pvpguild.gracz":
  292.                 if {pvpguild.inguild::%name of player%} is set:
  293.                     if {pvpguild.%{pvpguild.inguild::%name of player%}%.lider} is player:
  294.                         remove "%{pvpguild.%{pvpguild.inguild::%name of player%}%.tag}%" from {pvpguild.taglist::*}
  295.                         remove "%{pvpguild.inguild::%name of player%}%" from {pvpguild.guildlist::*}
  296.                         broadcast "{@tag} &7%name of player% &aUsunal gildie o nazwie &9%{pvpguild.inguild::%name of player%}% &a i tagu &9%{pvpguild.%{pvpguild.inguild::%name of player%}%.tag}%"
  297.                         clear {pvpguild.guild::%{pvpguild.inguild::%name of player%}%}
  298.                         clear {pvpguild.%{pvpguild.inguild::%name of player%}%.lider}
  299.                         clear {pvpguild.%{pvpguild.inguild::%name of player%}%.tag}
  300.                         remove "%{pvpguild.%{pvpguild.inguild::%name of player%}%.tag}%" from {pvpguild.taglist::*}
  301.                         if size of {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*} is greater than 0:
  302.                             loop {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}:
  303.                                 clear {pvpguild.inguild::%loop-value%}
  304.                                 remove "%loop-value%" from {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}
  305.                         if size of {pvpguild.%{pvpguild.inguild::%name of player%}%.oficers::*} is greater than 0:
  306.                             loop {pvpguild.%{pvpguild.inguild::%name of player%}%.oficers::*}:
  307.                                 clear {pvpguild.inguild::%loop-value%}
  308.                                 remove "%loop-value%" from {pvpguild.%{pvpguild.inguild::%name of player%}%.oficers::*}  
  309.                         clear {pvpguild.inguild::%name of player%}
  310.                         stop
  311.                     send "{@tag} &cTylko lider gildi moze tego uzywac!"
  312.                     stop   
  313.                 send "{@tag} &cNie posiadasz gildi!"
  314.                 stop
  315.             send "{@tag} &cNie masz uprwanien do tej komendy!"
  316.             stop   
  317.         if arg 1 is "list" or "lista" or "l":
  318.             if player has permission "pvpguild.list" or "pvpguild.admin" or "pvpguild.gracz":
  319.                 set {_strona} to arg 2 parsed as number
  320.                 if {_strona} is not set:
  321.                     set {_strona} to 1
  322.                 set {_liczbawpisow} to size of {pvpguild.guildlist::*}
  323.                 set {_liczba-stron} to ceil({_liczbawpisow}/10)
  324.                 if {_liczba-stron} is smaller than 1:
  325.                     set {_liczba-stron} to 1
  326.                 if {_strona} is smaller than 1:
  327.                     send "{@tag} &cNie ma takiej strony!"
  328.                     stop
  329.                 if {_strona} is greater than {_liczba-stron}:
  330.                     send "{@tag} &cNie ma takiej strony!"
  331.                     stop
  332.                 if size of {pvpguild.guildlist::*} is smaller than 1:
  333.                     send "{@tag} &cBrak gildi!"
  334.                     stop
  335.                 loop {pvpguild.guildlist::*}:
  336.                     add loop-value to {_pvpguild.guildlist::*}
  337.                 loop {pvpguild.taglist::*}:
  338.                     add loop-value to {_pvpguild.taglist::*}
  339.                 send "&8Lista gildii: &2%{_strona}%&6/&2%{_liczba-stron}%"
  340.                 loop {_liczbawpisow} times:
  341.                     set {_lista} to ({_strona}-1)*10
  342.                     add loop-number to {_lista}
  343.                     if {_pvpguild.guildlist::%{_lista}%} is not set:
  344.                         stop
  345.                     if loop-number is 11:
  346.                         stop
  347.                     send "&8%{_lista}%. &4%{_pvpguild.guildlist::%{_lista}%}% &7[&9%{_pvpguild.taglist::%{_lista}%}%&7]"
  348.             stop
  349.             send "{@tag} &cNie masz uprawnien do tej komendy!"
  350.             stop
  351.         if arg 1 is "invite" or "zapros" or "inv":
  352.             if player has permission "pvpguild.invite" or "pvpguild.admin" or "pvpguild.gracz":
  353.                 if {pvpguild.inguild::%name of player%} is set:
  354.                     if arg 2 is set:
  355.                         set {_player} to arg 2 parsed as player
  356.                         if {pvpguild.%{pvpguild.inguild::%name of player%}%.lider} is player:
  357.                             set {invite.%{pvpguild.inguild::%name of player%}%.%{_player}%} to true
  358.                             send "&8===================================================" to {_player}
  359.                             send "&eGildia &a%{pvpguild.inguild::%name of player%}% &e wysyla ci zaproszenie" to {_player}
  360.                             send "&eWpisz &a/g accept %{pvpguild.inguild::%name of player%}% &eaby zaakceptowac!" to {_player}
  361.                             send "&8===================================================" to {_player}
  362.                             send "&8==================================================="
  363.                             send "&eZaproszenie zostalo wyslane do &a%{_player}%"
  364.                             send "&8==================================================="
  365.                             wait 1 minute
  366.                             if {pvpguild.inguild::%{_player}%} is not {pvpguild.inguild::%name of player%}:
  367.                                 clear {invite.%{pvpguild.inguild::%name of player%}%.%{_player}%}
  368.                                 stop
  369.                             stop
  370.                         if {pvpguild.%{pvpguild.inguild::%name of player%}%.%name of player%.oficer} is player:
  371.                             set {invite.%{pvpguild.inguild::%name of player%}%.%{_player}%} to true
  372.                             send "&8===================================================" to {_player}
  373.                             send "&eGildia &a%{pvpguild.inguild::%name of player%}% &e wysyla ci zaproszenie" to {_player}
  374.                             send "&eWpisz &a/g accept %{pvpguild.inguild::%name of player%}% &eaby zaakceptowac!" to {_player}
  375.                             send "&8===================================================" to {_player}
  376.                             send "&8==================================================="
  377.                             send "&eZaproszenie zostalo wyslane do &a%{_player}%"
  378.                             send "&8==================================================="
  379.                             wait 1 minute
  380.                             if {pvpguild.inguild::%{_player}%} is not {pvpguild.inguild::%name of player%}:
  381.                                 clear {invite.%{pvpguild.inguild::%name of player%}%.%{_player}%}
  382.                                 stop
  383.                             stop
  384.                         send "{@tag} &cTylko lider/oficer moze zapraszac do gildi!"
  385.                         stop
  386.                     send "{@tag} &cPodaj nick gracza!"
  387.                     stop
  388.                 send "{@tag} Musisz być w gildi!"
  389.                 stop
  390.             send "{@tag} &cNie masz uprawnien do tej komendy!"
  391.             stop   
  392.         if arg 1 is "accept" or "akceptuj" or "acpt":
  393.             if player has permission "pvpguild.accept" or "pvpguild.admin" or "pvpguild.gracz":            
  394.                 if {pvpguild.inguild::%name of player%} isn't set:                         
  395.                     if arg 2 is set:
  396.                         if {pvpguild.guild::%arg 2%} is true:
  397.                             if {invite.%arg 2%.%name of player%} is true:
  398.                                 set {pvpguild.inguild::%name of player%} to "%arg 2%"
  399.                                 clear {invite.%arg 2%.%name of player%}
  400.                                 add "%name of player%" to {pvpguild.%arg 2%.members::*}
  401.                                 broadcast "{@tag} &7%player% &aDolaczyl do gildi &9%arg 2%"
  402.                                 stop
  403.                             send "{@tag} &cNie masz zaproszenia od tej gildi!"
  404.                             stop
  405.                         send "{@tag} &cTaka gildia nie istnieje!"
  406.                         stop
  407.                     send "{@tag} &cPodaj nazwe gildi!"
  408.                     stop
  409.                 send "{@tag} &cNajpierw opusc gildie!"
  410.                 stop
  411.             send "{@tag} &cNie masz uprawnien do tej komendy!"
  412.             stop   
  413.         if arg 1 is "opusc" or "leave" or "lv":
  414.             if player has permission "pvpguild.leave" or "pvpguild.admin" or "pvpguild.gracz":
  415.                 if {pvpguild.inguild::%name of player%} is set:
  416.                     if {pvpguild.%{pvpguild.inguild::%name of player%}%.lider} is player:
  417.                         send "{@tag} &cLider nie moze opuscic klanu! Uzyj: &4/g usun"
  418.                         stop
  419.                     if {pvpguild.%{pvpguild.inguild::%name of player%}%.%name of player%.oficer} is player:
  420.                         remove "%player%" from {pvpguild.%{pvpguild.inguild::%name of player%}%.oficers::*}
  421.                         remove "%player%" from {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}
  422.                         broadcast "{@tag} &7%player% &aOpuscil gildie &9%{pvpguild.inguild::%name of player%}%"
  423.                         clear {pvpguild.inguild::%name of player%}
  424.                         stop                       
  425.                     remove "%player%" from {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}  
  426.                     broadcast "{@tag} &7%player% &aOpuscil gildie &9%{pvpguild.inguild::%name of player%}%"
  427.                     clear {pvpguild.inguild::%name of player%}
  428.                     stop    
  429.                 send "{@tag} &cNie masz gildi!"
  430.                 stop
  431.             send "{@tag} &cNie masz uprawnien do tej komendy!"
  432.             stop
  433.         if arg 1 is "wyrzuc" or "kick" or "idz":
  434.             if player has permission "pvpguild.kick" or "pvpguild.admin" or "pvpguild.gracz":
  435.                 if {pvpguild.inguild::%name of player%} is set:
  436.                     if {pvpguild.%{pvpguild.inguild::%name of player%}%.lider} is player:
  437.                         if arg 2 is set:
  438.                             loop {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}:
  439.                                 loop-value is argument 2:
  440.                                     if {pvpguild.%{pvpguild.inguild::%name of player%}%.%loop-value%.oficer} is loop-value:
  441.                                         clear {pvpguild.%{pvpguild.inguild::%name of player%}%.%argument 2 parsed as offline player%.oficer}
  442.                                         clear {pvpguild.inguild::%name of argument 2 parsed as offline player%}
  443.                                         remove "%argument 2 parsed as player%" from {pvpguild.%{pvpguild.inguild::%name of player%}%.oficers::*}
  444.                                         remove "%argument 2 parsed as player%" from {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}
  445.                                         broadcast "{@tag} &7%arg 2% &aZostal wyzucony z gildi &9%{pvpguild.inguild::%name of player%}% &a przez &c%player%"
  446.                                         stop
  447.                                     clear {pvpguild.inguild::%name of argument 2 parsed as offline player%}
  448.                                     remove "%argument 2 parsed as player%" from {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}
  449.                                     broadcast "{@tag} &7%arg 2% &aZostal wyzucony z gildi &9%{pvpguild.inguild::%name of player%}% &a przez &c%player%"
  450.                                     stop
  451.                             send "{@tag} &cTen gracz nie jest w naszej gildi!"
  452.                             stop
  453.                         send "{@tag} &cPodaj nick gracza!"
  454.                         stop                               
  455.                     if {pvpguild.%{pvpguild.inguild::%name of player%}%.%name of player%.oficer} is player:
  456.                         if arg 2 is set:
  457.                             loop {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}:
  458.                                 loop-value is argument 2 parsed as offline player:
  459.                                     loop-value is not {pvpguild.%{pvpguild.inguild::%name of player%}%.%loop-value%.oficer}:
  460.                                         clear {pvpguild.inguild::%name of argument 2 parsed as offline player%}
  461.                                         remove "%argument 2 parsed as player%" from {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}   
  462.                                         broadcast "{@tag} &7%arg 2% &aZostal wyzucony z gildi &9%{pvpguild.inguild::%name of player%}% &a przez &c%player%"
  463.                                         stop
  464.                                     send "{@tag} &cNie mozesz wyrzucic oficera gildi!"
  465.                                     stop
  466.                             send "{@tag} &cTen gracz nie jest w naszej gildi!"
  467.                             stop
  468.                         send "{@tag} &cPodaj nick gracza!"
  469.                         stop
  470.                     send "{@tag} &cTylko lider/oficer gildi może wyrzucac graczy!"
  471.                     stop
  472.                 send "{@tag} &cNie masz gildi!"
  473.                 stop
  474.             send "{@tag} &cNie masz uprwanien do tej komendy!"
  475.             stop
  476.         if arg 1 is "chat":
  477.             if player has permission "pvpguild.chat" or "pvpguild.admin" or "pvpguild.gracz":          
  478.                 if {pvpguild.inguild::%name of player%} is set:
  479.                     if arg 2 is set:
  480.                         if {pvpguild.%{pvpguild.inguild::%name of player%}%.oficers::*} contain player:
  481.                             loop {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}:
  482.                                 set {_p} to loop-value parsed as player
  483.                                 set {_l} to {pvpguild.%{pvpguild.inguild::%name of player%}%.lider} parsed as player
  484.                                 if arg 3 is set:
  485.                                     set {_} to coloured arg 3
  486.                                 send "&2Guild >> &e*&7%player%: &f%coloured argument 2% %{_}%" to {_p}
  487.                                 send "&2Guild >> &e*&7%player%: &f%coloured argument 2% %{_}%" to {_l}
  488.                             stop
  489.                         if {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*} contain player:
  490.                             loop {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}:
  491.                                 set {_p} to loop-value parsed as player
  492.                                 set {_l} to {pvpguild.%{pvpguild.inguild::%name of player%}%.lider} parsed as player
  493.                                 set {_} to ""
  494.                                 if arg 3 is set:
  495.                                     set {_} to coloured arg 3
  496.                                 send "&2Guild >> &7%player%: &f%coloured argument 2% %{_}%" to {_p}
  497.                                 send "&2Guild >> &7%player%: &f%coloured argument 2% %{_}%" to {_l}
  498.                             stop
  499.                         if {pvpguild.%{pvpguild.inguild::%name of player%}%.lider} is player:
  500.                             if size of {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*} is bigger than 0:
  501.                                 loop {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*}:
  502.                                     set {_p} to loop-value parsed as player
  503.                                     set {_} to ""
  504.                                     if arg 3 is set:
  505.                                         set {_} to coloured arg 3
  506.                                     send "&2Guild >> &e**&7%player%: &f%coloured argument 2% %{_}%" to {_p}
  507.                                     send "&2Guild >> &e**&7%player%: &f%coloured argument 2% %{_}%" to player
  508.                                 stop       
  509.                             send "{@tag} &cW twojej gildi jest za malo czlonkow by wyslac wiadomosc!"
  510.                             stop
  511.                     send "{@tag} &cPodaj wiadomosc!"
  512.                     stop
  513.                 send "{@tag} &cMusisz byc w gildi!"
  514.                 stop
  515.             send "{@tag} &cNie masz uprwanien do tej komendy!"
  516.             stop
  517.         if arg 1 is "oficer":
  518.             if player has permission "pvpguild.oficer" or "pvpguild.admin" or "pvpguild.gracz":
  519.                 if {pvpguild.inguild::%name of player%} is set:
  520.                     if {pvpguild.%{pvpguild.inguild::%name of player%}%.lider} is player:
  521.                         if arg 2 is set:
  522.                             set {_p} to arg 2 parsed as player
  523.                             if {pvpguild.%{pvpguild.inguild::%name of player%}%.lider} is not {_p}:
  524.                                 if {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*} contain {_p}:
  525.                                     if {pvpguild.%{pvpguild.inguild::%name of player%}%.%{_p}%.oficer} is not set:
  526.                                         add "%{_p}%" to {pvpguild.%{pvpguild.inguild::%name of player%}%.oficers::*}
  527.                                         set {pvpguild.%{pvpguild.inguild::%name of player%}%.%{_p}%.oficer} to {_p}
  528.                                         send "{@tag} &aGracz &6%{_p}% &ajest oficerem naszej gildi!"
  529.                                         stop
  530.                                     send "{@tag} &cTen gracz jest juz oficerem!"
  531.                                     stop
  532.                                 send "{@tag} &cTen gracz nie jest w naszej gildi!"
  533.                                 stop
  534.                             send "{@tag} &cLider nie moze zostac oficerem!"
  535.                             stop
  536.                         send "{@tag} &cPodaj nick gracza!"
  537.                         stop
  538.                     send "{@tag} &cTylko lider moze mianowac graczy!"
  539.                     stop
  540.                 send "{@tag} &cNie jestes w gildi!"
  541.                 stop
  542.             send "{@tag} &cNie masz uprwanien do tej komendy!"
  543.             stop       
  544.         if arg 1 is "pvp":
  545.             if player has permission "pvpguild.pvp" or "pvpguild.admin" or "pvpguild.gracz":
  546.                 if {pvpguild.inguild::%name of player%} is set:
  547.                     if {pvpguild.%{pvpguild.inguild::%name of player%}%.lider} is player:
  548.                         if {pvpguild.%{pvpguild.inguild::%name of player%}%.pvp} is not set:
  549.                             set {pvpguild.%{pvpguild.inguild::%name of player%}%.pvp} to false
  550.                         if {pvpguild.%{pvpguild.inguild::%name of player%}%.pvp} is false:
  551.                             set {pvpguild.%{pvpguild.inguild::%name of player%}%.pvp} to true
  552.                             send "{@tag} &AWlaczyles pvp miedzy czlonkami gildii!"
  553.                             stop
  554.                         if {pvpguild.%{pvpguild.inguild::%name of player%}%.pvp} is true:
  555.                             set {pvpguild.%{pvpguild.inguild::%name of player%}%.pvp} to false
  556.                             send "{@tag} &AWylaczyles pvp miedzy czlonkami gildii!"
  557.                             stop   
  558.                         stop
  559.                     send "{@tag} Tylko lider moze wylaczac pvp!"
  560.                     stop
  561.                 send "{@tag} &cNie posiadasz gildii!"
  562.                 stop
  563.             send "{@tag} &cNie masz uprwanien do tej komendy!"
  564.             stop   
  565.         if arg 1 is "degrad" or "degraduj":
  566.             if player has permission "pvpguild.degrad" or "pvpguild.admin" or "pvpguild.gracz":
  567.                 if {pvpguild.inguild::%name of player%} is set:
  568.                     if {pvpguild.%{pvpguild.inguild::%name of player%}%.lider} is player:
  569.                         if arg 2 is set:
  570.                             set {_p} to arg 2 parsed as player
  571.                             if {pvpguild.%{pvpguild.inguild::%name of player%}%.lider} is not {_p}:
  572.                                 if {pvpguild.%{pvpguild.inguild::%name of player%}%.members::*} contain {_p}:
  573.                                     if {pvpguild.%{pvpguild.inguild::%name of player%}%.%{_p}%.oficer} is {_p}:
  574.                                         remove "%{_p}%" from {pvpguild.%{pvpguild.inguild::%name of player%}%.oficers::*}
  575.                                         delete {pvpguild.%{pvpguild.inguild::%name of player%}%.%{_p}%.oficer}
  576.                                         send "{@tag} &aGracz &6%{_p}% &azostal zdegradowany z oficera naszej gildi!"
  577.                                         stop
  578.                                     send "{@tag} &cTen gracz nie jest oficerem!"
  579.                                     stop
  580.                                 send "{@tag} &cTen gracz nie jest w naszej gildi!"
  581.                                 stop
  582.                             send "{@tag} &cLider nie moze byc zdegradowany!"
  583.                             stop
  584.                         send "{@tag} &cPodaj nick gracza!"
  585.                         stop
  586.                     send "{@tag} &cTylko lider moze mianowac graczy!"
  587.                     stop
  588.                 send "{@tag} &cNie jestes w gildi!"
  589.                 stop
  590.             send "{@tag} &cNie masz uprwanien do tej komendy!"
  591.             stop       
  592.         send "{@tag} &cNieznana komenda! Wpisz &6/g pomoc &c aby uzyskac wszystkie komendy!"
  593.         stop
  594.        
  595.        
  596. on damage of player:
  597.     if {pvpguild.inguild::%name of attacker%} is set:
  598.         if {pvpguild.inguild::%name of victim%} is set:
  599.             if {pvpguild.%{pvpguild.inguild::%name of attacker%}%.members::*} contain victim:
  600.                 if {pvpguild.%{pvpguild.inguild::%name of attacker%}%.pvp} is false:
  601.                     cancel event
  602.                     stop
  603.             if {pvpguild.%{pvpguild.inguild::%name of victim%}%.members::*} contain attacker:
  604.                 if {pvpguild.%{pvpguild.inguild::%name of victim%}%.pvp} is false:
  605.                     cancel event
  606.                     stop
  607.  
  608.  
  609. on chat:
  610.     if {pvpguild.inguild::%name of player%} is set:
  611.         cancel event
  612.         set {_chat} to "{@chat}"
  613.         replace all "{TAG}" with "%{pvpguild.%{pvpguild.inguild::%name of player%}%.tag}%" in {_chat}
  614.         replace all "{NICK}" with "%name of player%" in {_chat}
  615.         replace all "{MSG}" with "%message%" in {_chat}
  616.         broadcast "%{_chat}%"
  617.         stop
Advertisement
Add Comment
Please, Sign In to add comment