Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to create save codes?
- SuperGamerGG2
- Scratcher
69 posts
How to create save codes?
Hello, I'm trying to make a save code mechanism in the “save data” sprite, but I just stuck. Please help me!
https://scratch.mit.edu/projects/969611148/editor/
https://scratch.mit.edu/projects/969611148/editor/
Hi! I'm SuperGamerGG2. Click on the links below!
My Profile | Define Scratch | My BFB Camp Team | Game
- MineTurte
- Scratcher
500+ posts
How to create save codes?
Well it depends. If you want it so people can't easily just alter it you'll either have to use some really advanced encoder, or just hide the code by editing the JSON file. If @Malicondi happens to see this post he can probably provide you with a link on how to edit the JSON file, cuz I don't know how lol. Hello, I'm trying to make a save code mechanism in the “save data” sprite, but I just stuck. Please help me!
https://scratch.mit.edu/projects/969611148/editor/
But if you don't mind people being able to change it then:
when I receive [ generate code]
set [ code] to (join [username] (join [|] (join (coins) [|])))
If you need the decoding script too, ask.
Hope I helped btw!
15+ (not revealing age) girl. Pronouns are she/her.
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
- SuperGamerGG2
- Scratcher
69 posts
How to create save codes?
yes i need help decoding it. plsWell it depends. If you want it so people can't easily just alter it you'll either have to use some really advanced encoder, or just hide the code by editing the JSON file. If @Malicondi happens to see this post he can probably provide you with a link on how to edit the JSON file, cuz I don't know how lol. Hello, I'm trying to make a save code mechanism in the “save data” sprite, but I just stuck. Please help me!
https://scratch.mit.edu/projects/969611148/editor/
But if you don't mind people being able to change it then:when I receive [ generate code]
set [ code] to (join [username] (join [|] (join (coins) [|])))
If you need the decoding script too, ask.
Hope I helped btw!
Hi! I'm SuperGamerGG2. Click on the links below!
My Profile | Define Scratch | My BFB Camp Team | Game
- MineTurte
- Scratcher
500+ posts
How to create save codes?
yes i need help decoding it. plsWell it depends. If you want it so people can't easily just alter it you'll either have to use some really advanced encoder, or just hide the code by editing the JSON file. If @Malicondi happens to see this post he can probably provide you with a link on how to edit the JSON file, cuz I don't know how lol. Hello, I'm trying to make a save code mechanism in the “save data” sprite, but I just stuck. Please help me!
https://scratch.mit.edu/projects/969611148/editor/
But if you don't mind people being able to change it then:when I receive [ generate code]
set [ code] to (join [username] (join [|] (join (coins) [|])))
If you need the decoding script too, ask.
Hope I helped btw!
Here:
when I receive [ encode]
set [ code] to (join (username) (join [|] (join (coins) [|])))
define decode (what to decode)//set to run without screen refresh
set [ letter] to [0]
set [ temporaryCoins] to [] //Make sure this is blank, no space or anything.
set [ fetchedUsername] to [] //Also set to blank.
repeat until <(letter (letter) of ([what to decode])) = [|]>
change [ letter] by (1)
if <not <(letter (letter) of ([what to decode])) = [|]>> then
set [ fetchedUsername] to (join (fetchedUsername) (letter (letter) of ([what to decode])))
end
end
change [ letter] by (1)
repeat until <(letter (letter) of ([what to decode])) = [|]>
change [ letter] by (1)
if <not <(letter (letter) of ([what to decode])) = [|]>> then
set [ temporaryCoins] to (join (temporaryCoins) (letter (letter) of ([what to decode])))
end
end
if <(username) = [fetchedUsername]> then
set [ coins] to []
end
Basically this just goes through every letter starting at 1 and until it hits a | it keeps adding the letter of whats encoded to whatever is first (for this example it's your username). Once it reaches a | it stops adding letters to your username and skips the | then starts to add the letters fetched to the temporaryCoins. Once it reaches another | it stops finally and checks if you username equals the one fetched, if so then it sets your coins to the coins fetched.
Hope this helps! (And works lol. I believe it does but I'm not too sure.)
15+ (not revealing age) girl. Pronouns are she/her.
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
- Malicondi
- Scratcher
1000+ posts
How to create save codes?
Sorry, I can't give anyone that, it's technically against the Well it depends. If you want it so people can't easily just alter it you'll either have to use some really advanced encoder, or just hide the code by editing the JSON file. If @Malicondi happens to see this post he can probably provide you with a link on how to edit the JSON file, cuz I don't know how lol.Terms of Use :p
post #1000 post #100 i help in the forums post #1 post #500 0 second ninja
I recommend reading jvvg's essay about the scratch team before complaining, as it may change your opinion and provide insight on the topic.
coming soon :)
I recommend reading jvvg's essay about the scratch team before complaining, as it may change your opinion and provide insight on the topic.
coming soon :)
- SuperGamerGG2
- Scratcher
69 posts
How to create save codes?
i starting to use griffpatch's tutorial. this is pretty much the same! Thanks anyway!yes i need help decoding it. plsWell it depends. If you want it so people can't easily just alter it you'll either have to use some really advanced encoder, or just hide the code by editing the JSON file. If @Malicondi happens to see this post he can probably provide you with a link on how to edit the JSON file, cuz I don't know how lol. Hello, I'm trying to make a save code mechanism in the “save data” sprite, but I just stuck. Please help me!
https://scratch.mit.edu/projects/969611148/editor/
But if you don't mind people being able to change it then:when I receive [ generate code]
set [ code] to (join [username] (join [|] (join (coins) [|])))
If you need the decoding script too, ask.
Hope I helped btw!
Here:when I receive [ encode]
set [ code] to (join (username) (join [|] (join (coins) [|])))
define decode (what to decode)//set to run without screen refresh
set [ letter] to [0]
set [ temporaryCoins] to [] //Make sure this is blank, no space or anything.
set [ fetchedUsername] to [] //Also set to blank.
repeat until <(letter (letter) of ([what to decode])) = [|]>
change [ letter] by (1)
if <not <(letter (letter) of ([what to decode])) = [|]>> then
set [ fetchedUsername] to (join (fetchedUsername) (letter (letter) of ([what to decode])))
end
end
change [ letter] by (1)
repeat until <(letter (letter) of ([what to decode])) = [|]>
change [ letter] by (1)
if <not <(letter (letter) of ([what to decode])) = [|]>> then
set [ temporaryCoins] to (join (temporaryCoins) (letter (letter) of ([what to decode])))
end
end
if <(username) = [fetchedUsername]> then
set [ coins] to []
end
Basically this just goes through every letter starting at 1 and until it hits a | it keeps adding the letter of whats encoded to whatever is first (for this example it's your username). Once it reaches a | it stops adding letters to your username and skips the | then starts to add the letters fetched to the temporaryCoins. Once it reaches another | it stops finally and checks if you username equals the one fetched, if so then it sets your coins to the coins fetched.
Hope this helps! (And works lol. I believe it does but I'm not too sure.)
when problem [solved v]
broadcast [be happy v]
stop [this script v]
Hi! I'm SuperGamerGG2. Click on the links below!
My Profile | Define Scratch | My BFB Camp Team | Game
- SuperGamerGG2
- Scratcher
69 posts
How to create save codes?
oh.Sorry, I can't give anyone that, it's technically against the Well it depends. If you want it so people can't easily just alter it you'll either have to use some really advanced encoder, or just hide the code by editing the JSON file. If @Malicondi happens to see this post he can probably provide you with a link on how to edit the JSON file, cuz I don't know how lol.Terms of Use :p
Hi! I'm SuperGamerGG2. Click on the links below!
My Profile | Define Scratch | My BFB Camp Team | Game
- Discussion Forums
- » Help with Scripts
- » How to create save codes?