Initial upload

Initial upload
This commit is contained in:
Jaysyn904
2023-09-25 18:13:22 -04:00
parent 684ef76c20
commit 499aba4eb3
5734 changed files with 4843758 additions and 0 deletions

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,6 @@
void main()
{
object oPC = GetLastUsedBy();
AssignCommand(oPC, ClearAllActions(TRUE));
ActionStartConversation(oPC);
}

View File

@@ -0,0 +1,4 @@
void main()
{
ActionSit(GetNearestObjectByTag("COUNCILCHAIR", OBJECT_SELF));
}

View File

@@ -0,0 +1,19 @@
#include "nw_i0_tool"
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
RewardPartyXP(200, oPC, FALSE);
RewardPartyGP(200, oPC, FALSE);
object oTarget;
oTarget = OBJECT_SELF;
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_KNOCK), oTarget));
else DelayCommand(1.0,ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_KNOCK), GetLocation(oTarget)));
SendMessageToPC(oPC, "Disarm Success!!");
}

View File

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

View File

@@ -0,0 +1,15 @@
void main() {
object oClicker = GetClickingObject();
object oTarget = GetTransitionTarget( OBJECT_SELF );
location lLoc = GetLocation( oTarget );
if ((GetHitDice(oClicker) >= 15) && (GetHitDice(oClicker) <= 15)) {
AssignCommand( oClicker, JumpToLocation( lLoc ) );
}
}

View File

@@ -0,0 +1,15 @@
void main() {
object oClicker = GetClickingObject();
object oTarget = GetTransitionTarget( OBJECT_SELF );
location lLoc = GetLocation( oTarget );
if ((GetHitDice(oClicker) >= 30) && (GetHitDice(oClicker) <= 15)) {
AssignCommand( oClicker, JumpToLocation( lLoc ) );
}
}

21
_module/nss/0_gen_10.nss Normal file
View File

@@ -0,0 +1,21 @@
void main()
{
object oSelf = OBJECT_SELF;
object oItem = GetFirstItemInInventory(oSelf);
int iChance = 10; //Percenatage of the time each item has a chance of dropping
do{
int iDroppable = GetDroppableFlag(oItem);
if (iDroppable == FALSE){
int iCopy = GetLocalInt(oItem, "copied");
if (iCopy == 0){
string sResref = GetResRef(oItem);
int id100 = d100(1);
if (id100 <= iChance){
object oItem2 = CreateItemOnObject(sResref, oSelf, 1);
}
}
}
if (iDroppable == TRUE){} //This is so it doesn't make addittional things that are already droppable
SetLocalInt(oItem, "copied", 1);
}while ((oItem = GetNextItemInInventory(oSelf)) != OBJECT_INVALID);
}

21
_module/nss/0_gen_20.nss Normal file
View File

@@ -0,0 +1,21 @@
void main()
{
object oSelf = OBJECT_SELF;
object oItem = GetFirstItemInInventory(oSelf);
int iChance = 20; //Percenatage of the time each item has a chance of dropping
do{
int iDroppable = GetDroppableFlag(oItem);
if (iDroppable == FALSE){
int iCopy = GetLocalInt(oItem, "copied");
if (iCopy == 0){
string sResref = GetResRef(oItem);
int id100 = d100(1);
if (id100 <= iChance){
object oItem2 = CreateItemOnObject(sResref, oSelf, 1);
}
}
}
if (iDroppable == TRUE){} //This is so it doesn't make addittional things that are already droppable
SetLocalInt(oItem, "copied", 1);
}while ((oItem = GetNextItemInInventory(oSelf)) != OBJECT_INVALID);
}

21
_module/nss/0_gen_30.nss Normal file
View File

@@ -0,0 +1,21 @@
void main()
{
object oSelf = OBJECT_SELF;
object oItem = GetFirstItemInInventory(oSelf);
int iChance = 30; //Percenatage of the time each item has a chance of dropping
do{
int iDroppable = GetDroppableFlag(oItem);
if (iDroppable == FALSE){
int iCopy = GetLocalInt(oItem, "copied");
if (iCopy == 0){
string sResref = GetResRef(oItem);
int id100 = d100(1);
if (id100 <= iChance){
object oItem2 = CreateItemOnObject(sResref, oSelf, 1);
}
}
}
if (iDroppable == TRUE){} //This is so it doesn't make addittional things that are already droppable
SetLocalInt(oItem, "copied", 1);
}while ((oItem = GetNextItemInInventory(oSelf)) != OBJECT_INVALID);
}

21
_module/nss/0_gen_40.nss Normal file
View File

@@ -0,0 +1,21 @@
void main()
{
object oSelf = OBJECT_SELF;
object oItem = GetFirstItemInInventory(oSelf);
int iChance = 40; //Percenatage of the time each item has a chance of dropping
do{
int iDroppable = GetDroppableFlag(oItem);
if (iDroppable == FALSE){
int iCopy = GetLocalInt(oItem, "copied");
if (iCopy == 0){
string sResref = GetResRef(oItem);
int id100 = d100(1);
if (id100 <= iChance){
object oItem2 = CreateItemOnObject(sResref, oSelf, 1);
}
}
}
if (iDroppable == TRUE){} //This is so it doesn't make addittional things that are already droppable
SetLocalInt(oItem, "copied", 1);
}while ((oItem = GetNextItemInInventory(oSelf)) != OBJECT_INVALID);
}

21
_module/nss/0_gen_5.nss Normal file
View File

@@ -0,0 +1,21 @@
void main()
{
object oSelf = OBJECT_SELF;
object oItem = GetFirstItemInInventory(oSelf);
int iChance = 5; //Percenatage of the time each item has a chance of dropping
do{
int iDroppable = GetDroppableFlag(oItem);
if (iDroppable == FALSE){
int iCopy = GetLocalInt(oItem, "copied");
if (iCopy == 0){
string sResref = GetResRef(oItem);
int id100 = d100(1);
if (id100 <= iChance){
object oItem2 = CreateItemOnObject(sResref, oSelf, 1);
}
}
}
if (iDroppable == TRUE){} //This is so it doesn't make addittional things that are already droppable
SetLocalInt(oItem, "copied", 1);
}while ((oItem = GetNextItemInInventory(oSelf)) != OBJECT_INVALID);
}

21
_module/nss/0_gen_50.nss Normal file
View File

@@ -0,0 +1,21 @@
void main()
{
object oSelf = OBJECT_SELF;
object oItem = GetFirstItemInInventory(oSelf);
int iChance = 50; //Percenatage of the time each item has a chance of dropping
do{
int iDroppable = GetDroppableFlag(oItem);
if (iDroppable == FALSE){
int iCopy = GetLocalInt(oItem, "copied");
if (iCopy == 0){
string sResref = GetResRef(oItem);
int id100 = d100(1);
if (id100 <= iChance){
object oItem2 = CreateItemOnObject(sResref, oSelf, 1);
}
}
}
if (iDroppable == TRUE){} //This is so it doesn't make addittional things that are already droppable
SetLocalInt(oItem, "copied", 1);
}while ((oItem = GetNextItemInInventory(oSelf)) != OBJECT_INVALID);
}

21
_module/nss/0_gen_60.nss Normal file
View File

@@ -0,0 +1,21 @@
void main()
{
object oSelf = OBJECT_SELF;
object oItem = GetFirstItemInInventory(oSelf);
int iChance = 60; //Percenatage of the time each item has a chance of dropping
do{
int iDroppable = GetDroppableFlag(oItem);
if (iDroppable == FALSE){
int iCopy = GetLocalInt(oItem, "copied");
if (iCopy == 0){
string sResref = GetResRef(oItem);
int id100 = d100(1);
if (id100 <= iChance){
object oItem2 = CreateItemOnObject(sResref, oSelf, 1);
}
}
}
if (iDroppable == TRUE){} //This is so it doesn't make addittional things that are already droppable
SetLocalInt(oItem, "copied", 1);
}while ((oItem = GetNextItemInInventory(oSelf)) != OBJECT_INVALID);
}

21
_module/nss/0_gen_70.nss Normal file
View File

@@ -0,0 +1,21 @@
void main()
{
object oSelf = OBJECT_SELF;
object oItem = GetFirstItemInInventory(oSelf);
int iChance = 70; //Percenatage of the time each item has a chance of dropping
do{
int iDroppable = GetDroppableFlag(oItem);
if (iDroppable == FALSE){
int iCopy = GetLocalInt(oItem, "copied");
if (iCopy == 0){
string sResref = GetResRef(oItem);
int id100 = d100(1);
if (id100 <= iChance){
object oItem2 = CreateItemOnObject(sResref, oSelf, 1);
}
}
}
if (iDroppable == TRUE){} //This is so it doesn't make addittional things that are already droppable
SetLocalInt(oItem, "copied", 1);
}while ((oItem = GetNextItemInInventory(oSelf)) != OBJECT_INVALID);
}

View File

@@ -0,0 +1,21 @@
void main()
{
object oSelf = OBJECT_SELF;
object oItem = GetFirstItemInInventory(oSelf);
int iChance = 50; //Percenatage of the time each item has a chance of dropping
do{
int iDroppable = GetDroppableFlag(oItem);
if (iDroppable == FALSE){
int iCopy = GetLocalInt(oItem, "copied");
if (iCopy == 0){
string sResref = GetResRef(oItem);
int id100 = d100(1);
if (id100 <= iChance){
object oItem2 = CreateItemOnObject(sResref, oSelf, 1);
}
}
}
if (iDroppable == TRUE){} //This is so it doesn't make addittional things that are already droppable
SetLocalInt(oItem, "copied", 1);
}while ((oItem = GetNextItemInInventory(oSelf)) != OBJECT_INVALID);
}

View File

