/* Additions to the mud by Marcus ( Marcus@z2designs.com ) AIM: Stealthbig */
#if defined(macintosh)
#include <types.h>
#else
#include <sys/types.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "merc.h"
#define ptc send_to_char
void do_detox (CHAR_DATA *ch, char *argument)
{
char arg[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
char class[MAX_STRING_LENGTH];
int j;
argument = one_argument( argument, arg);
if (IS_NPC(ch)) return;
if (arg[0] == '\0')
{
send_to_char("Detox now sets hp/mana/move to 5k.\n\r",ch);
send_to_char("If you would still like to, type detox continue.\n\r",ch);
return;
}
if (!str_cmp(arg,"continue"))
{
if (IS_NPC(ch)) return;
if ((ch->in_room == NULL || ch->in_room->vnum != 3054))
{
send_to_char("You can only detox at the Temple Altar of Midgaard.\n\r",ch);
return;
}
if (ch->class == 0)
{
send_to_char("You already have no class.\n\r",ch);
return;
}
do_clearstats(ch,"");
/* if (ch->class == 1) {j=0; sprintf(class,"Demon");}
if (ch->class == 4) {j=1; sprintf(class,"Werewolf");}
if (ch->class == 32) {j=2; sprintf(class,"Drow");}
if (ch->class == 128) {j=3; sprintf(class,"Ninja");}
if (ch->class == 8) {j=4; sprintf(class,"Vampire");}
if (ch->class == 64) {j=5; sprintf(class,"Monk");}
if (ch->class == 2) {j=6; sprintf(class,"Mage");}
if (ch->class == 1024) {j=7; sprintf(class,"Tanarri");}
if (ch->class == 512) {j=8; sprintf(class,"Shapeshifter");}
if (ch->class == 8192) {j=9; sprintf(class,"Spider Droid");}
if (ch->class == 16) {j=10; sprintf(class,"Samurai");}
if (ch->class == 4096) {j=11; sprintf(class,"Undead Knight");}
if (ch->class == 2048) {j=12; sprintf(class,"Angel");}
if (ch->class == 256) {j=13; sprintf(class,"Lich");}
if (ch->class == 32768) {j=14; sprintf(class,"Titan");}
if (ch->class == 16384) {j=15; sprintf(class,"Wraith");}
*/
/*
if (ch->class == CLASS_DEMON) {j=0; sprintf(class,"Demon");}
if (ch->class == CLASS_WEREWOLF) {j=1; sprintf(class,"Werewolf");}
if (ch->class == CLASS_VAMPIRE) {j=3; sprintf(class,"Vampire");}
if (ch->class == CLASS_DROW) {j=2; sprintf(class,"Drow");}
if (ch->class == CLASS_TANARRI) {j=4; sprintf(class,"Tanarri");}
if (ch->class == CLASS_ANGEL) {j=5; sprintf(class,"Angel");}
if (ch->class == CLASS_UNDEAD_KNIGHT){j=6; sprintf(class,"Undead Knight");}
if (ch->class == CLASS_ASSASSIN) {j=7; sprintf(class,"Assassin");}
if (ch->class == CLASS_WRAITH) {j=8; sprintf(class,"Wraith");}
if (ch->class == CLASS_ELEMENTAL) {j=9; sprintf(class,"Elemental");}
if (ch->class == CLASS_PALADIN) {j=10; sprintf(class,"Paladin");}
if (ch->class == CLASS_HUMAN) {j=11; sprintf(class,"Technomage");}
if (ch->class == CLASS_SHINOBI) {j=12; sprintf(class,"Shinobi");}
if (ch->class == CLASS_HYDRA) {j=13; sprintf(class,"Hydra");}
if (ch->class == CLASS_SKYBLADE) {j=14; sprintf(class,"Skyblade");}
if (ch->class == CLASS_GIANT) {j=15; sprintf(class,"Giant");}
if (ch->class == CLASS_DRAGON) {j=16; sprintf(class,"Dragon");}
if (ch->class == CLASS_ANTIPALADIN) {j=17; sprintf(class,"Anti-Paladin");}
if (ch->class == CLASS_ZOMBIE) {j=18; sprintf(class,"Zombie");}
if (ch->class == CLASS_BLADE_MASTER) {j=19; sprintf(class,"Blade Master");}
if (ch->class == CLASS_PRIEST) {j=20; sprintf(class,"Priest");}
if (ch->class == CLASS_UNDEAD_LYCAN) {j=21; sprintf(class, "Undead Lycan");}
if (ch->class == CLASS_HELLS_SOLDIER){j=22; sprintf(class, "Hells Soldier");}
if (ch->class == CLASS_GAIA_WOLF) {j=23; sprintf(class, "Gaia Wolf");}
if (ch->class == CLASS_SHADOWBORN) {j=24; sprintf(class, "Shadowborn");}
if (ch->class == CLASS_DRUID) {j=25; sprintf(class, "Druid");}
if (ch->class == CLASS_SHADOW_DRAGON) {j=26; sprintf(class, "Shadow Dragon");}
if (ch->class == CLASS_SHADOW_FIEND) {j=27; sprintf(class, "Shadow Fiend");}
if (ch->class == CLASS_STALKER) {j=28; sprintf(class, "Stalker");}
if (ch->class == CLASS_HELL_SPAWN) {j=29; sprintf(class, "Hell Spawn");}
if (ch->class == CLASS_BLACK_ASSASSIN) {j=30; sprintf(class, "Black Assassin");}
if (ch->class == CLASS_VAMPIRIC_MIST) {j=31; sprintf(class, "Vampiric Mist");}
if (!str_cmp(ch->pcdata->switchname,best[j].name))
{
sprintf(buf,"#C%s#0 has lost their ranking of strongest #G%s#0 due to detoxxing#n.\n\r",ch->pcdata->switchname,class);
do_info(NULL,buf);
best[j].status = 0;
free_string(best[j].name);
best[j].name = str_dup("None");
best[j].pkscore = 0;
}
*/
ch->class = 0;
if (IS_SET(ch->newbits, NEW_MASTERY)) REMOVE_BIT(ch->newbits, NEW_MASTERY);
clearshit(ch);
sprintf(buf,"#7%s #0has forsaken his class, and become human.\n\r", ch->name );
do_info(ch,buf);
set_learnable_disciplines(ch);
do_save(ch,"");
return;
}
return;
}
void clearshit(CHAR_DATA *ch)
{
int sn;
int x;
if (IS_SET(ch->pcdata->powers[AURAS], MIGHT_AURA))
{
REMOVE_BIT(ch->pcdata->powers[AURAS], MIGHT_AURA);
// send_to_char("Your aura of might fades.\n\r",ch);
ch->damroll -= 500;
ch->hitroll -= 500;
return;
}
// for (i=0;i<25;i++)
for (ch->power[x];x<54;x++)
{
ch->power[x] = 0;
}
// ch->pcdata->kingdom = 0;
ch->pcdata->jflags = 0;
ch->extra = 0;
ch->exp = 0;
ch->expmult = 0;
ch->practice = 0;
ch->special = 0;
ch->newbits = 0;
ch->max_hit = 5000;
ch->max_mana = 5000;
ch->max_move = 5000;
ch->hit = 5000;
ch->mana = 5000;
ch->move = 5000;
ch->generation = 5;
ch->pcdata->familiar = NULL;
ch->pcdata->chobj = NULL;
ch->pcdata->memorised = NULL;
ch->pcdata->disc_research = -1;
ch->pcdata->relrank = 0;
ch->lord = str_dup( "" );
ch->morph = str_dup( "" );
ch->pload = str_dup( "" );
ch->poweraction = str_dup( "" );
ch->powertype = str_dup( "" );
ch->hunting = str_dup( "" );
ch->pcdata->followers = 0;
ch->spectype = 0;
ch->specpower = 0;
ch->mounted = 0;
ch->home = 3001;
ch->vampgen_a = 0;
ch->paradox[0] = 0; /* Total paradox */
ch->paradox[1] = 0; /* Current Paradox */
ch->paradox[2] = 0; /* Paradox Ticker */
ch->damcap[0] = 1000;
ch->damcap[1] = 0;
ch->vampaff_a = 0;
ch->itemaffect = 0;
ch->polyaff = 0;
ch->immune = 0;
ch->form = 1048575;
ch->beast = 15;
for( sn=0 ; sn < 7 ; sn ++ )
ch->loc_hp[sn] = 0;
//for( sn=0 ; sn < 13 ; sn++ )
// ch->wpn[sn] = 0;
//for( sn=0 ; sn < 5 ; sn++ )
// ch->spl[sn] = 4;
for( sn=0 ; sn < 8 ; sn++ )
ch->cmbt[sn] = 0;
for( sn=0 ; sn < 11 ; sn++ )
ch->cmbt[sn] = 0;
ch->pcdata->followers = 0;
ch->pcdata->perm_str = 13;
ch->pcdata->perm_int = 13;
ch->pcdata->perm_wis = 13;
ch->pcdata->perm_dex = 13;
ch->pcdata->perm_con = 13;
ch->pcdata->wolf = 0;
ch->pcdata->rank = 0;
ch->pcdata->language[0] = 0;
ch->pcdata->language[1] = 0;
ch->pcdata->stage[0] = 0;
ch->pcdata->stage[1] = 0;
ch->pcdata->stage[2] = 0;
ch->pcdata->wolfform[0] = 1;
ch->pcdata->wolfform[1] = 1;
ch->pcdata->score[0] = 0;
ch->pcdata->score[1] = 0;
ch->pcdata->score[2] = 0;
ch->pcdata->score[3] = 0;
ch->pcdata->score[4] = 0;
ch->pcdata->score[5] = 0;
for( sn=0 ; sn < 11 ; sn++ )
ch->pcdata->disc_a[sn] = 0;
// for( sn=0 ; sn < 10 ; sn++ )
// ch->pcdata->genes[sn] = 0;
for ( sn=0 ; sn < 18 ; sn++)
ch->pcdata->powers[sn] = 0;
for ( sn=0 ; sn < 12 ; sn++)
ch->pcdata->stats[sn] = 0;
//for ( sn=0; sn < 19; sn++)
// ch->stance[sn] = 0;
//for ( sn=19; sn < 24; sn++)
// ch->stance[sn] = -1;
for ( sn=0; sn < 44; sn++)
ch->power[sn] = -2;
ch->pcdata->fake_skill = 0;
ch->pcdata->fake_stance = 0;
ch->pcdata->fake_hit = 0;
ch->pcdata->fake_dam = 0;
ch->pcdata->fake_ac = 0;
ch->pcdata->fake_hp = 0;
ch->pcdata->fake_mana = 0;
ch->pcdata->fake_move = 0;
ch->pcdata->obj_vnum = 0;
ch->pcdata->condition[COND_THIRST] = 48;
ch->pcdata->condition[COND_FULL] = 48;
ch->pcdata->stat_ability[STAT_STR] = 0;
ch->pcdata->stat_ability[STAT_END] = 0;
ch->pcdata->stat_ability[STAT_REF] = 0;
ch->pcdata->stat_ability[STAT_FLE] = 0;
ch->pcdata->stat_amount[STAT_STR] = 0;
ch->pcdata->stat_amount[STAT_END] = 0;
ch->pcdata->stat_amount[STAT_REF] = 0;
ch->pcdata->stat_amount[STAT_FLE] = 0;
ch->pcdata->stat_duration[STAT_STR] = 0;
ch->pcdata->stat_duration[STAT_END] = 0;
ch->pcdata->stat_duration[STAT_REF] = 0;
ch->pcdata->stat_duration[STAT_FLE] = 0;
ch->pcdata->exhaustion = 0;
if (IS_SET(ch->act, PLR_HOLYLIGHT)) REMOVE_BIT(ch->act, PLR_HOLYLIGHT);
if (IS_SET(ch->newbits, NEW_MASTERY)) REMOVE_BIT(ch->newbits, NEW_MASTERY);
SET_BIT(ch->extra, EXTRA_TRUSTED);
return;
}
/*
void do_qpconvert( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
char buf[MAX_INPUT_LENGTH];
argument = one_argument( argument, arg);
if (arg[0] == '\0')
{
send_to_char("qpconvert <hitroll/damroll>\n\r",ch);
return;
}
if (ch->pcdata->quest < 5000)
{
sprintf(buf,"You only have %i qps. Try again later when you have the 5000 needed.\n\r", ch->pcdata->quest );
send_to_char(buf,ch);
return;
}
if (!str_cmp(arg,"hitroll"))
{
if (ch->pcdata->powers[19] == 20)
{
send_to_char("You have already maxed out your qpconvert for hitroll.\n\r",ch);
return;
}
ch->pcdata->powers[19] += 1;
ch->hitroll +=50;
send_to_char("Hitroll increased 50.\n\r",ch);
}
else if (!str_cmp(arg,"damroll"))
{
if (ch->pcdata->powers[18] == 20)
{
send_to_char("You have already maxed out your qpconvert for damroll.\n\r",ch);
return;
}
ch->pcdata->powers[18] += 1;
ch->damroll +=50;
send_to_char("Damroll increased 50.\n\r",ch);
}
else
{
do_qpconvert(ch,"");
return;
}
ch->pcdata->quest -= 5000;
return;
}
*/
void do_convert ( CHAR_DATA *ch, char *argument) // Recoded by NebuSoft
{
char arg1[MAX_INPUT_LENGTH];
argument = one_argument( argument, arg1);
if (IS_NPC(ch)) return;
if (arg1[0] == '\0' || (str_cmp(arg1,"exp") && str_cmp(arg1,"qp")))
{
send_to_char("convert <qp|exp>\n\r",ch);
return;
}
if (!str_cmp(arg1,"qp"))
{
if ( ch->pcdata->quest < 2500 )
{
send_to_char("You need at least 2500 quest points to convert.\n\r",ch);
return;
}
if ( ch->exp >= 1000000000 )
{
send_to_char("You need to spend some of your XP first.\n\r",ch);
return;
}
ch->exp += 1000000000;
ch->pcdata->quest -= 2500;
send_to_char("You convert 2500qp into 1 billion XP.\n\r",ch);
}
else if (!str_cmp(arg1,"exp"))
{
if ( ch->exp < 1000000000 )
{
send_to_char("You need at least 1,000,000,000 exp to convert.\n\r",ch);
return;
}
ch->exp -= 1000000000;
ch->pcdata->quest +=2500;
send_to_char("You convert 1 billion XP into 2500qp.\n\r",ch);
}
return;
}