I am not good enough to just make a text parser on my own, I ended up using a Parser Lib by AbyssDragon.
http://developer.byond.com/hub/AbyssDragon/Parser
To be honest I don't know how the Lib itself works, I simply used the demo and looked at how to use it. And for the most part it works how I would like.
My question is, with this current lib, would it be possible to have a mob call a command already defined? My players use a command I defined called north, south, ect. They use them to walk within the mud I am working on.
Is it possible to have mobs in the game call these same defined commands?
ID:271442
Jun 30 2007, 10:51 pm
|
|
#2 Jul 1 2007, 9:58 am
|
|
Look at Zilals Text MUD tutorial. That was the first real RPG I made.
| |
#3 Jul 1 2007, 1:56 pm
|
||
You mean mobs without a client or you need help defining the commands or what? You're being quite vague.
Yes, a clientless mob can call these commands, and I can show you how to define these commands. The readme file says that make a command, it's as simple as defining a datum, and it really is.
Wow, it has been a really long time since I've used step(). Anyway, as you can see, I've named the command "north." Now, the question mark in front of the num keyword in the format variable means that the argument is optional. priority 1 means that it is top priority to complete this function, where top priority means to complete the function before the rest. mob/user is the mob that calls the command and every argument after that is part of the strict formatting. Command/north only has one optional argument which defaults to one, so if called, Process() will move the user one step. You can read up on all of this in the readme file of the distro in AbyssDragon's parser. | ||
(I worked on Parser stuff for a while, but AbyssDragon's stuff works differently from what I made. Ebonshadow's parser works more like mine because it uses some of my procs.)
Also, I might note that if you want to create a MUD, Alathon worked on Intermundia for a while (and I believe that uses AbyssDragon's parser).