if ( !IS_NPC(ch) && ch->level < LEVEL_IMMORTAL )
// If the target is not an NPC (i.e. is a player) and is a mortal.
{
kigain = number_range( 30, 40);
// set kigain to a number between 30 and 40, don't change anything in the char yet.
kigain *= get_curr_con(ch) / 5;
// Yes, the kigain variable is now multiplied by the character's con/5.
kicheck = (ch->skigain * ch->skigain) * 1000;
// I am not familiar with skigain…But it looks like it is setting some threshold value here for the next line.
// It seems that if your skigain is high enough, then you need to reduce it somehow but that is not in this code.
if (kicheck <= ch->exp)
// if kicheck is less or equal to characters exp(powerlevel) then,
{
ch->max_mana += kigain;
// Increase the char's max mana value by kigain.
ch_printf(ch, "You feel stronger all of the sudden. You gain %d energy!\n\r", kigain);
//just a print….
ch->skigain += 1;
// Increasing skigain, again there should be another place in the code that manages it.
}
pracgain = 1;
//pracgain value set to 1
praccheck = (ch->spracgain * ch->spracgain) * 250000;
//praccheck is equal to spracgain * spracgain, * 250k
if (praccheck <= ch->exp)
//if praccheck value is less than characters xp then,
{
ch->practice += pracgain;
//characters practices + pracgain value I think???
ch_printf(ch, "You have gained %d practice session(s)\n\r", pracgain);
ch->spracgain += 1;
//This is similar to the skigan stuff above - Check the code.
}
statgain = 1;
statcheck = (ch->statgain * ch->statgain) * 10000;
if (statcheck <= ch->exp)
{
ch->stat += statgain;
ch_printf(ch, "You have gained %d attribute training session(s)\n\r", statgain);
ch->statgain += 1;
}
}
find . | xargs grep "what I'm looking for"
[storms11@portent src]$ find . | xargs grep "statgain"
./save.c: fprintf( fp, "StatGain %d\n", ch->statgain );
./save.c: KEY( "StatGain", ch->statgain, fread_number( fp ) );
./dbzskills.c: ch_printf( ch, "&YYour current Stat Gain is&O: &R%d\n\r&z____________________________________________", ch->statgain);
./comm.c: ch->statgain = 1;
./mud.h: sh_int statgain;
Binary file ./smaug.exe matches
./update.c: int kicheck, kigain, pracgain, praccheck, statgain, statcheck;
./update.c: statgain = 1;
./update.c: statcheck = (ch->statgain * ch->statgain) * 10000;
./update.c: ch->stat += statgain;
./update.c: ch_printf(ch, "You have gained %d attribute training session(s)\n\r", statgain);
./update.c: ch->statgain += 1;
Binary file ./smaug matches
./o/update.c: int kicheck, kigain, pracgain, praccheck, statgain, statcheck;
./o/update.c: statgain = 1;
./o/update.c: statcheck = (ch->statgain * ch->statgain) * 12300;
./o/update.c: ch->stat += statgain;
./o/update.c: ch_printf(ch, "You have gained %d attribute training session(s)\n\r", statgain);
./o/update.c: ch->statgain += 1;
[storms11@portent src]$
I'm not going to comment on stat as its the same as prac but, I understand how it all works, I just…. dont really understand how some of the * ### affect it i think? Help please?
Also, I'm not really a coder, or interested in coding lol. I'm just trying to make some bare minamum changes, while me and my team are finding a coder who wants to take this project on.