Initial Upload

Initial Upload
This commit is contained in:
Jaysyn904
2023-09-21 21:20:34 -04:00
parent d3f23f8b3c
commit 94990edc60
5734 changed files with 6324648 additions and 0 deletions

49
_module/nss/2keylock.nss Normal file
View File

@@ -0,0 +1,49 @@
string sDeny;
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
//Put this OnUsed
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
if (GetItemPossessedBy(oPC, "ZekinthasStoreKey1")== OBJECT_INVALID)
{
sDeny="You do not have the correct keys in your possesion.";
SendMessageToPC(oPC, sDeny);
return;
}
if (GetItemPossessedBy(oPC, "ZekinthasStoreKey2")== OBJECT_INVALID)
{
sDeny="You do not have the correct keys in your possesion.";
SendMessageToPC(oPC, sDeny);
return;
}
object oTarget;
oTarget = GetObjectByTag("ZeksStoreDoor");
AssignCommand(oTarget, ActionOpenDoor(oTarget));
object oItem;
oItem = GetItemPossessedBy(oPC, "ZekinthasStoreKey1");
if (GetIsObjectValid(oItem)) DestroyObject(oItem);
oItem = GetItemPossessedBy(oPC, "ZekinthasStoreKey2");
if (GetIsObjectValid(oItem)) DestroyObject(oItem);
}

View File

@@ -0,0 +1,32 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
//Put this OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
object oTarget;
oTarget = oPC;
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DOOM), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DOOM), GetLocation(oTarget));
oTarget = oPC;
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectACDecrease(20), oTarget, 120.0f);
}

View File

@@ -0,0 +1,32 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
//Put this OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
object oTarget;
oTarget = oPC;
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST), GetLocation(oTarget));
oTarget = oPC;
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectSilence(), oTarget, 120.0f);
}

View File

@@ -0,0 +1,32 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
//Put this OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
object oTarget;
oTarget = oPC;
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
oTarget = oPC;
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectSlow(), oTarget, 120.0f);
}

View File

@@ -0,0 +1,42 @@
// Despawner Script - Used in OnExit in Area Properties
//
// The purpose of this script is to DestroyObject() all occurences of
// encounter spawned creatures when no PCs are left in the current
// area.
//
// -Aviston-
void main()
{
// First check to see if the ExitingObject is a PC or not
object oPC = GetExitingObject();
// If not, we'll just exit
if (!GetIsPC(oPC))
return;
// Start up the loop, setting oPC now to the first PC
oPC = GetFirstPC();
// Continue looping until there are no more PCs left
while (oPC != OBJECT_INVALID)
{
// Check the Area against the Area of the current PC
// If they are the same, exit the function, as we do not need to
// check anymore PCs
if (OBJECT_SELF == GetArea(oPC))
return;
// If not, continue to the next PC
else oPC = GetNextPC();
}
// If we've made it this far, we know that there aren't any PCs in the area
// Set oObject to the first object in the Area
object oObject = GetFirstObjectInArea(OBJECT_SELF);
// Continue looping until there are no more objects left
while (oObject != OBJECT_INVALID)
{
// Test to see if oObject is a creature spawned from an encounter
// If so, destroy the object
if (GetIsEncounterCreature(oObject))
DestroyObject(oObject);
// Move on to the next object
oObject = GetNextObjectInArea(OBJECT_SELF);
}
}

View File

@@ -0,0 +1,99 @@
// Each switch must be flipped in order.
// I used the tag to get the order (1,2,3) and a localINT to indicate
// where in the sequence we are.
// Initial Version of this script was not multiplayer friendly
// Modified 7/6/2002
// Changed localINT from PC to MODULE level to account for multiple
// PCs interacting with the switches
// Set variables at the head for easier configuration for number of
// switches and names of light sources and invisible objects.
//Change the following variables to reflect your module's needs
// ------------------------------------------------------------------
//Max Number of switches
int iMaxSwitches=5;
//Invisible object tag base
string sInvisibleObjectBase = "inv00";
//Light blueprint base
string sLightBlueprintBase = "sol_";
//Light tag base
string sLightTagBase = "LIGHT_";
//LocalINT title
string sCurrentState = "WF_SWITCHES";
//Door to unlock when complete
object oDoor = GetObjectByTag("AirDoor2");
// ------------------------------------------------------------------
void makelight(int lightnum)
{
CreateObject(OBJECT_TYPE_PLACEABLE,sLightBlueprintBase + IntToString(lightnum), GetLocation(GetObjectByTag(sInvisibleObjectBase+IntToString(lightnum),0)));
DelayCommand(0.2, RecomputeStaticLighting(GetArea(GetObjectByTag(sLightTagBase + IntToString(lightnum)))));
}
void main()
{
object oPC=GetLastUsedBy();
//Read the stored state
int iCurrentState = GetLocalInt(GetModule(),sCurrentState);
//Find out which switch is being used
int iUsedSwitch = StringToInt(GetSubString(GetTag(OBJECT_SELF),GetStringLength(GetTag(OBJECT_SELF))-1,1));
if (iCurrentState <= iMaxSwitches)
{
//Only do this if the sequence is not complete
//If the current state is one less than the switch being pulled then
if ((iCurrentState+1) == iUsedSwitch)
{
// Show switch activation
AssignCommand(OBJECT_SELF, PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
// Turn related light on
makelight(iUsedSwitch);
// Store the sequence position
SetLocalInt(GetModule(),sCurrentState,(iCurrentState+1));
AssignCommand(OBJECT_SELF, PlaySound("gui_dm_drop"));
// Test for final Condition
if (iUsedSwitch == iMaxSwitches)
{
// save the state showing the puzzle is finished
SetLocalInt(GetModule(),sCurrentState,iMaxSwitches+1);
// Put anything you want to happen when the puzzle is solved in this
// section below. As is, it will unlock and open a door:
// ------------------------------------------------------------------
// make the last light if any
makelight(iMaxSwitches+1);
// play a nice sound
AssignCommand(OBJECT_SELF, PlaySound("gui_magbag_full"));
//open our door
SetLocked(oDoor, FALSE);
AssignCommand(OBJECT_SELF, ActionOpenDoor(oDoor));
// Tell the PC about opening the door
SendMessageToPC(oPC, "A door has opened somewhere!" );
// ------------------------------------------------------------------
}
} else {
// Sequence broken, so we must reset everything
AssignCommand(OBJECT_SELF, PlaySound("gui_cannotequip"));
// Show switch activation
AssignCommand(OBJECT_SELF, PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
// Destroy all light objects
int i;
object oLight;
string sLampTag;
string sSwitchTag;
string sSwitchTagBase=GetSubString(GetTag(OBJECT_SELF),0,GetStringLength(GetTag(OBJECT_SELF))-1);
string sInvObjTag;
//SendMessageToPC(GetFirstPC(), sSwitchTagBase );
for (i = 1; i <= iMaxSwitches; ++ i)
{
sLampTag = sLightTagBase + IntToString(i);
sSwitchTag = sSwitchTagBase + IntToString(i);
sInvObjTag = sInvisibleObjectBase + IntToString(i);
// Flip switch back
DelayCommand(0.2, AssignCommand(GetObjectByTag(sSwitchTag), PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
// Reset the lights
oLight=GetObjectByTag(sLampTag);
DelayCommand(0.2, DestroyObject(oLight));
DelayCommand(2.5, RecomputeStaticLighting(GetArea(GetObjectByTag(sInvObjTag))));
}
SetLocalInt(GetModule(),sCurrentState,0);
}
}
}

8
_module/nss/_use_sit.nss Normal file
View File

@@ -0,0 +1,8 @@
void main()
{
object oChair = OBJECT_SELF;
if(!GetIsObjectValid(GetSittingCreature(oChair)))
{
AssignCommand(GetLastUsedBy(), ActionSit(oChair));
}
}

View File

@@ -0,0 +1,74 @@
//void main() {} for the compiling
void RetrieveArrow(object Attacker, object oMonster)
{
int iPercent = 67; // This is the Percent amount to roll over to suceed
object Weapon = GetLastWeaponUsed(Attacker); // What did they Attack with?
int BaseType = GetBaseItemType(Weapon); // What's the base type of the weapon?
int HasInv = GetHasInventory(oMonster); // Check to make sure the creature has an inventory
int iRoll = d100(); // Let's Roll 100 to check 50% chance
if(HasInv == TRUE) // Make sure they have an inventory slot
{
if(iRoll >= iPercent) // Greater then set percentage?
{
if(BaseType == BASE_ITEM_SHORTBOW){
object CurrentAmmo = GetItemInSlot(INVENTORY_SLOT_ARROWS, Attacker);
string AmmoTag = GetResRef(CurrentAmmo);
object oItem = CreateItemOnObject(AmmoTag, oMonster);
SetIdentified(oItem, TRUE);
SetDroppableFlag(oItem, TRUE);
}
else if(BaseType == BASE_ITEM_LONGBOW){
object CurrentAmmo = GetItemInSlot(INVENTORY_SLOT_ARROWS, Attacker);
string AmmoTag = GetResRef(CurrentAmmo);
object oItem = CreateItemOnObject(AmmoTag, oMonster);
SetIdentified(oItem, TRUE);
SetDroppableFlag(oItem, TRUE);
}
else if(BaseType == BASE_ITEM_LIGHTCROSSBOW){
object CurrentAmmo = GetItemInSlot(INVENTORY_SLOT_BOLTS, Attacker);
string AmmoTag = GetResRef(CurrentAmmo);
object oItem = CreateItemOnObject(AmmoTag, oMonster);
SetIdentified(oItem, TRUE);
SetDroppableFlag(oItem, TRUE);
}
else if(BaseType == BASE_ITEM_HEAVYCROSSBOW){
object CurrentAmmo = GetItemInSlot(INVENTORY_SLOT_BOLTS, Attacker);
string AmmoTag = GetResRef(CurrentAmmo);
object oItem = CreateItemOnObject(AmmoTag, oMonster);
SetIdentified(oItem, TRUE);
SetDroppableFlag(oItem, TRUE);
}
else if(BaseType == BASE_ITEM_DART){
object CurrentAmmo = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, Attacker);
string AmmoTag = GetResRef(CurrentAmmo);
object oItem = CreateItemOnObject(AmmoTag, oMonster);
SetIdentified(oItem, TRUE);
SetDroppableFlag(oItem, TRUE);
}
else if(BaseType == BASE_ITEM_SLING){
object CurrentAmmo = GetItemInSlot(INVENTORY_SLOT_BULLETS, Attacker);
string AmmoTag = GetResRef(CurrentAmmo);
object oItem = CreateItemOnObject(AmmoTag, oMonster);
SetIdentified(oItem, TRUE);
SetDroppableFlag(oItem, TRUE);
}
else if(BaseType == BASE_ITEM_SHURIKEN){
object CurrentAmmo = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, Attacker);
string AmmoTag = GetResRef(CurrentAmmo);
object oItem = CreateItemOnObject(AmmoTag, oMonster);
SetIdentified(oItem, TRUE);
SetDroppableFlag(oItem, TRUE);
}
else if(BaseType == BASE_ITEM_THROWINGAXE){
object CurrentAmmo = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, Attacker);
string AmmoTag = GetResRef(CurrentAmmo);
object oItem = CreateItemOnObject(AmmoTag, oMonster);
SetIdentified(oItem, TRUE);
SetDroppableFlag(oItem, TRUE);
}
}
}
}

View File

@@ -0,0 +1,60 @@
void main()
{
object oPede1 = GetObjectByTag("MagicalPedestal1");
object oRune1 = GetItemPossessedBy(oPede1, "RuneStoneI");
if(GetTag(oRune1) != "RuneStoneI")
return;
object oPede2 = GetObjectByTag("MagicalPedestal2");
object oRune2 = GetItemPossessedBy(oPede2, "RuneStoneII");
if(GetTag(oRune2) != "RuneStoneII")
return;
object oPede3 = GetObjectByTag("MagicalPedestal3");
object oRune3 = GetItemPossessedBy(oPede3, "RuneStoneIII");
if(GetTag(oRune3) != "RuneStoneIII")
return;
object oPede4 = GetObjectByTag("MagicalPedestal4");
object oRune4 = GetItemPossessedBy(oPede4, "RuneStoneIV");
if(GetTag(oRune4) != "RuneStoneIV")
return;
object oPede5 = GetObjectByTag("MagicalPedestal5");
object oRune5 = GetItemPossessedBy(oPede5, "RuneStoneV");
if(GetTag(oRune5) != "RuneStoneV")
return;
{
string sAncient = "ancientamulet";
object oGreater = GetObjectByTag("GreaterPedestal");
CreateItemOnObject(sAncient, OBJECT_SELF, 1);
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE, 1.0, 6000.0);
effect eRes = EffectVisualEffect(VFX_IMP_RESTORATION_GREATER);
location lRes = GetLocation(oGreater);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRes, lRes, 1.0f);
effect eHeal = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
location lHeal1 = GetLocation(oPede1);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal1, 1.0f);
DestroyObject(oRune1, 0.0);
location lHeal2 = GetLocation(oPede2);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal2, 1.0f);
DestroyObject(oRune2, 0.0);
location lHeal3 = GetLocation(oPede3);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal3, 1.0f);
DestroyObject(oRune3, 0.0);
location lHeal4 = GetLocation(oPede4);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal4, 1.0f);
DestroyObject(oRune4, 0.0);
location lHeal5 = GetLocation(oPede5);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal5, 1.0f);
DestroyObject(oRune5, 0.0);
}
}