@@ -0,0 +1,27 @@
#include "cs_misc_function"
void main()
{
//
// Move everyone within 20 meters of speaker to wp_cain waypoint (CS)
//
object oPC = GetPCSpeaker();
if (oPC != OBJECT_INVALID) {
cs_MovePartyNearbyToLocation(oPC, "trin_home_01", 20.0);
}
/* OLD SCRIPT VERSION
object oPC = GetFirstPC();
object onPC = GetLastSpeaker();
while (GetIsPC(oPC)) {
float fDistance = GetDistanceBetween(oPC, onPC);
if (fDistance <= 30.0) {
DelayCommand(1.0,AssignCommand (oPC, JumpToObject(GetWaypointByTag("wp_cain"))));
} else {
}
oPC = GetNextPC();
};
*/
}

View File

@@ -0,0 +1,17 @@
//::///////////////////////////////////////////////
//:: Name x2_def_ondeath
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Default OnDeath script
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: June 11/03
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("nw_c2_default7", OBJECT_SELF);
ExecuteScript("tab_xp_multi",OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//::///////////////////////////////////////////////
//:: Name x2_def_ondeath
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Default OnDeath script
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: June 11/03
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("nw_c2_default7", OBJECT_SELF);
ExecuteScript("tab_xp_multi",OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//::///////////////////////////////////////////////
//:: Name x2_def_ondeath
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Default OnDeath script
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: June 11/03
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("nw_c2_default7", OBJECT_SELF);
ExecuteScript("tab_xp_multi",OBJECT_SELF);
}

View File

@@ -0,0 +1,21 @@
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("trin_home_01");
lTarget = GetLocation(oTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,53 @@
void main()
{ // start main
object oPC = GetExitingObject();
object oArea = GetArea(OBJECT_SELF);
int nPCFlag = FALSE;
if(GetIsPC(oPC))
{ // start main if
object oObject = GetFirstObjectInArea(oArea);
while(GetIsObjectValid(oObject))
{ //start while loop
if(GetIsPC(oObject))
{ //start if
nPCFlag = TRUE;
break; // leave while loop if a PC is in the area
} // end if
else
{ //start else
oObject = GetNextObjectInArea(oArea);
} // end else
} // end while
if(nPCFlag == FALSE)
{
object oStore = GetFirstObjectInArea(oArea);
while(GetIsObjectValid(oStore))
{
int nObjectType = GetObjectType(oStore);
if(nObjectType == OBJECT_TYPE_STORE)
{
object oItem = GetFirstItemInInventory(oStore);
while(GetIsObjectValid(oItem))
{
int nItemFlag = GetLocalInt(oItem, "PCItem");
if(nItemFlag != 0)
{
if(nItemFlag < 1)
{
nItemFlag++;
SetLocalInt(oItem, "PCItem", nItemFlag);
}
else
{
DestroyObject(oItem);
}
}
oItem = GetNextItemInInventory(oStore);
} // end second while
} // end if
oStore = GetNextObjectInArea(oArea);
} // end first while
} // end if
} // end main if
} // end main

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,93 @@
#include "cs_misc_function"
#include "1_loot_inc_data"
// Throw this switch for debugging
int LOOT_INC_MAIN_DEBUGGING = TRUE;
int GetPartyMemberCount (object oPC, int iMinimumLevel)
{
int iPartyMemberCount = 0;
int iPartyMemberLevel;
object oPartyMember = GetFirstFactionMember (oPC);
while (GetIsObjectValid (oPartyMember))
{
if (GetIsPC (oPartyMember)) {
iPartyMemberCount ++;
iPartyMemberLevel = GetLevelByPosition (1, oPartyMember) + GetLevelByPosition (2, oPartyMember) + GetLevelByPosition (3, oPartyMember);
if (iPartyMemberLevel < iMinimumLevel) { iPartyMemberCount --; }
}
oPartyMember = GetNextFactionMember (oPC);
}
if (iPartyMemberCount < 1) { iPartyMemberCount = 1; }
WriteTimestampedLogEntry ("iPartyMemberCount " + IntToString (iPartyMemberCount));
return iPartyMemberCount;
}
object GetRandomPartyMember (object oPC)
{
int iPartyMemberCount = GetPartyMemberCount (oPC, 0);
int iRandNum = (Random (iPartyMemberCount)+1);
if (iRandNum == 1) { return oPC; }
object oPartyMember = GetFirstFactionMember (oPC);
int iCounter;
for (iCounter = 1; iCounter < iRandNum; iCounter ++)
{
if (!GetIsPC(oPartyMember)) { iCounter --; }
oPartyMember = GetNextFactionMember (oPC);
}
return oPartyMember;
}
int GetIsOverMaxAllowedLevel (object oPC , object oCaller)
{
int iHighestPartyMemberLevel = 0;
object oPartyMember = GetFirstFactionMember(oPC);
while (GetIsObjectValid(oPartyMember))
{
int iPartyMemberLevel = GetLevelByPosition (1, oPartyMember) + GetLevelByPosition (2, oPartyMember) + GetLevelByPosition (3, oPartyMember);
if (iPartyMemberLevel > iHighestPartyMemberLevel) { iHighestPartyMemberLevel = iPartyMemberLevel; }
oPartyMember = GetNextFactionMember(oPC);
}
int iMaxAllowedLevel = GetMaxAllowedLevel(oCaller);
if (iHighestPartyMemberLevel > iMaxAllowedLevel) { return TRUE; }
return FALSE;
}
void GenerateUniqueTreasure (object oCaller,object oPC)
{
int iMinimumLevel = GetMinimumLevel (oCaller);
int iNumberOfItemsToGenerate = GetPartyMemberCount (oPC, iMinimumLevel);
int iMinimum = GetMinimumNumberOfItemsToGenerate (oCaller);
int iMaximum = GetMaximumNumberOfItemsToGenerate (oCaller);
int iGoldToGive;
if (iNumberOfItemsToGenerate < iMinimum) iNumberOfItemsToGenerate = iMinimum;
if (iNumberOfItemsToGenerate > iMaximum) iNumberOfItemsToGenerate = iMaximum;
int iNumItemsInList = GetTotalAvailableItems (oCaller);
int iRandomNumber;
string sItemTemplate;
int iCounter;
for (iCounter = 0; iCounter < iNumberOfItemsToGenerate; iCounter ++)
{
iRandomNumber = Random (iNumItemsInList)+1;
sItemTemplate = GetUniqueItemFromList (oCaller, iRandomNumber);
//
// CS - This loot script will only generate an item of stack size 1. So, where we have gold200 and such,
// it still only creates 1 gold. This change creates an amount of gold proportional to the level of
// the player. (1st level - 100, 20th level - 2000)
//
if (FindSubString(sItemTemplate, "gold") != -1) {
iGoldToGive = Random(FloatToInt(GetChallengeRating(oCaller)*10.0))+1;
GiveGoldToCreature(oCaller, iGoldToGive);
}
CreateItemOnObject (sItemTemplate,oCaller,1);
if (LOOT_INC_MAIN_DEBUGGING == TRUE) { WriteTimestampedLogEntry (GetTag (oCaller) + " generated " + sItemTemplate); }
}
}

View File

@@ -0,0 +1,45 @@
#include "1_loot_inc_data"
#include "1_loot_inc_main"
#include "1_loot_inc_gen"
// #include "nw_o2_coninclude"
// Uncomment the above line if you would prefer to use the standard BioWare
// treasure scripts. If you do so delete the line that includes "loot_inc_gen_mod"
void main()
{
// Get Area-Wide respawn time for loot. If none is specified
// in loot_inc_data, then it will use the default of one hour.
float fRespawnTime = GetRespawnTime (OBJECT_SELF);
if (GetLocalInt(OBJECT_SELF, "NW_DO_ONCE") != 0)
{
return;
}
SetLocalInt(OBJECT_SELF, "NW_DO_ONCE", 1);
ShoutDisturbed();
AssignCommand( OBJECT_SELF, DelayCommand(fRespawnTime, SetLocalInt(OBJECT_SELF, "NW_DO_ONCE", 0) ) );
object oLastOpener = GetLastOpener();
// Gets a random member of the party, instead of the person
// who opened the chest.
object oLuckyMember = GetRandomPartyMember(oLastOpener);
// Get maximum level allowed for looting chests in area.
// If none is specified in loot_inc_data, then it will use
// the default of the maximum level being 100. If the party
// has a member that is too high, all they get is boots.
if (GetIsOverMaxAllowedLevel (oLastOpener, OBJECT_SELF))
{
CreateItemOnObject ("healstk01", OBJECT_SELF, 1);
return;
}
// Generate the treasure on the object.
GenerateUniqueTreasure(OBJECT_SELF, oLuckyMember);
}

View File

@@ -0,0 +1,5 @@
void main() {
DelayCommand(10.0,ActionCloseDoor(OBJECT_SELF));
DelayCommand(12.0,ActionLockObject(OBJECT_SELF));
}

View File

@@ -0,0 +1,46 @@
void TrashObject(object oObject)
{
if (GetObjectType(oObject) == OBJECT_TYPE_PLACEABLE) {
object oItem = GetFirstItemInInventory(oObject);
while (GetIsObjectValid(oItem))
{
TrashObject(oItem);
oItem = GetNextItemInInventory(oObject);
}
}
DestroyObject(oObject);
}
void main()
{
if(!GetIsPC(GetExitingObject()) ) {
return; }
object oPC = GetExitingObject();
if (!GetIsPC(oPC))
return;
oPC = GetFirstPC();
while (oPC != OBJECT_INVALID)
{
if (OBJECT_SELF == GetArea(oPC))
return;
else oPC = GetNextPC();
}
object oObject = GetFirstObjectInArea(OBJECT_SELF);
while (oObject != OBJECT_INVALID)
{
if (GetIsEncounterCreature(oObject))
DestroyObject(oObject);
oObject = GetNextObjectInArea(OBJECT_SELF);
}
object oItem = GetFirstObjectInArea();
while (GetIsObjectValid(oItem))
{
int iObjectType = GetObjectType(oItem);
switch (iObjectType) {
case OBJECT_TYPE_PLACEABLE:
if (GetTag(oItem) != "BodyBag") {
break; }
case OBJECT_TYPE_ITEM:
TrashObject(oItem); }
oItem = GetNextObjectInArea();
}
}

View File

@@ -0,0 +1,27 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.2
For download info, please visit:
http://www.angelfire.com/space/lilacsoul */
//Put this OnUsed
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
AssignCommand(oPC, ClearAllActions());
object oTarget;
oTarget = GetWaypointByTag("trin_home_01");
DelayCommand(1.5, AssignCommand(oPC, ActionJumpToObject(oTarget)));
oTarget = oPC;
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
}

View File

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

View File

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

View File

@@ -0,0 +1,22 @@
//Script: cal_explode
//Author: Albert Shih (Calidarien)
//Version: v1.0, 2002-06-25
//Usage: Caller explodes after a delay and damages nearby objects for 2d6 fire
// damage (Reflex save DC 15)
//Notes:
// v1.0: Release version
void ExplodeAtLocation(location lTarget, int nDamage, int nSaveDC = 35, float fRadius = 6.) {
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIREBALL), lTarget);
object oObject = GetFirstObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
do {
int nDamageAfterSave = GetReflexAdjustedDamage(nDamage, oObject, nSaveDC);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamageAfterSave, DAMAGE_TYPE_FIRE), oObject);
} while ((oObject = GetNextObjectInShape(SHAPE_SPHERE, fRadius, lTarget)) != OBJECT_INVALID);
}
void main()
{
location lSource = GetLocation(OBJECT_SELF);
DelayCommand(1., ExplodeAtLocation(lSource, d6(20)));
}

