Spell & Ability Upgrade

Reorganized hak files & removed duplicates.  Added @rafhot's PRC spell & ability level scaling expansion.  Further script integration.  Full compile.
This commit is contained in:
Jaysyn904
2023-08-19 21:08:35 -04:00
parent a911002fe6
commit 7dd83ad168
1466 changed files with 4010 additions and 21168 deletions

View File

@@ -18,9 +18,7 @@ the X2_ITEM_EVENT_ACTIVATE: script code will run.
*/
////////////////////////////////////////
#include "x2_inc_switches"
//Required Include For Color Messages(Read include to learn more)
#include "gen_inc_color"
#include "prc_inc_spells"
//Main Script
void main()
@@ -99,10 +97,10 @@ void main()
// * and it hits a target(if it is a weapon) or is being hit (if it is a piece of armor)
// * Note that this event fires for non PC creatures as well.
oItem = GetSpellCastItem(); // The item triggering this spellscript
oItem = PRCGetSpellCastItem(); // The item triggering this spellscript
oPC = OBJECT_SELF; // The player triggering it
oSpellOrigin = OBJECT_SELF ; // Where the spell came from
oSpellTarget = GetSpellTargetObject(); // What the spell is aimed at
oSpellTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
//Your code goes here
@@ -201,7 +199,7 @@ void main()
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants

View File