View File

@@ -0,0 +1,60 @@
void main()
{
object oPede1 = GetObjectByTag("MagicalPedestal1");
object oRune1 = GetItemPossessedBy(oPede1, "RuneStoneI");
if(GetTag(oRune1) != "RuneStoneI")
return;
object oPede2 = GetObjectByTag("MagicalPedestal2");
object oRune2 = GetItemPossessedBy(oPede2, "RuneStoneII");
if(GetTag(oRune2) != "RuneStoneII")
return;
object oPede3 = GetObjectByTag("MagicalPedestal3");
object oRune3 = GetItemPossessedBy(oPede3, "RuneStoneIII");
if(GetTag(oRune3) != "RuneStoneIII")
return;
object oPede4 = GetObjectByTag("MagicalPedestal4");
object oRune4 = GetItemPossessedBy(oPede4, "RuneStoneIV");
if(GetTag(oRune4) != "RuneStoneIV")
return;
object oPede5 = GetObjectByTag("MagicalPedestal5");
object oRune5 = GetItemPossessedBy(oPede5, "RuneStoneV");
if(GetTag(oRune5) != "RuneStoneV")
return;
{
string sAncient = "ancientamuletofp";
object oGreater = GetObjectByTag("GreaterPedestal");
CreateItemOnObject(sAncient, OBJECT_SELF, 1);
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE, 1.0, 6000.0);
effect eRes = EffectVisualEffect(VFX_IMP_RESTORATION_GREATER);
location lRes = GetLocation(oGreater);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRes, lRes, 1.0f);
effect eHeal = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
location lHeal1 = GetLocation(oPede1);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal1, 1.0f);
DestroyObject(oRune1, 0.0);
location lHeal2 = GetLocation(oPede2);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal2, 1.0f);
DestroyObject(oRune2, 0.0);
location lHeal3 = GetLocation(oPede3);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal3, 1.0f);
DestroyObject(oRune3, 0.0);
location lHeal4 = GetLocation(oPede4);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal4, 1.0f);
DestroyObject(oRune4, 0.0);
location lHeal5 = GetLocation(oPede5);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal5, 1.0f);
DestroyObject(oRune5, 0.0);
}
}

View File

@@ -0,0 +1,56 @@
void main()
{
object oRune1 = GetObjectByTag("RuneStoneI");
object oPede1 = GetItemPossessor(oRune1);
if(GetTag(oPede1) != "MagicalPedestal1")
return;
object oRune2 = GetObjectByTag("RuneStoneII");
object oPede2 = GetItemPossessor(oRune2);
if(GetTag(oPede2) != "MagicalPedestal2")
return;
object oRune3 = GetObjectByTag("RuneStoneIII");
object oPede3 = GetItemPossessor(oRune3);
if(GetTag(oPede3) != "MagicalPedestal3")
return;
object oRune4 = GetObjectByTag("RuneStoneIV");
object oPede4 = GetItemPossessor(oRune4);
if(GetTag(oPede4) != "MagicalPedestal4")
return;
object oRune5 = GetObjectByTag("RuneStoneV");
object oPede5 = GetItemPossessor(oRune5);
if(GetTag(oPede5) != "MagicalPedestal5")
return;
{
string sAncient = "ancientamuletofp";
object oGreater = GetObjectByTag("GreaterPedestal");
CreateItemOnObject(sAncient, OBJECT_SELF, 1);
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE, 1.0, 6000.0);
effect eRes = EffectVisualEffect(VFX_IMP_RESTORATION_GREATER);
location lRes = GetLocation(oGreater);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRes, lRes, 1.0f);
effect eHeal = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
location lHeal1 = GetLocation(oPede1);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal1, 1.0f);
DestroyObject(oRune1, 0.0);
location lHeal2 = GetLocation(oPede2);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal2, 1.0f);
DestroyObject(oRune2, 0.0);
location lHeal3 = GetLocation(oPede3);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal3, 1.0f);
DestroyObject(oRune3, 0.0);
location lHeal4 = GetLocation(oPede4);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal4, 1.0f);
DestroyObject(oRune4, 0.0);
location lHeal5 = GetLocation(oPede5);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHeal, lHeal5, 1.0f);
DestroyObject(oRune5, 0.0);
}
}

501
_module/nss/aps_include.nss Normal file
View File

