Discuss Scratch
- Discussion Forums
 - » Project Save & Level Codes
 - » Zoomscript Code Sharing
        
         
- -llll-
 - 
                            
						
						
                            Scratcher
                        
						
						 
28 posts
Zoomscript Code Sharing
Hi all,
I'm opening this forum so the community can share their Zoomscript programs easily. Use the new import/export feature!
Here are a few sample programs I made:
                        
                            I'm opening this forum so the community can share their Zoomscript programs easily. Use the new import/export feature!

Here are a few sample programs I made:
Tube calculator
¶0¶# Let's make a tube¶0¶var len¶0¶var radius¶0¶var pi¶0¶¶0¶pi = 3.14159265¶0¶lock pi¶0¶¶0¶len & ask "How long is the tube?"¶0¶radius & ask "What's the radius?"¶0¶¶0¶var result¶0¶result & math (len,"*",pi,"*",radius,"^2")¶0¶¶0¶print ("Your tube's area is ",result)
Reverse string
¶0¶var str¶0¶print "Enter a string: "¶0¶str & get¶0¶¶0¶var ii¶0¶var output¶0¶var len¶0¶¶0¶len & strlen str¶0¶ii = len¶0¶¶0¶repeat len¶1¶output & getchar ii str¶1¶print output¶1¶ii--¶0¶endrepeat
Last edited by -llll- (Jan. 8, 2020 06:52:39)
- furrypig
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
Zoomscript Code Sharing
This one's kinda simple but I'm just getting used to it
It asks your name, how you're doing, then asks for math equations to solve
wow, it took me like 45 minutes to learn how to use it and make this :P
                        
                            It asks your name, how you're doing, then asks for math equations to solve
print "what's your name :P"
println
speak "what's your name?"
var name
name & get
print ("oh hello ",name,", how are you?")
println
var mood
mood & get
if eq mood "good"
print "that's great!"
else
if eq mood "bad"
print "oh, that's sad :("
else
print "alright then"
endif
endif
println
print "let's do some math!"
println
print "give me a math equation."
println
var equation
var solved
while eq "hi" "hi"
equation & get
solved & math equation
print ("the answer is ",solved)
println
print "give me another equation!"
println
endwhile
wow, it took me like 45 minutes to learn how to use it and make this :P
Last edited by furrypig (Jan. 5, 2020 07:29:15)
- furrypig
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
Zoomscript Code Sharing
Guess the number between 1 and 1000! With the details of whether your guess was too high or too low, try to guess the number and as little steps as possible!
                        
                        
                    var randnum
var guess
randnum & random 1 1000
print "I'm thinking of a number between 1 and 1000"
println
guess = 0
while ne randnum guess
print "Guess: "
guess & get
if lt guess randnum
print "Too low!"
else
if gt guess randnum
print "Too high!"
else
print "Correct!"
endif
endif
println
endwhile
print "Nice job, you win!"
- theXliner
 - 
                            
						
						
                            Scratcher
                        
						
						 
83 posts
Zoomscript Code Sharing
Make the tutorial simpler… otherwise, make it here? MAKE A TUTORIAL YT VID!!!! #JustAnIdea
- -llll-
 - 
                            
						
						
                            Scratcher
                        
						
						 
28 posts
Zoomscript Code Sharing
Make the tutorial simpler… otherwise, make it here? MAKE A TUTORIAL YT VID!!!! #JustAnIdeaWhat part are you finding difficult?
- theXliner
 - 
                            
						
						
                            Scratcher
                        
						
						 
83 posts
Zoomscript Code Sharing
well ( not that i cant understand it) first, the volcabulary, second, plz add gifs to the site like examples or work-in-action, third, Youtube vids… add'em.Make the tutorial simpler… otherwise, make it here? MAKE A TUTORIAL YT VID!!!! #JustAnIdeaWhat part are you finding difficult?
Finally, make a project tutorial about the project
EDIT: And it's just an idea
Last edited by theXliner (Jan. 7, 2020 03:12:19)
- Somari
 - 
                            
						
						
                            Scratcher
                        
						
						 
48 posts
Zoomscript Code Sharing
A usual snippet of some text adventure games.
                        
                        
                    var x
