/////////////////////////[ ]/////////////////////////////
//:: Name: md_plychat
//::
//:: Created By: Greyfort
//:: Created On: 04.05.2011
//:: Last Update:
//:: Version: 1.00
//::////////////////////////////////////////////// ////
/////////////////////////[ CUSTOM FUNTIONS ]/////////////////////////////
/////////////////////////////////////////////////////////////////
// this scans oObjects area for Player characters in
// oObjects area
void LocalAreaCheck (object oObject = OBJECT_SELF );
void LocalAreaCheck (object oObject = OBJECT_SELF )
{
string sPlySht = GetLocalString(oObject,"sPlyShout");
object oAreaPlayer = GetFirstObjectInArea( GetArea(oObject) );
while ( GetIsObjectValid(oAreaPlayer) )
{ // This is other PCs in area
if(GetIsPC(oAreaPlayer)&& oAreaPlayer != oObject)
{
// local area shout emulation
AssignCommand(oAreaPlayer ,ActionSpeakString("You hear !!!SHOUTING!!! "+sPlySht+"",TALKVOLUME_TALK) );
FloatingTextStringOnCreature("You hear !!!SHOUTING!!! "+sPlySht+"",oAreaPlayer);
}// this is PC shouting
else if(GetIsPC(oAreaPlayer)&& oAreaPlayer == oObject)
{
// local area shout emulation
AssignCommand(oAreaPlayer ,ActionSpeakString("You !!!SHOUT!!! "+sPlySht+"",TALKVOLUME_TALK) );
FloatingTextStringOnCreature("You !!!SHOUT!!! "+sPlySht+"",oAreaPlayer);
}
oAreaPlayer = GetNextObjectInArea(GetArea(oObject));
}
}
////////////////[ END OF LocalAreaCheck ]//////////////////////////////////////
//////////////////////////////////[ MAIN ]//////////////////////////////////////
void main()
{
object oPC = GetPCChatSpeaker();
SetLocalString(oPC,"sPlyShout",GetPCChatMessage() );
object oArea = GetArea(oPC);
// this will make no shout in All areas
if( GetTag( oArea ) != "ALLAREASNOSHOUT" )
{
int nChatVolume = GetPCChatVolume();
// this will make player just talk
if( nChatVolume == TALKVOLUME_SHOUT ) { SetPCChatVolume(TALKVOLUME_TALK); }
/*
NOTE: Still trying to figure area only shout option but this emulates it.
*/
// this will send shout to other players in area via a Floaty Text//
LocalAreaCheck(oPC);
}
////////////////////////////////////////////////
}//END OF SCRIPT
Yeah thats waht I thought so I made this script. Place it withn your module event "on player chat"
It emulates players shouting in your local area. It also makes no shouting module wide. If any need help adjusting it for there module send me a PM
EDITED ON 04.09.2011 //:: NEW SCRIPT CODE
Modifié par Greyfort, 10 avril 2011 - 04:07 .