Updated to PRC8

Updated to PRC8.  Further function integration.  Fixed NPC onDeath script.   Full compile.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-02-20 22:24:11 -05:00
parent ada3850bad
commit 2bb2c470e0
805 changed files with 37897 additions and 623 deletions

View File

@@ -19,12 +19,14 @@ bugfix by Grant Beaty 2002.08.31
*/
#include "NW_I0_SPELLS"
#include "prc_inc_spells"
void main()
{
//Declare major variables
effect eVis = EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD);
int nDuration = GetCasterLevel(OBJECT_SELF);
int nMetaMagic = GetMetaMagicFeat();
int nDuration = PRCGetCasterLevel(OBJECT_SELF);
int nMetaMagic = PRCGetMetaMagicFeat();
object oTarget = OBJECT_SELF;
effect eShield = EffectRegenerate(3, 6.0);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
@@ -48,8 +50,8 @@ void main()
}
//If there is already a fire shield in effect, remove it.
if(GetHasSpellEffect(GetSpellId(), oTarget))
RemoveSpellEffects(GetSpellId(), oTarget, oTarget);
if(GetHasSpellEffect(PRCGetSpellId(), oTarget))
RemoveSpellEffects(PRCGetSpellId(), oTarget, oTarget);
//Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));

View File

@@ -4,6 +4,8 @@
//script ac_"tagnameofitemgoeshere" (without the "")
#include "nw_i0_spells"
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
// Check if we have the correct event firing the script
@@ -21,8 +23,8 @@ void main()
// fill the variables
oSpellOrigin = OBJECT_SELF;
oSpellTarget = GetSpellTargetObject();
oItem = GetSpellCastItem();
oSpellTarget = PRCGetSpellTargetObject();
oItem = PRCGetSpellCastItem();
int nLevel = GetCasterLevel(OBJECT_SELF);
if (GetIsObjectValid(oItem))
@@ -36,7 +38,7 @@ void main()
}
if (!GetWeaponRanged(oWeapon) || !GetIsObjectValid(oWeapon))
{
SignalEvent(oSpellTarget,EventSpellCastAt(OBJECT_SELF,GetSpellId()));
SignalEvent(oSpellTarget,EventSpellCastAt(OBJECT_SELF,PRCGetSpellId()));
int nDamage = d10(10)+ nLevel;
effect eDamage = EffectDamage(nDamage,DAMAGE_TYPE_FIRE);
effect eVis;

View File

@@ -4,6 +4,8 @@
//script ac_"tagnameofitemgoeshere" (without the "")
#include "nw_i0_spells"
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
// Check if we have the correct event firing the script
@@ -21,8 +23,8 @@ void main()
// fill the variables
oSpellOrigin = OBJECT_SELF;
oSpellTarget = GetSpellTargetObject();
oItem = GetSpellCastItem();
oSpellTarget = PRCGetSpellTargetObject();
oItem = PRCGetSpellCastItem();
int nLevel = GetCasterLevel(OBJECT_SELF);
if (GetIsObjectValid(oItem))
@@ -36,7 +38,7 @@ void main()
}
if (!GetWeaponRanged(oWeapon) || !GetIsObjectValid(oWeapon))
{
SignalEvent(oSpellTarget,EventSpellCastAt(OBJECT_SELF,GetSpellId()));
SignalEvent(oSpellTarget,EventSpellCastAt(OBJECT_SELF,PRCGetSpellId()));
int nDamage = d6(1)+ nLevel;
effect eDamage = EffectDamage(nDamage,DAMAGE_TYPE_FIRE);
effect eVis;

View File

@@ -18,6 +18,8 @@ the X2_ITEM_EVENT_ACTIVATE: script code will run.
*/
////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
//Required Include For Color Messages(Read include to learn more)
#include "gen_inc_color"
@@ -99,10 +101,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,8 +203,8 @@ void main()
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = PRCGetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
//Your code goes here

View File

@@ -13,6 +13,8 @@
////////////////////////////////////////
//Required Include!
#include "x2_inc_switches"
#include "prc_inc_spells"
/////////////////////////////////////////////////////////////////////////
@@ -113,10 +115,10 @@ location lPC;
// * 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
}
@@ -253,8 +255,8 @@ location lPC;
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = PRCGetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
//Your code goes here

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

@@ -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,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

@@ -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

@@ -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,8 @@ the X2_ITEM_EVENT_ACTIVATE: script code will run.
*/
////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
//Main Script
void main()
@@ -62,10 +64,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,8 +159,8 @@ 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
iSpell = GetSpellId(); // The id of the spell that was cast
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = PRCGetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
//Your code goes here

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

@@ -10,7 +10,9 @@ saved and then you must build the module, script only,
after you are done editing it, save the module.
----------------------------------------------------------*/
//Required Inlude (DO NOT DELETE!)
#include "x2_inc_itemprop"
#include "prc_x2_itemprop"
//void main (){}
////////////////////////////////////////////////////////////////
///////////////////OPTIONAL SETTINGS///////////////////////////

View File

@@ -17,6 +17,8 @@ that script!
////////////////////////////////////////
#include "x2_inc_switches"
#include "gen_enc_config"
#include "prc_inc_spells"
//Main Script
void main()
@@ -70,10 +72,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
@@ -1315,8 +1317,8 @@ sResRef == "gen_gem_191")
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = PRCGetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
//Your code goes here

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 GenjiGetRGB(int red = 15,int green = 15,int blue = 15);
// --------------------------------------------------------------[ function implementations ]
string GetRGB(int red = 15,int green = 15,int blue = 15)
string GenjiGetRGB(int red = 15,int green = 15,int blue = 15)
{
object o = GetWaypointByTag("ref_point");
object coloringBook = GetNearestObjectByTag("ColoringBook", o);

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

@@ -18,6 +18,8 @@ the X2_ITEM_EVENT_ACTIVATE: script code will run.
*/
////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
//Main Script
void main()
@@ -62,10 +64,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,8 +180,8 @@ void main()
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = PRCGetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
//Your code goes here

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,3 +1,5 @@
#include "prc_inc_util"
void main()
{
object oPC = GetEnteringObject();
@@ -11,6 +13,6 @@ if (GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, oPC) != OBJ
}
else
{
ForceRest(oPC);
PRCForceRest(oPC);
}
}

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

@@ -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,8 @@ 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 +69,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,8 +174,8 @@ void main()
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = PRCGetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
//Your code goes here

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