View File

@@ -0,0 +1,27 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.2
For download info, please visit:
http://www.angelfire.com/space/lilacsoul */
//Put this OnUsed
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
AssignCommand(oPC, ClearAllActions());
object oTarget;
oTarget = GetWaypointByTag("wp_enter_tmlordchamber");
DelayCommand(1.5, AssignCommand(oPC, ActionJumpToObject(oTarget)));
oTarget = oPC;
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE), GetLocation(oTarget));
}

View File

@@ -0,0 +1,27 @@
#include "cs_misc_function"
void main()
{
//
// Move everyone within 20 meters of speaker to wp_cain waypoint (CS)
//
object oPC = GetPCSpeaker();
if (oPC != OBJECT_INVALID) {
cs_MovePartyNearbyToLocation(oPC, "wp_bearhome", 20.0);
}
/* OLD SCRIPT VERSION
object oPC = GetFirstPC();
object onPC = GetLastSpeaker();
while (GetIsPC(oPC)) {
float fDistance = GetDistanceBetween(oPC, onPC);
if (fDistance <= 30.0) {
DelayCommand(1.0,AssignCommand (oPC, JumpToObject(GetWaypointByTag("wp_cain"))));
} else {
}
oPC = GetNextPC();
};
*/
}

View File

@@ -0,0 +1,27 @@
#include "cs_misc_function"
void main()
{
//
// Move everyone within 20 meters of speaker to wp_cain waypoint (CS)
//
object oPC = GetPCSpeaker();
if (oPC != OBJECT_INVALID) {
cs_MovePartyNearbyToLocation(oPC, "wp_bearship_03", 20.0);
}
/* OLD SCRIPT VERSION
object oPC = GetFirstPC();
object onPC = GetLastSpeaker();
while (GetIsPC(oPC)) {
float fDistance = GetDistanceBetween(oPC, onPC);
if (fDistance <= 30.0) {
DelayCommand(1.0,AssignCommand (oPC, JumpToObject(GetWaypointByTag("wp_cain"))));
} else {
}
oPC = GetNextPC();
};
*/
}

13
_module/nss/2_ship_2k.nss Normal file
View File

@@ -0,0 +1,13 @@
int StartingConditional()
{
object oPC = GetPCSpeaker();
if (!(GetGold(oPC) >= 2000)) return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,21 @@
//::///////////////////////////////////////////////
//:: FileName 2_ship_gold
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 7/16/2002 8:49:07 PM
//:://////////////////////////////////////////////
#include "nw_i0_tool"
int StartingConditional()
{
// Does the player have enough gold?
int iResult;
iResult = (GetGold(GetPCSpeaker()) >= 1000);
return iResult;
}

View File

@@ -0,0 +1,6 @@
void main()
{
object oChair = OBJECT_SELF;
AssignCommand( GetLastUsedBy(), ActionSit(oChair) );
}

View File

@@ -0,0 +1,30 @@
// main script to port home
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("trin_home_01");
lTarget = GetLocation(oTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
DelayCommand(2.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
oTarget = oPC;
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL), GetLocation(oTarget));
}

View File

@@ -0,0 +1,45 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_trinarena");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
DelayCommand(2.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
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_SUMMON_CELESTIAL), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL), GetLocation(oTarget));
}

View File

@@ -0,0 +1,21 @@
void main()
{
object oSelf = OBJECT_SELF;
object oItem = GetFirstItemInInventory(oSelf);
int iChance = 35; //Percenatage of the time each item has a chance of dropping
do{
int iDroppable = GetDroppableFlag(oItem);
if (iDroppable == FALSE){
int iCopy = GetLocalInt(oItem, "copied");
if (iCopy == 0){
string sResref = GetResRef(oItem);
int id100 = d100(1);
if (id100 <= iChance){
object oItem2 = CreateItemOnObject(sResref, oSelf, 1);
}
}
}
if (iDroppable == TRUE){} //This is so it doesn't make addittional things that are already droppable
SetLocalInt(oItem, "copied", 1);
}while ((oItem = GetNextItemInInventory(oSelf)) != OBJECT_INVALID);
}

View File

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

View File

@@ -0,0 +1,6 @@
void main()
{
DelayCommand(30.0, ActionCloseDoor(OBJECT_SELF));
DelayCommand(10.0, SetLocked(OBJECT_SELF, TRUE));
}

10
_module/nss/_key.nss Normal file
View File

@@ -0,0 +1,10 @@
void main()
{
object oPC = GetClickingObject();
if (GetIsObjectValid(oPC))
AssignCommand(oPC, SpeakString("This door appears to need a key...cb_door"));
else
SpeakString("NO VALID TEMP PC");
}

View File

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

View File

@@ -0,0 +1,6 @@
#include "xx_persist_quest"
void main()
{
RemovePersistentJournalQuestEntry("DICKYS_QUEST1",GetPCSpeaker());
}

View File

@@ -0,0 +1,27 @@
//::///////////////////////////////////////////////
//:: FileName resref
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 2/18/03 2:54:15 AM
//:://////////////////////////////////////////////
int StartingConditional()
{
int iResult = TRUE;
object oLecturn = GetNearestObjectByTag("ASG_LECTURN",OBJECT_SELF);
if (GetIsObjectValid(oLecturn))
{
// Look for alchemy book
object oItem = GetFirstItemInInventory(oLecturn);
if (GetIsObjectValid(oItem))
{
string sTagLeft6 = GetStringLeft(GetTag(oItem),6);
if (sTagLeft6=="ASG_MT")
{
iResult = FALSE;
SetCustomToken(1970000,GetName(oItem));
}
}
}
return iResult;
}

View File

@@ -0,0 +1,200 @@
#include "nw_i0_plot"
void main()
{
// Step 1 ) get Lecturn Infromation
object oLecturn = GetNearestObjectByTag("ASG_LECTURN",OBJECT_SELF);
if (GetIsObjectValid(oLecturn))
{
// Look for alchemy book
object oItem = GetFirstItemInInventory(oLecturn);
object oPC = GetPCSpeaker();
int iPass = FALSE;
if (GetIsObjectValid(oItem))
{
string sTag = GetTag(oItem);
string sTagLeft6 = GetStringLeft(sTag,6);
int iLen = GetStringLength(sTag)-9;
string sMatTag = GetStringRight(sTag,iLen);
string sBase = "ASG_MAT_";
string sMatChest = sBase+sMatTag;
object oMatChest;
object oCCHest;
object oItem;
if (sTagLeft6=="ASG_MT")
{
iPass = TRUE;
}
else
{
SetCustomToken(1970000,"No Valid Alchemy Book found in Lecturn.");
return;
}
// Step 3) Found Legal Alchemy Book, Check Material Chest
if (iPass==TRUE)
{
oMatChest = GetObjectByTag(sMatChest);
if (GetIsObjectValid(oMatChest)) iPass = TRUE;
else
{
SetCustomToken(1970000,"ERROR: No Valid Material Chest found - Report to Mod Builder. Looking for TAG :["+sMatChest+"]");
return;
}
}
// Step 4) Found Legal Material Chest, no check verse Componant Chest
if (iPass==TRUE)
{
object oCChest = GetNearestObjectByTag("ASG_CCHEST",OBJECT_SELF);
if (GetIsObjectValid(oCChest)==FALSE)
{
SetCustomToken(1970000,"ERROR: No Valid Componant Chest found - Report to Builder.");
return;
}
object oCTStone = GetItemPossessedBy(oMatChest,"ASG_CatalystStone");
object oHWater = GetItemPossessedBy(oMatChest,"hc_holywater");
if (GetIsObjectValid(oCTStone))
{
int iSor = GetLevelByClass(CLASS_TYPE_SORCERER,oPC);
int iWiz = GetLevelByClass(CLASS_TYPE_WIZARD,oPC);
if (iSor < 1 && iWiz <1)
{
SetCustomToken(1970000,"This alchemy proccess requires a Wizard or Sorcerer.");
return;
}
}
else if (GetIsObjectValid(oHWater))
{
int iClr = GetLevelByClass(CLASS_TYPE_CLERIC,oPC);
int iDrd = GetLevelByClass(CLASS_TYPE_DRUID,oPC);
if (iClr < 1 && iDrd <1)
{
SetCustomToken(1970000,"This alchemy proccess requires a Cleric or Druid.");
return;
}
}
// Create List of Items inside of Material Chest;
int iIndex = 0;
string sIndexTag;
int iMaxIndex;
int iTemp;
string sTemp;
oItem = GetFirstItemInInventory(oMatChest);
while(GetIsObjectValid(oItem))
{
sTag = GetTag(oItem);
iTemp = GetLocalInt(OBJECT_SELF,sTag);
if (iTemp==0)
{
// Update iIndex
iIndex++;
if (iIndex<100)
{
sTemp = "0";
}
if (iIndex<10)
{
sTemp = "00";
}
SetLocalString(OBJECT_SELF,"INDEX_"+sTemp+IntToString(iIndex),sTag);
SetLocalInt(OBJECT_SELF,sTag,1);
SendMessageToPC(oPC,"DEBUG: Creating Index "+IntToString(iIndex));
}
else
{
SetLocalInt(OBJECT_SELF,sTag,iTemp+1);
}
oItem = GetNextItemInInventory(oMatChest);
}
// Items found, now compair agains items inside the Componant Chest.
// Compair & Destroy Local Varibles.
iPass = FALSE;
if (iIndex>0)
{
iMaxIndex = iIndex;
int iNum,iReq,iArray;
for (iIndex=1;iIndex<=iMaxIndex;iIndex++)
{
sBase = "INDEX_";
if (iIndex<100)
{
sTemp = "0";
}
if (iIndex<10)
{
sTemp = "00";
}
sBase+=sTemp+IntToString(iIndex);
sTemp = GetLocalString(OBJECT_SELF,sBase);
DeleteLocalString(OBJECT_SELF,sBase);
iTemp = GetLocalInt(OBJECT_SELF,sTemp);
DeleteLocalInt(OBJECT_SELF,sTemp);
// Compair Chests info
iReq = iTemp;
iNum = GetNumItems(oCChest,sTemp);
if (iNum >= iReq)
{
iPass = TRUE;
oItem = GetFirstItemInInventory(oCChest);
while (GetIsObjectValid(oItem))
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oCChest);
}
}
}
// Not Enough Materials in Chest
if (iPass == FALSE)
{
SetCustomToken(1970000,"You lack enough materials to make this magic powder.");
return;
}
}
else
{
SetCustomToken(1970000,"ERROR: No Materials found in Material Chest Report to Builder. Material Chest Tag ["+GetTag(oMatChest)+"]");
return;
}
}
// Last Step
if (iPass==TRUE)
{
string sGrade;
string sBluePrint = "";
oItem = GetFirstItemInInventory(oLecturn);
sTag = GetStringLeft(GetTag(oItem),8);
sGrade = GetStringRight(sTag,1);
if (sGrade == "A")
{
sBluePrint = "asg_magicpowdera";
SetCustomToken(1970000,"One bag of Grade A Magic Powder worth 10,000gp");
}
else if (sGrade == "B")
{
sBluePrint = "asg_magicpowderb";
SetCustomToken(1970000,"One bag of Grade B Magic Powder worth 1,000gp");
}
else if (sGrade == "C")
{
sBluePrint = "asg_magicpowderc";
SetCustomToken(1970000,"One bag of Grade C Magic Powder worth 100gp");
}
else
{
SetCustomToken(1970000,"ERROR: Could not identify Magic Powder Type. Report to Mod Builder.");
return;
}
oItem = CreateItemOnObject(sBluePrint,oPC,1);
}
}
}
else
{
SetCustomToken(1970000,"ERROR: No Lecturn Found.");
}
}

