Aller au contenu

Photo

Custom Wand script for increased Use Magical Device Requirement?


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Xeneize

Xeneize
  • Members
  • 133 messages

Is it possible to somehow modify the way wands work as though to make it you must have a custom amount of Use Magical Device (Example, 25) to be able to use them?



#2
kevL

kevL
  • Members
  • 4 056 messages
seems like script, x2_pc_umdcheck

    if (GetIsSkillSuccessful(oCaster, nSkill, 25 + nInnateLevel))
    {
        return TRUE;
    }
note, though, it bypasses all but scrolls unless this is changed:

    // -------------------------------------------------------------------------
    // Only Scrolls are subject to our default UMD Check
    // -------------------------------------------------------------------------
    int nBase = GetBaseItemType(oItem);
    if (nBase != BASE_ITEM_SPELLSCROLL)
    {
        // spell not cast from a scroll
        return TRUE;
    }
- try putting some debug at the top of X2_UMD() to find out if/when it's actually firing for wands ...

2 other possibilities: if it's a wand with a unique tag, try using a tag-based script for it. Or, for general wand usage, an alternate is to try placing an extra condition into the module's onItemActivate script.
  • Xeneize aime ceci

#3
Xeneize

Xeneize
  • Members
  • 133 messages

Will try that, many thanks.