selfbrid.c
demise/src/selfbrid.c · 8.0 KB
From the archive dodbackup-final.tar.gz
Download the archive « Back to the archive contents
#if defined(macintosh)
#include <types.h>
#else
#include <sys/types.h>
#endif
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "merc.h"
char *const Abomination[] = { "CLASS_WEREWOLF", "CLASS_VAMPIRE", };
char *const BSD[] = { "CLASS_WEREWOLF", "CLASS_DEMON", };
char *const Aberration[] = { "CLASS_DJINN", "CLASS_KAHN", };
char *const Psionic[] = { "CLASS_VAMPIRE", "CLASS_MAGE", };
char *const Gypsy[] = { "CLASS_MAGE", "CLASS_NINJA", };
char *const Ikiryu[] = { "CLASS_NINJA", "CLASS_VAMPIRE", };
char *const Nephandi[] = { "CLASS_MAGE ", "CLASS_DEMON", };
char *const Takarra[] = { "CLASS_DJINN", "CLASS_MONK", };
char *const Efreti[] = { "CLASS_DJINN", "CLASS_DEMON", };
char *const Rakshasa[] = { "CLASS_KAHN ", "CLASS_DEMON", };
char *const Skindancer[] = { "CLASS_WEREWOLF", "CLASS_MAGE", };
char *const WishEnchanter[] = { "CLASS_MAGE ", "CLASS_DJINN", };
char *const Krenshar[] = { "CLASS_VAMPIRE", "CLASS_KAHN", };
char *const Shidoshi[] = { "CLASS_NINJA", "CLASS_DEMON", };
char *const PlanarSohei[] = { "CLASS_ANGEL", "CLASS_NINJA", };
char *const GaiaInq[] = { "CLASS_ANGEL", "CLASS_WEREWOLF", };
char *const Saints[] = { "CLASS_ANGEL", "CLASS_MONK", };
char *const Cevoyia[] = { "CLASS_MONK", "CLASS_VAMPIRE", };
char *const Shinobi[] = { "CLASS_MONK", "CLASS_NINJA", };
char *const Betrayer[] = { "CLASS_DEMON", "CLASS_ANGEL", };
char *const Defyler[] = { "CLASS_DJINN", "CLASS_WEREWOLF", };
char *const Tigrasha[] = { "CLASS_KAHN", "CLASS_ANGEL", };
char *const ShaAhoul[] = { "CLASS_KAHN", "CLASS_MONK", };
bool bridtoclass (CHAR_DATA * ch, char *argument);
void
do_bridme (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *djaron;
int stat = 100000, level = 0, trust = 0;
char buf[MIL];
char buf2[MIL];
char arg1[MIL];
char arg2[MIL];
smash_tilde (argument);
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
for (djaron = ch->in_room->people; djaron != NULL;
djaron = djaron->next_in_room)
{
if (!IS_NPC (djaron))
continue;
if (djaron->pIndexData->vnum == 3011)
break;
}
if (djaron == NULL || djaron->pIndexData->vnum != 3011)
{
do_huh (ch, "");
return;
}
if (IS_NPC (ch))
return;
if (!IS_RNPC (ch))
{
if ((get_age (ch) - 17) * 2 < 30)
{
do_say (djaron, "You havent played long enough.");
return;
}
}
if (IS_SET (ch->corbits, COR_HYBRID))
{
do_say (djaron, "DIE FOOL!");
do_kill (djaron, ch->name);
return;
}
if (arg1[0] == '\0')
{
do_help (ch, "HYBRID");
switch (number_range (1, 3))
{
default:
break;
case 1:
{
do_say (djaron, "DIE FOOL!");
do_kill (djaron, ch->name);
break;
}
case 2:
{
do_say (djaron, "Idiot.");
break;
}
case 3:
{
do_say (djaron, "You ever heard of a helpfile?");
break;
}
}
return;
}
if (!bridtoclass (ch, arg1))
{
do_say (djaron, "You can't Hybrid to that!");
switch (number_range (1, 3))
{
default:
break;
case 1:
{
do_say (djaron, "DIE FOOL!");
do_kill (djaron, ch->name);
break;
}
case 2:
{
do_say (djaron, "Idiot.");
break;
}
case 3:
{
do_say (djaron, "You ever heard of a helpfile?");
break;
}
}
return;
}
if (ch->legendeq < 15 && !IS_MAGE (ch) && !IS_RNPC (ch))
{
do_say (djaron,
"You need all 15 pieces of legend equipment before you can do this.");
return;
}
do_remove (ch, "all");
do_mclear (ch, "self");
if (ch->max_hit < stat)
{
sprintf (buf, "You need %d life essence before you can do this.\n\r",
stat);
do_say (djaron, buf);
return;
}
if (ch->max_mana < stat)
{
sprintf (buf, "You need %d mystial power before you can do this.\n\r",
stat);
do_say (djaron, buf);
return;
}
if (ch->max_move < stat)
{
sprintf (buf, "You need %d vitality before you can do this.\n\r", stat);
do_say (djaron, buf);
return;
}
if (ch->pcdata->quest < 50000)
{
do_say (djaron, "You don't have the required credits.");
return;
}
if (!IS_SET (ch->evenmore, EM_CREATED) && !IS_LINKSYS (ch))
{
do_say (djaron, "You haven't attained your mastery.");
return;
}
if (ch->race < 5)
{
do_say (djaron, "You need atleast 5 Status to Brid.");
return;
}
ch->pcdata->quest -= 50000;
REMOVE_BIT (ch->evenmore, EM_CREATED);
do_say (djaron, "Ok, now strip so i can change your class!");
do_remove (ch, "all");
do_say (djaron, "Good.");
level = ch->level;
trust = ch->trust;
do_clearclass (ch, "self");
ch->level = level;
ch->trust = trust;
sprintf (buf2, "self class %s", arg1);
do_pset (ch, buf2);
do_say (djaron, "There ya go, all bridded!");
sprintf (buf, "%s has bridded into a %s.\n\r", ch->name, capitalize (arg1));
do_info (ch, buf);
return;
}
bool
bridtoclass (CHAR_DATA * ch, char *argument)
{
int temp1;
int temp2;
char arg1[MIL];
argument = one_argument (argument, arg1);
if (!str_cmp (arg1, "Abomination"))
{
temp1 = CLASS_WEREWOLF;
temp2 = CLASS_VAMPIRE;
}
else if (!str_cmp (arg1, "Skindancer"))
{
temp1 = CLASS_WEREWOLF;
temp2 = CLASS_MAGE;
}
else if (!str_cmp (arg1, "BSD"))
{
temp1 = CLASS_WEREWOLF;
temp2 = CLASS_DEMON;
}
else if (!str_cmp (arg1, "Gaiainq"))
{
temp1 = CLASS_WEREWOLF;
temp2 = CLASS_ANGEL;
}
else if (!str_cmp (arg1, "Defyler"))
{
temp1 = CLASS_WEREWOLF;
temp2 = CLASS_DJINN;
}
else if (!str_cmp (arg1, "Aberration"))
{
temp1 = CLASS_KAHN;
temp2 = CLASS_DJINN;
}
else if (!str_cmp (arg1, "Takarra"))
{
temp1 = CLASS_DJINN;
temp2 = CLASS_MONK;
}
else if (!str_cmp (arg1, "Efreti"))
{
temp1 = CLASS_DJINN;
temp2 = CLASS_DEMON;
}
else if (!str_cmp (arg1, "Wishenchanter"))
{
temp1 = CLASS_DJINN;
temp2 = CLASS_MAGE;
}
else if (!str_cmp (arg1, "Psionic"))
{
temp1 = CLASS_MAGE;
temp2 = CLASS_VAMPIRE;
}
else if (!str_cmp (arg1, "gypsy"))
{
temp1 = CLASS_MAGE;
temp2 = CLASS_NINJA;
}
else if (!str_cmp (arg1, "Nephandi"))
{
temp1 = CLASS_MAGE;
temp2 = CLASS_DEMON;
}
else if (!str_cmp (arg1, "Ikiryu"))
{
temp1 = CLASS_VAMPIRE;
temp2 = CLASS_NINJA;
}
else if (!str_cmp (arg1, "Shidoshi"))
{
temp1 = CLASS_NINJA;
temp2 = CLASS_DEMON;
}
else if (!str_cmp (arg1, "Shinobi"))
{
temp1 = CLASS_NINJA;
temp2 = CLASS_MONK;
}
else if (!str_cmp (arg1, "Rakshasa"))
{
temp1 = CLASS_DEMON;
temp2 = CLASS_KAHN;
}
else if (!str_cmp (arg1, "Krenshar"))
{
temp1 = CLASS_KAHN;
temp2 = CLASS_VAMPIRE;
}
else if (!str_cmp (arg1, "Tigrasha"))
{
temp1 = CLASS_KAHN;
temp2 = CLASS_ANGEL;
}
else if (!str_cmp (arg1, "ShaAhoul"))
{
temp1 = CLASS_KAHN;
temp2 = CLASS_MONK;
}
else if (!str_cmp (arg1, "betrayer"))
{
temp1 = CLASS_DEMON;
temp2 = CLASS_ANGEL;
}
else if (!str_cmp (arg1, "Cevoyia"))
{
temp1 = CLASS_MONK;
temp2 = CLASS_VAMPIRE;
}
else if (!str_cmp (arg1, "Saint"))
{
temp1 = CLASS_ANGEL;
temp2 = CLASS_MONK;
}
else if (!str_cmp (arg1, "Necromancer"))
{
temp1 = CLASS_WRAITH;
temp2 = CLASS_MAGE;
}
else if (!str_cmp (arg1, "Balehound"))
{
temp1 = CLASS_WRAITH;
temp2 = CLASS_WEREWOLF;
}
else if (!str_cmp (arg1, "Paragon"))
{
temp1 = CLASS_ANGEL;
temp2 = CLASS_WRAITH;
}
else if (!str_cmp (arg1, "Grimalkin"))
{
temp1 = CLASS_WRAITH;
temp2 = CLASS_KAHN;
}
else if (!str_cmp (arg1, "Revenant"))
{
temp1 = CLASS_WRAITH;
temp2 = CLASS_VAMPIRE;
}
else
{
return FALSE;
}
if (IS_CLASS (ch, temp1) || IS_CLASS (ch, temp2))
{
return TRUE;
}
return FALSE;
}