Seekeer

FIRMA+ListaFIRM+ListaZATRUDNIONYCH v.1.0.0

Feb 16th, 2014
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 12.63 KB | None | 0 0
  1. #==========[FIRMAPRO]==========#
  2. #Autor: TheSeekeer_PL          #
  3. #Nazwa: FirmaPro               #
  4. #Wersja: 1.0.0                 #
  5. #==========[FIRMAPRO]==========#
  6.  
  7. #Zmienne#
  8. variables:
  9.     #Zmienna ZALOZ  +  #
  10.     {firma.zaloz.%player%} = 0
  11.     #Zmienna USUN  +  #
  12.     {firma.usun.%player%} = 1
  13.     #Zmienna Wlasciciel  +  #
  14.     {firma.wlasciciel.%player%} = 0
  15.     #Zmienna Prezes  +  #
  16.     {firma.prezes.%player%} = 0
  17.     #Zmienna Ksiegowy  +  #
  18.     {firma.ksiegowy.%player%} = 0
  19.     #Zmienna Dostawca  +  #
  20.     {firma.dostawca.%player%} = 0
  21.     #Zmienna Sprzedawca  +  #
  22.     {firma.sprzedawca.%player%} = 0
  23.     #Zmienna Kopacz  +  #
  24.     {firma.kopacz.%player%} = 0
  25.     #Zmienna Wyplata#
  26.     {firma.wyplata.%player%} = 0
  27.     #Zmienna Region  +  #
  28.     {firma.region.%player%} = 0
  29.     #Zmienna Materialy  +  #
  30.     {firma.materialy.%player%} = 0
  31.    
  32. #Opcje#
  33. options:
  34.     tag: &8[&6RC&8]&r
  35.     zaloz: Wlasnie zakladasz firme.
  36.     nzaloz: Nie podales nazwy firmy !
  37.     izaloz: Taka firma juz istnieje !
  38.     wzaloz: Posiadasz juz firme !
  39.     usun: Usuwasz firme !
  40.     nusun: Nie mozesz usunac firmy poniewaz jej nie posiadasz !
  41.     nazwa: Wlasnie zmieniasz nazwe firmy !
  42.     nnazwa: Nie mozesz zmienic juz nazwy poniewaz zrobiles to wczesniej!
  43.     inazwa: Taka nazwa jest juz zajeta!
  44.     wlasciciel: Wlasnie mianowales gracza %arg 2% na wlasciciela!
  45.     prezes: Wlasnie mianowales gracza %arg 3% na prezesa!
  46.     ksiegowy: Wlasnie mianowales gracza %arg 3% na ksiegowego!
  47.     dostawca: Wlasnie mianowales gracza %arg 3% na dostawce!
  48.     sprzedawca: Wlasnie mianowales gracza %arg 3% na sprzedawce!
  49.     kopacz: Wlasnie mianowales gracza %arg 3% na kopacza!
  50.     wyplata: Wlasnie dales wyplate graczowi %arg 2%!
  51.     sprzedaj: Wlasnie sprzedales firme graczowi %arg 2% za cene : %arg 3%.
  52.    
  53. #KOD#
  54. command /firma [<text>] [<text>] [<text>]:
  55.     trigger:
  56.         if arg 1 is not set:
  57.             send "{@tag} Nie wybrales komendy !"
  58.             send "{@tag} Komendy znajdziesz pod : &a/firma pomoc"
  59.             stop
  60. #Zaloz#        
  61.         if arg 1 is "zaloz":
  62.             if arg 2 is not set:
  63.                 send "{@tag} {@nzaloz}"
  64.                 stop
  65.             if arg 2 is set:
  66.                 if {firma.zaloz.%player%} is 0:
  67.                     {firma.zaloz.%arg 2%} is not set:
  68.                         send "{@tag} {@zaloz}"
  69.                         add "%arg 2%" to {firma.zaloz.list::*}
  70.                         execute console command "pex user %player% prefix &8[&b%arg 2%&8][&fGracz&8]&r"
  71.                         execute console command "pex user %player% add firma.wlasciciel"
  72.                         execute console command "pex user %player% add firma.usun"
  73.                         execute console command "pex user %player% add firma.pracownicy"
  74.                         execute console command "pex user %player% add firma.region"
  75.                         set {firma.zaloz.%player%} to 1
  76.                         set {firma.usun.%player%} to 0
  77.                         stop
  78.                     {firma.zaloz.%arg 2%} is set:
  79.                         send "{@tag} {@inazwa}"
  80.                         stop
  81.                 if {firma.zaloz.%player%} is 1:
  82.                     send "{@tag} {@wzaloz}"
  83.                     stop   
  84. #Wlasciciel#                   
  85.         if arg 1 is "wlasciciel":
  86.             if player has permission "firma.wlasciciel":
  87.                 if arg 2 is not set:
  88.                     send "{@tag} Nie podales nazwy firmy!"
  89.                 if arg 2 is set:
  90.                     if arg 3 is set:
  91.                         if {firma.wlasciciel.%player%} is 0:
  92.                             {firma.wlasciciel.%arg 3%} is not set:
  93.                                 send "{@tag} Przydzieliles Wlasciciela Firmy graczowi %arg 3%"
  94.                                 execute console command "pex user %arg 3% prefix &8[&2W&8][&b%arg 2%&8][&fGracz&8]&r"
  95.                                 add "%arg 3%" to {firma.wlasciciel.%arg 2%.list::*}
  96.                                 set {firma.wlasciciel.%player%} to 1
  97.                                 stop
  98.                             {firma.wlasciciel.%arg 3%} is set:
  99.                                 send "{@tag} Ta osoba jest juz wlascicielem tej firmy"
  100.                                 stop
  101.                         if {firma.wlasciciel.%player%} is 1:
  102.                             send "{@tag} Ta firma posiada juz wlasciciela"
  103.                             stop
  104.                     if arg 3 is not set:
  105.                         send "{@tag} Nie podales nazwy gracza"
  106.                         stop
  107.             else:
  108.                 send "{@tag} Nie posiadasz uprawnien do tej komendy"
  109.                 stop
  110. #List#             
  111.         if arg 1 is "list":
  112.             if arg 2 is not set:
  113.                 send "{@tag} Lista firm:"
  114.                 send "%{firma.zaloz.list::*}%"
  115.                 send "Lista pracownikow danej firmy: &a/firma list <nazwa firmy>"
  116.                 stop
  117.             if arg 2 is set:
  118.                 send "&lWlasciciel:&r  %{firma.wlasciciel.%arg 2%.list::*}%"
  119.                 send "&lPrezes:&r  %{firma.prezes.%arg 2%.list::*}%"
  120.                 send "&lKsiegowy:&r  %{firma.ksiegowy.%arg 2%.list::*}%"
  121.                 send "&lDostawca:&r  %{firma.dostawca.%arg 2%.list::*}%"
  122.                 send "&lSprzedawca:&r  %{firma.sprzedawca.%arg 2%.list::*}%"
  123.                 send "&lKopacz:&r  %{firma.kopacz.%arg 2%.list::*}%"
  124.                 stop
  125. #usun#             
  126.         if arg 1 is "usun":
  127.             if arg 2 is not set:
  128.                 send "{@tag} Podaj nazwe swojej firmy !"
  129.             if arg 2 is set:
  130.                 if {firma.usun.%player%} is 0:
  131.                     send "{@tag} Zanim usuniesz firme usun pracowników!"
  132.                     send "&a/usun wlasciciel <nick>"
  133.                     send "&a/usun prezes <nick>"
  134.                     send "&a/usun ksiegowy <nick>"
  135.                     send "&a/usun dostawca <nick>"
  136.                     send "&a/usun sprzedawca <nick>"
  137.                     send "&a/usun kopacz <nick>"
  138.                     send "&cStosuj kolejke ! Zaczynaj od usuwania wlasciciela !!!"
  139.                     stop
  140.             if arg 2 is "Wlasciciel":
  141.                 if arg 3 is set:
  142.                     send "Usuwasz wlasciciela firmy !"
  143.                     execute console command "pex user %arg 3% prefix &f[&8Gracz&f]&r"
  144.                     stop
  145.                 if arg 3 is not set:
  146.                     send "{@tag} Podaj nick Wlasciciela !"
  147.                     stop
  148.             if arg 2 is "Prezes":
  149.                 if arg 3 is set:
  150.                     send "Usuwasz Prezesa firmy"
  151.                     execute console command "pex user %arg 3% prefix &f[&8Gracz&f]&r"
  152.                     stop
  153.                 if arg 3 is not set:
  154.                     send "{@tag} Podaj nick Prezesa !"
  155.                     stop
  156.             if arg 2 is "Ksiegowy":
  157.                 if arg 3 is set:
  158.                     send "Usuwasz Ksiegowego firmy"
  159.                     execute console command "pex user %arg 3% prefix &f[&8Gracz&f]&r"
  160.                     stop
  161.                 if arg 3 is not set:
  162.                     send "{@tag} Podaj nick Ksiegowego !"
  163.                     stop
  164.             if arg 2 is "Dostawca":
  165.                 if arg 3 is set:
  166.                     send "Usuwasz Dostawce firmy"
  167.                     execute console command "pex user %arg 3% prefix &f[&8Gracz&f]&r"
  168.                     stop
  169.                 if arg 3 is not set:
  170.                     send "{@tag} Podaj nick Dostawcy !"
  171.                     stop
  172.             if arg 2 is "Sprzedawca":
  173.                 if arg 3 is set:
  174.                     send "Usuwasz Sprzedawce firmy"
  175.                     execute console command "pex user %arg 3% prefix &f[&8Gracz&f]&r"
  176.                     stop
  177.                 if arg 3 is not set:
  178.                     send "{@tag} Podaj nick Sprzedawcy !"
  179.                     stop
  180.             if arg 2 is "Kopacz":
  181.                 if arg 3 is set:
  182.                     send "Usuwasz Kopacza firmy"
  183.                     execute console command "pex user %arg 3% prefix &f[&8Gracz&f]&r"
  184.                     stop
  185.                 if arg 3 is not set:
  186.                     send "{@tag} Podaj nick Kopacza !"
  187.                     stop
  188.             if arg 2 is "firme":
  189.                 if arg 3 is set:
  190.                     {firma.zaloz.list::*} is set:
  191.                         remove "%arg 3%" from {firma.zaloz.list::*}
  192.                         execute console command "pex user %player% prefix &f[&8Gracz&f]&r"
  193.                         set {firma.usun.%player%} to 1
  194.                         set {firma.zaloz.%player%} to 0
  195.                         set {firma.nazwa.%player%} to 0
  196.                         set {firma.region.%player%} to 0
  197.                         execute console command "pex user %player% remove firma.wlasciciel"
  198.                         execute console command "pex user %player% remove firma.usun"
  199.                         execute console command "pex user %player% remove firma.region"
  200.                         execute console command "pex user %player% remove firma.pracownicy"
  201.                         stop
  202. #Region#                       
  203.         if arg 1 is "region":
  204.             if player has permission "frima.region":
  205.                 if arg 2 is set:
  206.                     if {firma.region.%player%} is 0:
  207.                         {firma.region.%arg 2%.list} is not set:
  208.                             execute player command "warp firma"
  209.                             execute console command "rg addowner %arg 2% %player%"
  210.                             set {firma.region.%player%} to 1
  211.                             stop
  212.                         {firma.region.%arg 2%.list} is set:
  213.                             send "Ten region jest zajety!!"
  214.                     if {firma.region.%player%} is 1:
  215.                         send "Ty i twoja firma posiadacie juz region!I nie mozecie juz wiecej !"
  216.                         stop
  217.                 if arg 2 is not set:
  218.                     send "Regiony:"
  219.                     send "1,2,3,4,5,6,7,8,9,10"
  220.                     send "Wiecej regionów aktualnie nie potrzeba!"
  221.                     stop
  222. #Prezes#                   
  223.         if arg 1 is "prezes":
  224.             if player has permission "firma.pracownicy":
  225.                 if arg 2 is set:
  226.                     if arg 3 is set:
  227.                         if {firma.prezes.%player%} is 0:
  228.                             {firma.prezes.%arg 2%.list::*} is not set:
  229.                                 add "%arg 3%" to {firma.prezes.%arg 2%.list::*}
  230.                                 send "{@tag} {@prezes}"
  231.                                 execute console command "pex user %arg 3% prefix &8[&fP&8][&b%arg 2%&8][&fGracz&8]&r"
  232.                                 set {firma.prezes.%player%} to 1
  233.                                 stop
  234.                             {firma.prezes.%arg 2%.list::*} is set:
  235.                                 send "{@tag} Ta osoba jest juz Prezesem firmy !"
  236.                                 stop
  237.                         if {firma.prezes.%player%} is 1:
  238.                             send "{@tag} Ta firma posiada juz prezesa"
  239.                             stop
  240.                     if arg 3 is not set:
  241.                         send "{@tag} Podaj nick gracza !!"
  242.                         stop
  243.                 if arg 2 is not set:
  244.                     send "{@tag} Nie podales nazwy firmy !"
  245.                     stop
  246.             else:
  247.                 send "{@tag} Nie posiadasz uprawnien do wykonania tego polecenia"
  248.                 stop
  249. #Ksiegowy#             
  250.         if arg 1 is "ksiegowy":
  251.             if player has permission "firma.pracownicy":
  252.                 if arg 2 is set:
  253.                     if arg 3 is set:
  254.                         if {firma.ksiegowy.%player%} is 0:
  255.                             {firma.ksiegowy.%arg 2%.list::*} is not set:
  256.                                 add "%arg 3%" to {firma.ksiegowy.%arg 2%.list::*}
  257.                                 send "{@tag} {@ksiegowy}"
  258.                                 execute console command "pex user %arg 3% prefix &8[&fKS&8][&b%arg 2%&8][&fGracz&8]&r"
  259.                                 set {firma.ksiegowy.%player%} to 1
  260.                                 stop
  261.                             {firma.ksiegowy.%arg 2%.list::*} is set:
  262.                                 send "{@tag} Ta osoba jest juz ksiegowym firmy !"
  263.                                 stop
  264.                         if {firma.ksiegowy.%player%} is 1:
  265.                             send "{@tag} Ta firma posiada juz ksiegowego"
  266.                             stop
  267.                     if arg 3 is not set:
  268.                         send "{@tag} Podaj nick gracza !!"
  269.                         stop
  270.                 if arg 2 is not set:
  271.                     send "{@tag} Nie podales nazwy firmy !"
  272.                     stop
  273.             else:
  274.                 send "{@tag} Nie posiadasz uprawnien do wykonania tego polecenia"
  275.                 stop
  276. #Dostawca#             
  277.         if arg 1 is "dostawca":
  278.             if player has permission "firma.pracownicy":
  279.                 if arg 2 is set:
  280.                     if arg 3 is set:
  281.                         if {firma.dostawca.%player%} is 0:
  282.                             {firma.dostawca.%arg 2%.list::*} is not set:
  283.                                 add "%arg 3%" to {firma.dostawca.%arg 2%.list::*}
  284.                                 send "{@tag} {@dostawca}"
  285.                                 execute console command "pex user %arg 3% prefix &8[&fD&8][&b%arg 2%&8][&fGracz&8]&r"
  286.                                 set {firma.dostawca.%player%} to 1
  287.                                 stop
  288.                             {firma.dostawca.%arg 2%.list::*} is set:
  289.                                 send "{@tag} Ta osoba jest juz Dostawca firmy !"
  290.                                 stop
  291.                         if {firma.dostawca.%player%} is 1:
  292.                             send "{@tag} Ta firma posiada juz dostawca"
  293.                             stop
  294.                     if arg 3 is not set:
  295.                         send "{@tag} Podaj nick gracza !!"
  296.                         stop
  297.                 if arg 2 is not set:
  298.                     send "{@tag} Nie podales nazwy firmy !"
  299.                     stop
  300.             else:
  301.                 send "{@tag} Nie posiadasz uprawnien do wykonania tego polecenia"
  302.                 stop
  303. #Sprzedawca#               
  304.         if arg 1 is "sprzedawca":
  305.             if player has permission "firma.pracownicy":
  306.                 if arg 2 is set:
  307.                     if arg 3 is set:
  308.                         if {firma.sprzedawca.%player%} is 0:
  309.                             {firma.sprzedawca.%arg 2%.list::*} is not set:
  310.                                 add "%arg 3%" to {firma.sprzedawca.%arg 2%.list::*}
  311.                                 send "{@tag} {@sprzedawca}"
  312.                                 execute console command "pex user %arg 3% prefix &8[&fS&8][&b%arg 2%&8][&fGracz&8]&r"
  313.                                 set {firma.sprzedawca.%player%} to 1
  314.                                 stop
  315.                             {firma.sprzedawca.%arg 2%.list::*} is set:
  316.                                 send "{@tag} Ta osoba jest juz Sprzedawca firmy !"
  317.                                 stop
  318.                         if {firma.sprzedawca.%player%} is 1:
  319.                             send "{@tag} Ta firma posiada juz sprzedawca"
  320.                             stop
  321.                     if arg 3 is not set:
  322.                         send "{@tag} Podaj nick gracza !!"
  323.                         stop
  324.                 if arg 2 is not set:
  325.                     send "{@tag} Nie podales nazwy firmy !"
  326.                     stop
  327.             else:
  328.                 send "{@tag} Nie posiadasz uprawnien do wykonania tego polecenia"
  329.                 stop
  330. #Kopacz#               
  331.         if arg 1 is "kopacz":
  332.             if player has permission "firma.pracownicy":
  333.                 if arg 2 is set:
  334.                     if arg 3 is set:
  335.                         if {firma.kopacz.%player%} is 0:
  336.                             {firma.kopacz.%arg 2%.list::*} is not set:
  337.                                 add "%arg 3%" to {firma.kopacz.%arg 2%.list::*}
  338.                                 send "{@tag} {@kopacz}"
  339.                                 execute console command "pex user %arg 3% prefix &8[&fP&8][&b%arg 2%&8][&fGracz&8]&r"
  340.                                 set {firma.kopacz.%player%} to 1
  341.                                 stop
  342.                             {firma.kopacz.%arg 2%.list::*} is set:
  343.                                 send "{@tag} Ta osoba jest juz Kopaczem firmy !"
  344.                                 stop
  345.                         if {firma.kopacz.%player%} is 1:
  346.                             send "{@tag} Ta firma posiada juz kopacza"
  347.                             stop
  348.                     if arg 3 is not set:
  349.                         send "{@tag} Podaj nick gracza !!"
  350.                         stop
  351.                 if arg 2 is not set:
  352.                     send "{@tag} Nie podales nazwy firmy !"
  353.                     stop
  354.             else:
  355.                 send "{@tag} Nie posiadasz uprawnien do wykonania tego polecenia"
  356.                 stop               
  357. #Materialy#
  358.         if arg 1 is "materialy":
  359.             if player has permission "firma.pracownicy":
  360.                 if {firma.materialy.%player%} is 0:
  361.                     execute console command "kit narzedzia %player%"
  362.                     set {firma.materialy.%player%} to 1
  363.                     stop
  364.                 if {firma.materialy.%player%} is 1:
  365.                     send "{@tag} Nie mozesz juz!"
  366.                     stop
Advertisement
Add Comment
Please, Sign In to add comment