Tweaked & Bugfixed "Spider's Captive" quest
Tweaked & Bugfixed "Spider's Captive" quest. Breathed a little life into the Warrior's Guild. Changed several quest rewards to be split among the party. Full compile.
This commit is contained in:
		| @@ -2,6 +2,6 @@ void main() | ||||
| { | ||||
|     AssignCommand(OBJECT_SELF, ClearAllActions()); | ||||
|  | ||||
|     AssignCommand(OBJECT_SELF, ActionAttack(GetNearestObjectByTag("CombatDummy"))); | ||||
|     AssignCommand(OBJECT_SELF, ActionAttack(GetNearestObjectByTag("ra_rnd_train_spw"))); | ||||
|  | ||||
| } | ||||
|   | ||||
							
								
								
									
										14
									
								
								_module/nss/at_free_antony.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								_module/nss/at_free_antony.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| //:: at_free_antony.nss | ||||
|  | ||||
| void main() | ||||
| { | ||||
| //: Declare major variables | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     object oTarget = oPC; | ||||
|     object oSpawn; | ||||
|  | ||||
|     location lTarget = GetLocation(oTarget); | ||||
|  | ||||
|     oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "npc_antony", lTarget); | ||||
|  | ||||
| } | ||||
							
								
								
									
										25
									
								
								_module/nss/at_spiders_lie.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								_module/nss/at_spiders_lie.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: FileName at_spiders_lie | ||||
| //::////////////////////////////////////////////// | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Script Wizard | ||||
| //:: Created On: 8/28/2005 11:07:31 PM | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| void main() | ||||
| { | ||||
| //:: Declare Major Variables | ||||
|     object oPC = GetPCSpeaker(); | ||||
|  | ||||
|     int nChange; | ||||
|  | ||||
|     int nAlignment = GetAlignmentGoodEvil(oPC); | ||||
|  | ||||
|     if (nAlignment ==  ALIGNMENT_LAWFUL) {nChange = 5;} | ||||
|     if (nAlignment ==  ALIGNMENT_NEUTRAL) {nChange = 3;} | ||||
|     if (nAlignment ==  ALIGNMENT_CHAOTIC) {nChange = 1;} | ||||
|  | ||||
| //:: Give the speaker some gold | ||||
|     GiveGoldToCreature(oPC, 250); | ||||
|     AdjustAlignment(oPC, ALIGNMENT_CHAOTIC, nAlignment, FALSE); | ||||
| } | ||||
| @@ -49,6 +49,11 @@ void main() | ||||
|     // AI status check. Is the AI on? | ||||
|     if(GetAIOff()) return; | ||||
|  | ||||
| //:: Skip commoners unless the are beign attacked | ||||
|     string sCommoner = GetTag(OBJECT_SELF); | ||||
|  | ||||
|     if (!GetIsInCombat() && FindSubString(sCommoner, "NPC_COM_")) return; | ||||
|  | ||||
|     // Declare main things. | ||||
|     // - We declare OUTSIDE if's JUST IN CASE! | ||||
|     object oPerceived = GetLastPerceived(); | ||||
|   | ||||
							
								
								
									
										33
									
								
								_module/nss/qst_ch_spiders01.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								_module/nss/qst_ch_spiders01.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: | ||||
| //:: qst_ch_spiders01.nss | ||||
| //:: | ||||
| //:: Copyright (c) 2022 Project RATDOG | ||||
| //:: | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Checks for stage 1 of the "Spiders" quest. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: | ||||
| //:: Created By: Jaysyn | ||||
| //:: Created On: 20221119 | ||||
| //:: | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "pqj_inc" | ||||
|  | ||||
| int StartingConditional() | ||||
| { | ||||
| //:: Declare major variables | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     int nInt; | ||||
|  | ||||
|     nInt = RetrieveQuestState("spiders", oPC); | ||||
| //  nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYspiders"); | ||||
|  | ||||
|  | ||||
|     if (!(nInt == 1)) return FALSE; | ||||
|  | ||||
|     return TRUE; | ||||
| } | ||||
							
								
								
									
										34
									
								
								_module/nss/qst_ch_spiders02.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								_module/nss/qst_ch_spiders02.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,34 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: | ||||
