Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
71
_removed/nw_c2_defaultb.nss
Normal file
71
_removed/nw_c2_defaultb.nss
Normal file
@@ -0,0 +1,71 @@
|
||||
////////::////////////////////////////////////////////////
|
||||
//:: Default: On Spell Cast At
|
||||
//:: NW_C2_DEFAULTB
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
This determines if the spell just cast at the
|
||||
target is harmful or not.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Dec 6, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oCaster = GetLastSpellCaster();
|
||||
if(!GetLastSpellHarmful())
|
||||
{
|
||||
if (GetObjectSeen(oCaster)&&(GetObjectType(oCaster)==OBJECT_TYPE_CREATURE)&&(oCaster!=OBJECT_SELF)&&(d3()==1))
|
||||
{
|
||||
PlayVoiceChat(VOICE_CHAT_THANKS);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ((d4()==1)&&(GetIsObjectValid(oCaster))&&(GetObjectSeen(oCaster)))
|
||||
{
|
||||
SetVictim(oCaster);
|
||||
}
|
||||
|
||||
if (GetDetectMode(OBJECT_SELF)==DETECT_MODE_ACTIVE)
|
||||
{
|
||||
ActionUseSkill(SKILL_SPOT,OBJECT_SELF);
|
||||
}
|
||||
|
||||
if (GetStealthMode(OBJECT_SELF)==STEALTH_MODE_ACTIVATED)
|
||||
{
|
||||
ActionUseSkill(SKILL_HIDE,OBJECT_SELF);
|
||||
}
|
||||
|
||||
|
||||
SetTarget(oCaster);
|
||||
///Shout Attack my target, only works with the On Spawn In setup
|
||||
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||||
|
||||
if (!GetIsFighting(OBJECT_SELF))
|
||||
{
|
||||
ClearAllActions();
|
||||
|
||||
if (GetObjectSeen(oCaster))
|
||||
{
|
||||
DetermineCombatRound();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ActionMoveToObject(oCaster,TRUE,3.0);
|
||||
}
|
||||
}
|
||||
|
||||
if(GetSpawnInCondition(NW_FLAG_SPELL_CAST_AT_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1011));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user