Initial upload
Initial upload
This commit is contained in:
79
_module/nss/ac_punisher.nss
Normal file
79
_module/nss/ac_punisher.nss
Normal file
@@ -0,0 +1,79 @@
|
||||
//This is the default header for most items converted to the new
|
||||
//tagbased system.
|
||||
//Remember to create 2 scripts, one using the template, and name this
|
||||
//script ac_"tagnameofitemgoeshere" (without the "")
|
||||
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
//Define Variables
|
||||
|
||||
object oItem=GetItemActivated();
|
||||
object oActivator=GetItemActivator();
|
||||
object oPlayer = GetItemActivator();
|
||||
object target = GetItemActivatedTarget();
|
||||
string tag = GetTag(oItem);
|
||||
|
||||
//You main script function goes under this line.
|
||||
|
||||
|
||||
{
|
||||
if(GetIsDM(oActivator) != TRUE)
|
||||
{
|
||||
object oTest = GetFirstPC();
|
||||
string sTestName = GetPCPlayerName(oActivator);
|
||||
int nFound = FALSE;
|
||||
while (GetIsObjectValid(oTest) && (! nFound))
|
||||
{
|
||||
if (GetPCPlayerName(oTest) == sTestName)
|
||||
{
|
||||
if(GetIsDM(oTest))
|
||||
{
|
||||
nFound = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
oTest=GetNextPC();
|
||||
}
|
||||
}
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
string pcname = GetPCPlayerName(oTarget);
|
||||
string dmname = GetPCPlayerName(oActivator);
|
||||
|
||||
SendMessageToAllDMs("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
WriteTimestampedLogEntry("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
location lWrath = GetLocation(oTarget);
|
||||
effect eExpl = EffectVisualEffect(VFX_FNF_STRIKE_HOLY);
|
||||
effect eExpl2 = EffectVisualEffect(VFX_FNF_DISPEL_DISJUNCTION);
|
||||
effect eSmoke = EffectVisualEffect(VFX_FNF_LOS_EVIL_30);
|
||||
effect eBUMP = EffectVisualEffect(VFX_FNF_BLINDDEAF);
|
||||
|
||||
DelayCommand(0.2,ApplyEffectToObject(DURATION_TYPE_INSTANT,eExpl,OBJECT_SELF));
|
||||
|
||||
DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_INSTANT,eSmoke,OBJECT_SELF));
|
||||
DelayCommand(1.3,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eExpl2,OBJECT_SELF, 5.0));
|
||||
DelayCommand(1.8,ApplyEffectToObject(DURATION_TYPE_INSTANT,eBUMP,OBJECT_SELF));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectDispelMagicAll(40)), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectCurse(20,20,20,20,20,20)), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectBlindness()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectDarkness()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectDeaf()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectSilence()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectSlow()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_ANTI_LIGHT_10), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_DARKNESS), oTarget, 60.0);
|
||||
AssignCommand(oTarget, ActionSpeakString("I have offended the Gods, and must be punished!", TALKVOLUME_SHOUT));
|
||||
DelayCommand(5.0, AssignCommand(oTarget, ActionSpeakString("I wander the realms in my accursed state as a pointed reminder... Don't anger the DM!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(10.0, AssignCommand(oTarget, ActionSpeakString("I know now that the DM will punish me for misbehaving!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(15.0, AssignCommand(oTarget, ActionSpeakString("I promise to behave if only you will take this horrific curse off of me!", TALKVOLUME_SHOUT)));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user