@@ -0,0 +1,501 @@
// Name : Avlis Persistence System include
// Purpose : Various APS/NWNX2 related functions
// Authors : Ingmar Stieger, Adam Colon, Josh Simon
// Modified : February 16, 2003
// This file is licensed under the terms of the
// GNU GENERAL PUBLIC LICENSE (GPL) Version 2
/************************************/
/* Return codes */
/************************************/
int SQL_ERROR = 0;
int SQL_SUCCESS = 1;
/************************************/
/* Function prototypes */
/************************************/
// Setup placeholders for ODBC requests and responses
void SQLInit();
// Execute statement in sSQL
void SQLExecDirect(string sSQL);
// Position cursor on next row of the resultset
// Call this before using SQLGetData().
// returns: SQL_SUCCESS if there is a row
// SQL_ERROR if there are no more rows
int SQLFetch();
// * deprecated. Use SQLFetch instead.
// Position cursor on first row of the resultset and name it sResultSetName
// Call this before using SQLNextRow() and SQLGetData().
// returns: SQL_SUCCESS if result set is not empty
// SQL_ERROR is result set is empty
int SQLFirstRow();
// * deprecated. Use SQLFetch instead.
// Position cursor on next row of the result set sResultSetName
// returns: SQL_SUCCESS if cursor could be advanced to next row
// SQL_ERROR if there was no next row
int SQLNextRow();
// Return value of column iCol in the current row of result set sResultSetName
string SQLGetData(int iCol);
// Return a string value when given a location
string LocationToString(location lLocation);
// Return a location value when given the string form of the location
location StringToLocation(string sLocation);
// Return a string value when given a vector
string VectorToString(vector vVector);
// Return a vector value when given the string form of the vector
vector StringToVector(string sVector);
// Set oObject's persistent string variable sVarName to sValue
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
void SetPersistentString(object oObject, string sVarName, string sValue, int iExpiration=0, string sTable="pwdata");
// Set oObject's persistent integer variable sVarName to iValue
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
void SetPersistentInt(object oObject, string sVarName, int iValue, int iExpiration=0, string sTable="pwdata");
// Set oObject's persistent float variable sVarName to fValue
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
void SetPersistentFloat(object oObject, string sVarName, float fValue, int iExpiration=0, string sTable="pwdata");
// Set oObject's persistent location variable sVarName to lLocation
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
// This function converts location to a string for storage in the database.
void SetPersistentLocation(object oObject, string sVarName, location lLocation, int iExpiration=0, string sTable="pwdata");
// Set oObject's persistent vector variable sVarName to vVector
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
// This function converts vector to a string for storage in the database.
void SetPersistentVector(object oObject, string sVarName, vector vVector, int iExpiration=0, string sTable ="pwdata");
// Get oObject's persistent string variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: ""
string GetPersistentString(object oObject, string sVarName, string sTable="pwdata");
// Get oObject's persistent integer variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: 0
int GetPersistentInt(object oObject, string sVarName, string sTable="pwdata");
// Get oObject's persistent float variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: 0
float GetPersistentFloat(object oObject, string sVarName, string sTable="pwdata");
// Get oObject's persistent location variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: 0
location GetPersistentLocation(object oObject, string sVarname, string sTable="pwdata");
// Get oObject's persistent vector variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: 0
vector GetPersistentVector(object oObject, string sVarName, string sTable = "pwdata");
// Delete persistent variable sVarName stored on oObject
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
void DeletePersistentVariable(object oObject, string sVarName, string sTable="pwdata");
// (private function) Replace special character ' with ~
string SQLEncodeSpecialChars(string sString);
// (private function)Replace special character ' with ~
string SQLDecodeSpecialChars(string sString);
/************************************/
/* Implementation */
/************************************/
// Functions for initializing APS and working with result sets
void SQLInit()
{
int i;
// Placeholder for ODBC persistence
string sMemory;
for (i = 0; i < 8; i++) // reserve 8*128 bytes
sMemory += "................................................................................................................................";
SetLocalString(GetModule(), "NWNX!ODBC!SPACER", sMemory);
}
void SQLExecDirect(string sSQL)
{
SetLocalString(GetModule(), "NWNX!ODBC!EXEC", sSQL);
}
int SQLFetch()
{
string sRow;
object oModule = GetModule();
SetLocalString(oModule, "NWNX!ODBC!FETCH", GetLocalString(oModule, "NWNX!ODBC!SPACER"));
sRow = GetLocalString(oModule, "NWNX!ODBC!FETCH");
if (GetStringLength(sRow) > 0)
{
SetLocalString(oModule, "NWNX_ODBC_CurrentRow", sRow);
return SQL_SUCCESS;
}
else
{
SetLocalString(oModule, "NWNX_ODBC_CurrentRow", "");
return SQL_ERROR;
}
}
// deprecated. use SQLFetch().
int SQLFirstRow()
{
return SQLFetch();
}
// deprecated. use SQLFetch().
int SQLNextRow()
{
return SQLFetch();
}
string SQLGetData(int iCol)
{
int iPos;
string sResultSet = GetLocalString(GetModule(), "NWNX_ODBC_CurrentRow");
// find column in current row
int iCount = 0;
string sColValue = "";
iPos = FindSubString(sResultSet, "<22>");
if ((iPos == -1) && (iCol == 1))
{
// only one column, return value immediately
sColValue = sResultSet;
}
else if (iPos == -1)
{
// only one column but requested column > 1
sColValue = "";
}
else
{
// loop through columns until found
while (iCount != iCol)
{
iCount++;
if (iCount == iCol)
sColValue = GetStringLeft(sResultSet, iPos);
else
{
sResultSet = GetStringRight(sResultSet,GetStringLength(sResultSet) - iPos - 1);
iPos = FindSubString(sResultSet, "<22>");
}
// special case: last column in row
if (iPos == -1)
iPos = GetStringLength(sResultSet);
}
}
return sColValue;
}
// These functions deal with various data types. Ultimately, all information
// must be stored in the database as strings, and converted back to the proper
// form when retrieved.
string VectorToString(vector vVector)
{
return "#POSITION_X#" + FloatToString(vVector.x) + "#POSITION_Y#" + FloatToString(vVector.y) + "#POSITION_Z#" + FloatToString(vVector.z) + "#END#";
}
vector StringToVector(string sVector)
{
float fX, fY, fZ;
int iPos, iCount;
int iLen = GetStringLength(sVector);
if (iLen > 0)
{
iPos = FindSubString(sVector, "#POSITION_X#") + 12;
iCount = FindSubString(GetSubString(sVector, iPos, iLen - iPos), "#");
fX = StringToFloat(GetSubString(sVector, iPos, iCount));
iPos = FindSubString(sVector, "#POSITION_Y#") + 12;
iCount = FindSubString(GetSubString(sVector, iPos, iLen - iPos), "#");
fY = StringToFloat(GetSubString(sVector, iPos, iCount));
iPos = FindSubString(sVector, "#POSITION_Z#") + 12;
iCount = FindSubString(GetSubString(sVector, iPos, iLen - iPos), "#");
fZ = StringToFloat(GetSubString(sVector, iPos, iCount));
}
return Vector(fX, fY, fZ);
}
string LocationToString(location lLocation)
{
object oArea = GetAreaFromLocation(lLocation);
vector vPosition = GetPositionFromLocation(lLocation);
float fOrientation = GetFacingFromLocation(lLocation);
string sReturnValue;
if (GetIsObjectValid(oArea))
sReturnValue = "#AREA#" + GetTag(oArea) + "#POSITION_X#" + FloatToString(vPosition.x) + "#POSITION_Y#" + FloatToString(vPosition.y) + "#POSITION_Z#" + FloatToString(vPosition.z) + "#ORIENTATION#" + FloatToString(fOrientation) + "#END#";
return sReturnValue;
}
location StringToLocation(string sLocation)
{
location lReturnValue;
object oArea;
vector vPosition;
float fOrientation, fX, fY, fZ;
int iPos, iCount;
int iLen = GetStringLength(sLocation);
if (iLen > 0)
{
iPos = FindSubString(sLocation, "#AREA#") + 6;
iCount = FindSubString(GetSubString(sLocation, iPos, iLen - iPos), "#");
oArea = GetObjectByTag(GetSubString(sLocation, iPos, iCount));
iPos = FindSubString(sLocation, "#POSITION_X#") + 12;
iCount = FindSubString(GetSubString(sLocation, iPos, iLen - iPos), "#");
fX = StringToFloat(GetSubString(sLocation, iPos, iCount));
iPos = FindSubString(sLocation, "#POSITION_Y#") + 12;
iCount = FindSubString(GetSubString(sLocation, iPos, iLen - iPos), "#");
fY = StringToFloat(GetSubString(sLocation, iPos, iCount));
iPos = FindSubString(sLocation, "#POSITION_Z#") + 12;
iCount = FindSubString(GetSubString(sLocation, iPos, iLen - iPos), "#");
fZ = StringToFloat(GetSubString(sLocation, iPos, iCount));
vPosition = Vector(fX, fY, fZ);
iPos = FindSubString(sLocation, "#ORIENTATION#") + 13;
iCount = FindSubString(GetSubString(sLocation, iPos, iLen - iPos), "#");
fOrientation = StringToFloat(GetSubString(sLocation, iPos, iCount));
lReturnValue = Location(oArea, vPosition, fOrientation);
}
return lReturnValue;
}
// These functions are responsible for transporting the various data types back
// and forth to the database.
void SetPersistentString(object oObject, string sVarName, string sValue, int iExpiration=0, string sTable="pwdata")
{
string sPlayer;
string sTag;
if (GetIsPC(oObject))
{
sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oObject));
sTag = SQLEncodeSpecialChars(GetName(oObject));
}
else
{
sPlayer = "~";
sTag = GetTag(oObject);
}
sVarName = SQLEncodeSpecialChars(sVarName);
sValue = SQLEncodeSpecialChars(sValue);
string sSQL = "SELECT player FROM " + sTable + " WHERE player='" + sPlayer +
"' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SQLExecDirect(sSQL);
if (SQLFetch() == SQL_SUCCESS)
{
// row exists
sSQL = "UPDATE " + sTable + " SET val='" + sValue +
"',expire=" + IntToString(iExpiration) + " WHERE player='"+ sPlayer +
"' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SQLExecDirect(sSQL);
}
else
{
// row doesn't exist
sSQL = "INSERT INTO " + sTable + " (player,tag,name,val,expire) VALUES" +
"('" + sPlayer + "','" + sTag + "','" + sVarName + "','" +
sValue + "'," + IntToString(iExpiration) + ")";
SQLExecDirect(sSQL);
}
}
string GetPersistentString(object oObject, string sVarName, string sTable="pwdata")
{
string sPlayer;
string sTag;
if (GetIsPC(oObject))
{
sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oObject));
sTag = SQLEncodeSpecialChars(GetName(oObject));
}
else
{
sPlayer = "~";
sTag = GetTag(oObject);
}
sVarName = SQLEncodeSpecialChars(sVarName);
string sSQL = "SELECT val FROM " + sTable + " WHERE player='" + sPlayer +
"' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SQLExecDirect(sSQL);
if (SQLFetch() == SQL_SUCCESS)
return SQLDecodeSpecialChars(SQLGetData(1));
else
{
return "";
// If you want to convert your existing persistent data to APS, this
// would be the place to do it. The requested variable was not found
// in the database, you should
// 1) query it's value using your existing persistence functions
// 2) save the value to the database using SetPersistentString()
// 3) return the string value here.
}
}
void SetPersistentInt(object oObject, string sVarName, int iValue, int iExpiration=0, string sTable="pwdata")
{
SetPersistentString(oObject, sVarName, IntToString(iValue), iExpiration, sTable);
}
int GetPersistentInt(object oObject, string sVarName, string sTable="pwdata")
{
return StringToInt(GetPersistentString(oObject, sVarName, sTable));
}
void SetPersistentFloat(object oObject, string sVarName, float fValue, int iExpiration=0, string sTable="pwdata")
{
SetPersistentString(oObject, sVarName, FloatToString(fValue), iExpiration, sTable);
}
float GetPersistentFloat(object oObject, string sVarName, string sTable="pwdata")
{
return StringToFloat(GetPersistentString(oObject, sVarName, sTable));
}
void SetPersistentLocation(object oObject, string sVarName, location lLocation, int iExpiration=0, string sTable="pwdata")
{
SetPersistentString(oObject, sVarName, LocationToString(lLocation), iExpiration, sTable);
}
location GetPersistentLocation(object oObject, string sVarName, string sTable="pwdata")
{
return StringToLocation(GetPersistentString(oObject, sVarName, sTable));
}
void SetPersistentVector(object oObject, string sVarName, vector vVector, int iExpiration=0, string sTable ="pwdata")
{
SetPersistentString(oObject, sVarName, VectorToString(vVector), iExpiration, sTable);
}
vector GetPersistentVector(object oObject, string sVarName, string sTable = "pwdata")
{
return StringToVector(GetPersistentString(oObject, sVarName, sTable));
}
void DeletePersistentVariable(object oObject, string sVarName, string sTable="pwdata")
{
string sPlayer;
string sTag;
if (GetIsPC(oObject))
{
sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oObject));
sTag = SQLEncodeSpecialChars(GetName(oObject));
}
else
{
sPlayer = "~";
sTag = GetTag(oObject);
}
sVarName = SQLEncodeSpecialChars(sVarName);
string sSQL = "DELETE FROM " + sTable + " WHERE player='" + sPlayer +
"' AND tag='" + sTag + "' AND name='" + sVarName + "'";
SQLExecDirect(sSQL);
}
// Problems can arise with SQL commands if variables or values have single quotes
// in their names. These functions are a replace these quote with the tilde character
string SQLEncodeSpecialChars(string sString)
{
if (FindSubString(sString, "'") == -1) // not found
return sString;
int i;
string sReturn = "";
string sChar;
// Loop over every character and replace special characters
for (i = 0; i < GetStringLength(sString); i++)
{
sChar = GetSubString(sString, i, 1);
if (sChar == "'")
sReturn += "~";
else
sReturn += sChar;
}
return sReturn;
}
string SQLDecodeSpecialChars(string sString)
{
if (FindSubString(sString, "~") == -1) // not found
return sString;
int i;
string sReturn = "";
string sChar;
// Loop over every character and replace special characters
for (i = 0; i < GetStringLength(sString); i++)
{
sChar = GetSubString(sString, i, 1);
if (sChar == "~")
sReturn += "'";
else
sReturn += sChar;
}
return sReturn;
}

View File

@@ -0,0 +1,145 @@
//::///////////////////////////////////////////////
//:: Name: areahandler_inc
//:://////////////////////////////////////////////
/*
This includefile contains all the nessesary
functions to set up and loop through all areas
that has a placable item in them that has a tag
value of your choice. The placable is destroyed
when InitializeAreaList is called.
InitializeArea - Call this only from OnModuleLoad.
GetFirstArea - Returns the first area from the modlues arealist.
GetNextArea - Returns the next area from the modlues arealist.
GetAreaByIndex - Returns the specified area in the modules arealist.
GetAreaLocationByIndex - Returns the location of the area designator in the area.
*/
//:://////////////////////////////////////////////
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:: Updated By: Flash
//:: Updated On: 05-mar-2005
//:: Update: Save the location of the designator and added GetAreaLocationByIndex.
//:: Store Locations only, use Location.area to get area.
//:://////////////////////////////////////////////
string MOD_AREA_DESIGNATOR_TAG = "area_designator";
const string MOD_AREA_LIST_LOC = "MOD_AREA_LOC_";
const string MOD_AREA_LIST_COUNT = "MOD_AREA_COUNT";
const string MOD_AREA_LIST_POINTER = "MOD_AREA_LIST_POINTER";
//::///////////////////////////////////////////////
//:: Name: InitializeAreaList
//:://////////////////////////////////////////////
/*
Initialize the modules list of areas. This will
delete all placeables with the tag value defined
in AREA_DESIGNATOR_TAG. Add a placable with the
defined value in all areas you want to be able
to have in the list.
Call this function only from OnModuleLoad.
*/
//:://////////////////////////////////////////////
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
void InitializeAreaList()
{
int i = 0;
object oDesignator = GetObjectByTag(MOD_AREA_DESIGNATOR_TAG, i);
location lArea;
while (GetIsObjectValid(oDesignator))
{
lArea = GetLocation(oDesignator);
SetLocalLocation(GetModule(), MOD_AREA_LIST_LOC+IntToString(i), lArea);
DestroyObject(oDesignator);
oDesignator = GetObjectByTag(MOD_AREA_DESIGNATOR_TAG, ++i);
}
SetLocalInt(GetModule(), MOD_AREA_LIST_COUNT, --i);
}
//::///////////////////////////////////////////////
//:: Name: GetAreaByIndex
//:://////////////////////////////////////////////
/*
Returns the specified area in the modules arealist.
This function does not update the area pointer.
Returns OBJECT_INVALID on error.
*/
//:://////////////////////////////////////////////
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
object GetAreaByIndex(int iAreaIndex)
{
return GetAreaFromLocation(GetLocalLocation(GetModule(), MOD_AREA_LIST_LOC + IntToString(iAreaIndex)));
}
//::///////////////////////////////////////////////
//:: Name: GetAreaLocationByIndex
//:://////////////////////////////////////////////
/*
Returns the specified location of the area designator in the modules arealist.
*/
//:://////////////////////////////////////////////
//:: Created By: Flash
//:: Created On: 05-mar-2005
//:://////////////////////////////////////////////
location GetAreaLocationByIndex(int iAreaIndex)
{
return GetLocalLocation(GetModule(), MOD_AREA_LIST_LOC + IntToString(iAreaIndex));;
}
//::///////////////////////////////////////////////
//:: Name: GetFirstArea
//:://////////////////////////////////////////////
/*
Returns the first area in the modules arealist.
Returns OBJECT_INVALID on error.
*/
//:://////////////////////////////////////////////
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
object GetFirstArea()
{
SetLocalInt(GetModule(), MOD_AREA_LIST_POINTER, 0);
return GetAreaByIndex(0);
}
//::///////////////////////////////////////////////
//:: Name: GetNextArea
//:://////////////////////////////////////////////
/*
Returns the next area in the modules arealist
Returns OBJECT_INVALID on error.
*/
//:://////////////////////////////////////////////
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
object GetNextArea()
{
int i = GetLocalInt(GetModule(), MOD_AREA_LIST_POINTER);
object oArea = GetAreaByIndex(i);
if(GetIsObjectValid(oArea))
SetLocalInt(GetModule(), MOD_AREA_LIST_POINTER, ++i);
return oArea;
}
//::///////////////////////////////////////////////
//:: Name: GetAreaCount
//:://////////////////////////////////////////////
/*
Returns the number of areas in the list
*/
//:://////////////////////////////////////////////
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
int GetAreaCount()
{
return GetLocalInt(GetModule(), MOD_AREA_LIST_COUNT);
}

