View unanswered posts | View active topics It is currently 22 Oct 2018 17:31

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.



Reply to topic  [ 4 posts ] 
Making a grin alias 
Author Message
Veteran

Joined: 21 Mar 2016 09:17
Posts: 207
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:
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.


02 Jul 2017 01:05
Profile
Great Adventurer

Joined: 20 May 2017 15:25
Posts: 183
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:
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.


02 Jul 2017 01:30
Profile
Veteran

Joined: 21 Mar 2016 09:17
Posts: 207
Doesn't work.
Code:
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.


02 Jul 2017 08:34
Profile
Veteran

Joined: 21 Mar 2016 09:17
Posts: 207
Kwevin wrote:
Code:
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.


04 Jul 2017 11:17
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.