Author Topic: SetCommandResponse  (Read 1659 times)

Offline saquivor

  • BFF
  • ***
  • Posts: 111
    • View Profile
SetCommandResponse
« on: September 08, 2007, 02:28:48 am »
Whilst meandering around lpc from time to time as I do. I came across an interesting use of using a mapping in conjunction with the SetCommandResponse function(was actually an equivalent function in dw(set_respond_to_with)).

I have posted an example for /domains/town/npc.dirk to show use of mapping rather than a single word.

Code: [Select]
SetCommandResponses( ([
     ({ "advance","advanced","help","train"}): (: AdvanceDude :)
      ]) );

I am sure the veterans amongst you will already know this, but to me it is one of those things that only became obvious retrospectively! And the builder in me, wanted to share a way of making npc's far more interactive with very little effort.

Thanks to dw for the example :)