Hello,
I know tons and tons and tons of people have been trying to make a DBZ mud. the only main problem they have is the whole powerlevel system. Well I received a code to use, where to place it, how to edit it to work. Well everything worked but when I compiled I got errors all over the place. I have a sample of the code if someone could possibly look at it and perhaps give me a hand.(if you need a pl code please feel free to copy paste it and use it for your own well being, I just ask that if you get it to work you explain to me what you fixed to make it work)
[in fight.c find]
if ( dam && ch != victim
in that if level put this:
if (dam > 100)
dam = 100;
if (ch->race == 0) /* Race */
xp_mod = 0.66;
else if (ch->race == 3) /* Race */
xp_mod = 0.665;
else if (ch->race == 2) /* Race */
xp_mod = 0.68;
else
xp_mod = 0.67;
if ( !IS_NPC(victim) )
xp_gain = (float) dam / 100 * powvictim->pl, xp_mod);
if ( IS_NPC(victim) )
xp_gain = (float) dam / 100 * powvictim->exp, xp_mod);
/* Sparing and deadly combat pl gain's */
if ( !IS_NPC(ch) && !IS_NPC(victim)
&& !xIS_SET(ch->act, PLR_SPAR) && !IS_SET(victim->act, PLR_SPAR))
xp_gain = (float) dam / 100 * powvictim->exp, 0.70);
if ( !IS_NPC(ch) && !IS_NPC(victim)
&& !xIS_SET(ch->act, PLR_SPAR) && !IS_SET(victim->act, PLR_SPAR))
{
xp_mod = (float) xp_mod - .01;
xp_gain = (float) dam / 100 pow(victim->exp, xp_mod);
/* PL Gains cut if player is stronger than opontants */
if ( !IS_NPC(victim)) {
if ((ch->pl / victim->pl) < 3)
xp_gain = xp_gain;
else if ((ch->pl / victim->pl) < 4)
xp_gain *= 0.7;
else if ((ch->pl / victim->pl) < 5)
xp_gain *= 0.6;
else if ((ch->pl / victim->pl) < 6)
xp_gain *= 0.5;
else if ((ch->pl / victim->pl) < 7)
xp_gain *= 0.4;
else if ((ch->pl / victim->pl) <
xp_gain *= 0.3;
else if ((ch->pl / victim->exp) < 9)
xp_gain *= 0.2;
else if ((ch->pl / victim->exp) < 10)
xp_gain *= 0.1;
else
xp_gain = 0;
}
/* PL Gains cut if player is weaker than opontants */
if (ch->exp != ch->pl && ch->exp < ch->pl)
{
int pl_exp = 0;
pl_exp = (ch->pl / ch->exp);
xp_gain = xp_gain -( (float) pl_exp * .035 * xp_gain );
}
if (ch->pl < 2500)
xp_gain += 1;
if (ch->pl < 5000)
xp_gain += 1;
if (xp_gain < 0)
xp_gain = 0;
xp_gain_post = xp_gain * ( race_table[ch->race]->exp_multiplier/100.0);
/* if (xp_gain != 1) {
sprintf( buf1, "Your power level ncreases by %s points.", num_punct(xp_gain_post) );
act( AT_HIT, buf1, ch, NULL, victim, TO_CHAR );
}
else {
sprintf( buf1, "Your power level ncreases by %s point.", num_punct(xp_gain_post) );
act( AT_HIT, buf1, ch, NULL, victim, TO_CHAR );
}
*/
gain_exp( ch, xp_gain );
everything worked until i compiled it, then got tons of errors. if supplying the errors will help then tell me and ill do so. If you can help me in anyway I would greatly, appreciate it.
|