COEmu NPC Scripting

09/20/2009 00:01 _tao4229_#1
In order to test a scripting language I wrote, I'd like to sell it.
This language is written in C#, and supports callbacks to any managed functions (meaning you can make the script do anything in your own code).

I can apply this to COEmu NPC scripting. I'll provide examples of syntax usage, and also discuss what anybody wants implemented as a function (naming, how it works etc.)
I'll provide proof it works if anyone so needs it. I can implement this into any source that's coded in .NET (C#, VB.NET... etc) not just COEmu, and it can also work with already raw-coded NPCs. It supports basic functions such as math on integers, function defining/calling, external function call backs, and string usage as parameters for functions. So far there's only two types implemented:
'number' which is defined back as a 32-bit signed integer, and
'text' which is defined back as a standard .NET System.String.

Anything needed can be easily defined as a function callback in a few lines of code.

Examples of syntax: (Basis of what I could implement.)
Code:
function: null mainDlg()
	say('Hello,~I~am~a~scripted~NPC.')
	option('Cool',1)
	option('Fail!',-1)
	face(30)
	end()
endfunc
function: null dlg1()
	say('Inorite?!')
	option('Bye.',-1)
	face(30)
	end()
endfunc
That's just a basic example of syntax. This language supports checking variables/return values from functions using this syntax:
Code:
check var = var
check var > var
check var < var
check var >= var
check var <= var
Of course the greater than/less than checks only apply to number values, but the = operator works on text as well. Example of checking would be as follows.

Code:
check getname() = 'tao4229'
    say('Hello~tao4229!')
else
    say('I~dont~know~you.')
endcheck
This syntax supports declaring variables/setting variables like this
Code:
number i = 0 + 1 + 2 - 3 * 7
i = i - 3
But doesn't support operators to be used on a check or calling a function:
IE
Code:
check i + 3 - 2 = 8
endcheck

or

function(i + 3, 2 - 1)
Won't work unless fixed by me.

Any questions just ask.
(There's a bit more to the language I've left out.)
If you've got a problem with the '~' inside text, I'll work on fixing that now, just couldn't be bothered when I was doing it earlier.
09/20/2009 00:05 lostsolder05#2
it's a pretty good system. i got to test it out earlier today, it'd say its definitely worth trying.
09/20/2009 01:39 KraHen#3
Looks nice :D Still I prefer LUA :(
09/20/2009 01:47 Empty Project#4
This is insane!
09/20/2009 02:45 _tao4229_#5
Quote:
Originally Posted by ElDeRnEcRo View Post
Looks nice :D Still I prefer LUA :(
I hate the LUA syntax, it's messy and more complex than C++ for defining things like classes, although useful for simple functions I guess.
I've tested it a bit now, most things work as I planned, fixing some things right now.
09/20/2009 03:09 KraHen#6
Btw, how do you store the commands of your language?
09/20/2009 04:11 t.bab#7
Quote:
Originally Posted by _tao4229_ View Post
In order to test a scripting language I wrote, I'd like to sell it.
I get it. We're paying you, so that we may be able to test the buggy scripting language that you wrote. But forget that it's buggy, if we're paying for it, it must be feature rich...right?
Quote:
Originally Posted by _tao4229_ View Post
This language is written in C#, and supports callbacks to any managed functions (meaning you can make the script do anything in your own code).
Great...
Quote:
Originally Posted by _tao4229_ View Post
I can apply this to COEmu NPC scripting. I'll provide examples of syntax usage, and also discuss what anybody wants implemented as a function (naming, how it works etc.)
Neat-o...
Quote:
Originally Posted by _tao4229_ View Post
I'll provide proof it works if anyone so needs it. I can implement this into any source that's coded in .NET (C#, VB.NET... etc) not just COEmu, and it can also work with already raw-coded NPCs. It supports basic functions such as math on integers, function defining/calling, external function call backs, and string usage as parameters for functions. So far there's only two types implemented:
'number' which is defined back as a 32-bit signed integer, and
'text' which is defined back as a standard .NET System.String.
Okay, but I still don't understand what sets your scripting language apart from others and why we should pay money for something that is most likely cumbersome and less usable than most free scripting languages.
Quote:
Originally Posted by _tao4229_ View Post
This syntax supports declaring variables/setting variables like this
Code:
number i = 0 + 1 + 2 - 3 * 7
i = i - 3
But doesn't support operators to be used on a check or calling a function:
IE
Code:
check i + 3 - 2 = 8
endcheck

or

function(i + 3, 2 - 1)
Won't work unless fixed by me.
Oh, so I guess that costs extra, don't it?

So, why do we have to pay to test your incomplete, buggy scripting language when we could find a better one?

Anyways, good luck.
09/20/2009 04:12 _tao4229_#8
Quote:
Originally Posted by ElDeRnEcRo View Post
Btw, how do you store the commands of your language?
What do you mean?
As in like ... 'say(..)' or the standard stuff that would be included like 'check'ing?

Quote:
Originally Posted by t.bab View Post
I get it. We're paying you, so that we may be able to test the buggy scripting language that you wrote. But forget that it's buggy, if we're paying for it, it must be feature rich...right?

Great...

Neat-o...

Okay, but I still don't understand what sets your scripting language apart from others and why we should pay money for something that is most likely cumbersome and less usable than most free scripting languages.

Oh, so I guess that costs extra, don't it?

So, why do we have to pay to test your incomplete, buggy scripting language when we could find a better one?

Anyways, good luck.
Find someone that could even implement LUA or any other language on these forums.
That is my point. I really don't care about the money, I'm just wondering if anyone is actually interested in this, I've tested it myself for all the stuff I've implemented, I mean test it in an actual environment of doing something. If anyone wants me to I'll implement it for free, PM me about it I guess. (Only if you actually know what you're fucking doing, please.)
Damn, I got owned -_-.
09/20/2009 13:10 _Emme_#9
If I have some spare time I can code something similuar that works for any source for the cheap people, but tao's code probably works better.