Making a grin alias

Need some help with your MUD client? Forgot your password? Get help here.
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
Post Reply
Kwevin
Veteran
Posts: 207
Joined: 21 Mar 2016 09:17

Making a grin alias

Post by Kwevin » 02 Jul 2017 01:05

Hello. I have an evil character whose rp is that he is not inherently evil. We all know that <grin> displays different adverbs whether you are good or evil. Goodies do it merrily, and evil align do it, well, evilly. Anyways, I want to be able to grin merrily with evil align unless otherwise specified. I have some code but it won't work. Help?

Code: Select all

if (args[1] === undefined) {
         gwc.connnection.send("grin merrily");
  }
  else {
           gwc.connection.send("grin " + args[1]);
    
         }
Output: Error in alias TypeError: Cannot read property 'send' of undefined
grin
You grin evilly.

How can I fix this?
Alea iacta est. Serius regredi est.

Zugzug
Veteran
Posts: 232
Joined: 20 May 2017 15:25

Re: Making a grin alias

Post by Zugzug » 02 Jul 2017 01:30

Kwevin wrote:Hello. I have an evil character whose rp is that he is not inherently evil. We all know that <grin> displays different adverbs whether you are good or evil. Goodies do it merrily, and evil align do it, well, evilly. Anyways, I want to be able to grin merrily with evil align unless otherwise specified. I have some code but it won't work. Help?

Code: Select all

if (args[1] === undefined) {
         gwc.connnection.send("grin merrily");
  }
  else {
           gwc.connection.send("grin " + args[1]);
    
         }
Output: Error in alias TypeError: Cannot read property 'send' of undefined
grin
You grin evilly.

How can I fix this?
> nick grin grin stupid
Nickname "grin" added to "grin stupid"
> grin
You grin stupidly.

Kwevin
Veteran
Posts: 207
Joined: 21 Mar 2016 09:17

Re: Making a grin alias

Post by Kwevin » 02 Jul 2017 08:34

Doesn't work.

Code: Select all

nick grin grin stupid
Nickname "grin" added to "grin stupid"
> grin
You grin stupidly.
> grin happ
Grin [how] at whom/what?
> unnick grin
Nickname "grin" removed. Used to be: grin stupid.
> alias grin grin stupid
Alias "grin" added to "grin stupid"
> grin
You grin stupidly.
> grin happ
Grin [how] at whom/what?
In either case, the game is receiving <grin stupid happ> which is obviously not a command. I need an if statement.
Alea iacta est. Serius regredi est.

Kwevin
Veteran
Posts: 207
Joined: 21 Mar 2016 09:17

Re: Making a grin alias

Post by Kwevin » 04 Jul 2017 11:17

Kwevin wrote:

Code: Select all

if (args[1] === undefined) {
         gwc.connnection.send("grin merrily");
  }
  else {
           gwc.connection.send("grin " + args[1]);
    
         }
Output: Error in alias TypeError: Cannot read property 'send' of undefined
grin
You grin evilly.
Good freaking Good I'm stupid... "Connnection"...
Alea iacta est. Serius regredi est.

Post Reply
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/