@@ -1,10 +1,12 @@
#include "prc_inc_spells"
void ExplodeAtLocation(location lTarget, int nDamage, int nSaveDC = 15, float fRadius = 5.) {
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIREBALL), lTarget);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), lTarget);
object oObject = GetFirstObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
do {
int nDamageAfterSave = GetReflexAdjustedDamage(nDamage, oObject, nSaveDC);
int nDamageAfterSave = PRCGetReflexAdjustedDamage(nDamage, oObject, nSaveDC);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamageAfterSave, DAMAGE_TYPE_FIRE), oObject);
} while ((oObject = GetNextObjectInShape(SHAPE_SPHERE, fRadius, lTarget)) != OBJECT_INVALID); }

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -31,6 +31,7 @@ NOTE: This is the fastest way to use color in text messages..
////////////////////////////////////////
//Required Include (Read include to learn more)
#include "gen_inc_color"
#include "inc_utility"
void main()
{

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -25,7 +25,7 @@
//////////////////////////////////////////////////
#include "dm_forge_config"
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//::///////////////////////////////////////////////////////////////
//:: Do not alter ANYTHING within this include.

View File

@@ -22,7 +22,7 @@
//////////////////////////////////////////////////
#include "dm_inc_forge"
//#include "x2_inc_itemprop" wrapped in with dm_inc_forge
//#include "prc_x2_itemprop" wrapped in with dm_inc_forge
//::///////////////////////////////////////////////////////////////
//:: Do not alter ANYTHING within this include.

View File

@@ -1,4 +1,4 @@
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
int StartingConditional()
{

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -18,6 +18,7 @@ the X2_ITEM_EVENT_ACTIVATE: script code will run.
*/
////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
//Main Script
void main()
@@ -62,10 +63,10 @@ void main()
// * and it hits a target(if it is a weapon) or is being hit (if it is a piece of armor)
// * Note that this event fires for non PC creatures as well.
oItem = GetSpellCastItem(); // The item triggering this spellscript
oItem = PRCGetSpellCastItem(); // The item triggering this spellscript
oPC = OBJECT_SELF; // The player triggering it
oSpellOrigin = OBJECT_SELF ; // Where the spell came from
oSpellTarget = GetSpellTargetObject(); // What the spell is aimed at
oSpellTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
//Your code goes here
@@ -157,7 +158,7 @@ GetItemPossessedBy(oPC, "dreamweaver23"), INVENTORY_SLOT_RIGHTHAND)));
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,5 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +24,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,5 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +24,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -45,7 +45,7 @@ void main()
If the spell allows a save usually scripted like so:
GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_FIRE);
PRCGetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_FIRE);
if(MySavingThrow(SAVING_THROW_FORT, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay))
etc.
@@ -54,7 +54,7 @@ you can add an epic DC Bonus by replacing GetSpellSaveDC() with:
GetEpicSpellSaveDC()
like so...
GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE);
PRCGetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE);
IMPORTANT: Save the spell & build the module (scripts only!), then save module!
NOTE: you are not modifying the original, but your module will use the edited
@@ -70,7 +70,7 @@ cache this script or the spellfunc_inc script either.
(DO NOT TOUCH ANYTHING BELOW OR THIS LINE!) */
//////////////////////////////////////////////////////////////////////////////
#include "prc_inc_spells"
//////Protoype (Defined)//////////
int GetEpicSpellSaveDC()
{

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -15,8 +15,9 @@
//:: The players and DMs of Higher Ground for their input and playtesting :://
//::////////////////////////////////////////////////////////////////////////:://
#include "fky_chat_inc"
#include "prc_inc_util"
void main ()
{
object oDMPC = OBJECT_SELF;
@@ -973,7 +974,7 @@ void main ()
{
oDMTarget = VerifyTarget(oDMTarget, oDMPC, sUppercase, OBJECT_TARGET, FALSE);
if (!GetIsObjectValid(oDMTarget)) return;
if ((!VerifyDMKey(oDMTarget)) && (!VerifyAdminKey(oDMTarget)) || (oDMTarget == oDMPC)) ForceRest(oDMTarget);
if ((!VerifyDMKey(oDMTarget)) && (!VerifyAdminKey(oDMTarget)) || (oDMTarget == oDMPC)) PRCForceRest(oDMTarget);
else FloatingTextStringOnCreature(COLOR_RED+NO_OTHER_DM_TARGET+COLOR_END, oDMPC, FALSE);
}
else if (GetStringLeft(sDMText, 3) == "res") CommandRedirect(oDMPC, 15);

View File

@@ -14,7 +14,7 @@
//:: Lanessar and the players of the Myth Drannor PW - for the new languages:://
//:: The players and DMs of Higher Ground for their input and playtesting :://
//::////////////////////////////////////////////////////////////////////////:://
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
#include "fky_chat_const"
#include "fky_chat_config"
//Boots the PC ONLY if they are still valid, preventing crashes.

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//PROTOTYPE DECLARED
int GetBonusCount(object oItem);

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ to the item, if it's actually in the
slot they chose.
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ which an item the PC possessoses has
in it..
*/
////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//Main Script

View File

@@ -11,7 +11,7 @@ scan items the PC is utilizing and then remove any
unwanted properties...
----------------------------------------------------------*/
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
///////////////////////////////////////////////////////////////////////

View File

@@ -1,4 +1,5 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +24,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,5 +1,7 @@
#include "gen_inc_color"
#include "inc_utility"
void main()
{
// examples sent to pc

View File

@@ -30,10 +30,10 @@
*/
// issues? contact genji@thegenji.com
// special thanks to ADAL-Miko and Rich Dersheimer in the bio forums.
string GetRGB(int red = 15,int green = 15,int blue = 15);
string G_GetRGB(int red = 15,int green = 15,int blue = 15);
// --------------------------------------------------------------[ function implementations ]
string GetRGB(int red = 15,int green = 15,int blue = 15)
string G_GetRGB(int red = 15,int green = 15,int blue = 15)
{
object coloringBook = GetObjectByTag("ColoringBook");
if (coloringBook == OBJECT_INVALID)

View File

@@ -14,6 +14,7 @@
*/
////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
//Main Script
void main()
@@ -61,10 +62,10 @@ void main()
// * and it hits a target(if it is a weapon) or is being hit (if it is a piece of armor)
// * Note that this event fires for non PC creatures as well.
oItem = GetSpellCastItem(); // The item triggering this spellscript
oItem = PRCGetSpellCastItem(); // The item triggering this spellscript
oPC = OBJECT_SELF; // The player triggering it
oSpellOrigin = OBJECT_SELF ; // Where the spell came from
oSpellTarget = GetSpellTargetObject(); // What the spell is aimed at
oSpellTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
//Your code goes here
@@ -305,7 +306,7 @@ void main()
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -18,6 +18,7 @@ the X2_ITEM_EVENT_ACTIVATE: script code will run.
*/
////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
//Main Script
void main()
@@ -62,10 +63,10 @@ void main()
// * and it hits a target(if it is a weapon) or is being hit (if it is a piece of armor)
// * Note that this event fires for non PC creatures as well.
oItem = GetSpellCastItem(); // The item triggering this spellscript
oItem = PRCGetSpellCastItem(); // The item triggering this spellscript
oPC = OBJECT_SELF; // The player triggering it
oSpellOrigin = OBJECT_SELF ; // Where the spell came from
oSpellTarget = GetSpellTargetObject(); // What the spell is aimed at
oSpellTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
//Your code goes here
@@ -171,7 +172,7 @@ void main()
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants

View File

@@ -18,6 +18,7 @@ the X2_ITEM_EVENT_ACTIVATE: script code will run.
*/
////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
//Main Script
void main()
@@ -62,10 +63,10 @@ void main()
// * and it hits a target(if it is a weapon) or is being hit (if it is a piece of armor)
// * Note that this event fires for non PC creatures as well.
oItem = GetSpellCastItem(); // The item triggering this spellscript
oItem = PRCGetSpellCastItem(); // The item triggering this spellscript
oPC = OBJECT_SELF; // The player triggering it
oSpellOrigin = OBJECT_SELF ; // Where the spell came from
oSpellTarget = GetSpellTargetObject(); // What the spell is aimed at
oSpellTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
//Your code goes here
@@ -178,7 +179,7 @@ void main()
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,5 +1,6 @@
#include "prc_inc_spells"
#include "x2_inc_switches"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -24,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -13,6 +13,7 @@ event script.
//Required Include
#include "x2_inc_switches"
#include "prc_inc_spells"
//Script Main
void main()
@@ -39,7 +40,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -18,6 +18,7 @@ the X2_ITEM_EVENT_ACTIVATE: script code will run.
*/
////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
//Set the 15 below to how many minutes you want the nap to last!
const int NAP_TIME = 15; //Default = 15 Minutes of Nap Time
@@ -67,10 +68,10 @@ void main()
// * and it hits a target(if it is a weapon) or is being hit (if it is a piece of armor)
// * Note that this event fires for non PC creatures as well.
oItem = GetSpellCastItem(); // The item triggering this spellscript
oItem = PRCGetSpellCastItem(); // The item triggering this spellscript
oPC = OBJECT_SELF; // The player triggering it
oSpellOrigin = OBJECT_SELF ; // Where the spell came from
oSpellTarget = GetSpellTargetObject(); // What the spell is aimed at
oSpellTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
//Your code goes here
@@ -172,7 +173,7 @@ void main()
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants

View File

@@ -1,4 +1,6 @@
#include "NW_I0_GENERIC"
#include "prc_inc_spells"
void ExplodeAtLocation(location lTarget, int nDamage, int nSaveDC = 30, float fRadius = 3.0)
{
@@ -7,7 +9,7 @@ ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_BLINDDEA
object oObject = GetFirstObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
do {
int nDamageAfterSave = GetReflexAdjustedDamage(nDamage, oObject, nSaveDC);
int nDamageAfterSave = PRCGetReflexAdjustedDamage(nDamage, oObject, nSaveDC);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamageAfterSave, DAMAGE_TYPE_MAGICAL), oObject);
} while ((oObject = GetNextObjectInShape(SHAPE_SPHERE, fRadius, lTarget)) != OBJECT_INVALID); }
@@ -34,6 +36,7 @@ DelayCommand(0.5, ExplodeAtLocation(lSource, d12(6)+25));
{
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
}
ExecuteScript("prc_npc_death", OBJECT_SELF);
float BaseEXP = ((GetChallengeRating(OBJECT_SELF)*3.0)+5);
float BonusEXP = GetChallengeRating(OBJECT_SELF)+5;
float BaseMonEXP = BaseEXP;
@@ -150,5 +153,6 @@ int nHD = GetHitDice(oPartyMember) + 1;
}
oPartyMember = GetNextFactionMember(oKiller, TRUE);
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -1,4 +1,5 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +24,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -61,6 +61,7 @@ Open up the No Casting Area and edit the area to see how it's set up properly.
//Do not delete any of these includes! (They are vital for this script)
#include "x2_inc_switches"
#include "nw_i0_spells"
#include "prc_inc_spells"
//See this script to learn premade functions to use in this script
//Those functions save you time as this script is rather long!
@@ -76,8 +77,8 @@ void main()
int nCastLevel = GetCasterLevel(OBJECT_SELF);
int zInt;
object oCaster = OBJECT_SELF;
object sTarget = GetSpellTargetObject();
object sItem = GetSpellCastItem();
object sTarget = PRCGetSpellTargetObject();
object sItem = PRCGetSpellCastItem();
location sLocation = GetSpellTargetLocation();
int sClass = GetLastSpellCastClass();
@@ -122,7 +123,7 @@ if(GetLocalInt(GetArea(oCaster), "JAIL")==1)
///////////////Handling Spells Cast From Items/////////////////////////////////
//This is what will happen if the spell was cast from an item..
if(GetSpellCastItem()!=OBJECT_INVALID)
if(PRCGetSpellCastItem()!=OBJECT_INVALID)
{
//If the PC uses an item on a PC, and it's one of the following spells
//Then the spell will not work on the PC, note you can add other effects
@@ -153,7 +154,7 @@ switch (nSpell)
//case SPELL_NAME: (Like So)
case SPELL_EPIC_RUIN:
{
if(GetIsPC(GetSpellTargetObject()))
if(GetIsPC(PRCGetSpellTargetObject()))
{
//Don't Cast the original spell
AssignCommand(oCaster, ClearAllActions());
@@ -169,7 +170,7 @@ switch (nSpell)
case SPELL_HARM:
{
if(GetIsPC(GetSpellTargetObject()))
if(GetIsPC(PRCGetSpellTargetObject()))
{
//Don't cast the original spell at all
AssignCommand(oCaster, ClearAllActions());
@@ -179,7 +180,7 @@ switch (nSpell)
case SPELL_DROWN:
{
if(GetIsPC(GetSpellTargetObject()))
if(GetIsPC(PRCGetSpellTargetObject()))
{
//Stop the original spell from running..
AssignCommand(oCaster, ClearAllActions());
@@ -1505,7 +1506,7 @@ switch (nSpell)
case SPELL_BLAHZAM: //Change the SPELL_NAME to the actual spell being cast.
{
//Note if the spell does target damage use this always!
DoBonusDmg(GetSpellTargetObject());
DoBonusDmg(PRCGetSpellTargetObject());
//Do a generic targeted visual (see the "spellfunc_inc" script)
DoTVisual();

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
@@ -23,7 +25,7 @@ OBJECT_SELF); break;
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
ExecuteScript("on_"+GetTag(PRCGetSpellCastItem()),
OBJECT_SELF); break;
}
}

View File

@@ -18,6 +18,7 @@
*/
////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
//Main Script
void main()
@@ -62,10 +63,10 @@ void main()
// * and it hits a target(if it is a weapon) or is being hit (if it is a piece of armor)
// * Note that this event fires for non PC creatures as well.
oItem = GetSpellCastItem(); // The item triggering this spellscript
oItem = PRCGetSpellCastItem(); // The item triggering this spellscript
oPC = OBJECT_SELF; // The player triggering it
oSpellOrigin = OBJECT_SELF ; // Where the spell came from
oSpellTarget = GetSpellTargetObject(); // What the spell is aimed at
oSpellTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
//Your code goes here
@@ -161,7 +162,7 @@ void main()
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants

View File

@@ -1,10 +1,12 @@
#include "prc_inc_spells"
void main()
{
object oPC = GetLastSpellCaster();
if (GetIsDM(oPC)){return;}
if (GetIsPC(oPC) && GetLastSpellHarmful()){
object target = GetSpellTargetObject();
object target = PRCGetSpellTargetObject();
if (GetIsFriend(oPC, target)== TRUE || GetIsNeutral(oPC, target)){
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, JumpToLocation(GetLocation(GetWaypointByTag("prison"))));

View File

@@ -1,48 +0,0 @@
//::///////////////////////////////////////////////
//:: Aura of Blinding On Enter
//:: NW_S1_AuraBlndA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Upon entering the aura of the creature the player
must make a will save or be blinded because of the
sheer ugliness or beauty of the creature.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 25, 2001
//:://////////////////////////////////////////////
//#include "wm_include"
#include "prc_inc_spells"
void main()
{
//:: Declare major variables
object oNPC = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
int nHD = GetHitDice(oNPC);
int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC);
int nDC = 10 +nCHAMod+ (nHD/2);
int nDuration = 1 + (nHD/3);
effect eBlind = EffectBlindness();
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eVis = EffectVisualEffect(VFX_IMP_BLIND_DEAF_M);
effect eLink = EffectLinkEffects(eBlind, eDur);
//if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;}
//Entering object must make a will save or be blinded for the duration.
if(GetIsEnemy(oTarget, GetAreaOfEffectCreator()))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_AURA_BLINDING));
if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC))
{
//Apply the blind effect and the VFX impact
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)));
}
}
}