View File

@@ -0,0 +1,112 @@
//::///////////////////////////////////////////////
//:: Name(ASG_RULE) Setup Magic Items
//:: FileName
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Used for assembiling magic items Vol 1.
*/
//:://////////////////////////////////////////////
//:: Created By: Donny Wilbanks
//:: Created On: 02/17/03
//:://////////////////////////////////////////////
// asg_REQ1(object oPC,int vREQ, int vNUM);
#include "nw_i0_plot"
#include "asg_include_mics"
string sPower = GetLocalString(OBJECT_SELF,"ASG_BUILDITEM_ARCDIVALL");
int iClass = GetLocalInt(OBJECT_SELF,"ASG_BUILDITEM_REQUIREDCLASS");
int iRclass = GetLocalInt(OBJECT_SELF,"ASG_BUILDITEM_CREATORSLEVEL");
int iLevelR = GetLocalInt(OBJECT_SELF,"ASG_BUILDITEM_LEVELREQUIRED");
int iGPCost = GetLocalInt(OBJECT_SELF,"ASG_BUILDITEM_MATERIALCOST");
int iXPCost = GetLocalInt(OBJECT_SELF,"ASG_BUILDITEM_XPLOSS");
string sBluePrint = GetLocalString(OBJECT_SELF,"ASG_BUILDITEM_BLUEPRINT");
int StartingConditional()
{
int iResult = FALSE;
int iBBonus = 0;
int iBaseType;
object oPC = GetPCSpeaker();
object oCChest = GetNearestObjectByTag("ASG_CCHEST",OBJECT_SELF);
if (GetIsObjectValid(oCChest))
{
string sGradeC = "MagicPowder";
string sGradeB = "MagicPowderGradeB";
string sGradeA = "MagicPowderGradeA";
string sTag;
int iGPTotal = 0;
object oItem = GetFirstItemInInventory(oCChest);
while (GetIsObjectValid(oItem))
{
sTag = GetTag(oItem);
if (sTag==sGradeC || sTag==sGradeB || sTag==sGradeA)
{
iGPTotal = iGPTotal + GetGoldPieceValue(oItem);
SetLocalInt(oItem,"ASG_SETTODESTROY",TRUE);
}
oItem = GetNextItemInInventory(oCChest);
}
// SendMessageToPC(oPC,"DEBUG: Cost = "+IntToString(iGPCost)+", Materials Supplied = "+IntToString(iGPTotal));
if (iGPTotal >= iGPCost) iResult = TRUE;
if (iResult==TRUE)
{
string sChestTag = "ASG_TTEMPSTORAGECHEST";
object oChest = GetObjectByTag(sChestTag);
string sBaseType;
int iGP2 = 0;
if (GetIsObjectValid(oChest))
{
object oItem = GetLocalObject(OBJECT_SELF,"ASG_BUILDITEM_ITEM");
if (GetIsObjectValid(oItem))
{
iBaseType = GetBaseItemType(oItem);
iGP2 = GetGold(oItem);
SetLocalString(OBJECT_SELF,"ASG_BUILDITEM_BLUEPRINT",GetResRef(oItem));
}
else
{
iResult = FALSE;
SendMessageToPC(oPC,"(!) Construction Error, Item is not avaible to be built in module.");
}
if (iResult == TRUE)
{
object oItem2 = GetFirstItemInInventory(oCChest);
int iMlevel = 0;
iResult = FALSE;
while(GetIsObjectValid(oItem2) && iResult!=TRUE)
{
if (GetBaseItemType(oItem2)==iBaseType && GetPlotFlag(oItem2)!=TRUE)
{
iResult = TRUE;
iMlevel = FindItemLevel(oItem);
SetLocalInt(oItem2,"ASG_SETTODESTROY",TRUE);
}
oItem2 = GetNextItemInInventory(oCChest);
}
}
}
}
if (iResult==TRUE)
{
int nHD = GetHitDice(oPC);
int nXP = GetXP(oPC);
// * You can not lose a level with this respawning
int nMin = ((nHD * (nHD - 1)) / 2) * 1000;
int nNewXP = nXP - iXPCost;
if (nNewXP < nMin)
{
iResult = FALSE;
SendMessageToPC(oPC,"(!)Warning: You need to gain more experince before building this item, you would lose a level if you did build it.");
PlaySound("as_cv_glasbreak2");
}
else
{
SetXP(oPC, nNewXP);
}
}
}
return iResult;
}

View File

