Commit 26da0c87 authored by Tommy Ang's avatar Tommy Ang 🤣

Fix chat message tooltip not working

parent 09fe1b6a
......@@ -91,7 +91,6 @@ on chat:
set {_found} to 0
set {_message::*} to {_message} split at " "
set {_chat::2} to the first 2 characters of {_message::1}
#broadcast "%{_message::*}%"
loop {_message::*}:
if "%loop-value%" contains "http://" or "https://":
if {_found} is 0:
......@@ -103,8 +102,6 @@ on chat:
set {_chat::%{_toadd}%} to "%{_chat::%{_toadd}%}%%loop-value% "
else:
set {_chat::%{_toadd}%} to "%{_chat::%{_toadd}%}%%loop-value% "
#broadcast "%{_chat::1}%"
#broadcast "%{_chat::2}%"
set {_chat::1} to colored {_chat::1}
set {_chat::2} to colored {_chat::2}
if "%{pchat.firstplayer}%" is player's name:
......@@ -130,67 +127,22 @@ on chat:
log "<%player%> %message%" to "chat/%{day}%-%{month}%-%{year}%.log"
if {re.%player%.day} is more than 0:
if {_link} is set:
message "<tooltip:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.day}% day(s) %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%><%{_color}%%player's display name%<r><white>> %{_chat::1}%<link:%{_link}%><light cyan><i><u>[Click me]<r>%{_chat::2}%" to all players
message formatted "<tooltip:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.day}% day(s) %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%><%{_color}%%player's display name%<r><white>> %{_chat::1}%<link:%{_link}%><light cyan><i><u>[Click me]<r>%{_chat::2}%" to all players
stop
message "<tooltip:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.day}% day(s) %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%><%{_color}%%player's display name%<r><white>> %{_message}%" to all players
#send json "<%{_color}%%player's display name%" tooltip "Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.day}% day(s) %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%" then "<white>> %{_message}%" to all players
message formatted "<tooltip:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.day}% day(s) %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%><%{_color}%%player's display name%<r><white>> %{_message}%" to all players
set {pchat.previouschat} to player's name
stop
if {re.%player%.hour} is more than 0:
if {_link} is set:
message "<tooltip:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%><%{_color}%%player's display name%<r><white>> %{_chat::1}%<link:%{_link}%><light cyan><i><u>[Click me]<r>%{_chat::2}%" to all players
message formatted "<tooltip:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%><%{_color}%%player's display name%<r><white>> %{_chat::1}%<link:%{_link}%><light cyan><i><u>[Click me]<r>%{_chat::2}%" to all players
stop
message "<tooltip:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%><%{_color}%%player's display name%<r><white>> %{_message}%" to all players
#send json "<%{_color}%%player's display name%" tooltip "Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%" then "<white>> %{_message}%" to all players
message formatted "<tooltip:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%><%{_color}%%player's display name%<r><white>> %{_message}%" to all players
set {pchat.previouschat} to player's name
stop
else:
if {_link} is set:
message "<tooltip:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%><%{_color}%%player's display name%<r><white>> %{_chat::1}%<link:%{_link}%><light cyan><i><u>[Click me]<r>%{_chat::2}%" to all players
message formatted "<tooltip:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%><%{_color}%%player's display name%<r><white>> %{_chat::1}%<link:%{_link}%><light cyan><i><u>[Click me]<r>%{_chat::2}%" to all players
stop
message "<tooltip:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%><%{_color}%%player's display name%<r><white>> %{_message}%" to all players
# send json "<%{_color}%%player's display name%" tooltip "Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%" then "<white>> %{_message}%" to all players
message formatted "<tooltip:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%><%{_color}%%player's display name%<r><white>> %{_message}%" to all players
set {pchat.previouschat} to player's name
stop
# if "%{pchat.secondplayer}%" is player's name:
# if player has permission "potato.admin":
# set {_rank} to "<red>Admin"
# else if player has permission "potato.alpha":
# set {_rank} to "<light green>Alpha"
# else if player has permission "potato.builder":
# set {_rank} to "<magenta>Builder"
# else if {pdonate.vip::%player%} is set:
# set {_rank} to "<orange>VIP"
# else:
# set {_rank} to "<light cyan>Player"
# cancel event
# if {ptown.%player%} is set:
# set {_playertown} to {ptown.%player%}
# if {ptown.%player%} is not set:
# set {_playertown} to "Townless"
# log "<%player%> %message%" to "chat/%{day}%-%{month}%-%{year}%.log"
# if {re.%player%.day} is more than 0:
# if {_link} is set:
# json("@a", "<<magenta>%player's display name%||ttp:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.day}% day(s) %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%||<white>> %{_chat::1}%||||<light cyan><i><u>[Click me]||url:%{_link}%|| %{_chat::2}%")
# stop
# json("@a", "<<magenta>%player's display name%||ttp:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.day}% day(s) %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%||<white>> %{_message}%")
# #send json "<<magenta>%player's display name%" tooltip "Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.day}% day(s) %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%" then "<white>> %{_message}%" to all players
# set {pchat.previouschat} to player's name
# stop
# if {re.%player%.hour} is more than 0:
# if {_link} is set:
# json("@a", "<<magenta>%player's display name%||ttp:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%||<white>> %{_chat::1}%||||<light cyan><i><u>[Click me]||url:%{_link}%|| %{_chat::2}%")
# stop
# json("@a", "<<magenta>%player's display name%||ttp:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%||<white>> %{_message}%")
# #send json "<<magenta>%player's display name%" tooltip "Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.hour}% hour(s) %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%" then "<white>> %{_message}%" to all players
# set {pchat.previouschat} to player's name
# stop
# else:
# if {_link} is set:
# json("@a", "<<magenta>%player's display name%||ttp:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%||<white>> %{_chat::1}%||||<light cyan><i><u>[Click me]||url:%{_link}%|| %{_chat::2}%")
# stop
# json("@a", "<<magenta>%player's display name%||ttp:Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%||<white>> %{_message}%")
# #send json "<<magenta>%player's display name%" tooltip "Rank: %{_rank}% %newline%Town: %{_playertown}% %newline%Playtime: %{re.%player%.minute}% minute(s) %{re.%player%.second}% second(s) %newline%Sent: %now%" then "<white>> %{_message}%" to all players
# set {pchat.previouschat} to player's name
# stop
\ No newline at end of file
stop
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment