Unknown2008-05-27 02:54:30
I want to make a database (class?) of information stored in zMUD.
I'd like to be able to use an alias to access various information. For example, info cow to get information I have stored in zMUD about cows.
I'd also like to be able to have the color be Coral.
I have tried:
#ALIAS info {#SA %1}
#VA cow {;Roam;Bump}
This makes "info @cow" show:
Roam
Bump
I can't seem to figure out how to make it colored, and I can't help but there's a better way to do it.
I'd like to be able to use an alias to access various information. For example, info cow to get information I have stored in zMUD about cows.
I'd also like to be able to have the color be Coral.
I have tried:
#ALIAS info {#SA %1}
#VA cow {;Roam;Bump}
This makes "info @cow" show:
Roam
Bump
I can't seem to figure out how to make it colored, and I can't help but there's a better way to do it.
Unknown2008-05-27 11:41:25
You could script it to just use "info cow" as your command. Be aware, that "info" is an in-game command, however.
CODE
#VAR animals {}
#ADDKEY animals cow {Roam|Bump}
#ALIAS info {
#IF (%iskey(@animals, %1)) {
  #MXP ~%expandlist(%db(@animals, %1), %crlf)~
} {
  #SAY "Animal not found in database."
}
}
#ADDKEY animals cow {Roam|Bump}
#ALIAS info {
#IF (%iskey(@animals, %1)) {
  #MXP ~
} {
  #SAY "Animal not found in database."
}
}
Unknown2008-05-28 20:51:38
QUOTE(Zarquan @ May 27 2008, 07:41 AM) 515627
You could script it to just use "info cow" as your command. Be aware, that "info" is an in-game command, however.
CODE
#VAR animals {}
#ADDKEY animals cow {Roam|Bump}
#ALIAS info {
#IF (%iskey(@animals, %1)) {
  #MXP ~%expandlist(%db(@animals, %1), %crlf)~
} {
  #SAY "Animal not found in database."
}
}
#ADDKEY animals cow {Roam|Bump}
#ALIAS info {
#IF (%iskey(@animals, %1)) {
  #MXP ~
} {
  #SAY "Animal not found in database."
}
}
My Gods. I love you. O___O
Is "about" an in-game command? If worst comes to worst, I'll use "whatsa"
Thank you soooooo much! Now to decode the code and figure out how you did it.
Unknown2008-05-29 02:09:28
I don't think 'about' is an in-game command, so you should be okay there. Now that you know the functions involved, I think you'll be able to use the help system to discover what they all do and how they do it.