Added NWN Dark Sun module contents

Added NWN Dark Sun module contents.
This commit is contained in:
Jaysyn904 2021-07-12 21:24:46 -04:00
parent 556224a658
commit de24f81734
10609 changed files with 146652 additions and 0 deletions

BIN
nwnds_module/10coins.uti Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,16 @@
void main()
{
object oPC = GetLastOpenedBy();
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
CreateItemOnObject("50gold", OBJECT_SELF);
}

Binary file not shown.

View File

@ -0,0 +1,16 @@
void main()
{
object oPC = GetLastOpenedBy();
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
CreateItemOnObject("nw_it_gem013", OBJECT_SELF);
}

Binary file not shown.

View File

@ -0,0 +1,18 @@
void main()
{
object oPC = GetLastOpenedBy();
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
CreateItemOnObject("keyofchaos", OBJECT_SELF);
SetLocked(OBJECT_SELF,1);
}

Binary file not shown.

View File

@ -0,0 +1,18 @@
void main()
{
object oPC = GetLastOpenedBy();
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
CreateItemOnObject("doomkey", OBJECT_SELF);
SetLocked(OBJECT_SELF,1);
}

Binary file not shown.

View File

@ -0,0 +1,16 @@
void main()
{
object oPC = GetLastOpenedBy();
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
CreateItemOnObject("nw_it_gem010", OBJECT_SELF);
}

BIN
nwnds_module/20ft_fall.ncs Normal file

Binary file not shown.

View File

@ -0,0 +1,38 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
object oTarget;
object oWayPoint = GetWaypointByTag("wp_oldwell");
location lLoc = GetLocation(oWayPoint);
oTarget = oPC;
AssignCommand(oPC, TakeGoldFromCreature(d20(2), oPC, TRUE));
effect eEffect;
eEffect = EffectDamage(d6(2), DAMAGE_TYPE_BLUDGEONING, DAMAGE_POWER_NORMAL);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC);
//Visual effects can't be applied to waypoints, so if it is a WP
//the VFX will be applied to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_BUMP), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_BUMP), GetLocation(oTarget));
FloatingTextStringOnCreature("*You fall about 20 feet.*", oPC, FALSE);
AssignCommand(oPC,JumpToLocation(lLoc));
}

BIN
nwnds_module/25coins.uti Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,66 @@
// Constriction Attack - Item Unique OnHit Script
//
#include "nw_i0_spells"
//#include "x2_inc_spellhook"
#include "x2_inc_switches"
const int CREATURE_SIZE_GARGANTUAN = 22;
const int CREATURE_SIZE_COLOSSAL = 23;
void main()
{
object oPC = OBJECT_SELF;
object oItem = GetSpellCastItem();
object oTarget = GetSpellTargetObject();
int nCreSTR = GetAbilityModifier(ABILITY_STRENGTH, oPC);
effect eGrabDmg = EffectDamage(d8(2)+nCreSTR, DAMAGE_TYPE_BLUDGEONING);
int nSTR_Target;
int nSTR_Creature;
// Colossal creatures cannot be constricted.
if (GetCreatureSize(oTarget) == CREATURE_SIZE_COLOSSAL)
{
return;
}
// Perform a melee touch attack. Return if it missed.
if (!TouchAttackMelee(oTarget))
{
return;
}
// Deal 2d8 + STR Bonus bludgeoning damage.
ApplyEffectToObject(DURATION_TYPE_INSTANT, eGrabDmg, oTarget);
// Perform an opposed Strength check. If the target wins this check, it won't
// get entangled. To avoid ties, we do the rolling in a loop that breaks once
// the two results are NOT identical.
do
{
nSTR_Target = GetAbilityScore(oTarget, ABILITY_STRENGTH) + d20();
nSTR_Creature = GetAbilityScore(oPC, ABILITY_STRENGTH) + d20();
}
while (nSTR_Target == nSTR_Creature);
// If the target wins, send a short message to it and return.
if (nSTR_Target > nSTR_Creature)
{
FloatingTextStringOnCreature("You escape the constriction attack.", oTarget);
return;
}
// Check for immunity vs entangle. If the target is immune, tell him that the
// Shambling Mound TRIED to entangle him. Otherwise tell him that he GOT
// entangled.
if (GetIsImmune(oTarget, IMMUNITY_TYPE_ENTANGLE, oPC))
{
FloatingTextStringOnCreature("The creature tries to constrict you!", oTarget);
}
else
{
FloatingTextStringOnCreature("The creature is constricting you!", oTarget);
}
// Apply the Entangle effect no matter whether the target is immune or not. If
// it is, it will have already received an according message that the Shambling
// Mounds entangle attempt failed. Otherwise it simply gets entangled as
// intended.
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectEntangle(), oTarget, 9.0f);
}

BIN
nwnds_module/50gold.uti Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
nwnds_module/Repute.fac Normal file

Binary file not shown.

View File

@ -0,0 +1,185 @@
///////////////////////////////////
// Carcerian's BattleCry Script //
// "Evil Dead" Edition //
///////////////////////////////////
#include "NW_I0_GENERIC"
const int BattleCryChance = 15;
const int CombatCryChance = 20;
const int DeathCryChance = 20;
const int CustomUndeadChance = 50;
const string COLOR_RED = "<cþ >";
const string COLOR_DARK = "<cSSS>";
const string COLOR_GREEN = "<c þ >";
const string COLOR_WHITE = "<cþþþ>";
const string COLOR_VIOLET = "<c¥ ¥>";
const string COLOR_YELLOW = "<cþþ >";
int HasSpoken()
{
if (GetLocalInt(OBJECT_SELF,"HASSPOKEN")) return 1;
SetLocalInt(OBJECT_SELF,"HASSPOKEN",1);
DelayCommand(IntToFloat(d10(4)),SetLocalInt(OBJECT_SELF,"HASSPOKEN",0));
return 0;
}
void DoUndeadChatter()
{
string sMyTag = GetTag(OBJECT_SELF);
if ((FindSubString(sMyTag,"SKEL")>-1)||(FindSubString(sMyTag,"MOHRG")>-1))
{
switch (d3()) // Skeletons
{
case 1 : ActionSpeakString(COLOR_WHITE+"I got a bone to pick with you!",TALKVOLUME_TALK); break;
case 2 : ActionSpeakString(COLOR_WHITE+"Forward, you worthless bags of bones!",TALKVOLUME_TALK); break;
case 3 : ActionSpeakString(COLOR_WHITE+"CHARGE!",TALKVOLUME_TALK); break;
}
}
else if (FindSubString(sMyTag,"ZOMB")>-1)
{
if (Random(2)) ActionSpeakString(COLOR_GREEN+"Brains!",TALKVOLUME_TALK);
else ActionSpeakString(COLOR_GREEN+"BRAINS!",TALKVOLUME_TALK);
// "More brains!"
}
else if ((FindSubString(sMyTag,"GHOUL")>-1)||(FindSubString(sMyTag,"GHAST")>-1)
||(FindSubString(sMyTag,"WIGHT")>-1))
{
switch (d4()) // Flesh Eaters
{
case 1 : ActionSpeakString(COLOR_GREEN+"I'll feast on your entrails!",TALKVOLUME_TALK); break;
case 2 : ActionSpeakString(COLOR_GREEN+"FOOD!",TALKVOLUME_TALK); break;
case 3 : ActionSpeakString(COLOR_GREEN+"Live ones!!",TALKVOLUME_TALK); break;
case 4 : ActionSpeakString(COLOR_GREEN+"FLESSSSHHHH!!!",TALKVOLUME_TALK); break;
}
}
else if ((FindSubString(sMyTag,"WRAITH")>-1)||(FindSubString(sMyTag,"ALLIP")>-1)
||(FindSubString(sMyTag,"Bodak")>-1)||(FindSubString(sMyTag,"SHADOW")>-1)
||(FindSubString(sMyTag,"SHFIEND")>-1)||(FindSubString(sMyTag,"SPECTRE")>-1))
{
switch (d4()) // Soul Eaters
{
case 1 : ActionSpeakString(COLOR_VIOLET+"I'll swallow your soul!",TALKVOLUME_TALK); break;
case 2 : ActionSpeakString(COLOR_VIOLET+"Your soul will be mine!",TALKVOLUME_TALK); break;
case 3 : ActionSpeakString(COLOR_VIOLET+"Mine!!!!",TALKVOLUME_TALK); break;
case 4 : ActionSpeakString(COLOR_VIOLET+"The darkness calls for you...",TALKVOLUME_TALK); break;
}
}
else switch (d6()) // Generic Undead
{
case 1 : ActionSpeakString(COLOR_RED+"I'll swallow your soul!",TALKVOLUME_TALK); break;
case 2 : ActionSpeakString(COLOR_RED+"Blood and souls!",TALKVOLUME_TALK); break;
case 3 : ActionSpeakString(COLOR_RED+"Joinnnn usssssssss!",TALKVOLUME_TALK); break;
case 4 : ActionSpeakString(COLOR_RED+"For the Master!",TALKVOLUME_TALK); break;
case 5 : ActionSpeakString(COLOR_RED+"For the Master!",TALKVOLUME_TALK); break;
case 6 : ActionSpeakString(COLOR_RED+"One by one we will take you!",TALKVOLUME_TALK); break;
}
}
// For use on perception
void DoBattleCry()
{ //if undead spotted "i see dead people!" "Dead ahead!"
if (d100()<=BattleCryChance)
{
if (HasSpoken()) return;
if ((GetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)&&(d100()<=CustomUndeadChance))
{
DoUndeadChatter();
}
else switch (d10())
{
case 1: PlayVoiceChat(VOICE_CHAT_ATTACK); break;
case 2: PlayVoiceChat(VOICE_CHAT_BATTLECRY1); break;
case 3: PlayVoiceChat(VOICE_CHAT_BATTLECRY2); break;
case 4: PlayVoiceChat(VOICE_CHAT_BATTLECRY3); break;
case 5: PlayVoiceChat(VOICE_CHAT_THREATEN); break;
case 6: PlayVoiceChat(VOICE_CHAT_TAUNT); break;
case 7: PlayVoiceChat(VOICE_CHAT_ENEMIES); break;
case 8: PlayVoiceChat(VOICE_CHAT_CHEER); break;
case 9: PlayVoiceChat(VOICE_CHAT_FOLLOWME); break;
case 10: PlayVoiceChat(VOICE_CHAT_LOOKHERE); break;
}
}
}
//For End of Combat Round
void DoCombatCry()
{
if (GetHasEffect(EFFECT_TYPE_FRIGHTENED))
{
if (d100()<=CombatCryChance)
{
if (HasSpoken()) return;
if ((GetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)&&(d100()<=CustomUndeadChance))
switch (d6()) //Turned undead :)
{
case 1 : ActionSpeakString(COLOR_YELLOW+"It Burns! It Burns!",TALKVOLUME_TALK); break;
case 2 : ActionSpeakString(COLOR_YELLOW+"Cursed Light!",TALKVOLUME_TALK); break;
case 3 : ActionSpeakString(COLOR_YELLOW+"Your faith is weak, I can feel your fear...",TALKVOLUME_TALK); break;
case 4 : ActionSpeakString(COLOR_YELLOW+"AAAIIIEEE!!!",TALKVOLUME_TALK); break;
case 5 : ActionSpeakString(COLOR_YELLOW+"NOOO!!!",TALKVOLUME_TALK); break;
case 6 : ActionSpeakString(COLOR_YELLOW+"It Burns!",TALKVOLUME_TALK); break;
}
else switch (d6())
{
case 1: PlayVoiceChat(VOICE_CHAT_FLEE); break;
case 2: PlayVoiceChat(VOICE_CHAT_HELP); break;
case 3: PlayVoiceChat(VOICE_CHAT_GUARDME); break;
case 4: PlayVoiceChat(VOICE_CHAT_CUSS); break;
case 5: PlayVoiceChat(VOICE_CHAT_BADIDEA); break;
case 6: PlayVoiceChat(VOICE_CHAT_NEARDEATH); break;
}
}
}
else
{
if (d100()<=CombatCryChance)
{
if (HasSpoken()) return;
if ((GetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)&&(d100()<=CustomUndeadChance))
switch (d6())
{
DoUndeadChatter();
}
else switch (d6())
{
case 1: PlayVoiceChat(VOICE_CHAT_BATTLECRY1); break;
case 2: PlayVoiceChat(VOICE_CHAT_BATTLECRY2); break;
case 3: PlayVoiceChat(VOICE_CHAT_BATTLECRY3); break;
case 4: PlayVoiceChat(VOICE_CHAT_LAUGH); break;
case 5: PlayVoiceChat(VOICE_CHAT_TAUNT); break;
case 6: PlayVoiceChat(VOICE_CHAT_THREATEN); break;
}
}
}
}
//For Creature Death
void DoDeathCry()
{
if (d100()<=DeathCryChance)
{
if (HasSpoken()) return;
if ((GetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)&&(d100()<=CustomUndeadChance))
switch (d6())
{
case 1 : ActionSpeakString(COLOR_RED+"Dead by dawn! Dead by dawn!",TALKVOLUME_TALK); break;
case 2 : ActionSpeakString(COLOR_RED+"Death is only the beginning!",TALKVOLUME_TALK); break;
case 3 : ActionSpeakString(COLOR_RED+"Darkness take me...",TALKVOLUME_TALK); break;
case 4 : ActionSpeakString(COLOR_RED+"Free at last...",TALKVOLUME_TALK); break;
case 5 : ActionSpeakString(COLOR_RED+"Time to die...",TALKVOLUME_TALK); break;
case 6 : ActionSpeakString(COLOR_RED+"Thank you...",TALKVOLUME_TALK); break;
} // "No more tears..."
else switch (d6())
{
case 1: PlayVoiceChat(VOICE_CHAT_CUSS); break;
case 2: PlayVoiceChat(VOICE_CHAT_DEATH); break;
case 3: PlayVoiceChat(VOICE_CHAT_NEARDEATH); break;
case 4: PlayVoiceChat(VOICE_CHAT_GOODBYE); break;
case 5: PlayVoiceChat(VOICE_CHAT_LAUGH); break;
case 6: PlayVoiceChat(VOICE_CHAT_HEALME); break;
}
}
}
//void main (){}

Binary file not shown.

View File

@ -0,0 +1,200 @@
const float fUnlifespan = 300.0;
string SpawnOf(object oSpawnKiller = OBJECT_INVALID)
{
string sSpawn = "";
string sKiller = GetName(oSpawnKiller, FALSE);
object oLeft = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oSpawnKiller);
object oRight = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oSpawnKiller);
string sLeftTag = GetTag(oLeft);
string sRightTag = GetTag(oRight);
if (!(GetStringRight(sKiller, 6) ==" Spawn") ||
!(GetStringRight(sKiller, 6) ==" Rat"))
if ((GetIsPC(GetMaster(oSpawnKiller))||(GetIsPC(oSpawnKiller))))
{
if ((FindSubString(sKiller, "Morg")>-1)||
(sRightTag=="vampirespawner")||
(sLeftTag=="vampirespawner")) sSpawn = "namechspawn";
/* // No Vampires on Athas
if ((FindSubString(sKiller, "Vampire")>-1)||(sRightTag=="vampirespawner")||(sLeftTag=="vampirespawner"))
{
if (GetGender(OBJECT_SELF)==GENDER_FEMALE) sSpawn = "vampirespawn_f";
else sSpawn = "vampirespawn_m";
} */
else if ((FindSubString(sKiller, "Tyrantfog")>-1)||(sRightTag=="tyrantfogspawner")) sSpawn = "zombiespawn";
else if (FindSubString(sKiller, "Ghoul")>-1) sSpawn = "ghoulspawn";
else if (FindSubString(sKiller, "Ghast")>-1) sSpawn = "ghoulspawn";
else if ((FindSubString(sKiller, "Shadow")>-1)||(sRightTag=="shadowspawner")) sSpawn = "shadowspawn";
else if (FindSubString(sKiller, "Spectre")>-1) sSpawn = "spectrespawn";
else if (FindSubString(sKiller, "Wraith")>-1) sSpawn = "wraithspawn";
else if ((FindSubString(sKiller, "Wight")>-1)||(sRightTag=="wightspawner")) sSpawn = "wightspawn";
else if (FindSubString(sKiller, "Crypt Chanter")>-1) sSpawn = "wraithspawn";
else if (FindSubString(sKiller, "Bleakborn")>-1) sSpawn = "zombiespawn";
else if (FindSubString(sKiller, "Bodak")>-1) sSpawn = "zombiespawn";
else if (FindSubString(sKiller, "T'liz")>-1) sSpawn = "namechspawn";
else if ((FindSubString(sKiller, "Meorty")>-1) ||
(FindSubString(sKiller, "Amithrang")>-1)) sSpawn = "namechspawn";
}
else // Monster Killer
{
if (FindSubString(sKiller, "Tyrantfog")>-1) sSpawn = "zombiespawn";
else if (FindSubString(sKiller, "Ghast")>-1) sSpawn = "ghoulspawn";
else if (FindSubString(sKiller, "Ghoul")>-1) sSpawn = "ghoulspawn";
else if (((FindSubString(sKiller, "Meorty")>-1) ||
(FindSubString(sKiller, "Amithrang")>-1))) sSpawn = "namechspawn";
else if (FindSubString(sKiller, "Shadow")>-1) sSpawn = "shadowspawn";
else if (FindSubString(sKiller, "Spectre")>-1) sSpawn = "spectrespawn";
else if (FindSubString(sKiller, "Crypt Chanter")>-1) sSpawn = "wraithspawn";
else if (FindSubString(sKiller, "Bleakborn")>-1) sSpawn = "zombiespawn";
else if (FindSubString(sKiller, "Bodak")>-1) sSpawn = "zombiespawn";
else if (FindSubString(sKiller, "T'liz")>-1) sSpawn = "namechspawn";
else if ((FindSubString(sKiller, "Morg")>-1)||
(sRightTag=="vampirespawner")||
(sLeftTag=="vampirespawner")) sSpawn = "namechspawn";
/* //No Vampires on Athas
{
if (GetGender(OBJECT_SELF)==GENDER_FEMALE) sSpawn = "vampirespawn_f";
else sSpawn = "vampirespawn_m";
}*/
else if (FindSubString(sKiller, "Wight")>-1) sSpawn = "wightspawn";
if (FindSubString(sKiller, "Wraith")>-1) sSpawn = "wraithspawn";
}
return sSpawn;
}
int ShadeType(object oShadeKiller = OBJECT_INVALID)
{
int iShade = 0;
string sSpawn = "";
string sKiller = GetName(oShadeKiller);
object oRight = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oShadeKiller);
string sRightTag = GetTag(oRight);
if ((FindSubString(sKiller, "Shadow")>-1)||(sRightTag=="shadowspawner")) iShade = 1;
else if (FindSubString(sKiller, "Spectre")>-1) iShade = 2;
if (FindSubString(sKiller, "Wraith")>-1) iShade = 3;
return iShade;
}
int IsSpawnable(int iSpawnRace)
{
int iSpawnable = 0;
if ((iSpawnRace == RACIAL_TYPE_ANIMAL)||
(iSpawnRace == RACIAL_TYPE_BEAST)||
(iSpawnRace == RACIAL_TYPE_MAGICAL_BEAST)||
(iSpawnRace == RACIAL_TYPE_SHAPECHANGER)||
(iSpawnRace == RACIAL_TYPE_VERMIN)||
(iSpawnRace == RACIAL_TYPE_ABERRATION)||
(iSpawnRace == RACIAL_TYPE_FEY)||
(iSpawnRace == RACIAL_TYPE_GIANT)||
(iSpawnRace == RACIAL_TYPE_HUMANOID_GOBLINOID)||
(iSpawnRace == RACIAL_TYPE_HUMANOID_MONSTROUS)||
(iSpawnRace == RACIAL_TYPE_HUMANOID_ORC)||
(iSpawnRace == RACIAL_TYPE_HUMANOID_REPTILIAN)||
(iSpawnRace == RACIAL_TYPE_DRAGON)||
(iSpawnRace == RACIAL_TYPE_DWARF)||
(iSpawnRace == RACIAL_TYPE_ELF)||
(iSpawnRace == RACIAL_TYPE_GNOME)||
(iSpawnRace == RACIAL_TYPE_HALFELF)||
(iSpawnRace == RACIAL_TYPE_HALFLING)||
(iSpawnRace == RACIAL_TYPE_HUMAN)||
(iSpawnRace == RACIAL_TYPE_HALFORC))
iSpawnable = 1;
return iSpawnable;
}
int IsNonHuman(int iSpawnRace)
{
int iSpawnable = 0;
if ((iSpawnRace == RACIAL_TYPE_ANIMAL)||
(iSpawnRace == RACIAL_TYPE_BEAST)||
(iSpawnRace == RACIAL_TYPE_DRAGON)||
(iSpawnRace == RACIAL_TYPE_MAGICAL_BEAST)||
(iSpawnRace == RACIAL_TYPE_VERMIN)||
(iSpawnRace == RACIAL_TYPE_ABERRATION)||
(iSpawnRace == RACIAL_TYPE_FEY)||
(iSpawnRace == RACIAL_TYPE_GIANT) ||
(iSpawnRace == RACIAL_TYPE_HUMANOID_GOBLINOID)||
(iSpawnRace == RACIAL_TYPE_HUMANOID_MONSTROUS)||
(iSpawnRace == RACIAL_TYPE_HUMANOID_ORC)||
(iSpawnRace == RACIAL_TYPE_HUMANOID_REPTILIAN))
iSpawnable = 1;
return iSpawnable;
}
int UndeadCheck(object oMyKiller)
{
int iPassed = 0;
int iSpawnVFX = VFX_FNF_SUMMON_UNDEAD;
//object oMyKiller = GetLastKiller();
int iRace = GetRacialType(OBJECT_SELF);
int iKillerRace = GetRacialType(oMyKiller);
int iKillerUndeadClass = GetLevelByClass(CLASS_TYPE_UNDEAD, oMyKiller);
object oLeft = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oMyKiller);
object oRight = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oMyKiller);
string sLeftTag = GetTag(oLeft);
string sRightTag = GetTag(oRight);
if ((iKillerRace==RACIAL_TYPE_UNDEAD)
||(iKillerUndeadClass>0)
||(sRightTag=="tyrantfogspawner")
||(sRightTag=="shadowspawner")
||(sRightTag=="CR_SLAM_PSISHAD1")
||(sLeftTag=="CR_SLAM_PSISHAD1")
||(sRightTag=="vampirespawner")
||(sLeftTag=="vampirespawner"))
if (IsSpawnable(iRace))
{
string sSpawnStr = SpawnOf(oMyKiller);
if (sSpawnStr != "")
{
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(iSpawnVFX), OBJECT_SELF);
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, sSpawnStr, GetLocation(OBJECT_SELF));
if (GetIsObjectValid(oSpawn)) iPassed = 1;
SetPortraitId(oSpawn, GetPortraitId(OBJECT_SELF));
if (GetIsPC(GetMaster(oMyKiller))||(GetIsPC(oMyKiller)))
{
SetName(oSpawn,GetName(OBJECT_SELF,FALSE)+" "+GetName(oSpawn,TRUE));
if (GetIsObjectValid(GetMaster(oMyKiller)))
AddHenchman(GetMaster(oMyKiller), oSpawn);
else AddHenchman(oMyKiller, oSpawn);
}
else
{
SetName(oSpawn,GetName(OBJECT_SELF,FALSE)+" "+GetName(oSpawn,TRUE));
//if (FindSubString(GetName(OBJECT_SELF)," Spawn")==-1) SetName(GetName(OBJECT_SELF)+ " Spawn");
ChangeFaction(oSpawn,oMyKiller);
}
int iShadeNum = 0;
if (IsNonHuman(iRace))
{
SetCreatureAppearanceType(oSpawn,GetAppearanceType(OBJECT_SELF));
iShadeNum = ShadeType(oMyKiller);
switch (iShadeNum)
{
case 1: //dark shadows
ApplyEffectToObject(DURATION_TYPE_PERMANENT,SupernaturalEffect(EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR)),oSpawn,7.0);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,SupernaturalEffect(EffectVisualEffect(VFX_DUR_GHOST_TRANSPARENT)),oSpawn,7.0);
break;
case 2: //grey spectre
ApplyEffectToObject(DURATION_TYPE_PERMANENT,SupernaturalEffect(EffectVisualEffect(VFX_DUR_GHOST_TRANSPARENT)),oSpawn,7.0);
break;
case 3: //light wraith
ApplyEffectToObject(DURATION_TYPE_PERMANENT,SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_GREY)),oSpawn,7.0);
break;
}
}
if (iShadeNum>0) //Fly off
{
DelayCommand(fUnlifespan-1.5,ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectDisappear(), oSpawn));
DestroyObject(oSpawn, fUnlifespan);
}
else // Decay and Disintegrate
{
DelayCommand(fUnlifespan-1.5,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_DEATH), oSpawn));
DestroyObject(oSpawn, fUnlifespan);
}
}
}
return iPassed;
}
//void main() {}

Binary file not shown.

BIN
nwnds_module/_well001.utp Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,14 @@
void main()
{
object oTarget = GetEnteringObject();
object oCaster = GetAreaOfEffectCreator();
if ( !GetIsEnemy(oTarget,oCaster) || oTarget == oCaster )
return;
effect eAcid = EffectDamage(d6(6),DAMAGE_TYPE_ACID);
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eAcid,oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
}

Binary file not shown.

View File

@ -0,0 +1,21 @@
void main()
{
effect eAcid;
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
object oCaster = GetAreaOfEffectCreator();
object oTarget = GetFirstInPersistentObject();
while ( GetIsObjectValid(oTarget ) )
{
if ( GetIsEnemy(oTarget,oCaster) )
{
eAcid = EffectDamage(d6(6),DAMAGE_TYPE_ACID);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eAcid,oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
}
oTarget = GetNextInPersistentObject();
}
}

Binary file not shown.

View File

@ -0,0 +1,8 @@
void main()
{
effect eAOE = EffectAreaOfEffect(AOE_PER_FOGACID,"acid_cloud1","acid_cloud2","null");
eAOE = SupernaturalEffect(eAOE);
eAOE = ExtraordinaryEffect(eAOE);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eAOE,OBJECT_SELF,HoursToSeconds(100));
}

Binary file not shown.

View File

@ -0,0 +1,4 @@
void main()
{
AssignCommand(GetPCSpeaker(),ActionJumpToLocation(GetLocation(GetObjectByTag("WP_AltCaravan"))));
}

Binary file not shown.

View File

@ -0,0 +1,4 @@
void main()
{
AssignCommand(GetPCSpeaker(),ActionJumpToLocation(GetLocation(GetObjectByTag("WP_BlueRiver"))));
}

Binary file not shown.

View File

@ -0,0 +1,5 @@
void main()
{
TakeGoldFromCreature(500, GetPCSpeaker(), TRUE);
AssignCommand(GetPCSpeaker(),ActionJumpToLocation(GetLocation(GetObjectByTag("WP_RedRiver"))));
}

View File

@ -0,0 +1,25 @@
void AdjustAbility (int Ability, int Amount);
void AdjustAbility (int Ability, int Amount)
{
object oSpeaker;
int Score;
effect eAbility, eAdjustAbility;
oSpeaker = GetPCSpeaker();
if (Amount<0)
{
eAbility=EffectAbilityDecrease(Ability,abs(Amount));
eAdjustAbility=EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE,FALSE);
}
else
{
eAbility=EffectAbilityIncrease(Ability,Amount);
eAdjustAbility=EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE,FALSE);
}
eAbility=ExtraordinaryEffect(eAbility);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eAdjustAbility, oSpeaker, 0.5);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eAbility, oSpeaker, 0.0);
}

Binary file not shown.

View File

@ -0,0 +1,232 @@
#include "nw_i0_generic"
#include "x2_inc_switches"
#include "inc_AI"
void DoPhysical( object oTarget )
{
if ( !GetIsObjectValid(oTarget) || !GetIsEnemy(oTarget) )
{
oTarget = GetNearestEnemy();
if ( !GetIsObjectValid(oTarget) )
return;
}
object oEquip = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND);
if ( GetDistanceToObject(oTarget) > FeetToMeters(20.0) )
{
if ( !GetIsObjectValid( oEquip ) || !GetWeaponRanged( oEquip ) )
ActionEquipMostDamagingRanged();
ActionAttack(oTarget);
}
else
{
if ( !GetIsObjectValid( oEquip ) || GetWeaponRanged( oEquip ) )
ActionEquipMostDamagingMelee();
TalentMeleeAttack(oTarget);
}
SetCreatureOverrideAIScriptFinished();
}
void main()
{
// The following two lines should not be touched
object oIntruder = GetCreatureOverrideAIScriptTarget();
ClearCreatureOverrideAIScriptTarget();
if ( !GetCanAct(OBJECT_SELF) )
{
SetCreatureOverrideAIScriptFinished();
return;
}
int bAura = GetLocalInt(OBJECT_SELF,"aura");
if ( !bAura )
{
// ActionCastFakeSpellAtLocation(SPELL_SUMMON_SHADOW,GetLocation(OBJECT_SELF));
string sScript = GetLocalString(OBJECT_SELF,"Aura_Script");
// SpeakString("Running script " + sScript,TALKVOLUME_SHOUT);
// ClearAllActions();
if ( sScript != "" )
ExecuteScript(sScript,OBJECT_SELF);
// SetCreatureOverrideAIScriptFinished();
SetLocalInt(OBJECT_SELF,"aura",1);
return;
}
/* if ( d6() == 1 ) // in case they get busy-stuck, also to add randomness
{
SetLocalInt(OBJECT_SELF,"busy",FALSE);
return;
} */
// Don't inturupt actions in progress
if ( GetCurrentAction() == ACTION_CASTSPELL )
{
SetCreatureOverrideAIScriptFinished();
return;
}
if ( GetLocalInt(OBJECT_SELF,"physical") )
{
ClearAllActions();
DoPhysical(oIntruder);
return;
}
// Haste = Super awesome;
if ( !GetHasEffect(EFFECT_TYPE_HASTE ) && ( GetHasSpell(SPELL_HASTE) ||
GetHasSpell(SPELL_MASS_HASTE) ) )
{
// SpeakString("Time for haste!!!");
if ( GetHasSpell(SPELL_MASS_HASTE) )
{
ClearActions(1001);
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
ActionCastSpellAtObject(SPELL_MASS_HASTE,OBJECT_SELF);
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
SetCreatureOverrideAIScriptFinished();
return;
}
if ( GetHasSpell(SPELL_HASTE) )
{
ClearActions(1001);
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
ActionCastSpellAtObject(SPELL_HASTE,OBJECT_SELF);
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
SetCreatureOverrideAIScriptFinished();
return;
}
SpeakString("WTF HASTE ERROR!!!");
}
// Get those summons in there!
if ( GetHasSpell(SPELL_ELEMENTAL_SWARM) )
{
ClearAllActions();
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
PlayVoiceChat(VOICE_CHAT_HELP);
ActionCastSpellAtObject(SPELL_ELEMENTAL_SWARM,OBJECT_SELF);
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
SetCreatureOverrideAIScriptFinished();
return;
}
if ( TalentSummonAllies() )
{
// SpeakString("Come to my side! Battle awaits!");
PlayVoiceChat(VOICE_CHAT_HELP);
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
SetCreatureOverrideAIScriptFinished();
return;
}
// Hostile targeting actions
if ( !GetIsObjectValid(oIntruder) || !GetIsReactionTypeHostile(oIntruder) )
{
oIntruder = GetNearestPerceivedEnemy();
if ( !GetIsObjectValid(oIntruder) )
return;
}
// Dispel Casters
if ( !GetLocalInt(OBJECT_SELF,"Dispel_once") &&
( GetLevelByClass(CLASS_TYPE_SORCERER, oIntruder) >= 10 ||
GetLevelByClass(CLASS_TYPE_WIZARD, oIntruder) >= 10 ||
GetLevelByClass(CLASS_TYPE_CLERIC, oIntruder) >= 10 ||
GetLevelByClass(CLASS_TYPE_SORCERER, oIntruder) >= 10 ||
GetLevelByClass(CLASS_TYPE_DRUID, oIntruder) >= 10 ) )
{
if ( GetHasSpell(SPELL_MORDENKAINENS_DISJUNCTION) ||
GetHasSpell(SPELL_GREATER_DISPELLING) ||
GetHasSpell(SPELL_DISPEL_MAGIC) ||
GetHasSpell(SPELL_GREATER_SPELL_BREACH) ||
GetHasSpell(SPELL_LESSER_SPELL_BREACH) )
{
SetLocalInt(OBJECT_SELF,"Dispel_once",1);
// SpeakString("I will dispel you!!");
if ( GetHasSpell(SPELL_GREATER_SPELL_BREACH) )
{
ClearActions(1001);
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
ActionCastSpellAtObject(SPELL_GREATER_SPELL_BREACH,oIntruder);
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
SetCreatureOverrideAIScriptFinished();
return;
}
if ( GetHasSpell(SPELL_LESSER_SPELL_BREACH) )
{
ClearActions(1001);
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
ActionCastSpellAtObject(SPELL_LESSER_SPELL_BREACH,oIntruder);
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
SetCreatureOverrideAIScriptFinished();
return;
}
if ( GetHasSpell(SPELL_MORDENKAINENS_DISJUNCTION) )
{
ClearActions(1001);
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
ActionCastSpellAtObject(SPELL_MORDENKAINENS_DISJUNCTION,oIntruder);
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
SetCreatureOverrideAIScriptFinished();
return;
}
if ( GetHasSpell(SPELL_GREATER_DISPELLING) )
{
ClearActions(1001);
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
ActionCastSpellAtObject(SPELL_GREATER_DISPELLING,oIntruder);
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
SetCreatureOverrideAIScriptFinished();
return;
}
if ( GetHasSpell(SPELL_DISPEL_MAGIC) )
{
ClearActions(1001);
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
ActionCastSpellAtObject(SPELL_DISPEL_MAGIC,oIntruder);
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
SetCreatureOverrideAIScriptFinished();
return;
}
SpeakString("WTF! Dispel Error!");
}
}
// Melee up sometimes!
if ( d10() == 10 )
{
switch ( d4() )
{
case 1:
PlayVoiceChat(VOICE_CHAT_BATTLECRY1);
break;
case 2:
PlayVoiceChat(VOICE_CHAT_ATTACK);
break;
case 3:
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
break;
case 4:
PlayVoiceChat(VOICE_CHAT_BATTLECRY3);
break;
}
SetLocalInt(OBJECT_SELF,"physical",1);
DelayCommand(24.0,SetLocalInt(OBJECT_SELF,"physical",0));
ClearAllActions();
DoPhysical(oIntruder);
return;
}
}

Binary file not shown.

View File

@ -0,0 +1,70 @@
// Choke Attack - Item Unique OnHit Script
//
//#include "nw_i0_spells"
//#include "x2_inc_spellhook"
//#include "x2_inc_switches"
const int CREATURE_SIZE_GARGANTUAN = 22;
const int CREATURE_SIZE_COLOSSAL = 23;
void main()
{
object oPC = OBJECT_SELF;
object oItem = GetSpellCastItem();
object oTarget = GetSpellTargetObject();
int nCreSTR = GetAbilityModifier(ABILITY_STRENGTH, oPC);
effect eGrabDmg = EffectDamage(d8(2)+nCreSTR, DAMAGE_TYPE_BLUDGEONING);
effect eChoke = EffectSilence();
int nSTR_Target;
int nSTR_Creature;
// Huge & larger creatures cannot be constricted.
if (GetCreatureSize(oTarget) == CREATURE_SIZE_HUGE ||
GetCreatureSize(oTarget) == CREATURE_SIZE_GARGANTUAN ||
GetCreatureSize(oTarget) == CREATURE_SIZE_COLOSSAL)
{
return;
}
// Perform a melee touch attack. Return if it missed.
if (!TouchAttackMelee(oTarget))
{
return;
}
// Deal 2d8+STR Bonus bludgeoning damage & choke the victim.
ApplyEffectToObject(DURATION_TYPE_INSTANT, eGrabDmg, oTarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eChoke, oTarget, 9.0f);
// Perform an opposed Strength check. If the target wins this check, it won't
// get entangled. To avoid ties, we do the rolling in a loop that breaks once
// the two results are NOT identical.
do
{
nSTR_Target = GetAbilityScore(oTarget, ABILITY_STRENGTH) + d20();
nSTR_Creature = GetAbilityScore(oPC, ABILITY_STRENGTH) + d20();
}
while (nSTR_Target == nSTR_Creature);
// If the target wins, send a short message to it and return.
if (nSTR_Target > nSTR_Creature)
{
FloatingTextStringOnCreature("You escape the choke attack.", oTarget);
return;
}
// Check for immunity vs entangle. If the target is immune, tell him that the
// Shambling Mound TRIED to entangle him. Otherwise tell him that he GOT
// entangled.
if (GetIsImmune(oTarget, IMMUNITY_TYPE_ENTANGLE, oPC))
{
FloatingTextStringOnCreature("The creature tries to choke you!", oTarget);
}
else
{
FloatingTextStringOnCreature("The creature is choking you!", oTarget);
}
// Apply the Entangle effect no matter whether the target is immune or not. If
// it is, it will have already received an according message that the Shambling
// Mounds entangle attempt failed. Otherwise it simply gets entangled as
// intended.
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectEntangle(), oTarget, 9.0f);
}

Binary file not shown.

Binary file not shown.

BIN
nwnds_module/air_cleric.ncs Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
// Use x2_it_example as a base for building more complicated items, that is items
// that will fire a script on more than one event
#include "x2_inc_switches"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
object oPC;
object oItem;
// * This code runs when the item is equipped
// * Note that this event fires PCs only
if (nEvent ==X2_ITEM_EVENT_EQUIP)
{
oPC = GetPCItemLastEquippedBy();
oItem = GetPCItemLastEquipped();
// If the don't have air domain, unequip the item
if(!GetHasFeat(FEAT_AIR_DOMAIN_POWER, oPC))
{
AssignCommand(oPC, ClearAllActions(TRUE));
AssignCommand(oPC, ActionUnequipItem(oItem));
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,8 @@
void main()
{
//Set and apply AOE object
effect eAOE = EffectAreaOfEffect(AOE_MOB_UNEARTHLY,"airlessaura1","airlessaura2","airlessaura3");
eAOE = SupernaturalEffect(eAOE);
eAOE = ExtraordinaryEffect(eAOE);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, OBJECT_SELF, HoursToSeconds(100));
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
#include "NW_I0_SPELLS"
#include "inc_suffocate"
void main()
{
//Declare major variables
object oCaster = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
if(GetIsEnemy(oTarget, oCaster))
{
Suffocate(oTarget);
}
}

Binary file not shown.

View File

@ -0,0 +1,18 @@
#include "NW_I0_SPELLS"
#include "inc_suffocate"
void main()
{
//Declare major variables
object oCaster = GetAreaOfEffectCreator();
object oTarget = GetFirstInPersistentObject();
while(GetIsObjectValid(oTarget))
{
if(GetIsEnemy(oTarget, oCaster))
{
Suffocate(oTarget);
}
oTarget = GetNextInPersistentObject();
}
}

Binary file not shown.

View File

@ -0,0 +1,12 @@
//#include "NW_I0_SPELLS"
//#include "x2_inc_spellhook"
#include "inc_suffocate"
void main()
{
//Declare major variables
//Get the object that is exiting the AOE
object oTarget = GetExitingObject();
GiveBreath(oTarget);
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,64 @@
object oAlc = OBJECT_SELF;
string sTag1,sTag2,sTag3,sTag4,sType,sTag = "";
string sReg1,sReg2,sReg3,sReg4 = "";
object oPC = GetNearestCreature (CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
object oItem;
string sItem = "";
int nStack = 1;
void main()
{
// Set up first reagent
sTag = GetTag(GetInventoryDisturbItem());
if (sTag == "kartangegg") {
SetLocalString(oAlc, "Reg1", "i");
//FloatingTextStringOnCreature("Debug "+ sTag,oPC,FALSE);
DestroyObject(GetInventoryDisturbItem());
}
if (sTag == "drakeblood") {
SetLocalString(oAlc, "Reg1", "df");
//FloatingTextStringOnCreature("Debug "+ sTag,oPC,FALSE);
DestroyObject(GetInventoryDisturbItem());
}
if (sTag == "Brimstone" || sTag == "IceNine" || sTag == "AcidCrystal" || sTag == "ChargedCrystal") {
if (sTag == "Brimstone")
sType = "f";
if (sTag == "IceNine")
sType = "i";
if (sTag == "AcidCrystal")
sType = "a";
if (sTag == "ChargedCrystal")
sType = "c";
SetLocalString(oAlc, "Reg3", sType);
//FloatingTextStringOnCreature("Debug "+ sTag+" "+sType,oPC,FALSE);
DestroyObject(GetInventoryDisturbItem());
}
sTag = GetStringLowerCase(sTag); // temp while we fix tags
if (GetSubString(sTag,0,5) == "steel") {
SetLocalString(oAlc, "Reg2", GetSubString(sTag,5,20));
DestroyObject(GetInventoryDisturbItem());
//FloatingTextStringOnCreature("Debug "+sTag+" "+GetSubString(sTag,5,20),oPC,FALSE);
}
if ((GetLocalString(oAlc, "Reg1") != "") && (GetLocalString(oAlc, "Reg2") != "") && (GetLocalString(oAlc, "Reg3") != "")){
sItem = GetLocalString(oAlc, "Reg1")+GetLocalString(oAlc, "Reg3")+ GetLocalString(oAlc, "Reg2");
DeleteLocalString(oAlc, "Reg1");
DeleteLocalString(oAlc, "Reg2");
DeleteLocalString(oAlc, "Reg3");
}
if (sItem != "") {
//sItem = "Nothing was created with that formula";
//FloatingTextStringOnCreature("You made "+ sItem,oPC,FALSE);
CreateItemOnObject(sItem, oAlc, nStack);
}
}

Binary file not shown.

BIN
nwnds_module/algoidhide.uti Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More