View File

@@ -0,0 +1,21 @@
//::///////////////////////////////////////////////
//:: Name: areascan_cond_0
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
int StartingConditional()
{
string sMyString = "Area Scanner not setup correctly.";
if(GetLocalInt(oListOwner, AREASCANNER_SETUP_OK))
{
sMyString = "There are currently " +
IntToString(GetLocalInt(oListOwner, AREASCANNER_AREA_COUNT)) +
" areas with potential overfarming.";
}
SetCustomToken(AREASCANNER_START_CUSTOM_TOKEN, sMyString);
return TRUE;
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_cond_1
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
int StartingConditional()
{
int iIndex = 1;
return SetupMenu(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_cond_2
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
int StartingConditional()
{
int iIndex = 2;
return SetupMenu(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_cond_3
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
int StartingConditional()
{
int iIndex = 3;
return SetupMenu(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_cond_4
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
int StartingConditional()
{
int iIndex = 4;
return SetupMenu(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_cond_5
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
int StartingConditional()
{
int iIndex = 5;
return SetupMenu(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_cond_6
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
int StartingConditional()
{
int iIndex = 6;
return SetupMenu(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_cond_7
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
int StartingConditional()
{
int iIndex = 7;
return SetupMenu(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_cond_8
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
int StartingConditional()
{
int iIndex = 8;
return SetupMenu(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_cond_9
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
int StartingConditional()
{
int iIndex = 9;
return SetupMenu(iIndex);
}

View File

@@ -0,0 +1,22 @@
//::///////////////////////////////////////////////
//:: Name: areascan_def
//:://////////////////////////////////////////////
/*
Contains constant and variable declarations
*/
//:://////////////////////////////////////////////
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:: Updated By: Flash
//:: Updated On: 05-mar-2005
//:: Update: Added ARESCANNER_AREA_LOC so every are in list will have one known location
//:://////////////////////////////////////////////
int AREASCANNER_START_CUSTOM_TOKEN = 99000; // Token ID in conversation
const string AREASCANNER_AREA_LOC = "oAreaScannerAreaLoc";
const string AREASCANNER_SPAWNS_IN_AREA = "iAreaScannerSpawnsInArea";
const string AREASCANNER_AREA_COUNT = "iAreaScannerOverfarmedAreas";
const string AREASCANNER_SETUP_OK = "iAreaScannerSetupOK";
const int AREASCANNER_MAX_AREAS = 8;
const int AREASCANNER_MAX_SPAWNS_IN_AREAS = 8;
object oListOwner = GetLastSpeaker();
int iCurrentListSize = 0;

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_do_1
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
void main()
{
int iIndex = 1;
DoMenuCommand(iIndex);
}

View File

@@ -0,0 +1,11 @@
//::///////////////////////////////////////////////
//:: Name: areascan_do_10
//:: Created By: Flash
//:: Created On: 06-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
void main()
{
CleanupAreaScanner();
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_do_2
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
void main()
{
int iIndex = 2;
DoMenuCommand(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_do_3
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
void main()
{
int iIndex = 3;
DoMenuCommand(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_do_4
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
void main()
{
int iIndex = 4;
DoMenuCommand(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_do_5
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
void main()
{
int iIndex = 5;
DoMenuCommand(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_do_6
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
void main()
{
int iIndex = 6;
DoMenuCommand(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_do_7
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
void main()
{
int iIndex = 7;
DoMenuCommand(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_do_8
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
void main()
{
int iIndex = 8;
DoMenuCommand(iIndex);
}

View File

@@ -0,0 +1,12 @@
//::///////////////////////////////////////////////
//:: Name: areascan_do_9
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "areascan_inc"
void main()
{
int iIndex = 9;
DoMenuCommand(iIndex);
}

View File

@@ -0,0 +1,282 @@
//::///////////////////////////////////////////////
//:: Name: areascan_inc
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Includefile for managing the area scanner
Use together with the conversation "areascanner"
*/
//:://////////////////////////////////////////////
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
#include "lod_include"
#include "areahandler_inc"
#include "areascan_def"
void CleanupAreaScanner();
//::///////////////////////////////////////////////
//:: Name: GetASAreaByIndex
//:: Created By: Flash
//:: Created On: 05-mar-2005
//:://////////////////////////////////////////////
object GetASAreaByIndex(int iIndex)
{
return GetAreaFromLocation(GetLocalLocation(oListOwner, AREASCANNER_AREA_LOC + IntToString(iIndex)));
}
//::///////////////////////////////////////////////
//:: Name: SetASLocationByIndex
//:: Created By: Flash
//:: Created On: 06-mar-2005
//:://////////////////////////////////////////////
void SetASLocationByIndex(int iIndex, location lInsertLocation)
{
SetLocalLocation(oListOwner, AREASCANNER_AREA_LOC + IntToString(iIndex), lInsertLocation);
}
//::///////////////////////////////////////////////
//:: Name: GetASLocationByIndex
//:: Created By: Flash
//:: Created On: 05-mar-2005
//:://////////////////////////////////////////////
location GetASLocationByIndex(int iIndex)
{
return GetLocalLocation(oListOwner, AREASCANNER_AREA_LOC + IntToString(iIndex));
}
//::///////////////////////////////////////////////
//:: Name: SetASSpawnsInAreaByIndex
//:: Created By: Flash
//:: Created On: 06-mar-2005
//:://////////////////////////////////////////////
void SetASSpawnsInAreaByIndex(int iIndex, int iInsertSpawns)
{
SetLocalInt(oListOwner, AREASCANNER_SPAWNS_IN_AREA + IntToString(iIndex), iInsertSpawns);
}
//::///////////////////////////////////////////////
//:: Name: GetASSpawnsInAreaByIndex
//:: Created By: Flash
//:: Created On: 05-mar-2005
//:://////////////////////////////////////////////
int GetASSpawnsInAreaByIndex(int iIndex)
{
return GetLocalInt(oListOwner, AREASCANNER_SPAWNS_IN_AREA + IntToString(iIndex));
}
//::///////////////////////////////////////////////
//:: Name: DoMenuCommand
//:: Created By: Flash
//:: Created On: 05-mar-2005
//:://////////////////////////////////////////////
void DoMenuCommand(int iMenuChoise)
{
location lArea = GetASLocationByIndex(iMenuChoise -1); // Menues start at 1, lists at 0
CleanupAreaScanner();
AssignCommand(oListOwner, ActionJumpToLocation(lArea));
}
//::///////////////////////////////////////////////
//:: Name: SetupMenu
//:: Created By: Flash
//:: Created On: 05-mar-2005
//:://////////////////////////////////////////////
int SetupMenu(int iIndex)
{
int bReturn = FALSE;
string sMyString = "";
object oArea = GetASAreaByIndex(iIndex - 1); // Menues starts at 1 list at 0.
int iSpawns = GetASSpawnsInAreaByIndex(iIndex - 1); // Menues starts at 1 list at 0.
if(GetLocalInt(oListOwner, AREASCANNER_SETUP_OK) && GetIsObjectValid(oArea))
{
sMyString = GetName(oArea) + " has : " + IntToString(iSpawns) + " spawns";
SetCustomToken(AREASCANNER_START_CUSTOM_TOKEN + iIndex, sMyString);
bReturn = TRUE;
}
return bReturn;
}
//::///////////////////////////////////////////////
//:: Name: GetNumberOfSpawnsInArea
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
int GetNumberOfSpawnsInArea(object oArea)
{
int iNumberOfSpawns = 0;
object oObject = GetFirstObjectInArea(oArea);
while (GetIsObjectValid(oObject))
{
if (GetIsEncounterCreature(oObject))
iNumberOfSpawns++;
oObject = GetNextObjectInArea(oArea);
}
return iNumberOfSpawns;
}
//::///////////////////////////////////////////////
//:: Name: InsertASBefore
//:: Created By: Flash
//:: Created On: 06-mar-2005
//:: Makes room in the list and inserts found location and # of spawns
//:://////////////////////////////////////////////
void InsertASBefore(int iInsertPosition, location lInsertLocation, int iInsertSpawns)
{
location lTempLoc;
int iTempSpawns;
int i;
for(i = iCurrentListSize; i >= iInsertPosition; i--)
{
lTempLoc = GetASLocationByIndex(i);
iTempSpawns = GetASSpawnsInAreaByIndex(i);
if(i < AREASCANNER_MAX_AREAS)
{
SetASLocationByIndex(i + 1, lTempLoc);
SetASSpawnsInAreaByIndex(i + 1, iTempSpawns);
}
}
SetASLocationByIndex(iInsertPosition, lInsertLocation);
SetASSpawnsInAreaByIndex(iInsertPosition, iInsertSpawns);
iCurrentListSize = (iCurrentListSize < AREASCANNER_MAX_AREAS) ? iCurrentListSize + 1 : AREASCANNER_MAX_AREAS;
}
//::///////////////////////////////////////////////
//:: Name: AddAreaToList
//:: Created By: Flash
//:: Created On: 06-mar-2005
//:: Finds out where in the list the areas should be inserted
//:://////////////////////////////////////////////
void AddAreaToASList(location lInserLocation, int iInsertSpawns)
{
int bInserted = FALSE;
int i;
for(i = 0; ((i <= AREASCANNER_MAX_AREAS) && (i <= iCurrentListSize) && !bInserted); i++)
{
if(iInsertSpawns > GetASSpawnsInAreaByIndex(i))
{
InsertASBefore(i, lInserLocation, iInsertSpawns);
bInserted = TRUE;
}
}
}
//::///////////////////////////////////////////////
//:: Name: ScanAreasForOverfarming
//:: Created By: Flash
//:: Created On: 06-mar-2005
//:://////////////////////////////////////////////
void ScanAreasForOverfarming()
{
int i;
int iNumberOfOverfarmedAreas = 0;
int iSpawns;
location lArea;
for(i = 0; i <= GetAreaCount(); i++)
{
lArea = GetAreaLocationByIndex(i);
iSpawns = GetNumberOfSpawnsInArea(GetAreaFromLocation(lArea));
if(iSpawns > AREASCANNER_MAX_SPAWNS_IN_AREAS)
{
AddAreaToASList(lArea, iSpawns);
iNumberOfOverfarmedAreas++;
}
}
SetLocalInt(oListOwner, AREASCANNER_AREA_COUNT, iNumberOfOverfarmedAreas);
}
//::///////////////////////////////////////////////
//:: Name: SearchAndDestroy
//:: Created By: Flash
//:: Created On: 14-mar-2005
//:://////////////////////////////////////////////
void SearchAndDestroy()
{
int i, iDestroyedSpawns, iSpawns;
object oArea, oObject;
for(i = 0; i <= GetAreaCount(); i++)
{
oArea = GetAreaByIndex(i);
iSpawns = GetNumberOfSpawnsInArea(oArea);
if(iSpawns > AREASCANNER_MAX_SPAWNS_IN_AREAS)
{
iDestroyedSpawns = 0;
oObject = GetFirstObjectInArea(oArea);
SendMessageToAllDMs(GetName(oArea) + " has too many spawns.");
while (GetIsObjectValid(oObject))
{
if (GetIsPC(oObject)) SendMessageToAllDMs(GetName(oObject));
if (GetIsEncounterCreature(oObject) && !IsLoDBoss(oObject) && (iDestroyedSpawns < iSpawns - AREASCANNER_MAX_SPAWNS_IN_AREAS))
{
DestroyObject(oObject);
iDestroyedSpawns++;
}
oObject = GetNextObjectInArea(oArea);
}
SendMessageToAllDMs(IntToString(iDestroyedSpawns) + " spawns destroyed.");
}
}
}
//::///////////////////////////////////////////////
//:: Name: CleanupAreaScanner
//:://////////////////////////////////////////////
/*
Deletes all local variables on oListOwner
*/
//:://////////////////////////////////////////////
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
void CleanupAreaScanner()
{
int i;
for(i = 0; i <= AREASCANNER_MAX_AREAS; i++)
{
DeleteLocalLocation(oListOwner, AREASCANNER_AREA_LOC + IntToString(i));
DeleteLocalInt(oListOwner, AREASCANNER_SPAWNS_IN_AREA+ IntToString(i));
}
DeleteLocalInt(oListOwner, AREASCANNER_AREA_COUNT);
DeleteLocalInt(oListOwner, AREASCANNER_SETUP_OK);
iCurrentListSize = 0;
}
//::///////////////////////////////////////////////
//:: Name: SetupAreaScanner
//:://////////////////////////////////////////////
/*
Called from script defined in modules OnActivateItem
wich should also activate the conversation "areascanner".
*/
//:://////////////////////////////////////////////
//:: Created By: Flash
//:: Created On: 02-mar-2005
//:://////////////////////////////////////////////
int SetupAreaScanner(object oSpeaker)
{
int bSetupOK = FALSE;
oListOwner = oSpeaker;
object oArea = GetFirstArea();
if(GetIsObjectValid(oArea))
{
ScanAreasForOverfarming();
bSetupOK = TRUE;
}
SetLocalInt(oListOwner, AREASCANNER_SETUP_OK, bSetupOK);
return bSetupOK;
}

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

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

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

@@ -0,0 +1,17 @@
//::///////////////////////////////////////////////
//:: FileName at_002
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 1/25/2003 8:15:37 PM
//:://////////////////////////////////////////////
void main()
{
// Either open the store with that tag or let the user know that no store exists.
object oStore = GetNearestObjectByTag("MERCHANTOldManGroknar");
if(GetObjectType(oStore) == OBJECT_TYPE_STORE)
OpenStore(oStore, GetPCSpeaker());
else
ActionSpeakStringByStrRef(53090, TALKVOLUME_TALK);
}

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,62 @@
void main()
{
object oAtog = OBJECT_SELF;
location lAtog = GetLocation(OBJECT_SELF);
object oMod = GetModule();
int iDeath = GetLocalInt(oMod,"Atog_Death");
int iNum, i;
object oBag;
switch (iDeath)
{
case 0 : SpeakString("I will RETURN !");
SetLocalInt(oMod,"Atog_Death",1);
for (i = 0; i<2 ;i++)
{
CreateObject(OBJECT_TYPE_CREATURE,"atogtheplanar",lAtog,TRUE);
}
break;
case 1 : iNum = GetLocalInt(oMod,"Atog_Death_Num");
if (!iNum)
{
iNum ++;
SetLocalInt(oMod,"Atog_Death_Num",iNum);
}
else
{
DeleteLocalInt(oMod,"Atog_Death_Num");
SetLocalInt(oMod,"Atog_Death",2);
for (i = 0; i<4 ;i++)
{
CreateObject(OBJECT_TYPE_CREATURE,"atogtheplanar",lAtog,TRUE);
}
}
SpeakString("I will RETURN !");
break;
case 2 : iNum = GetLocalInt(oMod,"Atog_Death_Num");
if(iNum >= 3)
{
DeleteLocalInt(oMod,"Atog_Death_Num");
// DeleteLocalInt(oMod,"Atog_Death");
SpeakString("Noooo Atog can't be defeated !!! Aaarrghh ...");
CreateObject(OBJECT_TYPE_PLACEABLE,"sol_1",lAtog);
oBag = CreateObject(OBJECT_TYPE_PLACEABLE,"divinereward",lAtog);
CreateItemOnObject("planarphaser",oBag);
CreateItemOnObject("atogskin",oBag);
CreateItemOnObject("banktoken1000000",oBag);
CreateItemOnObject("banktoken1000000",oBag);
CreateItemOnObject("banktoken1000000",oBag);
ExecuteScript("x2_def_ondeath", OBJECT_SELF);
}
else
{
iNum ++;
SetLocalInt(oMod,"Atog_Death_Num",iNum);
}
break;
default : DeleteLocalInt(oMod,"Atog_Death");
break;
}
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), oAtog);
}

View File

@@ -0,0 +1,35 @@
////////////////////////////////
// Respawning Treasure Script
// By Tolerance0
// Medium Treasure Respawn
///////////////////////////////
#include "NW_o2_CONINCLUDE"
void main()
{
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
{
return;
}
object oLastOpener = GetLastOpener();
GenerateMediumTreasure(oLastOpener, OBJECT_SELF);
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1);
if(GetLocalInt(OBJECT_SELF, "NW_DO_ONCE") == 1)
{
object oPlayer = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,
PLAYER_CHAR_IS_PC);
if(oPlayer == oLastOpener)
{
return;
}
ActionWait(10.0);
GenerateMediumTreasure(oLastOpener, OBJECT_SELF);
}
return;
}
//End Respawning Treasure Script

View File

@@ -0,0 +1,9 @@
//simple autoclose and relock script, as u can read :)
// Zeb
void main()
{
DelayCommand(2.0, ActionCloseDoor(OBJECT_SELF));
DelayCommand(3.0, SetLocked(OBJECT_SELF, TRUE));
}

View File

@@ -0,0 +1,9 @@
void main()
{
ActionCloseDoor(OBJECT_SELF);
object oTarget;
oTarget = OBJECT_SELF;
SetLocked(oTarget, TRUE);
}

View File

@@ -0,0 +1,4 @@
void main()
{
DelayCommand(2.0, ActionCloseDoor(OBJECT_SELF));
}

5
_module/nss/autolock.nss Normal file
View File

@@ -0,0 +1,5 @@
void main()
{
DelayCommand(5.0 , ActionCloseDoor(OBJECT_SELF));
SetLocked(OBJECT_SELF, TRUE);
}

View File

@@ -0,0 +1,9 @@
int StartingConditional()
{
object oWise = GetObjectByTag("ba2_numgive");
if(!(GetLocalInt(oWise, "Sattuma") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,8 @@
int StartingConditional()
{
object oWise = GetObjectByTag("ba2_numgive");
if(!(GetLocalInt(oWise, "Sattuma") == 2))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,8 @@
int StartingConditional()
{
object oWise = GetObjectByTag("ba2_numgive");
if(!(GetLocalInt(oWise, "Sattuma") == 3))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,8 @@
int StartingConditional()
{
object oWise = GetObjectByTag("ba2_numgive");
if(!(GetLocalInt(oWise, "Sattuma") == 4))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,8 @@
int StartingConditional()
{
object oWise = GetObjectByTag("ba2_numgive");
if(!(GetLocalInt(oWise, "Sattuma") == 5))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,93 @@
void main()
{
object oChaosPC = GetLastUsedBy();
object oChaosDevise = GetObjectByTag("ba2_chaosdivice");
object oChaosPortal = GetObjectByTag("ba2_sladbtt");
object oChaosDragon = GetObjectByTag("ba2_drchainv");
effect eChaosBreath = EffectVisualEffect(494);
effect eChaosBad = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE);
location lChaosEffects = GetLocation(GetWaypointByTag("ba2_cdargonsbrtar"));
int nChaosUse = GetLocalInt(oChaosPC, "ba2_actlevxtimes");
int nChaosTag;
string sChaosTag = GetTag(OBJECT_SELF);
if(sChaosTag == "ba2_leverchaos1")
{
nChaosTag = 1;
}
else if(sChaosTag == "ba2_leverchaos2")
{
nChaosTag = 2;
}
else if(sChaosTag == "ba2_leverchaos3")
{
nChaosTag = 3;
}
else if(sChaosTag == "ba2_leverchaos4")
{
nChaosTag = 4;
}
else if(sChaosTag == "ba2_leverchaos5")
{
nChaosTag = 5;
}
else if(sChaosTag == "ba2_leverchaos6")
{
nChaosTag = 6;
}
else if(sChaosTag == "ba2_leverchaos7")
{
nChaosTag = 7;
}
else if(sChaosTag == "ba2_leverchaos8")
{
nChaosTag = 8;
}
else
{
nChaosTag = d8();
}
int nChaosRoll = GetLocalInt(oChaosDevise, "DRoll");
int nSpawnRoll = d8();
if(GetLocalInt(oChaosDevise, "Activate") == 1)
{
if(!GetLocalInt(OBJECT_SELF, "TURNED"))
{
if(nChaosUse < 2)
{
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
SetLocalInt(OBJECT_SELF, "X2_L_PLC_ACTIVATED_STATE", TRUE);
SetLocalInt(OBJECT_SELF, "TURNED", TRUE);
nChaosUse = nChaosUse + 1;
SetLocalInt(oChaosPC, "ba2_actlevxtimes", nChaosUse);
if(nChaosTag == nChaosRoll)
{
SetLocalInt(oChaosPortal, "CanGo", TRUE);
AssignCommand(oChaosDragon, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eChaosBreath, lChaosEffects));
AssignCommand(oChaosDragon, ActionSpeakString("Go if you wish...", TALKVOLUME_TALK));
}
else
{
if(nSpawnRoll > 5)
{
CreateObject(OBJECT_TYPE_CREATURE, "ba2_biochh", lChaosEffects, TRUE);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eChaosBad, lChaosEffects);
}
else if(nSpawnRoll == 5 || nSpawnRoll == 4)
{
CreateObject(OBJECT_TYPE_CREATURE, "ba2_azerfwi", lChaosEffects, TRUE);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eChaosBad, lChaosEffects);
}
else
{
CreateObject(OBJECT_TYPE_CREATURE, "ba2_azermfi", lChaosEffects, TRUE);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eChaosBad, lChaosEffects);
}
}
}
else
{
SpeakString("You have tried alredy twice and failed. Begone!", TALKVOLUME_TALK);
}
}
}
}

View File

@@ -0,0 +1,43 @@
void main()
{
object oBall1 = GetObjectByTag("ba2_chaosball1");
object oBall2 = GetObjectByTag("ba2_chaosball2");
object oBall3 = GetObjectByTag("ba2_chaosball3");
object oBall4 = GetObjectByTag("ba2_chaosball4");
effect eBallvis = EffectVisualEffect(VFX_IMP_KNOCK);
SetLocalInt(GetObjectByTag("ba2_chaosdivice"), "Activate", 1);
int nChaos1 = d4(1);
float fChaos1 = IntToFloat(nChaos1);
DelayCommand(fChaos1, AssignCommand(oBall1, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
DelayCommand(fChaos1, SetLocalInt(oBall1, "X2_L_PLC_ACTIVATED_STATE", TRUE));
DelayCommand(fChaos1, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBallvis, oBall1));
int nChaos2 = d4(1);
while(nChaos2 == nChaos1) {nChaos2 = d4(1);}
float fChaos2 = IntToFloat(nChaos2);
DelayCommand(fChaos2, AssignCommand(oBall2, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
DelayCommand(fChaos2, SetLocalInt(oBall2, "X2_L_PLC_ACTIVATED_STATE", TRUE));
DelayCommand(fChaos2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBallvis, oBall2));
int nChaos3 = d4(1);
while(nChaos3 == nChaos1 || nChaos3 == nChaos2) {nChaos3 = d4(1);}
float fChaos3 = IntToFloat(nChaos3);
DelayCommand(fChaos3, AssignCommand(oBall3, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
DelayCommand(fChaos3, SetLocalInt(oBall3, "X2_L_PLC_ACTIVATED_STATE", TRUE));
DelayCommand(fChaos3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBallvis, oBall3));
int nChaos4 = d4(1);
while(nChaos4 == nChaos1 || nChaos4 == nChaos2 || nChaos4 == nChaos3) {nChaos4 = d4(1);}
float fChaos4 = IntToFloat(nChaos4);
DelayCommand(fChaos4, AssignCommand(oBall4, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
DelayCommand(fChaos4, SetLocalInt(oBall4, "X2_L_PLC_ACTIVATED_STATE", TRUE));
DelayCommand(fChaos4, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBallvis, oBall4));
int nDRoll = d8(1);
SetLocalInt(OBJECT_SELF, "DRoll", nDRoll);
}

View File

@@ -0,0 +1,16 @@
void main()
{
if(GetGold(OBJECT_SELF) > 0)
{
object oDoor = GetObjectByTag("ba2_desdoor");
effect eBeam = EffectBeam(VFX_BEAM_ODD, OBJECT_SELF, FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HOLY_AID, FALSE), OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam, oDoor, 2.0);
DestroyObject(GetInventoryDisturbItem(), 0.0);
DelayCommand(1.0, DestroyObject(oDoor, 0.0));
}
}

View File

@@ -0,0 +1,4 @@
void main()
{
ActionCastSpellAtObject(SPELL_MESTILS_ACID_SHEATH, OBJECT_SELF, METAMAGIC_EXTEND, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}

View File

@@ -0,0 +1,4 @@
void main()
{
AssignCommand(OBJECT_SELF, ActionStartConversation(GetLastUsedBy(), "ba2_c_chaosde", FALSE, FALSE));
}

View File

@@ -0,0 +1,8 @@
int StartingConditional()
{
object oDevice = GetObjectByTag("ba2_chaosdivice");
if(!(GetLocalInt(oDevice, "Activate") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,30 @@
//::///////////////////////////////////////////////
//:: Name x2_def_ondamage
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Default OnDamaged script
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: June 11/03
//:://////////////////////////////////////////////
void main()
{
int iRoll = Random(100) +1;
object oDamager = GetLastDamager(OBJECT_SELF);
if(iRoll >= 95)
{
if(GetTag(OBJECT_SELF) == "ba2_dagotph3")
{
ActionCastSpellAtObject(SPELL_BLADE_BARRIER, oDamager, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
ActionCastSpellAtObject(SPELL_WORD_OF_FAITH, oDamager, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
else
{
ActionCastSpellAtObject(SPELL_BLADE_BARRIER, oDamager, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}
ExecuteScript("nw_c2_default6", OBJECT_SELF);
}

View File

@@ -0,0 +1,42 @@
void main()
{
object oBall1 = GetObjectByTag("ba2_chaosball1");
object oBall2 = GetObjectByTag("ba2_chaosball2");
object oBall3 = GetObjectByTag("ba2_chaosball3");
object oBall4 = GetObjectByTag("ba2_chaosball4");
effect eBallvis = EffectVisualEffect(VFX_IMP_DESTRUCTION);
SetLocalInt(GetObjectByTag("ba2_chaosdivice"), "Activate", 0);
int nChaos1 = d4(1);
float fChaos1 = IntToFloat(nChaos1);
DelayCommand(fChaos1, AssignCommand(oBall1, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
DelayCommand(fChaos1, SetLocalInt(oBall1, "X2_L_PLC_ACTIVATED_STATE", FALSE));
DelayCommand(fChaos1, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBallvis, oBall1));
int nChaos2 = d4(1);
while(nChaos2 == nChaos1) {nChaos2 = d4(1);}
float fChaos2 = IntToFloat(nChaos2);
DelayCommand(fChaos2, AssignCommand(oBall2, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
DelayCommand(fChaos2, SetLocalInt(oBall2, "X2_L_PLC_ACTIVATED_STATE", FALSE));
DelayCommand(fChaos2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBallvis, oBall2));
int nChaos3 = d4(1);
while(nChaos3 == nChaos1 || nChaos3 == nChaos2) {nChaos3 = d4(1);}
float fChaos3 = IntToFloat(nChaos3);
DelayCommand(fChaos3, AssignCommand(oBall3, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
DelayCommand(fChaos3, SetLocalInt(oBall3, "X2_L_PLC_ACTIVATED_STATE", FALSE));
DelayCommand(fChaos3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBallvis, oBall3));
int nChaos4 = d4(1);
while(nChaos4 == nChaos1 || nChaos4 == nChaos2 || nChaos4 == nChaos3) {nChaos4 = d4(1);}
float fChaos4 = IntToFloat(nChaos4);
DelayCommand(fChaos4, AssignCommand(oBall4, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
DelayCommand(fChaos4, SetLocalInt(oBall4, "X2_L_PLC_ACTIVATED_STATE", FALSE));
DelayCommand(fChaos4, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBallvis, oBall4));
DeleteLocalInt(OBJECT_SELF, "DRoll");
}

View File

@@ -0,0 +1,25 @@
void main()
{
if(GetTag(GetArea(OBJECT_SELF)) == "ba2_reislad")
{
object oPedestal = GetObjectByTag("ba2_slaprice");
object oDead = GetLastDamager(OBJECT_SELF);
effect eDing = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
SetPlotFlag(oPedestal, 0);
SetLocalInt(oPedestal, "DEATH", 1);
SpeakString("Curse you! You will die with me!");
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDead);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDing, oPedestal);
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDing, oPedestal));
DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDing, oPedestal));
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDing, oPedestal));
}
}

View File

@@ -0,0 +1,15 @@
void main()
{
if(GetCurrentHitPoints(OBJECT_SELF) > 570)
{
ClearAllActions(TRUE);
SpeakString("Ahh... The Suffering is over.", TALKVOLUME_TALK);
SetImmortal(OBJECT_SELF, FALSE);
effect eDeath = EffectDeath(TRUE, TRUE);
DelayCommand(1.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDeath, OBJECT_SELF));
}
}

View File

@@ -0,0 +1,16 @@
void main()
{
string sChaos = GetResRef(OBJECT_SELF);
string sCase;
if(sChaos == "ba2_slaadk7") {sCase = "ba2_slaadk6";}
if(sChaos == "ba2_slaadk6") {sCase = "ba2_slaadk5";}
if(sChaos == "ba2_slaadk5") {sCase = "ba2_slaadk4";}
if(sChaos == "ba2_slaadk4") {sCase = "ba2_slaadk3";}
if(sChaos == "ba2_slaadk3") {sCase = "ba2_slaadk2";}
if(sChaos == "ba2_slaadk2") {sCase = "ba2_slaadk1";}
SpeakString("Foolish mortal! I'm not dead yet!");
CreateObject(OBJECT_TYPE_CREATURE, sCase, GetLocation(OBJECT_SELF), FALSE);
}

31
_module/nss/ba2_dthrs.nss Normal file
View File

@@ -0,0 +1,31 @@
void main()
{
if(!GetIsObjectValid(GetSittingCreature(OBJECT_SELF)))
{
AssignCommand(GetLastUsedBy(), ActionSit(OBJECT_SELF));
object oKilled = GetLastUsedBy();
effect eDeath = EffectDeath(TRUE,TRUE);
effect eThunder = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oKilled));
DelayCommand(1.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eThunder, oKilled));
if(GetLocalInt(OBJECT_SELF, "Spawnattu") != 1)
{
CreateObject(OBJECT_TYPE_CREATURE, "ba2_azermfi", GetLocation(OBJECT_SELF), TRUE);
CreateObject(OBJECT_TYPE_CREATURE, "ba2_azermfi", GetLocation(OBJECT_SELF), TRUE);
SetLocalInt(OBJECT_SELF, "Spawnattu", 1);
}
}
}

View File

@@ -0,0 +1,25 @@
void main()
{
if(!GetLocalInt(OBJECT_SELF, "Activated"))
{
if(GetTag(OBJECT_SELF) == "ba2_genpadage")
{
object oPlace = GetObjectByTag("ba2_podecfie");
AssignCommand(oPlace, ActionCastSpellAtObject(SPELL_BLADE_BARRIER, OBJECT_SELF, METAMAGIC_EMPOWER, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
AssignCommand(oPlace, ActionCastSpellAtObject(SPELL_BLADE_BARRIER, OBJECT_SELF, METAMAGIC_EMPOWER, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
AssignCommand(oPlace, ActionCastSpellAtObject(SPELL_BLADE_BARRIER, OBJECT_SELF, METAMAGIC_EMPOWER, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
AssignCommand(oPlace, ActionCastSpellAtObject(SPELL_BLADE_BARRIER, OBJECT_SELF, METAMAGIC_EMPOWER, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
AssignCommand(oPlace, ActionCastSpellAtObject(SPELL_BLADE_BARRIER, OBJECT_SELF, METAMAGIC_EMPOWER, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
SetLocalInt(OBJECT_SELF, "Activated", TRUE);
DelayCommand(200.0, SetLocalInt(OBJECT_SELF, "Activated", FALSE));
}
else
{
int iPlace = Random(5);
object oPlace = GetNearestObjectByTag("ba2_podecfi", OBJECT_SELF, iPlace);
AssignCommand(oPlace, ActionCastSpellAtObject(SPELL_BLADE_BARRIER, OBJECT_SELF, METAMAGIC_EMPOWER, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
SetLocalInt(OBJECT_SELF, "Activated", TRUE);
DelayCommand(200.0, SetLocalInt(OBJECT_SELF, "Activated", FALSE));
}
}
}

View File

@@ -0,0 +1,9 @@
void main()
{
effect eHarmdam = EffectDamage(500, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_NORMAL);
effect eHarm = EffectVisualEffect(VFX_IMP_HARM, FALSE);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHarmdam, GetEnteringObject());
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHarm, GetEnteringObject());
}

View File

@@ -0,0 +1,61 @@
void main()
{
int nValue = d10(1);
int nDamage;
string sChaos = GetResRef(OBJECT_SELF);
if(sChaos == "ba2_slaadk7") {nDamage = 100;}
if(sChaos == "ba2_slaadk6") {nDamage = 120;}
if(sChaos == "ba2_slaadk5") {nDamage = 140;}
if(sChaos == "ba2_slaadk4") {nDamage = 160;}
if(sChaos == "ba2_slaadk3") {nDamage = 180;}
if(sChaos == "ba2_slaadk2") {nDamage = 200;}
if(sChaos == "ba2_slaadk2") {nDamage = 220;}
if(nValue == 4 && GetTag(GetArea(OBJECT_SELF)) == "ba2_reislad")
{
object oUps;
object oWay = GetWaypointByTag("ba2_cenaoj");
location lArea = GetLocation(oWay);
oUps = GetFirstObjectInShape(SHAPE_SPHERE, 14.0, lArea, FALSE, OBJECT_TYPE_CREATURE);
while(GetIsObjectValid(oUps))
{
if(oUps != OBJECT_SELF && !GetIsDM(oUps))
{
AssignCommand(oUps, ClearAllActions(TRUE));
DelayCommand(0.05, AssignCommand(oUps, ActionJumpToLocation(lArea)));
DelayCommand(2.2, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_NORMAL), oUps));
DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_EVIL_10), oUps));
}
oUps = GetNextObjectInShape(SHAPE_SPHERE, 14.0, lArea, FALSE, OBJECT_TYPE_CREATURE);
}
//location lUps = GetLocation(oUps);
//effect eVanish = EffectDisappearAppear(lUps, 1);
ClearAllActions(TRUE);
DelayCommand(0.05, ActionJumpToLocation(lArea));
DelayCommand(0.2, ActionAttack(oUps));
//DelayCommand(0.05, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVanish, OBJECT_SELF, 1.0));
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, ???, lArea);
//DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_PARALYZED), OBJECT_SELF, 2.0));
DelayCommand(1.0, SpeakString("Chaos will reign forever and more!"));
}
}

View File

@@ -0,0 +1,18 @@
void main()
{
if(GetLocalInt(OBJECT_SELF, "DEATH") == 1)
{
object oStupid = GetLastDamager(OBJECT_SELF);
effect eStupid = EffectDeath();
effect eVisual = EffectVisualEffect(VFX_FNF_PWKILL);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eStupid, oStupid);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oStupid);
}
}

View File

@@ -0,0 +1,45 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oItem1 = GetObjectByTag("ba2_pida1");
object oItem2 = GetObjectByTag("ba2_pida2");
object oItem3 = GetObjectByTag("ba2_pida3");
object oItem4 = GetObjectByTag("ba2_pida4");
object oItem5 = GetObjectByTag("ba2_pida5");
object oItem6 = GetObjectByTag("ba2_pida6");
object oItem7 = GetObjectByTag("ba2_pida7");
object oItem8 = GetObjectByTag("ba2_pida8");
object oItem9 = GetObjectByTag("ba2_pida9");
object oItem10 = GetObjectByTag("ba2_pida10");
object oItem11 = GetObjectByTag("ba2_pida11");
object oItem12 = GetObjectByTag("ba2_pida12");
if(GetItemPossessor(oItem1) != GetObjectByTag("ba2_dpickpa") && GetItemPossessor(oItem2) != GetObjectByTag("ba2_dpickpa") && GetItemPossessor(oItem3) != GetObjectByTag("ba2_dpickpa") && GetItemPossessor(oItem4) != GetObjectByTag("ba2_dpickpa") && GetItemPossessor(oItem5) != GetObjectByTag("ba2_dpickpa") && GetItemPossessor(oItem6) != GetObjectByTag("ba2_dpickpa") && GetItemPossessor(oItem7) != GetObjectByTag("ba2_dpickpa") && GetItemPossessor(oItem8) != GetObjectByTag("ba2_dpickpa") && GetItemPossessor(oItem9) != GetObjectByTag("ba2_dpickpa") && GetItemPossessor(oItem10) != GetObjectByTag("ba2_dpickpa") && GetItemPossessor(oItem11) != GetObjectByTag("ba2_dpickpa") && GetItemPossessor(oItem12) != GetObjectByTag("ba2_dpickpa"))
{
SetLocalInt(oArea, "Wondering", 1);
SpeakString("No! I am immortal! This can't be! Nooooooooooooo...", TALKVOLUME_TALK);
SetImmortal(OBJECT_SELF, FALSE);
DestroyObject(oItem1, 0.0f);
DestroyObject(oItem2, 0.0f);
DestroyObject(oItem3, 0.0f);
DestroyObject(oItem4, 0.0f);
DestroyObject(oItem5, 0.0f);
DestroyObject(oItem6, 0.0f);
DestroyObject(oItem7, 0.0f);
DestroyObject(oItem8, 0.0f);
DestroyObject(oItem9, 0.0f);
DestroyObject(oItem10, 0.0f);
DestroyObject(oItem11, 0.0f);
DestroyObject(oItem12, 0.0f);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), OBJECT_SELF);
}
}

View File

@@ -0,0 +1,17 @@
void main()
{
if(GetLocalInt(OBJECT_SELF, "CanGo") == TRUE)
{
object oDoomed = GetEnteringObject();
object oDest1 = GetWaypointByTag("ba2_disadea");
location lDest1 = GetLocation(oDest1);
AssignCommand(oDoomed, JumpToLocation(lDest1));
}
}

View File

@@ -0,0 +1,6 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
SetLocalInt(oArea, "Suffering", 1);
}

View File

@@ -0,0 +1,8 @@
void main()
{
effect eBadly = EffectDamage(500, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_NORMAL);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBadly, OBJECT_SELF);
}

View File

@@ -0,0 +1,64 @@
void main()
{
object oWise = GetObjectByTag("ba2_numgive");
object oArea = GetObjectByTag("ba2_thwid6");
effect eEffekt;
effect eEffektVisual;
int iSattuma = Random(5) + 1;
if(!GetLocalInt(oArea, "Arpaonheitetty") == 1)
{
switch (iSattuma)
{
case 1:
{
SetLocalInt(oArea, "Arpaonheitetty", 1);
SetLocalInt(oWise, "Sattuma", 1);
effect eEffekt = EffectDamage(d12(4), DAMAGE_TYPE_ELECTRICAL, DAMAGE_POWER_NORMAL);
effect eEffektVisual = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
break;
}
case 2:
{
SetLocalInt(oArea, "Arpaonheitetty", 1);
SetLocalInt(oWise, "Sattuma", 2);
effect eEffekt = EffectDamage(d20(4), DAMAGE_TYPE_FIRE, DAMAGE_POWER_NORMAL);
effect eEffektVisual = EffectVisualEffect(VFX_IMP_FLAME_M);
break;
}
case 3:
{
SetLocalInt(oArea, "Arpaonheitetty", 1);
SetLocalInt(oWise, "Sattuma", 3);
effect eEffekt = EffectDamage(d100(2), DAMAGE_TYPE_NEGATIVE, DAMAGE_POWER_NORMAL);
effect eEffektVisual = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
break;
}
case 4:
{
SetLocalInt(oArea, "Arpaonheitetty", 1);
SetLocalInt(oWise, "Sattuma", 4);
effect eEffekt = EffectDamage(d12(4), DAMAGE_TYPE_ELECTRICAL, DAMAGE_POWER_NORMAL);
effect eEffektVisual = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
break;
}
case 5:
{
SetLocalInt(oArea, "Arpaonheitetty", 1);
SetLocalInt(oWise, "Sattuma", 5);
effect eEffekt = EffectDamage(d12(4), DAMAGE_TYPE_ELECTRICAL, DAMAGE_POWER_NORMAL);
effect eEffektVisual = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
break;
}
}
}
}

View File

@@ -0,0 +1,116 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 3)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 1)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 2)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 5)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 4)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,115 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 5)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 3)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 4)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 1)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 2)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,115 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 4)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 5)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 1)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 2)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 3)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,115 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 1)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 2)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 3)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 4)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 5)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,115 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 2)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 4)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 5)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 3)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,114 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 5)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 2)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 1)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 3)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 4)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
}

