Welcome to Runtiscript v4! Here are the current functions: 1. set(x,y) sets the variable named x to the value y 2. log(x,(y)) says the value x for y seconds. If y is omitted it will use the default "say" command. 3. calc(x,y,sign,out) sets the variable named the value of out to the calculated value of x and y. Different operations are: | for concatination + for addition - for subtraction * for multiplication / for division 4. flag(name) creates a new flag at current line number with set name 5. goto(flag) sets line number to that of which is represented by given flag name; "goes to" input flag. 6. if(x,y,operator,flag) campares x to y according to operator. if true, then goto(flag). otherwise, continues on; operational goto. potential operators: > < = != <= >= 7. ask(a,b) asks a and sets the variable named the value of b to the answer
EXAMPLES BELOW LONG PARAGRAPH WOAH WOAH WOAH i thought i quit scratch? I did :) this was just for fun because runtiscript has so much potential and scratch is the best platform for people to discover it... so I remade it in a much less janky way. So far I started work on it this afternoon and it is published as of 9:45 today so it has been a bit rushed. I tried to make the code as understandable as possible for scratch and runtiscript learners alike :) make sure you don't use spaces unless it is part of a name of value. Always end a function with a semicolon(;). all flags are initiated before the program runs. here are some test scripts: count to 50: set("i","0");flag("loopStart");calc(i,"1","+","i");log(i);if(i,"50","!=","loopStart"); say "I have a cat and a cat and a cat..." 15 times: set("i","0");set("t","I have a cat");flag("loop");calc(i,"1","+","i");calc(t," and a cat","|","t");if(i,"15","!=","loop");log(t); fibbonacci sequence: set("a","1");set("b","1");set("buff","1");flag("start");set("buff",b);calc(a,b,"+","b");set("a",buff);log(a,"1");goto("start"); ceasar cypher(encoding): ask("What do you wanna encode?","in");set("out","");set("i","1");set("abc"," .!?abcdefghijklmnopqrstuvwxyz");calc(abc,abc,"|","abc");ask("How much of an offset?","offset");flag("letloop");calc(in,i,"?","curr");calc(i,"1","+","i");if(curr,"","=","end");set("j","0");flag("findloop");calc(j,"1","+","j");calc(abc,j,"?","temp");if(curr,temp,"=","conc");goto("findloop");flag("conc");calc(j,offset,"+","fin");calc(abc,fin,"?","fin");calc(out,fin,"|","out");goto("letloop");flag("end");log(out); a mod b: ask("a","a");ask("b","b");set("i","0");calc(a,b,"/","div");flag("heightloop");if(i,div,">=","after");calc(i,"1","+","i");goto("heightloop");flag("after");calc(i,"1","-","i");calc(div,i,"-","div");calc(div,b,"*","div");log(div);