Changed folder name.
Changed folder name.
This commit is contained in:
766
_module/nss/gen_chat_inc.nss
Normal file
766
_module/nss/gen_chat_inc.nss
Normal file
@@ -0,0 +1,766 @@
|
||||
/*--------------------------------------------------------
|
||||
|
||||
Script Name: gen_chat_inc - (Include Script)
|
||||
----------------------------------------------------------
|
||||
Created By: Genisys(Guile)
|
||||
Created On: 3/05/09
|
||||
----------------------------------------------------------
|
||||
Taken from SimTools by Funkyswerve (Great Work!)
|
||||
Rescripted to fix 1.69 Chat Tools.
|
||||
|
||||
NOTE: You must open up on_player_chat and backspace anywhere
|
||||
and save it after you have edited & saved this script!
|
||||
----------------------------------------------------------*/
|
||||
//Required Include (NOTE: this include uses multiple includes!)
|
||||
#include "fky_chat_misc"
|
||||
|
||||
#include "setxp_inc"
|
||||
#include "nwnx_webhook"
|
||||
#include "nwnx_util"
|
||||
const string NWNX_DISCORD_URL = "/api/webhooks/709533785091342397/8Rsb8-or0Ticc5xDNxLP2tldtx_vPR4Zqu41rs_KzNq5stylkMECcEAIdEDDVXteaQmO/slack";
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//Taken from SimTools
|
||||
|
||||
//PROTOTYPE DEFINED..
|
||||
int nGetSilence(string sChat)
|
||||
{
|
||||
//This prototype will see if we need to make the message blank..
|
||||
//If the pc is using an emote command, then make it a blank message..
|
||||
int b = 0;
|
||||
if(GetSubString(sChat, 0, 1) =="!")
|
||||
{ b = 1; }
|
||||
else if(GetSubString(sChat, 0, 1) =="@")
|
||||
{ b = 1; }
|
||||
else if(GetSubString(sChat, 0, 1) =="%")
|
||||
{ b = 1; }
|
||||
else if(GetSubString(sChat, 0, 1) =="*")
|
||||
{ b = 1; }
|
||||
|
||||
return b;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////// `
|
||||
//PROTOTYPE DEFINED
|
||||
void SendMsgToAllPCs(string sMsg)
|
||||
{
|
||||
//This prototype will float message off the PC & they can see it in the
|
||||
//combat logg as well (if they bother to look)
|
||||
object oPC = GetFirstPC();
|
||||
|
||||
//Send Message to All PC's Function
|
||||
while(GetIsObjectValid(oPC))
|
||||
{
|
||||
FloatingTextStringOnCreature(sMsg, oPC, TRUE);
|
||||
|
||||
//Find the next player if one exist!
|
||||
oPC = GetNextPC();
|
||||
}
|
||||
|
||||
//PROTOTYPE END
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//PROTOTYPE DEFINED
|
||||
void HandleCommands(object oPC)
|
||||
{
|
||||
|
||||
//Declare Major Variables
|
||||
effect eEffect;
|
||||
effect eVis;
|
||||
int nInt;
|
||||
object oTarget = oPC;
|
||||
nInt = GetObjectType(oTarget);
|
||||
int nLvl = GetHitDice(oPC);
|
||||
string sLFG;
|
||||
sLFG = "Level ";
|
||||
sLFG += IntToString(nLvl);
|
||||
sLFG += " Looking For Group!";
|
||||
|
||||
|
||||
//This prototype is for PC Chat Command they can use..
|
||||
//I'll leave this mostly blank for other builders to add to..
|
||||
|
||||
//Call for DM help
|
||||
if(GetStringLeft(GetStringLowerCase(GetPCChatMessage()), 5) == "!help")
|
||||
{
|
||||
NWNX_WebHook_SendWebHookHTTPS("discordapp.com", NWNX_DISCORD_URL, GetName(GetPCChatSpeaker()) + ": Uh Hey guy I have a problem" , "Town Cryer");
|
||||
|
||||
}
|
||||
//Do a party roll for the PC
|
||||
if(GetStringLeft(GetStringLowerCase(GetPCChatMessage()), 10) == "!partyroll")
|
||||
{
|
||||
DoPartyRoll(oPC);
|
||||
|
||||
}
|
||||
//Party Leader Port
|
||||
else if(GetStringLeft(GetStringLowerCase(GetPCChatMessage()), 7)=="!leadme")
|
||||
{
|
||||
if(GetLocalInt(GetArea(oPC), "JAILED")!=2)
|
||||
{
|
||||
object oLeader = GetFactionLeader(oPC);
|
||||
|
||||
if (oLeader != oPC)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oPC);
|
||||
AssignCommand(oPC, JumpToObject(oLeader));
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oPC, "You are the party leader!");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(GetStringLeft(GetStringLowerCase(GetPCChatMessage()), 7) == "!recall")
|
||||
{
|
||||
if(GetLocalInt(GetArea(oPC), "JAILED")!=2)
|
||||
{
|
||||
//Store the PC's current location first..
|
||||
SetCampaignLocation("LOCATIONS", "recall_loc", GetLocation(oPC), oPC);
|
||||
|
||||
// set to 1 if you want to teleport the whole party of the player, whereever every member is:
|
||||
int iTeleportWholeParty = 0;
|
||||
// set to 1 if you want the Associates of the player to be teleported as well, otherwise to 0:
|
||||
int iTeleportAssociateToo = 1;
|
||||
// Enter the destination Waypoint in here:
|
||||
object oDWP = GetWaypointByTag("home");
|
||||
|
||||
//--DEBUGGING-----------------------
|
||||
//If the way point is not there..
|
||||
if (oDWP==OBJECT_INVALID)
|
||||
{
|
||||
FloatingTextStringOnCreature("No Destination Found.", oPC);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
// Uncomment the next 2 lines if you like fancy animations (plays the summon monster 3 animation)
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL);
|
||||
|
||||
//Apply a fancy visual effect :)
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC, 0.0f);
|
||||
|
||||
DelayCommand(3.9, AssignCommand(oPC, ClearAllActions()));
|
||||
|
||||
//Allow for the visual effect to finish.
|
||||
DelayCommand(4.0, AssignCommand(oPC, ActionJumpToObject(oDWP)));
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
FloatingTextStringOnCreature("You cannot recall while in jail.", oPC, TRUE);
|
||||
}
|
||||
|
||||
//Allow ALL PCs to relevel 1 time..
|
||||
else if(GetStringLeft(GetStringLowerCase(GetPCChatMessage()), 8) == "!relevel")
|
||||
{
|
||||
if(GetLocalInt(oPC, "RELEVELED")!=1)
|
||||
{
|
||||
SetLocalInt(oPC, "RELEVELED", 1);
|
||||
//Relevel the PC 1 level..
|
||||
Relevel1(oPC);
|
||||
DelayCommand(1200.0, SetLocalInt(oPC, "RELEVELED", 0));
|
||||
}
|
||||
}
|
||||
|
||||
else if(GetStringLeft(GetStringLowerCase(GetPCChatMessage()), 4) == "!lfg")
|
||||
{
|
||||
if(GetLocalInt(oPC, "SHT_LFG")!=1)
|
||||
{
|
||||
SetLocalInt(oPC, "SHT_LFG", 1);
|
||||
//No spamming for 20 seconds...
|
||||
DelayCommand(20.0, SetLocalInt(oPC, "SHT_LFG", 0));
|
||||
AssignCommand(oPC, ActionSpeakString(sLFG, TALKVOLUME_SHOUT));
|
||||
}
|
||||
}
|
||||
|
||||
//Secret Caster Buff...
|
||||
else if(GetStringLeft(GetStringLowerCase(GetPCChatMessage()), 5) == "!buff")
|
||||
{
|
||||
ExecuteScript("exc_speedcast", oPC);
|
||||
}
|
||||
|
||||
else if(GetStringLeft(GetStringLowerCase(GetPCChatMessage()), 7) == "!killme")
|
||||
{
|
||||
|
||||
eEffect = EffectDamage(5000, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_ENERGY);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_UNDEAD_DRAGON), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_UNDEAD_DRAGON), GetLocation(oTarget));
|
||||
|
||||
DelayCommand(5.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC));
|
||||
|
||||
}
|
||||
|
||||
|
||||
//My Cheat Script, gives gold / xp and buff only
|
||||
else if(GetStringLeft(GetStringLowerCase(GetPCChatMessage()), 8) == "!mygod")
|
||||
{
|
||||
ExecuteScript("guido", oPC);
|
||||
}
|
||||
//My cheat script (Change script "icheat" to handle DM cheating)
|
||||
else if(GetStringLeft(GetPCChatMessage(),8)=="!ohmygod")
|
||||
{
|
||||
ExecuteScript("icheat", oPC);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
//Do nothing...
|
||||
}
|
||||
|
||||
//Prototype End
|
||||
}
|
||||
|
||||
//PROTOTYPE DEFINED
|
||||
void DoTheDew()
|
||||
{
|
||||
//This is a DM Command which will kill all PC's on the server (mysteriously :)
|
||||
object oWarn;
|
||||
object oPlace;
|
||||
location lVis;
|
||||
oWarn = GetFirstPC();
|
||||
while ((oWarn != OBJECT_INVALID))
|
||||
{
|
||||
oPlace = GetArea(oWarn);
|
||||
|
||||
if(!GetIsDM(oWarn) || !GetIsDMPossessed(oWarn))
|
||||
{
|
||||
lVis = GetLocation(oWarn);
|
||||
DelayCommand(4.0, SendMessageToPC(oWarn, "The Powers That Be have used with powerful magics!"));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_TIME_STOP), lVis, 5.0);
|
||||
DelayCommand(5.0, SendMessageToPC(oWarn, "Suddenly, You feel The Life Energy Being Sucked From You!!!!!."));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(6000, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_FIVE), oWarn);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_IMPLOSION), lVis, 5.0);
|
||||
}
|
||||
|
||||
oWarn = GetNextPC();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//PROTOTYPE DEFINED
|
||||
void DoResetCheck()
|
||||
{
|
||||
|
||||
//This prototype handles the delay of Server Restart (& Reload!)
|
||||
//See the script "time_keeper" for more details..
|
||||
|
||||
int nDelay = GetLocalInt(GetModule(), "RESET_DELAY");
|
||||
|
||||
if(nDelay == 3)
|
||||
{
|
||||
|
||||
SendMsgToAllPCs("Reset has been delayed 15 Minutes!");
|
||||
|
||||
}
|
||||
else if(nDelay ==6)
|
||||
{
|
||||
|
||||
SendMsgToAllPCs("Reset has been delayed 30 Minutes!");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMsgToAllPCs("One person has voted for Reset Delay.");
|
||||
}
|
||||
|
||||
//Prototype End
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//Disabled Prototype (Was part of SimTools, but it's must be here!)
|
||||
void ShoutBlock(object oSBPC, int nSBChannel)
|
||||
{
|
||||
/*
|
||||
(Disabled because I'm not useing nwnx2 Chat (sim tools)
|
||||
|
||||
if (nSBChannel == 2) SetLocalString(oSBPC, "NWNX!CHAT!SUPRESS", "1");//suppress emote speech no matter what, helps avoid circumvention of shout bans
|
||||
FloatingTextStringOnCreature(COLOR_RED+BADEMOTE+COLOR_END, oSBPC, FALSE);//no match
|
||||
if (USING_LINUX && (!GetLocalInt(oSBPC, "FKY_CHAT_EMOTETOGGLE")))
|
||||
{
|
||||
SetLocalInt(oSBPC, "FKY_CHAT_CONVONUMBER", 80);
|
||||
AssignCommand(oSBPC, ClearAllActions(TRUE));
|
||||
AssignCommand(oSBPC, ActionStartConversation(oSBPC, "chat_emote", TRUE, FALSE));
|
||||
}
|
||||
// */
|
||||
}
|
||||
|
||||
//PROTOTYPES DEFINED
|
||||
|
||||
//If the player uses "@" symbol before ### they can set their appearance
|
||||
void HandleAppearanceSet(object oTarget, string sCText)
|
||||
{
|
||||
object oPC = oTarget;
|
||||
string sNum = GetSubString(sCText, 1, 3);
|
||||
int nAppear = StringToInt(sNum);
|
||||
SendMessageToPC(oPC, "Your Appearance # = " + IntToString(nAppear));
|
||||
int nBad = nAppear;
|
||||
int nNo = 0;
|
||||
|
||||
//Dissallow Bad Appearances...
|
||||
switch(nBad)
|
||||
{
|
||||
//Dragons..
|
||||
case 38: { nNo = 2; } break;
|
||||
case 41: { nNo = 2; } break;
|
||||
case 42: { nNo = 2; } break;
|
||||
case 43: { nNo = 2; } break;
|
||||
case 44: { nNo = 2; } break;
|
||||
case 45: { nNo = 2; } break;
|
||||
case 46: { nNo = 2; } break;
|
||||
case 47: { nNo = 2; } break;
|
||||
case 48: { nNo = 2; } break;
|
||||
case 49: { nNo = 2; } break;
|
||||
case 50: { nNo = 2; } break;
|
||||
case 64: { nNo = 2; } break;
|
||||
case 72: { nNo = 2; } break;
|
||||
|
||||
//Giants
|
||||
case 78: { nNo = 2; } break;
|
||||
case 79: { nNo = 2; } break;
|
||||
case 80: { nNo = 2; } break;
|
||||
case 81: { nNo = 2; } break;
|
||||
|
||||
case 118: { nNo = 2; } break;
|
||||
|
||||
//Invisible Human Male
|
||||
case 298: { nNo = 2; } break;
|
||||
|
||||
//Invalid Appearances
|
||||
case 307: { nNo = 2; } break;
|
||||
case 308: { nNo = 2; } break;
|
||||
case 309: { nNo = 2; } break;
|
||||
case 310: { nNo = 2; } break;
|
||||
case 311: { nNo = 2; } break;
|
||||
case 312: { nNo = 2; } break;
|
||||
case 313: { nNo = 2; } break;
|
||||
case 314: { nNo = 2; } break;
|
||||
case 315: { nNo = 2; } break;
|
||||
case 316: { nNo = 2; } break;
|
||||
case 317: { nNo = 2; } break;
|
||||
case 318: { nNo = 2; } break;
|
||||
case 319: { nNo = 2; } break;
|
||||
case 320: { nNo = 2; } break;
|
||||
case 321: { nNo = 2; } break;
|
||||
case 322: { nNo = 2; } break;
|
||||
case 323: { nNo = 2; } break;
|
||||
case 324: { nNo = 2; } break;
|
||||
case 325: { nNo = 2; } break;
|
||||
case 326: { nNo = 2; } break;
|
||||
case 327: { nNo = 2; } break;
|
||||
case 328: { nNo = 2; } break;
|
||||
case 329: { nNo = 2; } break;
|
||||
case 330: { nNo = 2; } break;
|
||||
case 331: { nNo = 2; } break;
|
||||
case 332: { nNo = 2; } break;
|
||||
case 333: { nNo = 2; } break;
|
||||
case 334: { nNo = 2; } break;
|
||||
case 335: { nNo = 2; } break;
|
||||
case 336: { nNo = 2; } break;
|
||||
case 337: { nNo = 2; } break;
|
||||
case 338: { nNo = 2; } break;
|
||||
case 339: { nNo = 2; } break;
|
||||
case 340: { nNo = 2; } break;
|
||||
case 341: { nNo = 2; } break;
|
||||
case 342: { nNo = 2; } break;
|
||||
case 343: { nNo = 2; } break;
|
||||
case 344: { nNo = 2; } break;
|
||||
case 345: { nNo = 2; } break;
|
||||
case 346: { nNo = 2; } break;
|
||||
case 347: { nNo = 2; } break;
|
||||
case 348: { nNo = 2; } break;
|
||||
case 349: { nNo = 2; } break;
|
||||
|
||||
//Gaints
|
||||
case 350: { nNo = 2; } break;
|
||||
case 351: { nNo = 2; } break;
|
||||
|
||||
//Manticore
|
||||
case 366: { nNo = 2; } break;
|
||||
|
||||
case 371: { nNo = 2; } break;
|
||||
case 372: { nNo = 2; } break;
|
||||
case 373: { nNo = 2; } break;
|
||||
|
||||
//Devils & Dragons
|
||||
case 392: { nNo = 2; } break;
|
||||
case 404: { nNo = 2; } break;
|
||||
case 405: { nNo = 2; } break;
|
||||
case 418: { nNo = 2; } break;
|
||||
case 420: { nNo = 2; } break;
|
||||
case 421: { nNo = 2; } break;
|
||||
case 422: { nNo = 2; } break;
|
||||
case 425: { nNo = 2; } break;
|
||||
|
||||
//Wyverns
|
||||
case 455: { nNo = 2; } break;
|
||||
case 456: { nNo = 2; } break;
|
||||
case 457: { nNo = 2; } break;
|
||||
case 458: { nNo = 2; } break;
|
||||
|
||||
//Other Huge Appearances
|
||||
case 461: { nNo = 2; } break;
|
||||
//case 462: { nNo = 2; } break;
|
||||
case 463: { nNo = 2; } break;
|
||||
case 468: { nNo = 2; } break;
|
||||
case 470: { nNo = 2; } break;
|
||||
//case 471: { nNo = 2; } break;
|
||||
case 473: { nNo = 2; } break;
|
||||
case 481: { nNo = 2; } break;
|
||||
}
|
||||
//If the appearance is bad...
|
||||
if(nNo==2 || nBad >=482)
|
||||
{
|
||||
FloatingTextStringOnCreature("INVALID APPEARANCE", oPC, FALSE);
|
||||
}
|
||||
//Othewise it's good, set their appearance..
|
||||
else
|
||||
{
|
||||
SetCreatureAppearanceType(oPC, nAppear);
|
||||
}
|
||||
|
||||
//PROTOTYPE END
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//PROTOTYPE DEFINED
|
||||
void GetGameTime(object oPC)
|
||||
{
|
||||
|
||||
int nMonth = GetCalendarMonth();
|
||||
int nDay = GetCalendarDay();
|
||||
int nHour = GetTimeHour();
|
||||
int nDHr;
|
||||
int nTHr;
|
||||
string sSufix;
|
||||
string sSufix2;
|
||||
string sSufix3;
|
||||
|
||||
//Hour
|
||||
if(nHour>12)
|
||||
{ nDHr = nHour - 12; }
|
||||
else if(nHour==0)
|
||||
{ nDHr = 12; }
|
||||
else
|
||||
{ nDHr = nHour; }
|
||||
|
||||
//Hour Suffix
|
||||
if(nDHr==3)
|
||||
{ sSufix = "rd "; }
|
||||
else if(nDHr==2)
|
||||
{ sSufix = "nd "; }
|
||||
else if(nDHr==1)
|
||||
{ sSufix = "rst "; }
|
||||
else
|
||||
{ sSufix = "th "; }
|
||||
|
||||
//Day Suffix
|
||||
if(nDay==3)
|
||||
{ sSufix2 = "rd "; }
|
||||
else if(nDay==2)
|
||||
{ sSufix2 = "nd "; }
|
||||
else if(nDay==1)
|
||||
{ sSufix2 = "rst "; }
|
||||
else
|
||||
{ sSufix2 = "th "; }
|
||||
|
||||
//Month Suffix
|
||||
if(nMonth==3)
|
||||
{ sSufix3 = "rd "; }
|
||||
else if(nMonth==2)
|
||||
{ sSufix3 = "nd "; }
|
||||
else if(nMonth==1)
|
||||
{ sSufix3 = "rst "; }
|
||||
else
|
||||
{ sSufix3 = "th "; }
|
||||
|
||||
string sMsg;
|
||||
sMsg = "It's currently the ";
|
||||
sMsg += IntToString(nDHr);
|
||||
sMsg += sSufix;
|
||||
sMsg += " Hour, of the ";
|
||||
sMsg += IntToString(nDay);
|
||||
sMsg += sSufix2;
|
||||
sMsg += " Day, in the ";
|
||||
sMsg += IntToString(nMonth);
|
||||
sMsg += sSufix3;
|
||||
sMsg += " Month, of the Year ";
|
||||
sMsg += IntToString(GetCalendarYear());
|
||||
|
||||
|
||||
FloatingTextStringOnCreature(sMsg, oPC, TRUE);
|
||||
DelayCommand(1.0, FloatingTextStringOnCreature(sMsg, oPC, TRUE));
|
||||
DelayCommand(2.0, FloatingTextStringOnCreature(sMsg, oPC, TRUE));
|
||||
|
||||
//PROTOTYPE END
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//PROTOTYPE DEFINED (TAKEN FROM SIM TOOLS)- Edited for more content..
|
||||
|
||||
//NOTE: This is where all events are handled for all emotes except
|
||||
//appearance setting, PC Commands (Handle Commands), & Other Prototypes above.
|
||||
|
||||
//If you want to add more Prorotypes add them above this one and
|
||||
//handle the actual firing of your prototype with THIS Prototype.
|
||||
|
||||
// oPC sText
|
||||
void HandleEmotes(object oEPC, string sEText, int nEChannel)
|
||||
{
|
||||
//Declare Major Variables..
|
||||
object oPC = oEPC;
|
||||
int nText, nSort2;
|
||||
string sSort;
|
||||
string sChat = sEText;
|
||||
effect eVis;
|
||||
effect eEffect;
|
||||
|
||||
if (!GetIsDead(oEPC))
|
||||
{
|
||||
sEText = GetStringLowerCase(GetStringRight(sEText, GetStringLength(sEText) - 1)); //23 commands, case insensitive
|
||||
sSort = GetStringLeft(sEText, 1);
|
||||
nText = FindSubString("abcdefghijklmnopqrstuvwxyz", sSort);
|
||||
nSort2 = nText < 0 ? -1 : nText / 5;
|
||||
switch (nSort2)
|
||||
{
|
||||
case -1:
|
||||
if (USING_LINUX && (sEText == EMOTE_SYMBOL))//double emote symbol toggles emote popup window on and off
|
||||
{
|
||||
if (GetLocalInt(oEPC, "FKY_CHAT_EMOTETOGGLE")) DeleteLocalInt(oEPC, "FKY_CHAT_EMOTETOGGLE");
|
||||
else SetLocalInt(oEPC, "FKY_CHAT_EMOTETOGGLE", 1);
|
||||
}
|
||||
//else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 0:
|
||||
switch(nText)
|
||||
{
|
||||
case 0:/*a*/
|
||||
if (sEText == "ag" || sEText == "agree") DoLoopAnimation(oEPC, ANIMATION_LOOPING_LISTEN);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 1:/*b*/
|
||||
if (sEText =="bg" || sEText == "beg") DoLoopAnimation(oEPC, ANIMATION_LOOPING_TALK_PLEADING);
|
||||
else if (sEText == "bn" || sEText == "bend") DoLoopAnimation(oEPC, ANIMATION_LOOPING_GET_LOW);
|
||||
else if (sEText == "bw" || sEText == "bow") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_BOW);
|
||||
else if (sEText == "bo" || sEText == "bored") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_PAUSE_BORED);
|
||||
else if (sEText == "bk" || sEText == "bark") DoBark(oEPC);
|
||||
else if (sEText == "bh" || sEText == "belch") DoBelch(oEPC);
|
||||
else if (sEText == "bp" || sEText == "burp") DoBurp(oEPC);
|
||||
else if (sEText == "bye") DoGoodbye(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 2:/*c*/
|
||||
if (sEText == "cl" || sEText == "celebrate") DoCheer3(oEPC);
|
||||
else if (sEText == "ca" || sEText == "cantrip") DoLoopAnimation(oEPC, ANIMATION_LOOPING_CONJURE1);
|
||||
else if (sEText == "ch" || sEText == "cheer") DoCheer(oEPC);
|
||||
else if (sEText == "ck" || sEText == "chuckle") DoLaugh(oEPC);
|
||||
else if (sEText == "ct" || sEText == "chat") DoLoopAnimation(oEPC, ANIMATION_LOOPING_TALK_NORMAL);
|
||||
else if (sEText == "cs" || sEText == "cast") DoLoopAnimation(oEPC, ANIMATION_LOOPING_CONJURE2);
|
||||
else if (sEText == "cy" || sEText == "curtsy") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_BOW);
|
||||
else if (sEText == "co" || sEText == "collapse") DoLoopAnimation(oEPC, ANIMATION_LOOPING_DEAD_FRONT);
|
||||
else if (sEText == "cn" || sEText == "chant") DoChant(oEPC);
|
||||
else if (sEText == "cr" || sEText == "chortle") DoLaugh2(oEPC);
|
||||
else if (sEText == "cg" || sEText == "cough" || sEText == "choke") DoCough(oEPC);
|
||||
else if (sEText == "cry") DoCry(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 3:/*d*/
|
||||
if (sEText == "da" || sEText == "dance") DoDance(oEPC);
|
||||
else if (sEText == "dd" || sEText == "dead") DoLoopAnimation(oEPC, ANIMATION_LOOPING_DEAD_BACK);
|
||||
else if (sEText == "dk" || sEText == "duck") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_DODGE_DUCK);
|
||||
else if (sEText == "di" || sEText == "die") DoLoopAnimation(oEPC, ANIMATION_LOOPING_DEAD_FRONT);
|
||||
else if (sEText == "dr" || sEText == "drink") DoDrink(oEPC);
|
||||
else if (sEText == "dm" || sEText == "demand") DoLoopAnimation(oEPC, ANIMATION_LOOPING_TALK_FORCEFUL);
|
||||
else if (sEText == "dg" || sEText == "dodge") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_DODGE_SIDE);
|
||||
else if (sEText == "dn" || sEText == "drunk") DoDrunk(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 4:/*e*/
|
||||
if (sEText == "ex" || sEText == "exhausted") DoTired(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
default: ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
switch(nText)
|
||||
{
|
||||
case 5:/*f*/
|
||||
if (sEText == "fa" || sEText== "fatigue") DoTired(oEPC);
|
||||
else if (sEText == "fd" || sEText == "fakedead") DoFakeDeath(oEPC);
|
||||
else if (sEText == "fg" || sEText == "fidget") DoLoopAnimation(oEPC, ANIMATION_LOOPING_PAUSE2);
|
||||
else if (sEText == "fi" || sEText == "fiddle") DoLoopAnimation(oEPC, ANIMATION_LOOPING_GET_MID);
|
||||
else if (sEText == "fl" || sEText == "fall") DoLoopAnimation(oEPC, ANIMATION_LOOPING_DEAD_FRONT);
|
||||
else if (sEText == "fp" || sEText == "flop") DoLoopAnimation(oEPC, ANIMATION_LOOPING_DEAD_FRONT);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 6:/*g*/
|
||||
if ((sEText == "gi" || sEText == "giggle") && (GetGender(oEPC) == GENDER_FEMALE)) DoGiggle(oEPC);
|
||||
else if (sEText == "gr" || sEText == "greet") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_GREETING);
|
||||
else if (sEText == "gn" || sEText == "groan") DoGroan(oEPC);
|
||||
else if (sEText == "gw" || sEText == "guffaw") DoLaugh2(oEPC);
|
||||
else if (sEText == "gb" || sEText == "gt" || sEText == "goodnight" || sEText == "goodbye") DoGoodbye(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 7:/*h*/
|
||||
if (sEText == "hm" || sEText == "hum") DoSong(oEPC);
|
||||
else if (sEText == "hy" || sEText == "hooray") DoCheer2(oEPC);
|
||||
else if (sEText == "hl" || sEText == "hello") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_GREETING);
|
||||
else if (sEText == "hw" || sEText == "howl") DoHowl(oEPC);
|
||||
else if (sEText == "ht" || sEText == "hoot") DoHoot(oEPC);
|
||||
else if (sEText == "hp" || sEText == "hiccup") DoHiccup(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
//case 8:/*i*/
|
||||
//break;
|
||||
//case 9:/*j*/
|
||||
//break;
|
||||
default: ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
switch(nText)
|
||||
{
|
||||
case 10:/*k*/
|
||||
if (sEText == "kn" || sEText == "kneel") DoLoopAnimation(oEPC, ANIMATION_LOOPING_MEDITATE);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 11:/*l*/
|
||||
if (sEText == "la" || sEText == "laugh") DoLaugh(oEPC);
|
||||
else if (sEText == "lie") DoLoopAnimation(oEPC, ANIMATION_LOOPING_DEAD_BACK);
|
||||
else if (sEText == "lk" || sEText == "look") DoLoopAnimation(oEPC, ANIMATION_LOOPING_LOOK_FAR);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 12:/*m*/
|
||||
if (sEText == "md" || sEText == "meditate") DoLoopAnimation(oEPC, ANIMATION_LOOPING_MEDITATE);
|
||||
else if (sEText == "mk" || sEText == "mock") DoTaunt(oEPC);
|
||||
else if (sEText == "mn" || sEText == "moan") DoMoan(oEPC);
|
||||
else if (sEText == "mw" || sEText == "meow") DoMeow(oEPC);
|
||||
else if (sEText == "mo" || sEText == "moo") DoMoo(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 13:/*n*/
|
||||
if (sEText == "nd" || sEText == "nod") DoLoopAnimation(oEPC, ANIMATION_LOOPING_LISTEN);
|
||||
else if (sEText == "no") DoHeadShake(oEPC);
|
||||
else if (sEText == "np" || sEText == "nap") DoSleep(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 14:/*o*/
|
||||
if (sEText == "ow" || sEText == "ouch") DoOuch(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
default: ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
switch(nText)
|
||||
{
|
||||
case 15:/*p*/
|
||||
if (sEText == "pe" || sEText == "peer") DoLoopAnimation(oEPC, ANIMATION_LOOPING_LOOK_FAR);
|
||||
else if (sEText == "pl" || sEText == "plead") DoLoopAnimation(oEPC, ANIMATION_LOOPING_TALK_PLEADING);
|
||||
else if (sEText == "pr" || sEText == "pray") DoLoopAnimation(oEPC, ANIMATION_LOOPING_MEDITATE);
|
||||
else if (sEText == "pn" || sEText == "prone") DoLoopAnimation(oEPC, ANIMATION_LOOPING_DEAD_FRONT);
|
||||
else if (sEText == "pu" || sEText == "puke") DoPuke(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
//case 16:/*q*/
|
||||
//break;
|
||||
case 17:/*r*/
|
||||
if (sEText == "re" || sEText == "read") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_READ);
|
||||
else if (sEText == "rt" || sEText == "rest") DoLoopAnimation(oEPC, ANIMATION_LOOPING_DEAD_BACK);
|
||||
else if (sEText == "rr" || sEText == "roar") DoRoar(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 18:/*s*/
|
||||
if (sEText == "sa" || sEText == "salute") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_SALUTE);
|
||||
else if (sEText == "sn" || sEText == "scan") DoLoopAnimation(oEPC, ANIMATION_LOOPING_LOOK_FAR);
|
||||
else if (sEText == "sc" || sEText == "scratch") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_PAUSE_SCRATCH_HEAD);
|
||||
else if (sEText == "sg" || sEText == "sing") DoSong(oEPC);
|
||||
else if (sEText == "sh" || sEText == "shift") DoLoopAnimation(oEPC, ANIMATION_LOOPING_PAUSE2);
|
||||
else if (sEText == "si" || sEText == "sit") DoLoopAnimation(oEPC, ANIMATION_LOOPING_SIT_CROSS);
|
||||
else if (sEText == "sip") DoDrink(oEPC);
|
||||
else if (sEText == "sl" || sEText == "sleep") DoSleep(oEPC);
|
||||
else if (sEText == "snore") DoSnore(oEPC);
|
||||
else if (sEText == "sk" || sEText == "smoke") SmokePipe(oEPC);
|
||||
else if (sEText == "sp" || sEText == "spasm") DoLoopAnimation(oEPC, ANIMATION_LOOPING_SPASM);
|
||||
else if (sEText == "st" || sEText == "steal" || sEText == "sw" || sEText == "swipe") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_STEAL);
|
||||
else if (sEText == "so" ||sEText == "stoop") DoLoopAnimation(oEPC, ANIMATION_LOOPING_GET_LOW);
|
||||
else if (sEText == "sr" || sEText == "stretch") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_PAUSE_BORED);
|
||||
else if (sEText == "sy" || sEText == "sway") DoLoopAnimation(oEPC, ANIMATION_LOOPING_PAUSE_DRUNK);
|
||||
else if (sEText == "sm" || sEText == "scream") DoScream(oEPC);
|
||||
else if (sEText == "sz" || sEText == "sneeze") DoSneeze(oEPC);
|
||||
else if (sEText == "spit") DoSpit(oEPC);
|
||||
else if (sEText == "snarl") DoSnarl(oEPC);
|
||||
else if (sEText == "screech") DoScreech(oEPC);
|
||||
else if (sEText == "sb" || sEText == "sob") DoCry(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 19:/*t*/
|
||||
if (sEText == "ta" || sEText == "taunt") DoTaunt(oEPC);
|
||||
else if (sEText == "th" || sEText == "threaten") DoLoopAnimation(oEPC, ANIMATION_LOOPING_TALK_FORCEFUL);
|
||||
else if (sEText == "ti" || sEText == "tired") DoTired(oEPC);
|
||||
else if (sEText == "tl" || sEText == "talk") DoLoopAnimation(oEPC, ANIMATION_LOOPING_TALK_NORMAL);
|
||||
else if (sEText == "tp" || sEText == "trip") DoLoopAnimation(oEPC, ANIMATION_LOOPING_DEAD_FRONT);
|
||||
else if (sEText == "tt" || sEText == "toast") DoToast(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
default: ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
switch(nText)
|
||||
{
|
||||
//case 20:/*u*/
|
||||
//break;
|
||||
case 21:/*v*/
|
||||
if (sEText == "vm" || sEText == "vomit") DoPuke(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
case 22:/*w*/
|
||||
if (sEText == "wa" || sEText == "wave") DoFireForgetAnimation(oEPC, ANIMATION_FIREFORGET_GREETING);
|
||||
else if (sEText == "wh" || sEText == "whistle") DoWhistle(oEPC);
|
||||
else if (sEText == "wo" || sEText == "worship") DoLoopAnimation(oEPC, ANIMATION_LOOPING_WORSHIP);
|
||||
else if (sEText == "wz" || sEText == "woozy") DoDrunk(oEPC);
|
||||
else if (sEText == "wl" || sEText == "wail") DoWail(oEPC);
|
||||
else if (sEText == "wp" || sEText == "weep") DoCry(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
//case 23:/*x*/
|
||||
//break;
|
||||
case 24:/*y*/
|
||||
if (sEText == "yw" || sEText == "yawn") DoYawn(oEPC);
|
||||
else ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
default: ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
//case 5:
|
||||
//switch(nText)
|
||||
//{
|
||||
// case 25:/*z*/
|
||||
// break;
|
||||
//}
|
||||
break;
|
||||
default: ShoutBlock(oEPC, nEChannel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLocalString(oEPC, "NWNX!CHAT!SUPRESS", "1");
|
||||
FloatingTextStringOnCreature(COLOR_RED+NOT_DEAD_EM+COLOR_END, oEPC, FALSE);
|
||||
}
|
||||
|
||||
|
||||
//PROTOTYPE END
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
Reference in New Issue
Block a user