View File

@@ -0,0 +1,115 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 3)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 4)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 5)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else if(GetLocalInt(oWise, "Sattuma") == 2)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,115 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 1)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 5)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 2)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 3)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 4)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,115 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 4)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 1)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 5)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 2)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 3)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,115 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 2)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 3)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 4)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 1)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 5)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,115 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 3)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 5)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 4)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 1)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 2)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,115 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 1)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 2)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 5)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 4)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 3)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,132 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 5)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 3)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 4)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectDarkness(), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectDarkness(), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectDarkness(), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectDarkness(), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 2)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,99 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 2)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 3)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 1)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 5)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 4)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,115 @@
void main()
{
object oArea = GetObjectByTag("ba2_thwid6");
object oWise = GetObjectByTag("ba2_numgive");
object oDoomed = GetEnteringObject();
if(GetIsPossessedFamiliar(oDoomed)){ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDoomed);}
object oDest1 = GetWaypointByTag("ba2_waytele1");
object oDest2 = GetWaypointByTag("ba2_waytele2");
object oDest3 = GetWaypointByTag("ba2_waytele3");
object oDest4 = GetWaypointByTag("ba2_waytele4");
object oDest5 = GetWaypointByTag("ba2_toende");
location lDest1 = GetLocation(oDest1);
location lDest2 = GetLocation(oDest2);
location lDest3 = GetLocation(oDest3);
location lDest4 = GetLocation(oDest4);
location lDest5 = GetLocation(oDest5);
if(GetLocalInt(oWise, "Sattuma") == 4)
{
if(!GetLocalInt(oArea, "Suffering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest1));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest4));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE, TRUE), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 1)
{
object oDark1 = GetWaypointByTag("ba2_perdark1");
object oDark2 = GetWaypointByTag("ba2_perdark2");
object oDark3 = GetWaypointByTag("ba2_perdark3");
object oDark4 = GetWaypointByTag("ba2_perdark4");
AssignCommand(oDoomed, JumpToLocation(lDest5));
if(!GetLocalInt(oArea, "Darkness") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark1));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark2));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark3));
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_DARKNESS), GetLocation(oDark4));
SetLocalInt(oArea, "Darkness", 1);
}
}
else if(GetLocalInt(oWise, "Sattuma") == 2)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_HOLY_30), oDoomed);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oDoomed, 2.0f);
}
else if(GetLocalInt(oWise, "Sattuma") == 3)
{
if(!GetLocalInt(oArea, "Wondering") == 1)
{
AssignCommand(oDoomed, JumpToLocation(lDest2));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
else
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_STRENGTH, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_CONSTITUTION, 6), oDoomed));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectAbilityDecrease(ABILITY_DEXTERITY, 6), oDoomed));
}
}
else if(GetLocalInt(oWise, "Sattuma") == 5)
{
AssignCommand(oDoomed, JumpToLocation(lDest3));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), oDoomed));
}
}

