vamp_bite.txt
snippets · 1.5 KB · 2010-03-30
Automatic vampire bite for damage and blood, by Xrakisis.
Download « Back to the snippets list
This will allow vampires to automaticly bite, for damage and blood.
-Xrakisis
// fight.c
// local functions:
void vamp_bite args((CHAR_DATA *ch, CHAR_DATA *victim));
Then, just under this shit..
/* Look, just don't ask... KaVir */
if (wield->value[0] >= 1000) sn = wield->value[0] - ((wield->value[0] / 1000) * 1000);
else sn = wield->value[0];
if (sn != skill_lookup("gas breath") && sn != skill_lookup("desanct") && sn != skill_lookup("sleep") && sn != 0)
{
if (victim->position == POS_FIGHTING) (*skill_table[sn].spell_fun) (sn,wield->level,ch,victim);
}
}
}
}
if ( victim == NULL || victim->position != POS_FIGHTING ) return;
+ if (!IS_NPC(ch) && IS_CLASS(ch, CLASS_VAMPIRE)) vamp_bite(ch,victim);
put this (above) line under that stuff, search for just don't ask..
void vamp_bite( CHAR_DATA *ch, CHAR_DATA *victim )
{
char buf[MAX_STRING_LENGTH];
char buf2[MAX_STRING_LENGTH];
int dam;
if (IS_SET(ch->extra, EXTRA_BAAL))
{
dam = number_range(100,500);
hurt_person(ch, victim, dam);
ch->pcdata->condition[COND_THIRST] += number_range(1,5);
if (ch->pcdata->condition[COND_THIRST] > 15000)
ch->pcdata->condition[COND_THIRST] = 15000;
sprintf(buf, "You Have Been BITTEN! [#C%d#n]",dam);
sprintf(buf2, "You Bite Them #[Damage:#C%d#n#R][#nBlood: #C%d#R]\n\r", dam, ch->pcdata->condition[COND_THIRST]);
act(buf, ch, NULL, victim, TO_VICT);
act(buf2, ch, NULL, victim, TO_CHAR);
}
return;
}