I know how to stop shout in all areas. yet I seem to be unable to just make a Local area shout. Is there a hook or 2da work. or is it just so late my mind is mush? I've seen it done, well I thought maybe I had maybe all they did was disable it huh?
Local Area Shout
Débuté par
Greyfort
, avril 06 2011 08:11
#1
Posté 06 avril 2011 - 08:11
#2
Posté 06 avril 2011 - 11:39
You may be able to intercept them in the chat script, and send them in another form to each PC in the same Area.
#3
Posté 06 avril 2011 - 08:15
/////////////////////////[ ]/////////////////////////////
//:: 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
//:: 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 .
#4
Posté 07 avril 2011 - 03:33
Lol i read the topic kind of fast and thought it said local area sllut
Modifié par Builder_Anthony, 07 avril 2011 - 03:33 .
#5
Posté 10 avril 2011 - 04:10
I made the above script recognize between the person shouting, and the persons hearing the shout. The above code has been updated. If anyone needs any help send me a PM.





Retour en haut






