Further file organization
Further file organization
This commit is contained in:
		
							
								
								
									
										30
									
								
								nwn/nwnprc/trunk/epicspellscripts/_ev_onitemactiv.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								nwn/nwnprc/trunk/epicspellscripts/_ev_onitemactiv.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "_ev_onitemactiv" | ||||
| /*   Purpose: Event handler script for module's OnItemActivated event. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     object oItem = GetItemActivated(); | ||||
|     object oPC = GetItemActivator(); | ||||
|  | ||||
|     // One of the Epic Seed books. | ||||
|     if (GetStringLeft(GetTag(oItem), 8) == "EPIC_SD_") | ||||
|         ExecuteScript("activate_seeds", oPC); | ||||
|  | ||||
|     // One of the Epic Spell books. | ||||
|     if (GetStringLeft(GetResRef(oItem), 8) == "epic_sp_") | ||||
|         ExecuteScript("activate_epspell", oPC); | ||||
|  | ||||
|     // "A Gem Caged Creature" item received from the epic spell Gem Cage. | ||||
|     if (GetTag(oItem) == "IT_GEMCAGE_GEM") | ||||
|         ExecuteScript("run_gemcage_gem", oPC); | ||||
|  | ||||
|     // "Whip of Shar" item received from the epic spell Whip of Shar. | ||||
|     if (GetTag(oItem) == "WhipofShar") | ||||
|         ExecuteScript("run_whipofshar", oPC); | ||||
|  | ||||
| } | ||||
							
								
								
									
										123
									
								
								nwn/nwnprc/trunk/epicspellscripts/_plc_rsrch_ep_sp.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										123
									
								
								nwn/nwnprc/trunk/epicspellscripts/_plc_rsrch_ep_sp.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,123 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "_plc_rsrch_ep_sp" | ||||
| /*   Purpose: This is the OnDisturbed event handler script for a placeable. | ||||
|         When an epic spell's book is placed into the inventory, it will search | ||||
|         and determine validity of the item, and then proceed with the proper | ||||
|         researching functions. | ||||
|  | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| // This constant sets who may or may not research spells from the placeable | ||||
| //      this script is attached to. For example, if you only want arcane casters | ||||
| //      to be able to research from a lab, and not druids or clerics, you must | ||||
| //      determine the exclusivity for the placebale with this constant. | ||||
| // | ||||
| // You should save the script under a different name once constant is set.... | ||||
| // | ||||
| // Keywords to use for this constant: | ||||
| // For CLERICS ONLY ---- "CLERIC" | ||||
| // For DRUIDS ONLY ---- "DRUID" | ||||
| // For HEALERS ONLY ---- "HEALER" | ||||
| // For FAVOURED SOULS ONLY ---- "FAVSOUL" | ||||
| // For ALL DIVINE ---- "DIVINE" | ||||
| // For SORCERERS AND WIZARDS ONLY ---- "ARCANE" | ||||
| // For EVERYONE ---- "ALL" | ||||
| string WHO_CAN_RESEARCH = "ALL"; | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     if (GetInventoryDisturbType() == INVENTORY_DISTURB_TYPE_ADDED) | ||||
|     { | ||||
|       object oBook = GetInventoryDisturbItem(); | ||||
|       object oPC = GetLastDisturbed(); | ||||
|       if(DEBUG) DoDebug("Player Name: " + GetName(oPC)); | ||||
|       string sBook = GetTag(oBook); | ||||
|       if(GetStringLeft(GetResRef(oBook), 8) == "epic_sp_") | ||||
|       { | ||||
|         if(DEBUG) DoDebug("Book Tag: " + sBook); | ||||
|         //remove the "EPIC_SP_" part | ||||
|         //sBook = GetStringRight(sBook, GetStringLength(sBook)-8); | ||||
|         if(DEBUG) DoDebug("Book Tag after Editing: " + sBook); | ||||
|         int nEpicSpell = GetSpellFromAbrev(sBook); | ||||
|         if(DEBUG) DoDebug("SpellID: " + IntToString(nEpicSpell)); | ||||
|         int nDC = GetDCForSpell(nEpicSpell); | ||||
|         int nIP = GetResearchIPForSpell(nEpicSpell); | ||||
|         int nFE = GetResearchFeatForSpell(nEpicSpell); | ||||
|         int nR1 = GetR1ForSpell(nEpicSpell); | ||||
|         int nR2 = GetR2ForSpell(nEpicSpell); | ||||
|         int nR3 = GetR3ForSpell(nEpicSpell); | ||||
|         int nR4 = GetR4ForSpell(nEpicSpell); | ||||
|         int nS1 = GetS1ForSpell(nEpicSpell); | ||||
|         int nS2 = GetS2ForSpell(nEpicSpell); | ||||
|         int nS3 = GetS3ForSpell(nEpicSpell); | ||||
|         int nS4 = GetS4ForSpell(nEpicSpell); | ||||
|         int nS5 = GetS5ForSpell(nEpicSpell); | ||||
|         string sSc = GetSchoolForSpell(nEpicSpell); | ||||
|         // Make sure the player is allowed to research from this placeable. | ||||
|         int nAllowed = FALSE; | ||||
|         // check they have the epic spellcasting feat | ||||
|         if (GetHasFeat(FEAT_EPIC_SPELLCASTING, oPC)) | ||||
|         { | ||||
|             if (WHO_CAN_RESEARCH == "ALL") nAllowed = TRUE; | ||||
|             else if (WHO_CAN_RESEARCH == "CLERIC" && (GetIsEpicCleric(oPC) || GetIsEpicUrPriest(oPC))) nAllowed = TRUE; | ||||
|             else if (WHO_CAN_RESEARCH == "DRUID" && (GetIsEpicDruid(oPC) || GetIsEpicBlighter(oPC))) nAllowed = TRUE; | ||||
|             else if (WHO_CAN_RESEARCH == "HEALER" && GetIsEpicHealer(oPC)) nAllowed = TRUE; | ||||
|             else if (WHO_CAN_RESEARCH == "FAVSOUL" && GetIsEpicFavSoul(oPC)) nAllowed = TRUE; | ||||
|             else if (WHO_CAN_RESEARCH == "DIVINE" && | ||||
|                 (GetIsEpicCleric(oPC) || GetIsEpicDruid(oPC) ||  | ||||
|                 GetIsEpicHealer(oPC) || GetIsEpicFavSoul(oPC) ||  | ||||
|                 GetIsEpicShaman(oPC) || GetIsEpicArchivist(oPC))) nAllowed = TRUE; | ||||
|             else if (WHO_CAN_RESEARCH == "ARCANE" && (GetIsEpicSorcerer(oPC) || | ||||
|                 GetIsEpicWizard(oPC) || GetIsEpicWarmage(oPC) || GetIsEpicDreadNecromancer(oPC) || | ||||
|                 GetIsEpicWitch(oPC) || GetIsEpicSublimeChord(oPC) || GetIsEpicBeguiler(oPC))) nAllowed = TRUE; | ||||
|         } | ||||
|         if (nAllowed == TRUE) | ||||
|         { | ||||
|             // Make sure the player doesn't already know this spell. | ||||
|             if (!GetHasEpicSpellKnown(nEpicSpell, oPC)) | ||||
|             { | ||||
|                 // If applicable, adjust the spell's DC. | ||||
|                 if (GetPRCSwitch(PRC_EPIC_FOCI_ADJUST_DC) == TRUE) | ||||
|                     nDC -= GetDCSchoolFocusAdjustment(oPC, sSc); | ||||
|                 // Does the player have enough gold? | ||||
|                 if (GetHasEnoughGoldToResearch(oPC, nDC)) | ||||
|                 { | ||||
|                     // Does the player have enough extra experience? | ||||
|                     if (GetHasEnoughExperienceToResearch(oPC, nDC)) | ||||
|                     { | ||||
|                         // Does the player have all of the other requirements? | ||||
|                         if (GetHasRequiredFeatsForResearch(oPC, nR1, nR2, nR3, nR4, nS1, nS2, nS3, nS4, nS5)) | ||||
|                         { | ||||
|                             DoSpellResearch(oPC, nDC, nEpicSpell, sSc, oBook); | ||||
|                             return; | ||||
|                         } | ||||
|                         else | ||||
|                             SendMessageToPC(oPC, GetName(oPC) + " " + MES_NOT_HAVE_REQ_FEATS); | ||||
|                     } | ||||
|                     else | ||||
|                         SendMessageToPC(oPC, GetName(oPC) + " " + MES_NOT_ENOUGH_XP); | ||||
|                 } | ||||
|                 else | ||||
|                     SendMessageToPC(oPC, GetName(oPC) + " " + MES_NOT_ENOUGH_GOLD); | ||||
|             } | ||||
|             else | ||||
|                 SendMessageToPC(oPC, GetName(oPC) + " " + MES_KNOW_SPELL); | ||||
|         } | ||||
|         else | ||||
|             SendMessageToPC(oPC, GetName(oPC) + " " + MES_CANNOT_RESEARCH_HERE); | ||||
|         //couldnt research, give the book back. | ||||
|         CopyItem(oBook, oPC, TRUE); | ||||
|         DestroyObject(oBook); | ||||
|       } | ||||
|       else | ||||
|       { | ||||
|         if(DEBUG) DoDebug("Item is not an epic spell's book!"); | ||||
|       } | ||||
|     } | ||||
| } | ||||
							
								
								
									
										88
									
								
								nwn/nwnprc/trunk/epicspellscripts/activate_epspell.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								nwn/nwnprc/trunk/epicspellscripts/activate_epspell.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,88 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "activate_epspell" | ||||
| /*   Purpose: This is the script that gets called by the OnItemActivated event | ||||
|         when the item is one of the Epic Spell books. It essentially displays | ||||
|         all relevant information on the epic spell, so that a player may make | ||||
|         an informed decision on whether to research the spell or not. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| void main() | ||||
| { | ||||
|     if(DEBUG) DoDebug("activate_epspell executing"); | ||||
|  | ||||
|     object oBook = GetItemActivated(); | ||||
|     string sBook = GetTag(oBook); | ||||
|     string sName, sDesc; | ||||
|     int nEpicSpell = GetSpellFromAbrev(sBook); | ||||
|     int nDC = GetDCForSpell(nEpicSpell); | ||||
|     int nIP = GetResearchIPForSpell(nEpicSpell); | ||||
|     int nFE = GetResearchFeatForSpell(nEpicSpell); | ||||
|     int nR1 = GetR1ForSpell(nEpicSpell); | ||||
|     int nR2 = GetR2ForSpell(nEpicSpell); | ||||
|     int nR3 = GetR3ForSpell(nEpicSpell); | ||||
|     int nR4 = GetR4ForSpell(nEpicSpell); | ||||
|     int nS1 = GetS1ForSpell(nEpicSpell); | ||||
|     int nS2 = GetS2ForSpell(nEpicSpell); | ||||
|     int nS3 = GetS3ForSpell(nEpicSpell); | ||||
|     int nS4 = GetS4ForSpell(nEpicSpell); | ||||
|     int nS5 = GetS5ForSpell(nEpicSpell); | ||||
|     int nXC = GetCastXPForSpell(nEpicSpell); | ||||
|     string sSc = GetSchoolForSpell(nEpicSpell); | ||||
|     // If applicable, adjust the spell's DC. | ||||
|     if(GetPRCSwitch(PRC_EPIC_FOCI_ADJUST_DC)) | ||||
|         nDC -= GetDCSchoolFocusAdjustment(OBJECT_SELF, sSc); | ||||
|  | ||||
|     int nGP = nDC * GetPRCSwitch(PRC_EPIC_GOLD_MULTIPLIER); | ||||
|     int nXP = nGP / GetPRCSwitch(PRC_EPIC_XP_FRACTION); | ||||
|     sName = GetStringByStrRef(StringToInt(Get2DACache("feat", "feat", nFE))); | ||||
|     sDesc = GetStringByStrRef(StringToInt(Get2DACache("feat", "description", nFE))); | ||||
|  | ||||
|     // Information message sent to player about the Epic Spell. | ||||
|     SendMessageToPC(OBJECT_SELF, "-------------------------------------------"); | ||||
|     SendMessageToPC(OBJECT_SELF, "Requirements for the research of the " + sName + ":"); | ||||
|     SendMessageToPC(OBJECT_SELF, " - You must be an epic level spellcaster."); | ||||
|     SendMessageToPC(OBJECT_SELF, " - The DC for you to research/cast is " + IntToString(nDC) + "."); | ||||
|     SendMessageToPC(OBJECT_SELF, " - The XP cost for you to research is " + IntToString(nXP) + "."); | ||||
|     SendMessageToPC(OBJECT_SELF, " - The gold cost for you to research is " + IntToString(nGP) + "."); | ||||
|     if (nS1 != -1) | ||||
|         SendMessageToPC(OBJECT_SELF, " - " + GetStringByStrRef(StringToInt | ||||
|         (Get2DACache("feat", "feat", StringToInt(Get2DACache("epicspellseeds", "FeatID", nS1)))))); | ||||
|     if (nS2 != -1) | ||||
|         SendMessageToPC(OBJECT_SELF, " - " + GetStringByStrRef(StringToInt | ||||
|         (Get2DACache("feat", "feat", StringToInt(Get2DACache("epicspellseeds", "FeatID", nS2)))))); | ||||
|     if (nS3 != -1) | ||||
|         SendMessageToPC(OBJECT_SELF, " - " + GetStringByStrRef(StringToInt | ||||
|         (Get2DACache("feat", "feat", StringToInt(Get2DACache("epicspellseeds", "FeatID", nS3)))))); | ||||
|     if (nS4 != -1) | ||||
|         SendMessageToPC(OBJECT_SELF, " - " + GetStringByStrRef(StringToInt | ||||
|         (Get2DACache("feat", "feat", StringToInt(Get2DACache("epicspellseeds", "FeatID", nS4)))))); | ||||
|     if (nS5 != -1) | ||||
|         SendMessageToPC(OBJECT_SELF, " - " + GetStringByStrRef(StringToInt | ||||
|         (Get2DACache("feat", "feat", StringToInt(Get2DACache("epicspellseeds", "FeatID", nS5)))))); | ||||
|     if (nR1 != 0) | ||||
|         SendMessageToPC(OBJECT_SELF, " - " + GetStringByStrRef(StringToInt | ||||
|         (Get2DACache("feat", "feat", nR1)))); | ||||
|     if (nR2 != 0) | ||||
|         SendMessageToPC(OBJECT_SELF, " - " + GetStringByStrRef(StringToInt | ||||
|         (Get2DACache("feat", "feat", nR2)))); | ||||
|     if (nR3 != 0) | ||||
|         SendMessageToPC(OBJECT_SELF, " - " + GetStringByStrRef(StringToInt | ||||
|         (Get2DACache("feat", "feat", nR3)))); | ||||
|     if (nR4 != 0) | ||||
|         SendMessageToPC(OBJECT_SELF, " - " + GetStringByStrRef(StringToInt | ||||
|         (Get2DACache("feat", "feat", nR4)))); | ||||
|     if (nXC != 0 && GetPRCSwitch(PRC_EPIC_XP_COSTS) == TRUE) | ||||
|         SendMessageToPC(OBJECT_SELF, " - Additionally, " + IntToString(nXC) + | ||||
|             " experience points are spent per casting."); | ||||
|     SendMessageToPC(OBJECT_SELF, " "); | ||||
|     SendMessageToPC(OBJECT_SELF, "Spell Description:"); | ||||
|     SendMessageToPC(OBJECT_SELF, sDesc); | ||||
|     SendMessageToPC(OBJECT_SELF, "-------------------------------------------"); | ||||
|  | ||||
| } | ||||
							
								
								
									
										55
									
								
								nwn/nwnprc/trunk/epicspellscripts/activate_seeds.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								nwn/nwnprc/trunk/epicspellscripts/activate_seeds.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "activate_seeds" | ||||
| /*   Purpose: This is the script that gets called by the OnItemActivated event | ||||
|         when the item is one of the Epic Spell Seed books. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     if(DEBUG) DoDebug("activate_seeds executing"); | ||||
|  | ||||
|     object oPC = OBJECT_SELF; | ||||
|     object oBook = GetItemActivated(); | ||||
|     int nSeed = GetSeedFromAbrev(GetTag(oBook)); | ||||
|     //int nFE = GetFeatForSeed(nSeed); | ||||
|     //int nIP = GetIPForSeed(nSeed); | ||||
|  | ||||
|     // Give the seed if the player is able to comprehend it, doesn't already | ||||
|     // have it, and is allowed to learn it. | ||||
|     if(GetCanLearnSeed(oPC, nSeed)) | ||||
|     { | ||||
|         if(!GetHasEpicSeedKnown(nSeed, oPC)) | ||||
|         { | ||||
|             int nDC = GetDCForSeed(nSeed); | ||||
|             if (GetSpellcraftSkill(oPC) >= nDC) | ||||
|             { | ||||
|                 if (PLAY_SPELLSEED_CUT == TRUE) | ||||
|                     ExecuteScript(SPELLSEEDS_CUT, oPC); | ||||
|                 SetEpicSeedKnown(nSeed, oPC, TRUE); | ||||
|                 SendMessageToPC(oPC, MES_LEARN_SEED); | ||||
|                 DoBookDecay(oBook, oPC); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 SendMessageToPC(oPC, GetName(oPC) + " " + MES_NOT_ENOUGH_SKILL); | ||||
|                 SendMessageToPC(oPC, "You need a spellcraft skill of " + | ||||
|                     IntToString(nDC) + " or greater."); | ||||
|             } | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             SendMessageToPC(oPC, MES_KNOW_SEED); | ||||
|         } | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         SendMessageToPC(oPC, MES_CLASS_NOT_ALLOWED); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										46
									
								
								nwn/nwnprc/trunk/epicspellscripts/aoe_rainfire_ent.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								nwn/nwnprc/trunk/epicspellscripts/aoe_rainfire_ent.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "aoe_rainfire_ent" | ||||
| /*   Purpose: AoE Rain of Fire spell's OnEnter script. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| #include "prc_add_spell_dc" | ||||
|  | ||||
|  | ||||
| void main() | ||||
| { | ||||
|  | ||||
|  | ||||
|     object oTarget = GetEnteringObject(); | ||||
|     object oCaster = GetAreaOfEffectCreator(); | ||||
|     int nDC = GetEpicSpellSaveDC(oCaster, oTarget, SPELL_EPIC_RAINFIR); | ||||
|     SetAllAoEInts(4054, OBJECT_SELF, PRCGetSaveDC(oTarget, oCaster)); | ||||
|     int nDamage; | ||||
|     effect eDam; | ||||
|     effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); | ||||
|     float fDelay; | ||||
|  | ||||
|     if (oTarget != oCaster && | ||||
|         !GetIsDM(oTarget)) | ||||
|     { | ||||
|         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_INCENDIARY_CLOUD) ); | ||||
|         if(!PRCDoResistSpell(oCaster, oTarget, GetTotalCastingLevel(oCaster)+SPGetPenetr(oCaster), fDelay)) | ||||
|         { | ||||
|             fDelay = PRCGetRandomDelay(0.5, 2.0); | ||||
|             nDamage = d6(1); | ||||
|             eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); | ||||
|             if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_FIRE, oCaster, fDelay)) | ||||
|             { | ||||
|                 DelayCommand(fDelay, | ||||
|                     SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); | ||||
|                 DelayCommand(fDelay, | ||||
|                     SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/aoe_rainfire_ext.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/aoe_rainfire_ext.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "aoe_rainfire_ext" | ||||
| /*   Purpose: AoE Rain of Fire's OnExit script. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| void main() | ||||
| { | ||||
| } | ||||
|  | ||||
							
								
								
									
										57
									
								
								nwn/nwnprc/trunk/epicspellscripts/aoe_rainfire_hb.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								nwn/nwnprc/trunk/epicspellscripts/aoe_rainfire_hb.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,57 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "aoe_rainfire_hb" | ||||
| /*   Purpose: AoE Rain of Fire's Heartbeat script. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| #include "prc_add_spell_dc" | ||||
|  | ||||
|  | ||||
| void main() | ||||
| { | ||||
|  | ||||
|     SetAllAoEInts(4054, OBJECT_SELF, GetSpellSaveDC()); | ||||
|  | ||||
|     int nDamage; | ||||
|     effect eDam; | ||||
|     object oTarget; | ||||
|     object oCaster = GetAreaOfEffectCreator(); | ||||
|  | ||||
|     effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); | ||||
|     float fDelay; | ||||
|     oTarget = GetFirstInPersistentObject | ||||
|         (OBJECT_SELF, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); | ||||
|  | ||||
|     while(GetIsObjectValid(oTarget)) | ||||
|     { | ||||
|         if (oTarget != oCaster && | ||||
|         !GetIsDM(oTarget)) | ||||
|         { | ||||
|             fDelay = PRCGetRandomDelay(0.5, 2.0); | ||||
|             if(!PRCDoResistSpell(oCaster, oTarget, GetTotalCastingLevel(oCaster)+SPGetPenetr(oCaster), fDelay)) | ||||
|             { | ||||
|  | ||||
|                 SignalEvent(oTarget, | ||||
|                     EventSpellCastAt(oCaster, SPELL_INCENDIARY_CLOUD)); | ||||
|                 nDamage = d6(1); | ||||
|                 eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); | ||||
|                 int nDC = GetEpicSpellSaveDC(oCaster, oTarget, SPELL_EPIC_RAINFIR); | ||||
|                 if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_FIRE, oCaster, fDelay)) | ||||
|                 { | ||||
|                     DelayCommand(fDelay, | ||||
|                         SPApplyEffectToObject | ||||
|                             (DURATION_TYPE_INSTANT, eDam, oTarget)); | ||||
|                     DelayCommand(fDelay, | ||||
|                         SPApplyEffectToObject | ||||
|                             (DURATION_TYPE_INSTANT, eVis, oTarget)); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         oTarget = GetNextInPersistentObject | ||||
|             (OBJECT_SELF, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contingentreu.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contingentreu.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contingentreu" | ||||
| /*   Purpose: This calls the "contingent_reun" script, which is the true script | ||||
|         for the Contingent Reunion spell. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     ExecuteScript("contingent_reun", GetPCSpeaker()); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contre0_reset.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contre0_reset.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contre0_reset" | ||||
| /*   Purpose: Dispels any active Contingent Reunion Zero's cast by oPC. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     DeleteLocalInt(oPC, "nContingentReunion0"); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contre1_reset.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contre1_reset.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contre1_reset" | ||||
| /*   Purpose: Dispels any active Contingent Reunion One's cast by oPC. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     DeleteLocalInt(oPC, "nContingentReunion1"); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contre2_reset.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contre2_reset.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contre2_reset" | ||||
| /*   Purpose: Dispels any active Contingent Reunion Two's cast by oPC. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     DeleteLocalInt(oPC, "nContingentReunion2"); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contre3_reset.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contre3_reset.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contre3_reset" | ||||
| /*   Purpose: Dispels any active Contingent Reunion Three's cast by oPC. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     DeleteLocalInt(oPC, "nContingentReunion3"); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contre4_reset.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contre4_reset.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contre4_reset" | ||||
| /*   Purpose: Dispels any active Contingent Reunion Four's cast by oPC. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     DeleteLocalInt(oPC, "nContingentReunion4"); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contre5_reset.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contre5_reset.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contre5_reset" | ||||
| /*   Purpose: Dispels any active Contingent Reunion Five's cast by oPC. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     DeleteLocalInt(oPC, "nContingentReunion5"); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_iaffl.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_iaffl.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contreu_*****" | ||||
| /*   Purpose: These scripts set the variable for use in the Contingent Reunion | ||||
|         spell. The variable is the condition that will trigger the teleportation | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalInt(GetPCSpeaker(), "nReunionTrigger", 5); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_ibadl.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_ibadl.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contreu_*****" | ||||
| /*   Purpose: These scripts set the variable for use in the Contingent Reunion | ||||
|         spell. The variable is the condition that will trigger the teleportation | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalInt(GetPCSpeaker(), "nReunionTrigger", 4); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_idead.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_idead.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contreu_*****" | ||||
| /*   Purpose: These scripts set the variable for use in the Contingent Reunion | ||||
|         spell. The variable is the condition that will trigger the teleportation | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalInt(GetPCSpeaker(), "nReunionTrigger", 0); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_idyin.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_idyin.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contreu_*****" | ||||
| /*   Purpose: These scripts set the variable for use in the Contingent Reunion | ||||
|         spell. The variable is the condition that will trigger the teleportation | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalInt(GetPCSpeaker(), "nReunionTrigger", 1); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_iinca.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_iinca.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contreu_*****" | ||||
| /*   Purpose: These scripts set the variable for use in the Contingent Reunion | ||||
|         spell. The variable is the condition that will trigger the teleportation | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalInt(GetPCSpeaker(), "nReunionTrigger", 2); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_inear.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_inear.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contreu_*****" | ||||
| /*   Purpose: These scripts set the variable for use in the Contingent Reunion | ||||
|         spell. The variable is the condition that will trigger the teleportation | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalInt(GetPCSpeaker(), "nReunionTrigger", 3); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_taffl.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_taffl.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contreu_*****" | ||||
| /*   Purpose: These scripts set the variable for use in the Contingent Reunion | ||||
|         spell. The variable is the condition that will trigger the teleportation | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalInt(GetPCSpeaker(), "nReunionTrigger", 15); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_tbadl.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_tbadl.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contreu_*****" | ||||
| /*   Purpose: These scripts set the variable for use in the Contingent Reunion | ||||
|         spell. The variable is the condition that will trigger the teleportation | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalInt(GetPCSpeaker(), "nReunionTrigger", 14); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_tdead.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_tdead.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contreu_*****" | ||||
| /*   Purpose: These scripts set the variable for use in the Contingent Reunion | ||||
|         spell. The variable is the condition that will trigger the teleportation | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalInt(GetPCSpeaker(), "nReunionTrigger", 10); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_tdyin.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_tdyin.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contreu_*****" | ||||
| /*   Purpose: These scripts set the variable for use in the Contingent Reunion | ||||
|         spell. The variable is the condition that will trigger the teleportation | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalInt(GetPCSpeaker(), "nReunionTrigger", 11); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_tinca.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_tinca.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contreu_*****" | ||||
| /*   Purpose: These scripts set the variable for use in the Contingent Reunion | ||||
|         spell. The variable is the condition that will trigger the teleportation | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalInt(GetPCSpeaker(), "nReunionTrigger", 12); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_tnear.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contreu_tnear.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contreu_*****" | ||||
| /*   Purpose: These scripts set the variable for use in the Contingent Reunion | ||||
|         spell. The variable is the condition that will trigger the teleportation | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalInt(GetPCSpeaker(), "nReunionTrigger", 13); | ||||
| } | ||||
							
								
								
									
										24
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contrez_reset.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_contrez_reset.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_contrez_reset" | ||||
| /*   Purpose: Dispels any active Contingent Resurrections cast by oPC. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     int nSlotsUsed = GetLocalInt(oPC, "nContingentRez"); | ||||
|  | ||||
|     // Restore all used slots | ||||
|     while(nSlotsUsed-- > 0) | ||||
|         RestoreSpellSlotForCaster(oPC); | ||||
|  | ||||
|     SetLocalInt(oPC, "nContingentRez", 0); | ||||
| } | ||||
							
								
								
									
										14
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_council_npca.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_council_npca.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_council_npca" | ||||
| /*   Purpose: | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 13, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     ExecuteScript("council_npca", oPC); | ||||
| } | ||||
							
								
								
									
										14
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_council_npcb.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_council_npcb.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_council_npcb" | ||||
| /*   Purpose: | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 13, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     ExecuteScript("council_npcb", oPC); | ||||
| } | ||||
							
								
								
									
										15
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_dest_whipshar.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_dest_whipshar.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_dest_whipshar" | ||||
| /*   Purpose: This destroys the Whip of Shar item, enabling the player to be | ||||
|         rid of the No-Drop item. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank, with credit to Nron Ksr for the spell itself | ||||
| //:: Last Updated On: March 17, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     object oWhip = GetLocalObject(GetPCSpeaker(), "oWhip"); | ||||
|     DestroyObject(oWhip); | ||||
|     DeleteLocalObject(GetPCSpeaker(), "oWhip"); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_destroyself.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_destroyself.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_destroyself" | ||||
| /*   Purpose: | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetPlotFlag(OBJECT_SELF, FALSE); | ||||
|     DestroyObject(OBJECT_SELF, 2.0); | ||||
| } | ||||
							
								
								
									
										14
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_fwords_npca.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_fwords_npca.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_fwords_npca" | ||||
| /*   Purpose: | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 13, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     ExecuteScript("fwords_npca", oPC); | ||||
| } | ||||
							
								
								
									
										14
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_fwords_npcb.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_fwords_npcb.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_fwords_npcb" | ||||
| /*   Purpose: | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 13, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     ExecuteScript("fwords_npcb", oPC); | ||||
| } | ||||
							
								
								
									
										17
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_ident_items.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_ident_items.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_ident_items" | ||||
| /*   Purpose: This goes into the OnPlayerRest's conversation node in the | ||||
|         ActionTaken tab for the "I'll try to ID my items." selection. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 13, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
|  | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     AssignCommand(oPC, TryToIDItems()); | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_runmymartyr.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/at_runmymartyr.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "at_runmymartyr" | ||||
| /*   Purpose: This is an ActionTaken script, intended for use as a positive | ||||
|         answer in the 'Allied Martyr' spell's conversation. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     ExecuteScript("run_all_martyr", GetPCSpeaker()); | ||||
| } | ||||
							
								
								
									
										308
									
								
								nwn/nwnprc/trunk/epicspellscripts/contingent_reun.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										308
									
								
								nwn/nwnprc/trunk/epicspellscripts/contingent_reun.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,308 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "contingent_reun" | ||||
| /*   Purpose: This is the true spell script for Contingent Reunion. The other | ||||
|         castable script calls the conversation where the player must choose | ||||
|         a trigger, which then gets transferred to this script, which executes | ||||
|         the spell effects and results. | ||||
|      NOTE: This contingency will last indefinitely, unless it triggers or the | ||||
|         player dispels it in the pre-rest conversation. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void MonitorForDeath(object oMonitor, int nCount, object oJumpTo, location lJumpTo, object oPC); | ||||
| void MonitorForDying(object oMonitor, int nCount, object oJumpTo, location lJumpTo, object oPC); | ||||
| void MonitorForIncapacitated(object oMonitor, int nCount, object oJumpTo, location lJumpTo, object oPC); | ||||
| void MonitorForNearDeath(object oMonitor, int nCount, object oJumpTo, location lJumpTo, object oPC); | ||||
| void MonitorForBadlyWounded(object oMonitor, int nCount, object oJumpTo, location lJumpTo, object oPC); | ||||
| void MonitorForAfflicted(object oMonitor, int nCount, object oJumpTo, location lJumpTo, object oPC); | ||||
|  | ||||
| void JumpDeadToLocation(object oJumper, location lTarget); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oPC = OBJECT_SELF; | ||||
|     object oTarget = GetLocalObject(oPC, "oSpellTarget"); | ||||
|     location lJumpTo = GetLocalLocation(oPC, "lSpellTarget"); | ||||
|     int nTrigger = GetLocalInt(oPC, "nReunionTrigger"); | ||||
|     // Debug | ||||
|     SendMessageToPC(oPC, IntToString(nTrigger)); | ||||
|     DeleteLocalObject(oPC, "oSpellTarget"); | ||||
|     DeleteLocalLocation(oPC, "lSpellTarget"); | ||||
|     DeleteLocalInt(oPC, "nReunionTrigger"); | ||||
|     DeleteLocalInt(oPC, "nMyTargetIsACreature"); | ||||
|     PenalizeSpellSlotForCaster(oPC); | ||||
|     // Start monitoring the chosen condition. | ||||
|     switch (nTrigger) | ||||
|     { | ||||
|         // Monitoring self. | ||||
|         case 0: SetLocalInt(oPC, "nContingentReunion0", TRUE); | ||||
|                 MonitorForDeath(oPC, 1, oTarget, lJumpTo, oPC); | ||||
|                 break; | ||||
|         case 1: SetLocalInt(oPC, "nContingentReunion1", TRUE); | ||||
|                 MonitorForDying(oPC, 1, oTarget, lJumpTo, oPC); | ||||
|                 break; | ||||
|         case 2: SetLocalInt(oPC, "nContingentReunion2", TRUE); | ||||
|                 MonitorForIncapacitated(oPC, 1, oTarget, lJumpTo, oPC); | ||||
|                 break; | ||||
|         case 3: SetLocalInt(oPC, "nContingentReunion3", TRUE); | ||||
|                 MonitorForNearDeath(oPC, 1, oTarget, lJumpTo, oPC); | ||||
|                 break; | ||||
|         case 4: SetLocalInt(oPC, "nContingentReunion4", TRUE); | ||||
|                 MonitorForBadlyWounded(oPC, 1, oTarget, lJumpTo, oPC); | ||||
|                 break; | ||||
|         case 5: SetLocalInt(oPC, "nContingentReunion5", TRUE); | ||||
|                 MonitorForAfflicted(oPC, 1, oTarget, lJumpTo, oPC); | ||||
|                 break; | ||||
|         // Monitoring target. | ||||
|         case 10: SetLocalInt(oPC, "nContingentReunion0", TRUE); | ||||
|                 MonitorForDeath(oTarget, 1, oTarget, lJumpTo, oPC); | ||||
|                 break; | ||||
|         case 11: SetLocalInt(oPC, "nContingentReunion1", TRUE); | ||||
|                 MonitorForDying(oTarget, 1, oTarget, lJumpTo, oPC); | ||||
|                 break; | ||||
|         case 12: SetLocalInt(oPC, "nContingentReunion2", TRUE); | ||||
|                 MonitorForIncapacitated(oTarget, 1, oTarget, lJumpTo, oPC); | ||||
|                 break; | ||||
|         case 13: SetLocalInt(oPC, "nContingentReunion3", TRUE); | ||||
|                 MonitorForNearDeath(oTarget, 1, oTarget, lJumpTo, oPC); | ||||
|                 break; | ||||
|         case 14: SetLocalInt(oPC, "nContingentReunion4", TRUE); | ||||
|                 MonitorForBadlyWounded(oTarget, 1, oTarget, lJumpTo, oPC); | ||||
|                 break; | ||||
|         case 15: SetLocalInt(oPC, "nContingentReunion5", TRUE); | ||||
|                 MonitorForAfflicted(oTarget, 1, oTarget, lJumpTo, oPC); | ||||
|                 break; | ||||
|     } | ||||
| } | ||||
|  | ||||
| void MonitorForDeath(object oMonitor, int nCount, object oJumpTo, location lJumpTo, object oPC) | ||||
| { | ||||
|     if (GetLocalInt(oPC, "nContingentReunion0") == TRUE) // Is the contingency still active? | ||||
|     {   // If the target isn't dead. | ||||
|         if (!GetIsDead(oMonitor) && oMonitor != OBJECT_INVALID) | ||||
|         { | ||||
|             if (nCount >= 10) nCount = 0; | ||||
|             if (nCount == 1) | ||||
|                 FloatingTextStringOnCreature("*Contingency active*", oPC, FALSE); | ||||
|             if (oJumpTo != OBJECT_INVALID) // Update the JumpTo location each time through. | ||||
|                 lJumpTo = GetLocation(oJumpTo); | ||||
|             nCount++; | ||||
|             DelayCommand(6.0, MonitorForDeath(oMonitor, nCount, oJumpTo, lJumpTo, oPC)); | ||||
|         } | ||||
|         else // Jump oMonitor to the target, and end the contingency. | ||||
|         { | ||||
|             FloatingTextStringOnCreature("*Contingency triggered*", oMonitor); | ||||
|             effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, | ||||
|                 GetLocation(oPC)); | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lJumpTo); | ||||
|             if (GetIsDead(oPC)) | ||||
|                 JumpDeadToLocation(oPC, lJumpTo); | ||||
|             else | ||||
|                 AssignCommand(oPC, JumpToLocation(lJumpTo)); | ||||
|             DeleteLocalInt(oPC, "nContingentReunion0"); | ||||
|             MonitorForDeath(oMonitor, nCount, oJumpTo, lJumpTo, oPC); | ||||
|         } | ||||
|     } | ||||
|     else // Restore the lost spell slot. | ||||
|         RestoreSpellSlotForCaster(oPC); | ||||
| } | ||||
|  | ||||
| void MonitorForDying(object oMonitor, int nCount, object oJumpTo, location lJumpTo, object oPC) | ||||
| { | ||||
|     int nHP = GetCurrentHitPoints(oMonitor); | ||||
|     if (GetLocalInt(oPC, "nContingentReunion1") == TRUE) // Is the contingency still active? | ||||
|     {   // If the target isn't dying. | ||||
|         if (nHP >= 1 && oMonitor != OBJECT_INVALID) | ||||
|         { | ||||
|             if (nCount >= 10) nCount = 0; | ||||
|             if (nCount == 1) | ||||
|                 FloatingTextStringOnCreature("*Contingency active*", oPC, FALSE); | ||||
|             if (oJumpTo != OBJECT_INVALID) // Update the JumpTo location each time through. | ||||
|                 lJumpTo = GetLocation(oJumpTo); | ||||
|             nCount++; | ||||
|             DelayCommand(4.0, MonitorForDying(oMonitor, nCount, oJumpTo, lJumpTo, oPC)); | ||||
|         } | ||||
|         else // Jump oMonitor to the target, and end the contingency. | ||||
|         { | ||||
|             FloatingTextStringOnCreature("*Contingency triggered*", oMonitor); | ||||
|             effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, | ||||
|                 GetLocation(oPC)); | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lJumpTo); | ||||
|             if (GetIsDead(oPC)) | ||||
|                 JumpDeadToLocation(oPC, lJumpTo); | ||||
|             else | ||||
|                 AssignCommand(oPC, JumpToLocation(lJumpTo)); | ||||
|             DeleteLocalInt(oPC, "nContingentReunion1"); | ||||
|             MonitorForDying(oMonitor, nCount, oJumpTo, lJumpTo, oPC); | ||||
|         } | ||||
|     } | ||||
|     else // Restore the lost spell slot. | ||||
|         RestoreSpellSlotForCaster(oPC); | ||||
| } | ||||
|  | ||||
| void MonitorForIncapacitated(object oMonitor, int nCount, object oJumpTo, location lJumpTo, object oPC = OBJECT_SELF) | ||||
| { | ||||
|     if (GetLocalInt(oPC, "nContingentReunion2") == TRUE) // Is the contingency still active? | ||||
|     { | ||||
|         // Is oMonitor incapacitated? | ||||
|         int nInc; | ||||
|         effect eX = GetFirstEffect(oMonitor); | ||||
|         while (GetIsEffectValid(eX)) | ||||
|         { | ||||
|             if (GetEffectType(eX) == EFFECT_TYPE_PARALYZE) nInc = TRUE; | ||||
|             if (GetEffectType(eX) == EFFECT_TYPE_PETRIFY) nInc = TRUE; | ||||
|             if (GetEffectType(eX) == EFFECT_TYPE_SLEEP) nInc = TRUE; | ||||
|             if (GetEffectType(eX) == EFFECT_TYPE_STUNNED) nInc = TRUE; | ||||
|             eX = GetNextEffect(oMonitor); | ||||
|         } | ||||
|         // If the target isn't incapacitated. | ||||
|         if (nInc != TRUE && oMonitor != OBJECT_INVALID) | ||||
|         { | ||||
|             if (nCount >= 10) nCount = 0; | ||||
|             if (nCount == 1) | ||||
|                 FloatingTextStringOnCreature("*Contingency active*", oPC, FALSE); | ||||
|             if (oJumpTo != OBJECT_INVALID) // Update the JumpTo location each time through. | ||||
|                 lJumpTo = GetLocation(oJumpTo); | ||||
|             nCount++; | ||||
|             DelayCommand(3.0, MonitorForIncapacitated(oMonitor, nCount, oJumpTo, lJumpTo, oPC)); | ||||
|         } | ||||
|         else // Jump oMonitor to the target, and end the contingency. | ||||
|         { | ||||
|             FloatingTextStringOnCreature("*Contingency triggered*", oMonitor); | ||||
|             effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, | ||||
|                 GetLocation(oPC)); | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lJumpTo); | ||||
|             AssignCommand(oPC, JumpToLocation(lJumpTo)); | ||||
|             DeleteLocalInt(oPC, "nContingentReunion2"); | ||||
|             MonitorForIncapacitated(oMonitor, nCount, oJumpTo, lJumpTo, oPC); | ||||
|         } | ||||
|     } | ||||
|     else // Restore the lost spell slot. | ||||
|         RestoreSpellSlotForCaster(oPC); | ||||
| } | ||||
|  | ||||
| void MonitorForNearDeath(object oMonitor, int nCount, object oJumpTo, location lJumpTo, object oPC = OBJECT_SELF) | ||||
| { | ||||
|     int nHP = GetCurrentHitPoints(oMonitor); | ||||
|     int nX = GetMaxHitPoints(oMonitor) / 4; | ||||
|     if (GetLocalInt(oPC, "nContingentReunion3") == TRUE) // Is the contingency still active? | ||||
|     {   // If the target isn't near death. | ||||
|         if (nHP > nX && oMonitor != OBJECT_INVALID) | ||||
|         { | ||||
|             if (nCount >= 30) nCount = 0; | ||||
|             if (nCount == 1) | ||||
|                 FloatingTextStringOnCreature("*Contingency active*", oPC, FALSE); | ||||
|             if (oJumpTo != OBJECT_INVALID) // Update the JumpTo location each time through. | ||||
|                 lJumpTo = GetLocation(oJumpTo); | ||||
|             nCount++; | ||||
|             DelayCommand(2.0, MonitorForNearDeath(oMonitor, nCount, oJumpTo, lJumpTo, oPC)); | ||||
|         } | ||||
|         else // Jump oMonitor to the target, and end the contingency. | ||||
|         { | ||||
|             FloatingTextStringOnCreature("*Contingency triggered*", oMonitor); | ||||
|             effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, | ||||
|                 GetLocation(oPC)); | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lJumpTo); | ||||
|             AssignCommand(oPC, JumpToLocation(lJumpTo)); | ||||
|             DeleteLocalInt(oPC, "nContingentReunion3"); | ||||
|             MonitorForNearDeath(oMonitor, nCount, oJumpTo, lJumpTo, oPC); | ||||
|         } | ||||
|     } | ||||
|     else // Restore the lost spell slot. | ||||
|         RestoreSpellSlotForCaster(oPC); | ||||
| } | ||||
|  | ||||
| void MonitorForBadlyWounded(object oMonitor, int nCount, object oJumpTo, location lJumpTo, object oPC = OBJECT_SELF) | ||||
| { | ||||
|     int nHP = GetCurrentHitPoints(oMonitor); | ||||
|     int nX = GetMaxHitPoints(oMonitor) / 2; | ||||
|     if (GetLocalInt(oPC, "nContingentReunion4") == TRUE) // Is the contingency still active? | ||||
|     {   // If the target isn't badly wounded. | ||||
|         if (nHP > nX && oMonitor != OBJECT_INVALID) | ||||
|         { | ||||
|             if (nCount >= 30) nCount = 0; | ||||
|             if (nCount == 1) | ||||
|                 FloatingTextStringOnCreature("*Contingency active*", oPC, FALSE); | ||||
|             if (oJumpTo != OBJECT_INVALID) // Update the JumpTo location each time through. | ||||
|                 lJumpTo = GetLocation(oJumpTo); | ||||
|             nCount++; | ||||
|             DelayCommand(2.0, MonitorForBadlyWounded(oMonitor, nCount, oJumpTo, lJumpTo, oPC)); | ||||
|         } | ||||
|         else // Jump oMonitor to the target, and end the contingency. | ||||
|         { | ||||
|             FloatingTextStringOnCreature("*Contingency triggered*", oMonitor); | ||||
|             effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, | ||||
|                 GetLocation(oPC)); | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lJumpTo); | ||||
|             AssignCommand(oPC, JumpToLocation(lJumpTo)); | ||||
|             DeleteLocalInt(oPC, "nContingentReunion4"); | ||||
|             MonitorForBadlyWounded(oMonitor, nCount, oJumpTo, lJumpTo, oPC); | ||||
|         } | ||||
|     } | ||||
|     else // Restore the lost spell slot. | ||||
|         RestoreSpellSlotForCaster(oPC); | ||||
| } | ||||
|  | ||||
| void MonitorForAfflicted(object oMonitor, int nCount, object oJumpTo, location lJumpTo, object oPC = OBJECT_SELF) | ||||
| { | ||||
|     if (GetLocalInt(oPC, "nContingentReunion5") == TRUE) // Is the contingency still active? | ||||
|     { | ||||
|         // Is oMonitor afflicted? | ||||
|         int nInc; | ||||
|         effect eX = GetFirstEffect(oMonitor); | ||||
|         while (GetIsEffectValid(eX)) | ||||
|         { | ||||
|             if (GetEffectType(eX) == EFFECT_TYPE_CURSE) nInc = TRUE; | ||||
|             if (GetEffectType(eX) == EFFECT_TYPE_DISEASE) nInc = TRUE; | ||||
|             if (GetEffectType(eX) == EFFECT_TYPE_NEGATIVELEVEL) nInc = TRUE; | ||||
|             if (GetEffectType(eX) == EFFECT_TYPE_POISON) nInc = TRUE; | ||||
|             eX = GetNextEffect(oMonitor); | ||||
|         } | ||||
|         // If the target isn't incapacitated. | ||||
|         if (nInc != TRUE && oMonitor != OBJECT_INVALID) | ||||
|         { | ||||
|             if (nCount >= 10) nCount = 0; | ||||
|             if (nCount == 1) | ||||
|                 FloatingTextStringOnCreature("*Contingency active*", oPC, FALSE); | ||||
|             if (oJumpTo != OBJECT_INVALID) // Update the JumpTo location each time through. | ||||
|                 lJumpTo = GetLocation(oJumpTo); | ||||
|             nCount++; | ||||
|             DelayCommand(6.0, MonitorForAfflicted(oMonitor, nCount, oJumpTo, lJumpTo, oPC)); | ||||
|         } | ||||
|         else // Jump oMonitor to the target, and end the contingency. | ||||
|         { | ||||
|             FloatingTextStringOnCreature("*Contingency triggered*", oMonitor); | ||||
|             effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, | ||||
|                 GetLocation(oPC)); | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lJumpTo); | ||||
|             AssignCommand(oPC, JumpToLocation(lJumpTo)); | ||||
|             DeleteLocalInt(oPC, "nContingentReunion5"); | ||||
|             MonitorForAfflicted(oMonitor, nCount, oJumpTo, lJumpTo, oPC); | ||||
|         } | ||||
|     } | ||||
|     else // Restore the lost spell slot. | ||||
|         RestoreSpellSlotForCaster(oPC); | ||||
| } | ||||
|  | ||||
| void JumpDeadToLocation(object oJumper, location lTarget) | ||||
| { | ||||
|     //Debug | ||||
|     SendMessageToPC(oJumper, "Jumping dead"); | ||||
|     int nDam = 2; | ||||
|     effect eRez = EffectResurrection(); | ||||
|     effect eKill = EffectDamage(nDam); | ||||
|     ApplyEffectToObject(DURATION_TYPE_INSTANT, eRez, oJumper); | ||||
|     DelayCommand(0.1, AssignCommand(oJumper, JumpToLocation(lTarget))); | ||||
|     DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, oJumper)); | ||||
| } | ||||
							
								
								
									
										46
									
								
								nwn/nwnprc/trunk/epicspellscripts/council_npca.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								nwn/nwnprc/trunk/epicspellscripts/council_npca.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "council_npca" | ||||
| /*   Purpose: | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| #include "x0_i0_position" | ||||
| #include "prc_alterations" | ||||
| #include "inc_dispel" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| location GetOppositeLoc(object oTarget); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oPC = OBJECT_SELF; | ||||
|     float fDur = 1200.0f; // 20 minutes | ||||
|     // Create the NPC celestial in front of oPC. | ||||
|     location lNPC = GetOppositeLoc(oPC); | ||||
|     object oNPC = CreateObject(OBJECT_TYPE_CREATURE, "council_npca", lNPC); | ||||
|     effect eGhost = EffectCutsceneGhost(); | ||||
|     effect eEther = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE); | ||||
|     effect eHold = EffectCutsceneImmobilize(); | ||||
|     effect eLink = EffectLinkEffects(eGhost, eEther); | ||||
|     eLink = EffectLinkEffects(eLink, eHold); | ||||
|     SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oNPC, fDur, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF)); | ||||
|     SetPlotFlag(oNPC, TRUE); | ||||
|     // Initiate a conversation with the PC. | ||||
|     AssignCommand(oNPC, ActionStartConversation(oPC, "", TRUE, FALSE)); | ||||
|     // After the maximum duration, destroy the NPC (sever the connection). | ||||
|     DelayCommand(fDur, SetPlotFlag(oNPC, FALSE)); | ||||
|     DelayCommand(fDur, DestroyObject(oNPC)); | ||||
| } | ||||
|  | ||||
| location GetOppositeLoc(object oTarget) | ||||
| { | ||||
|     float fDir = GetFacing(oTarget); | ||||
|     float fAngleOpposite = GetOppositeDirection(fDir); | ||||
|     return GenerateNewLocation(oTarget, | ||||
|                                1.5f, | ||||
|                                fDir, | ||||
|                                fAngleOpposite); | ||||
| } | ||||
|  | ||||
							
								
								
									
										46
									
								
								nwn/nwnprc/trunk/epicspellscripts/council_npcb.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								nwn/nwnprc/trunk/epicspellscripts/council_npcb.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "council_npcb" | ||||
| /*   Purpose: | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| #include "x0_i0_position" | ||||
| #include "prc_alterations" | ||||
| #include "inc_dispel" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| location GetOppositeLoc(object oTarget); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oPC = OBJECT_SELF; | ||||
|     float fDur = 1200.0f; // 20 minutes max, or NPC destroys self at end of conv | ||||
|     // Create the NPC celestial in front of oPC. | ||||
|     location lNPC = GetOppositeLoc(oPC); | ||||
|     object oNPC = CreateObject(OBJECT_TYPE_CREATURE, "council_npcb", lNPC); | ||||
|     effect eGhost = EffectCutsceneGhost(); | ||||
|     effect eEther = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE); | ||||
|     effect eHold = EffectCutsceneImmobilize(); | ||||
|     effect eLink = EffectLinkEffects(eGhost, eEther); | ||||
|     eLink = EffectLinkEffects(eLink, eHold); | ||||
|     SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oNPC, fDur, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF)); | ||||
|     SetPlotFlag(oNPC, TRUE); | ||||
|     // Initiate a conversation with the PC. | ||||
|     AssignCommand(oNPC, ActionStartConversation(oPC, "", TRUE, FALSE)); | ||||
|     // After the maximum duration, destroy the NPC (sever the connection). | ||||
|     DelayCommand(fDur, SetPlotFlag(oNPC, FALSE)); | ||||
|     DelayCommand(fDur, DestroyObject(oNPC)); | ||||
| } | ||||
|  | ||||
| location GetOppositeLoc(object oTarget) | ||||
| { | ||||
|     float fDir = GetFacing(oTarget); | ||||
|     float fAngleOpposite = GetOppositeDirection(fDir); | ||||
|     return GenerateNewLocation(oTarget, | ||||
|                                1.5f, | ||||
|                                fDir, | ||||
|                                fAngleOpposite); | ||||
| } | ||||
|  | ||||
							
								
								
									
										55
									
								
								nwn/nwnprc/trunk/epicspellscripts/etern_free.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								nwn/nwnprc/trunk/epicspellscripts/etern_free.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Epic Spell: Eternal Freedom | ||||
| //:: Author: Boneshank (Don Armstrong) | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
| #include "inc_dispel" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|         //Declare major variables | ||||
|         object oTarget = OBJECT_SELF; | ||||
|         object oSkin; | ||||
|         itemproperty ip1 = ItemPropertyImmunityMisc(IP_CONST_IMMUNITYMISC_PARALYSIS); | ||||
|         itemproperty ip2 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_ENTANGLE); | ||||
|         itemproperty ip3 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_SLOW); | ||||
|         itemproperty ip4 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_HOLD_MONSTER); | ||||
|         itemproperty ip5 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_HOLD_PERSON); | ||||
|         itemproperty ip6 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_SLEEP); | ||||
|         itemproperty ip7 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_HOLD_ANIMAL); | ||||
|         itemproperty ip8 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_POWER_WORD_STUN); | ||||
|         itemproperty ip9 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_WEB); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_FREEDOM_OF_MOVEMENT); | ||||
|  | ||||
|         //Search for and remove the above negative effects | ||||
|         effect eLook = GetFirstEffect(oTarget); | ||||
|         while(GetIsEffectValid(eLook)) | ||||
|         { | ||||
|             if(GetEffectType(eLook) == EFFECT_TYPE_PARALYZE || | ||||
|                 GetEffectType(eLook) == EFFECT_TYPE_ENTANGLE || | ||||
|                 GetEffectType(eLook) == EFFECT_TYPE_SLOW || | ||||
|                 GetEffectType(eLook) == EFFECT_TYPE_MOVEMENT_SPEED_DECREASE || | ||||
|                 GetEffectType(eLook) == EFFECT_TYPE_PETRIFY || | ||||
|                 GetEffectType(eLook) == EFFECT_TYPE_SLEEP || | ||||
|                 GetEffectType(eLook) == EFFECT_TYPE_STUNNED) | ||||
|             { | ||||
|                 RemoveEffect(oTarget, eLook); | ||||
|             } | ||||
|             eLook = GetNextEffect(oTarget); | ||||
|         } | ||||
|         //Apply properties. | ||||
|         oSkin = GetPCSkin(oTarget); | ||||
|         IPSafeAddItemProperty(oSkin, ip1); | ||||
|         IPSafeAddItemProperty(oSkin, ip2); | ||||
|         IPSafeAddItemProperty(oSkin, ip3); | ||||
|         IPSafeAddItemProperty(oSkin, ip4); | ||||
|         IPSafeAddItemProperty(oSkin, ip5); | ||||
|         IPSafeAddItemProperty(oSkin, ip6); | ||||
|         IPSafeAddItemProperty(oSkin, ip7); | ||||
|         IPSafeAddItemProperty(oSkin, ip8); | ||||
|         IPSafeAddItemProperty(oSkin, ip9); | ||||
|         SPApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(eDur), oTarget); | ||||
| } | ||||
|  | ||||
							
								
								
									
										46
									
								
								nwn/nwnprc/trunk/epicspellscripts/fwords_npca.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								nwn/nwnprc/trunk/epicspellscripts/fwords_npca.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "fwords_npca" | ||||
| /*   Purpose: | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| #include "x0_i0_position" | ||||
| #include "prc_alterations" | ||||
| #include "inc_dispel" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| location GetOppositeLoc(object oTarget); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oPC = OBJECT_SELF; | ||||
|     float fDur = 1200.0f; // 20 minutes max, or NPC destroys self at end of conv | ||||
|     // Create the NPC fiend in front of oPC. | ||||
|     location lNPC = GetOppositeLoc(oPC); | ||||
|     object oNPC = CreateObject(OBJECT_TYPE_CREATURE, "fiendw_npca", lNPC); | ||||
|     effect eGhost = EffectCutsceneGhost(); | ||||
|     effect eEther = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE); | ||||
|     effect eHold = EffectCutsceneImmobilize(); | ||||
|     effect eLink = EffectLinkEffects(eGhost, eEther); | ||||
|     eLink = EffectLinkEffects(eLink, eHold); | ||||
|     SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oNPC, fDur, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF)); | ||||
|     SetPlotFlag(oNPC, TRUE); | ||||
|     // Initiate a conversation with the PC. | ||||
|     AssignCommand(oNPC, ActionStartConversation(oPC, "", TRUE, FALSE)); | ||||
|     // After the maximum duration, destroy the NPC (sever the connection). | ||||
|     DelayCommand(fDur, SetPlotFlag(oNPC, FALSE)); | ||||
|     DelayCommand(fDur, DestroyObject(oNPC)); | ||||
| } | ||||
|  | ||||
| location GetOppositeLoc(object oTarget) | ||||
| { | ||||
|     float fDir = GetFacing(oTarget); | ||||
|     float fAngleOpposite = GetOppositeDirection(fDir); | ||||
|     return GenerateNewLocation(oTarget, | ||||
|                                1.5f, | ||||
|                                fDir, | ||||
|                                fAngleOpposite); | ||||
| } | ||||
|  | ||||
							
								
								
									
										46
									
								
								nwn/nwnprc/trunk/epicspellscripts/fwords_npcb.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								nwn/nwnprc/trunk/epicspellscripts/fwords_npcb.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "fwords_npcb" | ||||
| /*   Purpose: | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| #include "x0_i0_position" | ||||
| #include "prc_alterations" | ||||
| #include "inc_dispel" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| location GetOppositeLoc(object oTarget); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oPC = OBJECT_SELF; | ||||
|     float fDur = 1200.0f; // 20 minutes max, or NPC destroys self at end of conv | ||||
|     // Create the NPC fiend in front of oPC. | ||||
|     location lNPC = GetOppositeLoc(oPC); | ||||
|     object oNPC = CreateObject(OBJECT_TYPE_CREATURE, "fiendw_npcb", lNPC); | ||||
|     effect eGhost = EffectCutsceneGhost(); | ||||
|     effect eEther = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE); | ||||
|     effect eHold = EffectCutsceneImmobilize(); | ||||
|     effect eLink = EffectLinkEffects(eGhost, eEther); | ||||
|     eLink = EffectLinkEffects(eLink, eHold); | ||||
|     SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oNPC, fDur, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF)); | ||||
|     SetPlotFlag(oNPC, TRUE); | ||||
|     // Initiate a conversation with the PC. | ||||
|     AssignCommand(oNPC, ActionStartConversation(oPC, "", TRUE, FALSE)); | ||||
|     // After the maximum duration, destroy the NPC (sever the connection). | ||||
|     DelayCommand(fDur, SetPlotFlag(oNPC, FALSE)); | ||||
|     DelayCommand(fDur, DestroyObject(oNPC)); | ||||
| } | ||||
|  | ||||
| location GetOppositeLoc(object oTarget) | ||||
| { | ||||
|     float fDir = GetFacing(oTarget); | ||||
|     float fAngleOpposite = GetOppositeDirection(fDir); | ||||
|     return GenerateNewLocation(oTarget, | ||||
|                                1.5f, | ||||
|                                fDir, | ||||
|                                fAngleOpposite); | ||||
| } | ||||
|  | ||||
							
								
								
									
										54
									
								
								nwn/nwnprc/trunk/epicspellscripts/run_all_martyr.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								nwn/nwnprc/trunk/epicspellscripts/run_all_martyr.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,54 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "run_all_martyr" | ||||
| /*   Purpose: For "Allied Martyr" spell - This is the actual functional body of | ||||
|         the spell, but needs to be called seperately due to the need of a | ||||
|         player's permission. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_dispel" | ||||
|  | ||||
| void RunMyMartyrdom(object oAlly, int nDuration, object oMartyr = OBJECT_SELF); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     // Who is my ally that I am helping? | ||||
|     object oAlly = GetLocalObject(OBJECT_SELF, "oAllyForMyMartyrdom"); | ||||
|     // How long do I have to do this for? | ||||
|     int nDuration = GetLocalInt(OBJECT_SELF, | ||||
|                 "nTimeForMartyrdomFor"); | ||||
|     // Begin the martyrdom. | ||||
|     RunMyMartyrdom(oAlly, nDuration, OBJECT_SELF); | ||||
| } | ||||
|  | ||||
| void RunMyMartyrdom(object oAlly, int nDuration, object oMartyr = OBJECT_SELF) | ||||
| { | ||||
|     int nAllyCurrentHP = GetCurrentHitPoints(oAlly); | ||||
|     int nAllyMaxHP = GetMaxHitPoints(oAlly); | ||||
|     int nMyHP = GetCurrentHitPoints(OBJECT_SELF); | ||||
|     int nTransfer = nAllyMaxHP - nAllyCurrentHP; | ||||
|     effect eVisDown = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); | ||||
|     effect eVisUp = EffectVisualEffect(VFX_IMP_HEALING_L); | ||||
|     effect eHPLoss = EffectDamage(nTransfer); | ||||
|     effect eHPGain = EffectHeal(nTransfer); | ||||
|     effect eLink1 = EffectLinkEffects(eVisDown, eHPLoss); | ||||
|     effect eLink2 = EffectLinkEffects(eVisUp, eHPGain); | ||||
|     // If the spell's duration has not expired yet. | ||||
|     if (!GetIsDead(OBJECT_SELF) && | ||||
|         !GetIsDead(oAlly) && | ||||
|         GetIsObjectValid(oAlly) && | ||||
|         nTransfer > 0 ) | ||||
|     { | ||||
|         SPApplyEffectToObject(DURATION_TYPE_INSTANT, eLink1, OBJECT_SELF); | ||||
|         SPApplyEffectToObject(DURATION_TYPE_INSTANT, eLink2, oAlly); | ||||
|     } | ||||
|     if (nDuration > 0) | ||||
|     { | ||||
|         nDuration -= 1; | ||||
|         DelayCommand(3.0, RunMyMartyrdom(oAlly, nDuration, OBJECT_SELF)); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										35
									
								
								nwn/nwnprc/trunk/epicspellscripts/run_gemcage_gem.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								nwn/nwnprc/trunk/epicspellscripts/run_gemcage_gem.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "run_gemcage_gem" | ||||
| /*   Purpose: This will uncage the creature associated with the particular gem. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "nw_i0_generic" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oItem = GetItemActivated(); | ||||
|     object oCre; | ||||
|     string sName = GetLocalString(oItem, "sNameOfCreature"); | ||||
|     string sRef = GetLocalString(oItem, "sCagedCreature"); | ||||
|     if (PRCGetSpellTargetObject() == OBJECT_SELF) | ||||
|     { | ||||
|         FloatingTextStringOnCreature("Inside this gem, " + sName + | ||||
|             " is safely caged.", OBJECT_SELF); | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         location lTarget = GetItemActivatedTargetLocation(); | ||||
|         effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2); | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lTarget); | ||||
|         oCre = CreateObject(OBJECT_TYPE_CREATURE, sRef, lTarget); | ||||
|         FloatingTextStringOnCreature(sName + " has been set free!", OBJECT_SELF); | ||||
|         DestroyObject(oItem); | ||||
|         AssignCommand(oCre, DetermineCombatRound()); | ||||
|     } | ||||
| } | ||||
|  | ||||
							
								
								
									
										17
									
								
								nwn/nwnprc/trunk/epicspellscripts/run_whipofshar.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								nwn/nwnprc/trunk/epicspellscripts/run_whipofshar.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "run_whipofshar" | ||||
| /*   Purpose: This is the OnItemActivated script for the Whip of Shar item | ||||
|         greanted to a player who casts the spell of the same name. It starts a | ||||
|         conversation where the player can choose to destroy the whip, since | ||||
|         it has lost its bonuses. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank, with credits to Nron Ksr for the spell itself. | ||||
| //:: Last Updated On: March 17, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| void main() | ||||
| { | ||||
|     SetLocalObject(OBJECT_SELF, "oWhip", GetItemActivated()); | ||||
|     AssignCommand(OBJECT_SELF, ActionStartConversation(OBJECT_SELF, | ||||
|         "whipofshar", TRUE, FALSE)); | ||||
| } | ||||
							
								
								
									
										17
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_cont_reunion.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_cont_reunion.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "sc_cont_reunion" | ||||
| /*   Purpose: This is the conditional script that allows the appearance of | ||||
|         any of the "target" options of the Contingent Reunion conversation | ||||
|         when the target of the spell is a creature. This is so the caster can | ||||
|         choose who will trigger the teleportation, the caster ot the target. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| int StartingConditional() | ||||
| { | ||||
|     if (!GetLocalInt(GetPCSpeaker(), "nMyTargetIsACreature") == TRUE) | ||||
|         return FALSE; | ||||
|     return TRUE; | ||||
| } | ||||
							
								
								
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contreu0_yes.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contreu0_yes.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "sc_contreu0_yes" | ||||
| /*   Purpose: Returns TRUE if GetPCSpeaker() has a Contingent Reunion Zero | ||||
|         active. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| int StartingConditional() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     if (GetLocalInt(oPC, "nContingentReunion0") > 0) | ||||
|         return TRUE; | ||||
|     return FALSE; | ||||
| } | ||||
							
								
								
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contreu1_yes.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contreu1_yes.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "sc_contreu1_yes" | ||||
| /*   Purpose: Returns TRUE if GetPCSpeaker() has a Contingent Reunion One | ||||
|         active. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| int StartingConditional() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     if (GetLocalInt(oPC, "nContingentReunion1") > 0) | ||||
|         return TRUE; | ||||
|     return FALSE; | ||||
| } | ||||
							
								
								
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contreu2_yes.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contreu2_yes.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "sc_contreu2_yes" | ||||
| /*   Purpose: Returns TRUE if GetPCSpeaker() has a Contingent Reunion Two | ||||
|         active. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| int StartingConditional() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     if (GetLocalInt(oPC, "nContingentReunion2") > 0) | ||||
|         return TRUE; | ||||
|     return FALSE; | ||||
| } | ||||
							
								
								
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contreu3_yes.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contreu3_yes.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "sc_contreu3_yes" | ||||
| /*   Purpose: Returns TRUE if GetPCSpeaker() has a Contingent Reunion Three | ||||
|         active. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| int StartingConditional() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     if (GetLocalInt(oPC, "nContingentReunion3") > 0) | ||||
|         return TRUE; | ||||
|     return FALSE; | ||||
| } | ||||
							
								
								
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contreu4_yes.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contreu4_yes.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "sc_contreu4_yes" | ||||
| /*   Purpose: Returns TRUE if GetPCSpeaker() has a Contingent Reunion Four | ||||
|         active. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| int StartingConditional() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     if (GetLocalInt(oPC, "nContingentReunion4") > 0) | ||||
|         return TRUE; | ||||
|     return FALSE; | ||||
| } | ||||
							
								
								
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contreu5_yes.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contreu5_yes.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "sc_contreu5_yes" | ||||
| /*   Purpose: Returns TRUE if GetPCSpeaker() has a Contingent Reunion Five | ||||
|         active. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| int StartingConditional() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     if (GetLocalInt(oPC, "nContingentReunion5") > 0) | ||||
|         return TRUE; | ||||
|     return FALSE; | ||||
| } | ||||
							
								
								
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contrez_yes.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_contrez_yes.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "sc_contrez_yes" | ||||
| /*   Purpose: Returns TRUE if GetPCSpeaker() has a Contingent Resurrection | ||||
|         active. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| int StartingConditional() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     if (GetLocalInt(oPC, "nContingentRez") > 0) | ||||
|         return TRUE; | ||||
|     return FALSE; | ||||
| } | ||||
							
								
								
									
										17
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_epicradial_0.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_epicradial_0.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "sc_epicradial_0" | ||||
| /*   Purpose: Starting conditional that returns FALSE if no spells are on radial | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| int StartingConditional() | ||||
| { | ||||
|     if (GetCastableFeatCount(GetPCSpeaker()) != 0) | ||||
|         return TRUE; | ||||
|     return FALSE; | ||||
| } | ||||
							
								
								
									
										18
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_epicradial_ok.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_epicradial_ok.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "sc_epicradial_ok" | ||||
| /*   Purpose: Starting conditional check to make sure player has 7 or less | ||||
|         spells assigned to their epic spell radial menu (prevents CRASH) | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| int StartingConditional() | ||||
| { | ||||
|     if (GetCastableFeatCount(GetPCSpeaker()) < 7) | ||||
|         return TRUE; | ||||
|     return FALSE; | ||||
| } | ||||
							
								
								
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_has_loreskill.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_has_loreskill.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: FileName sc_has_loreskill | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| int StartingConditional() | ||||
| { | ||||
|  | ||||
|     // Perform skill checks | ||||
|     if(!(GetSkillRank(SKILL_LORE, GetPCSpeaker()) >= 0)) | ||||
|         return FALSE; | ||||
|  | ||||
|     return TRUE; | ||||
| } | ||||
							
								
								
									
										18
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_isepiccaster.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_isepiccaster.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "sc_isepiccaster" | ||||
| /*   Purpose: Starting conditional, returns TRUE if the player is an epic caster. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| int StartingConditional() | ||||
| { | ||||
|     object oPC = GetPCSpeaker(); | ||||
|     if (GetIsEpicSpellcaster(oPC)) | ||||
|         return TRUE; | ||||
|     return FALSE; | ||||
| } | ||||
							
								
								
									
										11
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_ret_false.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_ret_false.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: FileName sc_ret_false | ||||
| //::////////////////////////////////////////////// | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Script Wizard | ||||
| //:: Created On: 4/10/2004 7:29:53 PM | ||||
| //::////////////////////////////////////////////// | ||||
| int StartingConditional() | ||||
| { | ||||
|     return FALSE; | ||||
| } | ||||
							
								
								
									
										15
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_runmymartyr.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								nwn/nwnprc/trunk/epicspellscripts/sc_runmymartyr.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "sc_runmartyr" | ||||
| /*   Purpose: This sets a CUSTOM TOKEN to be used in the conversation. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| int StartingConditional() | ||||
| { | ||||
|     string sName = GetLocalString(GetPCSpeaker(), "sAllyForMyMartyrdom"); | ||||
|     SendMessageToPC(GetPCSpeaker(), "The name is " + sName + "."); | ||||
|     SetCustomToken(3000, sName); // For conv. | ||||
|     return TRUE; | ||||
| } | ||||
							
								
								
									
										79
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_achilles.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_achilles.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,79 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Achille's Heel | ||||
| //:: tm_s0_epachilles.nss | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Grants the caster immunity to all spells level 9 and lower | ||||
|     at the price of CON:  dropping to 3. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Nron Ksr | ||||
| //:: Created On: March 9, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| /* | ||||
|     March 17, 2004- Boneshank - added RunHeel() func to keep CON penalty | ||||
| */ | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| #include "inc_dispel" | ||||
| //#include "x2_inc_spellhook" | ||||
|  | ||||
| void RunHeel(object oTarget, int nDuration); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ABJURATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_ACHHEEL)) | ||||
|     { | ||||
|         //Declare major variables | ||||
|         object oPC = OBJECT_SELF; | ||||
|         effect eVis = EffectVisualEffect( VFX_DUR_SPELLTURNING ); | ||||
|         effect eVis2 = EffectVisualEffect( VFX_DUR_GLOBE_INVULNERABILITY ); | ||||
|         effect eDur = EffectVisualEffect( VFX_DUR_CESSATE_NEGATIVE ); | ||||
|         int nDuration = 20; | ||||
|  | ||||
|         //Link Effects | ||||
|     //    effect eAbsorb = EffectSpellLevelAbsortption( 9, 0, SPELL_SCHOOL_GENERAL ); | ||||
|         effect eAbsorb = EffectSpellImmunity( SPELL_ALL_SPELLS ); | ||||
|         effect eLink = EffectLinkEffects( eVis, eAbsorb ); | ||||
|         eLink = EffectLinkEffects( eLink, eVis2 ); | ||||
|         eLink = EffectLinkEffects( eLink, eDur ); | ||||
|  | ||||
|         //Fire cast spell at event for the specified target | ||||
|     //    SignalEvent( oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellID(), FALSE) ); | ||||
|         SignalEvent(oPC, | ||||
|             EventSpellCastAt(OBJECT_SELF, SPELL_GREATER_SPELL_MANTLE, FALSE)); | ||||
|         //Apply the VFX impact and effects | ||||
|  | ||||
|         // * Can not be dispelled | ||||
|         eLink = ExtraordinaryEffect(eLink); | ||||
|  | ||||
|         SPApplyEffectToObject( DURATION_TYPE_TEMPORARY, eLink, | ||||
|             oPC, RoundsToSeconds(nDuration), TRUE, -1, GetTotalCastingLevel(OBJECT_SELF) ); | ||||
|         RunHeel(oPC, nDuration); | ||||
|     } | ||||
|  | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
| void RunHeel(object oTarget, int nDuration) | ||||
| { | ||||
|     int nPen = GetAbilityScore(oTarget, ABILITY_CONSTITUTION) - 3; | ||||
|     effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION, nPen); | ||||
|     if (nDuration > 0) | ||||
|     { | ||||
|         UnequipAnyImmunityItems(oTarget, IP_CONST_IMMUNITYMISC_LEVEL_ABIL_DRAIN); | ||||
|         DelayCommand(1.0, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, | ||||
|             eCon, oTarget, 6.0, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF))); | ||||
|         nDuration -= 1; | ||||
|         DelayCommand(6.0, RunHeel(oTarget, nDuration)); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										85
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_allhoplost.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										85
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_allhoplost.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,85 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_allhoplost" | ||||
| /*   Purpose: All Hope Lost - causes all enemies within the area to make a will | ||||
|         save or resist the spell to avoid losing all courage and drop their items. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| #include "prc_add_spell_dc" | ||||
| //#include "x2_inc_spellhook" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ENCHANTMENT); | ||||
|  | ||||
|     if (!X2PreSpellCastCode() ) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_ALLHOPE)) | ||||
|     { | ||||
|         int nCasterLevel = GetTotalCastingLevel(OBJECT_SELF); | ||||
|         float fDuration = RoundsToSeconds(20); | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_FEAR_S); | ||||
|         effect eFear = EffectFrightened(); | ||||
|         effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); | ||||
|         effect eImpact = EffectVisualEffect(VFX_FNF_LOS_NORMAL_30); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); | ||||
|         float fDelay; | ||||
|         effect eLink = EffectLinkEffects(eFear, eMind); | ||||
|         eLink = EffectLinkEffects(eLink, eDur); | ||||
|         object oTarget, oWeap, oOffhand, oNewR, oNewL; | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, | ||||
|             eImpact, GetLocation(OBJECT_SELF)); | ||||
|         oTarget = GetFirstObjectInShape(SHAPE_SPHERE, | ||||
|             RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), TRUE); | ||||
|         while(GetIsObjectValid(oTarget)) | ||||
|         { | ||||
|             if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, | ||||
|                 OBJECT_SELF) && oTarget != OBJECT_SELF) | ||||
|             { | ||||
|                 fDelay = PRCGetRandomDelay(); | ||||
|                 SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FEAR)); | ||||
|                 if(!PRCDoResistSpell(OBJECT_SELF, oTarget, GetTotalCastingLevel(OBJECT_SELF)+SPGetPenetr(OBJECT_SELF), fDelay)) | ||||
|                 {  | ||||
|                     int nSaveDC = GetEpicSpellSaveDC(OBJECT_SELF, oTarget, SPELL_EPIC_ALLHOPE) + 10;         | ||||
|                     if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nSaveDC, | ||||
|                         SAVING_THROW_TYPE_FEAR, OBJECT_SELF, fDelay)) | ||||
|                     { | ||||
|                         if (GetIsCreatureDisarmable(oTarget) && !GetPRCSwitch(PRC_PNP_DISARM)) | ||||
|                         { | ||||
|                             oWeap = GetItemInSlot | ||||
|                                 (INVENTORY_SLOT_RIGHTHAND, oTarget); | ||||
|                             oOffhand = GetItemInSlot | ||||
|                                 (INVENTORY_SLOT_LEFTHAND, oTarget); | ||||
|                             if (oWeap != OBJECT_INVALID && | ||||
|                                 GetDroppableFlag(oWeap)) | ||||
|                             { | ||||
|                                 CopyObject(oWeap, GetLocation(oTarget)); | ||||
|                                 DelayCommand(2.0, DestroyObject(oWeap)); | ||||
|                             } | ||||
|                             if (oOffhand != OBJECT_INVALID && | ||||
|                                 GetDroppableFlag(oOffhand)) | ||||
|                             { | ||||
|                                 CopyObject(oOffhand, GetLocation(oTarget)); | ||||
|                                 DelayCommand(2.0, DestroyObject(oOffhand)); | ||||
|                             } | ||||
|                         } | ||||
|                         DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                             (DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF))); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|             oTarget = GetNextObjectInShape(SHAPE_SPHERE, | ||||
|                 RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), TRUE); | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
							
								
								
									
										64
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_alliedmart.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_alliedmart.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,64 @@ | ||||
| // The error code 5 prevention entry. Comment out or uncomment as necessary.  | ||||
| //Part Deux, Primogenitor 05/07/05 | ||||
| //const int COMPILER_BREAKS_ON_ME_OR_NOT_AGAIN = 0xffffffff; | ||||
|  | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_alliedmart" | ||||
| /*   Purpose: Allied Martyr - The subject of this spell willingly allows all | ||||
|         damage suffered by the caster to be transfered to the subject. | ||||
|         NOTE: It is ASSUMED that any NPC partymember is automatically willing. | ||||
|             Other party members who are actual players will have a conversation | ||||
|             pop up where they are asked if they are willing to let it happen. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| #include "inc_dispel" | ||||
| //#include "x2_inc_spellhook" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_AL_MART)) | ||||
|     { | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         // Twice per round, for 20 hours. | ||||
|         int nDuration = FloatToInt(HoursToSeconds(20) / 3); | ||||
|         // Is the target an ally (in the caster's party)? | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_HOLY_AID); | ||||
|         if (GetFactionEqual(oTarget, OBJECT_SELF)) | ||||
|         { | ||||
|             SetLocalObject(oTarget, "oAllyForMyMartyrdom", OBJECT_SELF); | ||||
|             SetLocalString(oTarget, | ||||
|                 "sAllyForMyMartyrdom", GetName(OBJECT_SELF)); | ||||
|             SetLocalInt(oTarget, "nTimeForMartyrdomFor", nDuration); | ||||
|             SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); | ||||
|             SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF); | ||||
|             // Is the party member another player? | ||||
|             if (GetIsPC(oTarget)) | ||||
|             { | ||||
|                 //We have to get the player's permission for this. | ||||
|                 // A "Yes" from the player will use ActionTaken to run script. | ||||
|                 AssignCommand(oTarget, ActionStartConversation(OBJECT_SELF, | ||||
|                     "ss_alliedmartyr", TRUE, FALSE)); | ||||
|             } | ||||
|             // The party member is NOT a player. | ||||
|             else | ||||
|             { | ||||
|                 ExecuteScript("run_all_martyr", oTarget); | ||||
|             } | ||||
|  | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										84
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_anarchys.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_anarchys.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,84 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_anarchys" | ||||
| /*   Purpose: Anarchy's Call - all non-chaotic targets are confused, and all | ||||
|         chaotic targets get 5 attacks per round and +10 saves vs. law. | ||||
|      Non-chaotic casters have alignment shift to law by d10, and spell fails. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| //#include "prc_add_spell_dc" | ||||
| //#include "x2_inc_spellhook" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ENCHANTMENT); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_ANARCHY)) | ||||
|     { | ||||
|         int nCasterLevel = GetTotalCastingLevel(OBJECT_SELF); | ||||
|         float fDuration = RoundsToSeconds(20); | ||||
|         effect eVis = EffectVisualEffect(VFX_FNF_HOWL_MIND ); | ||||
|         effect eConf = PRCEffectConfused(); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); | ||||
|         effect eAtt = EffectModifyAttacks(5); | ||||
|         effect eST = EffectSavingThrowIncrease(SAVING_THROW_ALL, 10, | ||||
|             SAVING_THROW_TYPE_LAW); | ||||
|         effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); | ||||
|         effect eLink = EffectLinkEffects(eVis, eConf); | ||||
|         eLink = EffectLinkEffects(eLink, eDur); | ||||
|         effect eLink2 = EffectLinkEffects(eAtt, eVis); | ||||
|         eLink2 = EffectLinkEffects(eLink2, eDur2); | ||||
|         eLink2 = EffectLinkEffects(eLink2, eST); | ||||
|         float fDelay; | ||||
|         // Chaotic casters cast normally. All others go to ELSE. | ||||
|         if (GetAlignmentLawChaos(OBJECT_SELF) == ALIGNMENT_CHAOTIC) | ||||
|         { | ||||
|             object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, | ||||
|                 RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), TRUE); | ||||
|             while(GetIsObjectValid(oTarget)) | ||||
|             { | ||||
|                 fDelay = PRCGetRandomDelay(); | ||||
|                 if (GetAlignmentLawChaos(oTarget) != ALIGNMENT_CHAOTIC) | ||||
|                 { | ||||
|                     SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, | ||||
|                         SPELL_CONFUSION)); | ||||
|                     if(!PRCDoResistSpell(OBJECT_SELF, oTarget, GetTotalCastingLevel(OBJECT_SELF)+SPGetPenetr(OBJECT_SELF), fDelay)) | ||||
|                     { | ||||
|                         int nSaveDC = GetEpicSpellSaveDC(OBJECT_SELF, oTarget, SPELL_EPIC_ANARCHY);        | ||||
|                         if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nSaveDC, | ||||
|                             SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay)) | ||||
|                         { | ||||
|                             DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                                 (DURATION_TYPE_TEMPORARY, eLink, oTarget, | ||||
|                                 fDuration, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF))); | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|                 else | ||||
|                     DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                         (DURATION_TYPE_TEMPORARY, eLink2, oTarget, fDuration, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF))); | ||||
|  | ||||
|                 oTarget = GetNextObjectInShape(SHAPE_SPHERE, | ||||
|                     RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), TRUE); | ||||
|             } | ||||
|         } | ||||
|         else // A non-chaotic caster will sway towards chaos on a casting. | ||||
|         { | ||||
|             FloatingTextStringOnCreature("*Spell fails. You are not chaotic*", | ||||
|                 OBJECT_SELF, FALSE); | ||||
|             AdjustAlignment(OBJECT_SELF, ALIGNMENT_CHAOTIC, d10(), FALSE); | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
							
								
								
									
										135
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_animusblas.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										135
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_animusblas.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,135 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_animusblas" | ||||
| /*   Purpose: Animus Blast | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| #include "nw_i0_generic" | ||||
|  | ||||
| void DoAnimationBit(location lTarget, object oCaster, int nCasterLvl); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_ANBLAST)) | ||||
|     { | ||||
|         int nCasterLvl = PRCGetCasterLevel(); | ||||
|         float fDelay; | ||||
|         int nDam; | ||||
|         effect eExplode = EffectVisualEffect(VFX_IMP_PULSE_COLD); | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_FROST_L); | ||||
|         effect eDam, eLink; | ||||
|         location lTarget = PRCGetSpellTargetLocation(); | ||||
|  | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); | ||||
|         DelayCommand(0.3, | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget)); | ||||
|         DelayCommand(0.6, | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget)); | ||||
|         DelayCommand(0.9, | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget)); | ||||
|         DelayCommand(1.2, | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget)); | ||||
|         object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, | ||||
|             RADIUS_SIZE_HUGE, lTarget); | ||||
|         while (GetIsObjectValid(oTarget)) | ||||
|         { | ||||
|             if (oTarget != OBJECT_SELF && !GetIsDM(oTarget) && | ||||
|                 !GetFactionEqual(oTarget) && spellsIsTarget(oTarget, | ||||
|                 SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) | ||||
|             { | ||||
|                 SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, | ||||
|                     PRCGetSpellId())); | ||||
|                 fDelay = PRCGetRandomDelay(); | ||||
|                 if(!PRCDoResistSpell(OBJECT_SELF, oTarget, GetTotalCastingLevel(OBJECT_SELF)+SPGetPenetr(OBJECT_SELF), fDelay)) | ||||
|                 { | ||||
|                     nDam = d6(10); | ||||
|                     // Reflex save for half damage. | ||||
|                     if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, GetEpicSpellSaveDC(OBJECT_SELF, oTarget), | ||||
|                         SAVING_THROW_TYPE_SPELL, OBJECT_SELF, fDelay)) | ||||
|                         nDam /= 2; | ||||
|                     eDam = EffectDamage(nDam, DAMAGE_TYPE_COLD); | ||||
|                     eLink = EffectLinkEffects(eDam, eVis); | ||||
|                     eLink = EffectLinkEffects(eExplode, eLink); | ||||
|                     DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                         (DURATION_TYPE_INSTANT, eLink, oTarget)); | ||||
|                     // Do the animation bit if the target dies from blast. | ||||
|                     if (!MatchNonliving(MyPRCGetRacialType(oTarget))) | ||||
|                     { | ||||
|                         SetLocalInt(oTarget, "nAnBlasCheckMe", TRUE); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|            oTarget = GetNextObjectInShape(SHAPE_SPHERE, | ||||
|                 RADIUS_SIZE_HUGE, lTarget); | ||||
|         } | ||||
|         DelayCommand(3.0, DoAnimationBit(lTarget, OBJECT_SELF, nCasterLvl)); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
| void DoSpawnBit(object oCaster, object oTarget, string sSkel, int nCasterLvl) | ||||
| { | ||||
|     if(GetPRCSwitch(PRC_MULTISUMMON)) | ||||
|     { | ||||
|         //only create a new one if less than maximum count                     | ||||
|         int nMaxHDControlled = nCasterLvl * 4; | ||||
|         int nTotalControlled = GetControlledUndeadTotalHD(oCaster); | ||||
|         if(nTotalControlled < nMaxHDControlled) | ||||
|         { | ||||
|             MultisummonPreSummon(oCaster); | ||||
|             AssignCommand(oCaster, ApplyEffectAtLocation(DURATION_TYPE_PERMANENT,  | ||||
|                 EffectSummonCreature(sSkel, VFX_FNF_SUMMON_UNDEAD), GetLocation(oTarget))); | ||||
|         }        | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         SetMaxHenchmen(999); | ||||
|         object oSkel = CreateObject(OBJECT_TYPE_CREATURE, sSkel, | ||||
|             GetLocation(oTarget)); | ||||
|         AddHenchman(oCaster, oSkel); | ||||
|         SetAssociateListenPatterns(oSkel); | ||||
|         DetermineCombatRound(oSkel); | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), GetLocation(oTarget)); | ||||
|     } | ||||
| }     | ||||
|  | ||||
| void DoAnimationBit(location lTarget, object oCaster, int nCasterLvl) | ||||
| { | ||||
|     int nX = 0; | ||||
|     int nM = GetMaxHenchmen(); | ||||
|     int nH = nM; | ||||
|     string sSkel = "NW_S_SKELWARR"; | ||||
|     object oSkel; | ||||
|     object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, | ||||
|         RADIUS_SIZE_HUGE, lTarget); | ||||
|     while (GetIsObjectValid(oTarget)) | ||||
|     { | ||||
|         if (nX < 12) | ||||
|         { | ||||
|             if (GetIsDead(oTarget) && | ||||
|                 GetLocalInt(oTarget, "nAnBlasCheckMe") == TRUE) | ||||
|             { | ||||
|                 float fDelay = IntToFloat(Random(60))/10.0; | ||||
|                 DelayCommand(fDelay, DoSpawnBit(oCaster, oTarget, sSkel, nCasterLvl)); | ||||
|                 nX++; | ||||
|             } | ||||
|         } | ||||
|         DeleteLocalInt(oTarget, "nAnBlasCheckMe"); | ||||
|         oTarget = GetNextObjectInShape(SHAPE_SPHERE, | ||||
|             RADIUS_SIZE_HUGE, lTarget); | ||||
|     } | ||||
|     DelayCommand(10.0, SetMaxHenchmen(nM)); | ||||
| } | ||||
							
								
								
									
										135
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_animusbliz.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										135
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_animusbliz.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,135 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_animusbliz" | ||||
| /*   Purpose: Animus Blizzard | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| #include "nw_i0_generic" | ||||
|  | ||||
| void DoAnimationBit(location lTarget, object oCaster, int nCastLevel); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_ANBLIZZ)) | ||||
|     { | ||||
|         int nCasterLvl = PRCGetCasterLevel(); | ||||
|         float fDelay;         | ||||
|         int nDam; | ||||
|         effect eExplode = EffectVisualEffect(VFX_IMP_PULSE_COLD); | ||||
|         effect eShake = EffectVisualEffect(VFX_FNF_SCREEN_SHAKE); | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_FROST_L); | ||||
|         effect eDam, eLink; | ||||
|         location lTarget = PRCGetSpellTargetLocation(); | ||||
|  | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); | ||||
|         DelayCommand(0.1, | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eShake, lTarget)); | ||||
|         DelayCommand(0.3, | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget)); | ||||
|         DelayCommand(0.6, | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget)); | ||||
|         DelayCommand(0.9, | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget)); | ||||
|         DelayCommand(1.0, | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eShake, lTarget)); | ||||
|         DelayCommand(1.2, | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget)); | ||||
|         object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, | ||||
|             RADIUS_SIZE_HUGE, lTarget); | ||||
|         while (GetIsObjectValid(oTarget)) | ||||
|         { | ||||
|             if (oTarget != OBJECT_SELF && !GetIsDM(oTarget) && | ||||
|                 !GetFactionEqual(oTarget) && spellsIsTarget(oTarget, | ||||
|                 SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) | ||||
|             { | ||||
|                 SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, | ||||
|                     PRCGetSpellId())); | ||||
|                 fDelay = PRCGetRandomDelay(); | ||||
|                 if(!PRCDoResistSpell(OBJECT_SELF, oTarget, GetTotalCastingLevel(OBJECT_SELF)+SPGetPenetr(OBJECT_SELF), fDelay)) | ||||
|                 { | ||||
|  | ||||
|                     nDam = d6(20); | ||||
|                     // Reflex save for half damage. | ||||
|                     if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, GetEpicSpellSaveDC(OBJECT_SELF, oTarget), | ||||
|                         SAVING_THROW_TYPE_SPELL, OBJECT_SELF, fDelay)) | ||||
|                         nDam /= 2; | ||||
|                     eDam = EffectDamage(nDam, DAMAGE_TYPE_COLD); | ||||
|                     eLink = EffectLinkEffects(eDam, eVis); | ||||
|                     eLink = EffectLinkEffects(eExplode, eLink); | ||||
|                     DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                         (DURATION_TYPE_INSTANT, eLink, oTarget)); | ||||
|                     // Do the animation bit if the target dies from blast. | ||||
|                     if (!MatchNonliving(MyPRCGetRacialType(oTarget))) | ||||
|                     { | ||||
|                         SetLocalInt(oTarget, "nAnBlizCheckMe", TRUE); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|            oTarget = GetNextObjectInShape(SHAPE_SPHERE, | ||||
|                 RADIUS_SIZE_HUGE, lTarget); | ||||
|         } | ||||
|         DelayCommand(3.0, DoAnimationBit(lTarget, OBJECT_SELF, nCasterLvl)); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
| void DoAnimationBit(location lTarget, object oCaster, int nCasterLvl) | ||||
| { | ||||
|     int nX = 0; | ||||
|     int nM = GetMaxHenchmen(); | ||||
|     int nH = nM; | ||||
|     string sWight = "NW_S_WIGHT"; | ||||
|     object oWight; | ||||
|     object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, | ||||
|         RADIUS_SIZE_HUGE, lTarget); | ||||
|     while (GetIsObjectValid(oTarget)) | ||||
|     { | ||||
|         if (nX < 5) | ||||
|         { | ||||
|             if (GetIsDead(oTarget) && | ||||
|                 GetLocalInt(oTarget, "nAnBlizCheckMe") == TRUE) | ||||
|             { | ||||
|                 if(GetPRCSwitch(PRC_MULTISUMMON)) | ||||
|                 { | ||||
|                     //only create a new one if less than maximum count                     | ||||
|                     int nMaxHDControlled = nCasterLvl * 4; | ||||
|                     int nTotalControlled = GetControlledUndeadTotalHD(oCaster); | ||||
|                     if(nTotalControlled < nMaxHDControlled) | ||||
|                     { | ||||
|                         MultisummonPreSummon(oCaster); | ||||
|                         AssignCommand(oCaster, ApplyEffectAtLocation(DURATION_TYPE_PERMANENT,  | ||||
|                             EffectSummonCreature(sWight, VFX_FNF_SUMMON_UNDEAD), GetLocation(oTarget))); | ||||
|                     }     | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     nH++; | ||||
|                     SetMaxHenchmen(nH); | ||||
|                     oWight = CreateObject(OBJECT_TYPE_CREATURE, sWight, | ||||
|                         GetLocation(oTarget)); | ||||
|                     AddHenchman(oCaster, oWight); | ||||
|                     SetAssociateListenPatterns(oWight); | ||||
|                     DetermineCombatRound(oWight); | ||||
|                 } | ||||
|                 nX++; | ||||
|             } | ||||
|         } | ||||
|         DeleteLocalInt(oTarget, "nAnBlizCheckMe"); | ||||
|         oTarget = GetNextObjectInShape(SHAPE_SPHERE, | ||||
|             RADIUS_SIZE_HUGE, lTarget); | ||||
|     } | ||||
|     SetMaxHenchmen(nM); | ||||
| } | ||||
							
								
								
									
										67
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_armyunfall.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_armyunfall.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,67 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_armyunfall" | ||||
| /*   Purpose: Army Unfallen epic spell - heals/resurrects all allies. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| #include "nw_i0_generic" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_ARMY_UN)) | ||||
|     { | ||||
|         effect eRez, eHeal, eBLD, eLink; | ||||
|         effect eVis = EffectVisualEffect(VFX_FNF_LOS_HOLY_10); | ||||
|         effect eVis2 = EffectVisualEffect(VFX_FNF_PWSTUN); | ||||
|         effect eVis3 = EffectVisualEffect(VFX_IMP_HEALING_G); | ||||
|         int nX, nAlly, nBLD; | ||||
|         object oTarget = GetFirstFactionMember(OBJECT_SELF, FALSE); | ||||
|         while (GetIsObjectValid(oTarget)) | ||||
|         { | ||||
|             nX = GetMaxHitPoints(oTarget) - GetCurrentHitPoints(oTarget); | ||||
|             if(nX < 0) //account for temporary HP | ||||
|                 nX = 0; | ||||
|             eRez = EffectResurrection(); | ||||
|             eHeal = EffectHeal(nX); | ||||
|             eLink = EffectLinkEffects(eHeal, eVis); | ||||
|             eLink = EffectLinkEffects(eLink, eVis2); | ||||
|             eLink = EffectLinkEffects(eLink, eVis3); | ||||
|             if (nX && //make sure they can be healed | ||||
|                 !MatchNonliving(MyPRCGetRacialType(oTarget))) | ||||
|             { | ||||
|                 if (nX > 0) | ||||
|                 { | ||||
|                     if (GetIsDead(oTarget)) | ||||
|                     { | ||||
|                         SPApplyEffectToObject(DURATION_TYPE_INSTANT, eRez, oTarget); | ||||
|                         ExecuteScript("prc_pw_armyunfall", oTarget); | ||||
|                         if(GetPRCSwitch(PRC_PW_DEATH_TRACKING) && GetIsPC(oTarget)) | ||||
|                             SetPersistantLocalInt(oTarget, "persist_dead", FALSE); | ||||
|                     }                         | ||||
|                     SPApplyEffectToObject(DURATION_TYPE_INSTANT, eLink, oTarget); | ||||
|                     nAlly++; | ||||
|                 } | ||||
|             } | ||||
|             oTarget = GetNextFactionMember(OBJECT_SELF, FALSE); | ||||
|         } | ||||
|         if (GetPRCSwitch(PRC_EPIC_BACKLASH_DAMAGE) == TRUE) | ||||
|         { | ||||
|             nBLD = d6(nAlly); | ||||
|             eBLD = EffectDamage(nBLD); | ||||
|             SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBLD, oTarget); | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										64
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_audi_stone.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_audi_stone.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,64 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_audi_stone" | ||||
| /*   Purpose: Audience of Stone - all enemies in the spell's radius makes a | ||||
|         FORT save or else turn to stone. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 13, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_A_STONE)) | ||||
|     { | ||||
|         float fDelay; | ||||
|         effect eExplode = EffectVisualEffect(VFX_FNF_NATURES_BALANCE); | ||||
|         effect eVis = EffectVisualEffect(VFX_COM_CHUNK_STONE_MEDIUM); | ||||
|         effect eStone = EffectPetrify(); | ||||
|         effect eLink = EffectLinkEffects(eVis, eStone); | ||||
|         location lTarget = PRCGetSpellTargetLocation(); | ||||
|  | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); | ||||
|         object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, | ||||
|             RADIUS_SIZE_LARGE, lTarget); | ||||
|         while (GetIsObjectValid(oTarget)) | ||||
|         { | ||||
|             if (oTarget != OBJECT_SELF && !GetIsDM(oTarget) && | ||||
|                 !GetFactionEqual(oTarget) && spellsIsTarget(oTarget, | ||||
|                 SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) | ||||
|             { | ||||
|                 SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, | ||||
|                     PRCGetSpellId())); | ||||
|                 fDelay = PRCGetRandomDelay(1.5, 2.5); | ||||
|                 if(!PRCDoResistSpell(OBJECT_SELF, oTarget, GetTotalCastingLevel(OBJECT_SELF)+SPGetPenetr(OBJECT_SELF), fDelay)) | ||||
|                 { | ||||
| //Use bioware petrify command | ||||
|                     PRCDoPetrification(PRCGetCasterLevel(), OBJECT_SELF, oTarget, PRCGetSpellId(), GetEpicSpellSaveDC(OBJECT_SELF, oTarget)); | ||||
| /* | ||||
|                     if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(OBJECT_SELF, oTarget), | ||||
|                         SAVING_THROW_TYPE_SPELL, OBJECT_SELF, fDelay)) | ||||
|                     { | ||||
|                         DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                             (DURATION_TYPE_INSTANT, eLink, oTarget)); | ||||
|                     } | ||||
| */ | ||||
|                 } | ||||
|             } | ||||
|            oTarget = GetNextObjectInShape(SHAPE_SPHERE, | ||||
|                 RADIUS_SIZE_LARGE, lTarget); | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										33
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_celestcoun.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_celestcoun.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_celestcoun" | ||||
| /*   Purpose: Celestial Council - summons a "ghost" of a celestial NPC, which | ||||
|         then starts a conversation with the caster. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| //#include "x2_inc_spellhook" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_DIVINATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_CELCOUN)) | ||||
|     { | ||||
|         DelayCommand(5.0, AssignCommand(OBJECT_SELF, | ||||
|             ActionStartConversation(OBJECT_SELF, | ||||
|             "ss_celestialcoun", TRUE, FALSE))); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
							
								
								
									
										55
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_champvalor.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_champvalor.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_champvalor" | ||||
| /*   Purpose: Champion's Valor - grants the target immunity to mind-affecting | ||||
|         spells, knockdown, sneak attacks, and critical hits for 20 hours. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 11, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_CHAMP_V)) | ||||
|     { | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         int nCasterLvl = GetTotalCastingLevel(OBJECT_SELF); | ||||
|         int nDuration = nCasterLvl / 4; | ||||
|         if (nDuration < 5) | ||||
|         nDuration = 5; | ||||
|         float fDuration = TurnsToSeconds(nDuration); | ||||
|         if(GetPRCSwitch(PRC_PNP_CHAMPIONS_VALOR)) | ||||
|         { | ||||
|             fDuration = HoursToSeconds(20); | ||||
|         }             | ||||
|         effect eImm1 = EffectImmunity(IMMUNITY_TYPE_KNOCKDOWN); | ||||
|         effect eImm2 = EffectImmunity(IMMUNITY_TYPE_SNEAK_ATTACK); | ||||
|         effect eImm3 = EffectImmunity(IMMUNITY_TYPE_CRITICAL_HIT); | ||||
|         effect eImm4 = EffectImmunity(IMMUNITY_TYPE_MIND_SPELLS); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); | ||||
|         effect eVis = EffectVisualEffect(VFX_DUR_GLOW_WHITE); | ||||
|         effect eVis2 = EffectVisualEffect(VFX_DUR_PROTECTION_GOOD_MINOR ); | ||||
|         effect eLink = EffectLinkEffects(eImm1, eImm2); | ||||
|         eLink = EffectLinkEffects(eLink, eImm3); | ||||
|         eLink = EffectLinkEffects(eLink, eImm4); | ||||
|         eLink = EffectLinkEffects(eLink, eDur); | ||||
|         eLink = EffectLinkEffects(eLink, eVis); | ||||
|         eLink = EffectLinkEffects(eLink, eVis2); | ||||
|         eLink = ExtraordinaryEffect(eLink); // No dispelling it. | ||||
|  | ||||
|         SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, | ||||
|             fDuration, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF)); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
							
								
								
									
										111
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_cont_resur.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										111
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_cont_resur.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,111 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_cont_resur" | ||||
| /*   Purpose: Contingent Resurrection - sets a variable on the target, so that | ||||
|         in the case of their death, they will automatically resurrect. | ||||
|         NOTE: This contingency will last indefinitely, unless it triggers or the | ||||
|         player dispels it in the pre-rest conversation. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 13, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| // Brings oPC back to life, via the contingency of 'Contingent Resurrection'. | ||||
| void ContingencyResurrect(object oTarget, int nCount, object oCaster); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oCaster = OBJECT_SELF; | ||||
|  | ||||
|     DeleteLocalInt(oCaster, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(oCaster, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(oCaster, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     if (GetCanCastSpell(oCaster, SPELL_EPIC_CON_RES)) | ||||
|     { | ||||
|         object oTarget   = PRCGetSpellTargetObject(); | ||||
|         location lTarget = GetLocation(oTarget); | ||||
|         effect eVis      = EffectVisualEffect(VFX_FNF_LOS_HOLY_20); | ||||
|         effect eVisFail  = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); | ||||
|         // If the target is of a race that could be resurrected, go ahead. | ||||
|         int bRaise = FALSE; | ||||
|  | ||||
|  | ||||
|         int nMyRace = MyPRCGetRacialType(oTarget); | ||||
|         int nRace = GetRacialType(oTarget); | ||||
|  | ||||
|         // PRC Shifting Polymorph -caused racial type override. Stored with offset +1 to differentiate value 0 from non-existence | ||||
|         int nShiftingTrueRace = GetPersistantLocalInt(oCaster, "PRC_ShiftingTrue_Race"); | ||||
|         if(nShiftingTrueRace) | ||||
|             nMyRace = nShiftingTrueRace - 1; | ||||
|  | ||||
|         if(nMyRace == RACIAL_TYPE_UNDEAD || nMyRace == RACIAL_TYPE_CONSTRUCT) | ||||
|             bRaise = FALSE; | ||||
|         else | ||||
|             bRaise = TRUE; | ||||
|  | ||||
|          | ||||
|         if(bRaise) | ||||
|         { | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lTarget); | ||||
|             PenalizeSpellSlotForCaster(oCaster); | ||||
|             // Start the contingency. | ||||
|             SetLocalInt(oCaster, "nContingentRez", GetLocalInt(oCaster, "nContingentRez") + 1); | ||||
|             ContingencyResurrect(oTarget, 1, oCaster); | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVisFail, lTarget); | ||||
|             SendMessageToPC(oCaster, "Spell failed - Invalid target!"); | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(oCaster, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
| void ContingencyResurrect(object oTarget, int nCount, object oCaster) | ||||
| { | ||||
|     // If the contingency has been turned off, terminate HB | ||||
|     if(!GetLocalInt(oCaster, "nContingentRez")) | ||||
|         return; | ||||
|      | ||||
|     // If the target isn't dead, just toss out a notice that the heartbeat is running | ||||
|     if(!GetIsDead(oTarget)) | ||||
|     { | ||||
|         nCount++; | ||||
|         if((nCount % 20) == 0) | ||||
|             FloatingTextStringOnCreature("*Contingency active*", oTarget, FALSE); | ||||
|     } | ||||
|     else // Resurrect the target, and end the contingency. | ||||
|     { | ||||
|         nCount = 0; | ||||
|          | ||||
|         effect eRez = EffectResurrection(); | ||||
|         effect eHea = EffectHeal(GetMaxHitPoints(oTarget) + 10); | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD); | ||||
|  | ||||
|         // Resurrect the target | ||||
|         FloatingTextStringOnCreature("*Contingency triggered*", oTarget); | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget)); | ||||
|         SPApplyEffectToObject(DURATION_TYPE_INSTANT, eRez, oTarget); | ||||
|         SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHea, oTarget); | ||||
|  | ||||
|         // Bookkeeping of epic spell slots in contingent use | ||||
|         RestoreSpellSlotForCaster(oCaster); | ||||
|         SetLocalInt(oCaster, "nContingentRez", GetLocalInt(oCaster, "nContingentRez") - 1); | ||||
|  | ||||
|         // PW death stuff | ||||
|         ExecuteScript("prc_pw_contress", oTarget); | ||||
|         if(GetPRCSwitch(PRC_PW_DEATH_TRACKING) && GetIsPC(oTarget)) | ||||
|             SetPersistantLocalInt(oTarget, "persist_dead", FALSE); | ||||
|     } | ||||
|  | ||||
|     DelayCommand(6.0, ContingencyResurrect(oTarget, nCount, oCaster)); //Schedule next heartbeat (it will terminate itself if no longer needed) | ||||
| } | ||||
|  | ||||
							
								
								
									
										57
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_continreun.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_continreun.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,57 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_continreun" | ||||
| /*   Purpose: Contingent Reunion - upon casting this at a target, the caster | ||||
|         must choose a condition which will later trigger the teleportation to | ||||
|         the target. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| //#include "x2_inc_spellhook" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_CON_REU)) | ||||
|     { | ||||
|         // Is the target a place, creature, or object? | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         location lTarget = PRCGetSpellTargetLocation(); | ||||
|         effect eVis = EffectVisualEffect(VFX_FNF_LOS_HOLY_20); | ||||
|         if (oTarget != OBJECT_INVALID) | ||||
|         { | ||||
|             if (oTarget == OBJECT_SELF) // If target is self, becomes location | ||||
|             { | ||||
|                 SetLocalLocation(OBJECT_SELF, "lSpellTarget", lTarget); | ||||
|                 SetLocalObject(OBJECT_SELF, "oSpellTarget", OBJECT_INVALID); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 SetLocalObject(OBJECT_SELF, "oSpellTarget", oTarget); | ||||
|                 if (GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) | ||||
|                     SetLocalInt(OBJECT_SELF, "nMyTargetIsACreature", TRUE); | ||||
|             } | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             SetLocalLocation(OBJECT_SELF, "lSpellTarget", lTarget); | ||||
|             SetLocalObject(OBJECT_SELF, "oSpellTarget", OBJECT_INVALID); | ||||
|         } | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lTarget); | ||||
|         AssignCommand(OBJECT_SELF, ActionStartConversation(OBJECT_SELF, | ||||
|             "ss_cont_reunion", TRUE, FALSE)); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
							
								
								
									
										45
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_deadeye.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_deadeye.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_deadeye" | ||||
| /*   Purpose: Deadeye Sense - Increases the target's AB by +20 for 20 hours. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 11, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     if (!X2PreSpellCastCode()) return; | ||||
|  | ||||
|     PRCSetSchool(SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     object oCaster = OBJECT_SELF; | ||||
|     if(GetCanCastSpell(oCaster, SPELL_EPIC_DEADEYE)) | ||||
|     { | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         int nCasterLvl = GetTotalCastingLevel(oCaster); | ||||
|         int nDuration = nCasterLvl / 4; | ||||
|         if(nDuration < 5) | ||||
|         nDuration = 5; | ||||
|  | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_HEAD_HOLY); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); | ||||
|         effect eAttack = EffectAttackIncrease(20); | ||||
|         effect eLink = EffectLinkEffects(eAttack, eDur); | ||||
|  | ||||
|         effect eImpact = EffectVisualEffect(VFX_FNF_LOS_HOLY_30); | ||||
|         ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); | ||||
|  | ||||
|         if(GetIsReactionTypeFriendly(oTarget) || GetFactionEqual(oTarget)) | ||||
|         { | ||||
|             float fDelay = PRCGetRandomDelay(0.4, 1.1); | ||||
|             //Fire spell cast at event for target | ||||
|             SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_BLESS, FALSE)); | ||||
|             DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); | ||||
|             DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration), TRUE, -1, nCasterLvl)); | ||||
|         } | ||||
|     } | ||||
|     PRCSetSchool(); | ||||
| } | ||||
							
								
								
									
										105
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_direwinter.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										105
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_direwinter.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,105 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_direwinter" | ||||
| /*   Purpose: Dire Winter - turns entire area the spell was cast in into a | ||||
|         winter-wonderland. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void DoWinterCheck(object oArea, float fDuration); | ||||
|  | ||||
| const int X2_TL_GROUNDTILE_ICE = 426; | ||||
|  | ||||
| void TLChangeAreaGroundTiles(object oArea, int nGroundTileConst, int nColumns, int nRows, float fZOffset = -0.4f ) | ||||
| { | ||||
|     // Author: Brad "Cutscene" Prince | ||||
|     // * flood area with tiles | ||||
|     object oTile; | ||||
|     // * put ice everywhere | ||||
|     vector vPos; | ||||
|     vPos.x = 5.0; | ||||
|     vPos.y = 0.0; | ||||
|     vPos.z = fZOffset; | ||||
|     float fFace = 0.0; | ||||
|     location lLoc; | ||||
|  | ||||
|     // * fill x axis | ||||
|     int i, j; | ||||
|     for (i=0 ; i <= nColumns; i++) | ||||
|     { | ||||
|         vPos.y = -5.0; | ||||
|         // fill y | ||||
|         for (j=0; j <= nRows; j++) | ||||
|         { | ||||
|             vPos.y = vPos.y + 10.0; | ||||
|             lLoc = Location(oArea, vPos, fFace); | ||||
|             // Ice tile (even though it says water). | ||||
|             oTile = CreateObject(OBJECT_TYPE_PLACEABLE, "plc_invisobj", lLoc,FALSE, "x2_tmp_tile"); | ||||
|             SetPlotFlag(oTile,TRUE); | ||||
|             ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(nGroundTileConst), oTile); | ||||
|         } | ||||
|         vPos.x = vPos.x + 10.0; | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_DIREWIN)) | ||||
|     { | ||||
|         object oArea = GetArea(OBJECT_SELF); | ||||
|         float fDuration = HoursToSeconds(20) - 6.0; | ||||
|         TLChangeAreaGroundTiles(oArea, X2_TL_GROUNDTILE_ICE, 32, 32, 0.3); | ||||
|         SetWeather(oArea, WEATHER_SNOW); | ||||
|         // Add icy look to all placeables in area. | ||||
|         effect eIce = EffectVisualEffect(VFX_DUR_ICESKIN); | ||||
|         object oItem = GetFirstObjectInArea(oArea); | ||||
|         while (oItem != OBJECT_INVALID) | ||||
|         { | ||||
|             if (GetObjectType(oItem) == OBJECT_TYPE_PLACEABLE) | ||||
|             { | ||||
|                 float fDelay = PRCGetRandomDelay(); | ||||
|                 DelayCommand(fDelay, | ||||
|                     SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, | ||||
|                         eIce, oItem, fDuration, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF))); | ||||
|             } | ||||
|             oItem = GetNextObjectInArea(oArea); | ||||
|         } | ||||
|         DelayCommand(6.0, DoWinterCheck(oArea, fDuration)); | ||||
|         DelayCommand(fDuration, SetWeather(oArea, WEATHER_USE_AREA_SETTINGS)); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
| void DoWinterCheck(object oArea, float fDuration) | ||||
| { | ||||
|     int nDam; | ||||
|     effect eDam; | ||||
|     object oTarget = GetFirstObjectInArea(oArea); | ||||
|     while (oTarget != OBJECT_INVALID) | ||||
|     { | ||||
|         if (GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) | ||||
|         { | ||||
|             nDam = d6(2); | ||||
|             eDam = EffectDamage(nDam, DAMAGE_TYPE_COLD); | ||||
|             SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); | ||||
|         } | ||||
|         oTarget = GetNextObjectInArea(oArea); | ||||
|     } | ||||
|     fDuration -= 6.0; | ||||
|     if (fDuration > 1.0) | ||||
|         DelayCommand(6.0, DoWinterCheck(oArea, fDuration)); | ||||
| } | ||||
							
								
								
									
										51
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_dragonkn.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_dragonkn.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Dragon Knight | ||||
| //:: X2_S2_DragKnght | ||||
| //:: Copyright (c) 2001 Bioware Corp. | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|      Summons an adult red dragon for you to | ||||
|      command. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Andrew Nobbs | ||||
| //:: Created On: Feb 07, 2003 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| /* | ||||
|     Altered by Boneshank, for purposes of the Epic Spellcasting project. | ||||
| */ | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_DRG_KNI)) | ||||
|     { | ||||
|         //Declare major variables | ||||
|         int nDuration = 20; | ||||
|         string sSummon = "x2_s_drgred001"; | ||||
|         effect eSummon = EffectSummonCreature(sSummon,481,0.0f,TRUE); | ||||
|         effect eVis = EffectVisualEffect(460); | ||||
|          | ||||
|  | ||||
|         // * make it so dragon cannot be dispelled | ||||
|         eSummon = ExtraordinaryEffect(eSummon); | ||||
|         //Apply the summon visual and summon the dragon. | ||||
|         MultisummonPreSummon(); | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon,PRCGetSpellTargetLocation(), RoundsToSeconds(nDuration)); | ||||
|         DelayCommand(1.0f,ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis,PRCGetSpellTargetLocation())); | ||||
|  | ||||
|         DelayCommand(0.5, AugmentSummonedCreature(sSummon)); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
|  | ||||
							
								
								
									
										141
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_dreamscape.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										141
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_dreamscape.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,141 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_dreamscape" | ||||
| /*   Purpose: Dreamscape - This is a PLOT spell. A module builder MUST take | ||||
|         this spell into consideration when designing their module, or else they | ||||
|         should exclude it. It depends completely on the builder placing | ||||
|         something relevant into the module for it. Read comments in coding for | ||||
|         hints and details. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void NoValidWP(object oPC); | ||||
|  | ||||
| void TeleportPartyToLocation(object oPC, location lWP); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_DREAMSC)) | ||||
|     { | ||||
|         // Declarations. | ||||
|         location lDestination; | ||||
|         location lWP; | ||||
|         object oWP; | ||||
|         // Check for how many "successful" castings there have been. It is up | ||||
|         // to the MODULE BUILDER to increment or decrement this number!!!! | ||||
|         int nNumCasts = GetLocalInt(OBJECT_SELF, "nDreamscapeCount"); | ||||
|         // Where will the Dreamscape take you this time? | ||||
|         switch (nNumCasts) | ||||
|         { | ||||
|             case 0: oWP = GetWaypointByTag("YOUR_WAYPOINTS_TAG"); | ||||
|                     if (oWP == OBJECT_INVALID) // There is no WP by that TAG. | ||||
|                     { | ||||
|                         // Start up a conversation instead. | ||||
|                         NoValidWP(OBJECT_SELF); | ||||
|                         break; | ||||
|                     } | ||||
|                     lWP = GetLocation(oWP); | ||||
|                     TeleportPartyToLocation(OBJECT_SELF, lWP); | ||||
|                     break; | ||||
|             // I have added extra cases. It will never reach them unless you | ||||
|             // increment the local int "nDreamscapeCount" somewhere along the | ||||
|             // way. If you do not do this, the case will ALWAYS be zero. | ||||
|             case 1: oWP = GetWaypointByTag("YOUR_WAYPOINTS_TAG"); | ||||
|                     if (oWP == OBJECT_INVALID) // There is no WP by that TAG. | ||||
|                     { | ||||
|                         // Start up a conversation instead. | ||||
|                         NoValidWP(OBJECT_SELF); | ||||
|                         break; | ||||
|                     } | ||||
|                     lWP = GetLocation(oWP); | ||||
|                     TeleportPartyToLocation(OBJECT_SELF, lWP); | ||||
|                     break; | ||||
|             case 2: oWP = GetWaypointByTag("YOUR_WAYPOINTS_TAG"); | ||||
|                     if (oWP == OBJECT_INVALID) // There is no WP by that TAG. | ||||
|                     { | ||||
|                         // Start up a conversation instead. | ||||
|                         NoValidWP(OBJECT_SELF); | ||||
|                         break; | ||||
|                     } | ||||
|                     lWP = GetLocation(oWP); | ||||
|                     TeleportPartyToLocation(OBJECT_SELF, lWP); | ||||
|                     break; | ||||
|             case 3: oWP = GetWaypointByTag("YOUR_WAYPOINTS_TAG"); | ||||
|                     if (oWP == OBJECT_INVALID) // There is no WP by that TAG. | ||||
|                     { | ||||
|                         // Start up a conversation instead. | ||||
|                         NoValidWP(OBJECT_SELF); | ||||
|                         break; | ||||
|                     } | ||||
|                     lWP = GetLocation(oWP); | ||||
|                     TeleportPartyToLocation(OBJECT_SELF, lWP); | ||||
|                     break; | ||||
|             case 4: oWP = GetWaypointByTag("YOUR_WAYPOINTS_TAG"); | ||||
|                     if (oWP == OBJECT_INVALID) // There is no WP by that TAG. | ||||
|                     { | ||||
|                         // Start up a conversation instead. | ||||
|                         NoValidWP(OBJECT_SELF); | ||||
|                         break; | ||||
|                     } | ||||
|                     lWP = GetLocation(oWP); | ||||
|                     TeleportPartyToLocation(OBJECT_SELF, lWP); | ||||
|                     break; | ||||
|             case 5: oWP = GetWaypointByTag("YOUR_WAYPOINTS_TAG"); | ||||
|                     if (oWP == OBJECT_INVALID) // There is no WP by that TAG. | ||||
|                     { | ||||
|                         // Start up a conversation instead. | ||||
|                         NoValidWP(OBJECT_SELF); | ||||
|                         break; | ||||
|                     } | ||||
|                     lWP = GetLocation(oWP); | ||||
|                     TeleportPartyToLocation(OBJECT_SELF, lWP); | ||||
|                     break; | ||||
|             case 6: oWP = GetWaypointByTag("YOUR_WAYPOINTS_TAG"); | ||||
|                     if (oWP == OBJECT_INVALID) // There is no WP by that TAG. | ||||
|                     { | ||||
|                         // Start up a conversation instead. | ||||
|                         NoValidWP(OBJECT_SELF); | ||||
|                         break; | ||||
|                     } | ||||
|                     lWP = GetLocation(oWP); | ||||
|                     TeleportPartyToLocation(OBJECT_SELF, lWP); | ||||
|                     break; | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
| void NoValidWP(object oPC) | ||||
| { | ||||
|     // This is the back-up plan. If there is no waypoint to go to, maybe you | ||||
|     // have an event happening in a conversation that will send them somewhere. | ||||
|     ActionStartConversation(OBJECT_SELF, "ss_dreamscape", TRUE, FALSE); | ||||
| } | ||||
|  | ||||
| void TeleportPartyToLocation(object oPC, location lWP) | ||||
| { | ||||
|     effect eVis = EffectVisualEffect(VFX_IMP_UNSUMMON); | ||||
|     // Cycle through all party members and teleport them to the waypoint. | ||||
|     object oMem = GetFirstFactionMember(oPC, FALSE); | ||||
|     while (oMem != OBJECT_INVALID) | ||||
|     { | ||||
|         SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oMem); | ||||
|         FloatingTextStringOnCreature("*begins to dream...*", oMem); | ||||
|         DelayCommand(3.0, AssignCommand(oMem, JumpToLocation(lWP))); | ||||
|         oMem = GetNextFactionMember(oPC, FALSE); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										64
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_dullblades.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_dullblades.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,64 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_dullblades" | ||||
| /*   Purpose: Dullblades - grants 100% protection against slashing | ||||
|         damage for 24 hours. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ABJURATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_DULBLAD)) | ||||
|     { | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         int nCasterLvl = GetTotalCastingLevel(OBJECT_SELF); | ||||
|         int nDuration = 10 + nCasterLvl; | ||||
|         float fDuration = RoundsToSeconds(nDuration); | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_AC_BONUS); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_GLOW_WHITE); | ||||
|         effect eProt = EffectDamageImmunityIncrease(DAMAGE_TYPE_SLASHING, 50); | ||||
|         if(GetPRCSwitch(PRC_PNP_DULLBLADES)) | ||||
|         { | ||||
|             eProt = EffectDamageImmunityIncrease | ||||
|                 (DAMAGE_TYPE_SLASHING, 100); | ||||
|             fDuration = HoursToSeconds(20); | ||||
|         }             | ||||
|         effect eLink = EffectLinkEffects(eProt, eDur); | ||||
|         // if this option has been enabled, the caster will take backlash damage | ||||
|         if (GetPRCSwitch(PRC_EPIC_BACKLASH_DAMAGE) == TRUE) | ||||
|         { | ||||
|             int nDamage = d6(10); | ||||
|             effect eDamVis = EffectVisualEffect(VFX_IMP_SONIC); | ||||
|             effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL); | ||||
|             DelayCommand(2.0, SPApplyEffectToObject(DURATION_TYPE_INSTANT, | ||||
|                 eDamVis, OBJECT_SELF)); | ||||
|             DelayCommand(2.0, SPApplyEffectToObject(DURATION_TYPE_INSTANT, | ||||
|                 eDam, OBJECT_SELF)); | ||||
|         } | ||||
|         if(GetIsReactionTypeFriendly(oTarget) || GetFactionEqual(oTarget)) | ||||
|         { | ||||
|             //Fire spell cast at event for target | ||||
|             SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), | ||||
|                 FALSE)); | ||||
|             SPApplyEffectToObject(DURATION_TYPE_INSTANT, | ||||
|                 eVis, oTarget); | ||||
|             SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, | ||||
|                 eLink, oTarget, fDuration, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF)); | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										65
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_dweomerthf.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_dweomerthf.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,65 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_dweomerthf" | ||||
| /*   Purpose: Dweomer Thief - the target loses a spell from the highest level, | ||||
|         which subsequently turns into a scroll in the caster's inventory. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "prc_getbest_inc" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ABJURATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_DWEO_TH)) | ||||
|     { | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         int nTargetSpell; | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_DISPEL); | ||||
|         effect eVis2 = EffectVisualEffect(VFX_IMP_DOOM); | ||||
|         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId())); | ||||
|         if (GetObjectType(oTarget) == OBJECT_TYPE_CREATURE && | ||||
|             oTarget != OBJECT_SELF) | ||||
|         { | ||||
|             if (!PRCDoResistSpell(OBJECT_SELF, oTarget, GetTotalCastingLevel(OBJECT_SELF)+SPGetPenetr(OBJECT_SELF))) | ||||
|             { | ||||
|                  if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(OBJECT_SELF, oTarget)+5, | ||||
|                     SAVING_THROW_TYPE_NONE)) | ||||
|                  { | ||||
|                     SPApplyEffectToObject(DURATION_TYPE_INSTANT, | ||||
|                         eVis, oTarget); | ||||
|                     SPApplyEffectToObject(DURATION_TYPE_INSTANT, | ||||
|                         eVis2, oTarget); | ||||
|                     nTargetSpell = GetBestAvailableSpell(oTarget); | ||||
|                     if (nTargetSpell != 99999) | ||||
|                     { | ||||
|                         int nSpellIP = StringToInt(Get2DACache | ||||
|                             ("des_crft_spells", // Name of the 2DA file. | ||||
|                             "IPRP_SpellIndex",  // The column. | ||||
|                             nTargetSpell));     // The row. | ||||
|                         object oScroll = CreateItemOnObject("it_dweomerthief", | ||||
|                             OBJECT_SELF); | ||||
|                         AddItemProperty(DURATION_TYPE_PERMANENT, | ||||
|                             ItemPropertyCastSpell(nSpellIP, | ||||
|                                 IP_CONST_CASTSPELL_NUMUSES_SINGLE_USE), | ||||
|                                 oScroll); | ||||
|                         DecrementRemainingSpellUses(oTarget, nTargetSpell); | ||||
|                     } | ||||
|                  } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
							
								
								
									
										78
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_enslave.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_enslave.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,78 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Epic Spell: Enslave | ||||
| //:: Author: Boneshank (Don Armstrong) | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void RemoveDomination(object oCreature, object oSlaver = OBJECT_SELF) | ||||
| { | ||||
|     effect eComp = SupernaturalEffect(EffectCutsceneDominated()); | ||||
|     effect e = GetFirstEffect(oCreature); | ||||
|      | ||||
|     while (GetIsEffectValid(e)) | ||||
|     { | ||||
|         if (GetEffectType(e) == GetEffectType(eComp) && GetEffectCreator(e) == oSlaver) | ||||
|         { | ||||
|             RemoveEffect(oCreature, e); | ||||
|         } | ||||
|         e = GetNextEffect(oCreature); | ||||
|     } | ||||
| } | ||||
|      | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ENCHANTMENT); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_ENSLAVE)) | ||||
|     { | ||||
|         //Declare major variables | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         object oOldSlave = GetLocalObject(OBJECT_SELF, "EnslavedCreature"); | ||||
|         effect eDom = EffectCutsceneDominated(); | ||||
|         effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DOMINATED); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); | ||||
|  | ||||
|         //Link domination and persistant VFX | ||||
|         effect eLink = EffectLinkEffects(eMind, eDom); | ||||
|         eLink = EffectLinkEffects(eLink, eDur); | ||||
|         effect eLink2 = SupernaturalEffect(eLink); | ||||
|  | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_DOMINATE_S); | ||||
|         //Fire cast spell at event for the specified target | ||||
|         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DOMINATE_MONSTER, FALSE)); | ||||
|         //Make sure the target is a monster | ||||
|         if(!GetIsReactionTypeFriendly(oTarget)) | ||||
|         { | ||||
|             //Make SR Check | ||||
|             if (!PRCDoResistSpell(OBJECT_SELF, oTarget, GetTotalCastingLevel(OBJECT_SELF)+SPGetPenetr(OBJECT_SELF)) && !GetIsImmune(oTarget, IMMUNITY_TYPE_MIND_SPELLS) && !GetIsImmune(oTarget, IMMUNITY_TYPE_DOMINATE) && !GetIsPC(oTarget)) | ||||
|             { | ||||
|                 //Make a Will Save | ||||
|                 if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(OBJECT_SELF, oTarget), SAVING_THROW_TYPE_MIND_SPELLS)) | ||||
|                 { | ||||
|                     //Release old slave | ||||
|                     if (GetIsObjectValid(oOldSlave)) RemoveDomination(oOldSlave); | ||||
|  | ||||
|                     //Apply linked effects and VFX Impact | ||||
|                     SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink2, oTarget); | ||||
|                     SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); | ||||
|                     SetLocalObject(OBJECT_SELF, "EnslavedCreature", oTarget); | ||||
|                 } | ||||
|                 else  | ||||
|                     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget); | ||||
|             } | ||||
|             else  | ||||
|                 ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget); | ||||
|         } | ||||
|         else  | ||||
|             ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										35
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_epicrepuls.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_epicrepuls.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_epicrepuls" | ||||
| /*   Purpose: Epic Repulsion - repel a specific creature type for 24 hours. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| //#include "x2_inc_spellhook" | ||||
|  | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ABJURATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_EP_RPLS)) | ||||
|     { | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         location lTarget = GetLocation(oTarget); | ||||
|         effect eVis = EffectVisualEffect(VFX_FNF_PWSTUN); | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lTarget); | ||||
|         SetLocalObject(OBJECT_SELF, "oRepulsionTarget", oTarget); | ||||
|         AssignCommand(OBJECT_SELF, ActionStartConversation(OBJECT_SELF, | ||||
|             "ss_ep_repulsion", TRUE, FALSE)); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										75
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_eterfree.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										75
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_eterfree.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,75 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Epic Spell: Eternal Freedom | ||||
| //:: Author: Boneshank (Don Armstrong) | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
| #include "inc_dispel" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ABJURATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_ET_FREE)) | ||||
|     { | ||||
|         //Declare major variables | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         object oSkin; | ||||
|         itemproperty ip1 = ItemPropertyImmunityMisc(IP_CONST_IMMUNITYMISC_PARALYSIS); | ||||
|         itemproperty ip2 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_ENTANGLE); | ||||
|         itemproperty ip3 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_SLOW); | ||||
|         itemproperty ip4 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_HOLD_MONSTER); | ||||
|         itemproperty ip5 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_HOLD_PERSON); | ||||
|         itemproperty ip6 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_SLEEP); | ||||
|         itemproperty ip7 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_HOLD_ANIMAL); | ||||
|         itemproperty ip8 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_POWER_WORD_STUN); | ||||
|         itemproperty ip9 = ItemPropertySpellImmunitySpecific(IP_CONST_IMMUNITYSPELL_WEB); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_FREEDOM_OF_MOVEMENT); | ||||
|  | ||||
|         //Fire cast spell at event for the specified target | ||||
|         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FREEDOM_OF_MOVEMENT, FALSE)); | ||||
|  | ||||
|         //Search for and remove the above negative effects | ||||
|         effect eLook = GetFirstEffect(oTarget); | ||||
|         while(GetIsEffectValid(eLook)) | ||||
|         { | ||||
|             if(GetEffectType(eLook) == EFFECT_TYPE_PARALYZE || | ||||
|                 GetEffectType(eLook) == EFFECT_TYPE_ENTANGLE || | ||||
|                 GetEffectType(eLook) == EFFECT_TYPE_SLOW || | ||||
|                 GetEffectType(eLook) == EFFECT_TYPE_MOVEMENT_SPEED_DECREASE || | ||||
|                 GetEffectType(eLook) == EFFECT_TYPE_PETRIFY || | ||||
|                 GetEffectType(eLook) == EFFECT_TYPE_SLEEP || | ||||
|                 GetEffectType(eLook) == EFFECT_TYPE_STUNNED) | ||||
|             { | ||||
|                 RemoveEffect(oTarget, eLook); | ||||
|             } | ||||
|             eLook = GetNextEffect(oTarget); | ||||
|         } | ||||
|         //Apply properties. | ||||
|         oSkin = GetPCSkin(oTarget); | ||||
|         IPSafeAddItemProperty(oSkin, ip1); | ||||
|         IPSafeAddItemProperty(oSkin, ip2); | ||||
|         IPSafeAddItemProperty(oSkin, ip3); | ||||
|         IPSafeAddItemProperty(oSkin, ip4); | ||||
|         IPSafeAddItemProperty(oSkin, ip5); | ||||
|         IPSafeAddItemProperty(oSkin, ip6); | ||||
|         IPSafeAddItemProperty(oSkin, ip7); | ||||
|         IPSafeAddItemProperty(oSkin, ip8); | ||||
|         IPSafeAddItemProperty(oSkin, ip9); | ||||
|         SPApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(eDur), oTarget); | ||||
|  | ||||
|         DelayCommand(6.0, GiveFeat(oTarget, 398)); | ||||
|         FloatingTextStringOnCreature("You have gained the ability " + | ||||
|                                  "to move freely at all times!", oTarget, FALSE); | ||||
|  | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
							
								
								
									
										33
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_fiendwords.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_fiendwords.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_fiendwords" | ||||
| /*   Purpose: Fiendish Words - summons a "ghost" of a fiend NPC, which | ||||
|         then starts a conversation with the caster. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| //#include "x2_inc_spellhook" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_DIVINATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_FIEND_W)) | ||||
|     { | ||||
|         DelayCommand(5.0, AssignCommand(OBJECT_SELF, | ||||
|             ActionStartConversation(OBJECT_SELF, | ||||
|             "ss_fiendishwords", TRUE, FALSE))); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
							
								
								
									
										51
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_fleetness.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_fleetness.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_fleetness" | ||||
| /*   Purpose: Fleetness of Foot - grants the target double the movement rate | ||||
|         for 20 hours. Yowza! | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 11, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_FLEETNS)) | ||||
|     { | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         int nDuration = 20; | ||||
|  | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_HASTE); | ||||
|         effect eImpact = EffectVisualEffect(VFX_IMP_GOOD_HELP); | ||||
|         effect eSpeed = EffectMovementSpeedIncrease(99); | ||||
|         effect eLink = EffectLinkEffects(eSpeed, eDur); | ||||
|         float fDelay; | ||||
|         if(GetIsReactionTypeFriendly(oTarget) || GetFactionEqual(oTarget)) | ||||
|         { | ||||
|             fDelay = PRCGetRandomDelay(0.4, 1.1); | ||||
|             //Fire spell cast at event for target | ||||
|             SignalEvent(oTarget, EventSpellCastAt | ||||
|                 (OBJECT_SELF, SPELL_EXPEDITIOUS_RETREAT, FALSE)); | ||||
|             DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                 (DURATION_TYPE_INSTANT, eImpact, oTarget)); | ||||
|             DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                 (DURATION_TYPE_INSTANT, eVis, oTarget)); | ||||
|             DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                 (DURATION_TYPE_TEMPORARY, eLink, oTarget, | ||||
|                 HoursToSeconds(nDuration), TRUE, -1, GetTotalCastingLevel(OBJECT_SELF))); | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
							
								
								
									
										157
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_gem_cage.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										157
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_gem_cage.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,157 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_gem_cage" | ||||
| /*   Purpose: Gem Cage - You attempt to trap the target into a gem. The spell | ||||
|         first looks at the HD of the target creature, then looks for a gem | ||||
|         valuable enough to entrap the target in. If successful, you will then be | ||||
|         able to release that creature again at some other place and time. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| int GetNeededGemValue(int nHD); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_GEMCAGE)) | ||||
|     { | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         if (!GetPlotFlag(oTarget) &&   // Plot creatures cannot be Caged, ever. | ||||
|             !GetIsDM(oTarget) &&       // Neither can DM's. | ||||
|             !GetIsPC(oTarget))         // And neither can other players. | ||||
|         { | ||||
|             int nHD = GetHitDice(oTarget); | ||||
|             int nTestVal, nCurrentVal, nTargVal; | ||||
|             // How valuable of a gem do we need to Gem Cage the target? | ||||
|             nTargVal = GetNeededGemValue(nHD); | ||||
|             string sTarget = GetResRef(oTarget); | ||||
|             string sName = GetName(oTarget); | ||||
|             if (sTarget == "") sTarget = ""; | ||||
|  | ||||
|             itemproperty ipGemCage = | ||||
|                 ItemPropertyCastSpell(IP_CONST_CASTSPELL_UNIQUE_POWER, | ||||
|                     IP_CONST_CASTSPELL_NUMUSES_SINGLE_USE); | ||||
|             object oGem, oCopy; | ||||
|  | ||||
|             // Look for an appropriate gem in the caster's inventory. | ||||
|             object oItem = GetFirstItemInInventory(OBJECT_SELF); | ||||
|             while (oItem != OBJECT_INVALID) | ||||
|             {   // Is the item a gem? | ||||
|                 if (GetBaseItemType(oItem) == BASE_ITEM_GEM) | ||||
|                 { | ||||
|                     int nStack = GetNumStackedItems(oItem); | ||||
|                     // What's the value of the gem? | ||||
|                     int nTestVal = GetGoldPieceValue(oItem) /nStack; | ||||
|                     // Is the gem's value greater than the target value? | ||||
|                     if(nTestVal >= nTargVal) | ||||
|                     {   // If this is the first viable gem, state it. | ||||
|                         if (oGem == OBJECT_INVALID) oGem = oItem; | ||||
|                         else // If not the first viable gem, compare them. | ||||
|                         {   // What's the value of least valuable but still | ||||
|                                                             // viable gem? | ||||
|                             nCurrentVal = GetGoldPieceValue(oGem); | ||||
|                             // Is the new gem less valuable? If so, use it. | ||||
|                             if (nTestVal <= nCurrentVal) | ||||
|                                 oGem = oItem; | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|                 oItem = GetNextItemInInventory(OBJECT_SELF); | ||||
|             } | ||||
|             if (oGem != OBJECT_INVALID) | ||||
|             {   // Onward! Cast the spell on the target. | ||||
|                 // Spell Resistance check: | ||||
|                 if (!PRCDoResistSpell(OBJECT_SELF, oTarget, GetTotalCastingLevel(OBJECT_SELF)+SPGetPenetr(OBJECT_SELF), 1.0)) | ||||
|                 {   // Will Saving Throw. | ||||
|                     if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(OBJECT_SELF, oTarget))) | ||||
|                     {   // Choose the Gem Cage VFX based on gem value. | ||||
|                         int nStack = GetNumStackedItems(oGem); | ||||
|                         int nVis = 799; | ||||
|                         if (GetGoldPieceValue(oGem) > 1600) nVis = 800; | ||||
|                         if (GetGoldPieceValue(oGem) > 3500) nVis = 798; | ||||
|                         effect eVis = EffectVisualEffect(nVis); | ||||
|                         effect eImp = EffectVisualEffect(VFX_IMP_DESTRUCTION); | ||||
|                         // Do fancy visual. | ||||
|                         SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, | ||||
|                             oTarget); | ||||
|                         DelayCommand(0.2, | ||||
|                             SPApplyEffectToObject | ||||
|                                 (DURATION_TYPE_INSTANT, eImp, oTarget)); | ||||
|                         DelayCommand(1.2, | ||||
|                             SPApplyEffectToObject | ||||
|                                 (DURATION_TYPE_INSTANT, eImp, oTarget)); | ||||
|                         DelayCommand(2.2, | ||||
|                             SPApplyEffectToObject | ||||
|                                 (DURATION_TYPE_INSTANT, eImp, oTarget)); | ||||
|                         // Cage the target. | ||||
|                         DelayCommand(2.8, DestroyObject(oTarget)); | ||||
|                         if (nStack > 1) | ||||
|                         DelayCommand(2.6, SetItemStackSize (oGem, --nStack)); | ||||
|                         else | ||||
|                         DelayCommand(2.6, DestroyObject(oGem)); | ||||
|                         // Create the new item, readying it for use later. | ||||
|                         oCopy = CreateItemOnObject | ||||
|                             ("it_gemcage_gem", OBJECT_SELF); | ||||
|                         SetLocalString(oCopy, "sCagedCreature", sTarget); | ||||
|                         SetLocalString(oCopy, "sNameOfCreature", sName); | ||||
|                         // Debug message | ||||
|                         SendMessageToPC(OBJECT_SELF, | ||||
|                             GetLocalString(oCopy, "sCagedCreature")); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|             else | ||||
|                 FloatingTextStringOnCreature("*Spell failed! No viable gems.*", | ||||
|                     OBJECT_SELF, FALSE); | ||||
|         } | ||||
|         else | ||||
|             FloatingTextStringOnCreature("*Spell failed! Invalid target.*", | ||||
|                 OBJECT_SELF, FALSE); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
| int GetNeededGemValue(int nHD) | ||||
| { | ||||
|     int nValue; | ||||
|     switch (nHD) | ||||
|     { | ||||
|         case 1: case 2: | ||||
|             nValue = 250; | ||||
|             break; | ||||
|         case 3: case 4: case 5: case 6: | ||||
|             nValue = 1000; | ||||
|             break; | ||||
|         case 7: case 8: case 9: | ||||
|             nValue = 1500; | ||||
|             break; | ||||
|         case 10: case 11: case 12: | ||||
|             nValue = 2000; | ||||
|             break; | ||||
|         case 13: case 14: case 15: case 16: case 17: | ||||
|             nValue = 3000; | ||||
|             break; | ||||
|         case 18: case 19: case 20: case 21: | ||||
|             nValue = 4000; | ||||
|             break; | ||||
|         case 22: case 23: case 24: | ||||
|             nValue = 6000; | ||||
|             break; | ||||
|         default: | ||||
|             nValue = 10000; | ||||
|             break; | ||||
|     } | ||||
|     return nValue; | ||||
| } | ||||
							
								
								
									
										98
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_godsmite.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_godsmite.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,98 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Epic Spell: Godsmite | ||||
| //:: Author: Boneshank (Don Armstrong) | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
| #include "x0_i0_position" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     if (!X2PreSpellCastCode()) return; | ||||
|  | ||||
|     PRCSetSchool(SPELL_SCHOOL_EVOCATION); | ||||
|  | ||||
|     object oCaster = OBJECT_SELF; | ||||
|     if(GetCanCastSpell(oCaster, SPELL_EPIC_GODSMIT)) | ||||
|     { | ||||
|         //Declare major variables | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         int nSpellPower = GetTotalCastingLevel(oCaster); | ||||
|  | ||||
|         int nDam, iCAling, iTAling; | ||||
|         object oArea = GetArea(oTarget); | ||||
|         location lTarget; | ||||
|  | ||||
|         // if this option has been enabled, the caster will take backlash damage | ||||
|         if(GetPRCSwitch(PRC_EPIC_BACKLASH_DAMAGE)) | ||||
|         { | ||||
|             effect eCast = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_HOLY); | ||||
|             int nDamage = d4(nSpellPower); | ||||
|             effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE); | ||||
|             DelayCommand(3.0, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eCast, oCaster)); | ||||
|             DelayCommand(3.0, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oCaster)); | ||||
|         } | ||||
|  | ||||
|         //Fire cast spell at event for the specified target | ||||
|         SignalEvent(oTarget, EventSpellCastAt(oCaster, PRCGetSpellId())); | ||||
|         //Roll damage | ||||
|  | ||||
|         iCAling = GetAlignmentGoodEvil(oCaster); | ||||
|         iTAling = GetAlignmentGoodEvil(oTarget); | ||||
|  | ||||
|         if(iCAling == iTAling) | ||||
|             nDam = d4(nSpellPower); | ||||
|         else if(iCAling == ALIGNMENT_NEUTRAL || iTAling == ALIGNMENT_NEUTRAL) | ||||
|             nDam = d6(nSpellPower); | ||||
|         else | ||||
|             nDam = d8(nSpellPower); | ||||
|  | ||||
|         iCAling = GetAlignmentLawChaos(oCaster); | ||||
|         iTAling = GetAlignmentLawChaos(oTarget); | ||||
|  | ||||
|         if(iCAling == iTAling) | ||||
|             nDam += d4(nSpellPower); | ||||
|         else if(iCAling == ALIGNMENT_NEUTRAL || iTAling == ALIGNMENT_NEUTRAL) | ||||
|             nDam += d6(nSpellPower); | ||||
|         else | ||||
|             nDam += d8(nSpellPower); | ||||
|  | ||||
|         //Set damage effect | ||||
|  | ||||
|         if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(oCaster, oTarget), SAVING_THROW_TYPE_SPELL, oCaster)) | ||||
|         { | ||||
|             nDam /=2; | ||||
|             // This script does nothing if it has Mettle, bail | ||||
|             if(GetHasMettle(oTarget, SAVING_THROW_FORT)) | ||||
|                 nDam = 0; | ||||
|         } | ||||
|  | ||||
|         effect eDam = EffectDamage(nDam, DAMAGE_TYPE_DIVINE, DAMAGE_POWER_PLUS_TWENTY); | ||||
|         lTarget = GetRandomLocation(oArea, oTarget, 4.0); | ||||
|         DelayCommand(0.4, ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), lTarget)); | ||||
|         lTarget = GetRandomLocation(oArea, oTarget, 3.5); | ||||
|         DelayCommand(0.8, ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), lTarget)); | ||||
|         lTarget = GetRandomLocation(oArea, oTarget, 3.0); | ||||
|         DelayCommand(1.2, ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), lTarget)); | ||||
|         lTarget = GetRandomLocation(oArea, oTarget, 2.5); | ||||
|         DelayCommand(1.6, ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), lTarget)); | ||||
|         lTarget = GetRandomLocation(oArea, oTarget, 2.0); | ||||
|         DelayCommand(2.0, ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), lTarget)); | ||||
|         lTarget = GetRandomLocation(oArea, oTarget, 1.5); | ||||
|         DelayCommand(2.4, ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), lTarget)); | ||||
|         lTarget = GetRandomLocation(oArea, oTarget, 1.0); | ||||
|         DelayCommand(2.7, ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), lTarget)); | ||||
|         lTarget = GetRandomLocation(oArea, oTarget, 0.5); | ||||
|         DelayCommand(3.0, ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), lTarget)); | ||||
|         ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), GetLocation(oTarget)); | ||||
|         SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_BIGBYS_INTERPOSING_HAND), oTarget, 0.75, TRUE, -1, nSpellPower); | ||||
|         DelayCommand(0.75, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_BIGBYS_GRASPING_HAND), oTarget, 1.0, TRUE, -1, nSpellPower)); | ||||
|         DelayCommand(1.75, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_BIGBYS_CLENCHED_FIST), oTarget, 0.75, TRUE, -1, nSpellPower)); | ||||
|         DelayCommand(2.5, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_BIGBYS_CRUSHING_HAND), oTarget, 1.0, TRUE, -1, nSpellPower)); | ||||
|         DelayCommand(3.0, SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_HIT_DIVINE), oTarget)); | ||||
|         DelayCommand(3.0, SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_CHUNK_STONE_MEDIUM), oTarget)); | ||||
|         DelayCommand(3.1, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); | ||||
|     } | ||||
|     PRCSetSchool(); | ||||
| } | ||||
							
								
								
									
										64
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_gr_ruin.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_gr_ruin.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,64 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Greater Ruin | ||||
| //:: X2_S2_Ruin | ||||
| //:: Copyright (c) 2003 Bioware Corp. | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
| // The caster deals 35d6 damage to a single target | ||||
|    fort save for half damage | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Andrew Nobbs | ||||
| //:: Created On: Nov 18, 2002 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| /* | ||||
|     Altered by Boneshank, for purposes of the Epic Spellcasting project. | ||||
| */ | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "inc_dispel" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_GR_RUIN)) | ||||
|     { | ||||
|         //Declare major variables | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|  | ||||
|  | ||||
|         float fDist = GetDistanceBetween(OBJECT_SELF, oTarget); | ||||
|         float fDelay = fDist/(3.0 * log(fDist) + 2.0); | ||||
|  | ||||
|         //Fire cast spell at event for the specified target | ||||
|         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId())); | ||||
|         //Roll damage | ||||
|         int nDam = d6(35); | ||||
|         //Set damage effect | ||||
|  | ||||
|         if (PRCMySavingThrow(SAVING_THROW_FORT,oTarget,GetEpicSpellSaveDC(OBJECT_SELF, oTarget),SAVING_THROW_TYPE_SPELL,OBJECT_SELF) != 0 ) | ||||
|         { | ||||
|             nDam /=2; | ||||
| 				if (GetHasMettle(oTarget, SAVING_THROW_FORT)) | ||||
| 				// This script does nothing if it has Mettle, bail | ||||
| 					nDam = 0;                | ||||
|         } | ||||
|  | ||||
|         effect eDam = EffectDamage(nDam, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_PLUS_TWENTY); | ||||
|         ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), GetLocation(oTarget)); | ||||
|         SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(487), oTarget); | ||||
|         SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_BLOOD_CRT_RED), oTarget); | ||||
|         SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_CHUNK_BONE_MEDIUM), oTarget); | ||||
|         DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										36
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_gr_spres.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_gr_spres.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Epic Spell: Greater Spell Resistance | ||||
| //:: Author: Boneshank (Don Armstrong) | ||||
|  | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_GR_SP_RE)) | ||||
|     { | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         effect eSR = EffectSpellResistanceIncrease(35); | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_MAGIC_PROTECTION); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); | ||||
|         effect eDur2 = EffectVisualEffect(249); | ||||
|         effect eLink = EffectLinkEffects(eSR, eDur); | ||||
|         eLink = EffectLinkEffects(eLink, eDur2); | ||||
|         //Fire cast spell at event for the specified target | ||||
|         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SPELL_RESISTANCE, FALSE)); | ||||
|         //Apply VFX impact and SR bonus effect | ||||
|         SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); | ||||
|         SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(20), TRUE, -1, GetTotalCastingLevel(OBJECT_SELF)); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										71
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_grtimestop.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_grtimestop.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,71 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Time Stop | ||||
| //:: NW_S0_TimeStop.nss | ||||
| //:: Copyright (c) 2001 Bioware Corp. | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_grtimestop" | ||||
| /*   Purpose: Greater Timestop - in all ways this spell is the same as | ||||
|         Timestop except for the duration, which is doubled. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 11, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_timestop" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|     int nDuration = d4(2)+2; | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_GR_TIME)) | ||||
|     { | ||||
|         location lTarget = PRCGetSpellTargetLocation(); | ||||
|         effect eVis = EffectVisualEffect(VFX_FNF_TIME_STOP); | ||||
|         effect eTime = EffectTimeStop(); | ||||
|         float fDuration = RoundsToSeconds(nDuration); | ||||
|  | ||||
|         if(GetPRCSwitch(PRC_TIMESTOP_BIOWARE_DURATION)) | ||||
|              fDuration = 18.0; | ||||
|         if(GetPRCSwitch(PRC_TIMESTOP_LOCAL)) | ||||
|         { | ||||
|             eTime = EffectAreaOfEffect(VFX_PER_NEW_TIMESTOP); | ||||
|             eTime = EffectLinkEffects(eTime, EffectEthereal()); | ||||
|             if(GetPRCSwitch(PRC_TIMESTOP_NO_HOSTILE)) | ||||
|             { | ||||
|                 object oCaster = OBJECT_SELF; | ||||
|                 AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyNoDamage(), GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oCaster),fDuration); | ||||
|                 AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyNoDamage(), GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oCaster),fDuration); | ||||
|                 AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyNoDamage(), GetItemInSlot(INVENTORY_SLOT_BULLETS, oCaster),fDuration); | ||||
|                 AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyNoDamage(), GetItemInSlot(INVENTORY_SLOT_ARROWS, oCaster),fDuration); | ||||
|                 AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyNoDamage(), GetItemInSlot(INVENTORY_SLOT_BOLTS, oCaster),fDuration); | ||||
|                 AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyNoDamage(), GetItemInSlot(INVENTORY_SLOT_CWEAPON_B, oCaster),fDuration); | ||||
|                 AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyNoDamage(), GetItemInSlot(INVENTORY_SLOT_CWEAPON_L, oCaster),fDuration); | ||||
|                 AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyNoDamage(), GetItemInSlot(INVENTORY_SLOT_CWEAPON_R, oCaster),fDuration);             | ||||
|                 DelayCommand(fDuration, RemoveTimestopEquip()); | ||||
|                 /* | ||||
|                 string sSpellscript = PRCGetUserSpecificSpellScript(); | ||||
|                 DelayCommand(fDuration, PRCSetUserSpecificSpellScript(sSpellscript)); | ||||
|                 PRCSetUserSpecificSpellScript("tsspellscript"); | ||||
|                     now in main spellhook*/  | ||||
|             } | ||||
|         } | ||||
|  | ||||
|  | ||||
|         SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE)); | ||||
|         DelayCommand(0.75, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eTime, OBJECT_SELF, fDuration, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF))); | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lTarget); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
							
								
								
									
										114
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_hellball.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										114
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_hellball.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,114 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Hellball | ||||
| //:: X2_S2_HELLBALL | ||||
| //:: Copyright (c) 2003 Bioware Corp. | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Andrew Noobs, Georg Zoeller | ||||
| //:: Created On: 2003-08-20 | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Altered by Boneshank, for purposes of the Epic Spellcasting project. | ||||
| */ | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_HELBALL)) | ||||
|     { | ||||
|         //Declare major variables | ||||
|         int nDamage1, nDamage2, nDamage3, nDamage4; | ||||
|         float fDelay; | ||||
|         effect eExplode = EffectVisualEffect(464); | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); | ||||
|         effect eVis2 = EffectVisualEffect(VFX_IMP_ACID_L); | ||||
|         effect eVis3 = EffectVisualEffect(VFX_IMP_SONIC); | ||||
|  | ||||
|   | ||||
|         // if this option has been enabled, the caster will take damage for casting | ||||
|         // epic spells, as descripbed in the ELHB | ||||
|         if (GetPRCSwitch(PRC_EPIC_BACKLASH_DAMAGE) == TRUE) | ||||
|         { | ||||
|             effect eCast = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); | ||||
|             int nDamage5 = d6(10); | ||||
|             effect eDam5 = EffectDamage(nDamage5, DAMAGE_TYPE_NEGATIVE); | ||||
|             SPApplyEffectToObject(DURATION_TYPE_INSTANT, eCast, OBJECT_SELF); | ||||
|             SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam5, OBJECT_SELF); | ||||
|         } | ||||
|  | ||||
|  | ||||
|  | ||||
|         effect eDam1, eDam2, eDam3, eDam4, eDam5, eKnock; | ||||
|         eKnock= EffectKnockdown(); | ||||
|  | ||||
|         location lTarget = PRCGetSpellTargetLocation(); | ||||
|  | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); | ||||
|  | ||||
|         object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 20.0f, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); | ||||
|  | ||||
|         int nTotalDamage; | ||||
|         while (GetIsObjectValid(oTarget)) | ||||
|         { | ||||
|             if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) | ||||
|             { | ||||
|  | ||||
|             SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId())); | ||||
|  | ||||
|             fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20 + 0.5f; | ||||
|                //Roll damage for each target | ||||
|                 nDamage1 = d6(10); | ||||
|                 nDamage2 = d6(10); | ||||
|                 nDamage3 = d6(10); | ||||
|                 nDamage4 = d6(10); | ||||
|  | ||||
|                 // no we don't care about evasion. there is no evasion to hellball | ||||
|                 if (PRCMySavingThrow(SAVING_THROW_REFLEX,oTarget,GetEpicSpellSaveDC(OBJECT_SELF, oTarget),SAVING_THROW_TYPE_SPELL,OBJECT_SELF,fDelay) >0) | ||||
|                 { | ||||
|                     nDamage1 /=2; | ||||
|                     nDamage2 /=2; | ||||
|                     nDamage3 /=2; | ||||
|                     nDamage4 /=2; | ||||
|                 } | ||||
|                 nTotalDamage = nDamage1+nDamage2+nDamage3+nDamage4; | ||||
|                 //Set the damage effect | ||||
|                 eDam1 = EffectDamage(nDamage1, DAMAGE_TYPE_ACID); | ||||
|                 eDam2 = EffectDamage(nDamage2, DAMAGE_TYPE_ELECTRICAL); | ||||
|                 eDam3 = EffectDamage(nDamage3, DAMAGE_TYPE_FIRE); | ||||
|                 eDam4 = EffectDamage(nDamage4, DAMAGE_TYPE_SONIC); | ||||
|  | ||||
|                 if(nTotalDamage > 0) | ||||
|                 { | ||||
|                     if (nTotalDamage > 50) | ||||
|                     { | ||||
|                         DelayCommand(fDelay+0.3f, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnock, oTarget,3.0f, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF))); | ||||
|                     } | ||||
|  | ||||
|                     // Apply effects to the currently selected target. | ||||
|                     DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam1, oTarget)); | ||||
|                     DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam2, oTarget)); | ||||
|                     DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam3, oTarget)); | ||||
|                     DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam4, oTarget)); | ||||
|                     //This visual effect is applied to the target object not the location as above.  This visual effect | ||||
|                     //represents the flame that erupts on the target not on the ground. | ||||
|                     DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); | ||||
|                     DelayCommand(fDelay+0.2f, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget)); | ||||
|                     DelayCommand(fDelay+0.5f, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis3, oTarget)); | ||||
|                  } | ||||
|             } | ||||
|            //Select the next target within the spell shape. | ||||
|            oTarget = GetNextObjectInShape(SHAPE_SPHERE, 20.0f, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
							
								
								
									
										64
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_hercuall.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_hercuall.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,64 @@ | ||||
| ///////////////////////////////////////////////// | ||||
| // Herculean Alliance | ||||
| //----------------------------------------------- | ||||
| // Created By: Nron Ksr | ||||
| // Created On: 03/06/2004 | ||||
| // Description: This script changes someone's ability scores | ||||
| ///////////////////////////////////////////////// | ||||
| /* | ||||
|     Boneshank - copied Herculean Empowerment, and converted to area/ally spell. | ||||
| */ | ||||
|  | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_HERCALL)) | ||||
|     { | ||||
|         //Declare major variables | ||||
|         int nCasterLvl = GetTotalCastingLevel(OBJECT_SELF); // Boneshank - changed. | ||||
|         object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 10.0, | ||||
|             PRCGetSpellTargetLocation()); | ||||
|         while (GetIsObjectValid(oTarget)) | ||||
|         { | ||||
|             if (GetFactionEqual(oTarget, OBJECT_SELF)) | ||||
|             { | ||||
|                 int nModify = d4() + 5; | ||||
|                 float fDuration = HoursToSeconds(nCasterLvl); | ||||
|                 effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); | ||||
|                 effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); | ||||
|                 effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH,nModify); | ||||
|                 effect eDex = EffectAbilityIncrease(ABILITY_DEXTERITY,nModify); | ||||
|                 effect eCon = EffectAbilityIncrease(ABILITY_CONSTITUTION,nModify); | ||||
|  | ||||
|                 //Signal the spell cast at event | ||||
|                 SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); | ||||
|  | ||||
|                 //Link major effects | ||||
|                 effect eLink = EffectLinkEffects(eStr, eDex); | ||||
|                 eLink = EffectLinkEffects(eLink, eCon); | ||||
|                 eLink = EffectLinkEffects(eLink, eDur); | ||||
|  | ||||
|                 // * Making extraodinary so cannot be dispelled (optional) | ||||
|                 eLink = ExtraordinaryEffect(eLink); | ||||
|  | ||||
|                 SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); | ||||
|                 SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF)); | ||||
|             } | ||||
|             oTarget = GetNextObjectInShape(SHAPE_SPHERE, 10.0, | ||||
|                 PRCGetSpellTargetLocation()); | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										52
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_hercuemp.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_hercuemp.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,52 @@ | ||||
| ///////////////////////////////////////////////// | ||||
| // Herculean Empowerment | ||||
| //----------------------------------------------- | ||||
| // Created By: Nron Ksr | ||||
| // Created On: 03/06/2004 | ||||
| // Description: This script changes someone's ability scores | ||||
| ///////////////////////////////////////////////// | ||||
|  | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_HERCEMP)) | ||||
|     { | ||||
|         //Declare major variables | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         int nCasterLvl = GetTotalCastingLevel(OBJECT_SELF); // Boneshank - changed. | ||||
|         int nModify = d4() + 5; | ||||
|         float fDuration = HoursToSeconds(nCasterLvl); | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); | ||||
|         effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH,nModify); | ||||
|         effect eDex = EffectAbilityIncrease(ABILITY_DEXTERITY,nModify); | ||||
|         effect eCon = EffectAbilityIncrease(ABILITY_CONSTITUTION,nModify); | ||||
|  | ||||
|         //Signal the spell cast at event | ||||
|         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); | ||||
|  | ||||
|         //Link major effects | ||||
|         effect eLink = EffectLinkEffects(eStr, eDex); | ||||
|         eLink = EffectLinkEffects(eLink, eCon); | ||||
|         eLink = EffectLinkEffects(eLink, eDur); | ||||
|  | ||||
|         // * Making extraodinary so cannot be dispelled (optional) | ||||
|         eLink = ExtraordinaryEffect(eLink); | ||||
|  | ||||
|         SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); | ||||
|         SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF)); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										64
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_impenetrab.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_impenetrab.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,64 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_impenetrab" | ||||
| /*   Purpose: Impenetrability - grants 100% protection against piercing | ||||
|         damage for 24 hours. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ABJURATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_IMPENET)) | ||||
|     { | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         int nCasterLvl = GetTotalCastingLevel(OBJECT_SELF); | ||||
|         int nDuration = nCasterLvl + 10; | ||||
|         float fDuration = RoundsToSeconds(nDuration); | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_AC_BONUS); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_GLOW_PURPLE); | ||||
|         effect eProt = EffectDamageImmunityIncrease(DAMAGE_TYPE_PIERCING, 50); | ||||
|         if(GetPRCSwitch(PRC_PNP_IMPENETRABILITY)) | ||||
|         { | ||||
|             eProt = EffectDamageImmunityIncrease | ||||
|                 (DAMAGE_TYPE_PIERCING, 100); | ||||
|             fDuration = HoursToSeconds(20); | ||||
|         }             | ||||
|         effect eLink = EffectLinkEffects(eProt, eDur); | ||||
|         // if this option has been enabled, the caster will take backlash damage | ||||
|         if (GetPRCSwitch(PRC_EPIC_BACKLASH_DAMAGE) == TRUE) | ||||
|         { | ||||
|             int nDamage = d6(10); | ||||
|             effect eDamVis = EffectVisualEffect(VFX_IMP_SONIC); | ||||
|             effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL); | ||||
|             DelayCommand(2.0, SPApplyEffectToObject(DURATION_TYPE_INSTANT, | ||||
|                 eDamVis, OBJECT_SELF)); | ||||
|             DelayCommand(2.0, SPApplyEffectToObject(DURATION_TYPE_INSTANT, | ||||
|                 eDam, OBJECT_SELF)); | ||||
|         } | ||||
|         if(GetIsReactionTypeFriendly(oTarget) || GetFactionEqual(oTarget)) | ||||
|         { | ||||
|             //Fire spell cast at event for target | ||||
|             SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), | ||||
|                 FALSE)); | ||||
|             SPApplyEffectToObject(DURATION_TYPE_INSTANT, | ||||
|                 eVis, oTarget); | ||||
|             SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, | ||||
|                 eLink, oTarget, fDuration, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF)); | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										51
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_killwnd.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_killwnd.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | ||||
| ///////////////////////////////////////////////// | ||||
| // Tolodine's Killing Wind | ||||
| //----------------------------------------------- | ||||
| // Created By: Nron Ksr | ||||
| // Created On: 03/07/2004 | ||||
| // Description: This script causes an AOE Death Spell for 10 rnds. | ||||
| // Fort. save -4 to resist | ||||
| ///////////////////////////////////////////////// | ||||
| // Last Updated: 03/16/2004, Nron Ksr | ||||
| ///////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_NECROMANCY); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_TOLO_KW)) | ||||
|     { | ||||
|         //Declare variables | ||||
|         int nCasterLevel = GetTotalCastingLevel(OBJECT_SELF); | ||||
|         int nToAffect = nCasterLevel; | ||||
|         location lTarget = PRCGetSpellTargetLocation(); | ||||
|  | ||||
|         // Visual effect creations | ||||
|         effect eImpact = EffectVisualEffect( 262 ); | ||||
|         effect eImpact2 = EffectVisualEffect( VFX_FNF_GAS_EXPLOSION_MIND ); | ||||
|         effect eImpact3 = EffectVisualEffect( VFX_FNF_HOWL_WAR_CRY ); | ||||
|         effect eImpact4 = EffectVisualEffect( VFX_FNF_SOUND_BURST ); | ||||
|  | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact, lTarget ); | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact2, lTarget ); | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact3, lTarget ); | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact4, lTarget ); | ||||
|  | ||||
|         effect eAOE = EffectAreaOfEffect | ||||
|             ( AOE_PER_FOG_OF_BEWILDERMENT, "tm_s0_epkillwnda", "tm_s0_epkillwndb", "****" ); | ||||
|  | ||||
|         //Create an instance of the AOE Object | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_TEMPORARY, eAOE, lTarget, RoundsToSeconds(10) ); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										54
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_leech.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_leech.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,54 @@ | ||||
| ///////////////////////////////////////////////// | ||||
| // Leech Field | ||||
| // tm_s0_epleech.nss | ||||
| //----------------------------------------------- | ||||
| // Created By: Nron Ksr | ||||
| // Created On: 03/12/2004 | ||||
| // Description: An AoE that saps the life of those in the | ||||
| // field and transfers it to the caster. | ||||
| ///////////////////////////////////////////////// | ||||
| // Last Updated: 03/16/2004, Nron Ksr | ||||
| ///////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_NECROMANCY); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_LEECH_F)) | ||||
|     { | ||||
|  | ||||
|         //Declare variables | ||||
|         int nCasterLevel = GetTotalCastingLevel(OBJECT_SELF); | ||||
|         int nToAffect = nCasterLevel; | ||||
|         location lTarget = PRCGetSpellTargetLocation(); | ||||
|  | ||||
|         // Visual effect creations | ||||
|         effect eImpact = EffectVisualEffect( VFX_FNF_GAS_EXPLOSION_EVIL ); | ||||
|         effect eImpact2 = EffectVisualEffect( VFX_FNF_LOS_EVIL_30 ); | ||||
|         effect eImpact3 = EffectVisualEffect( VFX_FNF_SUMMON_UNDEAD ); | ||||
|  | ||||
|         // Linking visuals | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact, lTarget ); | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact2, lTarget ); | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact3, lTarget ); | ||||
|  | ||||
|         effect eAOE = EffectAreaOfEffect | ||||
|             ( AOE_PER_EVARDS_BLACK_TENTACLES, | ||||
|                 "tm_s0_epleecha", "tm_s0_epleechb", "****" ); | ||||
|  | ||||
|         //Create an instance of the AOE Object | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_TEMPORARY, eAOE, | ||||
|             lTarget, RoundsToSeconds(nCasterLevel) ); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										55
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_mage_arm.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_mage_arm.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Epic Mage Armor | ||||
| //:: X2_S2_EpMageArm | ||||
| //:: Copyright (c) 2001 Bioware Corp. | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Gives the target +20 AC Bonus to Deflection, | ||||
|     Armor Enchantment, Natural Armor and Dodge. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Andrew Nobbs | ||||
| //:: Created On: Feb 07, 2003 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| /* | ||||
|     Altered by Boneshank, for purposes of the Epic Spellcasting project. | ||||
| */ | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_EP_M_AR)) | ||||
|     { | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         int nDuration = GetTotalCastingLevel(OBJECT_SELF); | ||||
|         effect eVis = EffectVisualEffect(495); | ||||
|         effect eAC; | ||||
|         //Fire cast spell at event for the specified target | ||||
|         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); | ||||
|  | ||||
|         //Set the four unique armor bonuses | ||||
|         eAC = EffectACIncrease(20, AC_ARMOUR_ENCHANTMENT_BONUS); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_SANCTUARY); | ||||
|  | ||||
|         PRCRemoveEffectsFromSpell(oTarget, GetSpellId()); | ||||
|  | ||||
|         // * Brent, Nov 24, making extraodinary so cannot be dispelled | ||||
|         eAC = ExtraordinaryEffect(eAC); | ||||
|  | ||||
|         //Apply the armor bonuses and the VFX impact | ||||
|         SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAC, oTarget, HoursToSeconds(nDuration), TRUE, -1, GetTotalCastingLevel(OBJECT_SELF)); | ||||
|         SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget,1.0, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF)); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										93
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_magmabu.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_magmabu.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,93 @@ | ||||
| ///////////////////////////////////////////////// | ||||
| // Magma Burst | ||||
| // tm_s0_epMagmaBu.nss | ||||
| //----------------------------------------------- | ||||
| // Created By: Nron Ksr | ||||
| // Created On: 03/12/2004 | ||||
| // Description: Initial explosion (20d8) reflex save, then AoE of lava (10d8), | ||||
| // fort save.  If more then 5 rnds in the cloud cumulative, you turn to stone | ||||
| // as the lava hardens (fort save). | ||||
| ///////////////////////////////////////////////// | ||||
| // Last Updated: 03/16/2004, Nron Ksr | ||||
| ///////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION); | ||||
|  | ||||
|     // Spell Cast Hook | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_MAGMA_B)) | ||||
|     { | ||||
|         // Declare major variables | ||||
|         object oCaster = OBJECT_SELF; | ||||
|         object oTarget; | ||||
|         // Boneshank - Added in the nDC formula. | ||||
|          float fDelay; | ||||
|         int nDamage; | ||||
|         int nCasterLvl = GetTotalCastingLevel(OBJECT_SELF); | ||||
|         effect eAOE = EffectAreaOfEffect | ||||
|             ( AOE_PER_FOGFIRE, "tm_s0_epmagmabua", "tm_s0_epmagmabub", "tm_s0_epmagmabuc" ); | ||||
|         location lTarget = PRCGetSpellTargetLocation(); | ||||
|         int nDuration = GetTotalCastingLevel(OBJECT_SELF) / 5; //B- changed. | ||||
|         effect eImpact = EffectVisualEffect( VFX_FNF_GAS_EXPLOSION_FIRE ); | ||||
|         effect eImpact2 = EffectVisualEffect( VFX_FNF_IMPLOSION ); | ||||
|         effect eImpact3 = EffectVisualEffect( VFX_FNF_STRIKE_HOLY ); | ||||
|         effect eImpact4 = EffectVisualEffect( VFX_FNF_FIRESTORM ); | ||||
|         effect eVis = EffectVisualEffect( VFX_IMP_FLAME_M ); | ||||
|         effect eDam; | ||||
|         // Direct Impact is handled first.  (20d8) - reflex. | ||||
|         // Apply the explosion at the location captured above. | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact, lTarget ); | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact2, lTarget ); | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact3, lTarget ); | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact4, lTarget ); | ||||
|  | ||||
|         // Declare the spell shape, size and the location.  Capture the first target . | ||||
|         oTarget = GetFirstObjectInShape | ||||
|             ( SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE ); | ||||
|         // Cycle through the targets within the spell shape until an invalid object is captured. | ||||
|         while( GetIsObjectValid(oTarget) ) | ||||
|         { | ||||
|             if( spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) ) | ||||
|             { | ||||
|                 //Fire cast spell at event for the specified target | ||||
|                 SignalEvent( oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FIREBALL) ); | ||||
|                 // Set the delay for the explosion. | ||||
|                 fDelay = PRCGetRandomDelay( 0.5f, 2.0f ); | ||||
|                 if( !PRCDoResistSpell(OBJECT_SELF, oTarget, GetTotalCastingLevel(OBJECT_SELF)+SPGetPenetr(OBJECT_SELF), fDelay) ) | ||||
|                 { | ||||
|                     nDamage = d8(20); | ||||
|                     //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. | ||||
|                     nDamage = PRCGetReflexAdjustedDamage( nDamage, oTarget, GetEpicSpellSaveDC(OBJECT_SELF, oTarget), SAVING_THROW_TYPE_FIRE ); | ||||
|                     //Set the damage effect | ||||
|                     eDam = EffectDamage( nDamage, DAMAGE_TYPE_FIRE ); | ||||
|                     if( nDamage > 0 ) | ||||
|                     { | ||||
|                         // Apply effects to the currently selected target (dmg & visual) | ||||
|                         DelayCommand( fDelay, | ||||
|                             SPApplyEffectToObject( DURATION_TYPE_INSTANT, eDam, oTarget) ); | ||||
|                         DelayCommand( fDelay, | ||||
|                             SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget) ); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|             //Select the next target within the spell shape. | ||||
|             oTarget = GetNextObjectInShape | ||||
|                 ( SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE ); | ||||
|         } | ||||
|  | ||||
|         //Create the AoE object at the location for the next effects | ||||
|         ApplyEffectAtLocation( DURATION_TYPE_TEMPORARY, eAOE, lTarget, RoundsToSeconds(nDuration) ); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										99
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_maspenguin.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										99
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_maspenguin.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,99 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_maspenguin" | ||||
| /*   Purpose: Mass Penguin - turns all creatures in the target area into | ||||
|         penguins! | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "pnp_shft_poly" | ||||
| #include "inc_epicspells" | ||||
| #include "prc_compan_inc" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_MASSPEN)) | ||||
|     { | ||||
|         float fDelay; | ||||
|         int nDuration = 20; | ||||
|  | ||||
|         effect eExplode = EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION); | ||||
|         effect eDuration = EffectVisualEffect(VFX_DUR_PIXIEDUST); | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH); | ||||
|         effect ePolymorph = EffectPolymorph(POLYMORPH_TYPE_PENGUIN, TRUE); | ||||
|         effect eLink = EffectLinkEffects(eDuration, ePolymorph); | ||||
|         location lTarget = PRCGetSpellTargetLocation(); | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eDuration, | ||||
|             lTarget, 10.0); | ||||
|         object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, | ||||
|             RADIUS_SIZE_LARGE, lTarget); | ||||
|         // Cycle through the targets within the spell shape | ||||
|         //      until an invalid object is captured. | ||||
|         while (GetIsObjectValid(oTarget)) | ||||
|         { | ||||
|             if (oTarget != OBJECT_SELF) | ||||
|             { | ||||
|                 //Fire cast spell at event for the specified target | ||||
|                 SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, | ||||
|                     PRCGetSpellId())); | ||||
|                 fDelay = PRCGetRandomDelay(1.5, 2.5); | ||||
|                 if(!PRCDoResistSpell(OBJECT_SELF, oTarget, GetTotalCastingLevel(OBJECT_SELF)+SPGetPenetr(OBJECT_SELF), fDelay) && PRCGetIsAliveCreature(oTarget)) | ||||
|                 { | ||||
|                     if(PRCGetCreatureSize(oTarget) == CREATURE_SIZE_TINY || | ||||
|                         PRCGetCreatureSize(oTarget) == CREATURE_SIZE_SMALL || | ||||
|                         PRCGetCreatureSize(oTarget) == CREATURE_SIZE_MEDIUM) | ||||
|                     { | ||||
|  | ||||
|                         // Targets all get a Fortitude saving throw | ||||
|                         if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(OBJECT_SELF, oTarget), | ||||
|                             SAVING_THROW_TYPE_SPELL, OBJECT_SELF, fDelay)) | ||||
|                         { | ||||
|                             //this command will make shore that polymorph plays nice with the shifter | ||||
|                             ShifterCheck(oTarget); | ||||
|                             //companion has multi-sized penguins :) | ||||
|                             if(GetPRCSwitch(MARKER_PRC_COMPANION)) | ||||
|                             { | ||||
|                                 int nRandom = d100(); | ||||
|                                 if(nRandom < 25) | ||||
|                                     ePolymorph = EffectPolymorph(POLYMORPH_TYPE_PENGUIN, TRUE); | ||||
|                                 else if(nRandom < 40) | ||||
|                                     ePolymorph = EffectPolymorph(PRC_COMP_POLYMORPH_TYPE_PENGUIN_150, TRUE); | ||||
|                                 else if(nRandom < 55) | ||||
|                                     ePolymorph = EffectPolymorph(PRC_COMP_POLYMORPH_TYPE_PENGUIN_200, TRUE); | ||||
|                                 else if(nRandom < 70) | ||||
|                                     ePolymorph = EffectPolymorph(PRC_COMP_POLYMORPH_TYPE_PENGUIN_300, TRUE); | ||||
|                                 else if(nRandom < 85) | ||||
|                                     ePolymorph = EffectPolymorph(PRC_COMP_POLYMORPH_TYPE_PENGUIN_400, TRUE); | ||||
|                                 else | ||||
|                                     ePolymorph = EffectPolymorph(PRC_COMP_POLYMORPH_TYPE_PENGUIN_500, TRUE);     | ||||
|                                 eLink = EffectLinkEffects(eDuration, ePolymorph); | ||||
|                             } | ||||
|                              | ||||
|                             // Apply effects to the currently selected target. | ||||
|                             DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                                 (DURATION_TYPE_TEMPORARY, eLink, oTarget, | ||||
|                                 HoursToSeconds(nDuration), TRUE, -1, GetTotalCastingLevel(OBJECT_SELF))); | ||||
|                             DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                                 (DURATION_TYPE_INSTANT, eVis, oTarget)); | ||||
|                         } | ||||
|                     } | ||||
|                  } | ||||
|             } | ||||
|            //Select the next target within the spell shape. | ||||
|            oTarget = GetNextObjectInShape(SHAPE_SPHERE, | ||||
|                 RADIUS_SIZE_LARGE, lTarget); | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										59
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_mom_mori.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_mom_mori.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,59 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Epic Spell: Momento Mori | ||||
| //:: Author: Boneshank (Don Armstrong) | ||||
|  | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_NECROMANCY); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_MORI)) | ||||
|     { | ||||
|         //Declare major variables | ||||
|         object oTarget = PRCGetSpellTargetObject(); | ||||
|         int nDamage; | ||||
|         effect eDam; | ||||
|         effect eVis = EffectVisualEffect(VFX_IMP_DEATH_L); | ||||
|         effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); | ||||
|         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId())); | ||||
|         if (GetObjectType(oTarget) == OBJECT_TYPE_CREATURE && | ||||
|             GetHitDice(oTarget) < 50 && oTarget != OBJECT_SELF) | ||||
|         { | ||||
|             //Make SR check | ||||
|             if (!PRCDoResistSpell(OBJECT_SELF, oTarget, GetTotalCastingLevel(OBJECT_SELF)+SPGetPenetr(OBJECT_SELF))) | ||||
|                { | ||||
|                  //Make Fortitude save | ||||
|                  if (!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(OBJECT_SELF, oTarget)+10, SAVING_THROW_TYPE_DEATH)) | ||||
|                  { | ||||
|                     DeathlessFrenzyCheck(oTarget); | ||||
|                     //Apply the death effect and VFX impact | ||||
|                     SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget); | ||||
|                     //SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); | ||||
|                  } | ||||
|                  else | ||||
|                  { | ||||
|                     //Roll damage | ||||
|                     nDamage = d6(3) + 20; | ||||
| 				if (GetHasMettle(oTarget, SAVING_THROW_FORT)) | ||||
| 				// This script does nothing if it has Mettle, bail | ||||
| 					nDamage = 0;                        | ||||
|                     //Set damage effect | ||||
|                     eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); | ||||
|                     //Apply damage effect and VFX impact | ||||
|                     SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); | ||||
|                     SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         else SendMessageToPC(OBJECT_SELF, "Spell failure - the target was not valid."); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										41
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_mumdust.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_mumdust.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,41 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Mummy Dust | ||||
| //:: X2_S2_MumDust | ||||
| //:: Copyright (c) 2001 Bioware Corp. | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|      Summons a strong warrior mummy for you to | ||||
|      command. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Andrew Nobbs | ||||
| //:: Created On: Feb 07, 2003 | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Altered by Boneshank, for purposes of the Epic Spellcasting project. | ||||
| */ | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_NECROMANCY); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_MUMDUST)) | ||||
|     { | ||||
|         effect eSummon; | ||||
|         eSummon = EffectSummonCreature("X2_S_MUMMYWARR",496,1.0f); | ||||
|         eSummon = ExtraordinaryEffect(eSummon); | ||||
|         //Apply the summon visual and summon the undead. | ||||
|         MultisummonPreSummon(); | ||||
|         ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eSummon, PRCGetSpellTargetLocation()); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
|  | ||||
							
								
								
									
										49
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_nailedsky.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_nailedsky.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,49 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_nailedsky" | ||||
| /*   Purpose: Nailed to the Sky - the target, if it fails its Will save, is | ||||
|         thrust into the sky, where it dies in a vacuum | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 11, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| // Fixed by Strat because Boneshank was a bloody idiot | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
| #include "prc_inc_teleport" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     object oTarget = PRCGetSpellTargetObject(); | ||||
|         if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_NAILSKY)) | ||||
|         { | ||||
|             //Declare major variables | ||||
|             SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId())); | ||||
|  | ||||
|             // Teleportation spell, so can be prevented by teleportation blocking effects | ||||
|             if(GetCanTeleport(oTarget, GetLocation(oTarget), FALSE, TRUE, TRUE)) | ||||
|             { | ||||
| 			    if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(OBJECT_SELF, oTarget)) && !GetIsDead(oTarget)) | ||||
| 			    { | ||||
| 					SPApplyEffectToObject(DURATION_TYPE_INSTANT, SupernaturalEffect(EffectDeath(TRUE)), oTarget);            | ||||
| 					SPApplyEffectToObject(DURATION_TYPE_INSTANT, SupernaturalEffect(EffectDamage(9999)), oTarget);   | ||||
| 					SPApplyEffectToObject(DURATION_TYPE_INSTANT, SupernaturalEffect(EffectDamage(9999)), oTarget);   | ||||
| 					SPApplyEffectToObject(DURATION_TYPE_INSTANT, SupernaturalEffect(EffectDamage(9999)), oTarget);   | ||||
| 					SPApplyEffectToObject(DURATION_TYPE_INSTANT, SupernaturalEffect(EffectDamage(9999)), oTarget);   | ||||
| 				}	 | ||||
| 			} | ||||
|         } | ||||
|  | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
							
								
								
									
										82
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_orderresto.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										82
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_orderresto.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,82 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_orderresto" | ||||
| /*   Purpose: Order Restored - all unlawful targets are stunned, and all | ||||
|         lawful targets get 5 attacks per round and +10 saves vs. chaos. | ||||
|      Unlawful casters have alignment shift to law by d10, and spell fails. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
| #include "prc_alterations" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ENCHANTMENT); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_ORDER_R)) | ||||
|     { | ||||
|         int nCasterLevel = GetTotalCastingLevel(OBJECT_SELF); | ||||
|  | ||||
|         float fDuration = RoundsToSeconds(20); | ||||
|         effect eVis = EffectVisualEffect(VFX_FNF_HOWL_ODD); | ||||
|         effect eStun = EffectStunned(); | ||||
|         effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); | ||||
|         effect eAtt = EffectModifyAttacks(5); | ||||
|         effect eST = EffectSavingThrowIncrease(SAVING_THROW_ALL, 10, | ||||
|             SAVING_THROW_TYPE_CHAOS); | ||||
|         effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); | ||||
|         effect eLink = EffectLinkEffects(eVis, eStun); | ||||
|         eLink = EffectLinkEffects(eLink, eDur); | ||||
|         effect eLink2 = EffectLinkEffects(eAtt, eVis); | ||||
|         eLink2 = EffectLinkEffects(eLink2, eDur2); | ||||
|         eLink2 = EffectLinkEffects(eLink2, eST); | ||||
|         float fDelay; | ||||
|         // Lawful casters cast normally. All others go to ELSE. | ||||
|         if (GetAlignmentLawChaos(OBJECT_SELF) == ALIGNMENT_LAWFUL) | ||||
|         { | ||||
|             object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, | ||||
|                 RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), TRUE); | ||||
|             while(GetIsObjectValid(oTarget)) | ||||
|             { | ||||
|                 fDelay = PRCGetRandomDelay(); | ||||
|                 if (GetAlignmentLawChaos(oTarget) != ALIGNMENT_LAWFUL) | ||||
|                 { | ||||
|                     SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, | ||||
|                         SPELL_CONFUSION)); | ||||
|                     if(!PRCDoResistSpell(OBJECT_SELF, oTarget, GetTotalCastingLevel(OBJECT_SELF)+SPGetPenetr(OBJECT_SELF), fDelay)) | ||||
|                     { | ||||
|                         if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(OBJECT_SELF, oTarget), | ||||
|                             SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay)) | ||||
|                         { | ||||
|                             DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                                 (DURATION_TYPE_TEMPORARY, eLink, oTarget, | ||||
|                                 fDuration, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF))); | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|                 else | ||||
|                     DelayCommand(fDelay, SPApplyEffectToObject | ||||
|                         (DURATION_TYPE_TEMPORARY, eLink2, oTarget, fDuration)); | ||||
|  | ||||
|                 oTarget = GetNextObjectInShape(SHAPE_SPHERE, | ||||
|                     RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), TRUE); | ||||
|             } | ||||
|         } | ||||
|         else // An unlawful caster will sway towards law on a casting. | ||||
|         { | ||||
|             FloatingTextStringOnCreature("*Spell fails. You are not lawful*", | ||||
|                 OBJECT_SELF, FALSE); | ||||
|             AdjustAlignment(OBJECT_SELF, ALIGNMENT_LAWFUL, d10(), FALSE); | ||||
|         } | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
|  | ||||
							
								
								
									
										42
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_pathsknown.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								nwn/nwnprc/trunk/epicspellscripts/ss_ep_pathsknown.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,42 @@ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: FileName: "ss_ep_pathsknown" | ||||
| /*   Purpose: Paths Become Known - Explores the area and reveals the entire map | ||||
|         for the area the caster is currently in. As well, the caster gains a | ||||
|         bonus of +50 to both Spot and Search skills, but only for 30 seconds! | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Boneshank | ||||
| //:: Last Updated On: March 12, 2004 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "prc_alterations" | ||||
| //#include "x2_inc_spellhook" | ||||
| #include "inc_epicspells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|     SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_DIVINATION); | ||||
|  | ||||
|     if (!X2PreSpellCastCode()) | ||||
|     { | ||||
|         DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
|         return; | ||||
|     } | ||||
|     if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_PATHS_B)) | ||||
|     { | ||||
|         object oArea = GetArea(OBJECT_SELF); | ||||
|         effect eVis = EffectVisualEffect(VFX_DUR_ULTRAVISION); | ||||
|         effect eVis2 = EffectVisualEffect(VFX_IMP_HEAD_MIND); | ||||
|         effect eSkill = EffectSkillIncrease(SKILL_SEARCH, 50); | ||||
|         effect eSkill2 = EffectSkillIncrease(SKILL_SPOT, 50); | ||||
|         effect eLink = EffectLinkEffects(eVis, eSkill); | ||||
|         eLink = EffectLinkEffects(eLink, eSkill2); | ||||
|         DelayCommand(1.5, SPApplyEffectToObject(DURATION_TYPE_INSTANT, | ||||
|             eVis2, OBJECT_SELF)); | ||||
|         DelayCommand(1.5, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, | ||||
|             eLink, OBJECT_SELF, 30.0, TRUE, -1, GetTotalCastingLevel(OBJECT_SELF))); | ||||
|         DelayCommand(6.0, ExploreAreaForPlayer(oArea, OBJECT_SELF)); | ||||
|     } | ||||
|     DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); | ||||
| } | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user