patison234

PVPGuild 1.5.1

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