Guest User

xBot Wersja: 2.0

a guest
Feb 22nd, 2015
687
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. variables:
  2.     {chat} = true
  3.     {zglos.%player%} = false
  4.     {zbanowany.%player%} = false       
  5. command /xbot [<text>] [<text>] [<player>]:
  6.         usage: /xBot
  7.         trigger:
  8.             if player has permission "xbot.admin":
  9.                         if arg 1 is "gracz":
  10.                                 send ""
  11.                                 send "&6/zglos <nick> - Zglasza chetera."
  12.                                 send "&6/bug <opis> - Zglasza jakis bug."
  13.                                 send "&6/zapytaj <pytanie> - Pytanie do administracji."
  14.                         if arg 1 is "auto":
  15.                                 send ""
  16.                                 send "&6xBot ma wbudowana anty-reklame tzn. Gdy ktos probuje"
  17.                                 send "&6reklamowac xBot to blokuje."
  18.                                 send "&6Ma on rowniez funkcje automatycznego odpowiadania na pytania. (z bazy)"
  19.                                 send "&6Gdy gracz napisze /pytanie <pytanie> otrzyma odpowiedz."
  20.                                 send "&6Ma tez system zglaszania cheterow (/zglos <nick>)."
  21.                         if arg 1 is not set:
  22.                                 send ""
  23.                                 send "&6/xbot czysc - Czysci zgloszenia cheterow, bugow i pytan."
  24.                                 send "&6/xbot auto - Automatyczne funkcje xBota."
  25.                                 send "&6/xbot autor - Informacje o autorze."
  26.                                 send "&6/xbot chat off - Wylacza chat."
  27.                                 send "&6/xbot chat on - Wlacza chat."
  28.                                 send "&6/xbot chat czysc - Czysci chat."
  29.                                 send "&6/xbot echest otworz NICK - Otwiera enderchest gracza."
  30.                                 send "&6/xbot echest czysc NICK - Czysci enderchest gracza."
  31.                                 send "&6/xbot ekwipunek otworz NICK - Otwiera ekwipunek gracza."
  32.                                 send "&6/xbot ekwipunek czysc NICK - Czysci ekwipunek gracza."
  33.                                 send "&6/xbot gracz - Komendy gracza. ( xbot.gracz )"
  34.                         if arg 1 is "czysc":
  35.                                 delete folder "plugins/xBot"
  36.                                 delete file "plugins/xBot/ktoreklamowal.yml"
  37.                                 delete file "plugins/xBot/zgloszeniagraczy.yml"
  38.                                 delete file "plugins/xBot/zgloszeniabugow.yml"
  39.                                 delete file "plugins/xBot/config.yml"
  40.                                 delete file "plugins/xBot/pytaniabezodpowiedzi.yml"
  41.                                 execute player command "sk reload all"
  42.                                 send "&6Wyczyszczono zgloszenia i informacje z folderu &cxBot&6."      
  43.                         if arg 1 is "autor":
  44.                                 send "&6Autorem jest &cIxidi&6."
  45.                         if arg 1 is "echest":
  46.                                 if arg 2 is not set:
  47.                                         send ""
  48.                                         send "&6/xbot echest otworz NICK - Otwiera enderchest gracza."
  49.                                         send "&6/xbot echest czysc NICK - Czysci enderchest gracza."
  50.                                 if arg 2 is "otworz":
  51.                                         if arg 3 is set:
  52.                                                 open the arg-player's ender chest to the player
  53.                                                send "&6To jest enderchest gracza &c%arg 3%&6."
  54.                                        else:
  55.                                                send "&4BLAD: &cPodaj nick gracza."
  56.                                if arg 2 is "czysc":
  57.                                        if arg 3 is set:
  58.                                                loop all items in arg-player's enderchest:
  59.                                                         clear loop-item
  60.                                                 send "&6Wyczyszczono enderchest gracza &c%arg-player%&6."
  61.                                         else:
  62.                                                 send "&4BLAD: &cPodaj nick gracza."
  63.                         if arg 1 is "ekwipunek":
  64.                                 if arg 2 is not set:
  65.                                         send ""
  66.                                         send "&6/xbot ekwipunek otworz NICK - Otwiera ekwipunek gracza."
  67.                                         send "&6/xbot ekwipunek czysc NICK - Czysci ekwipunek gracza."
  68.                                 if arg 2 is "otworz":
  69.                                         if arg 3 is set:
  70.                                                 open the arg-player's inventory to the player
  71.                                                send "&6To jest ekwipunek gracza &c%arg 3%&6."
  72.                                        else:
  73.                                                send "&4BLAD: &cPodaj nick gracza."
  74.                                if arg 2 is "czysc":
  75.                                        if arg 3 is set:
  76.                                                loop all items in arg-player's inventory:
  77.                                                         clear loop-item
  78.                                                 send "&6Wyczyszczono ekwipunek gracza &c%arg-player%&6."
  79.                                         else:
  80.                                                 send "&4BLAD: &cPodaj nick gracza."
  81.                         if arg 1 is "chat":
  82.                                 if arg 2 is not set:
  83.                                         send ""
  84.                                         send "&6/xbot chat czysc - Czysci chat."
  85.                                         send "&6/xbot chat off - Wylacza chat."
  86.                                         send "&6/xbot chat on - Wlacza chat."
  87.                                 if arg 2 is "on":
  88.                                         if {chat} is false:
  89.                                                 set {chat} to true
  90.                                                 broadcast ""
  91.                                                 broadcast "&aChat zostal wlaczaony."
  92.                                                 broadcast ""
  93.                                         else:
  94.                                                 send "&4BLAD: &cChat jest wlaczaony."
  95.                                 if arg 2 is "off":
  96.                                         if {chat} is true:
  97.                                                 set {chat} to false
  98.                                                 broadcast ""
  99.                                                 broadcast "&cChat zostal wylaczaony."
  100.                                                 broadcast ""
  101.                                         else:
  102.                                                 send "&4BLAD: &cChat jest wylaczaony."
  103.                                 if arg 2 is "czysc":
  104.                                         loop 100 times:
  105.                                                 broadcast ""
  106.                                         broadcast "&9Chat zostal wyczyszczony."
  107.                                         broadcast ""
  108.                 else:
  109.                         send "&4Brak uprawnien..."
  110.                         if arg 1 is "cheater":
  111.                                 if arg 2 is not set:
  112.                                         send ""
  113.                                         send "&c================================================================="
  114.                                         send "&6/xbot cheater sprawdz <nick> - Sprawdza gracza."
  115.                                         send "&6/xbot cheater ustawcheatera - Ustawia punkt klatki cheatera."
  116.                                         send "&6/xbot cheater ustawspawn - Ustaw spawn gry."
  117.                                         send "&6/xbot cheater czysty <nick> - Uznaje gracza za czystego"
  118.                                         send "&6/xbot cheater zbanuj <nick> - banuje cheatera."
  119.                                         send "&6/xbot cheater odbanuj <nick> - odbanowuje cheatera."
  120.                                         send "&c================================================================="         
  121.                                 if arg 2 is "sprawdz":
  122.                                         if arg 3 is set:
  123.                                                 teleport player to {lokacja.cheater}
  124.                                                 teleport arg 3 to {lokacja.cheater}
  125.                                                 set {_ipts} to single value "ipteamspeak" get of "plugins/xBot/config.yml"
  126.                                                 broadcast ""
  127.                                                 broadcast "&c%arg 3% &6jestes podejrzany o cheaty."
  128.                                                 broadcast "&6Wbij na TS3 IP: &c%{_ipts}%"
  129.                                                 broadcast "&6Masz na to &4&l5 MINUT"
  130.                                                 broadcast "&6Logniecie = &4&lPERM BAN"
  131.                                                 broadcast ""
  132.                                 if arg 2 is "czysty":
  133.                                         if arg 3 is set:
  134.                                                 teleport player to {lokacja.spawn}
  135.                                                 teleport arg 3 to {lokacja.spawn}
  136.                                                 broadcast ""
  137.                                                 broadcast "&c%arg 3% &6nie posiada cheatow."
  138.                                                 broadcast ""
  139.                                 if arg 2 is "zbanuj":
  140.                                         if arg 3 is set:
  141.                                                 teleport player to {lokacja.spawn}
  142.                                                 broadcast ""
  143.                                                 broadcast "&c%arg 3% &6uzywa cheatow!"
  144.                                                 broadcast "&cZostaje on zbanowany!"
  145.                                                 broadcast ""
  146.                                                 kick the player-argument due to "&4Zostales zbanowany za uzywanie cheatow."
  147.                                                 set {zbanowany.%arg 3%} to true
  148.                                 if arg 2 is "odbanuj":
  149.                                         if arg 3 is set:
  150.                                                 send "&6Odbanowales &c%arg 3%"
  151.                                                 set {zbanowany.%arg 3%} to false                                                                       
  152.                                 if arg 2 is "ustawcheatera":
  153.                                         set {lokacja.cheater} to location of player
  154.                                         send "&6Ustawiles punkt spawnu klatki cheatera."
  155.                                 if arg 2 is "ustawspawn:
  156.                                         set {lokacja.spawn} to location of player
  157.                                         send "&6Ustawiles punkt spawnu."                                           
  158.             else:
  159.                 send "&4Brak uprawnien..."
  160.                        
  161.  
  162. command /zglos [<player>]:
  163.        trigger:
  164.                if player has permission "xbot.gracz":
  165.                        if {zglos.%player%} is false:
  166.                                if arg 1 is not set:
  167.                                        send "&cPoprawne uzycie: &7/zglos <nick>"
  168.                                if arg 1 is set:
  169.                                        wf "## Gracz %player% zglosil gracza %arg 1%. ##" to "plugins/xBot/zgloszeniagraczy.yml"
  170.                                        send "&6Zglosiles gracza &c%arg 1%&6."
  171.                                        set {zglos.%player%} to true
  172.                                        wait 5 minutes
  173.                                        set {zglos.%player%} to false
  174.                        else:
  175.                                send "&cPoczekaj przez zgloszeniem kolejnej osoby lub buga."                          
  176.                else:
  177.                        send "&4Brak uprawnien..."
  178. command /bug [<text>]:
  179.        trigger:
  180.                if player has permission "xbot.gracz":
  181.                        if {zglos.%player%} is false:
  182.                                if arg 1 is not set:
  183.                                        send "&cPoprawne uzycie: &7/bug <opisbuga>"
  184.                                if arg 1 is set:
  185.                                        wf "## Gracz %player% zglosil buga. Opis %arg 1%. ##" to "plugins/xBot/zgloszeniabugow.yml"
  186.                                        send "&6Zglosiles buga! Opis: &c%arg 1%&6."
  187.                                        set {zglos.%player%} to true
  188.                                        wait 5 minutes
  189.                                        set {zglos.%player%} to false
  190.                        else:
  191.                                send "&cPoczekaj przez zgloszeniem kolejnej osoby lub buga."                          
  192.                else:
  193.                        send "&4Brak uprawnien..."              
  194. command /zapytaj [<text>]:
  195.        trigger:
  196.                if player has permission "xbot.gracz":
  197.                        if arg 1 is not set:
  198.                                send "&cPoprawne uzycie: &7/zapytaj <pytanie>"
  199.                        if arg 1 is set:
  200.                                set {_p1} to single value "pytanie1" get of "plugins/xBot/config.yml"
  201.                                set {_p2} to single value "pytanie2" get of "plugins/xBot/config.yml"
  202.                                set {_p3} to single value "pytanie3" get of "plugins/xBot/config.yml"
  203.                                set {_p4} to single value "pytanie4" get of "plugins/xBot/config.yml"
  204.                                set {_p5} to single value "pytanie5" get of "plugins/xBot/config.yml"
  205.                                set {_p6} to single value "pytanie6" get of "plugins/xBot/config.yml"
  206.                                set {_p7} to single value "pytanie7" get of "plugins/xBot/config.yml"
  207.                                set {_p8} to single value "pytanie8" get of "plugins/xBot/config.yml"
  208.                                set {_p9} to single value "pytanie9" get of "plugins/xBot/config.yml"
  209.                                set {_p10} to single value "pytanie10" get of "plugins/xBot/config.yml"
  210.                                set {_p11} to single value "pytanie11" get of "plugins/xBot/config.yml"
  211.                                set {_p12} to single value "pytanie12" get of "plugins/xBot/config.yml"
  212.                                set {_p13} to single value "pytanie13" get of "plugins/xBot/config.yml"
  213.                                set {_p14} to single value "pytanie14" get of "plugins/xBot/config.yml"
  214.                                set {_p15} to single value "pytanie15" get of "plugins/xBot/config.yml"
  215.                                set {_o1} to single value "odp1" get of "plugins/xBot/config.yml"
  216.                                set {_o2} to single value "odp2" get of "plugins/xBot/config.yml"
  217.                                set {_o3} to single value "odp3" get of "plugins/xBot/config.yml"
  218.                                set {_o4} to single value "odp4" get of "plugins/xBot/config.yml"
  219.                                set {_o5} to single value "odp5" get of "plugins/xBot/config.yml"
  220.                                set {_o6} to single value "odp6" get of "plugins/xBot/config.yml"
  221.                                set {_o7} to single value "odp7" get of "plugins/xBot/config.yml"
  222.                                set {_o8} to single value "odp8" get of "plugins/xBot/config.yml"
  223.                                set {_o9} to single value "odp9" get of "plugins/xBot/config.yml"
  224.                                set {_o10} to single value "odp10" get of "plugins/xBot/config.yml"
  225.                                set {_o11} to single value "odp11" get of "plugins/xBot/config.yml"
  226.                                set {_o12} to single value "odp12" get of "plugins/xBot/config.yml"
  227.                                set {_o13} to single value "odp13" get of "plugins/xBot/config.yml"
  228.                                set {_o14} to single value "odp14" get of "plugins/xBot/config.yml"
  229.                                set {_o15} to single value "odp15" get of "plugins/xBot/config.yml"
  230.                                if arg 1 contains {_p1} or {_p2} or {_p3} or {_p4} or {_p5} or {_p6} or {_p7} or {_p8} or {_p9} or {_p10} or {_p11} or {_p12} or {_p13} or {_p14} or {_p15}:
  231.                                        if arg contains {_p1}:
  232.                                                send "&6Zadales pytanie: &c%arg 1%"
  233.                                                wait 4 seconds
  234.                                                send "&6Odpowiedz: &c%{_o1}%"
  235.                                        if arg 1 contains {_p2}:
  236.                                                send "&6Zadales pytanie: &c%arg 1%"
  237.                                                wait 4 seconds
  238.                                                send "&6Odpowiedz: &c%{_o2}%"
  239.                                        if arg 1 contains {_p3}:
  240.                                                send "&6Zadales pytanie: &c%arg 1%"
  241.                                                wait 4 seconds
  242.                                                send "&6Odpowiedz: &c%{_o3}%"
  243.                                        if arg 1 contains {_p4}:
  244.                                                send "&6Zadales pytanie: &c%arg 1%"
  245.                                                wait 4 seconds
  246.                                                send "&6Odpowiedz: &c%{_o4}%"
  247.                                        if arg 1 contains {_p5}:
  248.                                                send "&6Zadales pytanie: &c%arg 1%"
  249.                                                wait 4 seconds
  250.                                                send "&6Odpowiedz: &c%{_o5}%"
  251.                                        if arg 1 contains {_p6}:
  252.                                                send "&6Zadales pytanie: &c%arg 1%"
  253.                                                wait 4 seconds
  254.                                                send "&6Odpowiedz: &c%{_o6}%"
  255.                                        if arg 1 contains {_p7}:
  256.                                                send "&6Zadales pytanie: &c%arg 1%"
  257.                                                wait 4 seconds
  258.                                                send "&6Odpowiedz: &c%{_o7}%"
  259.                                        if arg 1 contains {_p8}:
  260.                                                send "&6Zadales pytanie: &c%arg 1%"
  261.                                                wait 4 seconds
  262.                                                send "&6Odpowiedz: &c%{_o8}%"
  263.                                        if arg 1 contains {_p9}:
  264.                                                send "&6Zadales pytanie: &c%arg 1%"
  265.                                                wait 4 seconds
  266.                                                send "&6Odpowiedz: &c%{_o9}%"
  267.                                        if arg 1 contains {_p10}:
  268.                                                send "&6Zadales pytanie: &c%arg 1%"
  269.                                                wait 4 seconds
  270.                                                send "&6Odpowiedz: &c%{_o10}%"
  271.                                        if arg 1 contains {_p11}:
  272.                                                send "&6Zadales pytanie: &c%arg 1%"
  273.                                                wait 4 seconds
  274.                                                send "&6Odpowiedz: &c%{_o11}%"
  275.                                        if arg 1 contains {_p12}:
  276.                                                send "&6Zadales pytanie: &c%arg 1%"
  277.                                                wait 4 seconds
  278.                                                send "&6Odpowiedz: &c%{_o12}%"
  279.                                        if arg 1 contains {_p13}:
  280.                                                send "&6Zadales pytanie: &c%arg 1%"
  281.                                                wait 4 seconds
  282.                                                send "&6Odpowiedz: &c%{_o13}%"
  283.                                        if arg 1 contains {_p14}:
  284.                                                send "&6Zadales pytanie: &c%arg 1%"
  285.                                                wait 4 seconds
  286.                                                send "&6Odpowiedz: &c%{_o14}%"
  287.                                        if arg 1 contains {_p15}:
  288.                                                send "&6Zadales pytanie: &c%arg 1%"
  289.                                                wait 4 seconds
  290.                                                send "&6Odpowiedz: w&c%{_o15}%"                                                                                                                                                                                                                                                                                        
  291.                                else:
  292.                                        send "&6Zadales pytanie: &c%arg 1%"
  293.                                        wait 4 seconds
  294.                                        wf "## %player% nie otrzymal odpowiedzi na pytanie: %arg 1% ##" to "plugins/xBot/pytaniabezodpowiedzi.yml"
  295.                                        send "&6Niestety, tego pytania nie ma w bazie ;( Administracja zostala o nim powiadomiona."                                                    
  296.                else:
  297.                        send "&4Brak uprawnien..."                                      
  298. on chat:
  299.        if {chat} is false:
  300.                if player has permission "xbot.admin":
  301.                        stop
  302.                else:
  303.                        cancel event
  304.                        send "&6Chat jest &cwylaczony&6."
  305.        if message contains "fhmc" or "ench" or "www" or "gomc" or "hostmc" or "http" or "csrv" or "srvmc" or "mcvr" or ".pl" or ".net" or ".com" or ".eu" or ".ru":
  306.                wf "## Reklamowal: %player% Napisal: %message% ##" to "plugins/xBot/ktoreklamowal.yml"
  307.                cancel event
  308.                kick the player due to "&4Nie reklamuj serwerow i stron!!!"
  309. on join:
  310.     if {zbanowany.%player%} is true:
  311.         kick the player due to "&4Masz bana za cheaty."
  312.        
  313. on script load:
  314.        if folder "plugins/xBot" doesn't exists:
  315.                create folder "plugins/xBot"
  316.        if file "plugins/xBot/config.yml" doesn't exists:
  317.                create file "plugins/xBot/config.yml"
  318.                 wf "## Opcje serwera. ##" to "plugins/xBot/config.yml"
  319.                 set "ipteamspeak" to "ts.serwer.pl" in yaml file "plugins/xBot/config.yml"
  320.                wf "## Tutaj wpisz pytania i odpowiedzi. ##" to "plugins/xBot/config.yml"
  321.                set "pytanie1" to "tojestpytanie1" in yaml file "plugins/xBot/config.yml"
  322.                set "odp1" to "tojestodpowiedz1" in yaml file "plugins/xBot/config.yml"
  323.                set "pytanie2" to "tojestpytanie2" in yaml file "plugins/xBot/config.yml"
  324.                set "odp2" to "tojestodpowiedz2" in yaml file "plugins/xBot/config.yml"
  325.                set "pytanie3" to "tojestpytanie3" in yaml file "plugins/xBot/config.yml"
  326.                set "odp3" to "tojestodpowiedz3" in yaml file "plugins/xBot/config.yml"
  327.                set "pytanie4" to "tojestpytanie4" in yaml file "plugins/xBot/config.yml"
  328.                set "odp4" to "tojestodpowiedz4" in yaml file "plugins/xBot/config.yml"
  329.                set "pytanie5" to "tojestpytanie5" in yaml file "plugins/xBot/config.yml"
  330.                set "odp5" to "tojestodpowiedz5" in yaml file "plugins/xBot/config.yml"
  331.                set "pytanie6" to "tojestpytanie6" in yaml file "plugins/xBot/config.yml"
  332.                set "odp6" to "tojestodpowiedz6" in yaml file "plugins/xBot/config.yml"
  333.                set "pytanie7" to "tojestpytanie7" in yaml file "plugins/xBot/config.yml"
  334.                set "odp7" to "tojestodpowiedz7" in yaml file "plugins/xBot/config.yml"
  335.                set "pytanie8" to "tojestpytanie8" in yaml file "plugins/xBot/config.yml"
  336.                set "odp8" to "tojestodpowiedz8" in yaml file "plugins/xBot/config.yml"
  337.                set "pytanie9" to "tojestpytanie9" in yaml file "plugins/xBot/config.yml"
  338.                set "odp9" to "tojestodpowiedz9" in yaml file "plugins/xBot/config.yml"
  339.                set "pytanie10" to "tojestpytanie10" in yaml file "plugins/xBot/config.yml"
  340.                set "odp10" to "tojestodpowiedz10" in yaml file "plugins/xBot/config.yml"
  341.                set "pytanie11" to "tojestpytanie11" in yaml file "plugins/xBot/config.yml"
  342.                set "odp11" to "tojestodpowiedz11" in yaml file "plugins/xBot/config.yml"
  343.                set "pytanie12" to "tojestpytanie12" in yaml file "plugins/xBot/config.yml"
  344.                set "odp12" to "tojestodpowiedz12" in yaml file "plugins/xBot/config.yml"
  345.                set "pytanie13" to "tojestpytanie13" in yaml file "plugins/xBot/config.yml"
  346.                set "odp13" to "tojestodpowiedz13" in yaml file "plugins/xBot/config.yml"
  347.                set "pytanie14" to "tojestpytanie14" in yaml file "plugins/xBot/config.yml"
  348.                set "odp14" to "tojestodpowiedz14" in yaml file "plugins/xBot/config.yml"
  349.                set "pytanie15" to "tojestpytanie15" in yaml file "plugins/xBot/config.yml"
  350.                set "odp15" to "tojestodpowiedz15" in yaml file "plugins/xBot/config.yml"
  351.        if file "plugins/xBot/ktoreklamowal.yml" doesn't exists:
  352.                create file "plugins/xBot/ktoreklamowal.yml"
  353.        if file "plugins/xBot/pytaniabezodpowiedzi.yml" doesn't exists:
  354.                create file "plugins/xBot/pytaniabezodpowiedzi.yml"
  355.        if file "plugins/xBot/zgloszeniagraczy.yml" doesn't exists:
  356.                create file "plugins/xBot/zgloszeniagraczy.yml"
  357.        if file "plugins/xBot/zgloszeniabugow.yml" doesn't exists:
  358.                create file "plugins/xBot/zgloszaniabugow.yml"
Advertisement
Add Comment
Please, Sign In to add comment