Updated AMS marker feats. Removed arcane & divine marker feats. Updated Dread Necromancer for epic progression. Updated weapon baseitem models. Updated new weapons for crafting & npc equip. Updated prefix. Updated release archive.
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
#include "prc_alterations"
|
|
#include "x2_inc_spellhook"
|
|
|
|
void main()
|
|
{
|
|
object focus = GetItemPossessedBy(OBJECT_SELF, "ArchmagesFocusofPower");
|
|
|
|
/* Setup mode */
|
|
if (!GetIsObjectValid(focus) || GetLocalInt(focus, "spell_like_present") != TRUE)
|
|
{
|
|
/* No focus yet, make one */
|
|
focus = CreateItemOnObject("archfocusofpower", OBJECT_SELF, 1);
|
|
|
|
SetLocalInt(focus, "spell_like_setup", 1);
|
|
|
|
/* Save old hook, if any */
|
|
SetLocalString(OBJECT_SELF, "spelllike_save_overridespellscript", PRCGetUserSpecificSpellScript());
|
|
|
|
/* Setup the global spellhok so we can intercept the next spell */
|
|
PRCSetUserSpecificSpellScript("archmage_spelllk");
|
|
|
|
FloatingTextStringOnCreature("Spell-Like ability setting up, now cast the spell to store to finish the process.", OBJECT_SELF, FALSE);
|
|
|
|
/* And now some nifty spell effects */
|
|
effect eVis = EffectVisualEffect(VFX_FNF_SUNBEAM);
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
|
|
|
return;
|
|
}
|
|
/* Still not setup */
|
|
else if (GetLocalInt(focus, "spell_like_setup"))
|
|
{
|
|
FloatingTextStringOnCreature("Spell-Like ability setting up, now cast the spell to store to finish the process.", OBJECT_SELF, FALSE);
|
|
}
|
|
/* Ok */
|
|
else
|
|
{
|
|
int spell_id = GetLocalInt(focus, "spell_like_spell");
|
|
int meta = GetLocalInt(focus, "spell_like_meta");
|
|
|
|
/* Cast it */
|
|
ActionCastSpellAtObject(spell_id, PRCGetSpellTargetObject(), meta, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
|
|
}
|
|
}
|
|
|