@@ -64,6 +64,8 @@ Open up the No Casting Area and edit the area to see how it's set up properly.
#include "x2_inc_switches"
#include "nw_i0_spells"
#include "check_host_spell"
#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!
@@ -82,18 +84,18 @@ void main()
{ return; }
//Declare Major Variables;
int nSpell=GetSpellId();
int nSpell=PRCGetSpellId();
int nNonHostile = GetIsNonHostileSpell(nSpell);
int nNonHostileItem;
int nCastLevel = GetCasterLevel(OBJECT_SELF);
int zInt;
object sTarget = GetSpellTargetObject();
object sItem = GetSpellCastItem();
object sTarget = PRCGetSpellTargetObject();
object sItem = PRCGetSpellCastItem();
object oArea = GetArea(oCaster);
int nJail = GetLocalInt(oArea, "JAIL");
int nPVP = GetLocalInt(oArea, "PVP");
location sLocation = GetSpellTargetLocation();
location sLocation = PRCGetSpellTargetLocation();
int sClass = GetLastSpellCastClass();
string sTN = GetTag(sItem);
int nType;
@@ -173,7 +175,7 @@ if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2)
if(sItem!=OBJECT_INVALID && sTN != "ammo_maker" &&
sTN != "namingtool" && sTN != "colorwand")
{
nType = GetBaseItemType(GetSpellCastItem());
nType = GetBaseItemType(PRCGetSpellCastItem());
if(nType != BASE_ITEM_POTIONS &&
nType != BASE_ITEM_ENCHANTED_POTION)
@@ -199,7 +201,7 @@ if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2)
///////////////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
@@ -256,7 +258,7 @@ switch (nSpell)
case SPELL_DROWN:
{
if(GetIsPC(GetSpellTargetObject()))
if(GetIsPC(PRCGetSpellTargetObject()))
{
//Stop the original spell from running..
AssignCommand(oCaster, ClearAllActions());
@@ -1580,10 +1582,10 @@ switch (nSpell)
case SPELL_WHATEVER: //Change this to the actual spell being cast..
{
//Note if the spell does area damage use this always!
DoAreaBonusDmg(GetSpellTargetLocation());
DoAreaBonusDmg(PRCGetSpellTargetLocation());
//Do a generic visual (see the "spellfunc_inc" script)
DoAVisual(GetSpellTargetLocation());
DoAVisual(PRCGetSpellTargetLocation());
//Do Positive Damage to all in area (if not resisted or saved)
DoAreaDmg();
@@ -1599,7 +1601,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,8 @@
*/
////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
//Main Script
void main()
@@ -62,10 +64,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,8 +163,8 @@ void main()
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = PRCGetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
//Your code goes here

View File

@@ -1,50 +0,0 @@
//:://////////////////////////////////////////////////
//:: NW_C2_DEFAULT7
/*
Default OnDeath event handler for NPCs.
Adjusts killer's alignment if appropriate and
alerts allies to our death.
*/
//:://////////////////////////////////////////////////
//:: Copyright (c) 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 12/22/2002
//:://////////////////////////////////////////////////
#include "x2_inc_compon"
#include "x0_i0_spawncond"
void main()
{
// Scarface's XP/GP System
ExecuteScript("sf_xp", OBJECT_SELF);
// End
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
object oKiller = GetLastKiller();
// If we're a good commoner,
// adjust the killer's alignment evil
if(nClass > 0 && (nAlign == ALIGNMENT_GOOD))
{
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
}
// Call to allies to let them know we're dead
//SpeakString("NW_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
//Shout Attack my target, only works with the On Spawn In setup
//SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
// NOTE: the OnDeath user-defined event does not
// trigger reliably and should probably be removed
if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
}
//craft_drop_items(oKiller);
}

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

@@ -0,0 +1,18 @@
//:://////////////////////////////////////////////////
//:: prc_pwondeath
/*
PRCs OnDeath event handler for NPCs.
*/
//:://////////////////////////////////////////////////
#include "x2_inc_compon"
#include "x0_i0_spawncond"
void main()
{
// Scarface's XP/GP System
ExecuteScript("sf_xp", OBJECT_SELF);
// End
object oKiller = GetLastKiller();
}

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

@@ -8,6 +8,8 @@
//:://////////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
//showing spell names is a 2da file hit. When storing
//a lot of spells this can cause a significant delay
@@ -86,8 +88,8 @@ void main()
} //This Event Handles storing the spells
else if (nEvent == X2_ITEM_EVENT_SPELLCAST_AT)
{
oItem = GetSpellTargetObject();
nSpellId = GetSpellId();
oItem = PRCGetSpellTargetObject();
nSpellId = PRCGetSpellId();
oPC = OBJECT_SELF;
//This tells us what position to store the spell on

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,3 +1,5 @@
#include "prc_inc_spells"
// * colors are: "darkred", "darkblue", "darkgreen",
// "lightred", "lightblue", "lightgreen",
// "white", "random"
@@ -152,8 +154,8 @@ void ObjectAquisitionLastRoleCall()
void ObjectAquisitionTagBasedRoleCall()
{
ToAll("*** *** *** AQUISITION TAGBASED ROLE CALL *** *** ***");
Debugo(GetSpellCastItem(), "GetSpellCastItem");
Debugo(GetSpellTargetObject(), "GetSpellTargetObject");
Debugo(PRCGetSpellCastItem(), "PRCGetSpellCastItem");
Debugo(PRCGetSpellTargetObject(), "PRCGetSpellTargetObject");
Debugo(GetItemActivator(), "GetItemActivator");
Debugo(GetItemActivated(), "GetItemActivated");
Debugo(GetPCItemLastEquippedBy(), "GetPCItemLastEquippedBy");
@@ -164,5 +166,5 @@ void ObjectAquisitionTagBasedRoleCall()
Debugo(GetModuleItemAcquired(), "GetModuleItemAcquired");
Debugo(GetModuleItemLostBy(), "GetModuleItemLostBy");
Debugo(GetModuleItemLost(), "GetModuleItemLost");
Debugo(GetSpellTargetObject(), "GetSpellTargetObject");
Debugo(PRCGetSpellTargetObject(), "PRCGetSpellTargetObject");
}

View File

@@ -1,4 +1,6 @@
#include "x2_inc_switches"
#include "prc_inc_spells"
// Get the PC, regardless of event
object GetPC();
@@ -73,10 +75,10 @@ object GetItem()
case X2_ITEM_EVENT_ACTIVATE: return GetItemActivated();
case X2_ITEM_EVENT_EQUIP: return GetPCItemLastEquipped();
case X2_ITEM_EVENT_UNEQUIP: return GetPCItemLastUnequipped();
case X2_ITEM_EVENT_ONHITCAST: return GetSpellCastItem();
case X2_ITEM_EVENT_ONHITCAST: return PRCGetSpellCastItem();
case X2_ITEM_EVENT_ACQUIRE: return GetModuleItemAcquired();
case X2_ITEM_EVENT_UNACQUIRE: return GetModuleItemLost();
case X2_ITEM_EVENT_SPELLCAST_AT: return GetSpellTargetObject();
case X2_ITEM_EVENT_SPELLCAST_AT: return PRCGetSpellTargetObject();
}
return OBJECT_INVALID;
}
@@ -86,7 +88,7 @@ object GetTarget()
switch(GetUserDefinedItemEventNumber())
{
case X2_ITEM_EVENT_ACTIVATE: return GetItemActivatedTarget();
case X2_ITEM_EVENT_ONHITCAST: return GetSpellTargetObject();
case X2_ITEM_EVENT_ONHITCAST: return PRCGetSpellTargetObject();
}
return 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