View File

@@ -0,0 +1,24 @@
void main()
{
object oSavior = GetLastSpeaker();
CreateItemOnObject("ba_nolinuslet", oSavior, 1);
object oCrypt = GetObjectByTag("ba_cryptboss");
vector vPortal = Vector(20.00f, 35.00f, 0.00f);
location lPortal = Location(oCrypt, vPortal, 90.0);
ActionCastSpellAtLocation(SPELL_HAMMER_OF_THE_GODS, lPortal, METAMAGIC_QUICKEN, TRUE, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
object oPlate = GetObjectByTag("ba_coverplate");
DestroyObject(oPlate, 0.5f);
CreateObject(OBJECT_TYPE_PLACEABLE, "plc_portal", lPortal, FALSE);
object oGate = GetObjectByTag("ba_gatedwaci");
vector vLight = Vector(48.50f, 7.25f, 1.00f);
location lLight = Location(oGate, vLight, 0.0);
CreateObject(OBJECT_TYPE_PLACEABLE, "plc_solwhite", lLight, FALSE);
DestroyObject(OBJECT_SELF, 1.0f);
}

View File

@@ -0,0 +1,62 @@
///////////////////////////
/// Double Bench ///
/// Ba'al ///
///////////////////////////
// Make a bench or coutch usable by 2 creatures simultaneously
void main()
{
// Set some variable for a beter understanding
object oPlayer = GetLastUsedBy();
object oBench = OBJECT_SELF;
// Get a hold on the 2 pillows
object oPillow1 = GetLocalObject( OBJECT_SELF, "Pillow 1" );
object oPillow2 = GetLocalObject( OBJECT_SELF, "Pillow 2" );
// If the sitting places do not exist, create them
if( !GetIsObjectValid( oPillow1 ) )
{
// Set up some variable for understanding
object oArea = GetArea( oBench );
vector locBench = GetPosition( oBench );
float fOrient = GetFacing( oBench );
// Calculate location of the 2 pillows
location locPillow1 = Location( oArea, locBench + AngleToVector( fOrient + 90.0f ) / 2.0f, fOrient );
location locPillow2 = Location( oArea, locBench + AngleToVector( fOrient - 90.0f ) / 2.0f, fOrient );
// Create the 2 pillows
oPillow1 = CreateObject( OBJECT_TYPE_PLACEABLE, "plc_invisobj", locPillow1 );
oPillow2 = CreateObject( OBJECT_TYPE_PLACEABLE, "plc_invisobj", locPillow2 );
// Memorise the places
SetLocalObject( OBJECT_SELF, "Pillow 1", oPillow1 );
SetLocalObject( OBJECT_SELF, "Pillow 2", oPillow2 );
}
// Chose the nearest pillow if not used and sit
if( GetDistanceBetween( oPlayer, oPillow1 ) < GetDistanceBetween( oPlayer, oPillow2 ) )
{
if( !GetIsObjectValid( GetSittingCreature( oPillow1 ) ) )
{
AssignCommand( oPlayer, ActionSit( oPillow1 ) );
}
else
{
AssignCommand( oPlayer, ActionSit( oPillow2 ) );
}
}
else
{
if( !GetIsObjectValid( GetSittingCreature( oPillow2 ) ) )
{
AssignCommand( oPlayer, ActionSit( oPillow2 ) );
}
else
{
AssignCommand( oPlayer, ActionSit( oPillow1 ) );
}
}
}

View File

@@ -0,0 +1,14 @@
void main()
{
object oLetter = GetObjectByTag("ba_nolinuslet");
object oSpeaker = GetPCSpeaker();
if(GetItemPossessedBy(oSpeaker, "ba_nolinuslet") != OBJECT_INVALID)
{
object oDestroy = GetItemPossessedBy(oSpeaker, "ba_nolinuslet");
DestroyObject(oDestroy, 0.0f);
object oCapt = GetObjectByTag("ba_dwarfcapt");
SetLocalInt(oCapt, "KIRJEOTETTU", 1);
}
}

View File

@@ -0,0 +1,11 @@
void main()
{
ExecuteScript("nw_c2_default1", OBJECT_SELF);
if(!GetLocalInt(OBJECT_SELF,"SPEAK"))
{
SpeakString("So you tought just walk in and save that pathetic little dwarf! OVER MY DEAD BODY, FOOLS!", TALKVOLUME_TALK);
SetLocalInt(OBJECT_SELF, "SPEAK", 1);
}
}

View File

@@ -0,0 +1,13 @@
void main()
{
ExecuteScript("nw_c2_default7", OBJECT_SELF);
if(GetTag(GetArea(OBJECT_SELF)) == "ba_cryptboss")
{
object oCrypt = GetObjectByTag("ba_cryptboss");
vector vHpriest = Vector(12.50f, 35.00f, 0.00f);
location lHpriest = Location(oCrypt, vHpriest, 90.0);
CreateObject(OBJECT_TYPE_PLACEABLE, "plc_flrdesigns2", lHpriest, FALSE);
CreateObject(OBJECT_TYPE_CREATURE, "ba_hpriest", lHpriest, FALSE);
}
}

View File

@@ -0,0 +1,8 @@
int StartingConditional()
{
object oCapt = GetObjectByTag("ba_dwarfcapt");
if(!(GetLocalInt(oCapt, "HOMMAHOIDETTU") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,12 @@
#include "nw_i0_tool"
int StartingConditional()
{
object oAltar = GetObjectByTag("ba_khkeyaltar");
if(!HasItem(oAltar, "ba_uberkey"))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,19 @@
//::///////////////////////////////////////////////
//:: Name x2_def_percept
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Default On Perception script
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: June 11/03
//:://////////////////////////////////////////////
void main()
{
object oThrone = GetObjectByTag("ba_kingsthrone");
ActionSit(oThrone);
ExecuteScript("nw_c2_default2", OBJECT_SELF);
}

View File

@@ -0,0 +1,8 @@
int StartingConditional()
{
object oCapt = GetObjectByTag("ba_dwarfcapt");
if(!(GetLocalInt(oCapt, "KIRJEOTETTU") == 1))
return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,12 @@
void main()
{
//object oLetter = GetItemPossessedBy(GetPCSpeaker(), "ba_nolinuslet");
//DestroyObject(oLetter, 0.0f);
SetLocalInt(OBJECT_SELF, "HOMMAHOIDETTU", 1);
object oDoor = GetObjectByTag("ba_dwagate");
ActionOpenDoor(oDoor);
}

View File

@@ -0,0 +1,50 @@
void main()
{
if(!GetLocalInt(OBJECT_SELF, "SUMMONED" ))
{
SetLocalInt(OBJECT_SELF, "SUMMONED", 1);
object oPilar1 = GetObjectByTag("ba_cryptpilar1");
object oPilar2 = GetObjectByTag("ba_cryptpilar2");
object oPilar3 = GetObjectByTag("ba_cryptpilar3");
object oPilar4 = GetObjectByTag("ba_cryptpilar4");
object oPilar5 = GetObjectByTag("ba_cryptpilar5");
effect eBeam1 = EffectBeam(VFX_BEAM_LIGHTNING, oPilar1, FALSE);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam1, oPilar2, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam1, oPilar3, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam1, oPilar4, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam1, oPilar5, 10.0f);
effect eBeam2 = EffectBeam(VFX_BEAM_LIGHTNING, oPilar2, FALSE);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam2, oPilar1, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam2, oPilar3, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam2, oPilar4, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam2, oPilar5, 10.0f);
effect eBeam3 = EffectBeam(VFX_BEAM_LIGHTNING, oPilar3, FALSE);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam3, oPilar1, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam3, oPilar2, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam3, oPilar4, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam3, oPilar5, 10.0f);
effect eBeam4 = EffectBeam(VFX_BEAM_LIGHTNING, oPilar4, FALSE);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam4, oPilar1, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam4, oPilar2, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam4, oPilar3, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam4, oPilar5, 10.0f);
effect eBeam5 = EffectBeam(VFX_BEAM_LIGHTNING, oPilar5, FALSE);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam5, oPilar1, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam5, oPilar2, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam5, oPilar3, 10.0f);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam5, oPilar4, 10.0f);
object oCrypt = GetObjectByTag("ba_cryptboss");
vector vBalor = Vector(22.50f, 35.00f, 0.00f);
location lSummon = Location(oCrypt, vBalor, 90.0);
CreateObject(OBJECT_TYPE_CREATURE, "ba_lordofthetomb", lSummon, TRUE);
}
}

