Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n script unload:
- loop {nickchat.registedhooks::*}:
- set {_s} to the last 7 characters of loop-value
- set {_a} to loop-value
- set {_al} to length of {_a}
- subtract 7 from {_al}
- set {_a} to the first {_al} characters of {_a}
- df "plugins/Skript/scripts/nchook-%{_a}%.sk"
- df "plugins/Skript/scripts/-nchook-%{_a}%.sk"
- on script load:
- set {nickchat.registedhooks::*} to files in "plugins/NickChat/Hooks"
- loop {nickchat.registedhooks::*}:
- set {_s} to the last 7 characters of loop-value
- if {_s} is ".nchook":
- set {_a} to loop-value
- set {_al} to length of {_a}
- subtract 7 from {_al}
- set {_a} to the first {_al} characters of {_a}
- make console execute command "sk disable nchook-%{_a}%.sk"
- df "plugins/Skript/scripts/-nchook-%{_a}%.sk"
- #Isto vai processar o hook e vai corrigir coisas daoras!
- set {_tempfile} to content of file "plugins/NickChat/Hooks/%{_a}%.nchook"
- $ thread # Registar o hook do nickchat
- regex replace "(R|r)egist(a|e)r(?: (N|n)ick( |)(C|c)hat|) hook(?: named|) ""((\s|\S)+?)""(?: made|) by ""((\s|\S)+?)""(?: with|) version ""((\s|\S)+?)""" with "nickchat_registerHook(""$6"", ""$8"", ""$10"")" in {_tempfile}
- $ thread # Setar Tags
- regex replace "set (?:nick(?: |)|)chat tag of ((?:\s|\S)+?) to ""((?:\s|\S)+?)"" replacer of ""((?:\s|\S)+?)""" with "nickapi_settag($1, ""$3"", ""$2"")" in {_tempfile}
- $ thread # Des-Registar o hook do nickchat
- regex replace "(u|U)n(R|r)egist(a|e)r(?: (N|n)ick( |)(C|c)hat|) hook(?: named|) ""((\s|\S)+?)""(?:(?: made|) by ""((\s|\S)+?)""(?: with|) version ""((\s|\S)+?)""|)" with "nickchat_unregisterHook(""$7"")" in {_tempfile}
- # Evento On Global
- set {_aaaaa} to nickutils_configValue("Hooks.UsarTABS", "NickChat", "config")
- if {_aaaaa} is "true":
- $ thread
- regex replace "on (G|g)lobal(?: (send|message)):" with "on command ""/g"":%nl% arguments is set%nl% set {_msg} to ""%%arguments%%""%nl% wait 1 tick" in {_tempfile}
- else:
- $ thread
- regex replace "on (G|g)lobal(?: (send|message)):" with "on command ""/g"":%nl% arguments is set%nl% set {_msg} to ""%%arguments%%""%nl% wait 1 tick" in {_tempfile}
- # Evento On Local
- if {_aaaaa} is "true":
- $ thread
- regex replace "on (L|l)ocal(?: (send|message)):" with "on chat:%nl% wait 1 tick" in {_tempfile}
- else:
- $ thread
- regex replace "on (L|l)ocal(?: (send|message)):" with "on chat:%nl% wait 1 tick" in {_tempfile}
- $ thread # Enviar Chat customizado
- regex replace "send custom(?: (?:(N|n)ick|)(?: |)(C|c)hat|) to ((\s|\S)+?) sent by ((\s|\S)+?)(?: with|) prefix(?:ed|) ""((\s|\S)+?)""(?: with|) text ""((\s|\S)+?)""" with "nickchat_sendcustomChat($3, ""$7"", $5, ""$9"")" in {_tempfile}
- # $ thread
- regex replace "on(?: hook|) (|un)load:" with "on script $1load:" in {_tempfile}
- create file "plugins/Skript/scripts/nchook-%{_a}%.sk"
- wf "%{_tempfile}%" to "plugins/Skript/scripts/nchook-%{_a}%.sk"
- load script from file "plugins/Skript/scripts/nchook-%{_a}%.sk"
- send "[NickChat Lite] Carregado Hook do Ficheiro %{_a}%.nchook" to console
- else:
- remove loop-value from {nickchat.registedhooks::*}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement