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:
Jaysyn904
2024-03-11 23:44:08 -04:00
parent c4b5794c59
commit 7b9e44ebbb
11454 changed files with 10436475 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
void main()
{
object oPC=GetLastUsedBy();
if((GetLocalInt(oPC, "ah_GotBlood") == 1))
{
DeleteLocalInt(oPC,"ah_GotBlood");
ActionSpeakString("Ah.. my awakening.. the blood of the innocent brings new life.. ");
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_IMP_RAISE_DEAD),OBJECT_SELF));
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_SCREEN_SHAKE),OBJECT_SELF));
object oBodak=CreateObject(OBJECT_TYPE_CREATURE,"ah_evil_bodak",GetLocation(OBJECT_SELF));
ActionDoCommand(DestroyObject(OBJECT_SELF));
}
else
{
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_BREACH),OBJECT_SELF));
}
}

View File

@@ -0,0 +1,30 @@
//::///////////////////////////////////////////////
//:: NW_O2_ONOFF.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Turns the placeable object's animation on/off
*/
//:://////////////////////////////////////////////
//:: Created By: Brent
//:: Created On: January 2002
//:://////////////////////////////////////////////
void main()
{
if (GetLocalInt(OBJECT_SELF,"NW_L_AMION") == 1)
{
PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
DelayCommand(0.4,SetPlaceableIllumination(OBJECT_SELF, TRUE));
SetLocalInt(OBJECT_SELF,"NW_L_AMION",0);
DelayCommand(0.5,RecomputeStaticLighting(GetArea(OBJECT_SELF)));
}
else
{
PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
DelayCommand(0.4,SetPlaceableIllumination(OBJECT_SELF, FALSE));
SetLocalInt(OBJECT_SELF,"NW_L_AMION",1);
DelayCommand(0.9,RecomputeStaticLighting(GetArea(OBJECT_SELF)));
}
}

View File

@@ -0,0 +1,9 @@
void main()
{
if (!GetIsObjectValid(GetSittingCreature(OBJECT_SELF)))
{
object oLap=GetNearestObjectByTag("ah_sitlap",OBJECT_SELF);
SetLocalInt(oLap,"inuse",0);
DestroyObject(OBJECT_SELF,0.0);
}
}

15
_module/nss/ah_climb1.nss Normal file
View File

@@ -0,0 +1,15 @@
void main()
{
object oidUser;
object oidDest;
object oAssociate;
oidUser = GetPCSpeaker();
oidDest = GetObjectByTag("ah_climb1_wp");
FloatingTextStringOnCreature("Climbing..",oidUser);
SendMessageToPC(oidUser, "You manage to climb back up the chain..");
AssignCommand(oidUser, ActionJumpToObject(oidDest,FALSE));
}

39
_module/nss/ah_climb2.nss Normal file
View File

@@ -0,0 +1,39 @@
void main()
{
object oidUser;
object oidDest;
// object oidDestFailed;
//int nIdx;
object oAssociate;
//object oRender=GetObjectByTag("jw_hulk");
oidUser = GetPCSpeaker();
oidDest = GetObjectByTag("ah_climb2_wp");
// oidDestFailed = GetObjectByTag("ah_climb3fail_wp");
// for (nIdx=1;nIdx<=5;nIdx++)
/* {
oAssociate=GetAssociate(nIdx,oidUser);
if (GetIsObjectValid(oAssociate))
{
AssignCommand(oAssociate, JumpToObject(oidDest,FALSE));
}
} */
// if (ReflexSave(oidUser,16,SAVING_THROW_ALL)==0)
// {
// SendMessageToPC(oidUser, "You missed the ledge and fall into the darkness..");
// FloatingTextStringOnCreature("Missed the ledge..",oidUser);
// AssignCommand(oidUser, JumpToObject(oidDestFailed,FALSE));
// AssignCommand(oidUser,PlaySound("as_na_splash1"));
//ApplyEffectToObject(EffectKnockdown,oidUser,130.0);
//ApplyEffectToObject(DURATION_TYPE_INSTANT,
//EffectVisualEffect(VFX_IMP_POISON_S), oidUser);
// }
// else
// {
FloatingTextStringOnCreature("Climbing..",oidUser);
SendMessageToPC(oidUser, "You manage to climb back up the chain..");
AssignCommand(oidUser, ActionJumpToObject(oidDest,FALSE));
}

39
_module/nss/ah_climb3.nss Normal file
View File

@@ -0,0 +1,39 @@
void main()
{
object oidUser;
object oidDest;
// object oidDestFailed;
//int nIdx;
object oAssociate;
//object oRender=GetObjectByTag("jw_hulk");
oidUser = GetPCSpeaker();
oidDest = GetObjectByTag("ah_climb3_wp");
// oidDestFailed = GetObjectByTag("ah_climb3fail_wp");
// for (nIdx=1;nIdx<=5;nIdx++)
/* {
oAssociate=GetAssociate(nIdx,oidUser);
if (GetIsObjectValid(oAssociate))
{
AssignCommand(oAssociate, JumpToObject(oidDest,FALSE));
}
} */
// if (ReflexSave(oidUser,16,SAVING_THROW_ALL)==0)
// {
// SendMessageToPC(oidUser, "You missed the ledge and fall into the darkness..");
// FloatingTextStringOnCreature("Missed the ledge..",oidUser);
// AssignCommand(oidUser, JumpToObject(oidDestFailed,FALSE));
// AssignCommand(oidUser,PlaySound("as_na_splash1"));
//ApplyEffectToObject(EffectKnockdown,oidUser,130.0);
//ApplyEffectToObject(DURATION_TYPE_INSTANT,
//EffectVisualEffect(VFX_IMP_POISON_S), oidUser);
// }
// else
// {
FloatingTextStringOnCreature("Climbing..",oidUser);
SendMessageToPC(oidUser, "You manage to climb back up the chain..");
AssignCommand(oidUser, ActionJumpToObject(oidDest,FALSE));
}

View File

@@ -0,0 +1,45 @@
#include "ah_penta_inc"
void main()
{
object oPC=GetLastUsedBy();
// Inspect local variables
if((GetLocalInt(oPC, "ah_GotBlood") == 1))
{
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_COM_BLOOD_REG_RED),OBJECT_SELF));
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_COM_BLOOD_LRG_RED),OBJECT_SELF));
}
else
{
int nCurrentHour = (GetCalendarYear()-1)*12*28*24 +
(GetCalendarMonth()-1)*28*24 +
(GetCalendarDay()-1)*24 +
GetTimeHour();
int nLastSpawnHour = GetLocalInt(OBJECT_SELF,"LAST_SPAWN_HOUR");
int nSpawnDelay = 1;
if (nCurrentHour > (nLastSpawnHour + nSpawnDelay))
{
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",0);
}
//return if time has not passed yet
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
{
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_COM_BLOOD_REG_RED),OBJECT_SELF));
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_COM_BLOOD_LRG_RED),OBJECT_SELF));
return;
}
location loc = GetLocation(OBJECT_SELF);
pentagram(loc);
ActionSpeakString("The time of her coming is nigh; the blood of the innocent spilled, drunk. She will rise once more and such terror will be unleashed in her wake..");
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_COM_BLOOD_REG_RED),OBJECT_SELF));
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_SCREEN_SHAKE),OBJECT_SELF));
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_HEAD_EVIL),OBJECT_SELF));
// Set the variable to say that the PC has blood in their hands
SetLocalInt(oPC, "ah_GotBlood", 1);
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1);
SetLocalInt(OBJECT_SELF,"LAST_SPAWN_HOUR",nCurrentHour);
}
}

View File

@@ -0,0 +1,92 @@
void main()
{
{
object oObject = GetFirstObjectInArea();
int nPCinArea=FALSE;
location lLoc;
object oItem;
// first of all, check every object in the area and see if it is a PC.
while (GetIsObjectValid(oObject))
{
if (GetIsPC(oObject))
{
nPCinArea = TRUE;
}
oObject=GetNextObjectInArea();
}
// if not, then run the next bit of the script
if (nPCinArea != TRUE)
{
// create the coffin if it's not there
if (!GetIsObjectValid(GetObjectByTag("ah_evil_coffin")))
{
lLoc=GetLocation(GetObjectByTag("ah_coffin_wp"));
CreateObject(OBJECT_TYPE_PLACEABLE,"ah_evil_coffin",lLoc);
}
oObject = GetFirstObjectInArea();
while (GetIsObjectValid(oObject) == TRUE)
{
if (GetTag(oObject) == "ah_crypt_portal")
{
SetPlotFlag(oObject,FALSE);
DestroyObject(oObject);
}
if (GetTag(oObject) == "ah_evil_bodak")
{
SetPlotFlag(oObject,FALSE);
DestroyObject(oObject);
}
if (GetResRef(oObject)=="jw_mobstransf_tr")
{
SignalEvent(oObject,EventUserDefined(50));
}
if (GetLocalInt(oObject,"jw_hidden_int")==TRUE)
{
SetPlotFlag(oObject,0);
DestroyObject(oObject);
}
if (GetTag(oObject) == "Body Bag")
{
oItem = GetFirstItemInInventory(oObject);
while (GetIsObjectValid(oItem) == TRUE)
{
DestroyObject(oItem);
oItem=GetNextItemInInventory(oObject);
}
SetPlotFlag(oObject,FALSE);
DestroyObject(oObject);
}
oObject=GetNextObjectInArea();
}
}
}
}

View File

@@ -0,0 +1,73 @@
/////////////////////////:/:///////////////////////////////////////////////////////////////////////////////////////
//:: Default:On Death
//:: NW_C2_DEFAULT7
//:: Copyright (c) 2001 Bioware Corp.
//::///////////////////////////////////////////////
/*
Shouts to allies that they have been killed
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//:://///////////////////////////////////////////////
#include "NW_I0_GENERIC"
#include "jw_exp_giver"
#include "jw_custom_spells"
void main()
{
//Declare major variables
object oCaster = OBJECT_SELF;
int nMetaMagic = GetMetaMagicFeat();
float fDelay;
effect eExplode = EffectVisualEffect(VFX_FNF_WAIL_O_BANSHEES);
// effect eVis = EffectVisualEffect(VFX_FNF_WAIL_O_BANSHEES);
// effect eDam;
//Get the spell target location as opposed to the spell target.
location lTarget = GetLocation(OBJECT_SELF);
//Limit Caster level for the purposes of damage
//Apply the fireball explosion at the location captured above.
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
//Declare the spell shape, size and the location. Capture the first target object in the shape.
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR);
//Cycle through the targets within the spell shape until an invalid object is captured.
AssignCommand(oCaster,forcewave());
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
if(nClass > 0 && (nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL))
{
object oKiller = GetLastKiller();
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
}
SpeakString("NW_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
//Shout Attack my target, only works with the On Spawn In setup
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
}
location lPortal = GetLocation(GetWaypointByTag("ah_crypt_exit"));
// CreateObject(OBJECT_TYPE_PLACEABLE, "ah_crypt_portal", lPortal, TRUE);
int nRandom=Random(7)+1;
if (nRandom>5)
{
nRandom=6;
}
string sObject="ah_banering"+IntToString(nRandom);
if (sObject=="ah_banering3")
{
sObject="ah_banering9";
}
CreateItemOnObject(sObject,OBJECT_SELF,1);
givexp(OBJECT_SELF,GetLastKiller());
}

View File

@@ -0,0 +1,6 @@
void main()
{
object oPC = GetLastUsedBy();
location lDestination = GetLocation(GetWaypointByTag("ah_finishedcrypt"));
AssignCommand(oPC, ActionJumpToLocation(lDestination));
}

View File

@@ -0,0 +1,8 @@
void main()
{
object oObject=GetEnteringObject();
AssignCommand(oObject,ClearAllActions());
AssignCommand(oObject,PlayVoiceChat(VOICE_CHAT_HELP));
AssignCommand(oObject,ActionJumpToObject(GetWaypointByTag("ah_pit_wp_one")));
}

View File

@@ -0,0 +1,8 @@
void main()
{
object oObject=GetEnteringObject();
AssignCommand(oObject,ClearAllActions());
AssignCommand(oObject,PlayVoiceChat(VOICE_CHAT_PAIN2));
AssignCommand(oObject,ActionJumpToObject(GetWaypointByTag("ah_pit_wp_two")));
}

View File

@@ -0,0 +1,120 @@
//::///////////////////////////////////////////////
//:: Secret Door invis object
//:: V 1.2
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
This Invisable object will do a check and see
if any pc comes within a radius of this object.
If the PC has the search skill or is a elf then
a search check will be made.
The radius is determined by the reflex saving
throw of the invisible object
The DC of the search stored by the willpower
saving throw.
*/
//:://////////////////////////////////////////////
//:: Created By: Robert Babiak
//:: Created On: June 25, 2002
//:://////////////////////////////////////////////
void main()
{
// get the radius and DC of the secret door.
float fSearchDist = IntToFloat( GetReflexSavingThrow ( OBJECT_SELF ) );
int nDiffaculty = GetWillSavingThrow ( OBJECT_SELF );
// what is the tag of this object used in setting the destination
string sTag = GetTag(OBJECT_SELF);
// has it been found?
int nDone = GetLocalInt(OBJECT_SELF,"D_"+sTag);
int nReset = GetLocalInt(OBJECT_SELF,"Reset");
// ok reset the door is destroyed, and the done and reset flas are made 0 again
if (nReset == 1)
{
nDone = 0;
nReset = 0;
SetLocalInt(OBJECT_SELF,"D_"+sTag,nDone);
SetLocalInt(OBJECT_SELF,"Reset",nReset);
object oidDoor= GetLocalObject(OBJECT_SELF,"Door");
if (oidDoor != OBJECT_INVALID)
{
// SetPlotFlag(oidDoor,0);
// DestroyObject(oidDoor);
}
}
//DEBUG
// if (nDone==1)
// {
// SpeakString("I am done");
// }
//
int nBestSkill = -50;
object oidBestSearcher = OBJECT_INVALID;
int nCount = 1;
// Find the best searcher within the search radius.
object oidNearestCreature = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
while ( ( nDone == 0 ) &&
( oidNearestCreature != OBJECT_INVALID )
)
{
// what is the distance of the PC to the door location
float fDist = GetDistanceBetween(OBJECT_SELF,oidNearestCreature);
if ( fDist > fSearchDist )
{
nDone = 1;
}
if ( fDist <= fSearchDist )
{
int nSkill = GetSkillRank(SKILL_SEARCH,oidNearestCreature);
if (nSkill > nBestSkill)
{
nBestSkill = nSkill;
oidBestSearcher = oidNearestCreature;
}
}
nCount = nCount +1;
oidNearestCreature = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF ,nCount);
}
if ( ( nDone == 0 ) &&
( GetIsObjectValid( oidBestSearcher ) )
)
{
int nMod = d20();
// did we find it.
if ((nBestSkill +nMod > nDiffaculty))
{
location locLoc = GetLocation (OBJECT_SELF);
object oidDoor;
// yes we found it, now create a trap door for us to use. it.
oidDoor = CreateObject(OBJECT_TYPE_ITEM,"ah_crypt_book",locLoc,TRUE);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_CHARM),GetLocation(oidDoor));
FloatingTextStringOnCreature("You spot an old journal lying in the dust..",oidBestSearcher);
//SetLocalString( oidDoor, "Destination" , "DST_"+sTag );
// make this door as found.
SetLocalInt(OBJECT_SELF,"D_"+sTag,1);
//SetPlotFlag(oidDoor,1);
SetLocalObject(OBJECT_SELF,"Door",oidDoor);
} // if skill search found
} // if Object is valid
}

View File

@@ -0,0 +1,121 @@
//::///////////////////////////////////////////////
//:: Secret Door invis object
//:: V 1.2
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
This Invisable object will do a check and see
if any pc comes within a radius of this object.
If the PC has the search skill or is a elf then
a search check will be made.
It will create a trap door that will have its
Destination set to a waypoint that has
a tag of DST_<tag of this object>
The radius is determined by the reflex saving
throw of the invisible object
The DC of the search stored by the willpower
saving throw.
*/
//:://////////////////////////////////////////////
//:: Created By: Robert Babiak
//:: Created On: June 25, 2002
//:://////////////////////////////////////////////
void main()
{
int nSkill;
// get the radius and DC of the secret door.
float fSearchDist = IntToFloat( GetReflexSavingThrow ( OBJECT_SELF ) );
int nDiffaculty = GetWillSavingThrow ( OBJECT_SELF );
// what is the tag of this object used in setting the destination
string sTag = GetTag(OBJECT_SELF);
// has it been found?
int nDone = GetLocalInt(OBJECT_SELF,"D_"+sTag);
int nReset = GetLocalInt(OBJECT_SELF,"Reset");
// ok reset the door is destroyed, and the done and reset flas are made 0 again
if (nReset == 1)
{
nDone = 0;
nReset = 0;
SetLocalInt(OBJECT_SELF,"D_"+sTag,nDone);
SetLocalInt(OBJECT_SELF,"Reset",nReset);
object oidDoor= GetLocalObject(OBJECT_SELF,"Door");
if (oidDoor != OBJECT_INVALID)
{
SetPlotFlag(oidDoor,0);
DestroyObject(oidDoor);
}
}
//
int nBestSkill = -50;
object oidBestSearcher = OBJECT_INVALID;
int nCount = 1;
// Find the best searcher within the search radius.
object oidNearestCreature = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE);
while ( ( nDone == 0 ) &&
( oidNearestCreature != OBJECT_INVALID )
)
{
// what is the distance of the PC to the door location
float fDist = GetDistanceBetween(OBJECT_SELF,oidNearestCreature);
if ( fDist > fSearchDist )
{
nDone = 1;
}
if ( fDist <= fSearchDist )
{
nSkill = GetSkillRank(SKILL_SEARCH,oidNearestCreature);
}
if ( ( nDone == 0 ) &&
( GetIsObjectValid( oidNearestCreature ) && (GetIsPC(oidNearestCreature)) )
)
{
int nMod = d20();
// did we find it.
if ((nSkill +nMod > nDiffaculty)&&(GetLevelByClass(CLASS_TYPE_ROGUE,oidNearestCreature)>=1))
{
location locLoc = GetLocation (OBJECT_SELF);
object oidDoor;
// yes we found it, now create a trap door for us to use. it.
oidDoor = CreateObject(OBJECT_TYPE_PLACEABLE,"jw_secretdoor",locLoc,TRUE);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_KNOCK),GetLocation(oidDoor));
FloatingTextStringOnCreature("Discovered a hidden door",oidNearestCreature);
SetLocalString( oidDoor, "Destination" , "DST_"+sTag );
// make this door as found.
SetLocalInt(OBJECT_SELF,"D_"+sTag,1);
SetPlotFlag(oidDoor,1);
SetLocalObject(OBJECT_SELF,"Door",oidDoor);
} // if success on check
} // if check takes place
nCount = nCount +1;
oidNearestCreature = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, OBJECT_SELF ,nCount);
} // if Object is valid
}

View File

@@ -0,0 +1,8 @@
// Simple script for a door to destroy itself on spawn. Seen as this goes
// on the doors heartbeat event, it will fire, then as the door has been destroyed
// will no longer continue to fire OnHeartbeat after that.
void main()
{
DestroyObject(OBJECT_SELF);
}

View File

@@ -0,0 +1,15 @@
void main()
{
object oPC = GetLastSpeaker();
int nRoll=d20();
int nRank=GetSkillRank (SKILL_ANIMAL_EMPATHY, oPC);
int nResult=nRoll+nRank;
string sRoll=IntToString(nRoll);
string sRank=IntToString(nRank);
string sResult=IntToString(nResult);
string sAbility="Animal Empathy";
AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
AssignCommand( oPC, SpeakString(sAbility+" Check, Roll: "+sRoll+" Modifier: "+sRank+" = "+sResult));
}

View File

@@ -0,0 +1,15 @@
void main()
{
object oPC = GetLastSpeaker();
int nRoll=d20();
int nRank=GetSkillRank (SKILL_HEAL, oPC);
int nResult=nRoll+nRank;
string sRoll=IntToString(nRoll);
string sRank=IntToString(nRank);
string sResult=IntToString(nResult);
string sAbility="Heal";
AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
AssignCommand( oPC, SpeakString(sAbility+" Check, Roll: "+sRoll+" Modifier: "+sRank+" = "+sResult));
}

View File

@@ -0,0 +1,58 @@
void main()
{
{
object oObject = GetFirstObjectInArea();
int nPCinArea=FALSE;
location lLoc;
object oItem;
// first of all, check every object in the area and see if it is a PC.
while (GetIsObjectValid(oObject))
{
if (GetIsPC(oObject))
{
nPCinArea = TRUE;
}
oObject=GetNextObjectInArea();
}
// if not, then run the next bit of the script
if (nPCinArea != TRUE)
{
oObject = GetFirstObjectInArea();
while (GetIsObjectValid(oObject) == TRUE)
{
if (GetTag(oObject) == "Body Bag")
{
oItem = GetFirstItemInInventory(oObject);
while (GetIsObjectValid(oItem) == TRUE)
{
DestroyObject(oItem);
oItem=GetNextItemInInventory(oObject);
}
SetPlotFlag(oObject,FALSE);
DestroyObject(oObject);
}
oObject=GetNextObjectInArea();
}
}
}
}

View File

@@ -0,0 +1,28 @@
/////// Modified script for use with ah_littlegirl and the girl when she is named
// causes the Ghostly Visage Visual Effect to appear on her the moment she spawns, rather than having to cast it
// or having it run out midway through speaking
//
#include "NW_O2_CONINCLUDE"
#include "NW_I0_GENERIC"
void main()
{
// Start The relevant stuff
effect vfx = EffectVisualEffect(VFX_DUR_GHOSTLY_PULSE);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);
//after applying the effect, cast spell at self to ensure effect
// ActionCastSpellAtObject(SPELL_GHOSTLY_VISAGE, OBJECT_SELF, METAMAGIC_EXTEND, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
// End The relevant stuff
SetListeningPatterns();
WalkWayPoints();
GenerateNPCTreasure();
}

View File

@@ -0,0 +1,28 @@
// Modified script for use with ah_littlegirl and the girl when she is named
// causes the Ghostly Visage Visual Effect to appear on her the moment she spawns, rather than having to cast it
// or having it run out midway through speaking
//
#include "NW_O2_CONINCLUDE"
#include "NW_I0_GENERIC"
void main()
{
// Start The relevant stuff
effect vfx = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);
//after applying the effect, cast spell at self to ensure effect
ActionCastSpellAtObject(SPELL_GHOSTLY_VISAGE, OBJECT_SELF, METAMAGIC_EXTEND, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
// End The relevant stuff
SetListeningPatterns();
WalkWayPoints();
//GenerateNPCTreasure();
}

View File

@@ -0,0 +1,9 @@
void main()
{
object oPC=GetEnteringObject();
AssignCommand(oPC,ClearAllActions());
ActionStartConversation(oPC,"ah_cryptjump1");
}

View File

@@ -0,0 +1,9 @@
void main()
{
object oPC=GetEnteringObject();
AssignCommand(oPC,ClearAllActions());
ActionStartConversation(oPC,"ah_cryptjump2");
}

View File

@@ -0,0 +1,38 @@
void main()
{
object oidUser;
object oidDest;
object oidDestFailed;
//int nIdx;
object oAssociate;
//object oRender=GetObjectByTag("jw_hulk");
oidUser = GetPCSpeaker();
oidDest = GetObjectByTag("ah_jump_wp");
oidDestFailed = GetObjectByTag("ah_jumpfailed_wp");
// for (nIdx=1;nIdx<=5;nIdx++)
/* {
oAssociate=GetAssociate(nIdx,oidUser);
if (GetIsObjectValid(oAssociate))
{
AssignCommand(oAssociate, JumpToObject(oidDest,FALSE));
}
} */
if (ReflexSave(oidUser,16,SAVING_THROW_ALL)==0)
{
SendMessageToPC(oidUser, "You missed the ledge and fall into the darkness..");
FloatingTextStringOnCreature("Missed the ledge..",oidUser);
AssignCommand(oidUser, JumpToObject(oidDestFailed,FALSE));
// AssignCommand(oidUser,PlaySound("as_na_splash1"));
//ApplyEffectToObject(EffectKnockdown,oidUser,130.0);
//ApplyEffectToObject(DURATION_TYPE_INSTANT,
//EffectVisualEffect(VFX_IMP_POISON_S), oidUser);
}
else
{
FloatingTextStringOnCreature("Made it",oidUser);
AssignCommand(oidUser, ActionJumpToObject(oidDest,FALSE));
}
}

View File

@@ -0,0 +1,27 @@
void main()
{
object oidUser;
object oidDest;
object oidDestFailed;
//int nIdx;
object oAssociate;
//object oRender=GetObjectByTag("jw_hulk");
oidUser = GetPCSpeaker();
oidDest = GetObjectByTag("jw_climb4_wp");
oidDestFailed = GetObjectByTag("ah_jumpfailed_wp");
// for (nIdx=1;nIdx<=5;nIdx++)
/* {
oAssociate=GetAssociate(nIdx,oidUser);
if (GetIsObjectValid(oAssociate))
{
AssignCommand(oAssociate, JumpToObject(oidDest,FALSE));
}
} */
FloatingTextStringOnCreature("Made it",oidUser);
AssignCommand(oidUser, ActionJumpToObject(oidDest,FALSE));
}

View File

@@ -0,0 +1,6 @@
void main()
{
object oPC=GetPCSpeaker();
object oWP = GetObjectByTag("ah_jumpfailed_wp");
AssignCommand(oPC, JumpToObject(oWP,FALSE));
}

View File

@@ -0,0 +1,33 @@
void main()
{
object oObject=GetInventoryDisturbItem();
object oPC=GetLastDisturbed();
object oInv;
object oGoal=GetNearestObjectByTag("ah_library_uc_gs", OBJECT_SELF, 1);
int nWeight=GetWeight(oObject);
int nTotal=GetWeight(OBJECT_SELF);
int nGoal=GetLocalInt(oGoal,"ah_target_weight");
object oDoor=GetNearestObjectByTag("ah_weight_door", OBJECT_SELF, 1);
//string sTotal=IntToString(nTotal);
//location lLoc=GetLocation(GetWaypointByTag("trito_creaturespawn_wp"));
//object oObject2=GetFirstItemInInventory(oPedestal);
// If the using creature hasnt got enough intelligence, dont let them use the scales
if ((GetAbilityScore(oPC, ABILITY_INTELLIGENCE) <= 9))
{
AssignCommand(oPC, ActionSpeakString("*Scratches head and looks confused at the scales*", TALKVOLUME_TALK));
}
if ((GetInventoryDisturbType() == INVENTORY_DISTURB_TYPE_ADDED))
{
ActionSpeakString("The scale shows a weight of" + IntToString(nTotal) + "lbs", TALKVOLUME_TALK);
}
if ((nTotal) == (nGoal))
{
SetLocked(oDoor, FALSE);
ActionOpenDoor(oDoor);
}
}

View File

@@ -0,0 +1,32 @@
//::///////////////////////////////////////////////
//:: NW_O2_SKELETON.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Turns the placeable into a skeleton
if a player comes near enough.
*/
//:://////////////////////////////////////////////
//:: Created By: Brent
//:: Created On: January 17, 2002
//:://////////////////////////////////////////////
void ActionCreate(string sCreature, location lLoc)
{
CreateObject(OBJECT_TYPE_CREATURE, sCreature, lLoc);
}
void main()
{
object oCreature = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
if (GetIsObjectValid(oCreature) == TRUE && GetDistanceToObject(oCreature) < 10.0)
{
effect eMind = EffectVisualEffect(VFX_IMP_RAISE_DEAD);
string sCreature = "ah_mohrg";
// * 10% chance of a skeleton chief instead
location lLoc = GetLocation(OBJECT_SELF);
DelayCommand(0.3, ActionCreate(sCreature, lLoc));
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, GetLocation(OBJECT_SELF));
SetPlotFlag(OBJECT_SELF, FALSE);
DestroyObject(OBJECT_SELF, 0.5);
}
}

View File

@@ -0,0 +1,44 @@
/////////////////////////////:/:///////////////////////////////////////////////////////////////////////////////////////
//:: Default:On Death
//:: NW_C2_DEFAULT7
//:: Copyright (c) 2001 Bioware Corp.
//::///////////////////////////////////////////////
/*
Shouts to allies that they have been killed
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//:://///////////////////////////////////////////////
#include "NW_I0_GENERIC"
#include "jw_exp_giver"
void main()
{
effect eExplode = EffectVisualEffect(VFX_COM_CHUNK_BONE_MEDIUM);
location lTarget = GetLocation(OBJECT_SELF);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
if(nClass > 0 && (nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL))
{
object oKiller = GetLastKiller();
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
}
SpeakString("NW_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
//Shout Attack my target, only works with the On Spawn In setup
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
}
givexp(OBJECT_SELF,GetLastKiller());
}

View File

@@ -0,0 +1,99 @@
//::///////////////////////////////////////////////////
//:: Default: On Spawn In
//:: NW_C2_DEFAULT9
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Determines the course of action to be taken
after having just been spawned in
*/
//::////////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//:://////////////////////////////////////////////
#include "jw_treasure_gene"
#include "NW_I0_GENERIC"
#include "jw_privates_inc"
void main()
{
SetStartLocation();
// Start The Visual Effects
effect vfx = EffectVisualEffect(VFX_DUR_DARKNESS);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);
effect vfx2 = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx2, OBJECT_SELF);
effect vfx3 = EffectVisualEffect(VFX_FNF_SCREEN_SHAKE);
ApplyEffectToObject(DURATION_TYPE_INSTANT, vfx3, OBJECT_SELF);
/// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
if (GetHitDice(OBJECT_SELF)>4)
{
SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
SetListenPattern(OBJECT_SELF, "I_AM_HEALING", 123); //listen out for this phrase
SetListening(OBJECT_SELF,TRUE);
}
// This will set the listening pattern on the NPC to attack when allies call
if ((GetChallengeRating(OBJECT_SELF)>3.0)&&(GetLevelByClass(CLASS_TYPE_ROGUE,OBJECT_SELF)>=1)&&(GetStandardFactionReputation(STANDARD_FACTION_DEFENDER,OBJECT_SELF)<40))
{
SetSpawnInCondition(NW_FLAG_STEALTH);
}
// If the NPC has stealth and they are a rogue go into stealth mode
//SetSpawnInCondition(NW_FLAG_SEARCH);
// If the NPC has Search go into Search Mode
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_SLEEP);
//Creatures that spawn in during the night will be asleep.
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
//SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
//NOTE that these animations will play automatically for Encounter Creatures.
/// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
//SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
// combat.
MakeTreasure(); //* Use this to create a small amount of treasure on the creature
}

View File

@@ -0,0 +1,91 @@
//////////////:://///////////////////////////////////////////////////
//:: Default: On Spawn In
//:: NW_C2_DEFAULT9
//:: Copyright (c) 2001 Bioware Corp.
//::///////////////////////////////////////////////
/*
Determines the course of action to be taken
after having just been spawned in
*/
//::////////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//::///////////////////////////////////////////////
#include "jw_treasure_gene"
#include "NW_I0_GENERIC"
#include "jw_privates_inc"
void main()
{
// Start The Visual Effects
effect vfx = EffectVisualEffect(VFX_DUR_FLAG_RED);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);
//// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
SetStartLocation();
if (GetHitDice(OBJECT_SELF)>4)
{
SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
SetListenPattern(OBJECT_SELF, "I_AM_HEALING", 123); //listen out for this phrase
SetListening(OBJECT_SELF,TRUE);
}
// This will set the listening pattern on the NPC to attack when allies call
if ((GetChallengeRating(OBJECT_SELF)>3.0)&&(GetLevelByClass(CLASS_TYPE_ROGUE,OBJECT_SELF)>=1)&&(GetStandardFactionReputation(STANDARD_FACTION_DEFENDER,OBJECT_SELF)<40))
{
SetSpawnInCondition(NW_FLAG_STEALTH);
}
// If the NPC has stealth and they are a rogue go into stealth mode
//SetSpawnInCondition(NW_FLAG_SEARCH);
// If the NPC has Search go into Search Mode
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_SLEEP);
//Creatures that spawn in during the night will be asleep.
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
///SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
//NOTE that these animations will play automatically for Encounter Creatures.
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
///SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
// combat.
MakeTreasure(); //* Use this to create a small amount of treasure on the creature
///SendMessageToAllDMs("Called treasure script from spawn");
}

View File

@@ -0,0 +1,91 @@
///////////////:://///////////////////////////////////////////////////
//:: Default: On Spawn In
//:: NW_C2_DEFAULT9
//:: Copyright (c) 2001 Bioware Corp.
//::///////////////////////////////////////////////
/*
Determines the course of action to be taken
after having just been spawned in
*/
//::////////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//::///////////////////////////////////////////////
#include "jw_treasure_gene"
#include "NW_I0_GENERIC"
#include "jw_privates_inc"
void main()
{
// Start The Visual Effects
effect vfx = EffectVisualEffect(VFX_DUR_FLAG_PURPLE);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);
//// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
SetStartLocation();
if (GetHitDice(OBJECT_SELF)>4)
{
SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
SetListenPattern(OBJECT_SELF, "I_AM_HEALING", 123); //listen out for this phrase
SetListening(OBJECT_SELF,TRUE);
}
// This will set the listening pattern on the NPC to attack when allies call
if ((GetChallengeRating(OBJECT_SELF)>3.0)&&(GetLevelByClass(CLASS_TYPE_ROGUE,OBJECT_SELF)>=1)&&(GetStandardFactionReputation(STANDARD_FACTION_DEFENDER,OBJECT_SELF)<40))
{
SetSpawnInCondition(NW_FLAG_STEALTH);
}
// If the NPC has stealth and they are a rogue go into stealth mode
//SetSpawnInCondition(NW_FLAG_SEARCH);
// If the NPC has Search go into Search Mode
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_SLEEP);
//Creatures that spawn in during the night will be asleep.
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
///SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
//NOTE that these animations will play automatically for Encounter Creatures.
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
///SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
// combat.
MakeTreasure(); //* Use this to create a small amount of treasure on the creature
///SendMessageToAllDMs("Called treasure script from spawn");
}

View File

@@ -0,0 +1,91 @@
//////////////:://///////////////////////////////////////////////////
//:: Default: On Spawn In
//:: NW_C2_DEFAULT9
//:: Copyright (c) 2001 Bioware Corp.
//::///////////////////////////////////////////////
/*
Determines the course of action to be taken
after having just been spawned in
*/
//::////////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//::///////////////////////////////////////////////
#include "jw_treasure_gene"
#include "NW_I0_GENERIC"
#include "jw_privates_inc"
void main()
{
// Start The Visual Effects
effect vfx = EffectVisualEffect(VFX_DUR_PARALYZED);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);
//// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
SetStartLocation();
if (GetHitDice(OBJECT_SELF)>4)
{
SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
SetListenPattern(OBJECT_SELF, "I_AM_HEALING", 123); //listen out for this phrase
SetListening(OBJECT_SELF,TRUE);
}
// This will set the listening pattern on the NPC to attack when allies call
if ((GetChallengeRating(OBJECT_SELF)>3.0)&&(GetLevelByClass(CLASS_TYPE_ROGUE,OBJECT_SELF)>=1)&&(GetStandardFactionReputation(STANDARD_FACTION_DEFENDER,OBJECT_SELF)<40))
{
SetSpawnInCondition(NW_FLAG_STEALTH);
}
// If the NPC has stealth and they are a rogue go into stealth mode
//SetSpawnInCondition(NW_FLAG_SEARCH);
// If the NPC has Search go into Search Mode
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_SLEEP);
//Creatures that spawn in during the night will be asleep.
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
///SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
//NOTE that these animations will play automatically for Encounter Creatures.
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
///SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
// combat.
MakeTreasure(); //* Use this to create a small amount of treasure on the creature
///SendMessageToAllDMs("Called treasure script from spawn");
}

View File

@@ -0,0 +1,93 @@
//////////////:://///////////////////////////////////////////////////
//:: Default: On Spawn In
//:: NW_C2_DEFAULT9
//:: Copyright (c) 2001 Bioware Corp.
//::///////////////////////////////////////////////
/*
Determines the course of action to be taken
after having just been spawned in
*/
//::////////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//::///////////////////////////////////////////////
#include "jw_treasure_gene"
#include "NW_I0_GENERIC"
#include "jw_privates_inc"
void main()
{
// Start The Visual Effects
effect vfx = EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);
effect vfx2 = EffectVisualEffect(VFX_DUR_BLUR);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx2, OBJECT_SELF);
//// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
SetStartLocation();
if (GetHitDice(OBJECT_SELF)>4)
{
SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
SetListenPattern(OBJECT_SELF, "I_AM_HEALING", 123); //listen out for this phrase
SetListening(OBJECT_SELF,TRUE);
}
// This will set the listening pattern on the NPC to attack when allies call
if ((GetChallengeRating(OBJECT_SELF)>3.0)&&(GetLevelByClass(CLASS_TYPE_ROGUE,OBJECT_SELF)>=1)&&(GetStandardFactionReputation(STANDARD_FACTION_DEFENDER,OBJECT_SELF)<40))
{
SetSpawnInCondition(NW_FLAG_STEALTH);
}
// If the NPC has stealth and they are a rogue go into stealth mode
//SetSpawnInCondition(NW_FLAG_SEARCH);
// If the NPC has Search go into Search Mode
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_SLEEP);
//Creatures that spawn in during the night will be asleep.
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
///SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
//NOTE that these animations will play automatically for Encounter Creatures.
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
///SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
// combat.
MakeTreasure(); //* Use this to create a small amount of treasure on the creature
///SendMessageToAllDMs("Called treasure script from spawn");
}

View File

@@ -0,0 +1,91 @@
//////////////:://///////////////////////////////////////////////////
//:: Default: On Spawn In
//:: NW_C2_DEFAULT9
//:: Copyright (c) 2001 Bioware Corp.
//::///////////////////////////////////////////////
/*
Determines the course of action to be taken
after having just been spawned in
*/
//::////////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//::///////////////////////////////////////////////
#include "jw_treasure_gene"
#include "NW_I0_GENERIC"
#include "jw_privates_inc"
void main()
{
// Start The Visual Effects
effect vfx = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);
//// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
SetStartLocation();
if (GetHitDice(OBJECT_SELF)>4)
{
SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
SetListenPattern(OBJECT_SELF, "I_AM_HEALING", 123); //listen out for this phrase
SetListening(OBJECT_SELF,TRUE);
}
// This will set the listening pattern on the NPC to attack when allies call
if ((GetChallengeRating(OBJECT_SELF)>3.0)&&(GetLevelByClass(CLASS_TYPE_ROGUE,OBJECT_SELF)>=1)&&(GetStandardFactionReputation(STANDARD_FACTION_DEFENDER,OBJECT_SELF)<40))
{
SetSpawnInCondition(NW_FLAG_STEALTH);
}
// If the NPC has stealth and they are a rogue go into stealth mode
//SetSpawnInCondition(NW_FLAG_SEARCH);
// If the NPC has Search go into Search Mode
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_SLEEP);
//Creatures that spawn in during the night will be asleep.
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
///SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
//NOTE that these animations will play automatically for Encounter Creatures.
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
///SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
// combat.
MakeTreasure(); //* Use this to create a small amount of treasure on the creature
///SendMessageToAllDMs("Called treasure script from spawn");
}

View File

@@ -0,0 +1,93 @@
//////////////:://///////////////////////////////////////////////////
//:: Default: On Spawn In
//:: NW_C2_DEFAULT9
//:: Copyright (c) 2001 Bioware Corp.
//::///////////////////////////////////////////////
/*
Determines the course of action to be taken
after having just been spawned in
*/
//::////////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//::///////////////////////////////////////////////
#include "jw_treasure_gene"
#include "NW_I0_GENERIC"
#include "jw_privates_inc"
void main()
{
// Start The Visual Effects
effect vfx = EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);
effect vfx2 = EffectVisualEffect(VFX_DUR_PARALYZED);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx2, OBJECT_SELF);
//// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
SetStartLocation();
if (GetHitDice(OBJECT_SELF)>4)
{
SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
SetListenPattern(OBJECT_SELF, "I_AM_HEALING", 123); //listen out for this phrase
SetListening(OBJECT_SELF,TRUE);
}
// This will set the listening pattern on the NPC to attack when allies call
if ((GetChallengeRating(OBJECT_SELF)>3.0)&&(GetLevelByClass(CLASS_TYPE_ROGUE,OBJECT_SELF)>=1)&&(GetStandardFactionReputation(STANDARD_FACTION_DEFENDER,OBJECT_SELF)<40))
{
SetSpawnInCondition(NW_FLAG_STEALTH);
}
// If the NPC has stealth and they are a rogue go into stealth mode
//SetSpawnInCondition(NW_FLAG_SEARCH);
// If the NPC has Search go into Search Mode
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_SLEEP);
//Creatures that spawn in during the night will be asleep.
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
///SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
//NOTE that these animations will play automatically for Encounter Creatures.
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
///SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
// combat.
MakeTreasure(); //* Use this to create a small amount of treasure on the creature
///SendMessageToAllDMs("Called treasure script from spawn");
}

View File

@@ -0,0 +1,91 @@
//////////////:://///////////////////////////////////////////////////
//:: Default: On Spawn In
//:: NW_C2_DEFAULT9
//:: Copyright (c) 2001 Bioware Corp.
//::///////////////////////////////////////////////
/*
Determines the course of action to be taken
after having just been spawned in
*/
//::////////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//::///////////////////////////////////////////////
#include "jw_treasure_gene"
#include "NW_I0_GENERIC"
#include "jw_privates_inc"
void main()
{
// Start The Visual Effects
effect vfx = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);
//// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
SetStartLocation();
if (GetHitDice(OBJECT_SELF)>4)
{
SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
SetListenPattern(OBJECT_SELF, "I_AM_HEALING", 123); //listen out for this phrase
SetListening(OBJECT_SELF,TRUE);
}
// This will set the listening pattern on the NPC to attack when allies call
if ((GetChallengeRating(OBJECT_SELF)>3.0)&&(GetLevelByClass(CLASS_TYPE_ROGUE,OBJECT_SELF)>=1)&&(GetStandardFactionReputation(STANDARD_FACTION_DEFENDER,OBJECT_SELF)<40))
{
SetSpawnInCondition(NW_FLAG_STEALTH);
}
// If the NPC has stealth and they are a rogue go into stealth mode
//SetSpawnInCondition(NW_FLAG_SEARCH);
// If the NPC has Search go into Search Mode
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_SLEEP);
//Creatures that spawn in during the night will be asleep.
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
///SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
//NOTE that these animations will play automatically for Encounter Creatures.
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
///SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
// combat.
MakeTreasure(); //* Use this to create a small amount of treasure on the creature
///SendMessageToAllDMs("Called treasure script from spawn");
}

View File

@@ -0,0 +1,10 @@
void main()
{
object oPC=GetEnteringObject();
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellFailure(100), oPC);
// Creates an effect that inhibits spells
// - nPercent - percentage of failure
// - nSpellSchool - the school of spells affected.
//effect EffectSpellFailure(int nPercent=100, int nSpellSchool=SPELL_SCHOOL_GENERAL)
}

View File

@@ -0,0 +1,10 @@
void main()
{
object oPC=GetExitingObject();
RemoveEffect(oPC, EffectSpellFailure());
// Creates an effect that inhibits spells
// - nPercent - percentage of failure
// - nSpellSchool - the school of spells affected.
//effect EffectSpellFailure(int nPercent=100, int nSpellSchool=SPELL_SCHOOL_GENERAL)
}

View File

@@ -0,0 +1,55 @@
//::///////////////////////////////////////////////
//:: Pentagram star
//:: penta_inc
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Pentagram will appear over altar, requires ah_nonstaticinv object
*/
// This function will produce a pentagram at
// lTargetLoc using nBeamFX for nDuration seconds.
//
void pentagram(location lTargetLoc, int nBeamFX=VFX_BEAM_EVIL, float fDuration=9.0);
void pentagram(location lTargetLoc, int nBeamFX=VFX_BEAM_EVIL, float fDuration=9.0)
{
int nEff = nBeamFX;
object oArea = GetAreaFromLocation(lTargetLoc);
// Define vertices for pentagram
vector v = GetPositionFromLocation(lTargetLoc);
v = Vector(v.x,v.y+7.0,v.z);
location l1= Location(oArea,v,0.0);
v = Vector(v.x-4.0,v.y-12.5,v.z);
location l2= Location(oArea,v,0.0);
v = Vector(v.x+10.5,v.y+8.0,v.z);
location l3= Location(oArea,v,0.0);
v = Vector(v.x-13,v.y,v.z);
location l4= Location(oArea,v,0.0);
v = Vector(v.x+10.5,v.y-8.0,v.z);
location l5= Location(oArea,v,0.0);
// Create verticies objects
object oS1 = CreateObject(OBJECT_TYPE_PLACEABLE,"ah_nonstaticinv",l1);
object oS2 = CreateObject(OBJECT_TYPE_PLACEABLE,"ah_nonstaticinv",l2);
object oS3 = CreateObject(OBJECT_TYPE_PLACEABLE,"ah_nonstaticinv",l3);
object oS4 = CreateObject(OBJECT_TYPE_PLACEABLE,"ah_nonstaticinv",l4);
object oS5 = CreateObject(OBJECT_TYPE_PLACEABLE,"ah_nonstaticinv",l5);
// Connect vertices with beams
effect eVis1 = EffectBeam(nEff,oS1,BODY_NODE_CHEST);
effect eVis2 = EffectBeam(nEff,oS2,BODY_NODE_CHEST);
effect eVis3 = EffectBeam(nEff,oS3,BODY_NODE_CHEST);
effect eVis4 = EffectBeam(nEff,oS4,BODY_NODE_CHEST);
effect eVis5 = EffectBeam(nEff,oS5,BODY_NODE_CHEST);
// Make pentagram visible
DelayCommand(0.5,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVis1,oS2,fDuration));
DelayCommand(1.5,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVis2,oS3,fDuration));
DelayCommand(2.5,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVis3,oS4,fDuration));
DelayCommand(3.5,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVis4,oS5,fDuration));
DelayCommand(4.5,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVis5,oS1,fDuration));
// Remove objects
DelayCommand(fDuration,DestroyObject(oS1));
DelayCommand(fDuration,DestroyObject(oS2));
DelayCommand(fDuration,DestroyObject(oS3));
DelayCommand(fDuration,DestroyObject(oS4));
DelayCommand(fDuration,DestroyObject(oS5));
}

View File

@@ -0,0 +1,25 @@
void main()
{
object oPC=GetEnteringObject();
//object oRight = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
effect ePitfall = EffectKnockdown();
//if (FortitudeSave(oPC,20,SAVING_THROW_ALL)==0)
int nDamage=d10(3);
if(GetIsPC(oPC)||GetIsPC(GetMaster(oPC)))
{
if (FortitudeSave(oPC,18,SAVING_THROW_TYPE_ALL)==1)
{
SendMessageToPC(oPC,"Saved for half damage");
nDamage=nDamage/2;
}
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDamage(nDamage,DAMAGE_TYPE_BLUDGEONING,DAMAGE_POWER_PLUS_FIVE),oPC);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePitfall, oPC, RoundsToSeconds(2));
AssignCommand(oPC,PlayVoiceChat(VOICE_CHAT_PAIN1));
SendMessageToPC(oPC,"You fall into a pit, and find yourself shocked and hurt by the sudden impact..");
// AssignCommand(oPC, ActionPutDownItem(oRight));
}
}

View File

@@ -0,0 +1,62 @@
void main()
{
object oSelf = OBJECT_SELF;
object oAttacker = GetLastHostileActor(oSelf); //The last person to act hostilely, attacker, dammagers, spellcaster (if hostile), or disturber(in case of pickpocketing)
int iDexMod = GetAbilityModifier(ABILITY_DEXTERITY, oAttacker);
int nBowFocus;
int nCalledShot;
string nPCname = GetPCPlayerName(oSelf);
{
// Apply bonuses for beneficial feats
if (GetHasFeat(FEAT_WEAPON_FOCUS_LONGBOW, oAttacker))
nBowFocus = 1;
}
{
if (GetHasFeat(FEAT_WEAPON_FOCUS_SHORTBOW, oAttacker))
nBowFocus = 1;
}
{
if (GetHasFeat(FEAT_CALLED_SHOT, oAttacker))
nCalledShot = 1;
}
int iHitCalc = d20()+iDexMod+nCalledShot+nBowFocus;
int iRandomChance = d20();
if (iRandomChance == 20)
{
ActionSpeakString ("Contestant makes a lucky shot! Centre Ring (5 Points)");
return;
}
else if (iRandomChance == 1)
{
ActionSpeakString ("Scoring shot made on target edge (1 Point)");
return;
}
else if (iHitCalc <= 5)
{
ActionSpeakString ("Scoring shot made on target edge (1 Point)");
return;
}
else if (iHitCalc <= 12)
{
ActionSpeakString ("BLUE: Scoring shot made on outer circle (3 Points)");
return;
}
else if (iHitCalc <= 19)
{
ActionSpeakString ("WHITE: Scoring shot made on inner circle (4 Points)");
return;
}
else if (iHitCalc <= 30)
{
ActionSpeakString ("RED: Scoring shot made on centre circle! (5 Points)");
return;
}
}

15
_module/nss/ah_sing.nss Normal file
View File

@@ -0,0 +1,15 @@
// FeySong script for use in conversation with the Song Fey
// Allows PC to sing with the Fey
void main()
{
object oPC=GetPCSpeaker();
object oFey=GetObjectByTag("ah_songbird");
effect BardSong = EffectVisualEffect(VFX_DUR_BARD_SONG);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, BardSong, oPC,6.0);
effect FeySong = EffectVisualEffect(VFX_DUR_BARD_SONG);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, FeySong, oFey,6.0);
AssignCommand(oPC,PlaySound("sdr_bardsong"));
AssignCommand(oFey,PlaySound("sce_neutral"));
// AssignCommand(oFey,PlaySound("c_fairy_hit2"));
}

View File

@@ -0,0 +1,17 @@
void main()
{
object oPlayer = GetLastUsedBy();
if( GetIsPC( oPlayer ) )
{
object oChair = OBJECT_SELF;
if( GetIsObjectValid( oChair ))
{
vector vChair = GetPosition(OBJECT_SELF);
vChair.z = 0.0;
location lChair = Location(GetArea(OBJECT_SELF),vChair,GetFacing(OBJECT_SELF));
object oNewSeat = CreateObject(OBJECT_TYPE_PLACEABLE, "ah_seat2", lChair,FALSE);
AssignCommand( oPlayer, ActionSit( oNewSeat ) );
}
}
}

View File

@@ -0,0 +1,69 @@
//::///////////////////////////////////////////////
//:: Associate: On Spawn In
//:: NW_CH_AC9
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Nov 19, 2001
//:://////////////////////////////////////////////
#include "NW_I0_GENERIC"
void main()
{
effect vfx = EffectVisualEffect(VFX_DUR_LIGHT_BLUE_5);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx, OBJECT_SELF);
effect vfx2 = EffectVisualEffect(VFX_DUR_LIGHT_YELLOW_5);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, vfx2, OBJECT_SELF);
SetAssociateListenPatterns();//Sets up the special henchmen listening patterns
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
SetAssociateState(NW_ASC_POWER_CASTING);
SetAssociateState(NW_ASC_HEAL_AT_50);
SetAssociateState(NW_ASC_RETRY_OPEN_LOCKS);
SetAssociateState(NW_ASC_DISARM_TRAPS);
SetAssociateState(NW_ASC_MODE_DEFEND_MASTER, FALSE);
SetAssociateState(NW_ASC_USE_RANGED_WEAPON, FALSE); //User ranged weapons by default if true.
SetAssociateState(NW_ASC_DISTANCE_2_METERS);
// April 2002: Summoned monsters, associates and familiars need to stay
// further back due to their size.
SetAssociateState(NW_ASC_DISTANCE_2_METERS);
//SetAssociateState(NW_ASC_MODE_DEFEND_MASTER);
SetAssociateStartLocation();
// SPECIAL CONVERSATION SETTTINGS
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
PlaySound("as_mg_frstmagic1");
}

View File

@@ -0,0 +1,9 @@
void main()
{
object oPC=GetLastUsedBy();
AssignCommand(oPC,ClearAllActions());
ActionStartConversation(oPC);
}

View File

@@ -0,0 +1,114 @@
void main()
{
{
object oLeaving=GetExitingObject();
if (!GetIsPC(oLeaving))
{
return;
}
object oObject = GetFirstObjectInArea();
int nPCinArea=FALSE;
location lLoc;
object oItem;
DestroyObject(GetItemPossessedBy(oLeaving, "ah_tavern_key_1"));
DestroyObject(GetItemPossessedBy(oLeaving, "ah_tavern_key_2"));
DestroyObject(GetItemPossessedBy(oLeaving, "ah_tavern_key_3"));
DestroyObject(GetItemPossessedBy(oLeaving, "ah_tavern_key_4"));
DestroyObject(GetItemPossessedBy(oLeaving, "ah_tavern_key_5"));
DestroyObject(GetItemPossessedBy(oLeaving, "ah_tavern_key_6"));
// first of all, check every object in the area and see if it is a PC.
object oTest=GetFirstPC();
// Test to make sure the activator is a DM, or is a DM
// controlling a creature.
while (GetIsObjectValid(oTest) == TRUE)
{
if ((GetArea(oTest) == OBJECT_SELF)&&(!GetIsDM(oTest)))
{
nPCinArea = TRUE;
return;
}
oTest=GetNextPC();
}
//while (GetIsObjectValid(oObject))
// {
// if (GetIsPC(oObject))
// {
// nPCinArea = TRUE;
// return;
// }
// oObject=GetNextObjectInArea();
// }
// if not, then run the next bit of the script
if (nPCinArea != TRUE)
{
object oBowl=GetObjectByTag("ah_tavernkeybowl");
location lBowlLoc=GetLocation(GetObjectByTag("ah_tavern_bowl_wp"));
SetPlotFlag(oBowl, FALSE);
DelayCommand(2.0, DestroyObject(oBowl));
CreateObject(OBJECT_TYPE_PLACEABLE, "ah_tavernkeybowl", lBowlLoc, FALSE);
oObject = GetFirstObjectInArea();
while (GetIsObjectValid(oObject) == TRUE)
{
// if (GetIsEncounterCreature(oObject)&&!GetPlotFlag(oObject))
// {
// DestroyObject(oObject);
// }
// if (GetObjectType(oObject)==OBJECT_TYPE_TRIGGER)
// {
// SetEncounterActive(TRUE,oObject);
// }
if (GetTag(oObject) == "BodyBag")
{
oItem = GetFirstItemInInventory(oObject);
while (GetIsObjectValid(oItem) == TRUE)
{
DestroyObject(oItem);
oItem=GetNextItemInInventory(oObject);
}
SetPlotFlag(oObject,FALSE);
DestroyObject(oObject);
}
if (GetResRef(oObject)=="jw_trap_trigger")
{
SetLocalInt(oObject,"Reset",1);
}
oObject=GetNextObjectInArea();
}
}
}
}

View File

@@ -0,0 +1,10 @@
void main()
{
//object oDoor=GetNearestObjectByTag("NormalDoor", OBJECT_SELF, 1);
//object oPC=GetEnteringObject();
object oDoor=OBJECT_SELF;
SpeakString("*Knock Knock*", TALKVOLUME_TALK);
PlaySound("as_cv_hammering2");
PlaySound("as_cv_hammering2");
}

View File

@@ -0,0 +1,14 @@
void main()
{
object oPC=GetEnteringObject();
object oDoor=GetNearestObject(OBJECT_TYPE_DOOR, OBJECT_SELF, 1);
if ((GetLocked(oDoor) == TRUE))
{
AssignCommand(oDoor,ActionStartConversation(oPC, "ah_taverndoor", TRUE, FALSE));
}
else
{
return;
}
}

View File

@@ -0,0 +1,22 @@
void main()
{
object oObject=GetInventoryDisturbItem();
object oPC=GetLastUsedBy();
object oInv;
string sObjectResRef=(GetResRef(oObject));
if (GetInventoryDisturbType()==(INVENTORY_DISTURB_TYPE_ADDED))
{
if ((GetBaseItemType(oObject)) != (BASE_ITEM_KEY))
{
CreateItemOnObject(sObjectResRef, oPC, 1);
DestroyObject(oObject);
SendMessageToPC(oPC, "Please only put tavern room keys in this bowl");
}
}
else
{
return;
}
}

1119
_module/nss/array_api.nss Normal file

File diff suppressed because it is too large Load Diff

17
_module/nss/at_001.nss Normal file
View File

@@ -0,0 +1,17 @@
//::///////////////////////////////////////////////
//:: FileName at_001
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 14/06/2003 23:21:45
//:://////////////////////////////////////////////
void main()
{
// Either open the store with that tag or let the user know that no store exists.
object oStore = GetNearestObjectByTag("jw_halfbar_merch");
if(GetObjectType(oStore) == OBJECT_TYPE_STORE)
OpenStore(oStore, GetPCSpeaker());
else
ActionSpeakStringByStrRef(53090, TALKVOLUME_TALK);
}

View File

@@ -0,0 +1,19 @@
//::///////////////////////////////////////////////
//:: at_add_ale
//:: at_add_ale.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By: Lysandius
//:: Created On: 14-07-2002
//:://////////////////////////////////////////////
void main()
{
int nAle = GetLocalInt(OBJECT_SELF, "nAle");
nAle++;
SetLocalInt(OBJECT_SELF, "nAle", nAle);
}

View File

@@ -0,0 +1,19 @@
//::///////////////////////////////////////////////
//:: at_add_spirits
//:: at_add_spirits.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By: Lysandius
//:: Created On: 14-07-2002
//:://////////////////////////////////////////////
void main()
{
int nSpirits = GetLocalInt(OBJECT_SELF, "nSpirits");
nSpirits++;
SetLocalInt(OBJECT_SELF, "nSpirits", nSpirits);
}

View File

@@ -0,0 +1,19 @@
//::///////////////////////////////////////////////
//:: at_add_wine
//:: at_add_wine.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By: Lysandius
//:: Created On: 14-07-2002
//:://////////////////////////////////////////////
void main()
{
int nWine = GetLocalInt(OBJECT_SELF, "nWine");
nWine++;
SetLocalInt(OBJECT_SELF, "nWine", nWine);
}

View File

@@ -0,0 +1,21 @@
//::///////////////////////////////////////////////
//:: at_bill_pay
//:: at_bill_pay.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By: Lysandius
//:: Created On: 16-07-2002
//:://////////////////////////////////////////////
void main()
{
string sAreaName = GetTag(GetArea(OBJECT_SELF));
string sVarName = "RPO_" + sAreaName + "_Bill";
int nBill = GetLocalInt(GetLastSpeaker(), sVarName);
TakeGoldFromCreature(nBill, GetLastSpeaker());
SetLocalInt(GetLastSpeaker(), "nBill", 0);
}

View File

@@ -0,0 +1,20 @@
//::///////////////////////////////////////////////
//:: at_bill_token
//:: at_bill_token.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By: Lysandius
//:: Created On: 16-07-2002
//:://////////////////////////////////////////////
void main()
{
string sAreaName = GetTag(GetArea(OBJECT_SELF));
string sVarName = "RPO_" + sAreaName + "_Bill";
string sBill = IntToString(GetLocalInt(GetLastSpeaker(), sVarName));
SetCustomToken(1000, sBill);
}

View File

@@ -0,0 +1,10 @@
void main()
{
object oClicker = GetClickingObject();
object oTarget = GetTransitionTarget(OBJECT_SELF);
location lLoc = GetLocation(oTarget);
AssignCommand(oClicker,JumpToLocation(lLoc));
SignalEvent(GetObjectByTag("Trap_Door"),EventUserDefined(500));
}

View File

@@ -0,0 +1,9 @@
void main()
{
object oClicker = GetClickingObject();
object oTarget = GetTransitionTarget(OBJECT_SELF);
location lLoc = GetLocation(oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_DISPEL_GREATER),oClicker);
AssignCommand(oClicker,JumpToLocation(lLoc));
}

View File

@@ -0,0 +1,9 @@
void main()
{
object oClicker = GetClickingObject();
SendMessageToPC(oClicker,"You pass through a tunnel to the exit of the cave, avoiding the flies and other dangers to emerge safely through a concealed door.");
object oTarget = GetTransitionTarget(OBJECT_SELF);
location lLoc = GetLocation(oTarget);
AssignCommand(oClicker,JumpToLocation(lLoc));
}

View File

@@ -0,0 +1,8 @@
void main()
{
object oClicker = GetClickingObject();
object oTarget = GetTransitionTarget(OBJECT_SELF);
location lLoc = GetLocation(oTarget);
AssignCommand(oClicker,JumpToLocation(lLoc));
}

View File

@@ -0,0 +1,17 @@
//::///////////////////////////////////////////////
//:: at_order_placed
//:: at_order_placed.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By: Lysandius
//:: Created On: 16-07-2002
//:://////////////////////////////////////////////
void main()
{
SignalEvent(OBJECT_SELF, EventUserDefined(20)); // ON ORDER PLACED
}

View File

@@ -0,0 +1,10 @@
void main()
{
object oClicker = GetClickingObject();
object oTarget = GetTransitionTarget(OBJECT_SELF);
SetAreaTransitionBMP(AREA_TRANSITION_RANDOM);
AssignCommand(oClicker,JumpToObject(oTarget));
}

View File

@@ -0,0 +1,19 @@
//::///////////////////////////////////////////////
//:: at_reset_drinks
//:: at_reset_drinks.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By: Lysandius
//:: Created On: 14-07-2002
//:://////////////////////////////////////////////
void main()
{
SetLocalInt(OBJECT_SELF, "nAle", 0);
SetLocalInt(OBJECT_SELF, "nWine", 0);
SetLocalInt(OBJECT_SELF, "nSpirits", 0);
}

View File

@@ -0,0 +1,7 @@
int StartingConditional()
{
if (GetItemPossessedBy(GetPCSpeaker(), "bbs_notice") != OBJECT_INVALID) {
return TRUE;
}
return FALSE;
}

135
_module/nss/bbs_include.nss Normal file
View File

@@ -0,0 +1,135 @@
//BULLETIN BOARD SYSTEM VERSION 1.1
//This is an include file. Upon building your module you will get
//a compile error in this file. That is normal and does not
//affect the operation of the bulletin board.
void bbs_do_board_stats();
void bbs_initiate(object oBBS);
int bbs_can_show(int WhichEntry);
void bbs_change_page(int PageChange);
void bbs_select_entry(int WhichEntry);
void bbs_add_notice(object oBBS, string sPoster, string sTitle, string sMessage, string sDate, string sBBStag = "");
//Loads into tokens the stats for a board
void bbs_do_board_stats() {
object oBBS = GetLocalObject(GetModule(), "BBS_" + GetTag(OBJECT_SELF));
int PageSize = GetLocalInt(oBBS, "PageSize");
int TotalItems = GetLocalInt(oBBS, "TotalItems");
int PageIndex = GetLocalInt(oBBS, "PageIndex") + 1;
SetCustomToken(3671, IntToString(TotalItems));
if (TotalItems == 0) {PageIndex = 0;}
SetCustomToken(3672, IntToString(PageIndex));
SetCustomToken(3673, IntToString((TotalItems + PageSize - 1) / PageSize));
}
//Initiates a bulletin board's settings if neccessary
void bbs_initiate(object oBBS) {
string sBBS = "BBS_" + GetTag(oBBS);
object myBBS = GetLocalObject(GetModule(), sBBS);
if (!GetIsObjectValid(myBBS)) {
SetLocalObject(GetModule(), sBBS, oBBS);
myBBS = oBBS;
//MaxItems is the maximum number of messages
SetLocalInt(myBBS, "MaxItems", 25);
//PageSize is the number of entries per page, between 1 and 10
SetLocalInt(myBBS, "PageSize", 5);
}
}
//Determines whether a dialogue option is visible in conversation
int bbs_can_show(int WhichEntry) {
object oBBS = GetLocalObject(GetModule(), "BBS_" + GetTag(OBJECT_SELF));
int PageSize = GetLocalInt(oBBS, "PageSize");
int nSpot = GetLocalInt(oBBS, "PageIndex") * PageSize + WhichEntry;
if(nSpot <= GetLocalInt(oBBS, "TotalItems") && WhichEntry <= PageSize) {return TRUE;}
return FALSE;
}
//Moves the page by the required PageFlip:
//0 to reload page, -1 for previous page, 1 for next page
void bbs_change_page(int PageFlip) {
object oBBS = GetLocalObject(GetModule(), "BBS_" + GetTag(OBJECT_SELF));
int PageSize = GetLocalInt(oBBS, "PageSize");
int TotalItems = GetLocalInt(oBBS, "TotalItems");
int MaxItems = GetLocalInt(oBBS, "MaxItems");
int LatestItem = GetLocalInt(oBBS, "LatestItem");
int PageIndex = GetLocalInt(oBBS, "PageIndex") + 1 * PageFlip;
if (PageIndex < 0) {PageIndex = 0;}
SetLocalInt(oBBS, "PageIndex", PageIndex);
string sInfo;
int iLoop;
int iNotice;
for (iLoop = 0; iLoop < PageSize; iLoop++) {
iNotice = LatestItem - PageIndex * PageSize - iLoop;
if (iNotice < 1) {iNotice = MaxItems + iNotice;}
sInfo = GetLocalString(oBBS, "Title" + IntToString(iNotice));
SetCustomToken(3680 + iLoop, sInfo);
sInfo = GetLocalString(oBBS, "Poster" + IntToString(iNotice));
if (((PageIndex * PageSize + iLoop + 2) > TotalItems) || (iLoop == PageSize - 1)){
sInfo = sInfo + "\n ";
}
SetCustomToken(3690 + iLoop, sInfo);
}
bbs_do_board_stats();
SetCustomToken(3674, "");
SetCustomToken(3675, "");
SetCustomToken(3676, "");
SetCustomToken(3677, "");
SetCustomToken(3678, "");
}
//Displays the selected post
void bbs_select_entry(int WhichEntry) {
object oBBS = GetLocalObject(GetModule(), "BBS_" + GetTag(OBJECT_SELF));
int PageSize = GetLocalInt(oBBS, "PageSize");
int MaxItems = GetLocalInt(oBBS, "MaxItems");
int LatestItem = GetLocalInt(oBBS, "LatestItem");
int PageIndex = GetLocalInt(oBBS, "PageIndex");
int iNotice = LatestItem - PageIndex * PageSize - WhichEntry + 1;
if (iNotice < 1) {iNotice = MaxItems + iNotice;}
string sNotice = IntToString(iNotice);
bbs_do_board_stats();
SetCustomToken(3674, "\n\n" + GetLocalString(oBBS, "Title" + sNotice) + "\nBy: ");
SetCustomToken(3675, GetLocalString(oBBS, "Poster" + sNotice));
SetCustomToken(3676, " On: ");
SetCustomToken(3677, GetLocalString(oBBS, "Date" + sNotice));
SetCustomToken(3678, "\n" + GetLocalString(oBBS, "Message" + sNotice));
}
//Adds a post to the bulletin board. This can be called at any time
//so you can insert your own notices. If you don't specify a sDate,
//it will use the current game time. The proper format for sDate is
//something like "6/30/1373 11:58". The last two lines write code to
//the log file for restoring the messages after a module edit.
void bbs_add_notice(object oBBS, string sPoster, string sTitle, string sMessage, string sDate, string sBBStag = "")
{
if (sBBStag != "") {oBBS = GetObjectByTag(sBBStag);}
bbs_initiate(oBBS);
oBBS = GetLocalObject(GetModule(), "BBS_" + GetTag(oBBS));
if (sDate == "") {
sDate = IntToString(GetTimeMinute());
if (GetStringLength(sDate) == 1) {sDate = "0" + sDate;}
sDate = IntToString(GetCalendarMonth()) + "/" + IntToString(GetCalendarDay()) + "/" + IntToString(GetCalendarYear()) + " " + IntToString(GetTimeHour()) + ":" + sDate;
}
int MaxItems = GetLocalInt(oBBS, "MaxItems");
int TotalItems = GetLocalInt(oBBS, "TotalItems");
int nSpot = TotalItems + 1;
if (nSpot > MaxItems) {
nSpot = GetLocalInt(oBBS, "LatestItem") + 1;
if (nSpot > MaxItems) {nSpot = nSpot - MaxItems;}
}
SetLocalString(oBBS, "Poster" + IntToString(nSpot), sPoster);
SetLocalString(oBBS, "Date" + IntToString(nSpot), sDate);
SetLocalString(oBBS, "Title" + IntToString(nSpot), sTitle);
SetLocalString(oBBS, "Message" + IntToString(nSpot), sMessage);
SetLocalInt(oBBS, "LatestItem", nSpot);
if (MaxItems > TotalItems) {SetLocalInt(oBBS, "TotalItems", TotalItems + 1);}
string sQuote = GetSubString(GetStringByStrRef(464), 13, 1);
PrintString("bbs_add_notice(OBJECT_SELF, " + sQuote + sPoster + sQuote + ", " + sQuote + sTitle + sQuote + ", " + sQuote + sMessage + sQuote + ", " + sQuote + sDate + sQuote + ", " + sQuote + GetTag(oBBS) + sQuote + "); //:::BBS:::");
}

