Discuss Scratch

IcedMocha238
Scratcher
100+ posts

screviews code dump!

ADMIN VIEW
when this sprite clicked
if <[adminlistforshop:] contains (username) ?> then
switch costume to [admin]
else
switch costume to [nonadmin]
end
- Cotton_Scratch

Last edited by IcedMocha238 (March 21, 2024 14:38:53)


“i stare only at beautiful people <3”
IcedMocha238
Scratcher
100+ posts

screviews code dump!

bump?

“i stare only at beautiful people <3”
Cotton_Scratch
Scratcher
100+ posts

screviews code dump!

possible review system:

when this sprite clicked
if <[adminlistforshop] contains (username) ?> then
say [an admin cannot rate their own shop] for (2) secs
else
ask [0-5 stars] and wait
add (join (username) (join [: ] (answer))) to [reviews]
end

the list would be shown when viewing the shop, or we can average it out and put into a new variable, for this we would instead do:

when this sprite clicked
if <[adminlistforshop] contains (username) ?> then
say [an admin cannot rate their own shop] for (2) secs
else
ask [0-5 stars] and wait
set [ratings] to ((ratings) + (answer))
add (answer) to [ratings]
set [rating] to (((ratings) / (length of [ratings] :: list))
end
(obviously variables and lists would be named something else)

Last edited by Cotton_Scratch (March 23, 2024 18:28:45)


Hello! I am Cotton_Scratch but I go by Cotton, I use all pronouns but I prefer She/Her. I am as3xual and possibly lesbian, but I'm not sure. I LOVE warrior cats and Wings of Fire. Thank you for reading, have a good day!

Join my collab(s)!
Cat-Gen (Temporarily on hold-will be reopened within the next 6 months)
Stories From Space

Join my RP! (Please, I'm kinda desperate):
Orbital Residence

Collabs I'm apart of:
Kokoro Beats
Screviews
Cotton_Scratch
Scratcher
100+ posts

screviews code dump!

Okay, here's something for reactions:

Cotton_Scratch wrote:

possible review system:

when this sprite clicked
if <[adminlistforshop] contains (username) ?> then
say [an admin cannot rate their own shop] for (2) secs
else
ask [0-5 stars] and wait
if <(answer) > [4.5]> then
set [emoji] to [:D]
else
if <<(answer) > [3.5]> and <(answer) < [4.5]>> then
set [emoji] to [:)]
else
if <<(answer) > [2.5]> and <(answer) < [3.5]>> then
set [emoji] to [:|]
else
if <<(answer) > [1.5]> and <(answer) < [2.5]>> then
set [emoji] to [:/]
else
if <<(answer) > [-0.1]> and <(answer) < [1.5]>> then
set [emoji] to [:(]
else

end
end
end
end
end
add (join (username) (join [: ] (answer))) to [reviews]
end

the list would be shown when viewing the shop, or we can average it out and put into a new variable, for this we would instead do:

when this sprite clicked
if <[adminlistforshop] contains (username) ?> then
say [an admin cannot rate their own shop] for (2) secs
else
ask [0-5 stars] and wait
set [ratings] to ((ratings) + (answer))
add (answer) to [ratings]
set [rating] to (((ratings) / (length of [ratings] :: list))
if <[adminlistforshop] contains (username) ?> then
say [an admin cannot rate their own shop] for (2) secs
else
ask [0-5 stars] and wait
if <(rating) > [4.5]> then
set [emoji] to [:D]
else
if <<(rating) > [3.5]> and <(rating) < [4.5]>> then
set [emoji] to [:)]
else
if <<(rating) > [2.5]> and <(rating) < [3.5]>> then
set [emoji] to [:|]
else
if <<(rating) > [1.5]> and <(rating) < [2.5]>> then
set [emoji] to [:/]
else
if <<(rating) > [-0.1]> and <(rating) < [1.5]>> then
set [emoji] to [:(]
else

end
end
end
end
end
end
(obviously variables and lists would be named something else)

Last edited by Cotton_Scratch (March 28, 2024 10:23:24)


Hello! I am Cotton_Scratch but I go by Cotton, I use all pronouns but I prefer She/Her. I am as3xual and possibly lesbian, but I'm not sure. I LOVE warrior cats and Wings of Fire. Thank you for reading, have a good day!

Join my collab(s)!
Cat-Gen (Temporarily on hold-will be reopened within the next 6 months)
Stories From Space

Join my RP! (Please, I'm kinda desperate):
Orbital Residence

Collabs I'm apart of:
Kokoro Beats
Screviews
IcedMocha238
Scratcher
100+ posts

screviews code dump!

Cotton_Scratch wrote:

Okay, here's something for reactions:

Cotton_Scratch wrote:

possible review system:

when this sprite clicked
if <[adminlistforshop] contains (username) ?> then
say [an admin cannot rate their own shop] for (2) secs
else
ask [0-5 stars] and wait
if <(answer) > [4.5]> then
set [emoji] to [:D]
else
if <<(answer) > [3.5]> and <(answer) < [4.5]>> then
set [emoji] to [:)]
else
if <<(answer) > [2.5]> and <(answer) < [3.5]>> then
set [emoji] to [:|]
else
if <<(answer) > [1.5]> and <(answer) < [2.5]>> then
set [emoji] to [:/]
else
if <<(answer) > [-0.1]> and <(answer) < [1.5]>> then
set [emoji] to [:(]
else

end
end
end
end
end
add (join (username) (join [: ] (answer))) to [reviews]
end

the list would be shown when viewing the shop, or we can average it out and put into a new variable, for this we would instead do:

when this sprite clicked
if <[adminlistforshop] contains (username) ?> then
say [an admin cannot rate their own shop] for (2) secs
else
ask [0-5 stars] and wait
set [ratings] to ((ratings) + (answer))
add (answer) to [ratings]
set [rating] to (((ratings) / (length of [ratings] :: list))
if <[adminlistforshop] contains (username) ?> then
say [an admin cannot rate their own shop] for (2) secs
else
ask [0-5 stars] and wait
if <(rating) > [4.5]> then
set [emoji] to [:D]
else
if <<(rating) > [3.5]> and <(rating) < [4.5]>> then
set [emoji] to [:)]
else
if <<(rating) > [2.5]> and <(rating) < [3.5]>> then
set [emoji] to [:|]
else
if <<(rating) > [1.5]> and <(rating) < [2.5]>> then
set [emoji] to [:/]
else
if <<(rating) > [-0.1]> and <(rating) < [1.5]>> then
set [emoji] to [:(]
else

end
end
end
end
end
end
(obviously variables and lists would be named something else)
cool! but i was thinking like a visual clickable review system, just like the V1. Any thoughts

“i stare only at beautiful people <3”
Cotton_Scratch
Scratcher
100+ posts

screviews code dump!

IcedMocha238 wrote:

Cotton_Scratch wrote:

-snip-
cool! but i was thinking like a visual clickable review system, just like the V1. Any thoughts
Hmm… I'll do that shortly

Hello! I am Cotton_Scratch but I go by Cotton, I use all pronouns but I prefer She/Her. I am as3xual and possibly lesbian, but I'm not sure. I LOVE warrior cats and Wings of Fire. Thank you for reading, have a good day!

Join my collab(s)!
Cat-Gen (Temporarily on hold-will be reopened within the next 6 months)
Stories From Space

Join my RP! (Please, I'm kinda desperate):
Orbital Residence

Collabs I'm apart of:
Kokoro Beats
Screviews
cactus-cacti
Scratcher
100+ posts

screviews code dump!

Here's a possible popularity ranking system:

when I receive [viewing shop v]
change [views v] by (1)
add [shop name] to [viewed shops v]

(figuring out how to organize the shops in the list by how many views they have)

Cotton_Scratch
Scratcher
100+ posts

screviews code dump!

Cotton_Scratch wrote:

IcedMocha238 wrote:

Cotton_Scratch wrote:

-snip-
cool! but i was thinking like a visual clickable review system, just like the V1. Any thoughts
Hmm… I'll do that shortly
How about this:
when this sprite clicked
if <<[insert rating] > [4.5]>> then
set [emoji] to [:D]
else
if <<[insert rating] > [3.5]>> then
set [emoji] to [:)]
else
if <<[insert rating] > [2.5]>> then
set [emoji] to [:|]
else
if <<[insert rating] > [1.5]>> then
set [emoji] to [:/]
else
if <<[insert rating] < [1.6]>> then
set [emoji] to [:(]
else

end
end
end
end
end

though the code from V1 to click the stars would be added into this code, maybe a few changes though.

Last edited by Cotton_Scratch (March 28, 2024 14:55:50)


Hello! I am Cotton_Scratch but I go by Cotton, I use all pronouns but I prefer She/Her. I am as3xual and possibly lesbian, but I'm not sure. I LOVE warrior cats and Wings of Fire. Thank you for reading, have a good day!

Join my collab(s)!
Cat-Gen (Temporarily on hold-will be reopened within the next 6 months)
Stories From Space

Join my RP! (Please, I'm kinda desperate):
Orbital Residence

Collabs I'm apart of:
Kokoro Beats
Screviews
Cotton_Scratch
Scratcher
100+ posts

screviews code dump!

Cotton_Scratch wrote:

Cotton_Scratch wrote:

IcedMocha238 wrote:

Cotton_Scratch wrote:

-snip-
cool! but i was thinking like a visual clickable review system, just like the V1. Any thoughts
Hmm… I'll do that shortly
How about this:
when this sprite clicked
if <<[insert rating] > [4.5]>> then
set [emoji] to [:D]
else
if <<[insert rating] > [3.5]>> then
set [emoji] to [:)]
else
if <<[insert rating] > [2.5]>> then
set [emoji] to [:|]
else
if <<[insert rating] > [1.5]>> then
set [emoji] to [:/]
else
if <<[insert rating] < [1.6]>> then
set [emoji] to [:(]
else

end
end
end
end
end

though the code from V1 to click the stars would be added into this code, maybe a few changes though.
oh, and we should add a way to rate it using half stars too, so that people can give a more accurate rating.

Hello! I am Cotton_Scratch but I go by Cotton, I use all pronouns but I prefer She/Her. I am as3xual and possibly lesbian, but I'm not sure. I LOVE warrior cats and Wings of Fire. Thank you for reading, have a good day!

Join my collab(s)!
Cat-Gen (Temporarily on hold-will be reopened within the next 6 months)
Stories From Space

Join my RP! (Please, I'm kinda desperate):
Orbital Residence

Collabs I'm apart of:
Kokoro Beats
Screviews
IcedMocha238
Scratcher
100+ posts

screviews code dump!

Cotton_Scratch wrote:

Cotton_Scratch wrote:

Cotton_Scratch wrote:

IcedMocha238 wrote:

Cotton_Scratch wrote:

-snip-
cool! but i was thinking like a visual clickable review system, just like the V1. Any thoughts
Hmm… I'll do that shortly
How about this:
when this sprite clicked
if <<[insert rating] > [4.5]>> then
set [emoji] to [:D]
else
if <<[insert rating] > [3.5]>> then
set [emoji] to [:)]
else
if <<[insert rating] > [2.5]>> then
set [emoji] to [:|]
else
if <<[insert rating] > [1.5]>> then
set [emoji] to [:/]
else
if <<[insert rating] < [1.6]>> then
set [emoji] to [:(]
else

end
end
end
end
end

though the code from V1 to click the stars would be added into this code, maybe a few changes though.
oh, and we should add a way to rate it using half stars too, so that people can give a more accurate rating.
sure thing! i'll talk to the UI scratchers about this!!

“i stare only at beautiful people <3”
IcedMocha238
Scratcher
100+ posts

screviews code dump!

cactus-cacti wrote:

Here's a possible popularity ranking system:

when I receive [viewing shop v]
change [views v] by (1)
add [shop name] to [viewed shops v]

(figuring out how to organize the shops in the list by how many views they have)
awesome idea!

“i stare only at beautiful people <3”
Cotton_Scratch
Scratcher
100+ posts

screviews code dump!

cactus-cacti wrote:

Here's a possible popularity ranking system:

when I receive [viewing shop v]
change [views v] by (1)
add [shop name] to [viewed shops v]

(figuring out how to organize the shops in the list by how many views they have)
I have one edit to make to this:
when I receive [viewing shop v]
change [views v] by (1)
if <[viewed shops] contains [shop name] ?> then

else
add [shop name] to [viewed shops v]
end
This just makes it so that the shop isn’t added more than once

Last edited by Cotton_Scratch (March 29, 2024 14:19:00)


Hello! I am Cotton_Scratch but I go by Cotton, I use all pronouns but I prefer She/Her. I am as3xual and possibly lesbian, but I'm not sure. I LOVE warrior cats and Wings of Fire. Thank you for reading, have a good day!

Join my collab(s)!
Cat-Gen (Temporarily on hold-will be reopened within the next 6 months)
Stories From Space

Join my RP! (Please, I'm kinda desperate):
Orbital Residence

Collabs I'm apart of:
Kokoro Beats
Screviews
IcedMocha238
Scratcher
100+ posts

screviews code dump!

Cotton_Scratch wrote:

cactus-cacti wrote:

Here's a possible popularity ranking system:

when I receive [viewing shop v]
change [views v] by (1)
add [shop name] to [viewed shops v]

(figuring out how to organize the shops in the list by how many views they have)
I have one edit to make to this:
when I receive [viewing shop v]
change [views v] by (1)
if <[viewed shops] contains [shop name] ?> then

else
add [shop name] to [viewed shops v]
end
This just makes it so that the shop isn’t added more than once
thats great!

“i stare only at beautiful people <3”

Powered by DjangoBB