Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
albo
Apprentice


Joined: 27 Mar 2008
Posts: 103

PostPosted: 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?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4232
Location: Pensacola, FL, USA

PostPosted: 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: Shalimar#3679
Reply with quote
albo
Apprentice


Joined: 27 Mar 2008
Posts: 103

PostPosted: 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.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4232
Location: Pensacola, FL, USA

PostPosted: 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: Shalimar#3679
Reply with quote
albo
Apprentice


Joined: 27 Mar 2008
Posts: 103

PostPosted: 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.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4232
Location: Pensacola, FL, USA

PostPosted: 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: Shalimar#3679
Reply with quote
albo
Apprentice


Joined: 27 Mar 2008
Posts: 103

PostPosted: 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.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4232
Location: Pensacola, FL, USA

PostPosted: 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: Shalimar#3679
Reply with quote
albo
Apprentice


Joined: 27 Mar 2008
Posts: 103

PostPosted: 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.
Reply with quote
torni
Newbie


Joined: 18 Apr 2020
Posts: 1

PostPosted: Sat Apr 18, 2020 10:38 am   
 
I am using all these languages. Give it a try bro!
JScript
VBScript
XML
Lua
and zScript
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net