Added Faction Zoo
- igor doesn't give boxes if you choose to explore a bit, but he takes the contract anyway [quest-breaking] *Fixed. Moved some dialog around so you couldn't skip out on taking the quest after you gave up the letter. - key 'Pilgrims Cave Key' it_pilgrimscavek to plot-locked door isn't provided anywhere [quest-breaking] *Not a bug. Key drops from the Elder Goblin Shaman in Pilgrim's Cave Full compile. Updated release archive. - can't get farmer bouillon's quest if already offered to buy an ox [quest-breaking] *Couldn't replicate. Nothing in the dialog is locked regarding this. - jerusalem watch captain doesn't recognise letter to ogre mage [quest-breaking] *Fixed. Quest item tag was mispelled. - plot key 'amulet of thievery' [amuletofthievery] to plot-locked door never given anywhere *Not fixed. This may be for an incomplete area or quest. No NPC named "Fremmy South" exists in the module, nor is the name mentioned in dialogs. - key 'Lomendel's Front Door Key' [it_LomFrontKey] to plot-locked door never given anywhere. *Not fixed. This appears to be a DM or system area. No NPC named Lomendel exists & the only mention of them in the dialogs is by the Efreeti merchant in the area. - key it_RachelsRoomKey [rachelskey] to plot-locked door never given anywhere *Not fixed. This may be for an incomplete area or quest. No NPC named "Rachel" exists in the module, nor is the name mentioned in dialogs. There is nothing of note in the room. - east tower key given but no doors on any east towers anywhere *Not fixed. There is no "East Tower Key" in the item palette at all. Balkan East Tower doesn't require a key. - transitions within areas don't jump henchmen with pc *Fixed. Changed the triggers to use scripted transitions that bring all associates with the PC. - rd to bethlehem - broken trans [gate to nowhere] *Not fixed. Not an actual transition, There is no "Convent" in the area list. Gate description now tells you it's barred. - faction bugs with guards at pilgrims' rest *Maybe fixed. I added a "faction zoo" and set the merchant faction to neutral to all of the other factions. - faction bugs with watchmen in jerusalem *See above - dwarf captives in svirfneblin lair - invalid exit waypoint *Fixed. Added missing waypoint. - elvish grove quest journal doesn't close *Couldn't replicate. Journal entry cleared normally upon completion of the quest. - dwarven mine quest journal doesn't close *Fixed. Final journal entry wasn't set to close the quest. - idun's apple quest journal doesn't close *Fixed. Final journal entry wasn't set to close the quest. - implementation of climbing rope, while well-intentioned, doesn't work correctly *Couldn't replicate. Worked fine for me. https://i.imgur.com/45UC3xS.jpeg - doors close automatically without anyone to close them *Not a bug, desired behaivior. - henchmen don't level up *Fixed - when henchmen are dismissed, they don't just go back to where they were; they're destroyed and respawned *Fixed
This commit is contained in:
1498
_module/nss/69_hench_lib.nss
Normal file
1498
_module/nss/69_hench_lib.nss
Normal file
File diff suppressed because it is too large
Load Diff
77
_module/nss/69_hench_pickup.nss
Normal file
77
_module/nss/69_hench_pickup.nss
Normal file
@@ -0,0 +1,77 @@
|
||||
//Contributed by Mike Daneman aka. Mishenka
|
||||
//Modified: 69MEH69 Added more items to pick up
|
||||
#include "69_inc_henai"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oMaster = GetMaster();
|
||||
ClearAllActions();
|
||||
SetAssociateState(NW_ASC_IS_BUSY);
|
||||
int bFound = FALSE;
|
||||
string sName;
|
||||
location lCenter = GetLocation(OBJECT_SELF);
|
||||
object oThing = GetFirstObjectInShape(SHAPE_SPHERE,15.0,lCenter,TRUE,OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_ITEM);
|
||||
while(GetIsObjectValid(oThing))
|
||||
{
|
||||
if(GetObjectType(oThing)==OBJECT_TYPE_ITEM & GetTag(oThing)!="NW_IT_GOLD001")
|
||||
{
|
||||
bFound = TRUE;
|
||||
/*switch(GetBaseItemType(oThing)) {
|
||||
case BASE_ITEM_POTIONS:
|
||||
case BASE_ITEM_HEALERSKIT:
|
||||
case BASE_ITEM_SPELLSCROLL:
|
||||
case BASE_ITEM_ARMOR:*/
|
||||
sName = GetName(oThing);
|
||||
TurnToFaceObject(oThing);
|
||||
ActionPickUpItem(oThing);
|
||||
ActionDoCommand(SendMessageToPC(oMaster,GetName(OBJECT_SELF)+" picked up "+sName+"."));
|
||||
/*break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}*/
|
||||
}
|
||||
else // oThing is a placeable
|
||||
{
|
||||
if(GetHasInventory(oThing)) // Containers (including corpses)
|
||||
{
|
||||
// Don't search locked containers
|
||||
// Only search trapped containers if you can't see the trap
|
||||
if(!GetLocked(oThing) && (!GetIsTrapped(oThing)
|
||||
|| (GetIsTrapped(oThing) && !GetTrapDetectedBy(oThing,OBJECT_SELF))))
|
||||
{
|
||||
bFound = TRUE;
|
||||
ActionMoveToObject(oThing);
|
||||
ActionDoCommand(AssignCommand(oThing,PlayAnimation(ANIMATION_PLACEABLE_OPEN)));
|
||||
//ActionInteractObject(oThing);
|
||||
//ActionDoCommand(DoPlaceableObjectAction(oThing,PLACEABLE_ACTION_USE));
|
||||
TurnToFaceObject(oThing);
|
||||
ActionPlayAnimation(ANIMATION_LOOPING_GET_MID,1.0,3.0);
|
||||
object oItem = GetFirstItemInInventory(oThing);
|
||||
while(GetIsObjectValid(oItem))
|
||||
{
|
||||
/* switch(GetBaseItemType(oItem)) {
|
||||
case BASE_ITEM_POTIONS:
|
||||
case BASE_ITEM_HEALERSKIT:
|
||||
case BASE_ITEM_SPELLSCROLL:
|
||||
case BASE_ITEM_ARMOR:*/
|
||||
ActionDoCommand(SendMessageToPC(oMaster,GetName(OBJECT_SELF)+" picked up "+GetName(oItem)+" from "+GetName(oThing)+"."));
|
||||
ActionTakeItem(oItem,oThing);
|
||||
/* break;
|
||||
default:
|
||||
break;
|
||||
}*/
|
||||
oItem = GetNextItemInInventory(oThing);
|
||||
}
|
||||
ActionDoCommand(AssignCommand(oThing,PlayAnimation(ANIMATION_PLACEABLE_CLOSE)));
|
||||
}
|
||||
}
|
||||
} // else
|
||||
oThing = GetNextObjectInShape(SHAPE_SPHERE,15.0,lCenter,TRUE,OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_ITEM);
|
||||
} // while(GetIsObjectValid(oThing))
|
||||
ActionDoCommand(SetAssociateState(NW_ASC_IS_BUSY,FALSE));
|
||||
if(!bFound)
|
||||
SpeakString("I don't see where I can find any around here.");
|
||||
}
|
||||
|
||||
|
||||
23
_module/nss/69_hench_scout1.nss
Normal file
23
_module/nss/69_hench_scout1.nss
Normal file
@@ -0,0 +1,23 @@
|
||||
//69_hench_scout1 (no stealth)
|
||||
//Henchman will scout enemies and
|
||||
// attack at first sight
|
||||
//Created by: 69MEH69 Sep2004
|
||||
#include "69_inc_henai"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oClosest = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY,
|
||||
OBJECT_SELF, 1);
|
||||
if (GetIsObjectValid(oClosest)) {
|
||||
ClearAllActions();
|
||||
SpeakString("Very well.");
|
||||
SetLocalInt(OBJECT_SELF,"Scouting",TRUE);
|
||||
SetLocalInt(OBJECT_SELF,"ScoutingReport",FALSE);
|
||||
DelayCommand(2.0, SetLocalInt(OBJECT_SELF,"Scouting",FALSE));
|
||||
SetLocalObject(OBJECT_SELF,"ScoutTarget",oClosest);
|
||||
SetAssociateState(NW_ASC_MODE_DEFEND_MASTER, FALSE);
|
||||
ActionForceFollowObject(oClosest,5.0);
|
||||
|
||||
} else
|
||||
SetLocalInt(OBJECT_SELF,"Scouting",FALSE);
|
||||
}
|
||||
7
_module/nss/69_henchscoutno.nss
Normal file
7
_module/nss/69_henchscoutno.nss
Normal file
@@ -0,0 +1,7 @@
|
||||
int StartingConditional()
|
||||
{
|
||||
int iResult;
|
||||
|
||||
iResult = 1-GetLocalInt(OBJECT_SELF,"Scouting");
|
||||
return iResult;
|
||||
}
|
||||
1150
_module/nss/69_inc_henai.nss
Normal file
1150
_module/nss/69_inc_henai.nss
Normal file
File diff suppressed because it is too large
Load Diff
214
_module/nss/69_leadership.nss
Normal file
214
_module/nss/69_leadership.nss
Normal file
@@ -0,0 +1,214 @@
|
||||
/*69_leadership
|
||||
Leadership Library Functions
|
||||
Created by: 69MEH69
|
||||
Created on: Sep2004
|
||||
*/
|
||||
//void main(){}
|
||||
|
||||
//Level of PC when Leadership begins
|
||||
const int LEADERSHIP_LEVEL = 1;
|
||||
|
||||
//Returns Loyalty modifier
|
||||
int GetHenchLoyalty(object oHench, object oPC);
|
||||
//Returns TRUE if PC has Leadership (must be level 6 or higher)
|
||||
int GetHasLeadership(object oPC);
|
||||
//Returns Leadership Score
|
||||
int GetLeadershipScore(object oPC);
|
||||
//Sets maximum number of henchmen based on Leadership
|
||||
void SetMaxHenchmen69(object oPC);
|
||||
//Returns maximum number of henchmen based on Leadership
|
||||
int GetMaxHenchmen69(object oPC);
|
||||
|
||||
int GetHenchLoyalty(object oHench, object oPC)
|
||||
{
|
||||
int nCharisma = GetAbilityModifier(ABILITY_CHARISMA, oPC);
|
||||
//Initial roll + charisma
|
||||
int nLoyalty = d6(3) + nCharisma;
|
||||
string sLoyalty;
|
||||
//Test
|
||||
//sLoyalty = IntToString(nLoyalty);
|
||||
//SendMessageToPC(oPC, "nLoyalty = " + sLoyalty);
|
||||
|
||||
int nHenchAlign = GetAlignmentGoodEvil(oHench);
|
||||
int nPCAlign = GetAlignmentGoodEvil(oPC);
|
||||
int nHenchDeath = GetLocalInt(oPC, "Hench_Death");
|
||||
//Adjustment for alignments
|
||||
if(nHenchAlign == nPCAlign)
|
||||
{
|
||||
++nLoyalty;
|
||||
}
|
||||
else
|
||||
{
|
||||
--nLoyalty;
|
||||
}
|
||||
//Test
|
||||
//sLoyalty = IntToString(nLoyalty);
|
||||
//SendMessageToPC(oPC, "nLoyalty - Alignment = " + sLoyalty);
|
||||
|
||||
//Adjustment for number of dead henchmen
|
||||
nLoyalty = nLoyalty - nHenchDeath;
|
||||
//Test
|
||||
sLoyalty = IntToString(nLoyalty);
|
||||
//SendMessageToPC(oPC, "nLoyalty - nHenchDeath = " + sLoyalty);
|
||||
SendMessageToPC(oPC, "Loyalty score = " + sLoyalty);
|
||||
return nLoyalty;
|
||||
}
|
||||
|
||||
int GetHasLeadership(object oPC)
|
||||
{
|
||||
int nLeadership = GetHitDice(oPC);
|
||||
if(nLeadership >= LEADERSHIP_LEVEL)
|
||||
{
|
||||
//SendMessageToPC(oPC, "Leadership is True"); //Test
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
//SendMessageToPC(oPC, "Leadership is False"); //Test
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
int GetLeadershipScore(object oPC)
|
||||
{
|
||||
int nPCLevel = GetHitDice(oPC);
|
||||
int nCharisma = GetAbilityModifier(ABILITY_CHARISMA, oPC);
|
||||
int nPersuade = GetSkillRank(SKILL_PERSUADE, oPC);
|
||||
int nLeadershipScore = nPCLevel + nCharisma;
|
||||
//Test
|
||||
//string sCharisma = IntToString(nCharisma);
|
||||
//SendMessageToPC(oPC, "Charisma score = " + sCharisma);
|
||||
//string sPersuade = IntToString(nPersuade);
|
||||
//SendMessageToPC(oPC, "Persuade score = " + sPersuade);
|
||||
string sLeadershipScore = IntToString(nLeadershipScore);
|
||||
SendMessageToPC(oPC, "Leadership score = " + sLeadershipScore);
|
||||
//End Test*/
|
||||
return nLeadershipScore;
|
||||
}
|
||||
|
||||
void SetMaxHenchmen69(object oPC)
|
||||
{
|
||||
int nLeadershipScore = GetLeadershipScore(oPC);
|
||||
|
||||
//Primary Code
|
||||
if(GetHasLeadership(oPC) == FALSE)
|
||||
{
|
||||
SetLocalInt(oPC, "MaxHenchmen", 0);
|
||||
}
|
||||
else if(nLeadershipScore >= 25)
|
||||
{
|
||||
SetLocalInt(oPC, "MaxHenchmen", 10);
|
||||
}
|
||||
else if(nLeadershipScore >= 20)
|
||||
{
|
||||
SetLocalInt(oPC, "MaxHenchmen", 5);
|
||||
}
|
||||
else if(nLeadershipScore >= 15)
|
||||
{
|
||||
SetLocalInt(oPC, "MaxHenchmen", 4);
|
||||
}
|
||||
else if(nLeadershipScore >= 10)
|
||||
{
|
||||
SetLocalInt(oPC, "MaxHenchmen", 3);
|
||||
}
|
||||
else if(nLeadershipScore >= 8)
|
||||
{
|
||||
SetLocalInt(oPC, "MaxHenchmen", 2);
|
||||
}
|
||||
else if(nLeadershipScore >= 2)
|
||||
{
|
||||
SetLocalInt(oPC, "MaxHenchmen", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLocalInt(oPC, "MaxHenchmen", 0);
|
||||
}
|
||||
//End Primary Code
|
||||
|
||||
//Secondary Code
|
||||
//Uncomment following code to use this form
|
||||
//Comment out the Primary Code
|
||||
/*
|
||||
if(GetHasLeadership(oPC) == FALSE)
|
||||
{
|
||||
SetLocalInt(oPC, "MaxHenchmen", 0);
|
||||
return;
|
||||
}
|
||||
switch(nLeadershipScore)
|
||||
{
|
||||
case 0: case -1: case -2: case -3:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 0);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 1);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 1);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 2);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 2);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 2);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 3);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 3);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 3);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 4);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 4);
|
||||
break;
|
||||
|
||||
case 12:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 4);
|
||||
break;
|
||||
|
||||
case 13: case 14: case 15:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 5);
|
||||
break;
|
||||
|
||||
case 16: case 17: case 18:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 6);
|
||||
break;
|
||||
|
||||
default:
|
||||
SetLocalInt(oPC, "MaxHenchmen", 7);
|
||||
break;
|
||||
}*/
|
||||
//End Secondary Code
|
||||
|
||||
}
|
||||
|
||||
int GetMaxHenchmen69(object oPC)
|
||||
{
|
||||
int nMaxHenchmen = GetLocalInt(oPC, "MaxHenchmen");
|
||||
//Test
|
||||
string sMaxHenchmen = IntToString(nMaxHenchmen);
|
||||
SendMessageToPC(oPC, "Maximum allowable henchmen = " + sMaxHenchmen);
|
||||
return nMaxHenchmen;
|
||||
}
|
||||
58
_module/nss/BlkTwrOne2TwrTwo.nss
Normal file
58
_module/nss/BlkTwrOne2TwrTwo.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
/* arcadia2ghostshp.nss
|
||||
*
|
||||
* Script generated by LS Script Generator, v.TK.0
|
||||
*
|
||||
* For download info, please visit:
|
||||
* http://nwvault.ign.com/View.php?view=Other.Detail&id=1502
|
||||
*/
|
||||
// Put this script OnEnter.
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
int nHench;
|
||||
object oHench;
|
||||
object oTarget;
|
||||
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
// Only fire for (real) PCs.
|
||||
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
||||
return;
|
||||
|
||||
// Find the location to which to teleport.
|
||||
oTarget = GetWaypointByTag("WP_GhostShip");
|
||||
|
||||
// Teleport the PC.
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, JumpToObject(oTarget));
|
||||
|
||||
// Also teleport associates.
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
|
||||
// Support for multiple henchmen (includes horses).
|
||||
nHench = 1;
|
||||
oHench = GetHenchman(oPC, 1);
|
||||
while ( oHench != OBJECT_INVALID )
|
||||
{
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
// Next henchman.
|
||||
oHench = GetHenchman(oPC, ++nHench);
|
||||
}
|
||||
|
||||
// Have text appear over the PC's head.
|
||||
FloatingTextStringOnCreature("You swim over to the derelict ship.", oPC);
|
||||
}
|
||||
58
_module/nss/arcadia2ghostshp.nss
Normal file
58
_module/nss/arcadia2ghostshp.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
/* arcadia2ghostshp.nss
|
||||
*
|
||||
* Script generated by LS Script Generator, v.TK.0
|
||||
*
|
||||
* For download info, please visit:
|
||||
* http://nwvault.ign.com/View.php?view=Other.Detail&id=1502
|
||||
*/
|
||||
// Put this script OnEnter.
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
int nHench;
|
||||
object oHench;
|
||||
object oTarget;
|
||||
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
// Only fire for (real) PCs.
|
||||
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
||||
return;
|
||||
|
||||
// Find the location to which to teleport.
|
||||
oTarget = GetWaypointByTag("WP_GhostShip");
|
||||
|
||||
// Teleport the PC.
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, JumpToObject(oTarget));
|
||||
|
||||
// Also teleport associates.
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
|
||||
// Support for multiple henchmen (includes horses).
|
||||
nHench = 1;
|
||||
oHench = GetHenchman(oPC, 1);
|
||||
while ( oHench != OBJECT_INVALID )
|
||||
{
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
// Next henchman.
|
||||
oHench = GetHenchman(oPC, ++nHench);
|
||||
}
|
||||
|
||||
// Have text appear over the PC's head.
|
||||
FloatingTextStringOnCreature("You swim over to the derelict ship.", oPC);
|
||||
}
|
||||
58
_module/nss/arcadia2pirate.nss
Normal file
58
_module/nss/arcadia2pirate.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
/* arcadia2pirate.nss
|
||||
*
|
||||
* Script generated by LS Script Generator, v.TK.0
|
||||
*
|
||||
* For download info, please visit:
|
||||
* http://nwvault.ign.com/View.php?view=Other.Detail&id=1502
|
||||
*/
|
||||
// Put this script OnEnter.
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
int nHench;
|
||||
object oHench;
|
||||
object oTarget;
|
||||
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
// Only fire for (real) PCs.
|
||||
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
||||
return;
|
||||
|
||||
// Find the location to which to teleport.
|
||||
oTarget = GetWaypointByTag("WP_MiniArcPirJump");
|
||||
|
||||
// Teleport the PC.
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, JumpToObject(oTarget));
|
||||
|
||||
// Also teleport associates.
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
|
||||
// Support for multiple henchmen (includes horses).
|
||||
nHench = 1;
|
||||
oHench = GetHenchman(oPC, 1);
|
||||
while ( oHench != OBJECT_INVALID )
|
||||
{
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
// Next henchman.
|
||||
oHench = GetHenchman(oPC, ++nHench);
|
||||
}
|
||||
|
||||
// Have text appear over the PC's head.
|
||||
FloatingTextStringOnCreature("You swim over to the derelict ship.", oPC);
|
||||
}
|
||||
@@ -12,7 +12,7 @@ void main()
|
||||
|
||||
// Remove items from the player's inventory
|
||||
object oItemToTake;
|
||||
oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "it_OgreOrders");
|
||||
oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "IT_OGREORDERS");
|
||||
if(GetIsObjectValid(oItemToTake) != 0)
|
||||
DestroyObject(oItemToTake);
|
||||
// Set the variables
|
||||
|
||||
58
_module/nss/b3twrone2twrtwo.nss
Normal file
58
_module/nss/b3twrone2twrtwo.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
/* b3twrone2twrtwo.nss
|
||||
*
|
||||
* Script generated by LS Script Generator, v.TK.0
|
||||
*
|
||||
* For download info, please visit:
|
||||
* http://nwvault.ign.com/View.php?view=Other.Detail&id=1502
|
||||
*/
|
||||
// Put this script OnEnter.
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
int nHench;
|
||||
object oHench;
|
||||
object oTarget;
|
||||
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
// Only fire for (real) PCs.
|
||||
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
||||
return;
|
||||
|
||||
// Find the location to which to teleport.
|
||||
oTarget = GetWaypointByTag("WP_NW_Tower3rd_Trans2");
|
||||
|
||||
// Teleport the PC.
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, JumpToObject(oTarget));
|
||||
|
||||
// Also teleport associates.
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
|
||||
// Support for multiple henchmen (includes horses).
|
||||
nHench = 1;
|
||||
oHench = GetHenchman(oPC, 1);
|
||||
while ( oHench != OBJECT_INVALID )
|
||||
{
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
// Next henchman.
|
||||
oHench = GetHenchman(oPC, ++nHench);
|
||||
}
|
||||
|
||||
// Have text appear over the PC's head.
|
||||
FloatingTextStringOnCreature("You swim over to the derelict ship.", oPC);
|
||||
}
|
||||
58
_module/nss/b3twrtwo2twrone.nss
Normal file
58
_module/nss/b3twrtwo2twrone.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
/* b3twrtwo2twrone.nss
|
||||
*
|
||||
* Script generated by LS Script Generator, v.TK.0
|
||||
*
|
||||
* For download info, please visit:
|
||||
* http://nwvault.ign.com/View.php?view=Other.Detail&id=1502
|
||||
*/
|
||||
// Put this script OnEnter.
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
int nHench;
|
||||
object oHench;
|
||||
object oTarget;
|
||||
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
// Only fire for (real) PCs.
|
||||
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
||||
return;
|
||||
|
||||
// Find the location to which to teleport.
|
||||
oTarget = GetWaypointByTag("WP_NW_Tower3rd_Trans1");
|
||||
|
||||
// Teleport the PC.
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, JumpToObject(oTarget));
|
||||
|
||||
// Also teleport associates.
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
|
||||
// Support for multiple henchmen (includes horses).
|
||||
nHench = 1;
|
||||
oHench = GetHenchman(oPC, 1);
|
||||
while ( oHench != OBJECT_INVALID )
|
||||
{
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
// Next henchman.
|
||||
oHench = GetHenchman(oPC, ++nHench);
|
||||
}
|
||||
|
||||
// Have text appear over the PC's head.
|
||||
FloatingTextStringOnCreature("You swim over to the derelict ship.", oPC);
|
||||
}
|
||||
16
_module/nss/chk_has_bluff.nss
Normal file
16
_module/nss/chk_has_bluff.nss
Normal file
@@ -0,0 +1,16 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName chk_has_persuade
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 2/18/2006 3:22:24 PM
|
||||
//:://////////////////////////////////////////////
|
||||
int StartingConditional()
|
||||
{
|
||||
|
||||
// Inspect local variables
|
||||
if(!(GetLocalInt(OBJECT_SELF, "hasblu") != 1))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
16
_module/nss/chk_has_intimida.nss
Normal file
16
_module/nss/chk_has_intimida.nss
Normal file
@@ -0,0 +1,16 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName chk_has_persuade
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 2/18/2006 3:22:24 PM
|
||||
//:://////////////////////////////////////////////
|
||||
int StartingConditional()
|
||||
{
|
||||
|
||||
// Inspect local variables
|
||||
if(!(GetLocalInt(OBJECT_SELF, "hasint") != 1))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
16
_module/nss/chk_has_persuade.nss
Normal file
16
_module/nss/chk_has_persuade.nss
Normal file
@@ -0,0 +1,16 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName chk_has_persuade
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 2/18/2006 3:22:24 PM
|
||||
//:://////////////////////////////////////////////
|
||||
int StartingConditional()
|
||||
{
|
||||
|
||||
// Inspect local variables
|
||||
if(!(GetLocalInt(OBJECT_SELF, "hasper") != 1))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
15
_module/nss/chk_high_cha.nss
Normal file
15
_module/nss/chk_high_cha.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
/* Script generated by
|
||||
Lilac Soul's NWN Script Generator, v. 2.1
|
||||
|
||||
For download info, please visit:
|
||||
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
if (GetAbilityScore(oPC, ABILITY_CHARISMA) < 16) return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
20
_module/nss/chk_sm_rc_cls.nss
Normal file
20
_module/nss/chk_sm_rc_cls.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
/* Script generated by
|
||||
Lilac Soul's NWN Script Generator, v. 2.1
|
||||
|
||||
For download info, please visit:
|
||||
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int iMyrace = GetRacialType(OBJECT_SELF);
|
||||
int iYerrace = GetRacialType(oPC);
|
||||
int iMyclass = GetClassByPosition(1,OBJECT_SELF);
|
||||
int iYerclass = GetClassByPosition(1,oPC);
|
||||
|
||||
|
||||
if (iMyrace == iYerrace || iMyclass == iYerclass) return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
13
_module/nss/did_bluff.nss
Normal file
13
_module/nss/did_bluff.nss
Normal file
@@ -0,0 +1,13 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName did_persuade
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 2/18/2006 3:24:05 PM
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
// Set the variables
|
||||
SetLocalInt(OBJECT_SELF, "hasblu", 1);
|
||||
|
||||
}
|
||||
13
_module/nss/did_intimidate.nss
Normal file
13
_module/nss/did_intimidate.nss
Normal file
@@ -0,0 +1,13 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName did_persuade
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 2/18/2006 3:24:05 PM
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
// Set the variables
|
||||
SetLocalInt(OBJECT_SELF, "hasint", 1);
|
||||
|
||||
}
|
||||
13
_module/nss/did_persuade.nss
Normal file
13
_module/nss/did_persuade.nss
Normal file
@@ -0,0 +1,13 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName did_persuade
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 2/18/2006 3:24:05 PM
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
// Set the variables
|
||||
SetLocalInt(OBJECT_SELF, "hasper", 1);
|
||||
|
||||
}
|
||||
58
_module/nss/ghostshp2arcadia.nss
Normal file
58
_module/nss/ghostshp2arcadia.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
/* ghostshp2arcadia.nss
|
||||
*
|
||||
* Script generated by LS Script Generator, v.TK.0
|
||||
*
|
||||
* For download info, please visit:
|
||||
* http://nwvault.ign.com/View.php?view=Other.Detail&id=1502
|
||||
*/
|
||||
// Put this script OnEnter.
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
int nHench;
|
||||
object oHench;
|
||||
object oTarget;
|
||||
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
// Only fire for (real) PCs.
|
||||
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
||||
return;
|
||||
|
||||
// Find the location to which to teleport.
|
||||
oTarget = GetWaypointByTag("WP_ArcadiaFromGhost");
|
||||
|
||||
// Teleport the PC.
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, JumpToObject(oTarget));
|
||||
|
||||
// Also teleport associates.
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
|
||||
// Support for multiple henchmen (includes horses).
|
||||
nHench = 1;
|
||||
oHench = GetHenchman(oPC, 1);
|
||||
while ( oHench != OBJECT_INVALID )
|
||||
{
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
// Next henchman.
|
||||
oHench = GetHenchman(oPC, ++nHench);
|
||||
}
|
||||
|
||||
// Have text appear over the PC's head.
|
||||
FloatingTextStringOnCreature("You swim over to the derelict ship.", oPC);
|
||||
}
|
||||
7
_module/nss/hench_level.nss
Normal file
7
_module/nss/hench_level.nss
Normal file
@@ -0,0 +1,7 @@
|
||||
#include "x0_i0_henchman"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC=GetPCSpeaker();
|
||||
LevelUpXP1Henchman(oPC);
|
||||
}
|
||||
7
_module/nss/hench_levelup.nss
Normal file
7
_module/nss/hench_levelup.nss
Normal file
@@ -0,0 +1,7 @@
|
||||
#include "x0_i0_henchman"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC=GetPCSpeaker();
|
||||
LevelUpXP1Henchman(oPC);
|
||||
}
|
||||
5
_module/nss/hif_onlevelup.nss
Normal file
5
_module/nss/hif_onlevelup.nss
Normal file
@@ -0,0 +1,5 @@
|
||||
void main()
|
||||
{
|
||||
ExecuteScript("prc_levelup", OBJECT_SELF);
|
||||
ExecuteScript("nw_o0_levelup", OBJECT_SELF);
|
||||
}
|
||||
25
_module/nss/hire_henchman.nss
Normal file
25
_module/nss/hire_henchman.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: X0_D1_HEN_HIRED
|
||||
//:: Copyright (c) 2002 Floodgate Entertainment
|
||||
//:://////////////////////////////////////////////////
|
||||
/*
|
||||
Handles the hiring of a henchman.
|
||||
*/
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: Created By: Naomi Novik
|
||||
//:: Created On: 09/13/2002
|
||||
//:://////////////////////////////////////////////////
|
||||
|
||||
#include "x0_i0_henchman"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
//Ensure plot/immortal flags has been turned off
|
||||
SetPlotFlag(OBJECT_SELF, FALSE);
|
||||
SetImmortal(OBJECT_SELF, FALSE);
|
||||
|
||||
AddHenchman(oPC);
|
||||
LevelUpXP1Henchman(oPC);
|
||||
SetAssociateState(NW_ASC_RETRY_OPEN_LOCKS, FALSE);
|
||||
}
|
||||
13
_module/nss/pay_250gp.nss
Normal file
13
_module/nss/pay_250gp.nss
Normal file
@@ -0,0 +1,13 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName pay_250gp
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 1/6/2006 2:07:11 AM
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
|
||||
// Remove some gold from the player
|
||||
TakeGoldFromCreature(250, GetPCSpeaker(), TRUE);
|
||||
}
|
||||
58
_module/nss/pirate2arcadia.nss
Normal file
58
_module/nss/pirate2arcadia.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
/* pirate2arcadia.nss
|
||||
*
|
||||
* Script generated by LS Script Generator, v.TK.0
|
||||
*
|
||||
* For download info, please visit:
|
||||
* http://nwvault.ign.com/View.php?view=Other.Detail&id=1502
|
||||
*/
|
||||
// Put this script OnEnter.
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
int nHench;
|
||||
object oHench;
|
||||
object oTarget;
|
||||
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
// Only fire for (real) PCs.
|
||||
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
||||
return;
|
||||
|
||||
// Find the location to which to teleport.
|
||||
oTarget = GetWaypointByTag("WP_MiniArcDeckJump");
|
||||
|
||||
// Teleport the PC.
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, JumpToObject(oTarget));
|
||||
|
||||
// Also teleport associates.
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
|
||||
// Support for multiple henchmen (includes horses).
|
||||
nHench = 1;
|
||||
oHench = GetHenchman(oPC, 1);
|
||||
while ( oHench != OBJECT_INVALID )
|
||||
{
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
// Next henchman.
|
||||
oHench = GetHenchman(oPC, ++nHench);
|
||||
}
|
||||
|
||||
// Have text appear over the PC's head.
|
||||
FloatingTextStringOnCreature("You swim over to the derelict ship.", oPC);
|
||||
}
|
||||
@@ -15,7 +15,7 @@ SetPlotFlag(OBJECT_SELF,FALSE);
|
||||
|
||||
object oSpawn;
|
||||
location lTarget;
|
||||
oTarget = GetWaypointByTag("WP_HRESPAWN");
|
||||
oTarget = GetWaypointByTag("WP_HRESPAWN_GUILL");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
|
||||
18
_module/nss/ro_h_respwn_marc.nss
Normal file
18
_module/nss/ro_h_respwn_marc.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
void main()
|
||||
{
|
||||
PlayVoiceChat(VOICE_CHAT_GOODBYE);
|
||||
|
||||
object oTarget;
|
||||
|
||||
// Get the waypoint by tag where the NPC should jump to.
|
||||
oTarget = GetWaypointByTag("WP_HRESPAWN_MARCO");
|
||||
|
||||
if (oTarget != OBJECT_INVALID)
|
||||
{
|
||||
// Get the location of the waypoint.
|
||||
location lTarget = GetLocation(oTarget);
|
||||
|
||||
// Jump the NPC (OBJECT_SELF) to the target location.
|
||||
AssignCommand(OBJECT_SELF, JumpToLocation(lTarget));
|
||||
}
|
||||
}
|
||||
58
_module/nss/ro_hench_respawn.nss
Normal file
58
_module/nss/ro_hench_respawn.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
#include "x0_i0_henchman"
|
||||
|
||||
void BringBack(object oNPC, object oWP)
|
||||
{
|
||||
SetLocalObject(oNPC, "NW_L_FORMERMASTER", GetMaster());
|
||||
|
||||
// Ensure effects are removed before resurrection.
|
||||
DelayCommand(0.1, RemoveEffects(oNPC));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectResurrection(), oNPC));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectHeal(GetMaxHitPoints(oNPC)), oNPC));
|
||||
DelayCommand(5.1, SetIsDestroyable(TRUE, TRUE, TRUE));
|
||||
|
||||
// Check if the waypoint is valid
|
||||
if (GetIsObjectValid(oWP))
|
||||
{
|
||||
// Execute JumpToObject slightly later to allow effects to process.
|
||||
DelayCommand(0.5, JumpToObject(oWP, FALSE));
|
||||
}
|
||||
else
|
||||
{
|
||||
DelayCommand(0.5, ActionSpeakString("Error: No place to go"));
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oWP;
|
||||
|
||||
string sResref = GetResRef(oNPC);
|
||||
|
||||
// Use GetWaypointByTag for better clarity
|
||||
if (sResref == "angus001") { oWP = GetWaypointByTag("WP_HRESPAWN_ANGUS"); }
|
||||
if (sResref == "bjorn") { oWP = GetWaypointByTag("WP_HRESPAWN_BJORN"); }
|
||||
if (sResref == "briah001") { oWP = GetWaypointByTag("WP_HRESPAWN_BRIAH"); }
|
||||
if (sResref == "hench_jeanmarie") { oWP = GetWaypointByTag("WP_HRESPAWN_CHURCH"); }
|
||||
if (sResref == "fabrizio001") { oWP = GetWaypointByTag("WP_HRESPAWN_FAB"); }
|
||||
if (sResref == "farouk") { oWP = GetWaypointByTag("WP_HRESPAWN_FAROUK"); }
|
||||
if (sResref == "francesco001") { oWP = GetWaypointByTag("WP_HRESPAWN_FRANCESCO"); }
|
||||
if (sResref == "frederic") { oWP = GetWaypointByTag("WP_HRESPAWN_FREDERIC"); }
|
||||
if (sResref == "gabrielle") { oWP = GetWaypointByTag("WP_HRESPAWN_GABRIELLE"); }
|
||||
if (sResref == "guillaume") { oWP = GetWaypointByTag("WP_HRESPAWN_GUILL"); }
|
||||
if (sResref == "isang") { oWP = GetWaypointByTag("WP_HRESPAWN_ISANG"); }
|
||||
if (sResref == "jacob001") { oWP = GetWaypointByTag("WP_HRESPAWN_JACOB"); }
|
||||
if (sResref == "kamen001") { oWP = GetWaypointByTag("WP_HRESPAWN_KAMEN"); }
|
||||
if (sResref == "kamiosa") { oWP = GetWaypointByTag("WP_HRESPAWN_KAMIOSA"); }
|
||||
if (sResref == "kerville") { oWP = GetWaypointByTag("WP_HRESPAWN_KERVILLE"); }
|
||||
if (sResref == "hench_marco") { oWP = GetWaypointByTag("WP_HRESPAWN_MARCO"); }
|
||||
if (sResref == "nephiliam") { oWP = GetWaypointByTag("WP_HRESPAWN_NEPHILIAM"); }
|
||||
if (sResref == "ug001") { oWP = GetWaypointByTag("WP_HRESPAWN_UG"); }
|
||||
|
||||
PlayVoiceChat(VOICE_CHAT_GOODBYE);
|
||||
|
||||
FireHenchman(GetMaster(oNPC), oNPC);
|
||||
|
||||
// Call BringBack with both oNPC and oWP
|
||||
BringBack(oNPC, oWP);
|
||||
}
|
||||
@@ -96,7 +96,9 @@ void main()
|
||||
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
|
||||
AddJournalQuestEntry("JRNL_XPCHART", 1, oPC, FALSE, FALSE, FALSE);
|
||||
AddJournalQuestEntry("JRNL_LA_BUYOFF", 1, oPC, FALSE, FALSE, FALSE);
|
||||
|
||||
// Death Amulet Activities
|
||||
if(HasItem(oPC, "Death"))
|
||||
{
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
int StartingConditional()
|
||||
{
|
||||
|
||||
// Make sure the PC speaker has these items in their inventory
|
||||
if(!HasItem(GetPCSpeaker(), "it_OgreOrders"))
|
||||
return FALSE;
|
||||
// Make sure the PC speaker has these items in their inventory
|
||||
if(!HasItem(GetPCSpeaker(), "IT_OGREORDERS"))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
58
_module/nss/telep51totelep52.nss
Normal file
58
_module/nss/telep51totelep52.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
/* telep51totelep52.nss
|
||||
*
|
||||
* Script generated by LS Script Generator, v.TK.0
|
||||
*
|
||||
* For download info, please visit:
|
||||
* http://nwvault.ign.com/View.php?view=Other.Detail&id=1502
|
||||
*/
|
||||
// Put this script OnEnter.
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
int nHench;
|
||||
object oHench;
|
||||
object oTarget;
|
||||
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
// Only fire for (real) PCs.
|
||||
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
||||
return;
|
||||
|
||||
// Find the location to which to teleport.
|
||||
oTarget = GetWaypointByTag("WP_TeleP5_2");
|
||||
|
||||
// Teleport the PC.
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, JumpToObject(oTarget));
|
||||
|
||||
// Also teleport associates.
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
|
||||
// Support for multiple henchmen (includes horses).
|
||||
nHench = 1;
|
||||
oHench = GetHenchman(oPC, 1);
|
||||
while ( oHench != OBJECT_INVALID )
|
||||
{
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
// Next henchman.
|
||||
oHench = GetHenchman(oPC, ++nHench);
|
||||
}
|
||||
|
||||
// Have text appear over the PC's head.
|
||||
FloatingTextStringOnCreature("You swim over to the derelict ship.", oPC);
|
||||
}
|
||||
58
_module/nss/telep52totelep51.nss
Normal file
58
_module/nss/telep52totelep51.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
/* telep51totelep52.nss
|
||||
*
|
||||
* Script generated by LS Script Generator, v.TK.0
|
||||
*
|
||||
* For download info, please visit:
|
||||
* http://nwvault.ign.com/View.php?view=Other.Detail&id=1502
|
||||
*/
|
||||
// Put this script OnEnter.
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
int nHench;
|
||||
object oHench;
|
||||
object oTarget;
|
||||
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
// Only fire for (real) PCs.
|
||||
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
||||
return;
|
||||
|
||||
// Find the location to which to teleport.
|
||||
oTarget = GetWaypointByTag("WP_TeleP5_1");
|
||||
|
||||
// Teleport the PC.
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, JumpToObject(oTarget));
|
||||
|
||||
// Also teleport associates.
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
|
||||
// Support for multiple henchmen (includes horses).
|
||||
nHench = 1;
|
||||
oHench = GetHenchman(oPC, 1);
|
||||
while ( oHench != OBJECT_INVALID )
|
||||
{
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oHench, JumpToObject(oTarget));
|
||||
// Next henchman.
|
||||
oHench = GetHenchman(oPC, ++nHench);
|
||||
}
|
||||
|
||||
// Have text appear over the PC's head.
|
||||
FloatingTextStringOnCreature("You swim over to the derelict ship.", oPC);
|
||||
}
|
||||
3
_module/nss/telep5totelep52.nss
Normal file
3
_module/nss/telep5totelep52.nss
Normal file
@@ -0,0 +1,3 @@
|
||||
void main()
|
||||
{
|
||||
}
|
||||
147
_module/nss/wow_faction_adj.nss
Normal file
147
_module/nss/wow_faction_adj.nss
Normal file
@@ -0,0 +1,147 @@
|
||||
// The delay for 2DA reads, change as needed.
|
||||
const float DELAY_2DA = 0.3;
|
||||
|
||||
// The delay between switching factions, change as needed.
|
||||
const float DELAY_FACTION = 0.3;
|
||||
|
||||
// Row is how self feels about column
|
||||
int wow_GetCurrentWorkingFaction();
|
||||
void wow_SetCurrentWorkingFaction(int nFaction);
|
||||
int wow_GetIsBusy();
|
||||
void wow_SetIsBusy(int nBusy = TRUE);
|
||||
void wow_ResetFactions(int nRun = 1);
|
||||
int wow_GetMaxFactions();
|
||||
void wow_SetUpFaction(int nFaction = 1, int nRun = 0);
|
||||
int wow_GetIsFactionSetUp(int nFaction);
|
||||
void wow_ChangeFactionFeelings(int nFaction, int nWorking = 1);
|
||||
|
||||
void main()
|
||||
{
|
||||
if(wow_GetIsBusy()) SendMessageToPC(GetLastUsedBy(), "Factions are currently being reset already.");
|
||||
else
|
||||
{
|
||||
SendMessageToAllDMs("Resetting factions now. This will take a few moments");
|
||||
wow_SetIsBusy();
|
||||
wow_ResetFactions();
|
||||
}
|
||||
}
|
||||
|
||||
void MessagePC(string sMessage)
|
||||
{
|
||||
SendMessageToPC(GetFirstPC(), sMessage);
|
||||
}
|
||||
|
||||
void wow_ChangeFactionFeelings(int nFaction, int nWorking = 1)
|
||||
{
|
||||
int nMax = wow_GetMaxFactions();
|
||||
if(nWorking <= nMax)
|
||||
{
|
||||
string sSourceTag = GetLocalString(OBJECT_SELF, "FACTION"+IntToString(nFaction));
|
||||
string sTargetTag = GetLocalString(OBJECT_SELF, "FACTION"+IntToString(nWorking));
|
||||
object oSource = GetObjectByTag(sSourceTag);
|
||||
object oTarget = GetObjectByTag(sTargetTag);
|
||||
object oTemp = GetFirstFactionMember(oSource, FALSE);
|
||||
string sTrue = sSourceTag+"_"+IntToString(nWorking);
|
||||
int nTrueFeelings = GetLocalInt(OBJECT_SELF, sTrue);
|
||||
int nCurrentFeelings;
|
||||
while(GetIsObjectValid(oTemp))
|
||||
{
|
||||
nCurrentFeelings = GetReputation(oTemp, oTarget);
|
||||
|
||||
if(nCurrentFeelings != nTrueFeelings) AdjustReputation(oTemp, oTarget, (nTrueFeelings - nCurrentFeelings));
|
||||
oTemp = GetNextFactionMember(oSource, FALSE);
|
||||
}
|
||||
nWorking++;
|
||||
DelayCommand(DELAY_FACTION, wow_ChangeFactionFeelings(nFaction, nWorking));
|
||||
}
|
||||
else
|
||||
{
|
||||
nFaction++;
|
||||
DelayCommand(DELAY_FACTION, wow_ResetFactions(nFaction));
|
||||
}
|
||||
}
|
||||
|
||||
void wow_ResetFactions(int nRun = 1)
|
||||
{
|
||||
int nMax = wow_GetMaxFactions();
|
||||
if(nRun <= nMax)
|
||||
{
|
||||
if(!wow_GetIsFactionSetUp(nRun))
|
||||
{
|
||||
wow_SetUpFaction();
|
||||
}
|
||||
else wow_ChangeFactionFeelings(nRun);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessageToAllDMs("Factions are now reset.");
|
||||
wow_SetIsBusy(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void wow_SetUpFaction(int nFaction = 1, int nRun = 0)
|
||||
{
|
||||
string sFaction = GetLocalString(OBJECT_SELF, "FACTION"+IntToString(nFaction));
|
||||
int nMax = wow_GetMaxFactions();
|
||||
|
||||
if(nRun > 0)
|
||||
{
|
||||
string sTemp = Get2DAString("ht_factions", "Faction"+IntToString(nRun), nFaction);
|
||||
SetLocalInt(OBJECT_SELF, sFaction+"_"+IntToString(nRun), StringToInt(sTemp));
|
||||
}
|
||||
else
|
||||
{
|
||||
sFaction = Get2DAString("ht_factions", "FactionTag", nFaction);
|
||||
SetLocalString(OBJECT_SELF, "FACTION"+IntToString(nFaction), sFaction);
|
||||
}
|
||||
nRun++;
|
||||
if(nRun <= nMax)
|
||||
{
|
||||
DelayCommand(DELAY_2DA, wow_SetUpFaction(nFaction, nRun));
|
||||
}
|
||||
else
|
||||
{
|
||||
nFaction++;
|
||||
if(nFaction <= nMax) DelayCommand(DELAY_FACTION, wow_SetUpFaction(nFaction, 0));
|
||||
else DelayCommand(DELAY_2DA, wow_ResetFactions(1));
|
||||
}
|
||||
}
|
||||
|
||||
int wow_GetIsFactionSetUp(int nFaction)
|
||||
{
|
||||
if(GetLocalString(OBJECT_SELF, "FACTION"+IntToString(nFaction)) != "") return TRUE;
|
||||
else return FALSE;
|
||||
}
|
||||
|
||||
int wow_GetMaxFactions()
|
||||
{
|
||||
int nReturn = GetLocalInt(OBJECT_SELF, "MAX_FACTIONS");
|
||||
if(!nReturn)
|
||||
{
|
||||
nReturn = StringToInt(Get2DAString("ht_factions", "NumberOfFactions", 0));
|
||||
SetLocalInt(OBJECT_SELF, "MAX_FACTIONS", nReturn);
|
||||
}
|
||||
return nReturn;
|
||||
}
|
||||
|
||||
void wow_SetIsBusy(int nBusy = TRUE)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "BUSY", nBusy);
|
||||
}
|
||||
|
||||
int wow_GetIsBusy()
|
||||
{
|
||||
return GetLocalInt(OBJECT_SELF, "BUSY");
|
||||
}
|
||||
|
||||
int wow_GetCurrentWorkingFaction()
|
||||
{
|
||||
return GetLocalInt(OBJECT_SELF, "CURRENT_FACTION");
|
||||
}
|
||||
|
||||
void wow_SetCurrentWorkingFaction(int nFaction)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "CURRENT_FACTION", nFaction);
|
||||
}
|
||||
|
||||
|
||||
146
_module/nss/x0_ch_hen_death.nss
Normal file
146
_module/nss/x0_ch_hen_death.nss
Normal file
@@ -0,0 +1,146 @@
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: X0_CH_HEN_DEATH
|
||||
//:: Copyright (c) 2002 Floodgate Entertainment
|
||||
//:://////////////////////////////////////////////////
|
||||
/*
|
||||
OnDeath handler for henchmen ONLY. Causes them to respawn at
|
||||
(in order of preference) the respawn point of their master
|
||||
or their own starting location.
|
||||
*/
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: Created By: Naomi Novik
|
||||
//:: Created On: 10/09/2002
|
||||
//:://////////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: Modified By: Bob Minors
|
||||
//:: Modified On: Jan 12th, 2008
|
||||
//:: Added Support for Dying While Mounted
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified On: April 17th, 2008
|
||||
//:: Fixes for henchmen mounts being lost
|
||||
//:://///////////////////////////////////////////////
|
||||
|
||||
#include "x0_i0_henchman"
|
||||
#include "x3_inc_horse"
|
||||
|
||||
|
||||
void BringBack(object oWP)
|
||||
{
|
||||
SetLocalObject(OBJECT_SELF,"NW_L_FORMERMASTER", GetMaster());
|
||||
// : REMINDER: The delay is here for a reason
|
||||
DelayCommand(0.1, RemoveEffects(OBJECT_SELF));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectResurrection(), OBJECT_SELF));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectHeal(GetMaxHitPoints(OBJECT_SELF)), OBJECT_SELF));
|
||||
DelayCommand(5.1, SetIsDestroyable(TRUE, TRUE, TRUE));
|
||||
|
||||
if (GetIsObjectValid(oWP) == TRUE)
|
||||
{
|
||||
// * if in Source stone area, respawn at opening to area
|
||||
// if (GetTag(GetArea(OBJECT_SELF)) == "SOME_RANDOM_AREA")
|
||||
// {
|
||||
DelayCommand(0.2, JumpToObject(oWP, FALSE));
|
||||
// }
|
||||
// else
|
||||
// DelayCommand(0.2, JumpToObject(oWP, FALSE));
|
||||
}
|
||||
else
|
||||
DelayCommand(0.3, ActionSpeakString("Error: No place to go"));
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oWP;
|
||||
|
||||
string sResref = GetResRef(oNPC);
|
||||
|
||||
if(sResref == "angus001") {oWP = GetObjectByTag("WP_HRESPAWN_ANGUS");}
|
||||
if(sResref == "bjorn") {oWP = GetObjectByTag("WP_HRESPAWN_BJORN");}
|
||||
if(sResref == "briah001") {oWP = GetObjectByTag("WP_HRESPAWN_BRIAH");}
|
||||
if(sResref == "hench_jeanmarie") {oWP = GetObjectByTag("WP_HRESPAWN_CHURCH");}
|
||||
if(sResref == "fabrizio001") {oWP = GetObjectByTag("WP_HRESPAWN_FAB");}
|
||||
if(sResref == "farouk") {oWP = GetObjectByTag("WP_HRESPAWN_FAROUK");}
|
||||
if(sResref == "francesco001") {oWP = GetObjectByTag("WP_HRESPAWN_FRANCESCO");}
|
||||
if(sResref == "frederic") {oWP = GetObjectByTag("WP_HRESPAWN_FREDERIC");}
|
||||
if(sResref == "gabrielle") {oWP = GetObjectByTag("WP_HRESPAWN_GABRIELLE");}
|
||||
if(sResref == "guillaume") {oWP = GetObjectByTag("WP_HRESPAWN_GUILL");}
|
||||
if(sResref == "isang") {oWP = GetObjectByTag("WP_HRESPAWN_ISANG");}
|
||||
if(sResref == "jacob001") {oWP = GetObjectByTag("WP_HRESPAWN_JACOB");}
|
||||
if(sResref == "kamen001") {oWP = GetObjectByTag("WP_HRESPAWN_KAMEN");}
|
||||
if(sResref == "kamiosa") {oWP = GetObjectByTag("WP_HRESPAWN_KAMIOSA");}
|
||||
if(sResref == "kerville") {oWP = GetObjectByTag("WP_HRESPAWN_KERVILLE");}
|
||||
if(sResref == "hench_marco") {oWP = GetObjectByTag("WP_HRESPAWN_MARCO");}
|
||||
if(sResref == "nephiliam") {oWP = GetObjectByTag("WP_HRESPAWN_NEPHILIAM");}
|
||||
if(sResref == "ug001") {oWP = GetObjectByTag("WP_HRESPAWN_UG");}
|
||||
|
||||
SetLocalString(OBJECT_SELF,"sX3_DEATH_SCRIPT","x0_ch_hen_death");
|
||||
if (HorseHandleDeath()) return;
|
||||
DeleteLocalString(OBJECT_SELF,"sX3_DEATH_SCRIPT");
|
||||
|
||||
// Handle a bunch of stuff to keep us from running around,
|
||||
// dying again, etc.
|
||||
PreRespawnSetup();
|
||||
|
||||
// Call for healing
|
||||
DelayCommand(0.5, VoiceHealMe(TRUE));
|
||||
|
||||
// Get our last master
|
||||
object oPC = GetLastMaster();
|
||||
object oSelf = OBJECT_SELF;
|
||||
|
||||
|
||||
// Clear dialogue events
|
||||
ClearAllDialogue(oPC, OBJECT_SELF);
|
||||
ClearAllActions();
|
||||
|
||||
string sAreaTag = GetTag(GetArea(OBJECT_SELF));
|
||||
// * in final battle area henchmen death is now permanent
|
||||
if (sAreaTag == "Winds_04")
|
||||
{
|
||||
|
||||
SetPlotFlag(OBJECT_SELF,FALSE);
|
||||
SetImmortal(OBJECT_SELF, FALSE);
|
||||
SetIsDestroyable(TRUE, FALSE, FALSE);
|
||||
DestroyObject(OBJECT_SELF, 0.2);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GetTag(GetModule()) == "MODULE" || GetTag(GetModule()) == "x0_module2" || GetTag(GetModule()) == "x0_module3") && GetIsObjectValid(oPC) == FALSE)
|
||||
{
|
||||
// SpawnScriptDebugger();
|
||||
// * if you kill a henchmen who has never had a master
|
||||
// * then permanently kill them to prevent
|
||||
// * faction issues.
|
||||
SetPlotFlag(OBJECT_SELF,FALSE);
|
||||
SetImmortal(OBJECT_SELF, FALSE);
|
||||
SetIsDestroyable(TRUE, FALSE, FALSE);
|
||||
DestroyObject(OBJECT_SELF, 0.2);
|
||||
return;
|
||||
}
|
||||
|
||||
// If we don't have a master OR he has died, respawn immediately
|
||||
// April 2003, in some areas the henchmen has to respawn immediately
|
||||
// back for pathfinding reasons (i.e., if they die in front of the dragon
|
||||
// the dragon will act stupid
|
||||
if (!GetIsObjectValid(oPC) || GetIsDead(oPC) == TRUE && GetTag(GetModule()) == "x0_module1"
|
||||
|| sAreaTag =="Q5_DragonCaves" || sAreaTag == "Q3C_AncientTemple")
|
||||
{
|
||||
DelayCommand(1.0, RespawnHenchman());
|
||||
DelayCommand(1.5, PostRespawnCleanup());
|
||||
}
|
||||
else
|
||||
{
|
||||
// BK Feb 2003: Make the henchman rejoin you so that you can use potions on them
|
||||
DelayCommand(0.1, AddHenchman(oPC, oSelf));
|
||||
|
||||
// Start the respawn checking
|
||||
RaiseForRespawn(oPC);
|
||||
|
||||
BringBack(oWP);
|
||||
SetCommandable(FALSE);
|
||||
|
||||
// * henchmen will always stay where they die unless you leave them
|
||||
// RespawnCheck(oPC);
|
||||
}
|
||||
}
|
||||
197
_module/nss/x0_ch_hen_spawn.nss
Normal file
197
_module/nss/x0_ch_hen_spawn.nss
Normal file
@@ -0,0 +1,197 @@
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: X0_CH_HEN_SPAWN
|
||||
//:: Copyright (c) 2002 Floodgate Entertainment
|
||||
//:://////////////////////////////////////////////////
|
||||
/*
|
||||
Henchman-specific OnSpawn handler for XP1. Based on NW_CH_AC9 by Bioware.
|
||||
*/
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: Created By: Naomi Novik
|
||||
//:: Created On: 10/09/2002
|
||||
//:://////////////////////////////////////////////////
|
||||
|
||||
#include "x0_inc_henai"
|
||||
#include "x2_inc_banter"
|
||||
#include "x2_inc_globals"
|
||||
|
||||
// * there are only a couple potential interjections henchmen can say in c3
|
||||
void StrikeOutStrings(object oNathyrra)
|
||||
{
|
||||
SetLocalString(oNathyrra, "X2_L_RANDOMONELINERS", "26|27|28|29|30|");
|
||||
SetLocalString(oNathyrra, "X2_L_RANDOM_INTERJECTIONS", "6|7|");
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
string sAreaTag = GetTag(GetArea(OBJECT_SELF));
|
||||
string sModuleTag = GetTag(GetModule());
|
||||
string sMyTag = GetTag(OBJECT_SELF);
|
||||
|
||||
|
||||
if (sMyTag == "HENCH_JEANMARIE")
|
||||
{//Level up Father Jean-Marie to level 3
|
||||
int nLevel = 1;
|
||||
for (nLevel = 1; nLevel < 4; nLevel++)
|
||||
{
|
||||
LevelUpHenchman(OBJECT_SELF, CLASS_TYPE_CLERIC);
|
||||
}
|
||||
}
|
||||
|
||||
// * Setup how many random interjectiosn and popups they have
|
||||
if (sMyTag == "x2_hen_deekin")
|
||||
{
|
||||
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 50);
|
||||
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 10);
|
||||
}
|
||||
else
|
||||
if (sMyTag == "x2_hen_daelan")
|
||||
{
|
||||
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 20);
|
||||
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 2);
|
||||
}
|
||||
else
|
||||
if (sMyTag == "x2_hen_linu")
|
||||
{
|
||||
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 20);
|
||||
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 2);
|
||||
}
|
||||
else
|
||||
if (sMyTag == "x2_hen_sharwyn")
|
||||
{
|
||||
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 20);
|
||||
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 4);
|
||||
}
|
||||
else
|
||||
if (sMyTag == "x2_hen_tomi")
|
||||
{
|
||||
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 20);
|
||||
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 4);
|
||||
}
|
||||
else
|
||||
if (sMyTag == "H2_Aribeth")
|
||||
{
|
||||
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 20);
|
||||
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 2);
|
||||
}
|
||||
else
|
||||
// * valen and Nathyrra have certain random lines that only show up in
|
||||
// * in Chapter 2 (Chapter 3 they'll get this variable set on them
|
||||
// * as well, with different numbers)
|
||||
// * Basically #1-5 are Chapter 2 only, 26-30 are Chapter 3 only. The rest can show up anywhere
|
||||
if (sMyTag == "x2_hen_nathyra" || sMyTag == "x2_hen_valen")
|
||||
{
|
||||
// * only fire this in Chapter 2. THey setup differently in the transition from C2 to C3
|
||||
if (GetTag(GetModule()) == "x0_module2")
|
||||
{
|
||||
SetNumberOfRandom("X2_L_RANDOMONELINERS", OBJECT_SELF, 25);
|
||||
SetNumberOfRandom("X2_L_RANDOM_INTERJECTIONS", OBJECT_SELF, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
StrikeOutStrings(OBJECT_SELF);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Sets up the special henchmen listening patterns
|
||||
SetAssociateListenPatterns();
|
||||
|
||||
// Set additional henchman listening patterns
|
||||
bkSetListeningPatterns();
|
||||
|
||||
// Default behavior for henchmen at start
|
||||
SetAssociateState(NW_ASC_POWER_CASTING);
|
||||
SetAssociateState(NW_ASC_HEAL_AT_50);
|
||||
SetAssociateState(NW_ASC_RETRY_OPEN_LOCKS);
|
||||
SetAssociateState(NW_ASC_DISARM_TRAPS);
|
||||
|
||||
// * July 2003. Set this to true so henchmen
|
||||
// * will hopefully run off a little less often
|
||||
// * by default
|
||||
// * September 2003. Bad decision. Reverted back
|
||||
// * to original. This mode too often looks like a bug
|
||||
// * because they hang back and don't help each other out.
|
||||
//SetAssociateState(NW_ASC_MODE_DEFEND_MASTER, TRUE);
|
||||
SetAssociateState(NW_ASC_DISTANCE_2_METERS);
|
||||
|
||||
//Use melee weapons by default
|
||||
SetAssociateState(NW_ASC_USE_RANGED_WEAPON, FALSE);
|
||||
|
||||
// Set starting location
|
||||
SetAssociateStartLocation();
|
||||
|
||||
// Set respawn location
|
||||
SetRespawnLocation();
|
||||
|
||||
// For some general behavior while we don't have a master,
|
||||
// let's do some immobile animations
|
||||
SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
|
||||
|
||||
// **************************************
|
||||
// * CHAPTER 1
|
||||
// * Kill henchmen who spawn in
|
||||
// * to any area for the first time
|
||||
// * in Undermountain.
|
||||
// **************************************
|
||||
SetIsDestroyable(FALSE, TRUE, TRUE);
|
||||
|
||||
// * September 2003
|
||||
// * Scan through all equipped items and make
|
||||
// * sure they are identified
|
||||
int i = 0;
|
||||
object oItem;
|
||||
for (i = INVENTORY_SLOT_HEAD; i<=INVENTORY_SLOT_CARMOUR; i++)
|
||||
{
|
||||
oItem = GetItemInSlot(i, OBJECT_SELF);
|
||||
if (GetIsObjectValid(oItem) == TRUE)
|
||||
SetIdentified( oItem, TRUE);
|
||||
}
|
||||
|
||||
// *
|
||||
// * Special CHAPTER 1 - XP2
|
||||
// * Levelup code
|
||||
// *
|
||||
if (sModuleTag == "x0_module1" && GetLocalInt(GetModule(), "X2_L_XP2") == TRUE)
|
||||
{
|
||||
if (GetLocalInt(OBJECT_SELF, "X2_KilledInUndermountain") == 1)
|
||||
return;
|
||||
SetLocalInt(OBJECT_SELF, "X2_KilledInUndermountain", 1);
|
||||
|
||||
//Level up henchman to level 13 if in Starting Room
|
||||
//Join script will level them up correctly once hired
|
||||
if (sAreaTag == "q2a_yawningportal" )
|
||||
{
|
||||
int nLevel = 1;
|
||||
for (nLevel = 1; nLevel < 14; nLevel++)
|
||||
{
|
||||
LevelUpHenchman(OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
//'kill the henchman'
|
||||
|
||||
// * do not kill if spawning in main room
|
||||
string szAreaTag = GetTag(GetArea(OBJECT_SELF));
|
||||
if (szAreaTag != "q2a_yawningportal" && szAreaTag != "q2c_um2east")
|
||||
{
|
||||
//This breaks PRC custom cohorts
|
||||
//effect eDamage = EffectDamage(500);
|
||||
//DelayCommand(10.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
// * Nathyrra in Chapter 1 is not allowed to have her inventory fiddled with
|
||||
if (sMyTag == "x2_hen_nathyrra" && sModuleTag == "x0_module1")
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "X2_JUST_A_DISABLEEQUIP", 1);
|
||||
}
|
||||
|
||||
|
||||
// *
|
||||
// * if I am Aribeth then do my special level-up
|
||||
// *
|
||||
if (sMyTag == "H2_Aribeth")
|
||||
{
|
||||
LevelUpAribeth(OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
|
||||
15
_module/nss/x0_d1_hen_levlup.nss
Normal file
15
_module/nss/x0_d1_hen_levlup.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
//::///////////////////////////////////////////////////
|
||||
//:: X0_D1_HEN_LEVLUP
|
||||
//:: Henchman levels up, preserving inventory and
|
||||
//:: equipped weapons, and current behavior settings.
|
||||
//:: Copyright (c) 2002 Floodgate Entertainment
|
||||
//:: Created By: Naomi Novik
|
||||
//:: Created On: 01/24/2003
|
||||
//::///////////////////////////////////////////////////
|
||||
|
||||
#include "nw_i0_henchman"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oNew = DoLevelUp(GetPCSpeaker());
|
||||
}
|
||||
16
_module/nss/x0_d2_hen_canlvl.nss
Normal file
16
_module/nss/x0_d2_hen_canlvl.nss
Normal file
@@ -0,0 +1,16 @@
|
||||
//::///////////////////////////////////////////////////
|
||||
//:: X0_D2_HEN_CANLVL
|
||||
//:: TRUE if the caller can level up (is at least two
|
||||
//:: levels below the speaker, and not currently
|
||||
//:: busy).
|
||||
//:: Copyright (c) 2002 Floodgate Entertainment
|
||||
//:: Created By: Naomi Novik
|
||||
//:: Created On: 01/24/2003
|
||||
//::///////////////////////////////////////////////////
|
||||
|
||||
#include "nw_i0_henchman"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
return GetCanLevelUp(GetPCSpeaker());
|
||||
}
|
||||
181
_module/nss/x0_evt_trigger.nss
Normal file
181
_module/nss/x0_evt_trigger.nss
Normal file
@@ -0,0 +1,181 @@
|
||||
//::///////////////////////////////////////////////////////
|
||||
// X0_EVT_TRIGGER
|
||||
/*
|
||||
This is the OnEntered script for the henchman trigger objects.
|
||||
It signals the event router that a given event has occured,
|
||||
by obtaining the key tag from the trigger and using that as
|
||||
the event number.
|
||||
|
||||
Each trigger will only be activated once, and can only be
|
||||
activated by a PC.
|
||||
|
||||
|
||||
MODIFIED BY BRENT, APRIL 2003
|
||||
1. Henchmen now trigger the trigger, not players
|
||||
2. Henchmen will only attempt to do the popup or intjereciton
|
||||
if the player and the henchmen meet he following requirements
|
||||
(a) Neither in combat
|
||||
(b) Neither in Conversation
|
||||
(c) Within 10 meters of each other
|
||||
*/
|
||||
//::///////////////////////////////////////////////////////
|
||||
// May 26 2003: Make player trigger the interjection.
|
||||
// If henchmen is able to move, move them to player and
|
||||
// start interjection.
|
||||
// Destroy trigger regardless.
|
||||
|
||||
#include "x0_i0_common"
|
||||
#include "x0_i0_henchman"
|
||||
void DoInterjection(object oHench, object oPC, int MOD_EVENT_NUMBER)
|
||||
{
|
||||
AssignCommand(oHench, SetHasInterjection(oPC, TRUE, MOD_EVENT_NUMBER));
|
||||
AssignCommand(oHench, ClearAllActions());
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
// AssignCommand(oHench, ActionMoveToObject(oPC, TRUE, 6.0));
|
||||
AssignCommand(oHench, JumpToObject(oPC));
|
||||
AssignCommand(oHench, DelayCommand(0.1,ActionStartConversation(oPC)));
|
||||
}
|
||||
// * am I valid for doing an interjection
|
||||
int ValidForInterjection(object oPC, object oHench)
|
||||
{
|
||||
if (!IsInConversation(oPC)
|
||||
&& GetDistanceBetweenLocations(GetLocation(oPC), GetLocation(oHench)) <= 20.0)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int HenchmanMoveable(object oHench)
|
||||
{
|
||||
|
||||
if (GetIsDead(oHench) == TRUE || GetIsHenchmanDying(oHench) == TRUE
|
||||
|| GetHasEffect(EFFECT_TYPE_PARALYZE, oHench)
|
||||
|| GetHasEffect(EFFECT_TYPE_STUNNED, oHench)
|
||||
|| GetHasEffect(EFFECT_TYPE_PETRIFY, oHench)
|
||||
|| GetHasEffect(EFFECT_TYPE_SLEEP, oHench)
|
||||
|| GetHasEffect(EFFECT_TYPE_CONFUSED, oHench)
|
||||
|| GetHasEffect(EFFECT_TYPE_FRIGHTENED, oHench)
|
||||
|
||||
|
||||
|
||||
)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
|
||||
void main()
|
||||
{ // SpawnScriptDebugger();
|
||||
object oTrigger = GetEnteringObject();
|
||||
int bIAmAnAssociate = FALSE;
|
||||
object oHench = OBJECT_INVALID;
|
||||
int bFoundAHench = FALSE;
|
||||
|
||||
oHench = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oTrigger);
|
||||
if (GetIsObjectValid(oHench) == FALSE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
bIAmAnAssociate = TRUE;
|
||||
bFoundAHench = TRUE;
|
||||
|
||||
|
||||
/* // * only valid if I am an henchman, otherwise exit
|
||||
if (GetAssociate(ASSOCIATE_TYPE_HENCHMAN, GetMaster(oTrigger)) == oTrigger)
|
||||
{
|
||||
bIAmAnAssociate = TRUE;
|
||||
bFoundAHench = TRUE;
|
||||
oHench = oTrigger;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
*/
|
||||
if ( !bIAmAnAssociate) return;
|
||||
|
||||
object oMaster = oTrigger;//GetMaster(oHench);
|
||||
|
||||
|
||||
//SpawnScriptDebugger();
|
||||
// The key tag of the trigger is the module event number
|
||||
int MOD_EVENT_NUMBER = StringToInt(GetTrapKeyTag(OBJECT_SELF));
|
||||
|
||||
|
||||
string sTag = GetTag(OBJECT_SELF);
|
||||
int nStart = 0;
|
||||
int nCount = 4;
|
||||
string sSubTag = GetSubString(sTag, nStart, nCount);
|
||||
string sIntTag = GetSubString(sTag, 4, 10);
|
||||
string sNameDebug = GetName(oMaster);
|
||||
|
||||
string sHenchTag = GetTag(oHench);
|
||||
if (ValidForInterjection(oMaster, oHench) && ValidForInterjection(oHench, oMaster))
|
||||
{
|
||||
|
||||
// * one liners
|
||||
if (sSubTag != "INT_" && sTag != "Interjection")
|
||||
{
|
||||
|
||||
if (HenchmanMoveable(oHench) == FALSE)
|
||||
{
|
||||
DestroyObject(OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
|
||||
AssignCommand(oHench, SetOneLiner(TRUE, MOD_EVENT_NUMBER));
|
||||
AssignCommand(oHench, SpeakOneLinerConversation("", oMaster));
|
||||
SetLocalInt(oHench, "X0_L_BUSY_SPEAKING_ONE_LINER", 10);
|
||||
// Only signal once
|
||||
DestroyObject(OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
// SpawnScriptDebugger();
|
||||
// interjections
|
||||
|
||||
int bIsInCombat = FALSE;
|
||||
if (GetIsInCombat(oMaster) == TRUE)
|
||||
{
|
||||
bIsInCombat = TRUE;
|
||||
}
|
||||
|
||||
|
||||
// * Not in combat. The 'tag' of the trigger matches the henchman's tag
|
||||
if ( ((sSubTag == "INT_" && sIntTag == sHenchTag) || (sTag == "Interjection")) && bIsInCombat == FALSE)
|
||||
{
|
||||
// SpeakString("inter");
|
||||
if (HenchmanMoveable(oHench) == FALSE)
|
||||
{
|
||||
DestroyObject(OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
|
||||
// Interlude Specific
|
||||
// Don't display this interjection if the variable is not set but
|
||||
// do not destroy the trigger either.
|
||||
if (MOD_EVENT_NUMBER == 2)
|
||||
{
|
||||
int nVar = GetLocalInt(GetModule(),"Q5_TALKED_TO_GARRICK");
|
||||
if (nVar != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
DoInterjection(oHench, oMaster, MOD_EVENT_NUMBER);
|
||||
// Only signal once
|
||||
DestroyObject(OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
// * one liners
|
||||
if (sSubTag != "INT_" && sTag != "Interjection")
|
||||
{
|
||||
// * if the popup was unable to be displayed the first time, then
|
||||
// * too bad it won't ever get displayed.
|
||||
DestroyObject(OBJECT_SELF);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user