Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # # # # # # # # # # # # # # # #
- # Script by PatisonPlayGames #
- # Name: NPCSpeaker #
- # Version: Beta 1.0 #
- # Skript: 2.0.2/2.1 #
- # # # # # # # # # # # # # # # #
- #=============================================#
- # Licencja NPCSpeaker by PatisonPlayGames! #
- # + Nie zezwalam na: #
- # - Usuwanie tresci o autorze! #
- # - Udostepnaniu skryptu innym! #
- # - Podszywanie sie pod autora! #
- # - Uzywanie kodu skryptu w swoich skryptach! #
- # - Zarabianie na skrypcie! #
- # + Zezwalam na: #
- # - Dodawanie kodu na swoja potrzebe! #
- # - Modyfikowanie wiadomosci! #
- #=============================================#
- options:
- # # # # # # # # # # # # # # #
- # #
- # General Config #
- # #
- # # # # # # # # # # # # # # #
- #Tag wyswietlany przed wiadomosciami skryptu:
- tag: &8[&6NPCSpeaker&8]
- #Nazwa pliku sk.Zanim wgrasz plik i zmieniles nazwe zmien ja takze tutaj i dopiero wgraj plik!:
- sk: NPCSpeaker
- #Komenda uzywana w skrypcie:
- komenda: speaker
- #Skroty do komendy wyzej:
- aliases: speaker, npc, npcspeaker
- #Tutaj podajemy co ile ma sie wyswietlac wiadomosc jak stoimy kolo npc (w sekundach):
- time: 5
- # # # # # # # # # # # # # # #
- # #
- # Permission #
- # #
- # # # # # # # # # # # # # # #
- # Wiadomosć przy braku permisji:
- permission: &cNie posiadasz uprawnien!
- # Skript Code
- variables:
- {npcspeaker.setname.%player%} = false
- {npcspeaker.setmessage.%player%} = false
- command /{@komenda} [<text>] [<text>]:
- aliases: {@aliases}
- trigger:
- if arg 1 is not set:
- send "&8====={@tag}&8======"
- send "&6{@komenda} - &aPokazuje okno pomocy!"
- send "&6{@komenda} setspawn [number] - &austawia spawn npc!"
- send "&6{@komenda} usun [number] - &aUsuwa dany spawn!"
- send "&6{@komenda} setmessage [message] - &a Ustawia wiadomosć dla npc!"
- send "&6{@komenda} setname [name] - &aUstawia imię dla danego npc!"
- send "&6{@komenda} autor - &aPokazuje autora oraz wersje skryptu!"
- send "&6{@komenda} reload - &aPrzeladowywuje skrypt!"
- stop
- if arg 1 is "pomoc":
- send "&8====={@tag}&8======"
- send "&6{@komenda} - &aPokazuje okno pomocy!"
- send "&6{@komenda} setspawn [number] - &austawia spawn npc!"
- send "&6{@komenda} usun [number] - &aUsuwa dany spawn!"
- send "&6{@komenda} setmessage [message] - &a Ustawia wiadomosć dla npc!"
- send "&6{@komenda} setname [name] - &aUstawia imię dla danego npc!"
- send "&6{@komenda} autor - &aPokazuje autora oraz wersje skryptu!"
- send "&6{@komenda} reload - &aPrzeladowywuje skrypt!"
- stop
- if arg 1 is "setspawn":
- if arg 2 parsed as number is set:
- if player has permission "npcspeaker.setspawn" or "npcspeaker.*":
- if {npcspeaker.available.%arg 2%} is true:
- send "{@tag} &cTen spawn jest juz w uzyciu!"
- stop
- else:
- add "%arg 2%" to {npcspeaker.list::*}
- set {npcspeaker.available.%arg 2%} to true
- set {npcspeaker.spawn.%arg 2%} to location of player
- spawn villager at {npcspeaker.spawn.%arg 2%}
- apply slowness 100 to the last spawned entity for 100 days
- set {npcspeaker.villager.%last spawned entity%.%arg 2%} to true
- send "{@tag} &aStworzono npc na spawnie &9%arg 2%"
- stop
- else:
- send "{@tag} {@permission}"
- stop
- else:
- send "{@tag} &cPodaj numer spawna!"
- stop
- if arg 1 is "usun":
- if arg 2 parsed as number is set:
- if player has permission "npcspeaker.usun" or "npcspeaker.*":
- if {npcspeaker.available.%arg 2%} is set:
- remove "%arg 2%" from {npcspeaker.list::*}
- clear {npcspeaker.available.%arg 2%}
- clear {npcspeaker.spawn.%arg 2%}
- clear {npcspeaker.villager.%arg 2%}
- loop all villagers:
- if {npcspeaker.villager.%loop-villager%.%arg 2%} is true:
- clear {npcspeaker.villager.%loop-villager%.%arg 2%}
- clear {npcspeaker.%loop-villager%.msg}
- kill loop-villager
- send "{@tag} &aUsunięto npc na spawnie &9%arg 2%"
- stop
- else:
- send "{@tag} &cNie ma takiego spawnu!"
- stop
- else:
- send "{@tag} {@permission}"
- stop
- else:
- send "{@tag} &cPodaj numer spawna!"
- stop
- if arg 1 is "setname":
- if arg 2 parsed as text is set:
- if player has permission "npcspeaker.setname" or "npcspeaker.*":
- if {npcspeaker.setname.%player%} is false:
- set {npcspeaker.%player%.name} to "%coloured arg 2%"
- set {npcspeaker.setname.%player%} to true
- send "{@tag} &aKliknij na npc by nadać imię!"
- stop
- else:
- send "{@tag}&cImie zostalo juz wczesniej wybrane kliknij na danego npc!"
- stop
- else:
- send "{@tag} {@permission}"
- stop
- else:
- send "{@tag} &cPodaj imie npc!"
- stop
- if arg 1 is "reload":
- if player has permission "npcspeaker.*" or "npcspeaker.reload":
- execute console command "/sk reload {@sk}"
- send "{@tag} &aPrzeladowano!"
- stop
- else:
- send "{@tag} {@permission}"
- stop
- if arg 1 is "autor":
- send "&7----------------------------------------------"
- send " &8Autor: &aPatisonPlayGames"
- send " &8Nazwa: &aNPCSpeaker"
- send "&8 &8&nYou&4&nTube:&a &nwww.youtube.com/PatisonPlayGames"
- send "&7----------------------------------------------"
- stop
- if arg 1 is "setmessage":
- if arg 2 parsed as text is set:
- if player has permission "npcspeaker.setmessage" or "npcspeaker.*":
- if {npcspeaker.setmessage.%player%} is false:
- set {npcspeaker.%player%.message} to "%coloured arg 2%"
- set {npcspeaker.setmessage.%player%} to true
- send "{@tag} &aKliknij na npc by nadać wiadomosc!"
- stop
- else:
- send "{@tag}&cWiadomosc zostala juz wczesniej wybrana kliknij na danego npc!"
- stop
- else:
- send "{@tag} {@permission}"
- stop
- else:
- send "{@tag} &cPodaj wiadomosc dla npc!"
- stop
- on rightclick on villager:
- if {npcspeaker.setname.%player%} is true:
- cancel event
- set display name of the clicked entity to "%{npcspeaker.%player%.name}%"
- clear {npcspeaker.setname.%player%}
- clear {npcspeaker.%player%.name}
- send "{@tag} &aNadano imię!"
- stop
- if {npcspeaker.setmessage.%player%} is true:
- cancel event
- clear {npcspeaker.setmessage.%player%}
- send "{@tag} &aNadano wiadomość!"
- set {npcspeaker.%targeted entity%.msg} to {npcspeaker.%player%.message}
- send "{@tag} &aAktualna wiadomosc: %{npcspeaker.%targeted entity%.msg}%"
- stop
- on damage of villager:
- loop {npcspeaker.list::*}:
- if {npcspeaker.villager.%victim%.%loop-value%} is true:
- cancel event
- every 1 ticks:
- loop all villagers:
- loop {npcspeaker.list::*}:
- if {npcspeaker.villager.%loop-villager%.%loop-value%} is true:
- teleport loop-villager to {npcspeaker.spawn.%loop-value%}
- every 1 seconds:
- loop all players:
- loop villagers in radius 5 around loop-player:
- if {npcspeaker.%loop-villager%.msg} is set:
- set {_czas} to difference between {czas.%loop-player%} and now
- if {_czas} is less than {@time} seconds:
- stop
- else:
- send "%{npcspeaker.%loop-villager%.msg}%" to loop-player
- set {czas.%loop-player%} to now
- on skript start:
- send "&8NPCSpeaker wymaga wersji Skript 2.0.2/2.1 ..." to the console
- wait 1 seconds
- send "&8Serwer pracuje na wersji: %skript version%" to the console
- send "" to the console
- send "&8--------------------------------------------------------------" to the console
- send "&8| |" to the console
- send "&8| Enable &9NPCSpeaker &8|" to the console
- send "&8| |" to the console
- send "&8--------------------------------------------------------------" to the console
- send "" to the console
- send "&8Autor: &ePatisonPlayGames" to the console
- send "" to the console
- #------------------------------------------------ End of Script / Thanks for Use ---------------------------------#
- #-------------------------------- © by PationPlayGames - Author / YouTube www.youtube.com/PatisonPlayGames -------#
Advertisement
Add Comment
Please, Sign In to add comment