1

Scripting In Minecraft (Idea)

awesomecronin 6/22/15 9:54 am
347
6/22/2015 10:17 am
What if Minecraft had a script system like computer craft? I've been working in .vbs script for the past while, and I thought letting Minecraft have a programing system would be really cool! It could do math, run commands, and other things. For instance, this could be a simple calculator:

/inputbox (Enter First Number) result = a
/inputbox (Enter Second Number) result = b
/tellraw @a "Addition = (a) -- (b)"
/tellraw @a "Subtraction = (a) - (b)"
/tellraw @a "Multiplication = (a) * (b)"
/tellraw @a "Division = (a) / (b)"

What it does: "/inputbox" Opens a menu, like a command block menu. The text at the top "Set Console Command for Block" is the text in the parentheses. In this case, it's Enter First Number and Enter Second Number. When you type the input and press done, it's saved as "a". This can be used later. For the tellraw, that a and b stuff can only be done in... Shoot! I forgot where to put the script... There can be a special block like a command block? All right, that's good! Anyways, for the tellraw, that a and b stuff can only be done in the... umm... name... uh... COMPUTER! Yeah that sounds good... /tellraw @a "Addition = (a) -- (b)" does the actual math. It says "Addition = (a+b)". See the built in math capabilities? What about scoreboard functionality?

/scoreboard objectives add Score dummy result = a

This means the objective "Score" will be saved as "a". Easy highscore system!

/scoreboard players test @a Highscore {(b) < (a)} 9999

This will test if the Highscore (Saved as "b") score is less than the Score (Saved as "a") score. Notice that the testing for the Score score is inside curly brackets. This tells the code block that it's a special function, and should treat everything inside them as one argument. One command function? Check!

/scoreboard objectives add Score dummy
/kill @a[score_Score_min=1] (clock)
/scoreboard players set @a Score 0 (clock)

One command! The scoreboard command only gets executed ONCE because it doesn't have the clock feature at the end. As for the kill and other scoreboard, they will get executed 20 times a second, because they have the clock. As long as the computer has a redstone signal, it will activate all the clock commands. And, it's way more compact because you don't have to use /summon, riding, NBT and all of that. I think it's a good idea, and I don't know a lot about coding, so feel free to comment constructive criticism!
Posted by
awesomecronin
Level 52 : Grandmaster System
39

  Have something to say?

JoinSign in

4

Civeberg
06/22/2015 10:13 am
Level 29 : Expert Lumberjack
Uhh, minecraft's code is mainly Java. So if they did, it should definitely be java instead of VBScript, which not a lot of people know. There's already a mod called the Turtle Mod or something like this which allows you to do something similar I think. I haven't looked into it, but you should research it a little
1
awesomecronin
06/22/2015 10:17 am
Level 52 : Grandmaster System
It's called computer craft, and I want to learn how to code it. Also, you're right about the java thing. Just an idea
1
Scarsz
06/22/2015 9:59 am
Level 22 : Expert Network
Creating .vbs files is scripting, not "coding", terms wise.If you want a scripting language, look at ComputerCraft. http://www.computercraft.info/
1
awesomecronin
06/22/2015 10:10 am
Level 52 : Grandmaster System
See? I know nothing... BTW I changed the title, etc. Thanks
1

Welcome