View File

@@ -0,0 +1,19 @@
//::///////////////////////////////////////////////
//:: Name x2_def_percept
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Default On Perception script
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: June 11/03
//:://////////////////////////////////////////////
void main()
{
object oThrone = GetObjectByTag("ba_prieststhrone");
ActionSit(oThrone);
ExecuteScript("nw_c2_default2", OBJECT_SELF);
}

View File

@@ -0,0 +1,5 @@
void main()
{
ActionRandomWalk();
}

View File

@@ -0,0 +1,83 @@
#include "nw_i0_spells"
void SpawnRandomBoss()
{
int nAmmount, nRandomWaypoint;
string sMonster, sArea;
float fHelpDelay;
location lRandom;
object oRandomArea, oMonster, oWaypoint, oSearcher;
switch (d20() + d10() - 1)
{
case 1 : oRandomArea = GetObjectByTag("AersMountain"); break;
case 2 : oRandomArea = GetObjectByTag("Cliffs"); break;
case 3 : oRandomArea = GetObjectByTag("Dawn"); break;
case 4 : oRandomArea = GetObjectByTag("DarknessFalls"); break;
case 5 : oRandomArea = GetObjectByTag("DesertofRa"); break;
case 6 : oRandomArea = GetObjectByTag("DestroyedCrypts"); break;
case 7 : oRandomArea = GetObjectByTag("tor_ctfwdm"); break;
case 8 : oRandomArea = GetObjectByTag("DragonsDomain"); break;
case 9 : oRandomArea = GetObjectByTag("ForestofLostHope"); break;
case 10 : oRandomArea = GetObjectByTag("tor_fdlpth"); break;
case 11 : oRandomArea = GetObjectByTag("FrostValley"); break;
case 12 : oRandomArea = GetObjectByTag("KainsIsland"); break;
case 13 : oRandomArea = GetObjectByTag("CastleCourtyard"); break;
case 14 : oRandomArea = GetObjectByTag("ThenesMines"); break;
case 15 : oRandomArea = GetObjectByTag("MoonShayIsle"); break;
case 16 : oRandomArea = GetObjectByTag("MtBarovchocy"); break;
case 17 : oRandomArea = GetObjectByTag("MtDrake"); break;
case 18 : oRandomArea = GetObjectByTag("NoMansLand"); break;
case 19 : oRandomArea = GetObjectByTag("Oblivion"); break;
case 21 : oRandomArea = GetObjectByTag("OceanofDestiny"); break;
case 22 : oRandomArea = GetObjectByTag("OrcStronghold"); break;
case 23 : oRandomArea = GetObjectByTag("SeaofFallenAngels"); break;
case 24 : oRandomArea = GetObjectByTag("ShadowRealm"); break;
case 25 : oRandomArea = GetObjectByTag("SkullGorge"); break;
case 26 : oRandomArea = GetObjectByTag("stingerforest"); break;
case 27 : oRandomArea = GetObjectByTag("TheUnderdarkForest"); break;
case 28 : oRandomArea = GetObjectByTag("UpperTrollOutpost"); break;
case 29 : oRandomArea = GetObjectByTag("VenomPlains"); break;
default : oRandomArea = GetObjectByTag("VenomPlains"); break;
}
if(GetIsObjectValid(oRandomArea))
{
oWaypoint = GetFirstObjectInArea(oRandomArea);
while(GetIsObjectValid(oWaypoint))
{
if(GetTag(oWaypoint) == "br_MassagreWaypoint") nAmmount++;
oWaypoint = GetNextObjectInArea(oRandomArea);
}
nRandomWaypoint = Random(nAmmount) + 1;
oSearcher = GetNearestObjectToLocation(OBJECT_TYPE_WAYPOINT, Location(oRandomArea, Vector(5.0, 5.0, 0.0), 0.0), 1);
oWaypoint = GetNearestObjectByTag("br_MassagreWaypoint", oSearcher, nRandomWaypoint);
if(!GetIsObjectValid(oWaypoint)) oWaypoint = oSearcher;
switch(d8())
{
case 1 : sMonster = "br_ra1sttba"; break; // Scourge
case 2 : sMonster = "tb_rstroll"; break; // Vaprak
case 3 : sMonster = "DeathDragon"; break; // Death
case 4 : sMonster = "bx_hung4ba"; break; // Famine
case 5 : sMonster = "bx_fpestil"; break; // Pestilence
case 6 : sMonster = "bx_waro4ks"; break; // War
case 7 : sMonster = "sf_boss_fidemon"; break; // Fire & Ice Demon
case 8 : sMonster = "tb_rstroll"; break;
default : sMonster = "br_ra1sttba"; break;
}
fHelpDelay = GetRandomDelay(240.0, 200.0);
lRandom = GetLocation(oWaypoint);
oMonster = CreateObject(OBJECT_TYPE_CREATURE, sMonster, lRandom, TRUE);
sArea = GetName(GetArea(oMonster));
DelayCommand(4.0, AssignCommand(oMonster, SpeakString("The World will be mine!", TALKVOLUME_SHOUT)));
DelayCommand(fHelpDelay, AssignCommand(oMonster, SpeakString(sArea + " is already conquered! No one will be safe!", TALKVOLUME_SHOUT)));
}
}

