ID:1872604
 
(See the best response by Lummox JR.)
So I'm trying to implement many MUD features. Poses typically are done in these by /me, :, or pose. I can get /me and pose in the same verb line, but I cannot get the colon to work. I am assuming the compiler hates this very much. Is there a way to use symbols/punctuation as verbs to emulate older system commands?
Best response
Implement client/Command() and add your own parsing. It will be called whenever there's no matching verb.

This will also enable telnet access.
Telnet access? That would be.. interesting to see given what I'm doing!

You can always disallow telnet by deleting the client in client/New() or mob/Login() if connection="telnet".
Thanks for that!
What would this even look like if someone were to log in using telnet? I'm assuming something like Dwarf Fortress without any texture/icon packs?
What would this even look like if someone were to log in using telnet? I'm assuming something like Dwarf Fortress without any texture/icon packs?

It would look like Lummox and I's childhoods.
So, like my childhood. ZZT. Kroz. BBS Door games. :D
Fun fact: I started using BYOND because Megazeux wouldn't run on Windows 98.
Wasn't there an MS-DOS version that'd run under 98?
98 did not like the DOS version. XP was better with it, but later on it got a Windows-compatible build.
In response to Khyberkitsune
Khyberkitsune wrote:
What would this even look like if someone were to log in using telnet? I'm assuming something like Dwarf Fortress without any texture/icon packs?


http://www.byond.com/games/Gokussj99/dbzfe it would look like this.
That's hilarious. Colored Dwarf Fortress.

Well, given the 'game' is mostly text-driven, I guess that wouldn't be much of a problem. The 2D element is all eye candy, really.
So question from my primary dev:

"Can you explain: Implement client/Command() and add your own parsing. It will be called whenever there's no matching verb.?"
"In terms of a user, so if they type : it will bring up verb attached to:"
I'm going to take a stab at what I'm guessing it's wanting. When you invoke client/Command() you explicitly tell it that the client should look for this and interpret it as a command. So you'd maybe do something like... client/Command() : = pose or something similar?
client/Command() is a proc that's called when the parser has failed to interpret the command that was typed in as a normal DM verb. It's basically a fallback. It takes the command that was typed as an argument.

At that point, you could look for : in the string and handle it as you wanted.
client/Command(cmd as text)
if(cmd==":"||cmd==": ")
var/msg = input("What would you like to pose?","")
view() << "[usr] [msg]"
return

Like this?
Something like that would work.

Just FYI you should use <DM> .. </DM> tags when posting code so the indentation is preserved.
So that did work. Now, I don't want that input field to pop up and would rather it just auto-space, ad in the " and let me continue on with whatever I'm posing instead of having to type it out into a pop-up field.

So, would this work?

client/Command(cmd as text)
if(cmd==":"||cmd==": ")
var/msg as text
view() << "[usr] [msg]"
return
if(cmd=="/me"||cmd=="/me ")
var/msg as text
view() << "[usr] [msg]"
return
Well, it compiled, but it didn't work. I understand now that anything after : or /me is stopped altogether in waiting for something else. Recommendations on how to bypass this for avoiding the need to bring up some sort of input field?
Page: 1 2