@@ -11,6 +11,8 @@ on the PC, I did this to keep this code lower.
*/
////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
////////////////////////////////////////
@@ -64,10 +66,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
@@ -162,8 +164,8 @@ void main()
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = PRCGetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
//Your code goes here

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

@@ -16,6 +16,8 @@
*/
////////////////////////////////////////
#include "x2_inc_switches"
#include "prc_inc_spells"
//Main Script
void main()
@@ -60,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
}
@@ -157,8 +159,8 @@ void main()
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject();// The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
oItem = PRCGetSpellTargetObject();// The item targeted by the spell
iSpell = PRCGetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
//Your code goes here

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,218 +0,0 @@
//::///////////////////////////////////////////////
//:: Beholder Ray Attacks
//:: x2_s2_beholdray
//:: Copyright (c) 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
Implementation for the new version of the
beholder rays, using projectiles instead of
rays
*/
//:://////////////////////////////////////////////
//:: Created By: Georg Zoeller
//:: Created On: 2003-09-16
//:://////////////////////////////////////////////
#include "x0_i0_spells"
void DoBeholderPetrify(int nDuration,object oSource, object oTarget, int nSpellID);
void main()
{
int nSpell = GetSpellId();
object oTarget = GetSpellTargetObject();
int nSave, bSave;
int nSaveDC = 15;
float fDelay;
effect e1, eLink, eVis, eDur;
switch (nSpell)
{
case 776 :
nSave = SAVING_THROW_FORT; //BEHOLDER_RAY_DEATH
break;
case 777:
nSave = SAVING_THROW_WILL; //BEHOLDER_RAY_TK
break;
case 778 : //BEHOLDER_RAY_PETRI
nSave = SAVING_THROW_FORT;
break;
case 779: // BEHOLDER_RAY_CHARM
nSave = SAVING_THROW_WILL;
break;
case 780: //BEHOLDER_RAY_SLOW
nSave = SAVING_THROW_WILL;
break;
case 783:
nSave = SAVING_THROW_FORT; //BEHOLDER_RAY_WOUND
break;
case 784: // BEHOLDER_RAY_FEAR
nSave = SAVING_THROW_WILL;
break;
case 785:
case 786:
case 787:
}
SignalEvent(oTarget,EventSpellCastAt(OBJECT_SELF,GetSpellId(),TRUE));
fDelay = 0.0f; //old -- GetSpellEffectDelay(GetLocation(oTarget),OBJECT_SELF);
if (nSave == SAVING_THROW_WILL)
{
bSave = MySavingThrow(SAVING_THROW_WILL,oTarget, nSaveDC,SAVING_THROW_TYPE_ALL,OBJECT_SELF,fDelay) >0;
}
else if (nSave == SAVING_THROW_FORT)
{
bSave = MySavingThrow(SAVING_THROW_FORT,oTarget, nSaveDC,SAVING_THROW_TYPE_ALL,OBJECT_SELF,fDelay) >0;
}
if (!bSave)
{
switch (nSpell)
{
case 776: e1 = EffectDeath(TRUE);
eVis = EffectVisualEffect(VFX_IMP_DEATH);
eLink = EffectLinkEffects(e1,eVis);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eLink,oTarget);
break;
case 777: e1 = ExtraordinaryEffect(EffectKnockdown());
eVis = EffectVisualEffect(VFX_IMP_STUN);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,e1,oTarget,6.0f);
break;
// Petrify for one round per SaveDC
case 778: eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
DoBeholderPetrify(nSaveDC,OBJECT_SELF,oTarget,GetSpellId());
break;
case 779: e1 = EffectCharmed();
eVis = EffectVisualEffect(VFX_IMP_CHARM);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,e1,oTarget,24.0f);
break;
case 780: e1 = EffectSlow();
eVis = EffectVisualEffect(VFX_IMP_SLOW);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,e1,oTarget,RoundsToSeconds(6));
break;
case 783: e1 = EffectDamage(d8(2)+10);
eVis = EffectVisualEffect(VFX_COM_BLOOD_REG_RED);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT,e1,oTarget);
break;
case 784:
e1 = EffectFrightened();
eVis = EffectVisualEffect(VFX_IMP_FEAR_S);
eDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR);
e1 = EffectLinkEffects(eDur,e1);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,e1,oTarget,RoundsToSeconds(1+d4()));
break;
}
}
else
{
switch (nSpell)
{
case 776: e1 = EffectDamage(d6(3)+13);
eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
eLink = EffectLinkEffects(e1,eVis);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eLink,oTarget);
}
}
}
void DoBeholderPetrify(int nDuration,object oSource, object oTarget, int nSpellID)
{
if(!GetIsReactionTypeFriendly(oTarget) && !GetIsDead(oTarget))
{
// * exit if creature is immune to petrification
if (spellsIsImmuneToPetrification(oTarget) == TRUE || GetHasFeat(4643)) //:: PRC's Immunity to Petrification
{
return;
}
float fDifficulty = 0.0;
int bIsPC = GetIsPC(oTarget);
int bShowPopup = FALSE;
// * calculate Duration based on difficulty settings
int nGameDiff = GetGameDifficulty();
switch (nGameDiff)
{
case GAME_DIFFICULTY_VERY_EASY:
case GAME_DIFFICULTY_EASY:
case GAME_DIFFICULTY_NORMAL:
fDifficulty = RoundsToSeconds(nDuration); // One Round per hit-die or caster level
break;
case GAME_DIFFICULTY_CORE_RULES:
case GAME_DIFFICULTY_DIFFICULT:
if (!GetPlotFlag(oTarget))
{
bShowPopup = TRUE;
}
break;
}
effect ePetrify = EffectPetrify();
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(eDur, ePetrify);
/// * The duration is permanent against NPCs but only temporary against PCs
if (bIsPC == TRUE)
{
if (bShowPopup == TRUE)
{
// * under hardcore rules or higher, this is an instant death
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget);
DelayCommand(2.75, PopUpDeathGUIPanel(oTarget, FALSE , TRUE, 40579));
// if in hardcore, treat the player as an NPC
bIsPC = FALSE;
}
else
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDifficulty);
}
else
{
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget);
// * Feb 11 2003 BK I don't think this is necessary anymore
//if the target was an NPC - make him uncommandable until Stone to Flesh is cast
//SetCommandable(FALSE, oTarget);
// Feb 5 2004 - Jon
// Added kick-henchman-out-of-party code from generic petrify script
if (GetAssociateType(oTarget) == ASSOCIATE_TYPE_HENCHMAN)
{
FireHenchman(GetMaster(oTarget),oTarget);
}
}
// April 2003: Clearing actions to kick them out of conversation when petrified
AssignCommand(oTarget, ClearAllActions());
}
}