View File

@@ -1,62 +0,0 @@
//::///////////////////////////////////////////////
//:: Aura of Frost on Heartbeat
//:: NW_S1_AuraColdC.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Prolonged exposure to the aura of the creature
causes frost damage to all within the aura.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 25, 2001
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
//#include "wm_include"
#include "prc_inc_spells"
void main()
{
//:: Declare major variables
object oNPC = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
int nHD = GetHitDice(oNPC);
int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC);
int nFrost = 1 + (nHD/3);
int nDC = 10 +nCHAMod+ (nHD/2);
int nDamage;
effect eDam;
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
//Get the first target in the aura of cold
oTarget = GetFirstInPersistentObject();
while (GetIsObjectValid(oTarget))
{
/* if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget))
{
oTarget = GetNextInPersistentObject(OBJECT_SELF);
continue;
} */
if(GetIsEnemy(oTarget, GetAreaOfEffectCreator()))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_AURA_COLD));
//Roll damage based on the creatures HD
nDamage = d4(nFrost);
//Make a Fortitude save for half
if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_COLD))
{
nDamage = nDamage / 2;
}
//Set the damage effect
eDam = EffectDamage(nDamage, DAMAGE_TYPE_COLD);
//Apply the VFX constant and damage effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
//Get the next target in the aura of cold
oTarget = GetNextInPersistentObject();
}
}