| //:: qst_ch_spiders02.nss | ||||
| //:: | ||||
| //:: Copyright (c) 2022 Project RATDOG | ||||
| //:: | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Checks for stage 2 of the "Spiders" quest. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: | ||||
| //:: Created By: Jaysyn | ||||
| //:: Created On: 20221119 | ||||
| //:: | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "pqj_inc" | ||||
|  | ||||
| int StartingConditional() | ||||
| { | ||||
| //:: Declare major variables | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     int nInt; | ||||
|  | ||||
|     nInt = RetrieveQuestState("spiders", oPC); | ||||
| //  nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYspiders"); | ||||
|  | ||||
|  | ||||
|     if (!(nInt == 2)) return FALSE; | ||||
|  | ||||
|     return TRUE; | ||||
| } | ||||
|  | ||||
| @@ -27,7 +27,7 @@ int StartingConditional() | ||||
| //  nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYspiders"); | ||||
|  | ||||
|  | ||||
|     if (!(nInt == 1)) return FALSE; | ||||
|     if (!(nInt == 0)) return FALSE; | ||||
|  | ||||
|     return TRUE; | ||||
| } | ||||
|   | ||||
| @@ -13,6 +13,7 @@ | ||||
|  | ||||
| #include "pqj_inc" | ||||
| #include "nw_i0_tool" | ||||
| #include "x0_i0_partywide" | ||||
|  | ||||
| void main() | ||||
| { | ||||
| @@ -20,9 +21,11 @@ void main() | ||||
|     object oPC = GetPCSpeaker(); | ||||
|  | ||||
| //:: Give the speaker some gold | ||||
|     GiveGoldToCreature(GetPCSpeaker(), 500); | ||||
|     GiveGoldToAllEqually(oPC, 500); | ||||
|  | ||||
| //:: Set quest stage & update DB. | ||||
|     AddPersistentJournalQuestEntry("spiders", 3, oPC); | ||||
| } | ||||
|  | ||||
| //:: Reward party with Quest XP | ||||
|     GiveXPToAllEqually(oPC, GetJournalQuestExperience("spiders")); | ||||
| } | ||||
|   | ||||
							
								
								
									
										81
									
								
								_module/nss/ra_rnd_drill_hb.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								_module/nss/ra_rnd_drill_hb.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,81 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Name ra_rnd_drill_hb | ||||