View File

@@ -1,200 +0,0 @@
//::///////////////////////////////////////////////
//:: Mighty Rage
//:: X2_S2_MghtyRage
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
+ 12 Str
+ 12 Con
+ 3 Will Save
- 2 Ac
if maximum str is already reached before or during rage the barbarian gets the following:
+ slashing bonus damage
+ attack bonus
or if maximum con is reached:
+ temporary hp
*/
//:://////////////////////////////////////////////
//:: Created By: Andrew Nobbs
//:: Created On: May 16, 2003
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Rewritten By: Mizzajl
//:: Created On: Oct 24, 2004
//:://////////////////////////////////////////////
//:: Edited By: Bogo Rath
//:://////////////////////////////////////////////
#include "x2_inc_itemprop"
#include "prc_class_const"
int GetInnateAbility(object oCreature, int nAbility)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAbilityIncrease(nAbility, 12), oCreature, 0.01);
return GetAbilityScore(oCreature, nAbility) - 12;
}
//------------------------------------------------------------------------------
// GZ, 2003-07-09
// If the character calling this function from a spellscript has the thundering
// rage feat, his weapons are upgraded to deafen and cause 2d6 points of massive
// criticals
//------------------------------------------------------------------------------
void CheckAndApplyThunderingRage(int nRounds)
{
if (GetHasFeat(988, OBJECT_SELF))
{
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND);
if (GetIsObjectValid(oWeapon))
{
IPSafeAddItemProperty(oWeapon, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_SONIC, IP_CONST_DAMAGEBONUS_2d12), RoundsToSeconds(nRounds), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
IPSafeAddItemProperty(oWeapon, ItemPropertyVisualEffect(ITEM_VISUAL_SONIC), RoundsToSeconds(nRounds), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
IPSafeAddItemProperty(oWeapon, ItemPropertyOnHitProps(IP_CONST_ONHIT_DEAFNESS,IP_CONST_ONHIT_SAVEDC_26,IP_CONST_ONHIT_DURATION_50_PERCENT_2_ROUNDS), RoundsToSeconds(nRounds), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
}
oWeapon = GetItemInSlot(INVENTORY_SLOT_LEFTHAND);
if (GetIsObjectValid(oWeapon) )
{
IPSafeAddItemProperty(oWeapon, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_SONIC, IP_CONST_DAMAGEBONUS_2d12), RoundsToSeconds(nRounds), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
IPSafeAddItemProperty(oWeapon,ItemPropertyVisualEffect(ITEM_VISUAL_SONIC), RoundsToSeconds(nRounds), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
IPSafeAddItemProperty(oWeapon, ItemPropertyOnHitProps(IP_CONST_ONHIT_DEAFNESS,IP_CONST_ONHIT_SAVEDC_26,IP_CONST_ONHIT_DURATION_50_PERCENT_2_ROUNDS), RoundsToSeconds(nRounds), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
}
}
}
//------------------------------------------------------------------------------
// GZ, 2003-07-09
// If the character calling this function from a spellscript has the terrifying
// rage feat, he gets an aura of fear for the specified duration
// The saving throw against this fear is a check opposed to the character's
// intimidation skill
//------------------------------------------------------------------------------
void CheckAndApplyTerrifyingRage(int nRounds)
{
if (GetHasFeat(989, OBJECT_SELF))
{
effect eAOE = EffectAreaOfEffect(AOE_MOB_FEAR,"x2_s2_terrage_A", "","");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eAOE,OBJECT_SELF,RoundsToSeconds(nRounds));
}
}
//------------------------------------------------------------------------------
// GZ, 2003-07-09
// Hub function for the epic barbarian feats that upgrade rage. Call from
// the end of the barbarian rage spellscript
//------------------------------------------------------------------------------
void CheckAndApplyEpicRageFeats(int nRounds)
{
CheckAndApplyThunderingRage(nRounds);
CheckAndApplyTerrifyingRage(nRounds);
}
void main()
{
if(!GetHasFeatEffect(FEAT_BARBARIAN_RAGE))
{
//Declare major variables
int nLevel = GetLevelByClass(CLASS_TYPE_BARBARIAN)
+ GetLevelByClass(CLASS_TYPE_FRE_BERSERKER)
+ GetLevelByClass(CLASS_TYPE_BATTLERAGER)
+ GetLevelByClass(CLASS_TYPE_CELEBRANT_SHARESS)
+ GetLevelByClass(CLASS_TYPE_BLACK_BLOOD_CULTIST)
+ GetLevelByClass(CLASS_TYPE_RUNESCARRED)
+ GetLevelByClass(CLASS_TYPE_TOTEM_RAGER)
+ GetLevelByClass(CLASS_TYPE_FRE_BERSERKER)
+ GetLevelByClass(CLASS_TYPE_FROSTRAGER);
int nHD = GetHitDice(OBJECT_SELF);
int nSave = 3;
int nStrIncrease = 12;
int nConIncrease = 12;
// Stacks str and con so that none is lost if you reach the +12 limit
int nStrenght = GetAbilityScore(OBJECT_SELF, ABILITY_STRENGTH);
int nDexterity = GetAbilityScore(OBJECT_SELF, ABILITY_DEXTERITY);
int nConstitution = GetAbilityScore(OBJECT_SELF, ABILITY_CONSTITUTION);
int nDur = 3 + GetAbilityModifier(ABILITY_CONSTITUTION) + nConIncrease;
int nBaseStr = GetInnateAbility(OBJECT_SELF, ABILITY_STRENGTH);
int nBaseCon = GetInnateAbility(OBJECT_SELF, ABILITY_CONSTITUTION);
int nOverCapStr = nStrenght - nBaseStr - 0 + nStrIncrease;
int nOverCapCon = nConstitution - nBaseCon - 0 + nConIncrease;
if(nOverCapStr > 12)
{
nStrIncrease = nStrIncrease - nOverCapStr;
}
if(nOverCapCon > 12)
{
nConIncrease = nConIncrease - nOverCapCon;
}
//end of calculation :)
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
//Determine the duration by getting the con modifier after being modified
effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH, nStrIncrease);
effect eCon = EffectAbilityIncrease(ABILITY_CONSTITUTION, nConIncrease);
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_WILL, nSave);
effect eAC = EffectACDecrease(4, AC_DODGE_BONUS);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
// adds Damage, AB and HP
effect eAB = EffectAttackIncrease(nOverCapStr/2);
effect eBonusDamage = EffectDamageIncrease(nOverCapStr/2, DAMAGE_TYPE_SLASHING);
effect eHP = EffectTemporaryHitpoints((nOverCapCon/2) * nHD);
effect eLink = EffectLinkEffects(eCon, eStr);
eLink = EffectLinkEffects(eLink, eSave);
eLink = EffectLinkEffects(eLink, eAC);
eLink = EffectLinkEffects(eLink, eDur);
//checks if any str is lost because of the +12 limit
if(nOverCapStr > 12)
{
//check if the char is NOT a dexer
if(GetHasFeat(FEAT_WEAPON_FINESSE, OBJECT_SELF) == TRUE)
{
if(nStrenght > nDexterity)
{
//only aply if str is higher than dex
eLink = EffectLinkEffects(eLink, eAB);
}
}
else // if you dont have weapon finesse you get the AB even if dex is higher
{
eLink = EffectLinkEffects(eLink, eAB);
}
// dexers always gets more damage even if dex is higher
eLink = EffectLinkEffects(eLink, eBonusDamage);
}
SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BARBARIAN_RAGE, FALSE));
//Make effect extraordinary
eLink = ExtraordinaryEffect(eLink);
effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); //Change to the Rage VFX
if (nDur > 12)
{
//Apply the VFX impact and effects
DelayCommand(0.02, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, RoundsToSeconds(nDur)));
//checks if any con is lost because of the +12 limit
//hp could not be linked, losing hp whould result in lose of all bonuses
if(nOverCapCon > 12)
{
DelayCommand(0.02, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, OBJECT_SELF, RoundsToSeconds(nDur)));
}
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF) ;
// 2003-07-08, Georg: Rage Epic Feat Handling
CheckAndApplyEpicRageFeats(nDur);
}
}
}

