Most if it was already inside my Planar Traits scripts, so I just put it here too. Let's players add onhit cast spells to weapons (except ranged), ammunition, gloves, armour and shields. Players must have one specific feat and 2 skills to forge. The resultant property is given a % chance to cast too. It starts at 5% and subsequent forging with the same spell adds 1% upto a maximum of 20%. This way they can still cast but maybe only once per round. This should make the item property useful but restricted from too much lag on your server. This should also work for player crafted scrolls.
Adding the erf
--------------
Import the planareffects.erf. You import 7 scripts and 3 items. For only Onhit cast forgin you are concerned with:
- OnHit Cast Spell Forging Book
- its Activate Item script i_vl_onhitbook_ac
- OnHit Scroll
- its Activate item script i_vl_onhitscroll_ac
- vl_inc_planar - the header file
- vl_spellhook - either use this as your spellhook or copy and paste the #include line and the 5 lines to your spellhook.
- to set a spell hook on your module set the local string X2_S_UD_SPELLHOOK = the name of the spellhook file
Forging Requirements
--------------------
- Feat Craft Magical Arms and Armor
- Craft Weapon or Armor skill
- Spellcraft skill
- a spell scroll
- any melee weapon, ammunition, gloves, armour or shield
Forging the OnHit Scroll
------------------------
- For phase 1 you cast the your OnHit Cast Book's OnActivate spell at the spell scroll
- it runs a Spellcraft skill check versus DC 15 + the spell's level
- On Success the scroll is detroyed and an OnHit Cast Scroll is created in the caster's inventory
- Read the OnHot Scroll created for the next phase
Forging the On Hit Spell on an item
-----------------------------------
- Cast the OnHit Scroll at item
- Requires the Craft Magical Arms and Armor feat
- It runs a Craft Weapon or Armor Skill check versus the 15 + spell level, depending on the item type
- On Success the scroll is destroyed and the item gains an OnHit Cast Spell
- The caster of this phase sets the level the spell cast's at with their Spellcraft skill
- Inital forging or a different spell start at 5%
- The maximum % to chance to cast is 20%
- if no spellcraft, then no spell property
10 - A Masterpiece, Genuinely Groundbreaking 9 - Outstanding, a Must Have 8 - Excellent, Recommended to Anyone 7 - Very Good, Deserves a Look 6 - Good, Qualified Recommendation 5 - Fair, Solid yet Unremarkable 4 - Some Merit, Requires Improvements 3 - Poor Execution, Potential Unrealized 2 - Very Little Appeal 1 - Not Recommended to Anyone