View File

@@ -1,58 +0,0 @@
//::///////////////////////////////////////////////
//:: Aura of Electricity on Heartbeat
//:: NW_S1_AuraElecC.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Prolonged exposure to the aura of the creature
causes electrical damage to all within the aura.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 25, 2001
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
//#include "wm_include"
#include "prc_inc_spells"
void main()
{
//:: Declare major variables
object oNPC = GetAreaOfEffectCreator();
int nHD = GetHitDice(oNPC);
int nZap = 1 + (nHD / 3);
int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC);
int nDC = 10 + nCHAMod + (nHD/2);
int nDamage;
effect eDam;
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S);
//Get first target in spell area
object oTarget = GetFirstInPersistentObject();
while (GetIsObjectValid(oTarget))
{
/* if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget))
{
oTarget = GetNextInPersistentObject(OBJECT_SELF);
continue;
} */
if(GetIsEnemy(oTarget, GetAreaOfEffectCreator()))
{
nDamage = d4(nZap);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_AURA_ELECTRICITY));
//Make a saving throw check
if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY))
{
nDamage = nDamage / 2;
}
eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL);
//Apply the VFX impact and effects
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
}
//Get next target in spell area
oTarget = GetNextInPersistentObject();
}
}

View File

@@ -1,59 +0,0 @@
//::///////////////////////////////////////////////
//:: Aura of Fire on Heartbeat
//:: NW_S1_AuraFireC.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Prolonged exposure to the aura of the creature
causes fire damage to all within the aura.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 25, 2001
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
//#include "wm_include"
#include "prc_inc_spells"
void main()
{
//:: Declare major variables
object oNPC = GetAreaOfEffectCreator();
object oTarget = GetFirstInPersistentObject(); //:: Get first target in spell area
int nHD = GetHitDice(oNPC);
int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC);
int nBurn = 1 + (nHD/3);
int nDC = 10 +nCHAMod+ (nHD/2);
int nDamage;
int nDamSave;
effect eDam;
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S);
while(GetIsObjectValid(oTarget))
{
/* if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget))
{
oTarget = GetNextInPersistentObject(OBJECT_SELF);
continue;
} */
if(GetIsEnemy(oTarget, GetAreaOfEffectCreator()))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELLABILITY_AURA_FIRE));
//Roll damage
nDamage = d4(nBurn);
//Make a saving throw check
if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_FIRE))
{
nDamage = nDamage / 2;
}
//Set the damage effect
eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
}
//Get next target in spell area
oTarget = GetNextInPersistentObject();
}
}

