Login
User Name:

Password:



Register

Forgot your password?
void nanny_get_new_race -- comm.c
Mar 13, 2025 7:08 am
By Elwood
IPv6
Jan 25, 2025 10:45 pm
By Samson
mudstrlcpy and mudstrlcat
Jan 18, 2025 5:23 pm
By Samson
I3 and IMC
Jan 17, 2025 9:35 pm
By Samson
AFKMud 2.5.1
Jan 17, 2025 2:22 pm
By Samson
SWFotEFUSS 1.5.3
Author: Various
Submitted by: Samson
SWRFUSS 1.4.3
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.8
Author: Various
Submitted by: Samson
AFKMud 2.5.2
Author: AFKMud Team
Submitted by: Samson
SmaugFUSS 1.9.7
Author: Various
Submitted by: Samson
Users Online
Anthropic, AhrefsBot, Bing, Bytespider

Members: 0
Guests: 15
Stats
Files
Topics
Posts
Members
Newest Member
507
3,812
19,722
592
ShariFrazi

» SmaugMuds » General » Building » How do I add a spell at 100% ...
Forum Rules | Mark all | Recent Posts

How do I add a spell at 100% to a race or class?
< Newer Topic :: Older Topic >

Pages:<< prev 1, 2 next >>
Post is unread #21 Apr 27, 2009 9:18 pm   
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

 
ch->pcdata->learned[gsn_fireball] = 100;

Would need the race ifcheck too, of course.

Post is unread #22 Apr 27, 2009 10:10 pm   
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005

 
Hm. That's nifty. Never tried to do that before.. *cough*

Post is unread #23 Apr 29, 2009 7:04 am   
Go to the top of the page
Go to the bottom of the page

irbobo
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.

Post is unread #24 Apr 29, 2009 8:43 am   
Go to the top of the page
Go to the bottom of the page

David Haley
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.

Pages:<< prev 1, 2 next >>