-okay, the new death arrow relies on the arcane archer's class lvl to determine the fort DC
-okay, the assassin arrows the script is done but i don't know how to script the EXACT line in the Module OnActivateItem something along the line of an ExecuteScript...but when i do it causes an error...
*if ya can help thanks...i'll prolly be post more scripts here
[snapback]14535[/snapback]
I'm not sure what yo uwant for the dc, but you can easy change it to what you like.
#include "X0_I0_SPELLS"
#include "x2_inc_itemprop"
int getlevel(object oPC)
{
int lvl = GetLevelByPosition(1, oPC) + GetLevelByPosition(2, oPC) + GetLevelByPosition(3, oPC);
return lvl;
}
void main()
{
int nBonus = nBonus = ArcaneArcherCalculateBonus();
object oTarget = GetSpellTargetObject();
//set the dc to 10 + 2*arcane archers level
//change it here if this isn't the dc calculation you want
int iDC = 10 + (getlevel(OBJECT_SELF)*2);
if (GetIsObjectValid(oTarget) == TRUE)
{
// * Roll Touch Attack
int nTouch = TouchAttackRanged(oTarget, TRUE);
if (nTouch > 0)
{
int nDamage = ArcaneArcherDamageDoneByBow((nTouch ==2));
if (nDamage > 0)
{
effect ePhysical = EffectDamage(nDamage, DAMAGE_TYPE_PIERCING,IPGetDamagePowerConstantFromNumber(nBonus));
effect eMagic = EffectDamage(nBonus, DAMAGE_TYPE_MAGICAL);
ApplyEffectToObject(DURATION_TYPE_INSTANT, ePhysical, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eMagic, oTarget);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
// * if target fails a save against iDC they die
if (MySavingThrow(SAVING_THROW_FORT, oTarget, iDC) == 0)
{
effect eDeath = EffectDeath();
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget);
}
}
}
}
}
About the other script, could you say what the error is. It will prolly save me time so I'll wait till you post that :P
-Mel
not really sure...i deleted the line, but all i need is what is the line to get an item's unique power(OnHit) to fire when it hits a player
"void ExecuteScript(string sScript, object oTarget)"
-sScript would be the "assassinarrows" script
-oTarget would be well...the target(which has to be a PC or creature)
dun tell me....
string sScript = assassinarrow;
object oTarget = GetNearestCreature();
ExecuteScript(sScript, oTarget);
<-something like that?
*and here's yet another script...i prolly forgot to put something down, it's completely compiled but i tested it and only did fire...
[snapback]14538[/snapback]
effect eShield = EffectDamageShield(nDuration, DAMAGE_BONUS_1d6, DAMAGE_TYPE_FIRE);
effect eShield2 = EffectDamageShield(nDuration, DAMAGE_BONUS_1d4, DAMAGE_TYPE_FIRE);
No wonder it only does fire :P
How about changing DAMAGE_TYPE_FIRE to DAMAGE_TYPE_COLD for the 1d6 line?
And about activate item(onhit), I think the normal way you use for activate item(cast) should work for activate item(onhit) too. Never did try it.
Anyway, I'll look at it later.
-Mel
btw: in the interest of all those who would whine that Elemental shield is over powered i changed it to 1d6 fire and 3 cold SO PIKE OFF! (revised my post about saying the dmg type was fixed....it wasn't :glare: )
[snapback]14541[/snapback]
:huh: is it fixed now or not? Those post are a bit mixed you know :wacko:
Btw, always rebuild the mod a time, to be sure your changes are in effect.
You also can try whitout linking it and then link 1 by 1 to see where it goes wrong, if it doesn't works.
-Mel
well it's sorta fixed....it does 2 instances of fire dmg per hit...or is it suppose to do that :blink:
[snapback]14548[/snapback]
It should do 1 cold 1 fire if you changed that damage type and rebuild the mod.
Otherwise there might be something whit the linking.
Or did you take out the links?
-Mel
i'm building the mod now...something tells me 200mb is not gonna be fun the build :( as for the linking yep, but it still did only fire...think i gotta build
[snapback]14554[/snapback]
Somethimes I have to export everything and import everything i na fresh mod to make a script work, I dunno why exactly. But that already happend a few time to me.
-Mel