@@ -0,0 +1,132 @@
//::///////////////////////////////////////////////
//:: Name ASG Custom Inlcude
//:: FileName asg_i_dbcustom
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
This is the file that the Module Maker should
modify when creating Varibles that are stored
on the Database.
When updated come to the way that it reads and
writes and the file maintiace retouines perfected
this included should not be changed.
*/
//:://////////////////////////////////////////////
//:: Created By: Donny Wilbanks
//:: Created On: 6/24/03
//:://////////////////////////////////////////////
void Asg_PB_CustomRead(object oPlayer)
{
object oMOD = GetModule();
string sPDB = GetPCPlayerName(oPlayer); // Individule Player Database Name;
string sName = GetName(oPlayer);
string CDKey = GetPCPublicCDKey(oPlayer);
string sID = GetStringLeft(sName,20); // Indivudual Character Used inside the
string sHID = sName+CDKey; // Hcr Style;
// ** Add your Custom Information Here, The defualts here are the ones I crafted
// * Some mod makers may have alrady used another. So I left it up to you to toss
// out what you don't like. The Example in the Readme Docs is at the end of the
// function.
SetLocalString(oMOD,sHID+"SP_RACE",GetCampaignString(sPDB,sID+"SP_RACE",oPlayer));
SetLocalString(oMOD,sHID+"SP_STATUS",GetCampaignString(sPDB,sID+"SP_STATUS",oPlayer));
SetLocalString(oMOD,sHID+"SP_STATUSSUB",GetCampaignString(sPDB,sID+"SP_STATUSSUB",oPlayer));
SetLocalInt(oMOD,sHID+"NoC_KILL",GetCampaignInt(sPDB,sID+"NoC_KILL",oPlayer));
SetLocalInt(oMOD,sHID+"NoC_MosPHD",GetCampaignInt(sPDB,sID+"NoC_MosPHD",oPlayer));
SetLocalString(oMOD,sHID+"NoC_MosName",GetCampaignString(sPDB,sID+"NoC_MosName",oPlayer));
SetLocalInt(oMOD,sHID+"NoP_MosPHD",GetCampaignInt(sPDB,sID+"NoP_MosPHD",oPlayer));
SetLocalString(oMOD,sHID+"NoP_MosName",GetCampaignString(sPDB,sID+"NoP_MosName",oPlayer));
SetLocalInt(oMOD,sHID+"NoP_KILLS",GetCampaignInt(sPDB,sID+"NoP_KILLS",oPlayer));
SetLocalInt(oMOD,sHID+"ASG_BANK",GetCampaignInt(sPDB,sID+"ASG_BANK",oPlayer));
SetLocalLocation(oPlayer,"LastLoc",GetCampaignLocation(sPDB,sID+"LastLocation",oPlayer));
// Hey! What's this Writing Doing Here?
// * Note, this means that the Player has made a effort to play on your
// Server. This reflects his "Active" status.
SetCampaignInt(sPDB,"Last_Y_Play",GetCalendarYear());
SetCampaignInt(sPDB,"Last_M_Play",GetCalendarMonth());
SetLocalInt(oMOD,sHID+"J_Year",GetCampaignInt(sPDB,sID+"J_Year"));
SetLocalInt(oMOD,sHID+"J_Month",GetCampaignInt(sPDB,sID+"J_Month"));
SetLocalInt(oMOD,sHID+"J_Day",GetCampaignInt(sPDB,sID+"J_Day"));
// ** Update Players Hitpoints
int iCurHp = GetCampaignInt(sPDB,sID+"HitPoints",oPlayer);
if (iCurHp < GetMaxHitPoints(oPlayer))
{
// Damage Character
int iDif = GetMaxHitPoints(oPlayer) - iCurHp;
effect eDamage = EffectDamage(iDif,DAMAGE_TYPE_MAGICAL,DAMAGE_POWER_PLUS_FIVE);
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oPlayer));
DelayCommand(12.0,AssignCommand(oPlayer,ActionJumpToLocation(GetCampaignLocation(sPDB,sID+"LastLocation",oPlayer))));
}
// ** Example: Read Currently Age from Database
SetLocalInt(oMOD,sHID+"AGE",GetCampaignInt(sPDB,sID+"AGE"));
//
}
void Asg_PB_CustomWrite(object oPlayer)
{
object oMOD = GetModule();
string sPDB = GetPCPlayerName(oPlayer); // Individule Player Database Name;
string sName = GetName(oPlayer);
string CDKey = GetPCPublicCDKey(oPlayer);
string sID = GetStringLeft(sName,20); // Indivudual Character Used inside the
string sHID = sName+CDKey; // Hcr Style;
// ** Add your Custom Information Here
SetCampaignString(sPDB,sID+"SP_RACE",GetLocalString(oMOD,sHID+"SP_RACE"),oPlayer);
SetCampaignString(sPDB,sID+"SP_STATUS",GetLocalString(oMOD,sHID+"SP_STATUS"),oPlayer);
SetCampaignString(sPDB,sID+"SP_STATUSSUB",GetLocalString(oMOD,sHID+"SP_STATUSSUB"),oPlayer);
SetCampaignInt(sPDB,sID+"NoC_KILL",GetLocalInt(oMOD,sHID+"NoC_KILL"),oPlayer);
SetCampaignInt(sPDB,sID+"NoC_MosPHD",GetLocalInt(oMOD,sHID+"NoC_MosPHD"),oPlayer);
SetCampaignString(sPDB,sID+"NoC_MosName",GetLocalString(oMOD,sID+"NoC_MosName"),oPlayer);
SetCampaignInt(sPDB,sID+"NoC_MosPHD",GetLocalInt(oMOD,sHID+"NoC_MosPHD"),oPlayer);
SetCampaignString(sPDB,sID+"NoP_MosName",GetLocalString(oMOD,sID+"NoP_MosName"),oPlayer);
SetCampaignInt(sPDB,sID+"NoP_KILLS",GetLocalInt(oMOD,sHID+"NoP_KILLS"),oPlayer);
SetCampaignInt(sPDB,sID+"ASG_BANK",GetLocalInt(oMOD,sHID+"ASG_BANK"),oPlayer);
SetCampaignLocation(sPDB,sID+"LastLoc",GetLocation(oPlayer),oPlayer);
int iCurHp = GetCurrentHitPoints(oPlayer);
SetCampaignInt(sPDB,sID+"HitPoints",iCurHp,oPlayer);
if (ASG_DEBUG==TRUE)
{
PrintString(" sPDB: "+sPDB+", sID: "+sID+", "+sID+"HitPoints");
PrintString(" Current HP = "+IntToString(iCurHp));
PrintString(" QuickRB Hp = "+IntToString(GetCampaignInt(sPDB,sID+"HitPoints",oPlayer)));
}
// *****************************************************************
// ** Example: Recored Currently Age to Database
SetCampaignInt(sPDB,sID+"AGE",GetLocalInt(oMOD,sHID+"AGE"),oPlayer);
//
}
void Asg_PB_CustomConfig(object oPlayer)
{
object oMOD = GetModule();
string sPDB = GetPCPlayerName(oPlayer); // Individule Player Database Name;
string sName = GetName(oPlayer);
string CDKey = GetPCPublicCDKey(oPlayer);
string sID = GetStringLeft(sName,20); // Indivudual Character Used inside the
string sHID = sName+CDKey; // Hcr Style;
// ** Add your Custom Information Here
SetLocalInt(oMOD,sHID+"SP_RACE",0);
SetLocalInt(oMOD,sHID+"SP_STATUS",0);
SetLocalInt(oMOD,sHID+"SP_STATUSSUB",0);
SetLocalInt(oMOD,sHID+"NoC_KILLS",0);
SetLocalInt(oMOD,sHID+"NoC_MosPHD",0);
SetLocalString(oMOD,sHID+"NoC_MosName","NA");
SetLocalInt(oMOD,sHID+"NoP_MosPHD",0);
SetLocalString(oMOD,sHID+"NoP_MosName","NA");
SetLocalInt(oMOD,sHID+"NoP_KILLS",0);
SetLocalInt(oMOD,sHID+"ASG_BANK",0);
SetLocalInt(oMOD,sHID+"J_Year",GetCalendarYear());
SetLocalInt(oMOD,sHID+"J_Month",GetCalendarMonth());
SetLocalInt(oMOD,sHID+"J_Day",GetCalendarDay());
// ** Example: Set Current Age for the 1st time.
int iAge = GetAge(oPlayer); // Gets the age as the Characters First Visit
SetLocalInt(oMOD,sHID+"AGE",iAge);
}

View File

