 |
albo Apprentice
Joined: 27 Mar 2008 Posts: 106
|
Posted: Mon Dec 09, 2019 11:58 pm
Which languages can I use with CMUD? |
Hi Everyone,
I read somewhere that CMUD could take lots of scripting languages, for example Python or JavaScript. Is that true? Which languages could I use for creating logic with CMUD? |
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4733 Location: Pensacola, FL, USA
|
Posted: Tue Dec 10, 2019 3:09 am |
There is a language dropdown bar selection for each individual setting.
JScript
VBScript
XML
Lua
and zScript
Are available automatically.
I believe you can use any language you have installed locally as well. |
|
_________________ Discord: Shalimarwildcat |
|
|
 |
albo Apprentice
Joined: 27 Mar 2008 Posts: 106
|
Posted: Thu Apr 02, 2020 1:50 am A Followup |
Hi There,
Thanks so much for the reply! I guess I wasn't sure if JScript was referring to JavaScript or not. Now I know. How do I get JavaScript to interact with the MUD though, or with CMUD even?
For example let's say I had the following JavaScript:
var thisItem = 1;
var identify = "lore ";
var thePeriod = ".";
var keepGoing = true;
while (keepGoing)
{
thisItem++;
identify + thisItem + thePeriod;
}
I'm trying to send a command to the MUD to identify an item, and there are triggers that would act off of that to capture what is found and send that information to a database within CMUD. One such trigger would eventually set the value of VAR keepGoing to false and stop the loop. |
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4733 Location: Pensacola, FL, USA
|
Posted: Sat Apr 04, 2020 11:22 am |
While I am sure it CAN be done, I don't know the proper syntax for passing stuff from javascript to CMUD and back.
Also, the way CMUD works with external databases can sometimes be a bit tricky.
Is there a specific reason for your script using javascript outside of personal familiarity?
All you have mentioned can be accomplished natively. |
|
_________________ Discord: Shalimarwildcat |
|
|
 |
albo Apprentice
Joined: 27 Mar 2008 Posts: 106
|
Posted: Sun Apr 05, 2020 8:52 am |
I was trying to learn how to script in CMUD, by starting out with something simple at first. I want to learn how to write functions in CMUD and then write scripts that call functions, because right now I'm sitting on just massive amounts of classes and triggers. I'd rather have triggers populating variables and then have logic working with those variables to do things housed in functions and based of the outcome of functions. I believe this approach would be easier to maintain, more precise, powerful, and easier to update.
If you are willing, I'm willing to do a meeting of some sort with screen sharing so that you can actually see what I'm working with and perhaps we could come to a better understanding of what I'm actually doing and what I'd like to do. |
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4733 Location: Pensacola, FL, USA
|
Posted: Mon Apr 06, 2020 11:27 am |
Well if you want to learn CMUD scripting, I suggest trying to learn the native zScript language.
That's where I can offer the most help.
While CMUD does have the potential for using other languages, you then have to deal with the translation issues of getting and setting the CMUD variables in said language, which I am not the best at.
I am willing. |
|
_________________ Discord: Shalimarwildcat |
|
|
 |
albo Apprentice
Joined: 27 Mar 2008 Posts: 106
|
Posted: Mon Apr 06, 2020 7:08 pm |
I can't tell you how awesome that would be to have you help me like that! How would you like to do that, when are you available for that? I'm not sure if Skype offers screen sharing. I have webex and I know it offers screen sharing, but I'm not sure how to set one of those up. I only use it for school and the teacher always sets up the meeting.
|
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4733 Location: Pensacola, FL, USA
|
Posted: Tue Apr 07, 2020 4:50 pm |
I have taught plenty of people right here on these forums.
Once walked through a few issues, people start understanding the #HELP files better, and it becomes more a matter of finding which command or function best accomplishes the stated goal.
The forum has the added benefit of being searchable, so others who come latter can learn from the issues you have stumbled over. |
|
_________________ Discord: Shalimarwildcat |
|
|
 |
albo Apprentice
Joined: 27 Mar 2008 Posts: 106
|
Posted: Wed Apr 08, 2020 10:45 pm |
Okay, I'll start a new thread in that case so the subject of the thread fits better.
|
|
|
 |
torni Newbie
Joined: 18 Apr 2020 Posts: 1
|
Posted: Sat Apr 18, 2020 10:38 am |
I am using all these languages. Give it a try bro!
JScript
VBScript
XML
Lua
and zScript |
|
|
 |
|
|