Author Topic: PW - making shout be the same as "talk"  (Read 327 times)

Legacy_Alice24

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
PW - making shout be the same as "talk"
« on: December 31, 2014, 08:01:05 am »


               

Hi guys. 


I tried googling the answer but no luck.


 


I don't want players to be able to use "shout" mode in my PW. If they use "shout" I'd like it to be automatically converted to "talk" mode after the player "enter". Can I do that? 



               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
PW - making shout be the same as "talk"
« Reply #1 on: December 31, 2014, 10:18:31 am »


               

Sure can. In your modules OnPlayerChat event script have it look something like so:


 


 


void main()

{


    string sMessage = GetPCChatMessage();

    object oPC = GetPCChatSpeaker();

    int iVolume = GetPCChatVolume();


    if (iVolume == TALKVOLUME_SHOUT)

    {

        SetPCChatVolume(TALKVOLUME_TALK);

        SendMessageToPC(oPC, "SHOUTING is not permitted on this server.");

    }

}


 


 


The message to PC is optional of course. Just an example. Good luck.



               
               

               
            

Legacy_Alice24

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
PW - making shout be the same as "talk"
« Reply #2 on: December 31, 2014, 12:01:21 pm »


               

Thank you very much, GhostofGod '<img'> 



               
               

               
            

Legacy_Thayan

  • Sr. Member
  • ****
  • Posts: 435
  • Karma: +0/-0
PW - making shout be the same as "talk"
« Reply #3 on: December 31, 2014, 02:39:56 pm »


               

Or you can just modify the nwnplayer.ini on your server and change Disallow Shouting to 1. That will convert any non DM or DM possessed character's shout to standard chat.