var y
var input
x = 0
y = 0
while ne input “exit”
print (“you're at x: ”,x,“ and y: ”,y)
println
print “type north, east, south, west, or exit.”
println
if eq input “north”
y++
endif
if eq input “south”
y–
endif
if eq input “east”
x++
endif
if eq input “west”
x–
endif
endwhile
- -CodeCraft-
 - 
                            
						
						
                            Scratcher
                        
						
						 
18 posts
Zoomscript Code Sharing
1 var name(sorry it's my first program it is really basic)
2 #creates a variable and calls it “name”
3 print “What is your name?”
4 name & get
5 #creates text asking for your name
6 print (name,“ is a great name!”)
7 #creates text saying “name is a great name!”
Last edited by -CodeCraft- (Jan. 7, 2020 20:23:51)
- -CodeCraft-
 - 
                            
						
						
                            Scratcher
                        
						
						 
18 posts
Zoomscript Code Sharing
var number
var input
var highestvalue
highestvalue = 5
#creates variables and sets the highest value
number & random 1 highestvalue
print (“pick a number 1-”,highestvalue)
println
input & get
#gets a random number 1-5 and sets the “number” variable to that number then asks for input
if eq input number
print “you got it right!”
else
print (“you got it wrong, you said ”,input,“ it really was ”,number)
endif
#checks if you guessed the number right
Import Code
¶0¶var number¶0¶var input¶0¶var highestvalue¶0¶highestvalue = 10¶0¶number & random 1 highestvalue¶0¶#creates three variables and sets the highest value to 10¶0¶¶0¶print (“guess a number 1-”,highestvalue)¶0¶println¶0¶input & get¶0¶#prints guess a number 1-10 and gets an input¶0¶¶0¶if eq number input¶1¶print “you got it right!”¶0¶else¶1¶print (“you got it wrong, it was really ”,number)¶0¶endif¶0¶#checks if you got the answer and tells you if you were right¶0¶
Last edited by -CodeCraft- (Jan. 8, 2020 15:38:40)
- dillyd
 - 
                            
						
						
                            Scratcher
                        
						
						 
36 posts
Zoomscript Code Sharing
I just want to say that this is super cool! Can't wait for importing to be fixed
                        
                        
                    - -llll-
 - 
                            
						
						
                            Scratcher
                        
						
						 
28 posts
Zoomscript Code Sharing
I just want to say that this is super cool! Can't wait for importing to be fixedThanks!
The next update will support importing and exporting. Working on it!
- -CodeCraft-
 - 
                            
						
						
                            Scratcher
                        
						
						 
18 posts
Zoomscript Code Sharing
I just want to say that this is super cool! Can't wait for importing to be fixedThanks!
The next update will support importing and exporting. Working on it!
Cool! I can't wait!
Last edited by -CodeCraft- (Feb. 27, 2020 16:06:39)
- -llll-
 - 
                            
						
						
                            Scratcher
                        
						
						 
28 posts
Zoomscript Code Sharing
This code is for @Schmams
                        
                        
                    var x
x = 2
x & math (x,“+2”)
print x
- Smanrocks
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
Zoomscript Code Sharing
Is there a why to make arrays if not could you add that you could make a maze game with that
                        
                        
                    - jonascar_beta
 - 
                            
						
						
                            Scratcher
                        
						
						 
2 posts
Zoomscript Code Sharing
I have a proposal for you I call it “SuKa”  
here's the basic syntax
“<START>
x = 5
if (x = 5) {
// code goes here
}
x = x
<END>
”
    
    
                        
                            here's the basic syntax
“<START>
x = 5
if (x = 5) {
// code goes here
}
x = x
<END>
”
Hope you Like It::#888888
I'll post more stuff::#888888
Last edited by jonascar_beta (Jan. 9, 2020 22:46:37)
- AutumnSparks
 - 
                            
						
						
                            Scratcher
                        
						
						 
34 posts
Zoomscript Code Sharing
I have a question.
Does anyone know how to code it so if there’s a yes or no question and you answer, it will know you chose “no” and will say different stuff then it would if you said yes? I’m not sure if this is a super easy thing to answer, but I didn’t quite understand the website that explained everything so I’m trying to learn with experience.
                        
                            Does anyone know how to code it so if there’s a yes or no question and you answer, it will know you chose “no” and will say different stuff then it would if you said yes? I’m not sure if this is a super easy thing to answer, but I didn’t quite understand the website that explained everything so I’m trying to learn with experience.
Last edited by AutumnSparks (Jan. 10, 2020 00:36:24)
- Somari
 - 
                            
						
						
                            Scratcher
                        
						
						 
48 posts
Zoomscript Code Sharing
Decoding and printing key-value pairsfixed
¶0¶var in #inputs ¶0¶var lena #lengths ¶0¶var iteri iterj #iterators ¶0¶var stra #strings ¶0¶var chara #characters ¶0¶var statea #states ¶0¶#start ¶0¶print “Type key-value pairs then press enter.” ¶0¶println ¶0¶println ¶0¶print "Type them in this way -> :,:, …“ ¶0¶println ¶0¶println ¶0¶print ”Replace and with anything.“ ¶0¶println ¶0¶println ¶0¶print ”Always put a colon \“:\” after “ ¶0¶println ¶0¶print ”and a comma \“,\” after .“ ¶0¶println ¶0¶println ¶0¶println ¶0¶in & get ¶0¶clear ¶0¶print ”You might want to turn on turbo mode.“ ¶0¶println ¶0¶println ¶0¶println ¶0¶#prints all the keys and the value assigned to them ¶0¶#setup ¶0¶lena & strlen in ¶0¶lena & math (lena,”+“,1) ¶0¶iteri = 1 ¶0¶iterj = 0 ¶0¶statea = ”key“ ¶0¶stra = ”“ ¶0¶#loop ¶0¶while lt iteri lena ¶1¶chara & getchar iteri in ¶1¶if eq chara ”:“ ¶1¶#got key ¶2¶iterj = iteri ¶2¶iteri++ ¶2¶statea = ”value“ ¶2¶#print key component of the pair ¶2¶print (”\(key\) “,stra,”: “) ¶2¶chara = ”“ ¶1¶endif ¶1¶if eq chara ”,“ ¶1¶#got value ¶2¶iterj = iteri ¶2¶iteri++ ¶2¶statea = ”key“ ¶2¶#print value component of the pair ¶2¶print (”\(value\) “,stra) ¶2¶println ¶2¶println ¶2¶chara = ”“ ¶1¶endif ¶1¶stra & stringcrop in iterj iteri ¶1¶iteri++ ¶1¶if eq iteri lena ¶2¶if eq statea ”value“ ¶3¶#got last value of the last key ¶3¶statea = ”key“ ¶3¶print (”\(value\) “,stra) ¶3¶println ¶2¶endif ¶1¶endif ¶0¶endwhile ¶0¶println ¶0¶print ”Done."
Last edited by Somari (Jan. 10, 2020 21:59:44)
- Discussion Forums
 - » Project Save & Level Codes
 - 
            » Zoomscript Code Sharing 
         
            