@@ -0,0 +1,286 @@
//::///////////////////////////////////////////////
//:: Name ASG Player Database Include
//:: FileName asg_i_dbplayer
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
This is the primarly include, this preforms allot of
the maintnace for the the database
*/
//:://////////////////////////////////////////////
//:: Created By: Donny Wilbanks
//:: Created On: 6/24/03
//:://////////////////////////////////////////////
// * List of Varibles Used. Here is a good place to list your varibles used
// * in your player Database. Good Way would to be list the strings and what
// * type
// *** Player "sPDB"
//
// Name Type Notes
//
// Last_Y_Play I Last Year Played
// Last_M_Play I Last Month Played
//
// **** Character "varibles"
//
// Name Type Notes
// PlayerID I Player Number
// CharaceterID I Character Number
// SP_RACE S Special Race, this goes a bit beyond
// the "GetSubRace". Lets you add something
// custom here.
// SP_STATUS S Special Status, maybe used for like being
// Undead...
// SP_STATUSSUB S Another Special Status that can be used
// NoC_KILL I Number of Creatures Killed
// NoC_MosPHD I Most Powerful Creature HD killed.
// NoC_MosName S Name of Most Powerful Creature Killed
// NoP_MosPHD I Most Powerful PC killed
// NoP_MosName S Name of Last PC Killed
// NoP_KILLS I Number of PC's Killed
// ASG_BANK F Hey Bank Access! Varible to Store Gold!
// LastLocation L Last Location.
// J_Year I Year Joined Server
// J_Month I Month Joined Server
// J_Day I Day Joined Server
// HitPoints I Current Hit Points;
// **** Moduble Database
//
// Name Type Notes:
//
// No_Players I Number of Players - Used to do searching
// PL_XX I Basic Player ID Number
// PL_XX_NAME S Player Login Name - Points to the Player Database
// PL_XX_CDKEY S Public CD Key for Player XX
// PL_XX_ACTIVE I is the Player Active, mostly used for place holding
// *******************************************************************
// *
// * ASG Player Database
// *
// This creates a serperate Database for EACH player storing characters
// and special information pertaining to that PLAYER. Database Structure
//
// Module player Database - This holds allot of module related information
// (sMDB)
// :
// :
// \.......... Player Database - This holds his Characters and
// (sPDB) other player and charater info.
//
#include "asg_i_dbcustom"
int ASG_DEBUG = TRUE;
void PlayerDatabase(string sReadWriteInit,object oPlayer)
{
object oMOD = GetModule(); // Module Object
string sMod = GetTag(oMOD); // Module Tag, used as part of the Database Name;
string sMDB = "MDB_"+sMod; // Master Player Database name
string sPDB = GetPCPlayerName(oPlayer); // Individule Player Database Name;
// In order to try to create a Unique Key with limited Characters
// Use the 1st and last 4 letters Characters Name and Public CD Key.
// this will leave use 12 characters for varible information.
string sName = GetName(oPlayer);
string sLeft = GetStringLeft(sName,4);
string sRight = GetStringRight(sName,4);
string CDKey = GetPCPublicCDKey(oPlayer);
string sID = GetStringLeft(sName,20); // Indivudual Character Used inside the
string sHID = sName+CDKey; // Hcr Style;
// Player Databse (sPDB) as Unique Varible name for player.
int iPlayerIndex;
//
int iRWI = 0; // Defualt for Error Recoreding
if (sReadWriteInit=="R") iRWI = 1; // Read from Player Database
if (sReadWriteInit=="W") iRWI = 2; // Write to Player Databse
if (sReadWriteInit=="I") iRWI = 3; // Intiatlise Global Varibles for Player
if (sReadWriteInit=="S") iRWI = 4; // Setup New Character;
if (sReadWriteInit=="M") iRWI = 5; // Purge Old Recored.
// ****************************
// *
// * ASG Database for Player
// *
// ** Set up HCR ID system;
int iCharacterIndex;
//
int iPlayedBefore = GetCampaignInt(sPDB,sID+"_CHINDEX");
switch(iRWI)
{
case(1): // * Read
{
if (ASG_DEBUG==TRUE)
{
PrintString("(*) Reading from "+sPDB+" database, character "+sID+".");
}
SetLocalInt(oMOD,sHID+"PlayerID",GetCampaignInt(sPDB,sID+"PlayerID",oPlayer));
SetLocalInt(oMOD,sHID+"CharIndex",GetCampaignInt(sPDB,"CharIndex"));
SetLocalInt(oMOD,sHID+"CharID",GetCampaignInt(sPDB,sID+"CharID",oPlayer));
// Go to Your Custom Information
Asg_PB_CustomRead(oPlayer);
} break;
// * Save
case(2): // * Write
{
if (ASG_DEBUG==TRUE)
{
PrintString("(*) Writing to "+sPDB+" database on character "+sID+".");
}
SendMessageToPC(oPlayer,"(~) Updating your database.");
// Get Custom Infromation
Asg_PB_CustomWrite(oPlayer);
} break;
case(3): // Intiate New Character
{
SendMessageToPC(oPlayer,"(*) Updating "+sPDB+" for new Character "+sName);
// Setting Up New Account - Create and Update Player Index.
SetLocalInt(oMOD,sID+"PlayerID",GetCampaignInt(sPDB,"MDB_ID"));
int iCharID = GetCampaignInt(sPDB,"CharIndex")+1;
SetLocalInt(oMOD,sHID+"CharID",iCharID);
// Setup New Player Index Card
// * Welcome Message
if (ASG_DEBUG==TRUE)
{
PrintString("(*) New Character, "+sName+" being added to player "+sPDB+" database.");
}
// Special One Time Writing, Required by the Database
SetCampaignInt(sPDB,sID+"PlayerID",GetLocalInt(oMOD,sHID+"PlayerID"));
SetCampaignInt(sPDB,"CharIndex",iCharID);
SetCampaignInt(sPDB,sID+"CharID",GetLocalInt(oMOD,sHID+"CharID"),oPlayer);
if (ASG_DEBUG==TRUE)
{
PrintString(" Finished adding new Character.");
}
// *** Summon Up Custom Database
Asg_PB_CustomConfig(oPlayer);
//
SendMessageToPC(oPlayer," Completed Update.");
} break;
case(4): // Setup a New Player
{
if (ASG_DEBUG==TRUE)
{
PrintString("(*) Adding new Player "+sPDB+" to Database.");
}
SendMessageToPC(oPlayer,"(*) Creating a new Account for "+sPDB);
// Add to Master Database The followin Information
int iModPlayerIndex = GetCampaignInt(sMDB,"No_Players");
string sPlayerNum;
string sPlayerModID;
string sPlayerName;
string sPlayerCDKey;
string sPlayerActive;
int iK;
// Search for Holes in the MDB Database, Look for 1st Avaible Slot
int iHole = 0;
int iIndex = iModPlayerIndex;
for (iK = iIndex;iK>0;iK--)
{
sPlayerNum = IntToString(iK);
sPlayerModID = "PL_"+sPlayerNum;
sPlayerActive = "ACTIVE_"+sPlayerModID;
if (GetCampaignInt(sMDB,sPlayerActive)==FALSE) iHole = iK;
}
// Found hole or Create NEW recored
if (iHole == 0)
{
iModPlayerIndex++;
SetCampaignInt(sMDB,"No_Players",iModPlayerIndex);
}
else
{
iModPlayerIndex = iHole;
}
sPlayerNum = IntToString(iModPlayerIndex);
if (ASG_DEBUG==TRUE)
{
PrintString(" (~) Player ID Number = "+sPlayerNum);
}
sPlayerNum = IntToString(iModPlayerIndex);
sPlayerName = "NAME_PL_"+sPlayerNum;
sPlayerCDKey = "CDKEY_PL_"+sPlayerNum;
sPlayerActive = "ACTIVE_PL_"+sPlayerNum;
SetCampaignInt(sPDB,"MDB_ID",iModPlayerIndex);
SetCampaignString(sMDB,sPlayerName,sPDB);
SetCampaignString(sMDB,sPlayerCDKey,CDKey);
SetCampaignInt(sMDB,sPlayerActive,TRUE);
SetCampaignInt(sPDB,"Last_Y_Play",GetCalendarYear());
SetCampaignInt(sPDB,"Last_M_Play",GetCalendarMonth());
if (ASG_DEBUG==TRUE)
{
PrintString(" Finsihed adding new player.");
}
//
SendMessageToPC(oPlayer," Completed new Account.");
} break;
case(5): // Database Maintance
{
// This is designed to "Cleanup" in active accounts and automaticly
// remove databases that are not in use. Good to use Module Load
if (ASG_DEBUG==TRUE)
{
PrintString("(*) Start of Database Clean Up.");
}
string sPlayerNum;
string sPlayerModID;
string sPlayerName;
string sPlayerCDKey;
string sPlayerActive;
int iDelete = GetLocalInt(oMOD,"ASG_MOD_CLEANYEAR");
int iLast;
int iNow = (GetCalendarYear()*10000)+(GetCalendarMonth()*1000);
int iK = 0;
int iIndex = GetCampaignInt(sMDB,"No_Players");
for (iK = 1;iK<=iIndex;iK++)
{
sPlayerNum = IntToString(iK);
sPlayerModID = "PL_"+sPlayerNum;
sPlayerName = "NAME_PL_"+sPlayerNum;
sPlayerActive = "ACTIVE_PL_"+sPlayerNum;
//
iLast = GetCampaignInt(sPDB,"Last_Y_Play")*10000;
iLast += GetCampaignInt(sPDB,"Last_M_Play")*1000;
iLast += iDelete;
if (iLast>iNow) // Delete Old Recored;
{
if (ASG_DEBUG==TRUE)
{
PrintString(" Player Database Updated, Removing "+sPDB+" from database.");
}
DestroyCampaignDatabase(sPDB);
DeleteCampaignVariable(sMDB,sPlayerName);
DeleteCampaignVariable(sMDB,sPlayerCDKey);
SetCampaignInt(sMDB,sPlayerActive,FALSE);
if (ASG_DEBUG==TRUE)
{
PrintString("(!) End Database Clean Up.");
}
}
}
} break;
default:;
SendMessageToPC(oPlayer,"(!) Database Error, Unreconginsed Command "+IntToString(iRWI)+".");
PrintString("(!) ERROR: Database Command "+IntToString(iRWI));
}
}
/*
USed ony to Debug the Script
void main()
{
PlayerDatabase("W",OBJECT_SELF);
}
*/

View File

@@ -0,0 +1,129 @@
// This is the ASG Custom Inlcude
// int FindItemLevel(object oItem);
int FindItemLevel(object oItem)
{
int iGoldValue;
int iBaseType;
// Scroll & Potion Level
// Load Values
// ** Store Item Level Restrictions
int iLevel_1 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_1");
int iLevel_2 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_2");
int iLevel_3 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_3");
int iLevel_4 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_4");
int iLevel_5 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_5");
int iLevel_6 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_6");
int iLevel_7 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_7");
int iLevel_8 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_8");
int iLevel_9 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_9");
int iLevel_10 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_10");
int iLevel_11 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_11");
int iLevel_12 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_12");
int iLevel_13 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_13");
int iLevel_14 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_14");
int iLevel_15 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_15");
int iLevel_16 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_16");
int iLevel_17 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_17");
int iLevel_18 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_18");
int iLevel_19 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_19");
int iLevel_20 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_20");
int iLevel_Plus = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_Plus");
// Set Potion & Scroll Level Restrictions
int iLevel_p1 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p1");
int iLevel_p2 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p2");
int iLevel_p3 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p3");
int iLevel_p4 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p4");
int iLevel_p5 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p5");
int iLevel_p6 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p6");
int iLevel_p7 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p7");
int iLevel_p8 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p8");
int iLevel_p9 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p9");
int iLevel_p10 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p10");
int iLevel_p11 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p11");
int iLevel_p12 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p12");
int iLevel_p13 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p13");
int iLevel_p14 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p14");
int iLevel_p15 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p15");
int iLevel_p16 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p16");
int iLevel_p17 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p17");
int iLevel_p18 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p18");
int iLevel_p19 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p19");
int iLevel_p20 = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_p20");
int iLevel_pPlus = GetLocalInt(GetModule(),"ASG_MICS_ITEM_LEVEL_pPlus");
int nIDd = GetIdentified(oItem);
if(nIDd == FALSE)
{
SetIdentified(oItem, TRUE);
iGoldValue = GetGoldPieceValue(oItem);
SetIdentified(oItem, FALSE);
} else {
iGoldValue = GetGoldPieceValue(oItem);
}
iBaseType = GetBaseItemType(oItem);
if (iBaseType == BASE_ITEM_POTIONS || iBaseType == BASE_ITEM_SPELLSCROLL || iBaseType == BASE_ITEM_SCROLL)
{
if(iGoldValue <= iLevel_p1) return 1;
if(iGoldValue > iLevel_p1 && iGoldValue <= iLevel_p2) return 2;
if(iGoldValue > iLevel_p2 && iGoldValue <= iLevel_p3) return 3;
if(iGoldValue > iLevel_p3 && iGoldValue <= iLevel_p4) return 4;
if(iGoldValue > iLevel_p4 && iGoldValue <= iLevel_p5) return 5;
if(iGoldValue > iLevel_p5 && iGoldValue <= iLevel_p6) return 6;
if(iGoldValue > iLevel_p6 && iGoldValue <= iLevel_p7) return 7;
if(iGoldValue > iLevel_p7 && iGoldValue <= iLevel_p8) return 8;
if(iGoldValue > iLevel_p8 && iGoldValue <= iLevel_p9) return 9;
if(iGoldValue > iLevel_p9 && iGoldValue <= iLevel_p10) return 10;
if(iGoldValue > iLevel_p10 && iGoldValue <= iLevel_p11) return 11;
if(iGoldValue > iLevel_p11 && iGoldValue <= iLevel_p12) return 12;
if(iGoldValue > iLevel_p12 && iGoldValue <= iLevel_p13) return 13;
if(iGoldValue > iLevel_p13 && iGoldValue <= iLevel_p14) return 14;
if(iGoldValue > iLevel_p14 && iGoldValue <= iLevel_p15) return 15;
if(iGoldValue > iLevel_p15 && iGoldValue <= iLevel_p16) return 16;
if(iGoldValue > iLevel_p16 && iGoldValue <= iLevel_p17) return 17;
if(iGoldValue > iLevel_p17 && iGoldValue <= iLevel_p18) return 18;
if(iGoldValue > iLevel_p18 && iGoldValue <= iLevel_p19) return 19;
if(iGoldValue > iLevel_p19 && iGoldValue <= iLevel_p20) return 20;
if(iGoldValue > iLevel_p20)
{
iGoldValue=iGoldValue-iLevel_p20;
iGoldValue=iGoldValue/iLevel_pPlus;
iGoldValue+=20;
return iGoldValue;
}
}
else
{
if(iGoldValue <= iLevel_1) return 1;
if(iGoldValue > iLevel_1 && iGoldValue <= iLevel_2) return 2;
if(iGoldValue > iLevel_2 && iGoldValue <= iLevel_3) return 3;
if(iGoldValue > iLevel_3 && iGoldValue <= iLevel_4) return 4;
if(iGoldValue > iLevel_4 && iGoldValue <= iLevel_5) return 5;
if(iGoldValue > iLevel_5 && iGoldValue <= iLevel_6) return 6;
if(iGoldValue > iLevel_6 && iGoldValue <= iLevel_7) return 7;
if(iGoldValue > iLevel_7 && iGoldValue <= iLevel_8) return 8;
if(iGoldValue > iLevel_8 && iGoldValue <= iLevel_9) return 9;
if(iGoldValue > iLevel_9 && iGoldValue <= iLevel_10) return 10;
if(iGoldValue > iLevel_10 && iGoldValue <= iLevel_11) return 11;
if(iGoldValue > iLevel_11 && iGoldValue <= iLevel_12) return 12;
if(iGoldValue > iLevel_12 && iGoldValue <= iLevel_13) return 13;
if(iGoldValue > iLevel_13 && iGoldValue <= iLevel_14) return 14;
if(iGoldValue > iLevel_14 && iGoldValue <= iLevel_15) return 15;
if(iGoldValue > iLevel_15 && iGoldValue <= iLevel_16) return 16;
if(iGoldValue > iLevel_16 && iGoldValue <= iLevel_17) return 17;
if(iGoldValue > iLevel_17 && iGoldValue <= iLevel_18) return 18;
if(iGoldValue > iLevel_18 && iGoldValue <= iLevel_19) return 19;
if(iGoldValue > iLevel_19 && iGoldValue <= iLevel_20) return 20;
if(iGoldValue > iLevel_20)
{
iGoldValue=iGoldValue-iLevel_20;
iGoldValue=iGoldValue/iLevel_Plus;
iGoldValue+=20;
return iGoldValue;
}
}
return 0;
}

