Page 1 of 1

Local Chat

Posted: June 24th, 2020, 7:20 pm
by jumpsplat120
Ever wanted your chat to be limited to just a few people nearby? Want to hold secret meetings in dingy taverns, far from prying ears? Might I introduce...
LOCAL CHAT



Simply drop the following minimized code in, and BAM! Only those within the defined range (by default 10) will be able to hear what is being said. But of course, if you were to shout (LIKE THIS), then more people will be able to hear you! (by default a range of 20)

Here's a quick video demonstration of the script in action...



The code is only a few lines long, so feel free to modify it with extra features to suit your own needs! If you are using this script in any capacity, I would love to hear about it! Feel free to shoot me a message on Discord, Jumpsplat120#0001.

Simply click https://one.denizenscript.com/haste/71682, or visit the github to download the script: https://github.com/jumpsplat120/Denizen ... l_Chat.dsc

Re: Local Chat

Posted: June 25th, 2020, 10:27 pm
by mcmonkey
What in the hecksinki is - if <context.message.replace_text[regex:<element[[^A-Za-z]]>].is_uppercase>: meant to be?

Also, you probably should make use of the recipients determination.

Also, the standard link to your current script would be https://one.denizenscript.com/haste/71368

Re: Local Chat

Posted: June 28th, 2020, 1:41 pm
by jumpsplat120
You can't use the .is_uppercase tag on an element that contains numbers or symbols, as it will automatically fail. So the tag removes all auto failing characters before checking. That way, you don't have to forgo proper punctuation when "yelling".

I'll update the link along with the determination change.

Re: Local Chat

Posted: June 29th, 2020, 9:31 am
by mcmonkey
You might want to instead check if <context.message.to_uppercase.equals_case_sensitive[<context.message>]> or something like that (generally, regex should be avoided whenever possible).

Re: Local Chat

Posted: June 30th, 2020, 2:41 pm
by jumpsplat120
Fantastic! I'll implement that.