generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
53
_module/nss/tal_include.nss
Normal file
53
_module/nss/tal_include.nss
Normal file
@@ -0,0 +1,53 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Talus Menu on Rest
|
||||
// tal_include
|
||||
// OPW Integration and Clean Up By Don Anderson
|
||||
// dandersonru@msn.com
|
||||
//
|
||||
// Used in Rest Menu Conversation
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "nw_i0_spells"
|
||||
|
||||
void Scrying(object oPC,object oTarg)
|
||||
{
|
||||
location pcLocation=GetLocation(oPC);
|
||||
float scrydur=16.0+IntToFloat(GetCasterLevel(oPC)/3);
|
||||
|
||||
if(GetCasterLevel(oPC)<=GetCasterLevel(oTarg))
|
||||
{
|
||||
if(d4()>2) SendMessageToPC(oTarg,"You sense you are being watched from afar.");
|
||||
}
|
||||
|
||||
object oCopy=CopyObject(oPC,pcLocation,OBJECT_INVALID,GetName(oPC)+"copy");
|
||||
DestroyObject(oCopy,scrydur-0.2);
|
||||
RemoveSpellEffects(SPELL_CLAIRAUDIENCE_AND_CLAIRVOYANCE,oPC,oPC);
|
||||
|
||||
DelayCommand(scrydur+0.4,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDamage(GetMaxHitPoints(oCopy),DAMAGE_TYPE_POSITIVE,DAMAGE_POWER_NORMAL),oCopy));
|
||||
|
||||
AssignCommand(oCopy,ActionPlayAnimation(ANIMATION_LOOPING_CONJURE1,0.2,3600.00));
|
||||
ChangeToStandardFaction(oCopy,STANDARD_FACTION_COMMONER);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_DUR_PROT_PREMONITION ),oCopy,scrydur-0.6);
|
||||
SetImmortal(oCopy,TRUE);
|
||||
SetCutsceneMode(oPC,TRUE);
|
||||
DelayCommand(scrydur+0.5,SetCutsceneMode(oPC,FALSE));
|
||||
DelayCommand(scrydur+0.5,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDamage(GetMaxHitPoints(oCopy)-GetCurrentHitPoints(oCopy),DAMAGE_TYPE_POSITIVE,DAMAGE_POWER_NORMAL),oPC));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectEthereal(),oPC,scrydur+0.5);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY),oPC,scrydur+0.5);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectCutsceneGhost(),oPC,scrydur+0.5);
|
||||
AssignCommand(oPC,ActionJumpToObject(oTarg,FALSE));
|
||||
|
||||
DelayCommand(scrydur-0.3,AssignCommand(oPC,ClearAllActions()));
|
||||
DelayCommand(scrydur-0.7,SetPlotFlag(oPC,FALSE));
|
||||
pcLocation=GetLocation(oCopy);
|
||||
DelayCommand(scrydur,AssignCommand(oPC,ActionJumpToLocation(pcLocation)));
|
||||
|
||||
AssignCommand(oPC,ActionForceFollowObject(oTarg,1.0));
|
||||
SetPlotFlag(oPC,TRUE);
|
||||
}
|
||||
|
||||
int StartingConditional(){return TRUE;}
|
||||
|
||||
//void main(){}
|
||||
Reference in New Issue
Block a user