I have made a skill that creates a weapon that gains certain wear spells at certain levels. The problem with it I have is it unfortunately uses spell sn numbers which change when you add a new spell and reboot. What would be the easiest way to fix this do you guys think. I have more then one affects on the object, and want the affects to happen at certain levels or I'd just use oset <object> affected weaponspell <sn>
if(ch->level > 10 ) { CREATE(paf, AFFECT_DATA, 2); paf->type = -1; paf->duration = -1; paf->location = APPLY_WEAPONSPELL; paf->modifier = 263; /* This is the sn number of the spell */ LINK(paf, obj->first_affect, obj->last_affect, next, prev); }
I have made a skill that creates a weapon that gains certain wear spells at certain levels. The problem with it I have is it unfortunately uses spell sn numbers which change when you add a new spell and reboot. What would be the easiest way to fix this do you guys think. I have more then one affects on the object, and want the affects to happen at certain levels or I'd just use oset <object> affected weaponspell <sn>
if(ch->level > 10 )
{
CREATE(paf, AFFECT_DATA, 2);
paf->type = -1;
paf->duration = -1;
paf->location = APPLY_WEAPONSPELL;
paf->modifier = 263; /* This is the sn number of the spell */
LINK(paf, obj->first_affect, obj->last_affect, next, prev);
}
I appreciate all ideas.
Thanks,
Vladaar