View File

@@ -0,0 +1,38 @@
//::///////////////////////////////////////////////
//:: FileName resref
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 2/18/03 2:54:15 AM
//:://////////////////////////////////////////////
int StartingConditional()
{
// Restrict based on the player's class
int iPassed = 0;
if((iPassed == 0) && (GetLevelByClass(CLASS_TYPE_CLERIC, GetPCSpeaker()) >= 1))
iPassed = 1;
if((iPassed == 0) && (GetLevelByClass(CLASS_TYPE_SORCERER, GetPCSpeaker()) >= 1))
iPassed = 1;
if((iPassed == 0) && (GetLevelByClass(CLASS_TYPE_DRUID, GetPCSpeaker()) >= 1))
iPassed = 1;
if((iPassed == 0) && (GetLevelByClass(CLASS_TYPE_WIZARD, GetPCSpeaker()) >= 1))
iPassed = 1;
if(iPassed == 0)
return FALSE;
string sArDiv = GetLocalString(OBJECT_SELF,"ASG_MIC_MAGICTYPE");
string sTag;
if (sArDiv=="A")
{
sTag="ASG_ENANVIL";
}
else
{
sTag="ASG_ENALTER";
}
object oTarget = GetNearestObjectByTag(sTag,OBJECT_SELF);
ExecuteScript("asg_rul_micscfx",oTarget);
return TRUE;
}

View File

@@ -0,0 +1,65 @@
#include "nw_i0_plot"
string sBluePrint = GetLocalString(OBJECT_SELF,"ASG_BUILDITEM_BLUEPRINT");
int rMISC_COPYOBJECT = GetLocalInt(GetModule(),"ASG_MICS_COPYOBJECT");
int rMISC_TIME = GetLocalInt(GetModule(),"ASG_MICS_BUILDTIME");
//
void main()
{
object oPC = GetPCSpeaker();
object oCChest = GetNearestObjectByTag("ASG_CCHEST",OBJECT_SELF);
if (GetIsObjectValid(oCChest))
{
string sTag;
int iGPTotal = 0;
object oItem = GetFirstItemInInventory(oCChest);
while (GetIsObjectValid(oItem))
{
if (GetLocalInt(oItem,"ASG_SETTODESTROY")==TRUE)
{
DelayCommand(0.25,DestroyObject(oItem));
}
oItem = GetNextItemInInventory(oCChest);
}
}
int iNum = 1;
object oNewItem;
if (rMISC_COPYOBJECT==TRUE)
{
oNewItem = CopyObject(oNewItem,GetLocation(oPC),oPC);
}
else
{
oNewItem = CreateItemOnObject(sBluePrint,oPC,iNum);
// Check to see if worked if not Try & Copy the item..
if (GetIsObjectValid(oNewItem)==FALSE)
{
oNewItem = CopyObject(oNewItem,GetLocation(oPC),oPC);
if (GetIsObjectValid(oNewItem)==FALSE)
{
SendMessageToPC(oPC,"ERROR: Was unable to create item via ResRef & Unable to CopyObject - Please Contact Module Builder.");
return;
}
}
SetIdentified(oNewItem,TRUE);
int iType = GetBaseItemType(oNewItem);
SetIdentified(oNewItem,TRUE);
if (iType == BASE_ITEM_ARROW || iType==BASE_ITEM_BOLT || iType == BASE_ITEM_DART || iType ==BASE_ITEM_BULLET )
{
iNum = 49;
oNewItem = CreateItemOnObject(sBluePrint,oPC,iNum);
SetIdentified(oNewItem,TRUE);
}
}
SetIdentified(oNewItem,TRUE);
ExecuteScript("asg_rul_micscfx",OBJECT_SELF);
if (rMISC_TIME>0)
{
int iNow = (GetCalendarYear()*10000) + (GetCalendarMonth() * 1000) + (GetCalendarDay() * 100) + GetTimeHour();
SetLocalInt(OBJECT_SELF,"ASG_ALTARANVILTIME",iNow+rMISC_TIME);
}
}

View File

@@ -0,0 +1,24 @@
// Cleanup FX script for MICS.
void main()
{
object oTarget = OBJECT_SELF;
object oItem = GetLocalObject(oTarget,"ASG_BUILDITEM_ITEM");
object oFour = GetLocalObject(oTarget,"MICS_FX4");
object oThree = GetLocalObject(oTarget,"MICS_FX3");
object oTwo = GetLocalObject(oTarget,"MICS_FX2");
object oOne = GetLocalObject(oTarget,"MICS_FX1");
object oZero = GetLocalObject(oTarget,"MICS_FX0");
if (GetIsObjectValid(oFour)) DestroyObject(oFour);
if (GetIsObjectValid(oThree)) DestroyObject(oThree);
if (GetIsObjectValid(oTwo)) DestroyObject(oTwo);
if (GetIsObjectValid(oOne)) DestroyObject(oOne);
if (GetIsObjectValid(oZero)) DestroyObject(oZero);
if (GetIsObjectValid(oItem)) DeleteLocalObject(oTarget,"ASG_BUILDITEM_ITEM");
PlaySound("as_mg_frstmagic1");
}

View File

@@ -0,0 +1,121 @@
int StartingConditional()
{
int iResult = FALSE;
object oPC = GetPCSpeaker();
// get Lecturn
string sPower;
string sClass;
string sLevel;
string sGold;
string sChest;
string sBluePrint;
string sTag;
string sName;
string sText;
int iPass = FALSE;
// ** Search Area for Magical Focus
object oFocusLevel = GetNearestObjectByTag("asg_magicfocus_1",OBJECT_SELF);
int iFmod = 0;
if (GetIsObjectValid(oFocusLevel))
{
iFmod = 5;
}
else
{
oFocusLevel = GetNearestObjectByTag("asg_magicfocus_2",OBJECT_SELF);
if (GetIsObjectValid(oFocusLevel))
{
iFmod = 10;
}
else
{
oFocusLevel = GetNearestObjectByTag("asg_magicfocus_3",OBJECT_SELF);
if (GetIsObjectValid(oFocusLevel))
{
iFmod = 20;
}
else
{
oFocusLevel = GetNearestObjectByTag("asg_magicfocus_4",OBJECT_SELF);
if (GetIsObjectValid(oFocusLevel))
{
iFmod = 100;
}
else
{
oFocusLevel = GetNearestObjectByTag("asg_magicfocus_5",OBJECT_SELF);
if (GetIsObjectValid(oFocusLevel))
{
iFmod = -20;
}
}
}
}
}
// **
float vDist = 1.0; // old varible
if (vDist<=15.0)
{
object oCChest = GetNearestObjectByTag("ASG_CCHEST",OBJECT_SELF);
vDist = GetDistanceBetween(oCChest,OBJECT_SELF);
int vItem;
string sName;
if (vDist<=30.0)
{
object oItem = GetLocalObject(OBJECT_SELF,"ASG_BUILDITEM_ITEM");
if (GetIsObjectValid(oItem))
{
SetCustomToken(1970000,GetName(oItem));
sName = GetName(oItem);
iPass = TRUE;
}
else
{
FloatingTextStringOnCreature("Anvil/Alter Not ready, please use Research Desk First.",oPC,FALSE);
}
if (iPass==TRUE)
{
int iRLevel = GetLocalInt(OBJECT_SELF,"ASG_EFORGELEVELRSET");
if (iFmod<0) iRLevel = iRLevel + (iFmod*-1);
else
{
iRLevel = iRLevel - iFmod;
}
sLevel = IntToString(iRLevel);
string sArDiv = GetLocalString(OBJECT_SELF,"ASG_MIC_MAGICTYPE");
int iClass;
int iPassLevel = FALSE;
if (sArDiv == "D")
{
int iClr = GetLevelByClass(CLASS_TYPE_CLERIC,oPC);
int iDrd = GetLevelByClass(CLASS_TYPE_DRUID,oPC);
if (iRLevel<=iClr || iRLevel+iFmod<=iDrd) iPassLevel=TRUE;
}
else
{
int iSor = GetLevelByClass(CLASS_TYPE_SORCERER,oPC);
int iWiz = GetLevelByClass(CLASS_TYPE_WIZARD,oPC);
if (iRLevel<=iSor || iRLevel<=iWiz) iPassLevel=TRUE;
}
int iGPValue=GetGoldPieceValue(oItem)/2;
SetLocalInt(OBJECT_SELF,"ASG_BUILDITEM_MATERIALCOST",iGPValue);
int iXPloss = iGPValue/25;if (iXPloss<1) iXPloss = 1;
SetLocalInt(OBJECT_SELF,"ASG_BUILDITEM_XPLOSS",iXPloss);
SetLocalString(OBJECT_SELF,"ASG_BUILDITEM_BLUEPRINT",sBluePrint);
SetLocalObject(OBJECT_SELF,"ASG_BUILDITEM_OBJECT",oItem);
if (iPassLevel==TRUE)
{
iResult = TRUE;
}
else
{
iResult = FALSE;
}
}
}
// get Componant Chest
}
return iResult;
}

