UW2_PRC8/_module/nss/fky_chat_ventril.nss
Jaysyn904 5197ad9a4d Initial upload
Initial upload
2023-09-25 20:24:01 -04:00

46 lines
2.2 KiB
Plaintext

//::////////////////////////////////////////////////////////////////////////:://
//:: SIMTools V2.1 Speech Integration & Management Tools Version 2.1 :://
//:: Created By: FunkySwerve :://
//:: Created On: April 4 2006 :://
//:: Last Updated: September 29 2006 :://
//:: With Thanks To: :://
//:: Dumbo - for his amazing plugin :://
//:: Virusman - for Linux versions, and for the reset plugin :://
//:: Dazzle - for his script samples :://
//:: Butch - for the emote wand scripts :://
//:: The DMFI project - for the languages conversions and many of the emotes:://
//:: Lanessar and the players of the Myth Drannor PW - for the new languages:://
//::////////////////////////////////////////////////////////////////////////:://
#include "x2_inc_switches"
#include "fky_chat_inc"
void main()
{
int nEvent = GetUserDefinedItemEventNumber();
object oPC, oItem, oTarget;
int nResult = X2_EXECUTE_SCRIPT_END;
switch (nEvent)
{
case X2_ITEM_EVENT_ACTIVATE:
oPC = GetItemActivator();
oItem = GetItemActivated();
oTarget = GetItemActivatedTarget();
if (VerifyDMKey(oPC) || VerifyAdminKey(oPC))
{
if (GetIsObjectValid(oTarget))
{
if (!VerifyDMKey(oTarget) && !VerifyAdminKey(oTarget))
{
SetLocalObject(oPC, "FKY_CHT_VENTRILO", oTarget);
FloatingTextStringOnCreature(COLOR_GREEN+VENTRILO+COLOR_END, oPC, FALSE);
}
else FloatingTextStringOnCreature(COLOR_RED+NO_DM_TARGET+COLOR_END, oPC, FALSE);
}
else FloatingTextStringOnCreature(COLOR_RED+OBJECT_TARGET+COLOR_END, oPC, FALSE);
}
else FloatingTextStringOnCreature(COLOR_RED+DM_ONLY+COLOR_END, oPC, FALSE);
break;
}
SetExecutedScriptReturnValue(nResult);
}