Seekeer

FIRMA_PRO

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