# _____ _ _ _____ _ __ # | __ \(_) | |/ ____| |/ / # | | | |_ ___ ___ ___ _ __ __| | (___ | ' / # | | | | / __|/ __/ _ \| '__/ _` |\___ \| < # | |__| | \__ \ (__ (_) | | | (_| |____) | . \ # |_____/|_|___/\___\___/|_| \__,_|_____/|_|\_\ options: #Token z strony discordapp.com/developers token: NzAwOTc4MTE1MjY1OTUzODQz.XpqzJA.4fixsSvBKZk06_K2NXm04oxbWP4 #Nazwa bota z discordapp.com/developers nazwa: DBCPremium #ID Bota botid: 700978115265953843 #Nazwa serwera nazwasv: DBCPremium #Chat na kanale chat: true #ID Kanału na którym mają być wysyłane wiadomości chatu z serwera minecraft chatid: 6661337666 #Łączenie konta minecraft z kontem na discord link: true #ID roli bo udanym połączeniu konta z kontem minecraft roleid: 6661337666 #Konsola na kanale discord console: false #Kanał do konsoli consoleid: 6661337666 #Logi logs: false #Kanał logów logsid: 6661337666 #Prefix bota prefix: DBC #Wersja (Prosze, nie zmieniaj) version: 0.2 # # # # # # # # # # # # # Eventy on load: if "{@nazwa}" parsed as bot is not set: login to "{@token}" with name "{@nazwa}" set status of "{@nazwa}" to online mark "{@nazwa}" as playing "{@nazwasv}" set {_current_version} to "{@version}" parsed as number set {_import_new_version} to text from url "https://code.skript.pl/WzNuhsNb/raw" set {_import_new_version} to {_import_new_version} parsed as number if {_current_version} is smaller than {_import_new_version}: send "&c&l[DiscordSK] &cNie używasz najnowszej wersji! Pobierz nową z https://bit.ly/2owkcQs" to all ops send "&c&l[DiscordSK] &cNie używasz najnowszej wersji! Pobierz nową z https://bit.ly/2owkcQs" to all ops send "&c&l[DiscordSK] &cNie używasz najnowszej wersji! Pobierz nową z https://bit.ly/2owkcQs" to all ops else: send "&2&l[DiscordSK] &aWersja aktualna!" to all ops on chat: set {check} to "{@chat}" if {check} is "true": send "**%player%**: %message%" to channel with id "{@chatid}" with {@nazwa} guild message receive seen by "{@nazwa}": set {check} to "{@chat}" if {check} is "true": if discord id of event-user is not "{@botid}": if discord id of event-channel is "{@chatid}": broadcast "&8[&6Discord&8] &b%event-user%: &f%event-message%" guild message receive seen by "{@nazwa}": set {check} to "{@console}" if {check} is "true": if discord id of event-user is not "{@botid}": if discord id of event-channel is "{@consoleid}": execute console command "%event-message%" add reaction "white_check_mark" to reactions of event-message on first join: set {check} to "{@chat}" if {check} is "true": send "**%player% dołączył do nas po raz pierwszy!**" to channel with id "{@chatid}" with {@nazwa} on join: set {check} to "{@chat}" if {check} is "true": send "**%player% dołączył na serwer!**" to channel with id "{@chatid}" with {@nazwa} on quit: set {check} to "{@chat}" if {check} is "true": send "**%player% wyszedł/a z serwera...**" to channel with id "{@chatid}" with {@nazwa} on member join guild: broadcast "&8[&6Discord&8] &6%event-user% &bdolaczyl na serwer discord!" on member leave guild: broadcast "&8[&6Discord&8] &6%event-user% &bwyszedl z serwera discord!" # Komendy command /link []: trigger: set {check} to "{@link}" if {check} is "true": if {linked::%player%} is "true": send "&cTwoje konto jest już połączone!" else: set {_e} to random 6 char string from charset `0-9` set {code::%{_e}%} to player message "&c&l{@nazwasv} >> &6Twój kod to: &b%{_e}%" message "&c&l{@nazwasv} >> &6Użyj teraz komendy {@prefix}link !" log "%player%: Wygenerował kod: %{_e}%" to "dsklink.log" set {check2} to "{@logs}" if {check2} is "true": send "**%player%**: Wygenerował kod: %{_e}%" to channel with id "{@logsid}" with {@nazwa} else: send "&cKomenda wyłączona!" command /unlink []: trigger: set {linked::%player%} to "false" send "&a&lTwoje konto zostało odłączone!" discord command link []: prefixes: {@prefix} trigger: set {check} to "{@link}" if {check} is "true": if arg 1 is not set: reply with "Prosze podaj mi swoj kod weryfikacji! Jeżeli go nie masz użyj komendy `/link` w grze!" else if {code::%arg 1%} is not set: reply with "Wygląda na to że nie masz kodu weryfikacji! Użyj komendy `/link` w grze!" else if {code::%arg 1%} is set: set {discord::%discord id of event-member%::player} to {code::%arg-1%} set {discord::%discord id of event-member%} to discord id of event-member if {linked::%{code::%arg-1%}%} is "true": reply with "Twoje konto jest już połączone!" else: set {linked::%{code::%arg-1%}%} to "true" reply with "Twoje konto minecraft: %{code::%arg-1%}% zostało połączone z kontem discord!" log "%{code::%arg-1%}%: Połączył swoje konto z kontem discord (%{discord::%discord id of event-member%}%)" to "dsklink.log" set {check2} to "{@logs}" if {check2} is "true": send "**%{code::%arg-1%}%**: Połączył swoje konto z kontem discord (%{discord::%discord id of event-member%}%)" to channel with id "{@logsid}" with {@nazwa} add role with id "{@roleid}" to roles of event-user in event-guild delete {code::%arg-1%} else: reply with "Komenda wyłączona!"