ID:137447
 
Im wondering, is there anyway to have a verb panel which sends commands and such WHILE the text screen is connected to a text MUD ? If not this would be a good feature.
Rcet wrote:
Im wondering, is there anyway to have a verb panel which sends commands and such WHILE the text screen is connected to a text MUD ? If not this would be a good feature.

Yes, in fact there is! What you do is create a .dms script file containing command aliases.

Example:

#define URL "telnet://mymud.com:123"
alias/say(T as text)
   return "say [T]"


You can then execute this .dms file and it will automatically connect you to the target and provide the commands in your verb panel. The default .dms file for telnet connections is Byond/users/you/cfg/telnet.dms. It contains no visible commands, but it turns the arrow keys into typical direction commands that would work in most MUDs.

--Dan

In response to Dan
Ok i cant really get it to do it..


Do i JUST add the script? can i have more code? can you give me more detail or is there a help file on how to do it?

thanks



-Rcet
In response to Rcet
Something better, i feel so stupid.


How do i execute the script?




-Rcet
In response to Dan
I`ve been wondering how to do this also
In response to Rcet
Create a file called test.dms and paste in the contents of my previous post. (You should open this file with notepad or something equivalent. It's got to be plain text.) When you double-click this file, it should automatically launch Dream Seeker, connect to the URL specified in the script if any, and give you the command aliases.

If something goes wrong, specify which steps you accomplished and what exactly is not working.

Good luck!

--Dan

[Edit]

I just remembered that there was a recent bug in Dream Seeker that was messing up in telnet mode. You might want to grab the latest beta release.
In response to Dan
thanks Dan, i got it to work, but theres a few things:

i cant set the background color anymore, it gives me in game errors such as undefined variable.

so i cant just do client/script = "<STYLE>BODY {background: black; color: aqua}</STYLE>"

And another thing..

how would i add aliases that work with vars? like:

mob
var
person = "null"

alias/set_person(T as text)
usr.person = T
alias/p()
return "punch [usr.person]"

and so on, and so forth.



thanks



In response to Pillsverry
Pillsverry wrote:

i cant set the background color anymore, it gives me in game errors such as undefined variable.

so i cant just do client/script = "<STYLE>BODY {background: black; color: aqua}</STYLE>"

In a .dms file, you don't assign client/script; you only specify the contents of what you would normally assign to client/script. In other words, just put the <STYLE> stuff right in your .dms file with no assignment.


how would i add aliases that work with vars? like:

mob
var
person = "null"

DM Script is quite a bit more limited than the full DM language (at least at the moment). All you can do is define aliases, macros, a URL to connect to, and any html (including style-sheets) you want displayed when the script runs. The procedural code within alias is limited to setting verb properties and returning command text.

Take a peek at Byond/cfg/telnet.dms for an example of how to capture arrow keys and create a MUD-style prompt.

--Dan