Yes, that sounds like a good idea... (like a DM Harm Rod - though not as powerful as harm)
Maybe one that took say 10% of the monster's Hit Points / Use..?
Let me draw this up for you, I love tagbased scripting..
Here is your script...
//script name: dm_harm_rod (make an item with this exact tagname)
//Don't forget to give the item the Cast Spell: Activate Item (Long Range) property..(unlimited uses / day)
//////////////////////////////////////////////////////////////////////////
//Created By: Geinsys (Guile)
//Created On: 9/02/10
/////////////////////////////////////////////
/*
This tagbased item will take 10% of the
target's hit points, only a DM may use
this item! No Visual Effect is used..
*/
/////////////////////////////////////////////
//Set this to FALSE if you want PC's allowed to use this DM item
//this means DM's can log on as a player and use it....
const int DM_USE_ONLY = TRUE; //Default = TRUE (Only a DM can use it)
//////////////////////////////////////////////////////////////////////////////
//Required Include
#include "x2_inc_switches"
//////////////////////////////////////////////////////////////////////////////
//Main Script
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
if(nEvent != X2_ITEM_EVENT_ACTIVATE)return;
//Define all Variables here..
object oPC = GetItemActivator();
object oTarget = GetItemActivatedTarget();
object oItem = GetItemActivated();
int nHP, nInt;
string sMsg, sName, sID;
effect eDamage;
if(DM_USE_ONLY == TRUE)
{
if(!GetIsPC(oPC))
{
DestroyObject(oItem, 0.0);
FloatingTextStringOnCreature("You are not a DM!", oPC, FALSE);
sName = GetName(oPC);
sID = GetPCPlayerName(oPC);
sMsg = "***WARNING*** - " + sName + " / " + sID + " / Has used the DM Harm Rod AS A PC!!";
WriteTimestampedLogEntry(sMsg); //Tell the Admin about this problem..
}
}
nHP = GetCurrentHitPoints(oTarget);
if(nHP >=10)
{
nInt = nHP / 10; //10% of the targets current hit points
}
//Otherwise they only have 9 or less Hit Points
else { nInt = 1; } // always deal at least 1 dmg
//NOTE: Some monsters may have damage immunity or resistance to positive damage!
//this of course would lower the amount of damage dealt by this rod (rare)
eDamage = EffectDamage(nInt, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_NORMAL);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget, 0.0);
}
Modifié par Genisys, 03 septembre 2010 - 12:30 .