View File

@@ -0,0 +1,5 @@
#include "bbs_include"
void main()
{
bbs_change_page(-1);
}

View File

@@ -0,0 +1,5 @@
#include "bbs_include"
void main()
{
bbs_change_page(1);
}

View File

@@ -0,0 +1,14 @@
#include "bbs_include"
void main()
{
object oPC = GetPCSpeaker();
object oNotice = GetItemPossessedBy(oPC, "bbs_notice");
if (GetIsObjectValid(oNotice)) {
string nPoster = GetName(oPC);
string nTitle = GetLocalString(oNotice, "Title");
string nMessage = GetLocalString(oNotice, "Message");
ActionTakeItem(oNotice, oPC);
bbs_add_notice(OBJECT_SELF, nPoster, nTitle, nMessage, "");
bbs_change_page(-1000);
}
}

View File

@@ -0,0 +1,38 @@
//::///////////////////////////////////////////////
//:: SetListeningPatterns
//:: NW_C2_DEFAULT4
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Determines the course of action to be taken
by the generic script after dialogue or a
shout is initiated.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 24, 2001
//:://////////////////////////////////////////////
#include "NW_I0_GENERIC"
void main()
{
int nMatch = GetListenPatternNumber();
object oShouter = GetLastSpeaker();
object oIntruder;
if (nMatch == -1 && GetCommandable(OBJECT_SELF))
{
ClearAllActions();
BeginConversation();
}
else
if(nMatch == 777 && GetIsObjectValid(oShouter) && GetIsPC(oShouter))
// && GetIsFriend(oShouter)
{
if (oShouter == GetLocalObject(OBJECT_SELF, "Customer")) {
string sSaid = GetMatchedSubstring(0);
SetLocalString(OBJECT_SELF, "Stack", sSaid);
}
}
}

View File

@@ -0,0 +1,8 @@
void main()
{
object Notice = CreateItemOnObject("bbs_notice_bp", GetPCSpeaker());
if (Notice != OBJECT_INVALID) {
SetLocalString(Notice, "Title", GetLocalString(OBJECT_SELF, "Title"));
SetLocalString(Notice, "Message", GetLocalString(OBJECT_SELF, "Message"));
}
}

View File

@@ -0,0 +1,9 @@
void main()
{
string sTalk = GetLocalString(OBJECT_SELF, "Stack");
if (sTalk != "") {
if (GetStringLength(sTalk) > 200) {sTalk = GetStringLeft(sTalk, 200);}
SetLocalString(OBJECT_SELF, "Message", sTalk);
SetLocalString(OBJECT_SELF, "Stack", "");
}
}

View File

@@ -0,0 +1,7 @@
int StartingConditional()
{
if (GetLocalString(OBJECT_SELF, "Message") != "") {
return TRUE;
}
return FALSE;
}

View File

@@ -0,0 +1,80 @@
//::////////////////////////////////////////////////////////
//:: Default: On Spawn In
//:: NW_C2_DEFAULT9
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Determines the course of action to be taken
after having just been spawned in
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//:://////////////////////////////////////////////
//#include "NW_O2_CONINCLUDE"
#include "NW_I0_GENERIC"
#include "jw_treasure_gene"
#include "jw_privates_inc"
void main()
{
/// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
SetStartLocation();
//SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
// This will set the listening pattern on the NPC to attack when allies call
//SetSpawnInCondition(NW_FLAG_STEALTH);
// If the NPC has stealth and they are a rogue go into stealth mode
//SetSpawnInCondition(NW_FLAG_SEARCH);
// If the NPC has Search go into Search Mode
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_SLEEP);
//Creatures that spawn in during the night will be asleep.
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
//SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
//NOTE that these animations will play automatically for Encounter Creatures.
/// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
//SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
SetListenPattern(OBJECT_SELF, "**", 777); //listen to all text
SetListening(OBJECT_SELF, TRUE); //be sure NPC is listening
//SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
// combat.
MakeTreasure(); //* Use this to create a small amount of treasure on the creature
}

View File

@@ -0,0 +1,7 @@
void main()
{
SetLocalObject(OBJECT_SELF, "Customer", GetPCSpeaker());
SetLocalString(OBJECT_SELF, "Stack", "");
SetLocalString(OBJECT_SELF, "Title", "");
SetLocalString(OBJECT_SELF, "Message", "");
}

View File

@@ -0,0 +1,4 @@
void main()
{
SetLocalObject(OBJECT_SELF, "Customer", OBJECT_INVALID);
}

View File

@@ -0,0 +1,9 @@
void main()
{
string sTalk = GetLocalString(OBJECT_SELF, "Stack");
if (sTalk != "") {
if (GetStringLength(sTalk) > 30) {sTalk = GetStringLeft(sTalk, 30);}
SetLocalString(OBJECT_SELF, "Title", sTalk);
SetLocalString(OBJECT_SELF, "Stack", "");
}
}

View File

@@ -0,0 +1,7 @@
int StartingConditional()
{
if (GetLocalString(OBJECT_SELF, "Title") != "") {
return TRUE;
}
return FALSE;
}

View File

@@ -0,0 +1,6 @@
#include "bbs_include"
void main()
{
bbs_select_entry(1);
}

View File

@@ -0,0 +1,6 @@
#include "bbs_include"
void main()
{
bbs_select_entry(2);
}

View File

@@ -0,0 +1,6 @@
#include "bbs_include"
void main()
{
bbs_select_entry(3);
}

View File

@@ -0,0 +1,6 @@
#include "bbs_include"
void main()
{
bbs_select_entry(4);
}

View File

@@ -0,0 +1,6 @@
#include "bbs_include"
void main()
{
bbs_select_entry(5);
}

View File

@@ -0,0 +1,6 @@
#include "bbs_include"
void main()
{
bbs_select_entry(6);
}

View File

@@ -0,0 +1,6 @@
#include "bbs_include"
void main()
{
bbs_select_entry(7);
}

View File

@@ -0,0 +1,6 @@
#include "bbs_include"
void main()
{
bbs_select_entry(8);
}

View File

@@ -0,0 +1,6 @@
#include "bbs_include"
void main()
{
bbs_select_entry(9);
}

View File

@@ -0,0 +1,6 @@
#include "bbs_include"
void main()
{
bbs_select_entry(10);
}

View File

@@ -0,0 +1,5 @@
#include "bbs_include"
int StartingConditional()
{
return bbs_can_show(1);
}

View File

@@ -0,0 +1,5 @@
#include "bbs_include"
int StartingConditional()
{
return bbs_can_show(2);
}

View File

@@ -0,0 +1,5 @@
#include "bbs_include"
int StartingConditional()
{
return bbs_can_show(3);
}

View File

@@ -0,0 +1,5 @@
#include "bbs_include"
int StartingConditional()
{
return bbs_can_show(4);
}

View File

@@ -0,0 +1,5 @@
#include "bbs_include"
int StartingConditional()
{
return bbs_can_show(5);
}

View File

@@ -0,0 +1,5 @@
#include "bbs_include"
int StartingConditional()
{
return bbs_can_show(6);
}

View File

@@ -0,0 +1,5 @@
#include "bbs_include"
int StartingConditional()
{
return bbs_can_show(7);
}

View File

@@ -0,0 +1,5 @@
#include "bbs_include"
int StartingConditional()
{
return bbs_can_show(8);
}

View File

@@ -0,0 +1,5 @@
#include "bbs_include"
int StartingConditional()
{
return bbs_can_show(9);
}

View File

@@ -0,0 +1,5 @@
#include "bbs_include"
int StartingConditional()
{
return bbs_can_show(10);
}

View File

@@ -0,0 +1,9 @@
int StartingConditional()
{
object oBBS = GetLocalObject(GetModule(), "BBS_" + GetTag(OBJECT_SELF));
int PageIndex = GetLocalInt(oBBS, "PageIndex");
if (PageIndex == 0) {
return FALSE;
}
return TRUE;
}

View File

@@ -0,0 +1,11 @@
int StartingConditional()
{
object oBBS = GetLocalObject(GetModule(), "BBS_" + GetTag(OBJECT_SELF));
int PageSize = GetLocalInt(oBBS, "PageSize");
int PageIndex = GetLocalInt(oBBS, "PageIndex");
int TotalItems = GetLocalInt(oBBS, "TotalItems");
if (TotalItems > (PageIndex + 1) * PageSize) {
return TRUE;
}
return FALSE;
}

13
_module/nss/bbs_start.nss Normal file
View File

@@ -0,0 +1,13 @@
#include "bbs_include"
void main()
{
object oPC = GetLastUsedBy();
if (GetIsPC(oPC)) {
bbs_initiate(OBJECT_SELF);
//SetLocalInt(GetLocalObject(GetModule(), "BBS_" + GetTag(OBJECT_SELF)), "PageIndex", 0);
bbs_change_page(-1000);
ActionStartConversation(oPC, "", TRUE);
}
}

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