How do I add a spell at 100% to a race or class?
< Newer Topic
:: Older Topic >
#21 Apr 27, 2009 9:18 pm
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005
ch->pcdata->learned[gsn_fireball] = 100;
Would need the race ifcheck too, of course.
#22 Apr 27, 2009 10:10 pm
Magician
GroupMembers
Posts169
JoinedNov 29, 2005
Hm. That's nifty. Never tried to do that before.. *cough*
#23 Apr 29, 2009 7:04 am
Fledgling
GroupMembers
Posts16
JoinedApr 8, 2009
Zeno said:ch->pcdata->learned[gsn_fireball] = 100;
Would need the race ifcheck too, of course.
I must say that is pretty clean.
#24 Apr 29, 2009 8:43 am
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007
Another solution that doesn't require adding global variables for each skill you want to find is to look up the skill name in the skill table using the function skill_lookup (or whatever it's called) -- this will perform a binary search, which is much faster than a linear scan.