View File

@@ -0,0 +1,16 @@
int StartingConditional()
{
int iResult = FALSE;
int rTime = GetLocalInt(GetModule(),"ASG_MICS_BUILDTIME");
if (rTime > 0)
{
iResult = TRUE;
int iNow = (GetCalendarYear()*10000)+ (GetCalendarDay()*100)+ (GetCalendarMonth()*1000) + GetTimeHour();
int iLast = GetLocalInt(OBJECT_SELF,"ASG_ALTARANVILTIME");
int iDif = iLast - iNow;
SetCustomToken(1970000,IntToString(iDif));
if (iNow>=iLast) iResult = FALSE;
}
return iResult;
}

View File

@@ -0,0 +1,17 @@
// Set up Custom Token for Enchanted Anivl/Holy Altar
int StartingConditional()
{
int iResult = TRUE;
string sTag = GetTag(OBJECT_SELF);
if (sTag=="ASG_ENANVIL")
{
SetCustomToken(1970001,"Enchanted Anvil");
}
else
{
SetCustomToken(1970001,"Holy Altar");
}
return iResult;
}

View File

@@ -0,0 +1,25 @@
// Set up Custom Token for Enchanted Anivl/Holy Altar
int StartingConditional()
{
object oPC = GetPCSpeaker();
int iResult = FALSE;
string sTag = GetTag(OBJECT_SELF);
if (sTag=="ASG_ENANVIL")
{
SetCustomToken(1970001,"Enchanted Anvil");
int iSor = GetLevelByClass(CLASS_TYPE_SORCERER,oPC);
int iWiz = GetLevelByClass(CLASS_TYPE_WIZARD,oPC);
if (iSor>0 || iWiz>0) iResult = TRUE;
}
else
{
SetCustomToken(1970001,"Holy Altar");
int iClr = GetLevelByClass(CLASS_TYPE_CLERIC,oPC);
int iDrd = GetLevelByClass(CLASS_TYPE_DRUID,oPC);
if (iClr>0 || iDrd>0) iResult = TRUE;
}
return iResult;
}

View File

@@ -0,0 +1,16 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.5
For download info, please visit:
http://www.lilacsoul.revility.com */
//Put this on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
CreateItemOnObject("jerkinsamulet", oPC);
}

View File

@@ -0,0 +1,36 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
//Put this OnDeath
void main()
{
object oPC = GetLastKiller();
if (!GetIsPC(oPC)) return;
object oTarget;
object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("wp_ambas_die");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "asyriangong01", lTarget);
oTarget = oSpawn;
//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_SUMMON_CELESTIAL), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL), GetLocation(oTarget));
}

View File

@@ -0,0 +1,99 @@
#include "nw_i0_generic"
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
//Put this on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
object oTarget;
oTarget = OBJECT_SELF;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("wp_asy_g_01");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "asyrianpixie", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
oTarget = oSpawn;
//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_DIVINE_STRIKE_FIRE), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE), GetLocation(oTarget));
oTarget = GetWaypointByTag("wp_asy_g_02");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "asyrianpixie", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
oTarget = oSpawn;
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE), GetLocation(oTarget));
oTarget = GetWaypointByTag("wp_asy_g_01");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "asyrianpixie", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
oTarget = oSpawn;
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE), GetLocation(oTarget));
}

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 on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_ass_ship_01");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

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 on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_ass_ship_02");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_02");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_03");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_04");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_05");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_06");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_07");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_08");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_09");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assdwarf_book_1");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_10");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_11");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_12");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_13");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_assbook_14");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,20 @@
//Script: cal_explode
// Exploding Death
void ExplodeAtLocation(location lTarget, int nDamage, int nSaveDC = 20, float fRadius = 15.) {
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIREBALL), lTarget);
object oObject = GetFirstObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
do {
int nDamageAfterSave = GetReflexAdjustedDamage(nDamage, oObject, nSaveDC);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamageAfterSave, DAMAGE_TYPE_FIRE), oObject);
} while ((oObject = GetNextObjectInShape(SHAPE_SPHERE, fRadius, lTarget)) != OBJECT_INVALID);
}
void main()
{
ExecuteScript("nw_c2_default7", OBJECT_SELF);
ExecuteScript("tab_xpscript",OBJECT_SELF);
location lSource = GetLocation(OBJECT_SELF);
DelayCommand(1., ExplodeAtLocation(lSource, d12(55)));
}

View File

@@ -0,0 +1,36 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
//Put this OnDeath
void main()
{
object oPC = GetLastKiller();
if (!GetIsPC(oPC)) return;
object oTarget;
object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("wp_noble_gong");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "noblegong009", lTarget);
oTarget = oSpawn;
//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_DIVINE_STRIKE_FIRE), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE), GetLocation(oTarget));
}

View File

@@ -0,0 +1,28 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
//Put this OnDeath
void main()
{
object oPC = GetLastKiller();
if (!GetIsPC(oPC)) return;
object oTarget;
oTarget = OBJECT_SELF;
//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_WAIL_O_BANSHEES), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_WAIL_O_BANSHEES), GetLocation(oTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_leave_asy_treas");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,34 @@
/* 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;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_asy_port_10");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

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 on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_atlantis_01");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,24 @@
#include "nw_i0_generic"
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.2
For download info, please visit:
http://www.angelfire.com/space/lilacsoul */
//Put this on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
object oTarget;
oTarget = OBJECT_SELF;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
}

View File

@@ -0,0 +1,46 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
//Goes OnPerceived of a creature
void main()
{
object oPC = GetLastPerceived();
if (!GetIsPC(oPC)) return;
if (!GetLastPerceptionSeen()) return;
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_balorjail");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
DelayCommand(1.5, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
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_IMPLOSION), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_IMPLOSION), GetLocation(oTarget));
}

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 on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_polarship_01");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,16 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
//Put this on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
AssignCommand(oPC, TakeGoldFromCreature(4000, oPC, TRUE));
}

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 on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("wp_bearship_02");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}

View File

@@ -0,0 +1,15 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
int StartingConditional()
{
object oPC = GetPCSpeaker();
if (GetItemPossessedBy(oPC, "HELMOFFLAWLESSGRACE") == OBJECT_INVALID) return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,15 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
int StartingConditional()
{
object oPC = GetPCSpeaker();
if (!(GetGold(oPC) >= 100000)) return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,15 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.2
For download info, please visit:
http://www.angelfire.com/space/lilacsoul */
int StartingConditional()
{
object oPC = GetPCSpeaker();
if (GetItemPossessedBy(oPC, "RAWMEAT") == OBJECT_INVALID) return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,31 @@
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 OnOpen
void main()
{
object oPC = GetLastOpenedBy();
if (!GetIsPC(oPC)) return;
if (!(GetHitDice(oPC) >= 15))
{
sDeny="You are not of the level 15 and cannot pass beyond this point";
SendMessageToPC(oPC, sDeny);
return;
}
object oTarget;
oTarget = GetObjectByTag("goto_sewers3");
AssignCommand(oTarget, ActionCloseDoor(oTarget));
}

View File

@@ -0,0 +1,15 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
int StartingConditional()
{
object oPC = GetPCSpeaker();
if (GetItemPossessedBy(oPC, "POLARBEARPELT") == OBJECT_INVALID) return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,15 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
int StartingConditional()
{
object oPC = GetPCSpeaker();
if (!(GetGold(oPC) >= 25000)) return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,15 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
int StartingConditional()
{
object oPC = GetPCSpeaker();
if (!(GetGold(oPC) >= 50000)) return FALSE;
return TRUE;
}

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

@@ -0,0 +1,15 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
int StartingConditional()
{
object oPC = GetPCSpeaker();
if (!(GetGold(oPC) >= 5000)) return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,15 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
int StartingConditional()
{
object oPC = GetPCSpeaker();
if (GetItemPossessedBy(oPC, "OLDBROOM20") == OBJECT_INVALID) return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,15 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.5
For download info, please visit:
http://www.lilacsoul.revility.com */
int StartingConditional()
{
object oPC = GetPCSpeaker();
if (GetItemPossessedBy(oPC, "DRAGONGEM") == OBJECT_INVALID) return FALSE;
return TRUE;
}

View File

@@ -0,0 +1,15 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
int StartingConditional()
{
object oPC = GetPCSpeaker();
if (GetItemPossessedBy(oPC, "ELVISARMOR") == OBJECT_INVALID) return FALSE;
return TRUE;
}

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