ID:1259971
 
I've had no internet for the past week and decided to make my own scripting language.

Remember this was done for fun. ^_^

There is run-time error reporting, telling you the line and cause of the problem.

There is no documentation as of now :c

EVAL() is used but I have it disabled for the fact it crashs the client upon logging out and that seems to be annoying for most :P , so I've replaced it temporarily with simple math functions.

For example:
username ckey

if username == "kozuma3"
print "This is true!"
else then
print "This is false!"
end if

print "Done!"

Meep 1
Boop 5
Lolz 1
//Step & Lolz isn't needed, the default step-size is 1
//Printing Meep will always say 1 as FOR isn't increasing the actual values.
for Meep to Boop step Lolz
print "Hello! Meep will be 1 ; [Meep]!"
end for


This is the same as:
for 1 to 5
print "Hello!"
end for


Another:
A 5
while A
printl "A = [A] , "
min A 1
//sub A 1 --> in the next one.
if !A
print "Done!"
else then
print "Keep going!"
end if
end while
It's impressive!

I watched Kozuma using it through join.me and it looked great ^^ I hope more people download it. In the future it could be used by many developers in order to test stuff or even use them normally on their game without updating the game!
I did something kinda-sorta like this. Not really.

I made a little system to read script-like input from .txt files and generate cutscenes from what it reads. That way I can store all of the cutscenes separately rather than clogging up the .dmb.

Here's a snippet of a test cutscene:

talk player ...;
sleep 20;
talk Bell RIIIIIINNNNGGGGGG;
sleep 10;
talk player Finally, class is over.;
sleep 10;
walk player 6,9,1;
sleep 10;
walk player 6,20,1;
sleep 5;
walk player 17,20,1;
sleep 10;
talk player Huh?;
sleep 10;
walk player 20,15,1 0.5;
sleep 10;
talk player A fight?;
sleep 10;

Its pretty primitive but it's an easy system to modify and I like it.

Anyways, back on topic, good job!
I've added support to interact with and create objects and such.
The ability to set said objects variables and display them.
Also file2text & text2file has been added.

^-^

new obj1 /obj/Cookie
print "[obj1.name] is the objects name."

obj2 obj1

print "Object 2 is [obj2.name]"

set obj2 name "Kozzy"

print "Its new name is [obj2.name]!"
Nice. Keep at it, and have fun!
I've added "procs" :3

Everything begins in a Main() function.

function Main()
run Hello()
name GET()
run Hello()
end function


function GET()
return "Kozzy"
end function

function Hello()
print "Hello! [name]"
end function
Functions can now return other functions and such, and more :3

function Main()
print Check()
end function

function Check()
return OK()
end function

function OK()
name "Kozzy"
return "[name] is awesome!"
end function
Still working on it. Once things are made I'll tidy up the syntax :P

Parser Stats: 962 Lines, 31,709 characters.

Next up is
  • (DONE) switch & elif
  • else then --> else
  • (DONE) pick
  • (DONE) rand & round
  • (DONE) text2num & num2text
  • (DONE) fexists & copytext
  • (DONE) continue & break
  • (DONE) alert & alertlist
  • (DONE) call & prob & abs
  • (DONE) file2text & text2file
  • (DONE) findtext
  • (DONE) sleep & input

function Main()
Admins ("Kozuma3")
run checkGM()
run getName()
run getClass()
print "Your username is [name] and you're a [class]"
end function

function getName()
input name "What is your name?" "Name" as text
if name > 12
print "Your name must be 12 characters or less."
run getName()
end if
if name < 3
print "Your name must be 3 characters or more."
run getName()
end if
end function

function getClass()
alertlist class "What class would you like to be?","Class" in ("Guardian","Archer","Warlock")
end function

function checkGM()
if name in Admins
print "You're in the list..."
else
print "You're not in the list..."
end if
end function
Kozuma, stop being so freaking awesome...
Meep.
Everything has been implemented at the moment that I had planned. If anyone would like to test it out and check it out for themselves and give feedback it would be nice ^_^