View File

@@ -17,6 +17,8 @@
//:://////////////////////////////////////////////
#include "nw_i0_spells"
#include "prc_inc_spells"
void main()
{
@@ -27,9 +29,9 @@ void main()
// fill the variables
oSpellOrigin = OBJECT_SELF;
oSpellTarget = GetSpellTargetObject();
oItem = GetSpellCastItem();
int nLevel = GetCasterLevel(OBJECT_SELF);
oSpellTarget = PRCPRCGetSpellTargetObject();
oItem = PRCGetSpellCastItem();
int nLevel = PRCGetCasterLevel(OBJECT_SELF);
if (GetIsObjectValid(oItem))
{
@@ -42,7 +44,7 @@ void main()
}
if (!GetWeaponRanged(oWeapon) || !GetIsObjectValid(oWeapon))
{
SignalEvent(oSpellTarget,EventSpellCastAt(OBJECT_SELF,GetSpellId()));
SignalEvent(oSpellTarget,EventSpellCastAt(OBJECT_SELF,PRCGetSpellId()));
int nDamage = d4(3)+ nLevel;
effect eDamage = EffectDamage(nDamage,DAMAGE_TYPE_FIRE);
effect eVis;

View File

@@ -19,6 +19,7 @@
//:: Created By: Georg Zoeller
//:: Created On: 2003-07-17
//:://////////////////////////////////////////////
#include "prc_inc_spells"
void main()
{
@@ -43,7 +44,7 @@ void main()
eVis =EffectVisualEffect(VFX_IMP_FLAME_M);
}
eDmg = EffectLinkEffects (eVis, eDmg);
object oTarget = GetSpellTargetObject();
object oTarget = PRCGetSpellTargetObject();
if (GetIsObjectValid(oTarget))
{

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;
}
}