View File

@@ -1,46 +0,0 @@
//::///////////////////////////////////////////////
//:: Aura of Menace On Enter
//:: NW_S1_AuraMencA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Upon entering the aura all those that fail
a will save are stricken with Doom.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 25, 2001
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
//#include "wm_include"
#include "prc_inc_spells"
void main()
{
//:: Declare major variables
object oNPC = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
//if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;}
int nDuration = 1 + (GetHitDice(oNPC)/3);
int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC);
int nDC = 10 +nCHAMod+ (GetHitDice(oNPC)/2);
int nLevel = GetCasterLevel(OBJECT_SELF);
int nMetaMagic = PRCGetMetaMagicFeat();
effect eVis = EffectVisualEffect(VFX_IMP_DOOM);
effect eLink = CreateDoomEffectsLink();
if(GetIsEnemy(oTarget, GetAreaOfEffectCreator()))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_AURA_MENACE));
//Spell Resistance and Saving throw
if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC))
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink , oTarget, TurnsToSeconds(nDuration));
}
}
}

View File

@@ -1,35 +0,0 @@
//::///////////////////////////////////////////////
//:: Aura of Protection: On Enter
//:: NW_S1_AuraProtA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Acts as a double strength Magic Circle against
evil and a Minor Globe for those friends in
the area.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On:Jan 8, 2002, 2001
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
//#include "wm_include"
void main()
{
//Declare major variables
effect eProt = CreateProtectionFromAlignmentLink(ALIGNMENT_EVIL);
effect eGlobe = EffectSpellLevelAbsorption(3, 0);
effect eDur = EffectVisualEffect(VFX_DUR_GLOBE_MINOR);
effect eLink = EffectLinkEffects(eProt, eGlobe);
eLink = EffectLinkEffects(eLink, eDur);
object oTarget = GetEnteringObject();
//if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;}
//Faction Check
if(GetIsFriend(oTarget, GetAreaOfEffectCreator()))
{
//Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget);
}
}

