Guest User

xBot

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