Jump to content
  • 0

Passive skill creation - Super Novice Mastery - Allow to wear any equipment based on level


Question

Posted (edited)

Hello,

I'm encountering difficulties to create a passive skill that allows a supernovice to wear any weapon and equipment based on the snippet modification of SL_supernovice (soul link super novice spirit). Here the code I found that is working and allows the supernovice to wear any weapon; but range weapons and typical job weapons; and equipment once the skill is cast:

if (sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_SUPERNOVICE) {

//Spirit of Super Novice equip bonuses. [Skotlex]

if (item && sd && sd->status.base_level > 90 && (item->equip & (EQP_HELM | EQP_ARMOR | EQP_SHIELD | EQP_GARMENT | EQP_SHOES | EQP_ACC | EQP_ARMS)))

return ITEM_EQUIP_ACK_OK;

if (sd->status.base_level > 96 && item->equip & EQP_ARMS && item->type == IT_WEAPON)

switch (item->subtype) { //In weapons, the look determines type of weapon.

case W_DAGGER: //All level 4 - Daggers

case W_1HSWORD: //All level 4 - 1H Swords

case W_1HAXE: //All level 4 - 1H Axes

case W_MACE: //All level 4 - 1H Maces

case W_STAFF: //All level 4 - 1H Staves

case W_2HSTAFF: //All level 4 - 2H Staves

return ITEM_EQUIP_ACK_OK; } } }

 

I tried to modify the snippet to make the effect to apply as long as the skill is learned, but it seems incorrect:

 

if (pc_checkskill(sd, SL_SUPERNOVICE) > 0) {
    // Allow equipping of all items specific to the Super Novice class
    if (item->equip & (EQP_HELM | EQP_ARMOR | EQP_SHIELD | EQP_GARMENT | EQP_SHOES | EQP_ACC | EQP_ARMS)) {
        return ITEM_EQUIP_ACK_OK;
    }

    // Allow equipping specific weapon types regardless of the level
    if (item->equip & EQP_ARMS && item->type == IT_WEAPON) {
        switch (item->subtype) {
        case W_DAGGER:    // Daggers
        case W_1HSWORD:   // 1H Swords
        case W_1HAXE:     // 1H Axes
        case W_MACE:      // 1H Maces
        case W_STAFF:     // 1H Staves
        case W_2HSTAFF:   // 2H Staves
            return ITEM_EQUIP_ACK_OK;
        }
    }
}

 

 

And of course the goal is to remove the level restriction for the effect to apply, so the equipment limitation is only based on the level required to wear it.

I tried to put the skill in various files such as pc.cpp, status.cpp, skill.cpp, but it doesn't seem to work.

If there is a soul that could help me to make this work, i'd be grateful 

Edited by Faust

1 answer to this question

Recommended Posts

  • 0
Posted

Here the snippet i've added to create a passive skill:

 

    //SUPERNOVICE LINK GIVES PASSIVE ATTRIBUTES // Put before SC_STRIPWEAPON
    if (pc_checkskill(sd, SN_MASTERY) > 0) {
        //Spirit of Super Novice equip bonuses. [Skotlex]
        if (item && (item->equip & (EQP_HELM | EQP_ARMOR | EQP_SHIELD | EQP_GARMENT | EQP_SHOES | EQP_ACC | EQP_ARMS))) {
            return ITEM_EQUIP_ACK_OK;
        }
        if (item->equip & EQP_ARMS && item->type == IT_WEAPON)
            switch (item->subtype) { //In weapons, the look determines type of weapon.
            case W_DAGGER: //All level 4 - Daggers
            case W_1HSWORD: //All level 4 - 1H Swords
            case W_1HAXE: //All level 4 - 1H Axes
            case W_MACE: //All level 4 - 1H Maces
            case W_STAFF: //All level 4 - 1H Staves
            case W_2HSTAFF: //All level 4 - 2H Staves
                return ITEM_EQUIP_ACK_OK;
            }
    }

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...