Well I know for a fact that other unique power items are working fine. I had actually wondered if the item needed to be included in the on item activated script, but when I tested it (albiet possibly feebly due to my lack of scripting skills) it did nothing to prevent this. Here is our on activate script though in case it helps. From my uneducated eyes though I can't see anything that would be interfering...
//this line is needed if you are going to use pipe and witchweed
#include "conf_module"
#include "lib_witchgrass"
#include "wys_i_common"
#include "wys_i_booze"
#include "nw_i0_plot"
#include "pf_portal_util"
#include "zdlg_include_i"
#include "zep_inc_phenos"
void AnnounceArea( string sMessage, object oSource )
{
object oPC=GetFirstPC( );
while( GetIsObjectValid( oPC ))
{
if( GetObjectSeen( oPC, oSource ))
{
SendMessageToPC( oPC, sMessage );
}
oPC= GetNextPC( );
}
}
void main( )
{
//Define and st variable that can be used by all custom items
object oItem = GetItemActivated( );
object oPC = GetItemActivator( );
object oTarget = GetItemActivatedTarget( );
location lTarget = GetItemActivatedTargetLocation( );
location lLocation = GetItemActivatedTargetLocation( );
location lActivator = GetLocation( oPC );
string sTag = GetTag( oItem );
effect eEffect;
// wys_e_modact - Module OnActivate checks for alcoholic beverage use.
// All alcoholic beverages must be custom potions with tags that begin with
// ALC_ to activate the appropriate effects.
//
if ( GetBaseItemType( oItem ) == BASE_ITEM_POTIONS )
{
if ( GetSubString( sTag, 0, 4 ) == "ALC_" )
{
WysUseDrink( sTag, oTarget );
return;
}
}
if ( sTag == "ALC_RODDW" )
{
if ( GetObjectType( oTarget ) == OBJECT_TYPE_CREATURE )
{
// Note: If you use WYSDRUNK_DECCON it starts to compound upon
// itself with this function! Use WYSDRUNK_NOCON instead.
eEffect = EffectVisualEffect( VFX_IMP_HEAD_ODD );
ApplyEffectToObject( DURATION_TYPE_INSTANT, eEffect, oTarget );
WysMakeDrunkLevel( GetItemActivatedTarget( ), WYSDRUNK_UNCONSCIOUS,
WYSDRUNK_DECSTR | WYSDRUNK_NOCON | WYSDRUNK_NASTY |
WYSDRUNK_PUNISH );
return;
}
else
{
eEffect = EffectVisualEffect( 293 );
ApplyEffectToObject( DURATION_TYPE_INSTANT, eEffect, oPC );
SendMessageToPC( oPC, "Invalid target" );
return;
}
}
// Mount System
// Uses an integer on the item to determine the mount type.
// Twainer 28th May 2007
if( GetStringLeft(sTag, 13) == "twn_summount_" )
{
// check Mounted Status
if (GetPhenoType(oPC) > 2){ // Mounted
// Apply an implosion effect above the users head
float facing = GetFacing(oPC);
vector offset = GetPositionFromLocation(GetLocation(oPC)) + Vector(0.0, 0.0, 3.5);
location lvfx = Location(GetArea(oPC), offset, facing);
effect remove = EffectVisualEffect(VFX_FNF_IMPLOSION);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, remove, lvfx);
zep_Dismount(oPC);
} else { // NotMounted
// Code to allow areas to prohibit mounts
if (GetLocalInt(GetArea(oPC), "core_nomounts")){
SendMessageToPC(oPC, "No mounts allowed in here");
return;
}
// This is where we grab the mount type from the item
int nMount = StringToInt(GetStringRight(sTag, 2));
effect summon;
// Different effects for the "Exotic" mounts
if (nMount == 12 || nMount == 32)
summon = EffectVisualEffect(VFX_FNF_SUMMON_GATE);
else if (nMount == 13 || nMount == 33)
summon = EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL);
else
summon = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2);
ApplyEffectToObject(DURATION_TYPE_INSTANT, summon, oPC);
zep_Mount(oPC, OBJECT_INVALID, nMount);
}
return;
}
if ( GetStringRight( sTag, 7 ) == "_quiver" )
{
//create the arrows in a stack of 99 on the user
object oArrows = DbgCreateItemOnObject( GetStringLeft( sTag, GetStringLength( sTag ) - 7 ), oPC, 99 );
//identify the arrows for the user
SetIdentified( oArrows, 1 );
//Set arrows to plot so that they can not be sold
SetPlotFlag( oArrows, TRUE );
return;
}
//shard of returning
if ( pf_CanPortalOut( oPC ))
{
if( sTag == "ShardofReturning" )
{
pf_Portal( oPC, PORTAL_DEST_NARIA, "NariaCentalPortal" );
return;
}
//Bind Token: Badger Alley
if( sTag == "BindGemBadger" )
{
pf_Portal( oPC, PORTAL_DEST_DUSK, "NW_BADGERALLEYPORTAL" );
return;
}
//Bind Token: Insanity
if( sTag == "BindGemInsanity" )
{
pf_Portal( oPC, PORTAL_DEST_DUSK, "NW_INSANITYPORTAL" );
return;
}
//Bind Token: South Isle
if( sTag == "BindGemSouthIsle" )
{
pf_Portal( oPC, PORTAL_DEST_SOUTHISLE, "NW_SOUTHISLEPORTAL" );
return;
}
//Bind Token: Explorers Guild
if( sTag == "BindGemExplorer" )
{
pf_Portal( oPC, PORTAL_DEST_NARIA, "EXPLORERSGUILDPORTAL" );
return;
}
//Bind Token: Castle du Ralt
if( sTag == "BindGemCastle" )
{
pf_Portal( oPC, PORTAL_DEST_DUSK, "NW_CastleduRaltRoof" );
return;
}
//Bind Token: DM's Helper
if( sTag == "BindGemDMHelper" )
{
pf_Portal( oPC, PORTAL_DEST_DUSK, "WP_rlt_DMHelperInside" );
return;
}
//Bind Token: Western Islands
if( sTag == "BindGemWI" )
{
pf_Portal( oPC, PORTAL_DEST_DUSK, "WP_rlt_DMHelperInside" );
return;
}
}
// Ralt's Ball of Yarn
if ( sTag == "BallofYarn" )
{
ExecuteScript( "rlt_summonkitten", oPC );
return;
}
//Wand of perculiarities
if ( sTag == "alw_wand_wop" )
{
AssignCommand( oPC, ActionStartConversation( oPC, "alw_conv_wop", TRUE ));
return;
}
if ( sTag == "pf_buff_rod" )
{
ExecuteScript( "autocast_begin", oPC );
return;
}
//dorcheck wand activateitem
if ( sTag == "jk_DoorCheckDMWa" )
{
if ( !GetIsDM( oPC ))
DestroyObject( oItem );
else
AssignCommand( oPC, ActionStartConversation( oPC, "jk_doorcheckwand", FALSE, FALSE ));
return;
}
//Melee Buff Rune
if ( sTag == "MeleeBuffRune" )
{
DestroyObject( oItem, 1.0 );
return;
}
//Explorer's Guild Token
if ( sTag == "ik_guildtoken" )
{
AssignCommand( oPC, ActionStartConversation( oPC, "ik_tokencon", TRUE, FALSE ));
return;
}
//Cloak of the Wolf
if( sTag == "CloakoftheWolf" )
{
effect eWolf = EffectPolymorph( POLYMORPH_TYPE_WOLF );
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eWolf, oPC, 360.0 );
return;
}
//GreaterCloakoftheWolf
if( sTag == "GreaterCloakoftheWolf" )
{
effect eWWolf = EffectPolymorph( POLYMORPH_TYPE_WEREWOLF );
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eWWolf, oPC, 360.0 );
return;
}
//Player's Ear
if( GetResRef( oItem ) == "playerear" )
{
SendMessageToPC( oPC, "This is " + sTag + "'s ear." );
return;
}
//Potion of Harm
if( sTag == "PotionofHarm" )
{
object oTarget = GetItemActivator( );
int nDamage, nHeal;
effect eVis = EffectVisualEffect( 246 );
effect eVis2 = EffectVisualEffect( VFX_IMP_HEALING_G );
effect eHeal, eDam;
if ( GetRacialType( oTarget ) == RACIAL_TYPE_UNDEAD )
{
//Figure out the amount of damage to heal
nHeal = GetMaxHitPoints( oTarget ) - GetCurrentHitPoints( oTarget );
//Set the heal effect
eHeal = EffectHeal( nHeal );
//Apply heal effect and VFX impact
ApplyEffectToObject( DURATION_TYPE_INSTANT, eHeal, oTarget );
ApplyEffectToObject( DURATION_TYPE_INSTANT, eVis2, oTarget );
ExecuteScript( "core_post40_hp", oTarget );
}
else
{
nDamage = GetCurrentHitPoints( oTarget ) - d4( 1 );
// Check for metamagic
eDam = EffectDamage( nDamage, DAMAGE_TYPE_NEGATIVE );
// Apply the VFX impact and effects
DelayCommand( 1.0, ApplyEffectToObject( DURATION_TYPE_INSTANT, eDam, oTarget ));
ApplyEffectToObject( DURATION_TYPE_INSTANT, eVis, oTarget );
}
return;
}
//END Potion of Harm
//Begin script for DMs Rod of Nudity
// 1234567890123456
if ( sTag == "DMsRodofNudity" )
{
if ( GetIsPC( oTarget ))
{
AssignCommand( oTarget, ActionUnequipItem( GetItemInSlot( INVENTORY_SLOT_CHEST , oTarget )));
AssignCommand( oTarget, ActionUnequipItem( GetItemInSlot( INVENTORY_SLOT_HEAD , oTarget )));
AssignCommand( oTarget, ActionUnequipItem( GetItemInSlot( INVENTORY_SLOT_LEFTHAND , oTarget )));
AssignCommand( oTarget, ActionUnequipItem( GetItemInSlot( INVENTORY_SLOT_RIGHTHAND , oTarget )));
}
return;
}
//End script for DMs Rod of Nudity
//Sowrd of Dios
if( sTag == "SwordofDios" )
{
effect eDamage = EffectDamage(( 5*GetHitDice( oPC )));
if( !GetIsPC( oTarget ))
{
effect eVis = EffectVisualEffect( VFX_FNF_IMPLOSION );
ApplyEffectToObject( DURATION_TYPE_INSTANT, eDamage, oTarget );
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eVis, GetLocation( oTarget ));
eVis= EffectVisualEffect( VFX_FNF_WAIL_O_BANSHEES );
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eVis, GetLocation( oPC ));
}
return;
}
//Shard Blade
if( sTag == "ShardBlade" )
{
effect eDamage = EffectDamage(( 3*GetHitDice( oPC )));
if( !GetIsPC( oTarget ))
{
effect eVis = EffectVisualEffect( VFX_IMP_SLOW );
ApplyEffectToObject( DURATION_TYPE_INSTANT, eDamage, oTarget );
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eVis, GetLocation( oTarget ));
eVis= EffectVisualEffect( VFX_IMP_HASTE );
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eVis, GetLocation( oPC ));
AnnounceArea( GetName( oTarget )+" is rent by shards of the blade", oTarget );
}
return;
}
// Dice Bag
if ( sTag == "DiceBag" )
{
ExecuteScript( "pf_dicebag", oPC );
return;
}
//Party Stone
if ( sTag == "JK_PartyStone" )
{
AssignCommand( oPC, ActionStartConversation( oPC, "jk_partystone", TRUE ));
return;
}
//Vampiric ring
if( sTag == "VampiricRing" )
{
effect eDamage = EffectDamage( 5 );
effect eHeal = EffectHeal( 5 );
if( !GetIsPC( oTarget ))
{
if( GetHitDice( oPC ) > 9 )
{
effect eVis = EffectVisualEffect( VFX_IMP_NEGATIVE_ENERGY );
ApplyEffectToObject( DURATION_TYPE_INSTANT, eDamage, oTarget );
ApplyEffectToObject( DURATION_TYPE_INSTANT, eHeal, oPC );
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eVis, GetLocation( oTarget ));
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eVis, GetLocation( oPC ));
AnnounceArea( GetName( oTarget )+"'s blood drains from it's body", oTarget );
}
else
{
SendMessageToPC( oPC, "Your will is not strong enough to command this ring" );
}
}
return;
}
//dmw_activate
// ** This script goes in the OnItemActivation event of your Module
// ** Properties. It checks to see if the item used is a DM Helper
// ** And if so, and the user isnt a DM, destroys it, otherwise it
// ** Starts the DM Helper working.
if( sTag == "dmschelper" )
{
if( GetIsDM( oPC ) != TRUE )
{
object oTest = GetFirstPC( );
string sTestName = GetPCPlayerName( oPC );
int nFound = FALSE;
while ( GetIsObjectValid( oTest ) && ( ! nFound ))
{
if ( GetPCPlayerName( oTest ) == sTestName )
{
if( GetIsDM( oTest ))
{
nFound = TRUE;
}
else
{
DestroyObject( oItem );
SendMessageToPC( oPC, "You are mortal and this is not yours!" );
return;
}
}
oTest = GetNextPC( );
}
}
// get the wand's activator and target, put target info into local vars on activator
object oMyActivator = GetItemActivator( );
object oMyTarget = GetItemActivatedTarget( );
SetLocalObject( oMyActivator, "dmwandtarget", oMyTarget );
location lMyLoc = GetItemActivatedTargetLocation( );
SetLocalLocation( oMyActivator, "dmwandloc", lMyLoc );
//Make the activator start a conversation with itself
AssignCommand( oMyActivator, ActionStartConversation( oMyActivator, "dmwand", TRUE ));
return;
}
if( sTag == "AutoFollow" )
{
object oTarget = GetItemActivatedTarget( );
if( GetIsObjectValid( oTarget ))
{
AssignCommand ( oPC, ActionForceFollowObject( oTarget ));
}
return;
}
if( sTag == "WandOfFX" )
{
// get the wand's activator and target, put target info into local vars on activator
object oDM = GetItemActivator( );
object oMyTarget = GetItemActivatedTarget( );
SetLocalObject( oDM, "FXWandTarget", oMyTarget );
location lTargetLoc = GetItemActivatedTargetLocation( );
SetLocalLocation( oDM, "FXWandLoc", lTargetLoc );
object oTest=GetFirstPC( );
string sTestName = GetPCPlayerName( oDM );
// Test to make sure the activator is a DM, or is a DM
// controlling a creature.
if( GetIsDM( oDM ) != TRUE )
{
object oTest = GetFirstPC( );
string sTestName = GetPCPlayerName( oDM );
int nFound = FALSE;
while ( GetIsObjectValid( oTest ) && ( ! nFound ))
{
if ( GetPCPlayerName( oTest ) == sTestName )
{
if( GetIsDM( oTest ))
{
nFound = TRUE;
}
else
{
DestroyObject( oItem );
SendMessageToPC( oDM, "You are mortal and this is not yours!" );
return;
}
}
oTest=GetNextPC( );
}
}
//Make the activator start a conversation with itself
AssignCommand( oDM, ActionStartConversation( oDM, "fxwand", TRUE ));
return;
}
if( sTag == "EmoteWand" )
{
StartDlg( oPC, oItem, "pf_emotewand", TRUE, FALSE );
return;
}
//BEGIN jk_onactivate Script source
//Begin script for Stone of Statue Form
if( sTag == "StoneofStatueForm" )
{
//declarations
effect eStatueVis; //Statue form visual
effect eParalyze; //Paralyze effect
effect eImmunityFire; //Immunity to fire
effect eImmunityCold; //Immunity to cold
effect eImmunityAcid; //Immunity to acid
effect eImmunitySonic; //Immunity to sonic
effect eImmunityDivine; //Immunity to divine
effect eImmunityElec; //Immunity to electric
effect eImmunityMagic; //Immunity to magical energy
effect eImmunityNeg; //Immunity to negative energy
effect eImmunityPos; //Immunity to positive energy
effect eImmunityPierce; //Immunity to pierce
effect eImmunityBlunt; //Immunity to bludgeoning
effect eImmunitySlash; //Immunity to slash
int iPercent; //Percent Immunity
float fDuration; //Duration effect lasts
//setting values
iPercent = 100; //Percent Immunity
fDuration = 30.0; //Duration effect lasts in seconds
eStatueVis = EffectVisualEffect( VFX_DUR_PROT_STONESKIN );//Stoneskin visual
eParalyze = EffectParalyze( );//Paralyze effect
eImmunityFire = EffectDamageImmunityIncrease( DAMAGE_TYPE_FIRE, iPercent );//Fire Immunity
eImmunityCold = EffectDamageImmunityIncrease( DAMAGE_TYPE_COLD, iPercent );//Cold Immunity
eImmunityAcid = EffectDamageImmunityIncrease( DAMAGE_TYPE_ACID, iPercent );//Acid Immunity
eImmunitySonic = EffectDamageImmunityIncrease( DAMAGE_TYPE_SONIC, iPercent );//Sonic Immunity
eImmunityDivine = EffectDamageImmunityIncrease( DAMAGE_TYPE_DIVINE, iPercent );//Divine Immunity
eImmunityElec = EffectDamageImmunityIncrease( DAMAGE_TYPE_ELECTRICAL, iPercent );//Electrical Immunity
eImmunityMagic = EffectDamageImmunityIncrease( DAMAGE_TYPE_MAGICAL, iPercent );//Magical Immunity
eImmunityNeg = EffectDamageImmunityIncrease( DAMAGE_TYPE_NEGATIVE, iPercent );//Negative energy Immunity
eImmunityPos = EffectDamageImmunityIncrease( DAMAGE_TYPE_POSITIVE, iPercent );//Positive energy Immunity
eImmunityPierce = EffectDamageImmunityIncrease( DAMAGE_TYPE_PIERCING, iPercent );//Piercing Immunity
eImmunityBlunt = EffectDamageImmunityIncrease( DAMAGE_TYPE_BLUDGEONING, iPercent );//Bludgeoning Immunity
eImmunitySlash = EffectDamageImmunityIncrease( DAMAGE_TYPE_SLASHING, iPercent );//Slashing Immunity
//applying effects
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eStatueVis, oPC, fDuration ); //Stoneskin visual
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eParalyze, oPC, fDuration ); //Paralyze effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eImmunityFire, oPC, fDuration ); //Immunity to fire effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eImmunityCold, oPC, fDuration ); //Immunity to cold effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eImmunityAcid, oPC, fDuration ); //Immunity to acid effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eImmunitySonic, oPC, fDuration ); //Immunity to sonic effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eImmunityDivine, oPC, fDuration ); //Immunity to divine energy effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eImmunityElec, oPC, fDuration ); //Immunity to electric effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eImmunityMagic, oPC, fDuration ); //Immunity to magical energy effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eImmunityNeg, oPC, fDuration ); //Immunity to negative energy effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eImmunityPos, oPC, fDuration ); //Immunity to positive energy effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eImmunityPierce, oPC, fDuration ); //Immunity to piercing effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eImmunityBlunt, oPC, fDuration ); //Immunity to bludgeoning effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eImmunitySlash, oPC, fDuration ); //Immunity to slashing effect
return;
}
//End script for Stone of Statue Form
//Begin Medusa's cure
if ( sTag == "jk_MedusasCure" )
{
string sName = GetName( oTarget );
effect eBuff = GetFirstEffect( oTarget );
while ( GetIsEffectValid( eBuff ))
{
if ( GetEffectSubType( eBuff ) == SUBTYPE_SUPERNATURAL &&
GetEffectType( eBuff ) != EFFECT_TYPE_DAMAGE_INCREASE &&
GetEffectDurationType( eBuff ) == DURATION_TYPE_PERMANENT )
{
RemoveEffect( oTarget, eBuff );
SetStandardFactionReputation( STANDARD_FACTION_HOSTILE, 0, oTarget );
}
eBuff = GetNextEffect( oTarget );
}
SetLocalInt( GetModule( ), "MedusaStoned" + sName, 0 );
return;
}
//End Medusa's cure
//Begin script for Gort
if( sTag == "Gort" )
{
//declarations
effect eGortVis; //Gort visual
effect eStr; //Strength effect
effect eDex; //Dexterity effect
effect eCon; //Constitution effect
effect eWis; //Wisdom effect
effect eAttacks; //Number of attacks increase effect
effect eResistSlash; //Slashing damage resistance effect
effect eResistBlunt; //Bludgeoning damage resistance effect
effect eResistPierce; //Piercing damage resistance effect
int iResist; //Amount of resistance
int iStat; //Amount for stat increase
float fDuration; //Duration effect lasts
float fDown; //Duration hangover lasts
effect eDeath; //Death effect
effect eConfuse; //Confusion effect
effect eStrL; //Str lowering effect
effect eDexL; //Dex lowering effect
effect eConL; //Con lowering effect
effect eWisL; //Wis lowering effect
effect eDownVis; //Hangover visual
//setting values
iResist = 20; //Resist amount
iStat = 5; //Amount to alter stat
fDuration = 180.0; //Duration effect lasts in seconds as a floating number
fDown = 60.0; //Duration hangover lasts in seconds as a floating number
eGortVis = EffectVisualEffect( VFX_DUR_PROTECTION_GOOD_MINOR );//Gort visual
eStr = EffectAbilityIncrease( ABILITY_STRENGTH, iStat );//Raise Str by 10 effect
eDex = EffectAbilityIncrease( ABILITY_DEXTERITY, iStat );//Raise Dex by 10 effect
eCon = EffectAbilityIncrease( ABILITY_CONSTITUTION, iStat );//Raise Con by 10 effect
eWis = EffectAbilityIncrease( ABILITY_WISDOM, iStat );//Raise Wis by 10 effect
eAttacks = EffectModifyAttacks( 5 );//add five attacks
eResistSlash = EffectDamageResistance( DAMAGE_TYPE_SLASHING, iResist, 0 );//Slashing resist
eResistBlunt = EffectDamageResistance( DAMAGE_TYPE_BLUDGEONING, iResist, 0 );//Bludgeoning resist
eResistPierce = EffectDamageResistance( DAMAGE_TYPE_PIERCING, iResist, 0 );//Piercing resist
eDeath = EffectDeath( );//Death Effect
eConfuse = EffectConfused( );//Confusion effect
eStrL = EffectAbilityDecrease( ABILITY_STRENGTH, iStat );//Lower stat effect
eDexL = EffectAbilityDecrease( ABILITY_DEXTERITY, iStat );//Lower stat effect
eConL = EffectAbilityDecrease( ABILITY_CONSTITUTION, iStat );//Lower stat effect
eWisL = EffectAbilityDecrease( ABILITY_WISDOM, iStat );//Lower stat effect
eDownVis = EffectVisualEffect( VFX_DUR_MIND_AFFECTING_DOMINATED );//Hangover visual
//applying effects
int iRND;
iRND = d100( );
if (( iRND >= 1 ) && ( iRND <= 5 ))
{
ApplyEffectToObject( DURATION_TYPE_INSTANT, eDeath, oPC ); //Death effect 5% of the time
}
else if (( iRND >= 6 ) && ( iRND <= 15 ))
{
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eGortVis, oPC, fDuration ); //Gort visual
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eConfuse, oPC, fDuration ); //Confused effect 10% of the time
DelayCommand( fDuration, ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eDownVis, oPC, fDown )); //Str effect
DelayCommand( fDuration, ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eStrL, oPC, fDown )); //Str effect
DelayCommand( fDuration, ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eDexL, oPC, fDown )); //Dex effect
DelayCommand( fDuration, ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eConL, oPC, fDown )); //Con effect
DelayCommand( fDuration, ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eWisL, oPC, fDown )); //Wis effect
}
else if (( iRND >= 16 ) && ( iRND <= 100 ))
{
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eGortVis, oPC, fDuration ); //Gort visual
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eStr, oPC, fDuration ); //Str effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eDex, oPC, fDuration ); //Dex effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eCon, oPC, fDuration ); //Con effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eWis, oPC, fDuration ); //Wis effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eAttacks, oPC, fDuration ); //add 5 attacks effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eResistSlash, oPC, fDuration ); //Resist slashing effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eResistBlunt, oPC, fDuration ); //Resist bludgeoning effect
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eResistPierce, oPC, fDuration ); //Resist piercing effect
DelayCommand( fDuration, ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eDownVis, oPC, fDown )); //Str effect
DelayCommand( fDuration, ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eStrL, oPC, fDown )); //Str effect
DelayCommand( fDuration, ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eDexL, oPC, fDown )); //Dex effect
DelayCommand( fDuration, ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eConL, oPC, fDown )); //Con effect
DelayCommand( fDuration, ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eWisL, oPC, fDown )); //Wis effect
}
return;
}
//End script for Gort
//Begin script for Rune of Arrow Summoning
if( sTag == "RuneofArrowSummoning" )
{
//declare my variables
int iRND;
string sArrows = "NW_WAMMAR00" + IntToString( d8( ));
object oArrows = DbgCreateItemOnObject( sArrows, oPC, 99 );//create the arrows in a stack of 99 on the user
SetIdentified( oArrows, 1 );//identify the arrows for the user
SetPlotFlag( oArrows, TRUE );//Set arrows to plot so that they can not be sold
return;
}
//End script for Rune of Arrow Summoning
if( sTag == "HanzoRune" )
{
string sArrows;
switch( d8( ))
{
case 1:
case 2:
case 3:
sArrows = "whatever";
break;
case 4:
case 5:
case 6:
sArrows = "darkghost";
break;
case 7:
case 8:
sArrows = "thesnowman";
break;
}
//create the arrows in a stack of 99 on the user
object oArrows = DbgCreateItemOnObject( sArrows, oPC, 99 );
//identify the arrows for the user
SetIdentified( oArrows, 1 );
//Set arrows to plot so that they can not be sold
SetPlotFlag( oArrows, TRUE );
return;
}
//Begin script for The Raptured Rune of Arrow Summoning
if( sTag == "TheRapturedRuneofArrow" )
{
//declare my variables
string sArrows;
switch( d8( ))
{
case 1:
case 2:
sArrows = "therapturedarr";
break;
case 3:
case 4:
case 5:
sArrows = "nightmare";
break;
case 6:
case 7:
case 8:
sArrows = "ouch";
break;
}
object oArrows = DbgCreateItemOnObject( sArrows, oPC, 99 );//create the arrows in a stack of 99 on the user
SetIdentified( oArrows, 1 );//identify the arrows for the user
SetPlotFlag( oArrows, TRUE );//Set arrows to plot so that they can not be sold
return;
}
//Begin script for The Raptured Rune of Arrow Summoning
//Begin script for Tomahawk Case
if( sTag == "TomahawkCase" )
{
//create the axes in a stack of 50 on the user
object oAxes = DbgCreateItemOnObject( "jk_fireytomahawk", oPC, 50 );
//identify the axes for the user
SetIdentified( oAxes, 1 );
//Set axes to plot so that they can not be sold
SetPlotFlag( oAxes, TRUE );
}
//Begin script for Knockdown Rune
if( sTag == "KnockdownRune" )
{
effect eKnockDown = EffectKnockdown( );
//Set length of time for knowdown effect
float fDuration = 15.0;
//Set the effect shape, size and the location. Capture the first target object in the shape.
oTarget = GetFirstObjectInShape( SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation( oPC ), OBJECT_TYPE_CREATURE );
//Cycle through the targets within the area until an invalid object is captured.
while( GetIsObjectValid( oTarget ))
{
if( !GetIsReactionTypeFriendly( oTarget ) && !GetIsFriend( oTarget ) && oTarget != oPC )
{
ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eKnockDown, oTarget, fDuration );
}
//Select the next target within the area
oTarget = GetNextObjectInShape( SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation( oPC ), OBJECT_TYPE_CREATURE );
}
return;
}
//End script for Knockdown Rune
//Begin script for Value Rod
if( sTag == "ValueRod" )
{
//declare my variables
object oItem;
int iSlotID;
int nTotalInvValue = 0;
int nTotalEquipValue = 0;
for ( iSlotID = 0; iSlotID < NUM_INVENTORY_SLOTS; iSlotID++ )
{
oItem = GetItemInSlot( iSlotID, oTarget );
nTotalEquipValue = nTotalEquipValue + GetGoldPieceValue( oItem );
}
oItem = OBJECT_INVALID;
oItem = GetFirstItemInInventory( oTarget );
while ( GetIsObjectValid( oItem ))
{
nTotalInvValue = nTotalInvValue + GetGoldPieceValue( oItem );
oItem = GetNextItemInInventory( oTarget );
}
SendMessageToPC( oPC, GetName( oTarget ) + " has " + IntToString( nTotalEquipValue ) + " gold worth of items equiped." );
SendMessageToPC( oPC, GetName( oTarget ) + " has " + IntToString( nTotalInvValue ) + " gold worth of items in inventory." );
SendMessageToPC( oPC, GetName( oTarget ) + " has " + IntToString( nTotalInvValue + nTotalEquipValue ) + " gold worth of items in total." );
return;
}
//End script for Value Rod
//Begin script for Tomahawk Case
if( sTag == "TomahawkCase" )
{
//declare my variables
int iRND;
object oAxes = DbgCreateItemOnObject( "jk_fireytomahawk", oPC, 50 );//create the axes in a stack of 50 on the user
SetIdentified( oAxes, 1 );//identify the axes for the user
SetPlotFlag( oAxes, TRUE );//Set axes to plot so that they can not be sold
return;
}
//End script for Tomahawk Case
//Begin script for JBoys DM Wand
if( sTag == "JBoysDMWand" )
{
if ( !GetIsDM( oPC ))
{
DestroyObject( oItem );
SendMessageToPC( oPC, "You should not have this." );
return;
}
else
{
SetLocalObject( oPC, "JBoysDMWandTarget", oTarget );
AssignCommand( oPC, ActionStartConversation( oPC, "JBoysDMWand", TRUE ));
}
return;
}
//End script for JBoys DM Wand
//END jk_onactivate Script source
//BEGIN DM NPC WAND
if ( sTag == "npcaction" ) // NPC Control Rod
{
// Add a check to validate that GetIsDM( oPC ) is true to limit this item to DM usage.
SetLocalString( oPC, "jg_conv_script", "jg_npc_action" );
SetLocalInt( oPC, "jg_conv_state", 0 );
SetLocalObject( oPC, "jg_conv_target", oTarget );
AssignCommand( oPC, ActionStartConversation( oPC, "jg_data_driven", TRUE ));
return;
}
if ( sTag == "template" ) // example data driven conversation template
{
SetLocalString( oPC, "jg_conv_script", "jg_dd_template" );
SetLocalInt( oPC, "jg_conv_state", 0 );
SetLocalObject( oPC, "jg_conv_target", oTarget );
AssignCommand( oPC, ActionStartConversation( oPC, "jg_data_driven", TRUE ));
return;
}
//END DM NPC WAND
//BEGIN tournamentwand
if ( sTag == "tournamentwand" )
{
if ( oTarget == oPC )
{
AssignCommand( oPC, ActionStartConversation( oPC, "ath_tournyconv", TRUE ));
}
if ( oTarget != oPC )
{
if ( HasItem( oTarget, "TournamentContenderRune" ) == 0 )
{
SendMessageToPC( oPC, "Target Not In Tournament" );
}
if ( HasItem( oTarget, "TournamentContenderRune" ) == 1 )
{
object oItem = GetFirstItemInInventory( oTarget );
object oDestroy;
while ( GetIsObjectValid( oItem ))
{
if ( sTag == "TournamentContenderRune" ) oDestroy = oItem;
SendMessageToPC( oTarget, "You have been removed from the Tournament, Thank you for Participating." );
oItem = GetNextItemInInventory( oTarget );
}
DestroyObject( oDestroy );
}
}
return;
}
//END tournamentwand
//Begin Script for pipe
if ( sTag == "pipe" )
{
location lLoc;
if( GetIsObjectValid( oItem ))
{
//they need something to smoke in it...
object oBud = GetItemPossessedBy( oPC, "witchbud" );
AssignCommand( oPC, ClearAllActions( ));
if( oBud != OBJECT_INVALID ){
//apply effects
AssignCommand( oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_DRINK ));
GetHigh( oPC );
DelayCommand( 1.0f, GenerateSmoke( oPC, TRUE ));
//destroy the smoked bud
DestroyObject( oBud );
}
else
{
AssignCommand( oPC, ActionSpeakString( "I don't have anything to smoke in it!" ));
}
}
return;
}
//End Script for pipe
//Begin Script for witchweed
if ( sTag == "witchseeds" )
{
location lLoc;
if( GetIsObjectValid( oItem ))
{
if( GetIsObjectValid( oPC ))
{
string sAreaTag = GetTag( GetArea( oPC ));
//if ( sAreaTag == "UnknownForrest" || sAreaTag == "BoxCanyonA" || sAreaTag == "BoxCanyonB" || sAreaTag == "HomeAgain" ){
AssignCommand( oPC, ClearAllActions( ));
AssignCommand( oPC, ActionMoveToLocation( lLoc, TRUE ));
DelayCommand( 3.f, CreateNewPlant( oPC ));
DestroyObject( oItem, 3.f );
//}
//else
//{
// AssignCommand( oPC, ActionSpeakString( "There's no where to plant it." ));
//}
}
}
return;
}
//End Script for witchweed
// DM QP Wand
// DM QP control
////////////////////////////////////////////////
/*
if ( sTag == "jk_DMQPWand" )
{
AssignCommand( oPC, ActionStartConversation( oPC, "jkdmqpwand", TRUE, FALSE ));
SetLocalObject( oPC, "Target", oTarget );
}
*/
if ( sTag == "scy_book_aventia" )
{
AssignCommand(oPC, ActionStartConversation(oPC, "scy_book_aventia", TRUE, FALSE));
return;
}
if( GetResRef( oItem ) == "tal_qpwand" )
{
SetLocalObject( oPC, "otarg", oTarget );
AssignCommand( oPC, ActionStartConversation( OBJECT_SELF, "tal_qpwand", TRUE, FALSE ));
return;
}
if( GetResRef( oItem ) == "tal_qpcheckwand" )
{
SetLocalObject( oPC, "otarg", oPC );
AssignCommand( oPC, ActionStartConversation( OBJECT_SELF, "tal_qpchecker", TRUE, FALSE ));
return;
}
// ROD OF EXPLODY GOODNESS
// Giving new meaning to DM Power Abuse
////////////////////////////////////////////////
if ( sTag == "dmt_dynarod" )
{
int iIsDM = GetIsDM( oPC );
// If player is not a DM light a fuse on him, make him speak and remove the Rod
if ( !GetIsDM( oPC ))
{
ExecuteScript( "dmt_keg_burn", oPC );
AssignCommand( oPC, SpeakString( "*Sniff Sniff* Can you smell something burning?" ));
DestroyObject( oItem );
}
// If he is a DM, take his orders.
else
{
object oTarget = GetItemActivatedTarget( );
if( GetIsObjectValid( oTarget ))
{
ExecuteScript( "dmt_keg_burn", oTarget );