View File

@@ -1,48 +0,0 @@
//::///////////////////////////////////////////////
//:: Aura Stunning On Enter
//:: NW_S1_AuraStunA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Upon entering the aura of the creature the player
must make a will save or be stunned.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 25, 2001
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
//#include "wm_include"
#include "prc_inc_spells"
void main()
{
//:: Declare major variables
object oNPC = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC);
int nDuration = GetHitDice(oNPC);
int nDC = 10 + nCHAMod + (nDuration/2);
//if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;}
effect eVis = EffectVisualEffect(VFX_IMP_STUN);
effect eVis2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
effect eDeath = EffectStunned();
effect eLink = EffectLinkEffects(eVis2, eDeath);
nDuration = GetScaledDuration(nDuration, oTarget);
if(!GetIsFriend(oTarget))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_AURA_STUN));
//Make a saving throw check
if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS))
{
//Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
}

View File

@@ -1,48 +0,0 @@
//::///////////////////////////////////////////////
//:: Aura of the Unnatural On Enter
//:: NW_S1_AuraMencA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Upon entering the aura all animals are struck with
fear.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 25, 2001
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
//#include "wm_include"
#include "prc_inc_spells"
void main()
{
//:: Declare major variables
object oNPC = GetAreaOfEffectCreator();
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR);
effect eFear = EffectFrightened();
effect eLink = EffectLinkEffects(eVis, eFear);
object oTarget = GetEnteringObject();
//if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;}
int nDuration = GetHitDice(oNPC);
int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC);
int nRacial = GetRacialType(oTarget);
int nDC = 10 + nCHAMod + (GetHitDice(oNPC)/2);
if(GetIsEnemy(oTarget))
{
nDuration = (nDuration / 3) + 1;
//Make a saving throw check
if(nRacial == RACIAL_TYPE_ANIMAL)
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELLABILITY_AURA_UNNATURAL));
//if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR)) //:: This ability only affects animals & they don't get a save.
//{
//Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
//}
}
}
}