| //:: Copyright (c) 2022 Project RATDOG | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Default Heartbeat script | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Keith Warner | ||||
| //:: Created On: June 11/03 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| void main() | ||||
| { | ||||
| //:: Declare major variables | ||||
|  | ||||
|     int iRollTen = d10(1); | ||||
|  | ||||
|     string sSayThis; | ||||
|  | ||||
|     if(GetArea(OBJECT_SELF) == GetObjectByTag("WarriorsGuild")) | ||||
|     { | ||||
|         if(d100(1) > 71)            //:: 30% chance to fire | ||||
|         { | ||||
|             if(iRollTen != 0)       //:: Sanity check | ||||
|             { | ||||
|                 switch(iRollTen)    //:: Switch | ||||
|                 { | ||||
|                                    case 1: | ||||
|                                    sSayThis = "Attack!"; | ||||
|                                    break; | ||||
|  | ||||
|                                    case 2: | ||||
|                                    sSayThis = "Fight you maggots!!"; | ||||
|                                     break; | ||||
|  | ||||
|                                    case 3: | ||||
|                                    sSayThis = "My dead grandmother can fight better than you weaklings!"; | ||||
|                                    break; | ||||
|  | ||||
|                                    case 4: | ||||
|                                    sSayThis = "You call that a counter strike!?!"; | ||||
|                                    break; | ||||
|  | ||||
|                                    case 5: | ||||
|                                    sSayThis = "You boys are all going to die the next time the orcs attack, you know that?"; | ||||
|                                    break; | ||||
|  | ||||
|                                    case 6: | ||||
|                                    sSayThis = "If that dummy was a hobgoblin, you'd be dead private!!"; | ||||
|                                    break; | ||||
|  | ||||
|                                    case 7: | ||||
|                                    sSayThis = "Yes, yes!  Like that, very good!"; | ||||
|                                     break; | ||||
|  | ||||
|                                    case 8: | ||||
|                                    sSayThis = "Come on, come on!!"; | ||||
|                                    break; | ||||
|  | ||||
|                                    case 9: | ||||
|                                    sSayThis = "Harder!  Hit that dummy like it owes you money!"; | ||||
|                                    break; | ||||
|  | ||||
|                                    case 10: | ||||
|                                    sSayThis = "Attack, fight!"; | ||||
|                                    break; | ||||
|                                 } | ||||
|  | ||||
|                 ActionSpeakString(sSayThis);       //:: Make the NPC talk | ||||
|                         } | ||||
|                 } | ||||
|  | ||||
|     } | ||||
|  | ||||
|     //:: Execute the default NPC OnHeartbeat script | ||||
|     ExecuteScript("nw_c2_default1", OBJECT_SELF); | ||||
|  | ||||
|     //:: Execute the PRC NPC OnHeartbeat script | ||||
|     ExecuteScript("prc_npc_hb", OBJECT_SELF); | ||||
| } | ||||
| @@ -15,7 +15,7 @@ void main() | ||||
|  | ||||
| //:: Attack the Combat Dummy | ||||
|     AssignCommand(OBJECT_SELF, ClearAllActions()); | ||||
|     AssignCommand(OBJECT_SELF, ActionAttack(GetNearestObjectByTag("CombatDummy"))); | ||||
|     AssignCommand(OBJECT_SELF, ActionAttack(GetNearestObjectByTag("RA_PLC_CMB_DUMMY"))); | ||||
|  | ||||
| //:: Execute the default NPC OnHeartbeat script | ||||
|     ExecuteScript("nw_c2_default1", OBJECT_SELF); | ||||
|   | ||||
| @@ -489,6 +489,6 @@ void main() | ||||
|     SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN)); | ||||
|     } | ||||
|  | ||||
|     AssignCommand(OBJECT_SELF, ActionAttack(GetNearestObjectByTag("CombatDummy"))); | ||||
|     AssignCommand(OBJECT_SELF, ActionAttack(GetNearestObjectByTag("RA_PLC_CMB_DUMMY"))); | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -123,6 +123,31 @@ int SpawnCheckCustom(object oSpawn) | ||||
|     } | ||||
| //:: Checks for stage 1 or lower for the "Spider's Captive quest" | ||||
|  | ||||
|  | ||||
| //:: Checks for stage 2 or lower for the "Spider's Captive quest" | ||||
|     if (nSpawnCheckCustom == 51) | ||||
| 	{ | ||||
| 	//:: Initialize major variables | ||||
| 		object oArea = GetArea(OBJECT_SELF); | ||||
| 		object oPC = GetFirstObjectInArea(oArea); | ||||
|  | ||||
| 		//:: Cycle through PCs in Area | ||||
| 		while (oPC != OBJECT_INVALID) | ||||
| 		{ | ||||
| 		//:: Check quest stage | ||||
| 			if ( RetrieveQuestState("spiders", oPC) <= 2 ) | ||||
| 			{ | ||||
| 				nProcessSpawn = TRUE; | ||||
| 				//SendMessageToPC(oPC, "Spawn Processed"); | ||||
| 				SetLocalInt(oSpawn, "SpawnProcessed", TRUE); | ||||
| 			} | ||||
|  | ||||
| 		oPC = GetNextObjectInArea(oArea); | ||||
| 		} | ||||
|     } | ||||
| //:: Checks for stage 2 or lower for the "Spider's Captive quest" | ||||
|  | ||||
|  | ||||
| // ------------------------------------------- | ||||
| // Only Make Modifications Between These Lines | ||||
| // | ||||
|   | ||||
							
								
								
									
										138
									
								
								_module/nss/wg_training.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										138
									
								
								_module/nss/wg_training.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,138 @@ | ||||
