Discuss Scratch

carrotboygames
Scratcher
6 posts

how to make a online chat room?

if anyone knows how pls tell me
deck26
Scratcher
1000+ posts

how to make a online chat room?

Real chat rooms are not allowed - you can only use a list of things people can choose to say.
a1dang
Scratcher
100+ posts

how to make a online chat room?

You can send text over cloud variables by converting letters to numbers using a list, and then decrypting the cloud variable back using the same code, as shown in my project here: https://scratch.mit.edu/projects/1021767875/
(The project does not have any function, it's just shared so you can look at the two functions in it)

However, actual chat rooms on scratch are not allowed, and so you could only use this to send some pre-created phrases by yourself over cloud variables, or usernames.
carrotboygames
Scratcher
6 posts

how to make a online chat room?

thanks so much!
JoeyjJoe
Scratcher
100+ posts

how to make a online chat room?

Chat rooms are against ToS, as they can allow non-Scratch friendly words to be said
youormeletsbringit
Scratcher
74 posts

how to make a online chat room?

Un-filtered chatrooms are against scratches ToS. But to do something like this you have to convert text to numbers, then convert those numbers back to text. Here is code on how to “Encode” and “Decode” and how to use it. If you use this, be sure to implement some sort of safety system like a whitelist or your project will be taken down.

Variables -
(☁️Cloud)
(Encoded)
(Decoded)
(Last)
(Letter #)
(String)
(this)
Lists:
(Chat :: list)

when green flag clicked
delete (all v) of [Chat v]
wait (1) secs
Decode (☁️Cloud)::custom
Encode (join (username) [ has joined the chat.])::custom
forever
ask [] and wait
Encode (join (username) (join [ - ] (answer)))::custom // No safety system, your project will be taken down.
end

when green flag clicked
set [Last v] to []
forever
if <not <(☁️Cloud) = (Last)>> then
Decode (☁️Cloud)::custom
set [Last v] to (☁️Cloud)
end
end

define Encode (data) // Run without screen refresh.
set [String v] to [abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*().,/';:=-+_ ] // Same as Decode
set [Encoded v] to []
set [Letter # v] to [1]
repeat (length of (data))
set [this v] to [0]
repeat (length of (String))
change [this v] by (1)
if <(letter (this) of (String)) = (letter (Letter #) of (data))> then
set [Encoded v] to (join (Encoded) ((this) + (10)))
end
end
change [Letter # v] by (1)
end
set [Encoded v] to (join (Encoded) [00])
set [☁️Cloud v] to (Encoded)

define Decode (data) // Run without screen refresh.
set [String v] to [abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*().,/';:=-+_ ] // Same as Encode
set [Decoded v] to []
set [Letter # v] to [1]
repeat (((length of (data)) / (2)) - (1))
set [this v] to (letter ((join (letter (Letter #) of (data)) (letter ((Letter #) + (1)) of (data))) - (10)) of (String))
set [Decoded v] to (join (Decoded) (this))
change [Letter # v] by (2)
end
add (Decoded) to [Chat v]

Last edited by youormeletsbringit (May 18, 2024 07:58:47)

Blazing_Codes
Scratcher
37 posts

how to make a online chat room?

youormeletsbringit wrote:

Un-filtered chatrooms are against scratches ToS. But to do something like this you have to convert text to numbers, then convert those numbers back to text. Here is code on how to “Encode” and “Decode” and how to use it. If you use this, be sure to implement some sort of safety system like a whitelist or your project will be taken down.

Variables -
(☁️Cloud)
(Encoded)
(Decoded)
(Last)
(Letter #)
(String)
(this)
Lists:
(Chat :: list)

when green flag clicked
delete (all v) of [Chat v]
wait (1) secs
Decode (☁️Cloud)::custom
Encode (join (username) [ has joined the chat.])::custom
forever
ask [] and wait
Encode (join (username) (join [ - ] (answer)))::custom // No safety system, your project will be taken down.
end

when green flag clicked
set [Last v] to []
forever
if <not <(☁️Cloud) = (Last)>> then
Decode (☁️Cloud)::custom
set [Last v] to (☁️Cloud)
end
end

define Encode (data) // Run without screen refresh.
set [String v] to [abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*().,/';:=-+_ ] // Same as Decode
set [Encoded v] to []
set [Letter # v] to [1]
repeat (length of (data))
set [this v] to [0]
repeat (length of (String))
change [this v] by (1)
if <(letter (this) of (String)) = (letter (Letter #) of (data))> then
set [Encoded v] to (join (Encoded) ((this) + (10)))
end
end
change [Letter # v] by (1)
end
set [Encoded v] to (join (Encoded) [00])
set [☁️Cloud v] to (Encoded)

define Decode (data) // Run without screen refresh.
set [String v] to [abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*().,/';:=-+_ ] // Same as Encode
set [Decoded v] to []
set [Letter # v] to [1]
repeat (((length of (data)) / (2)) - (1))
set [this v] to (letter ((join (letter (Letter #) of (data)) (letter ((Letter #) + (1)) of (data))) - (10)) of (String))
set [Decoded v] to (join (Decoded) (this))
change [Letter # v] by (2)
end
add (Decoded) to [Chat v]
Thank you for that too. I don't have to make a new discussion
elmundodedragon_408
Scratcher
13 posts

how to make a online chat room?

hello im making a scratch game: https://scratch.mit.edu/projects/1068589818/

and i want to put a online chatroom (with filter duh) but im to lazy to make the code so, can anyone help me?

u can help me remixing the project with the chat system and im going to put the chatroom system in the game




when green flag clicked
say [HELP ME WITH THIS PLEASSSEEEE]
Arcplayz_
Scratcher
88 posts

how to make a online chat room?

elmundodedragon_408 wrote:

hello im making a scratch game: https://scratch.mit.edu/projects/1068589818/

and i want to put a online chatroom (with filter duh) but im to lazy to make the code so, can anyone help me?

u can help me remixing the project with the chat system and im going to put the chatroom system in the game




when green flag clicked
say [HELP ME WITH THIS PLEASSSEEEE]
Please don't necropost. This was from about a year ago.
elmundodedragon_408
Scratcher
13 posts

how to make a online chat room?

Arcplayz_ wrote:

elmundodedragon_408 wrote:

hello im making a scratch game: https://scratch.mit.edu/projects/1068589818/

and i want to put a online chatroom (with filter duh) but im to lazy to make the code so, can anyone help me?

u can help me remixing the project with the chat system and im going to put the chatroom system in the game




when green flag clicked
say [HELP ME WITH THIS PLEASSSEEEE]
Please don't necropost. This was from about a year ago.
what is necropost?
me_the_super
Scratcher
100+ posts

how to make a online chat room?

elmundodedragon_408 wrote:

Arcplayz_ wrote:

elmundodedragon_408 wrote:

hello im making a scratch game: https://scratch.mit.edu/projects/1068589818/

and i want to put a online chatroom (with filter duh) but im to lazy to make the code so, can anyone help me?

u can help me remixing the project with the chat system and im going to put the chatroom system in the game




when green flag clicked
say [HELP ME WITH THIS PLEASSSEEEE]
Please don't necropost. This was from about a year ago.
what is necropost?
A necropost is when you reply to a really old post, bringing it back to the top.
hi_bobux725
Scratcher
100+ posts

how to make a online chat room?

Arcplayz_ wrote:

elmundodedragon_408 wrote:

hello im making a scratch game: https://scratch.mit.edu/projects/1068589818/

and i want to put a online chatroom (with filter duh) but im to lazy to make the code so, can anyone help me?

u can help me remixing the project with the chat system and im going to put the chatroom system in the game




when green flag clicked
say [HELP ME WITH THIS PLEASSSEEEE]
Please don't necropost. This was from about a year ago.
it's literally bumped up all the way to the first page what did you expect?? (sorry if i was rude)
CoderMCProX
Scratcher
1000+ posts

how to make a online chat room?

carrotboygames wrote:

if anyone knows how pls tell me
1. You need a list of phrases to prevent ST from taking it down. Make it here and use the Cloud Variables on TurboWarp since Scratch's aren't working right now. This project has a chat room, https://scratch.mit.edu/projects/1067857969/
23mConnor
Scratcher
50 posts

how to make a online chat room?

I suppose if you wish to know what should and shouldn’t be said, head to the contact us area I suppose. Trust me, ST are very severe towards this sort of thing.
GameCatastrophe0927
Scratcher
1000+ posts

how to make a online chat room?

CoderMCProX wrote:

carrotboygames wrote:

if anyone knows how pls tell me
1. You need a list of phrases to prevent ST from taking it down. Make it here and use the Cloud Variables on TurboWarp since Scratch's aren't working right now. This project has a chat room, https://scratch.mit.edu/projects/1067857969/

23mConnor wrote:

I suppose if you wish to know what should and shouldn’t be said, head to the contact us area I suppose. Trust me, ST are very severe towards this sort of thing.
Stop necroposting.

Powered by DjangoBB