We put in code that allows skill %ages to actually go over 100%, in certain
cases, like in the event you have an item that boost skill %age. Might want
to put a check in for that in the APPLY_SKILL

case APPLY_SKILL:  !IS_NPC(ch) && ch->pcdata->learned[(sn =
skill_lookup(paf->name))]  &&
(ch->pcdata->learned[sn=skill_lookup(paf->name))] + mod <= 100) ?
ch->pcdata->learned[sn] += mod; break;

so that, in case your code is set to the standard 100% limit, it won't
increase over that with the mod added. It actually probably won't matter
much, but I like to get my 2 cents in now and again to make myself feel
useless. I mean useful.

-Crypt

----- Original Message -----
From: "Richard Lindsey" <[EMAIL PROTECTED]>
To: "Mervine, Keith" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Thursday, April 15, 2004 2:16 PM
Subject: RE: Objects that help Learned % on skills


Oh I see, a temporary thing... well that's kind of a tricky one, cuz
it's either gonna involve the use of some precompiler definitions to
write a new field to your area files and save you a ton of trouble, or
you'll have to just create a new structure... the less-sloppy way would
be to use the precompiler definitions, but I don't want to go into all
that detail, so I'll tell ya how it can be done, and getting the area
files taken care of can be your problem :) but bear in mind that you'll
have to do something about them, because right now they're set to only
read 2 integer values for an affect, location and modifier, you'll also
need to add a little chunk into save.c to make pfiles read in w/ the new
affect_data field... in summary (minus the area and save tinkering)
you'll probably want to do something like this:

Add a char *name (or whatever) field to the affect_data structure...

Declare an APPLY_SKILL value in merc.h
In handler.c, in void affect_modify, add a line line this:

case APPLY_SKILL:  !IS_NPC(ch) && ch->pcdata->learned[(sn =
skill_lookup(paf->name))] ? ch->pcdata->learned[sn] += mod; break;

that way it'll only add the affect if they actually have the skill, and
they're a player (NPC's have no pcdata)... then just create a command to
add the apply to an object, or modify any current commands for that
(i.e. Mike Barton's do_add command he just posted, or do_enchant on my
own mud, etc) to take a char * argument as well as an integer value...

Richard Lindsey

-----Original Message-----
From: Mervine, Keith [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 1:06 PM
To: Richard Lindsey; [email protected]
Subject: RE: Objects that help Learned % on skills

An object that when worn boosts the skill percentage by X

IE

Ring of Fire
Boosts Fireball spell by 5%



-----------------------------------------------------------------------
| Keith Mervine                                                       |
| "Non Omnis Moriar"                                                  |
| "You look in the mirror, but someone else looks back.               |
| You remember a life you never had, one that cannot be yours.        |
| You are the piece that does not fit, you don't belong in this game. |
| The board has been knocked over, you shall be swept away."          |
|                                                                     |
| Service Management Application Developer                            |
| International Monetary Fund                                         |
| [EMAIL PROTECTED]                                                    |
| 202-623-7610                                                        |
-----------------------------------------------------------------------


> -----Original Message-----
> From: Richard Lindsey [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 15, 2004 1:47 PM
> To: Mervine, Keith; [email protected]
> Subject: RE: Objects that help Learned % on skills
>
>
> What exactly do you mean by this? Like meditation balls that help
> improve your meditation skill when you use them or something?
> Or do you
> mean just having an item in your inventory, like some sort of magic
> skill enhancer, that randomly boosts a person's skill % in something?
>
> Richard Lindsey
>
> -----Original Message-----
> From: Mervine, Keith [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 15, 2004 12:46 PM
> To: [email protected]
> Subject: Objects that help Learned % on skills
>
> IS there anyway to do this?  If not does it sound easy to do?
> I'm going to try but if anyone already has this in a snippet it
> would save me some time.  Thanks!
>
> Keith
>
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.12 GPA d- s: a C++++ UL+++ P+ L+ E--- W+++ N+++ o K w++  O-
> M-- V PS+  PE Y+ PGP>++ t+ 5- X R+++ tv+ b+++ DI++++ D--- G e h----
> r+++ y+++
> ------END GEEK CODE BLOCK------
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>

--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom

Reply via email to