{exist.%player%} is set under the code below
The problem is that if I access the variable {exist.Ghostfish_} through my account named "Ghostfish_", I will get the result of true
And if I log on to another account named "test", I will get the result of false. The same thing happened to {exist.test}
I tried to access to the variable {exist.test} through this command /gv by "Ghostfish_", I will get true
How should I fix it? Thank you guys very much!
[doublepost=1605219949,1605219872][/doublepost]"The problem is that if I access the variable {exist.Ghostfish_} through my account named "Ghostfish_", I will get the result of true
And if I log on to another account named "test", I will get the result of false. The same thing happened to {exist.test}"
Through method isPlayerExist(text)
[doublepost=1605220685][/doublepost]Here are the screenshots
will any invisible information be generated by subtext? By invisible information, I mean something like "<reset>1" will look exactly the same as "1" but actually different
Code:
on join:
if {exist.%player%} is not set:
set {exist.%player%} to true
command //setUpFormerExisted:
permission: tbc.excommands
trigger:
loop all players:
make console execute command "//setUpExistance %loop-player%"
loop all offline players:
make console execute command "//setUpExistance %loop-offline player%"
command //setUpExistance [<text>]:
trigger:
if arg 1 is set:
set {exist.%arg 1%} to true
else:
set {exist.%player%} to true
function isPlayerExist(p: text) :: boolean:
broadcast "{exist.%{_p}%} is %{exist.%{_p}%}%"
if {exist.%{_p}%} is true:
return true
else:
return false
The problem is that if I access the variable {exist.Ghostfish_} through my account named "Ghostfish_", I will get the result of true
And if I log on to another account named "test", I will get the result of false. The same thing happened to {exist.test}
I tried to access to the variable {exist.test} through this command /gv by "Ghostfish_", I will get true
Code:
command //getVariable <text>:
aliases: /gv
permission: tbc.excommands
trigger:
send "%{%arg 1%}%"
How should I fix it? Thank you guys very much!
[doublepost=1605219949,1605219872][/doublepost]"The problem is that if I access the variable {exist.Ghostfish_} through my account named "Ghostfish_", I will get the result of true
And if I log on to another account named "test", I will get the result of false. The same thing happened to {exist.test}"
Through method isPlayerExist(text)
[doublepost=1605220685][/doublepost]Here are the screenshots
will any invisible information be generated by subtext? By invisible information, I mean something like "<reset>1" will look exactly the same as "1" but actually different
Code:
if loop-value contains "@":
set {_si} to the first index of "@" in loop-value
set {_si} to sum({_si},1)
set {_ei} to length of loop-value
set {_targetText} to subtext of loop-value from characters {_si} to {_ei}
delete {_target}
set {_target} to {_targetText} parsed as player
delete {_pre}
set {_pre} to subtext of loop-value from characters 0 to subtract({_si},2)
if isPlayerExist({_targetText}) is true:
set {_post} to "<light blue>%subtext of loop-value from characters subtract({_si},1) to {_ei}%"
else:
set {_post} to "<reset>%subtext of loop-value from characters subtract({_si},1) to {_ei}%"
if {_pre} is set:
set {_rp} to "%{_pre}%%{_post}%<reset>"
else:
set {_rp} to "%{_post}%<reset>"
set {_nm} to "%{_nm}%%{_rp}% "
if isPlayerExist({_targetText}) is true:
aitPlayer_inChat({_target}, {_targetText}, {_p}, {_m}, getTime())