



Sorcerer

GroupMembers
Posts723
JoinedMar 5, 2005
ch->pcdata->learned[gsn_fireball] = 100;
Would need the race ifcheck too, of course.



Magician

GroupMembers
Posts169
JoinedNov 29, 2005
Hm. That's nifty. Never tried to do that before.. *cough*



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.



Sorcerer

GroupMembers
Posts902
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.