Guest User

Poprawka xBot

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