Login
User Name:

Password:



Register

Forgot your password?
Bug in will_fall( )
Nov 25, 2019 11:10 pm
By GatewaySysop
Dusting off the old code...
Nov 2, 2019 6:52 pm
By Remcon
ADD NEW SD_DAMTYPES
Nov 1, 2019 8:02 pm
By Remcon
Forum Search/User Post History
May 13, 2019 12:43 pm
By Keirath
AFKMud 2.2.2
Mar 3, 2019 5:35 pm
By Samson
SmaugFUSS 1.9.3
Author: Various
Submitted by: Samson
AFKMud 2.2.2
Author: AFKMud Team
Submitted by: Samson
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl

Members: 0
Guests: 0
Stats
Files
Topics
Posts
Members
Newest Member
482
3,749
19,419
596
JulietNdr

Today's Birthdays
There are no member birthdays today.
» 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
Posts722
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
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.

Pages:<< prev 1, 2 next >>