| /* | ||||
|   Created By: Lilivati  02.09.2004 | ||||
|   Updated By: Jaysyn 2022.11.19 | ||||
|  | ||||
|   This script has a commander issuing orders to a group of trainees.  I use it in the OnHeartbeat | ||||
|     event for an area. | ||||
|  | ||||
|   The demo mod uses 6 trainees, but any number will do. | ||||
|   You can change the existing case statement actions to whatever you want the trainees to do, | ||||
|      but if you want to add more actions, you have to change line 35 to a different die. | ||||
|  | ||||
|   Important Info: | ||||
|   1) In Case 1, you need to set the direction in the last line before break to whatever | ||||
|      direction your trainees were originally facing. | ||||
|   2) Case 1 (Attack!) tends to break up orderly trainee lines.  I tried to compensate for | ||||
|      this, but I'm only moderately happy with the result.  Check out the demo mod to see | ||||
|      what I mean.  Widely spacing the trainees also seems to help.  (This would have been | ||||
|      much cleaner if combat animations were available as constants...) | ||||
|   3) Make sure your invisible objects are outside of the trainee's "space" or it won't look | ||||
|      nice in the module | ||||
|   4) To demonstrate Case 4, my trainees have artificially high hide skill ranks, and the | ||||
|      Hide In Plain Sight feat.  Normal trainees will fail to hide from most PCs. (Note: if | ||||
|      your trainees do not have this feat, you might want to comment out (//) line 75) | ||||
|  | ||||
|   Objects needed: | ||||
|     Commander: NPC, tag "COMMANDER" | ||||
|     Trainee: NPC, tag "TRAINEE" | ||||
|     An invisible object placed in front of each trainee, useable, plot object, with faction set to Hostile | ||||
|     A waypoint where each trainee is standing | ||||
| */ | ||||
|  | ||||
| void main() | ||||
| { | ||||
| //:: Declare major variables | ||||
|     int i = 0; | ||||
|     object oComm = GetObjectByTag("RA_HU_M_DRILL01"); | ||||
|     object oNoob = GetObjectByTag("RA_HU_M_TRAIN01", i); | ||||
|     object oDummy = GetObjectByTag("ra_plc_cmb_dummy"); | ||||
|  | ||||
|     float fFacing = GetFacing(oNoob); | ||||
|  | ||||
| //:: this "if" statement is nice if you're using the commander in more than one area; if the "if" | ||||
| //:: statement isn't present, wherever the commander is she'll be yelling "Attack!" "Duck!" etc. | ||||
|     if(GetArea(GetFirstPC()) == GetObjectByTag("WarriorsGuild")) | ||||
|     { | ||||
|         int nRoll = d10(1); | ||||
|  | ||||
|         while(oNoob != OBJECT_INVALID) | ||||
|         { | ||||
|             switch (nRoll) | ||||
|             { | ||||
|             //:: trainees attack nearest invisible object and return to position of nearest waypoint | ||||
|                 case 1: | ||||
|                 AssignCommand(oComm,ActionSpeakString("Attack!")); | ||||
|                 DelayCommand(0.1f,AssignCommand(oNoob,SetFacing(DIRECTION_NORTH))); | ||||
|                 DelayCommand(1.0f,AssignCommand(oNoob,ActionAttack(oDummy, FALSE))); | ||||
|                 //DelayCommand(6.0f,AssignCommand(oNoob,ActionMoveToObject(GetNearestObjectToLocation(OBJECT_TYPE_WAYPOINT,GetLocation(oNoob)),TRUE,1.0f))); | ||||
|                 DelayCommand(7.0f,AssignCommand(oNoob,SetFacing(DIRECTION_NORTH))); | ||||
|                 break; | ||||
|  | ||||
|             //:: trainees execute duck animation | ||||
|                 case 2: | ||||
|                 AssignCommand(oComm,ActionSpeakString("Duck!")); | ||||
|                 DelayCommand(1.0f,AssignCommand(oNoob,ActionPlayAnimation(ANIMATION_FIREFORGET_DODGE_DUCK,1.0f))); | ||||
|                 DelayCommand(5.0f,AssignCommand(oNoob,ClearAllActions(TRUE))); | ||||
|                 break; | ||||
|  | ||||
|             //:: trainees execute dodge animation | ||||
|                 case 3: | ||||
|                 AssignCommand(oComm,ActionSpeakString("Dodge!")); | ||||
|                 DelayCommand(1.0f,AssignCommand(oNoob,ActionPlayAnimation(ANIMATION_FIREFORGET_DODGE_SIDE,1.0f))); | ||||
|                 DelayCommand(5.0f,AssignCommand(oNoob,ClearAllActions(TRUE))); | ||||
|                 break; | ||||
|  | ||||
|             //:: trainees attack nearest invisible object and return to position of nearest waypoint | ||||
|                 case 4: | ||||
|                 AssignCommand(oComm,ActionSpeakString("Attack!")); | ||||
|                 DelayCommand(0.1f,AssignCommand(oNoob,SetFacing(DIRECTION_NORTH))); | ||||
|                 DelayCommand(1.0f,AssignCommand(oNoob,ActionAttack(oDummy, FALSE))); | ||||
|                 //DelayCommand(6.0f,AssignCommand(oNoob,ActionMoveToObject(GetNearestObjectToLocation(OBJECT_TYPE_WAYPOINT,GetLocation(oNoob)),TRUE,1.0f))); | ||||
|                 DelayCommand(7.0f,AssignCommand(oNoob,SetFacing(DIRECTION_NORTH))); | ||||
|                 break; | ||||
|  | ||||
|             //:: trainees execute duck animation | ||||
|                 case 5: | ||||
|                 AssignCommand(oComm,ActionSpeakString("Duck!")); | ||||
|                 DelayCommand(1.0f,AssignCommand(oNoob,ActionPlayAnimation(ANIMATION_FIREFORGET_DODGE_DUCK,1.0f))); | ||||
|                 DelayCommand(5.0f,AssignCommand(oNoob,ClearAllActions(TRUE))); | ||||
|                 break; | ||||
|  | ||||
|             //:: trainees execute dodge animation | ||||
|                 case 6: | ||||
|                 AssignCommand(oComm,ActionSpeakString("Dodge!")); | ||||
|                 DelayCommand(1.0f,AssignCommand(oNoob,ActionPlayAnimation(ANIMATION_FIREFORGET_DODGE_SIDE,1.0f))); | ||||
|                 DelayCommand(5.0f,AssignCommand(oNoob,ClearAllActions(TRUE))); | ||||
|                 break; | ||||
|  | ||||
|             //:: trainees go into stealth mode and then leave stealth mode | ||||
|                 case 7: | ||||
|                 AssignCommand(oComm,ActionSpeakString("Hide!")); | ||||
|                 DelayCommand(1.0f,AssignCommand(oNoob,ActionUseSkill(SKILL_HIDE,GetFirstPC(),0,OBJECT_INVALID))); | ||||
|                 DelayCommand(2.0f,AssignCommand(oNoob,ActionUseFeat(FEAT_HIDE_IN_PLAIN_SIGHT,GetFirstPC()))); | ||||
|             //:: they're trainees so they're pretty bad at hiding :) | ||||
|                 DelayCommand(5.0f,AssignCommand(oComm,ActionSpeakString("Pitiful!"))); | ||||
|                 DelayCommand(7.0f,AssignCommand(oNoob,ClearAllActions(TRUE))); | ||||
|                 break; | ||||
|  | ||||
|             //:: trainees attack nearest invisible object and return to position of nearest waypoint | ||||
|                 case 8: | ||||
|                 AssignCommand(oComm,ActionSpeakString("Attack!")); | ||||
|                 DelayCommand(0.1f,AssignCommand(oNoob,SetFacing(DIRECTION_NORTH))); | ||||
|                 DelayCommand(1.0f,AssignCommand(oNoob,ActionAttack(oDummy, FALSE))); | ||||
|                 //DelayCommand(5.0f,AssignCommand(oNoob,ClearAllActions(TRUE))); | ||||
|                 //DelayCommand(6.0f,AssignCommand(oNoob,ActionMoveToObject(GetNearestObjectToLocation(OBJECT_TYPE_WAYPOINT,GetLocation(oNoob)),TRUE,1.0f))); | ||||
|                 DelayCommand(7.0f,AssignCommand(oNoob,SetFacing(DIRECTION_NORTH))); | ||||
|                 break; | ||||
|  | ||||
|              //:: trainees execute salute animation | ||||
|                 case 9: | ||||
|                 AssignCommand(oComm,ActionSpeakString("Salute!")); | ||||
|                 DelayCommand(1.0f,AssignCommand(oNoob,ActionPlayAnimation(ANIMATION_FIREFORGET_SALUTE,1.0f))); | ||||
|                 DelayCommand(5.0f,AssignCommand(oNoob,ClearAllActions(TRUE))); | ||||
|                 break; | ||||
|  | ||||
|             //:: trainees sit on ground | ||||
|                 case 10: | ||||
|                 AssignCommand(oComm,ActionSpeakString("Alright, take a short break.")); | ||||
|                 DelayCommand(1.0f,AssignCommand(oNoob,ActionSpeakString("Finally!"))); | ||||
|                 DelayCommand(2.0f,AssignCommand(oNoob,ActionPlayAnimation(ANIMATION_LOOPING_SIT_CROSS,1.0f,4.0f))); | ||||
|                 DelayCommand(7.0f,AssignCommand(oNoob,ClearAllActions(TRUE))); | ||||
|                 break; | ||||
|             } | ||||
|  | ||||
|         i++; | ||||
|         oNoob = GetObjectByTag("RA_HU_M_TRAIN01",i); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user