View File

@@ -1,46 +0,0 @@
//::///////////////////////////////////////////////
//:: Aura Unearthly Visage On Enter
//:: NW_S1_AuraUnEaA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Upon entering the aura of the creature the player
must make a will save or be killed because of the
sheer ugliness or beauty of the creature.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 25, 2001
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
//#include "wm_include"
#include "prc_inc_spells"
void main()
{
//:: Declare major variables
object oNPC = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
int nHD = GetHitDice(oNPC);
int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC);
int nDC = 10 +nCHAMod+ (nHD/2);
//if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;}
effect eDeath = EffectDeath();
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
if(GetIsEnemy(oTarget, oNPC))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_AURA_UNEARTHLY_VISAGE));
//Make a saving throw check
if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH))
{
//Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget);
//ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
}

View File

@@ -1,66 +0,0 @@
//::///////////////////////////////////////////////
//:: Bolt: Acid
//:: NW_S1_BltAcid
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creature must make a ranged touch attack to hit
the intended target. Reflex or Will save is
needed to halve damage or avoid effect.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 11 , 2001
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
#include "prc_inc_spells"
//#include "wm_include"
void main()
{
//if (WildMagicOverride()) { return; }
//:: Declare major variables
object oNPC = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nHD = GetHitDice(oNPC);
int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC);
int nDC = 10 +nCONMod+ (nHD/2);
int nCount = nHD/2;
if (nCount == 0) { nCount = 1; }
int nDamage = d6(nCount);
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
effect eBolt;
//ankheg
if(GetAppearanceType(oNPC) == APPEARANCE_TYPE_BEETLE_SLICER)
{
nDamage = d4(4);
}
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_ACID));
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ACID);
//Make a ranged touch attack
int nTouch = TouchAttackRanged(oTarget);
if(nTouch > 0)
{
if(nTouch == 2)
{
nDamage *= 2;
}
//Set damage effect
eBolt = EffectDamage(nDamage, DAMAGE_TYPE_ACID);
if(nDamage > 0)
{
//Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
}

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