View File

@@ -0,0 +1,31 @@
void main()
{
PlaySound("as_cv_gongring2");
if(!GetLocalInt(OBJECT_SELF, "NOVOIHANPASKAT" ))
{
SetLocalInt(OBJECT_SELF, "NOVOIHANPASKAT", 1);
SpeakString("All nearby creatures heard that and they rush to kill you. What made you use that gong!?", TALKVOLUME_TALK);
object oGong = GetObjectByTag("ba_notgood");
effect eGong = EffectVisualEffect(VFX_FNF_DISPEL, FALSE);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eGong, oGong, 1.0f);
object oCrypt = GetObjectByTag("ba_cryptboss");
vector vOrc1 = Vector(108.75f, 21.25f, 3.20f);
vector vOrc2 = Vector(111.25f, 21.25f, 3.20f);
vector vOrc3 = Vector(105.00f, 28.50f, 0.00f);
vector vOrc4 = Vector(115.00f, 28.50f, 0.00f);
location lOrc1 = Location(oCrypt, vOrc1, 180.0);
location lOrc2 = Location(oCrypt, vOrc2, 180.0);
location lOrc3 = Location(oCrypt, vOrc3, 180.0);
location lOrc4 = Location(oCrypt, vOrc4, 180.0);
CreateObject(OBJECT_TYPE_CREATURE, "ba_forc", lOrc1, TRUE);
CreateObject(OBJECT_TYPE_CREATURE, "ba_forc", lOrc2, TRUE);
CreateObject(OBJECT_TYPE_CREATURE, "ba_forc", lOrc3, TRUE);
CreateObject(OBJECT_TYPE_CREATURE, "ba_forc", lOrc4, TRUE);
}
}

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