Page 1 of 1

Making a grin alias

Posted: 02 Jul 2017 01:05
by Kwevin
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?

Re: Making a grin alias

Posted: 02 Jul 2017 01:30
by Zugzug
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.

Re: Making a grin alias

Posted: 02 Jul 2017 08:34
by Kwevin
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.

Re: Making a grin alias

Posted: 04 Jul 2017 11:17
by Kwevin
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"...