cor_wiz.c
demise/src/cor_wiz.c · 250.2 KB
From the archive dodbackup-final.tar.gz
Download the archive « Back to the archive contents
/*****************************************************************************************************
* *
* *
* Anti-cheat codes and devices for Dreams of Demise *
* *
* *
* *
* Creditcard coded by Corim *
* *
* *
* Coded by Corim aka Infinity *
* aka Gunnar Trulsrud *
* *
* *
* *
* *
* *
*****************************************************************************************************/
#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 <unistd.h> /* unlink() */
#include "merc.h"
void createdemon args ((CHAR_DATA * ch));
int demoncount = 0;
char *
get_time (int secs, char *argument)
{
static char time[200];
int temp, hours, minutes, seconds;
char col[MIL];
char arg[MIL];
argument = one_argument (argument, arg);
time[0] = '\0';
temp = secs;
hours = temp / 3600;
temp = temp % 3600;
minutes = temp / 60;
seconds = temp % 60;
if (arg[0] == '\0')
sprintf (col, "#n");
else
sprintf (col, arg);
if (hours > 0)
{
sprintf (time, "#R%d%s hour%s,#R %d%s minute%s and#R %d%s second%s#n",
hours, col, hours == 1 ? "" : "s", minutes, col,
minutes == 1 ? "" : "s", seconds, col,
seconds == 1 ? "" : "s");
}
else if (minutes > 0)
{
sprintf (time, "#R%d%s minute%s and#R %d%s second%s#n", minutes, col,
minutes == 1 ? "" : "s", seconds, col,
seconds == 1 ? "" : "s");
}
else
{
sprintf (time, "#R%d%s second%s#n", seconds, col,
seconds == 1 ? "" : "s");
}
return time;
}
void
break_obj (CHAR_DATA * ch, OBJ_DATA * obj)
{
if (obj == NULL)
return;
if (ch == NULL)
return;
act ("$p breaks and is now unusable until repaired.", ch, obj, NULL,
TO_CHAR);
act ("$p breaks and is now unusable until repaired.", ch, obj, NULL,
TO_ROOM);
if (!IS_OBJ_STAT (obj, ITEM_BROKEN))
SET_BIT (obj->extra_flags, ITEM_BROKEN);
obj_from_char (obj);
obj_to_char (obj, ch);
return;
}
int
repair_cost (OBJ_DATA * obj)
{
int cost = 20;
int ext_cost = 0;
if (obj->points > 0)
{
ext_cost = obj->points;
ext_cost /= 1000;
if (ext_cost < 1)
ext_cost = 0;
}
if (ext_cost > 0)
cost += ext_cost;
return cost;
}
int
multi (int num)
{
int mult = 2;
if (num > 149999)
mult++;
if (num > 249999)
mult++;
return mult;
}
int
traincost (CHAR_DATA * ch, int num)
{
int cost = 0;
int status = ch->race;
int bonus = 0;
cost = num * multi (num);
bonus = cost / 1000;
if (bonus < 1)
bonus = 1;
bonus *= status;
cost -= bonus;
if (cost < num)
cost = num;
if (cost < 1)
cost = 1;
return cost;
}
int
percentage (int number1, int number2)
{
int percent, num;
if (number1 <= 0)
return 0;
if (number2 <= 0)
return 0;
num = number1 * 100;
percent = num / number2;
return percent;
}
bool
has_artifact (CHAR_DATA * ch)
{
if (IS_NPC (ch))
return TRUE;
if (IS_IMMORTAL (ch))
return FALSE;
if (IS_ITEMAFF (ch, ITEMA_ARTIFACT))
return TRUE;
if (IS_NYM (ch, NYM_HASARTI))
return TRUE;
return FALSE;
}
bool
can_arti (CHAR_DATA * ch)
{
if (IS_NPC (ch))
return FALSE;
if (IS_IMMORTAL (ch))
return TRUE;
if (ch->max_hit < 100000 && ch->max_move < 100000 && ch->max_mana < 100000)
return FALSE;
return TRUE;
}
bool
artisafe (CHAR_DATA * ch, CHAR_DATA * victim)
{
if (IS_NPC (ch) || IS_NPC (victim))
return FALSE;
if (IS_CREATOR (ch))
return FALSE;
if (ch->in_room->area->plane == PLANE_PAND && victim->in_room->area->plane == PLANE_PAND) // && !IS_NEWBIE (ch) && !IS_NEWBIE (victim))
return FALSE;
if (has_artifact (victim) && can_arti (ch))
return FALSE;
if (IS_XX (victim, XX_BLOODHUNT))
return FALSE;
return TRUE;
}
bool
has_credit (CHAR_DATA * ch)
{
if (!HAS_CREDIT (ch))
{
stc ("You have no Credit; therefore you are bared from doing this.\n\r",
ch);
return FALSE;
}
return TRUE;
}
bool
globsafe (CHAR_DATA * ch, CHAR_DATA * victim)
{
if (victim->in_room->sector_type == SECT_VALHALLA
&& ch->in_room->sector_type != SECT_VALHALLA && !IS_IMMORTAL (ch))
return TRUE;
if (victim->in_room->sector_type == SECT_CLANHQ && !IS_IMMORTAL (ch))
return TRUE;
return FALSE;
}
bool
travelsafe (CHAR_DATA * ch, CHAR_DATA * victim)
{
if (victim->in_room->sector_type == SECT_VALHALLA
&& ch->in_room->sector_type != SECT_VALHALLA && !IS_IMMORTAL (ch))
{
stc ("Only a Valkyrie can take you there.\n\r", ch);
return TRUE;
}
if (ch->in_room->sector_type == SECT_VALHALLA
&& victim->in_room->sector_type != SECT_VALHALLA && !IS_IMMORTAL (ch))
{
stc
("You can not leave Valhalla before you have proven your self worthy.\n\r",
ch);
return TRUE;
}
if (victim->in_room->sector_type == SECT_CLANHQ && !IS_IMMORTAL (ch))
{
act ("$N is in a Clan Headquarters, walk there.", ch, NULL, victim,
TO_CHAR);
return TRUE;
}
if (IS_SET (ch->in_room->room_flags, ROOM_NO_TRAVEL))
{
stc ("You are unable to find a path from this room.\n\r", ch);
return TRUE;
}
if (IS_SET (victim->in_room->room_flags, ROOM_NO_TRAVEL))
{
act ("You are unable to find a path to $N.", ch, NULL, victim, TO_CHAR);
return TRUE;
}
if (IS_ANGELW (ch)
&& IS_SET (victim->in_room->added_flags, ROOM2_WARDVSANGEL))
{
stc ("Something prevents you from going there.\n\r", ch);
return TRUE;
}
if (IS_WEREWOLF (ch)
&& IS_SET (victim->in_room->added_flags, ROOM2_WARDVSWOLF))
{
stc ("Something prevents you from going there.\n\r", ch);
return TRUE;
}
if (IS_DEMON (ch)
&& IS_SET (victim->in_room->added_flags, ROOM2_WARDVSDEMON))
{
stc ("Something prevents you from going there.\n\r", ch);
return TRUE;
}
if ((IS_DRACONIAN (ch) || IS_DRAGON (ch))
&& IS_SET (victim->in_room->added_flags, ROOM2_WARDVSDRAC))
{
stc ("Something prevents you from going there.\n\r", ch);
return TRUE;
}
if ((IS_WRAITH (ch) || IS_AFF (ch, AFF_ETHEREAL))
&& IS_SET (victim->in_room->added_flags, ROOM2_WARDVSGHOSTS))
{
stc ("Somthing prevents you from going there.\n\r", ch);
return TRUE;
}
/* if (!IS_NPC (victim) && !IS_IMMUNE (victim, IMM_SUMMON) &&
ch->in_room->area->plane != PLANE_PAND)
{
stc ("they dont want you near them!\n\r",ch );
return TRUE;
}*/
return FALSE;
}
bool
objsafe (CHAR_DATA * ch, CHAR_DATA * obj, bool reverse)
{
if (obj->in_room->sector_type == SECT_VALHALLA
&& ch->in_room->sector_type != SECT_VALHALLA && !IS_IMMORTAL (ch))
{
if (reverse)
{
act
("$p is in Valhalla, if you want to get it, you would have to die.",
ch, obj, NULL, TO_CHAR);
}
else
{
stc ("Only a Valkyrie can take you there.\n\r", ch);
}
return TRUE;
}
if (ch->in_room->sector_type == SECT_VALHALLA
&& obj->in_room->sector_type != SECT_VALHALLA && !IS_IMMORTAL (ch))
{
if (reverse)
{
stc ("You can not affect objects outside of Valhalla.", ch);
}
else
{
stc
("You can not leave Valhalla before you have proven your self worthy.\n\r",
ch);
}
return TRUE;
}
if (obj->in_room->sector_type == SECT_CLANHQ && !IS_IMMORTAL (ch))
{
act ("$p is in a Clan Headquarters, walk there.", ch, obj, NULL,
TO_CHAR);
return TRUE;
}
return FALSE;
}
void
do_showsuper (CHAR_DATA * ch, char *argument)
{
char arg1[MIL];
char arg2[MIL];
int selected;
int level = 0;
char stance[MSL];
char buf[MSL];
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (ch->level > 0) // LEVEL_HIGHJUDGE)
{
if (arg1[0] == '\0')
{
if (ch->stance[6] < 200 || ch->stance[7] < 200
|| ch->stance[8] < 200 || ch->stance[9] < 200
|| ch->stance[10] < 200)
{
stc
("You havent even Grand Mastered all the traditional stances yet.\n\r",
ch);
return;
}
if (!IS_SET (ch->pcdata->qstats[0], QS_DONE))
{
stc
("You havent even finished setting your first super stance yet, to see the progress of it or set it, type setstance.\n\r",
ch);
return;
}
stc ("These are the stances you can see:", ch);
if (IS_SET (ch->pcdata->qstats[0], QS_DONE))
stc (" ss1", ch);
if (IS_SET (ch->pcdata->qstats[1], QS_DONE))
stc (", ss2", ch);
if (IS_SET (ch->pcdata->qstats[2], QS_DONE))
stc (", ss3", ch);
if (IS_SET (ch->pcdata->qstats[3], QS_DONE))
stc (", ss4", ch);
if (IS_SET (ch->pcdata->qstats[4], QS_DONE))
stc (", ss5", ch);
stc (".\n\r", ch);
return;
}
else if (!str_cmp (arg1, "ss1"))
{
selected = 0;
sprintf (stance, "#yfirst#n");
}
else if (!str_cmp (arg1, "ss2"))
{
selected = 1;
sprintf (stance, "#ysecond#n");
}
else if (!str_cmp (arg1, "ss3"))
{
selected = 2;
sprintf (stance, "#ythird#n");
}
else if (!str_cmp (arg1, "ss4"))
{
selected = 3;
sprintf (stance, "#yfourth#n");
}
else if (!str_cmp (arg1, "ss5"))
{
selected = 4;
sprintf (stance, "#yfifth#n");
}
else
{
do_showsuper (ch, "");
return;
}
if (!IS_SET (ch->pcdata->qstats[selected], QS_DONE))
{
do_showsuper (ch, "");
return;
}
level = selected + 11;
send_to_char
("#r------------------------------------------------------------------------------\n\r",
ch);
sprintf (buf,
"#7 This is your %s #7super stance#n\n\r\n\r",
stance);
stc (buf, ch);
sprintf (buf,
"#7 You have trained #y%d#7 points, in your %s #7super stance.#n\n\r",
ch->stance[level], stance);
stc (buf, ch);
send_to_char
("\n\r#7 Currently selected options#n:\n\r", ch);
if (ch->pcdata->qstats[selected] == 0)
send_to_char ("#G None.\n\r", ch);
if (IS_SET (ch->pcdata->qstats[selected], QS_HIT_LESSER))
send_to_char ("#G HIT.\n\r", ch);
else if (IS_SET (ch->pcdata->qstats[selected], QS_HIT_GREATER))
send_to_char ("#G HIT #y(#RGreater#y)#G.\n\r",
ch);
else if (IS_SET (ch->pcdata->qstats[selected], QS_HIT_SUPREME))
send_to_char ("#G HIT #y(#RSupreme#y)#G.\n\r",
ch);
if (IS_SET (ch->pcdata->qstats[selected], QS_DAM_LESSER))
send_to_char ("#G DAM.\n\r", ch);
else if (IS_SET (ch->pcdata->qstats[selected], QS_DAM_GREATER))
send_to_char ("#G DAM #y(#RGreater#y)#G.\n\r",
ch);
else if (IS_SET (ch->pcdata->qstats[selected], QS_DAM_SUPREME))
send_to_char ("#G DAM #y(#RSupreme#y)#G.\n\r",
ch);
if (IS_SET (ch->pcdata->qstats[selected], QS_ARM_LESSER))
send_to_char ("#G ARM.\n\r", ch);
else if (IS_SET (ch->pcdata->qstats[selected], QS_ARM_GREATER))
send_to_char ("#G ARM #y(#RGreater#y)#G.\n\r",
ch);
else if (IS_SET (ch->pcdata->qstats[selected], QS_ARM_SUPREME))
send_to_char ("#G ARM #y(#RSupreme#y)#G.\n\r",
ch);
if (IS_SET (ch->pcdata->qstats[selected], QS_POW_LESSER))
send_to_char ("#G POW.\n\r", ch);
else if (IS_SET (ch->pcdata->qstats[selected], QS_POW_GREATER))
send_to_char ("#G POW #y(#RGreater#y)#G.\n\r",
ch);
else if (IS_SET (ch->pcdata->qstats[selected], QS_POW_SUPREME))
send_to_char ("#G POW #y(#RSupreme#y)#G.\n\r",
ch);
if (IS_SET (ch->pcdata->qstats[selected], QS_RES_LESSER))
send_to_char ("#G RES.\n\r", ch);
else if (IS_SET (ch->pcdata->qstats[selected], QS_RES_GREATER))
send_to_char ("#G RES #y(#RGreater#y)#G.\n\r",
ch);
else if (IS_SET (ch->pcdata->qstats[selected], QS_RES_SUPREME))
send_to_char ("#G RES #y(#RSupreme#y)#G.\n\r",
ch);
if (IS_SET (ch->pcdata->qstats[selected], QS_SUPER_DODGE)
|| IS_SET (ch->pcdata->qstats[selected], QS_SUPER_PARRY)
|| IS_SET (ch->pcdata->qstats[selected], QS_SUPER_SPEED)
|| IS_SET (ch->pcdata->qstats[selected], QS_SUPER_BYPASS))
{
send_to_char
("\n\r#7 Special Abilities:#n\n\r", ch);
if (IS_SET (ch->pcdata->qstats[selected], QS_SUPER_DODGE))
send_to_char ("#G DODGE.\n\r", ch);
if (IS_SET (ch->pcdata->qstats[selected], QS_SUPER_PARRY))
send_to_char ("#G PARRY.\n\r", ch);
if (IS_SET (ch->pcdata->qstats[selected], QS_SUPER_SPEED))
send_to_char ("#G SPEED.\n\r", ch);
if (IS_SET (ch->pcdata->qstats[selected], QS_SUPER_BYPASS))
send_to_char ("#G BYPASS.\n\r", ch);
send_to_char ("\n\r", ch);
}
send_to_char
("#r------------------------------------------------------------------------------\n\r",
ch);
return;
}
return;
}
void
quitmessage (CHAR_DATA * ch, char *argument)
{
int msg = number_range (1, 6);
switch (msg)
{
default:
case 1:
{
cent_to_char ("Another head rolling, as a grin crosses my face,", ch);
cent_to_char ("My sword slashing, killing at an incredible pace,",
ch);
cent_to_char ("Stop me? Heh, none can do such, it feels good,", ch);
cent_to_char ("To kill so much. Humans falling, hear their cries,",
ch);
cent_to_char ("Slash a throat, pull out an eye, behead one, and", ch);
cent_to_char ("Burn the next, kill, and throw a hex, get revenge",
ch);
cent_to_char ("For all are fools, blood pouring, and forming pools,",
ch);
cent_to_char ("Insane? No, I think not, watch them burn, and watch",
ch);
cent_to_char ("Them rot, Death cannot touch me, as for I am immortal",
ch);
cent_to_char ("I came to this world, from a swirling portal,", ch);
cent_to_char ("These mortals weak, their souls for the taking,", ch);
cent_to_char ("Someone made them defenseless, in their making.", ch);
cent_to_char ("Laugh I do, as I watch them scream, I'm being nice,",
ch);
cent_to_char
("And dare not be mean, Chaos is perfect, and all are but dead,",
ch);
cent_to_char
("All I see is a sky of red, To take one, and take more,", ch);
cent_to_char
("Of their puny souls, Heh..Its Just all too easy to burn", ch);
cent_to_char ("Them like coals, The reaper of dead is who I am,", ch);
cent_to_char ("To kill one, and to kill all man....\n\r", ch);
stc ("\n\r", ch);
cent_to_char ("Written by Acira - Dreams of Demise player\n\r", ch);
break;
}
case 2:
{
cent_to_char ("Ink drips first from my needles, then blood,", ch);
cent_to_char ("I've put ink in every concievable place,", ch);
cent_to_char ("gold dragons, black roses and condemned freaks,", ch);
cent_to_char ("seem the most popular at the moment,", ch);
cent_to_char
("but ive inked it all. Swirling flames, yin/yang, and entire battlescenes,",
ch);
cent_to_char ("I can design anything you desire,", ch);
cent_to_char
("a group of fanged gentlemen with strange tomes wanted on their backs,",
ch);
cent_to_char
("hundreds of severed heads tatooed under the sign of Omni, then hundreds more,",
ch);
cent_to_char ("heads with blank or idiotic expressions,", ch);
cent_to_char ("under a hand moving thru the stations of the cross.,",
ch);
cent_to_char ("(souls granted mercy perhaps?),", ch);
cent_to_char
("the people of this realm have all gone mad with bloodlust and killing,",
ch);
cent_to_char ("you nod, so youve seen it too?,", ch);
cent_to_char
("hmmm..... and have you noticed that the air here is never sweet,",
ch);
cent_to_char
("but always rank with smoke, blood and the stench of death?,", ch);
cent_to_char ("Ah yes, but the more time i spend in this realm,", ch);
cent_to_char ("the more i become accustomed to it myself.,", ch);
cent_to_char ("Well, your outline is done.,", ch);
cent_to_char
("You'll have to return another day so i can fill in the colors after the swelling goes down,",
ch);
cent_to_char
("Oh, before you leave, did you realize there is an Omni following you?,",
ch);
cent_to_char
("Not everyone can see them, so i thought i'd let you know just in case.,",
ch);
cent_to_char
("Ah, heres one of those fanged gentlemen now.......\n\r", ch);
stc ("\n\r", ch);
cent_to_char ("Mani Notei Kihei - Dreams of Demise player\n\r", ch);
break;
}
case 3:
{
cent_to_char ("Times run short, or so you say,", ch);
cent_to_char ("we know you couldnt possibly WANT to leave,", ch);
cent_to_char ("we'll take into consideration tho,", ch);
cent_to_char ("your life may have other needs,", ch);
cent_to_char ("remember when you next return,", ch);
cent_to_char ("we'll be waiting for you here,", ch);
cent_to_char ("Friend and Foe log on each day,", ch);
cent_to_char ("to constantly battle on,", ch);
cent_to_char ("quest for crystals, fight for artifacts,", ch);
cent_to_char ("or in general do each other harm,", ch);
cent_to_char ("build your characters up, travel the planes,", ch);
cent_to_char ("or you may choose to sit and chat,", ch);
cent_to_char ("no matter how big or small our characters are,", ch);
cent_to_char ("D.O.D. is where we're at,", ch);
cent_to_char ("in rain or shine, at work or from home,", ch);
cent_to_char ("just learning or many players slain,", ch);
cent_to_char ("learning the game and it's many mysteries,", ch);
cent_to_char ("should be a passion, not a pain,", ch);
cent_to_char ("so return soon fellow player,", ch);
cent_to_char ("and try your luck (or skills) again,", ch);
cent_to_char ("we'll all be waiting as we play ourselves,", ch);
cent_to_char ("for this game's not a loose or win,", ch);
cent_to_char
("but an evolution of knowledge as we try to learn each class,",
ch);
cent_to_char ("but you never know about the oldtimers,", ch);
cent_to_char
("they may just want to kick your as....er um.... nevermind...\n\r",
ch);
stc ("\n\r", ch);
cent_to_char ("Mani Notei Kihei - Dreams of Demise player\n\r", ch);
break;
}
case 4:
{
cent_to_char ("Shadows on the ground,", ch);
cent_to_char ("And chaos in your eye,", ch);
cent_to_char ("The battle spins you round,", ch);
cent_to_char ("Till soaked in blood you lie,", ch);
cent_to_char ("You've battled for your life,", ch);
cent_to_char ("And struggled for your soul,", ch);
cent_to_char ("Traverse through greatest spite,", ch);
cent_to_char ("But now you've lost control,", ch);
cent_to_char ("You've escaped now from your fate,", ch);
cent_to_char ("You've ran from prying eyes,", ch);
cent_to_char ("But never can you escape,", ch);
cent_to_char ("From the Dreams of Demise!,", ch);
cent_to_char ("\n\r", ch);
cent_to_char ("Brandon M Graves - Dreams of Demise player\n\r", ch);
break;
}
case 5:
{
cent_to_char
("Through the ashes of the wake, I see the faces of my opposition,",
ch);
cent_to_char
("A quick reminder of my choice to have taken upon the proposition,",
ch);
cent_to_char
("Within the rhetoric it speaks -There can be only one-,", ch);
cent_to_char ("It is now time to prove that the moment has come,",
ch);
cent_to_char ("For the one to be shown, to strike down each and all,",
ch);
cent_to_char ("Lest I myself be the one to fall,", ch);
cent_to_char ("A hasted drawing of my twin katanas to hand,", ch);
cent_to_char ("A quick instant is taken to find solace in reprimand,",
ch);
cent_to_char ("I tell myself that I must push ahead,", ch);
cent_to_char ("Lest I myself wish to end up dead,", ch);
cent_to_char ("Another moment is taken in silent prayer,", ch);
cent_to_char ("To tell myself to be aware,", ch);
cent_to_char
("In the climax of preparation, my moment of greatest need I speak,",
ch);
cent_to_char ("softly to myself and say,", ch);
cent_to_char ("Blade... Be true this day..\n\r", ch);
cent_to_char ("\n\r", ch);
cent_to_char ("Zakarowyn Azurath - Dreams of Demise player\n\r", ch);
break;
}
case 6:
{
cent_to_char ("I am alone again.,", ch);
cent_to_char ("Abandoned without a home,", ch);
cent_to_char ("I have been left again,", ch);
cent_to_char ("To wander weak alone,", ch);
cent_to_char ("Abandonment aside,", ch);
cent_to_char ("I cry, a sound weak a frail,", ch);
cent_to_char ("Because I die I die inside,", ch);
cent_to_char ("Yet I can only see myself going to hell,", ch);
cent_to_char ("I have not the power I used to,", ch);
cent_to_char ("My strength has waned and gone,", ch);
cent_to_char ("I have not the presence I used to,", ch);
cent_to_char ("For now I am scoffed and scorned,", ch);
cent_to_char ("Yet I can still hold the blade,", ch);
cent_to_char ("In a slaute perfect and upright,", ch);
cent_to_char ("Before I win the day,", ch);
cent_to_char ("And bring about my own night.\n\r", ch);
cent_to_char ("\n\r", ch);
cent_to_char ("Richard Jackson - Dreams of Demise player\n\r", ch);
break;
}
}
return;
}
void
do_clearsuper (CHAR_DATA * ch, char *argument)
{
char arg1[MIL];
char arg2[MIL];
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (ch->level > 0)
{
if (!IS_IMMORTAL (ch) && ch->exp < 20000000)
{
stc
("You dont have the required 20 million experience to resets your superstances",
ch);
return;
}
if (ch->stance[15] < 1)
{
stc ("You dont even have your 5th super yet, why clear them?\n\r",
ch);
return;
}
if (arg1[0] == '\0')
{
stc
("#7Are you sure you want do this? If you clear them, ALL your supers will be cleared,\n\rand there is no getting them back with out training and buying them.#n\n\r",
ch);
stc ("#7If you are sure type <clearsuper yes>#n\n\r", ch);
return;
}
if (!str_cmp (arg1, "yes"))
{
stc ("#7Clearing ALL your supers.\n\r", ch);
ch->pcdata->qstats[0] = 0;
ch->pcdata->qstats[1] = 0;
ch->pcdata->qstats[2] = 0;
ch->pcdata->qstats[3] = 0;
ch->pcdata->qstats[4] = 0;
ch->stance[11] = 0;
ch->stance[12] = 0;
ch->stance[13] = 0;
ch->stance[14] = 0;
ch->stance[15] = 0;
if (!IS_IMMORTAL (ch))
ch->exp -= 20000000;
return;
}
else
{
stc
("#7Are you sure you want do this? If you clear them and ALL your supers will be cleared,\n\r there is no getting them back with out training and buying them.#n\n\r",
ch);
stc ("#7If you are sure type <clearsuper yes>#n\n\r", ch);
return;
}
}
return;
}
void
do_questlist (CHAR_DATA * ch, char *argument)
{
extern int top_obj_index;
char buf[MSL];
char arg[MIL];
OBJ_INDEX_DATA *pObjIndex;
int vnum;
int nMatch = 0;
bool found = FALSE;
bool full = FALSE;
int plane = -1;
argument = one_argument (argument, arg);
if (!str_cmp (arg, "full"))
{
full = TRUE;
}
else if (!str_cmp (arg, "nexus"))
{
plane = PLANE_NEXUS;
}
else if (!str_cmp (arg, "tranquility"))
{
plane = PLANE_TRANQ;
}
else if (!str_cmp (arg, "pandemonium"))
{
plane = PLANE_PAND;
}
else
{
stc
("Please pick a plane you want to see the list of quest items from.\n\r",
ch);
stc
("Options: Nexus, Pandemonium, Tranquility or Full to see all quest items in the game.\n\r",
ch);
return;
}
for (vnum = 0; nMatch < top_obj_index; vnum++)
{
if ((pObjIndex = get_obj_index (vnum)) != NULL)
{
nMatch++;
if (!full && pObjIndex->area->plane != plane)
continue;
if (IS_OBJ_STAT (pObjIndex, ITEM_QUESTITEM))
{
found = TRUE;
sprintf (buf, "[#y%5d#n] [%-15s] %s\n\r",
pObjIndex->vnum, plane_name4 (pObjIndex->area->plane),
capitalize (pObjIndex->short_descr));
send_to_char (buf, ch);
}
}
}
if (!found)
send_to_char ("There are no quest items to show on this list.\n\r", ch);
return;
}
void
do_ohistory (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
char buf[MSL];
char nm1[MSL];
char nm2[MSL];
char nm3[MSL];
char nm4[MSL];
OBJ_DATA *obj;
argument = one_argument (argument, arg);
if (arg[0] == '\0')
{
stc ("What object do you want the history of?\n\r", ch);
return;
}
if ((obj = get_obj_world (ch, arg)) == NULL)
{
send_to_char ("Nothing like that in hell, earth, or heaven.\n\r", ch);
return;
}
if (obj->questmaker != NULL && strlen (obj->questmaker) > 1)
sprintf (nm1, obj->questmaker);
else
sprintf (nm1, "None");
if (obj->questowner != NULL && strlen (obj->questowner) > 1)
sprintf (nm2, obj->questowner);
else
sprintf (nm2, "None");
if (obj->creator != NULL && strlen (obj->creator) > 1)
sprintf (nm3, obj->creator);
else
sprintf (nm3, "None");
if (obj->edited != NULL && strlen (obj->edited) > 1)
sprintf (nm4, obj->edited);
else
sprintf (nm4, "No history");
stc
("\n\r#y---------------#o**#R Object History#o **#y---------------#n\n\r",
ch);
sprintf (buf, "\n\r#yObject's Name:#n %s.\n\r", obj->name);
stc (buf, ch);
sprintf (buf, "#yObject's Short description:#n %s.\n\r", obj->short_descr);
stc (buf, ch);
sprintf (buf, "#yObject's Long description:#n %s\n\r", obj->description);
stc (buf, ch);
sprintf (buf, "#yOriginal Object's vnum:#n %d.\n\r", obj->pIndexData->vnum);
stc (buf, ch);
sprintf (buf, "#yObject's Maker:#n %s.\n\r", nm1);
stc (buf, ch);
sprintf (buf, "#yObject's Owner:#n %s.\n\r", nm2);
stc (buf, ch);
sprintf (buf, "#yObject's Original Creator:#n %s.\n\r", nm3);
stc (buf, ch);
sprintf (buf, "#yObject's History:#n %s.\n\r", nm4);
stc (buf, ch);
stc ("\n\r#y--------------------------------------------------#n\n\r", ch);
return;
}
void
do_untrain (CHAR_DATA * ch, char *argument)
{
char arg1[MIL];
char arg2[MIL];
char buf[MSL];
int amount = 0;
int urin = 0;
int urin_counter = 0;
int lowstat = 10000;
int midstat = 100000;
long expmax = 2000000000;
bool hp = FALSE;
bool mana = FALSE;
bool move = FALSE;
bool primal = FALSE;
bool untrain = FALSE;
bool expcapped = FALSE;
int expgain = 0;
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (IS_SET (ch->corbits, COR_HYBRID))
lowstat = 70000;
if (ch->max_hit > lowstat && ch->max_hit != midstat)
{
hp = TRUE;
if (!untrain)
untrain = TRUE;
}
if (ch->max_mana > lowstat && ch->max_hit != midstat)
{
mana = TRUE;
if (!untrain)
untrain = TRUE;
}
if (ch->max_move > lowstat && ch->max_hit != midstat)
{
move = TRUE;
if (!untrain)
untrain = TRUE;
}
if (ch->practice > 0)
{
primal = TRUE;
if (!untrain)
untrain = TRUE;
}
if (ch->exp >= expmax)
{
expcapped = TRUE;
if (untrain)
untrain = FALSE;
}
if (arg1[0] == '\0')
{
if (untrain)
{
sprintf (buf, "You can untrain the following:\n\r");
send_to_char (buf, ch);
if (hp)
{
sprintf (buf, "Life Essence + %d experience per point.\n\r",
(ch->max_hit));
stc (buf, ch);
}
if (mana)
{
sprintf (buf, "Mystical Power + %d experience per point.\n\r",
(ch->max_mana));
stc (buf, ch);
}
if (move)
{
sprintf (buf, "Vitality + %d experience per point.\n\r",
(ch->max_move));
stc (buf, ch);
}
if (primal)
{
sprintf (buf, "Primal + %d experience per point.\n\r",
((ch->practice) * 250));
stc (buf, ch);
}
}
else if (expcapped)
{
stc ("You have to much experience to untrain anything.\n\r", ch);
return;
}
else
{
stc ("You can't untrain anything.\n\r", ch);
return;
}
}
else if (!str_cmp (arg1, "life"))
{
if (!hp)
{
do_untrain (ch, "");
return;
}
if (!untrain)
{
do_untrain (ch, "");
return;
}
if (expcapped)
{
do_untrain (ch, "");
return;
}
if (!is_number (arg2) || arg2[0] == '\0')
{
stc ("Please enter a numeric value.\n\r", ch);
return;
}
if (is_number (arg2))
{
amount = atoi (arg2);
if (amount < 1 || amount > 4000)
{
stc ("Please enter a value between 1 and 4000.\n\r", ch);
return;
}
}
do_cast (ch, "'dispel magic' self");
do_mclear (ch, "self");
for (urin = 0; urin < amount; urin++)
{
if (ch->exp < expmax && ch->max_hit > lowstat
&& ch->max_hit != midstat)
{
expgain += ch->max_hit;
ch->exp += ch->max_hit;
ch->max_hit--;
urin_counter++;
}
}
if (urin_counter == 0)
send_to_char ("You can't untrain any life essence.\n\r", ch);
else if (urin_counter == 1)
{
sprintf (buf,
"You untrain 1 point of life essence and get a %d experience refund.\n\r",
expgain);
stc (buf, ch);
}
else
{
sprintf (buf,
"You untrain %d life essence and get a %d experience refund.\n\r",
urin_counter, expgain);
send_to_char (buf, ch);
}
return;
}
else if (!str_cmp (arg1, "mystical"))
{
if (!mana)
{
do_untrain (ch, "");
return;
}
if (!untrain)
{
do_untrain (ch, "");
return;
}
if (expcapped)
{
do_untrain (ch, "");
return;
}
if (!is_number (arg2) || arg2[0] == '\0')
{
stc ("Please enter a numeric value.\n\r", ch);
return;
}
if (is_number (arg2))
{
amount = atoi (arg2);
if (amount < 1 || amount > 4000)
{
stc ("Please enter a value between 1 and 4000.\n\r", ch);
return;
}
}
do_cast (ch, "'dispel magic' self");
do_mclear (ch, "self");
for (urin = 0; urin < amount; urin++)
{
if (ch->exp < expmax && ch->max_mana > lowstat
&& ch->max_mana != midstat)
{
expgain += ch->max_mana;
ch->exp += ch->max_mana;
ch->max_mana--;
urin_counter++;
}
}
if (urin_counter == 0)
send_to_char ("You can't untrain any mystical power.\n\r", ch);
else if (urin_counter == 1)
{
sprintf (buf,
"You untrain 1 point of mystical power and get a %d experience refund.\n\r",
expgain);
stc (buf, ch);
}
else
{
sprintf (buf,
"You untrain %d mystical power and get a %d experience refund.\n\r",
urin_counter, expgain);
send_to_char (buf, ch);
}
return;
}
else if (!str_cmp (arg1, "vitality"))
{
if (!move)
{
do_untrain (ch, "");
return;
}
if (!untrain)
{
do_untrain (ch, "");
return;
}
if (expcapped)
{
do_untrain (ch, "");
return;
}
if (!is_number (arg2) || arg2[0] == '\0')
{
stc ("Please enter a numeric value.\n\r", ch);
return;
}
if (is_number (arg2))
{
amount = atoi (arg2);
if (amount < 1 || amount > 4000)
{
stc ("Please enter a value between 1 and 4000.\n\r", ch);
return;
}
}
do_cast (ch, "'dispel magic' self");
do_mclear (ch, "self");
for (urin = 0; urin < amount; urin++)
{
if (ch->exp < expmax && ch->max_move > lowstat
&& ch->max_hit != midstat)
{
expgain += ch->max_move;
ch->exp += ch->max_move;
ch->max_move--;
urin_counter++;
}
}
if (urin_counter == 0)
send_to_char ("You can't untrain any vitality.\n\r", ch);
else if (urin_counter == 1)
{
sprintf (buf,
"You untrain 1 point of vitality and get a %d experience refund.\n\r",
expgain);
stc (buf, ch);
}
else
{
sprintf (buf,
"You untrain %d vitality and get a %d experience refund.\n\r",
urin_counter, expgain);
send_to_char (buf, ch);
}
return;
}
else if (!str_cmp (arg1, "primal"))
{
if (!primal)
{
do_untrain (ch, "");
return;
}
if (!untrain)
{
do_untrain (ch, "");
return;
}
if (expcapped)
{
do_untrain (ch, "");
return;
}
if (!is_number (arg2) || arg2[0] == '\0')
{
stc ("Please enter a numeric value.\n\r", ch);
return;
}
if (is_number (arg2))
{
amount = atoi (arg2);
if (amount < 1 || amount > 4000)
{
stc ("Please enter a value between 1 and 4000.\n\r", ch);
return;
}
}
for (urin = 0; urin < amount; urin++)
{
if (ch->exp < expmax && ch->practice > 0)
{
expgain += ch->practice;
ch->exp += ch->practice * 250;
ch->practice--;
urin_counter++;
}
}
expgain *= 250;
if (urin_counter == 0)
send_to_char ("You can't untrain any primal.\n\r", ch);
else if (urin_counter == 1)
{
sprintf (buf,
"You untrain 1 primal and get a %d experience refund.\n\r",
expgain);
stc (buf, ch);
}
else
{
sprintf (buf,
"You untrain %d primal and get a %d experience refund.\n\r",
urin_counter, expgain);
send_to_char (buf, ch);
}
return;
}
else
{
do_untrain (ch, "");
return;
}
return;
}
void
waiting (CHAR_DATA * ch, int tic)
{
int sn;
if (IS_NPC (ch))
return;
if (IS_ITEMAFF (ch, ITEMA_SUPERSPEED))
tic -= 6;
if (!IS_HL (ch))
{
sn = skill_lookup ("slow");
if (is_affected (ch, sn))
{
act ("$n seems so slow and sluggish.", ch, NULL, NULL, TO_ROOM);
tic += 5;
}
}
if (!IS_HL (ch))
{
sn = skill_lookup ("haste");
if (is_affected (ch, sn))
{
stc ("Your enchanced speed makes you move faster.\n\r", ch);
act ("$n moves faster then normal.", ch, NULL, NULL, TO_ROOM);
tic -= 5;
}
}
if (IS_XX (ch, XX_ABOMPANTHER))
{
stc ("Your panther fleshbond makes you move faster.\n\r", ch);
act ("$n moves faster then normal.", ch, NULL, NULL, TO_ROOM);
tic -= 3;
}
if (IS_SET (ch->in_room->added_flags, ROOM2_TEMPEST) && !IS_WRAITH (ch))
{
stc ("The chaos of the room slows you down.\n\r", ch);
act ("$n seems so slow and sluggish.", ch, NULL, NULL, TO_ROOM);
tic += 5;
}
if (ch->in_room->area->plane == PLANE_LIMBO && !IS_NEUTRAL (ch))
{
stc ("The chaos of the plane slows you down.\n\r", ch);
act ("$n seems so slow and sluggish.", ch, NULL, NULL, TO_ROOM);
tic += 5;
}
if (ch->in_room->area->plane == PLANE_HELL && !IS_EVIL (ch))
{
stc
("The hellfire of the room slows you down as you try to keep from getting burned.\n\r",
ch);
act ("$n seems so slow and sluggish.", ch, NULL, NULL, TO_ROOM);
tic += 5;
}
if (ch->in_room->area->plane == PLANE_HEAVEN && !IS_GOOD (ch))
{
stc ("The angelics of the room makes you sick, slowing you down.\n\r",
ch);
act ("$n seems so slow and sluggish.", ch, NULL, NULL, TO_ROOM);
tic += 5;
}
if (IS_IMMORTAL (ch))
{
tic = 1;
}
else
{
if (tic < 2)
tic = 2;
}
WAIT_STATE (ch, tic);
return;
}
void
do_calculate (CHAR_DATA * ch, char *argument)
{
char arg1[MIL];
char arg2[MIL];
char buf[MSL];
int curstat = 0;
int amount = 0;
int urin = 0;
int urin_counter = 0;
int tcost = 0;
int expcost = 0;
int max = 2000000000;
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (arg1[0] == '\0')
{
stc
("#ySyntax: Calculate <#7life#y/#7mp#y/#7vital#y/#7primal#y> <#7amount#y>.\n\r",
ch);
return;
}
else if (!str_cmp (arg1, "life"))
{
curstat = ch->max_hit;
if (!is_number (arg2) || arg2[0] == '\0')
{
stc ("Please enter a numeric value.\n\r", ch);
return;
}
if (is_number (arg2))
{
amount = atoi (arg2);
if (amount < 1 || amount > 4000)
{
stc ("Please enter a value between 1 and 4000.\n\r", ch);
return;
}
}
for (urin = 0; urin < amount; urin++)
{
if (expcost < max)
{
curstat++;
tcost = traincost (ch, curstat);
expcost += tcost;
urin_counter++;
}
}
if (urin_counter == 0)
send_to_char ("You can't calculate that.\n\r", ch);
else if (urin_counter == 1)
{
sprintf (buf,
"It will cost you #y%d#n experience to train #y1#n life essence.\n\r",
expcost);
stc (buf, ch);
}
else
{
sprintf (buf,
"It will cost you #y%d#n experience to train #y%d#n life essence.\n\r",
expcost, urin_counter);
send_to_char (buf, ch);
}
return;
}
else if (!str_cmp (arg1, "mp"))
{
curstat = ch->max_mana;
if (!is_number (arg2) || arg2[0] == '\0')
{
stc ("Please enter a numeric value.\n\r", ch);
return;
}
if (is_number (arg2))
{
amount = atoi (arg2);
if (amount < 1 || amount > 4000)
{
stc ("Please enter a value between 1 and 4000.\n\r", ch);
return;
}
}
for (urin = 0; urin < amount; urin++)
{
if (expcost < max)
{
curstat++;
tcost = traincost (ch, curstat);
expcost += tcost;
urin_counter++;
}
}
if (urin_counter == 0)
send_to_char ("You can't calculate that.\n\r", ch);
else if (urin_counter == 1)
{
sprintf (buf,
"It will cost you #y%d#n experience to train #y1#n mystical power.\n\r",
expcost);
stc (buf, ch);
}
else
{
sprintf (buf,
"It will cost you #y%d#n experience to train #y%d#n mystical power.\n\r",
expcost, urin_counter);
send_to_char (buf, ch);
}
return;
}
else if (!str_cmp (arg1, "vital") || !str_cmp (arg1, "vitality"))
{
curstat = ch->max_move;
if (!is_number (arg2) || arg2[0] == '\0')
{
stc ("Please enter a numeric value.\n\r", ch);
return;
}
if (is_number (arg2))
{
amount = atoi (arg2);
if (amount < 1 || amount > 4000)
{
stc ("Please enter a value between 1 and 4000.\n\r", ch);
return;
}
}
for (urin = 0; urin < amount; urin++)
{
if (expcost < max)
{
curstat++;
tcost = traincost (ch, curstat);
expcost += tcost;
urin_counter++;
}
}
if (urin_counter == 0)
send_to_char ("You can't calculate that.\n\r", ch);
else if (urin_counter == 1)
{
sprintf (buf,
"It will cost you #y%d#n experience to train #y1#n vitality.\n\r",
expcost);
stc (buf, ch);
}
else
{
sprintf (buf,
"It will cost you #y%d#n experience to train #y%d#n vitality.\n\r",
expcost, urin_counter);
send_to_char (buf, ch);
}
return;
}
else if (!str_cmp (arg1, "primal"))
{
curstat = ch->practice;
if (!is_number (arg2) || arg2[0] == '\0')
{
stc ("Please enter a numeric value.\n\r", ch);
return;
}
if (is_number (arg2))
{
amount = atoi (arg2);
if (amount < 1 || amount > 1000)
{
stc ("Please enter a value between 1 and 1000.\n\r", ch);
return;
}
}
for (urin = 0; urin < amount; urin++)
{
curstat++;
expcost += curstat;
urin_counter++;
}
expcost *= 500;
if (urin_counter == 0)
send_to_char ("You can't calculate that.\n\r", ch);
else if (urin_counter == 1)
{
sprintf (buf,
"It will cost you #y%d#n experience to train #y1#n primal.\n\r",
expcost);
stc (buf, ch);
}
else
{
sprintf (buf,
"It will cost you #y%d#n experience to train #y%d#n primal.\n\r",
expcost, urin_counter);
send_to_char (buf, ch);
}
return;
}
else
{
do_calculate (ch, "");
return;
}
return;
}
char *
get_arankname (CHAR_DATA * ch)
{
static char akn[100];
akn[0] = '\0';
if (ch->arank == 0)
sprintf (akn, "Petitoner");
else if (ch->arank == 1)
sprintf (akn, "Archon");
else if (ch->arank == 2)
sprintf (akn, "Deva");
else if (ch->arank == 3 && !IS_BETRAYER (ch))
sprintf (akn, "Planar");
else if (ch->arank == 3 && IS_BETRAYER (ch))
sprintf (akn, "Lunar");
else if (ch->arank == 4 && !IS_BETRAYER (ch))
sprintf (akn, "Solar");
else if (ch->arank == 4 && IS_BETRAYER (ch))
sprintf (akn, "Betrayer");
else
sprintf (akn, "Bugged");
return akn;
}
void
do_autocopy (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (arg[0] == '\0')
{
if (IS_SET (mudconfig->world_affects, WORLD_AUTOCOPY))
stc ("Auto Copyover is currently (#yUnActive#n).\n\r", ch);
else
stc ("Auto Copyover is currently (#yActive#n).\n\r", ch);
stc ("Syntax: Autocopy <On/Off>.\n\r", ch);
return;
}
if (!str_cmp (arg, "on"))
{
if (!IS_SET (mudconfig->world_affects, WORLD_AUTOCOPY))
{
stc ("Auto Copyover is already active.\n\r", ch);
return;
}
else
{
REMOVE_BIT (mudconfig->world_affects, WORLD_AUTOCOPY);
stc ("You activate Auto Copyover.\n\r", ch);
return;
}
}
else if (!str_cmp (arg, "off"))
{
if (IS_SET (mudconfig->world_affects, WORLD_AUTOCOPY))
{
stc ("Auto Copyover is already deactiveted.\n\r", ch);
return;
}
else
{
SET_BIT (mudconfig->world_affects, WORLD_AUTOCOPY);
stc ("You deactivate Auto Copyover.\n\r", ch);
return;
}
}
else
{
if (IS_SET (mudconfig->world_affects, WORLD_AUTOCOPY))
stc ("Auto Copyover is currently (#yUnActive#n).\n\r", ch);
else
stc ("Auto Copyover is currently (#yActive#n).\n\r", ch);
stc ("Syntax: Autocopy <On/Off>.\n\r", ch);
return;
}
return;
}
void
copymove (CHAR_DATA * ch)
{
CHAR_DATA *mount;
ROOM_INDEX_DATA *location;
if (ch->in_room == location)
return;
if (IS_IMMORTAL (ch))
return;
if ((location = get_room_index (ROOM_VNUM_COPYOVER)) == NULL)
{
send_to_char ("You are completely lost.\n\r", ch);
return;
}
if (IS_SET (ch->evenmore, EM_JAILED) || IS_SOUL (ch))
return;
char_from_room (ch);
char_to_room (ch, location);
act ("$n appears in the room.", ch, NULL, NULL, TO_ROOM);
do_look (ch, "auto");
if ((mount = ch->mount) == NULL)
return;
char_from_room (mount);
char_to_room (mount, ch->in_room);
return;
}
char *
get_skin (CHAR_DATA * ch)
{
static char skin[200];
skin[0] = '\0';
if (ch->pcdata->kensaitough >= 1000)
sprintf (skin, "is so hard it could bend weapons");
else if (ch->pcdata->kensaitough >= 900)
sprintf (skin, "has attained the hardness of draconic scales");
else if (ch->pcdata->kensaitough >= 800)
sprintf (skin, "is as hard as dwarven smithed armor");
else if (ch->pcdata->kensaitough >= 700)
sprintf (skin, "has attained an armor-like quality");
else if (ch->pcdata->kensaitough >= 600)
sprintf (skin, "is as hard as the hardest rock");
else if (ch->pcdata->kensaitough >= 500)
sprintf (skin, "has taken on a metalic hardness");
else if (ch->pcdata->kensaitough >= 400)
sprintf (skin, "has attained a rock hard sheen");
else if (ch->pcdata->kensaitough >= 300)
sprintf (skin, "has taken on a wood hardness");
else if (ch->pcdata->kensaitough >= 200)
sprintf (skin, "is about as hard as bark");
else if (ch->pcdata->kensaitough >= 100)
sprintf (skin, "has taken on a leathery hardness");
else if (ch->pcdata->kensaitough >= 1)
sprintf (skin, "has started to harden");
else
sprintf (skin, "is softer then a babys bottom");
return skin;
}
char *
get_kensaidisc (CHAR_DATA * ch)
{
static char disc[200];
disc[0] = '\0';
if (ch->pcdata->kensaidisc >= 1000)
sprintf (disc, "Your discipline rivals the Gods");
else if (ch->pcdata->kensaidisc >= 900)
sprintf (disc, "You can bend steal bars with your mind");
else if (ch->pcdata->kensaidisc >= 800)
sprintf (disc, "Your discipline rivals any Warlock");
else if (ch->pcdata->kensaidisc >= 700)
sprintf (disc, "You can levitate with intense concentration");
else if (ch->pcdata->kensaidisc >= 600)
sprintf (disc, "You have attained an iron discipline");
else if (ch->pcdata->kensaidisc >= 500)
sprintf (disc, "You can now levitate a candle with your mind");
else if (ch->pcdata->kensaidisc >= 400)
sprintf (disc, "You can push a candle across a table with your mind");
else if (ch->pcdata->kensaidisc >= 300)
sprintf (disc,
"You can barley make a candle flicker, or is that the wind?");
else if (ch->pcdata->kensaidisc >= 200)
sprintf (disc,
"Your mind is hardly your best weapon,but it is improving");
else if (ch->pcdata->kensaidisc >= 100)
sprintf (disc, "You are disciplined enough to leave the last cookie");
else if (ch->pcdata->kensaidisc >= 1)
sprintf (disc, "You have started training your discipline");
else
sprintf (disc, "You are about as disciplined as a spoiled 5 year old");
return disc;
}
char *
get_class (CHAR_DATA * ch)
{
static char cls[100];
cls[0] = '\0';
if (ch->class == CLASS_NONE)
sprintf (cls, "Unclassed");
else if (ch->class == CLASS_VAMPIRE)
sprintf (cls, "Vampire");
else if (ch->class == CLASS_PLANARSOHEI)
sprintf (cls, "Planar Sohei");
else if (ch->class == CLASS_WEREWOLF)
sprintf (cls, "Werewolf");
else if (ch->class == CLASS_ABOMINATION)
sprintf (cls, "Abomination");
else if (ch->class == CLASS_MAGE)
sprintf (cls, "Mage");
else if (ch->class == CLASS_LICH)
sprintf (cls, "Psionic");
else if (ch->class == CLASS_SKINDANCER)
sprintf (cls, "SkinDancer");
else if (ch->class == CLASS_DEMON)
sprintf (cls, "Demon");
else if (ch->class == CLASS_BLACK_SPIRAL_DANCER)
sprintf (cls, "BSD");
else if (ch->class == CLASS_NEPHANDI)
sprintf (cls, "Nephandi");
else if (ch->class == CLASS_HIGHLANDER)
sprintf (cls, "Highlander");
else if (ch->class == CLASS_GHOUL)
sprintf (cls, "Ghoul");
else if (ch->class == CLASS_ANGEL)
sprintf (cls, "Angel");
else if (ch->class == CLASS_NINJA)
sprintf (cls, "Ninja");
else if (ch->class == CLASS_GYPSY)
sprintf (cls, "Gypsy");
else if (ch->class == CLASS_SHIDOSHI)
sprintf (cls, "Shidoshi");
else if (ch->class == CLASS_DRACONIAN)
sprintf (cls, "Draconian");
else if (ch->class == CLASS_DRAGON)
sprintf (cls, "Dragon");
else if (ch->class == CLASS_KAHN)
sprintf (cls, "Kahn");
else if (ch->class == CLASS_ABERRATION)
sprintf (cls, "Aberration");
else if (ch->class == CLASS_RAKSHASA)
sprintf (cls, "Rakshasa");
else if (ch->class == CLASS_GAIAINQ)
sprintf (cls, "Gaia Inquisitor");
else if (ch->class == CLASS_DJINN)
sprintf (cls, "Djinn");
else if (ch->class == CLASS_TAKARRA)
sprintf (cls, "Takarra");
else if (ch->class == CLASS_KRENSHAR)
sprintf (cls, "Krenshar");
else if (ch->class == CLASS_FAE)
sprintf (cls, "Fae");
else if (ch->class == CLASS_WRAITH)
sprintf (cls, "Wraith");
else if (ch->class == CLASS_WEAPONMASTER)
sprintf (cls, "Kensai");
else if (ch->class == CLASS_MONK)
sprintf (cls, "Monk");
else if (ch->class == CLASS_SHIDOSHI)
sprintf (cls, "Shidoshi");
else if (ch->class == CLASS_WISHENCHANT)
sprintf (cls, "Wish Enchanter");
else if (ch->class == CLASS_EFRETI)
sprintf (cls, "Efreti");
else if (ch->class == CLASS_CEVOYIA)
sprintf (cls, "Cevoyia");
else if (ch->class == CLASS_ELF)
sprintf (cls, "Elf");
else if (ch->class == CLASS_ANGELW)
sprintf (cls, "Angel");
else if (ch->class == CLASS_BETRAYER)
sprintf (cls, "Betrayer");
else if (ch->class == CLASS_SAINT)
sprintf (cls, "Saint");
else if (ch->class == CLASS_IKIRYU)
sprintf (cls, "Ikiryu");
else if (ch->class == CLASS_SHINOBI)
sprintf (cls, "Shinobi");
else if (ch->class == CLASS_TIGRASHA)
sprintf (cls, "Tigrasha");
else if (ch->class == CLASS_SHAAHOUL)
sprintf (cls, "Sha'Ahoul");
else if (ch->class == CLASS_DEFYLER)
sprintf (cls, "Defyler");
else if (ch->class == CLASS_NECROMANCER)
sprintf (cls, "Necromancer");
else if (ch->class == CLASS_BALEHOUND)
sprintf (cls, "Balehound");
else if (ch->class == CLASS_PARAGON)
sprintf (cls, "Paragon");
else if (ch->class == CLASS_NEWWW)
sprintf (cls, "Lycan");
else
sprintf (cls, "Unknown Class?");
return cls;
}
void
phistlog (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char log[MSL];
smash_tilde (argument);
sprintf (log, argument);
if (ch->beenset != NULL)
{
sprintf (buf, "%s * %s", log, ch->beenset);
free_string (ch->beenset);
ch->beenset = str_dup (buf);
}
else
{
free_string (ch->beenset);
ch->beenset = str_dup (log);
}
SET_BIT (ch->nymbits, NYM_NEWLOG);
return;
}
void
do_phistory (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
char arg2[MIL];
char arg3[MIL];
char buf[4 * MSL];
char nm1[4 * MSL];
char nm2[4 * MSL];
char nm3[4 * MSL];
CHAR_DATA *victim;
argument = one_argument (argument, arg);
argument = one_argument (argument, arg2);
argument = one_argument (argument, arg3);
if (arg[0] == '\0')
{
stc ("Who do you want the history of?\n\r", ch);
return;
}
if ((victim = get_pc_world (ch, arg)) == NULL)
{
send_to_char ("No one with that name on.\n\r", ch);
return;
}
if (IS_NPC (victim))
{
stc ("Not on Mobile's.\n\r", ch);
return;
}
if (victim->beenset != NULL && strlen (victim->beenset) > 1)
sprintf (nm1, victim->beenset);
else
sprintf (nm1, "No set log at the moment");
if (victim->del_log != NULL && strlen (victim->del_log) > 1)
sprintf (nm2, victim->del_log);
else
sprintf (nm2, "Never had the set log deleted");
if (victim->prev_classes != NULL && strlen (victim->prev_classes) > 1)
sprintf (nm3, victim->prev_classes);
else
sprintf (nm3, "No previous classes");
if (arg2[0] == '\0')
{
stc
("\n\r#y-----------------#o**#R Player History#o **#y-----------------#n\n\r",
ch);
sprintf (buf, "\n\r #yPlayer's Name:#n %s.\n\r", victim->name);
stc (buf, ch);
sprintf (buf, " #yPlayer's Class:#n %s.\n\r", get_class (victim));
stc (buf, ch);
sprintf (buf, " #yPlayer's Set Log:#n %s.\n\r", nm1);
stc (buf, ch);
sprintf (buf, " #ySet Log Deleted By:#n %s.\n\r", nm2);
stc (buf, ch);
sprintf (buf, " #yPlayer's Prev. Classes:#n %s.\n\r", nm3);
stc (buf, ch);
sprintf (buf, " #yLog Has Been Deleted:#n %d #yTimes.\n\r",
victim->del_log_count);
stc (buf, ch);
sprintf (buf, " #yHas Been ClearClassed:#n %d #yTimes#n.\n\r",
victim->clearclass_count);
stc (buf, ch);
if (victim->pcdata->backnum > 0)
{
sprintf (buf,
" #yLast Backup %s Did Went In Backup Folder#n %d#n.\n\r",
victim->name, victim->pcdata->backnum);
stc (buf, ch);
}
stc
("\n\r#y------------------------------------------------------#n\n\r",
ch);
if (ch->level >= LEVEL_IMPLEMENTOR)
{
if (IS_NYM (victim, NYM_NEWLOG))
{
REMOVE_BIT (victim->nymbits, NYM_NEWLOG);
}
if (IS_OWNER (ch))
stc
("\n\r #yTo delete and send the string to log file.\n\r Syntax: phistory <victim> delete <setlog/clearclass>.\n\r",
ch);
stc
("\n\r#y------------------------------------------------------#n\n\r",
ch);
}
return;
}
else if (!str_cmp (arg2, "delete"))
{
if (ch->level < LEVEL_OWNER)
{
stc ("You are not authorized to do that.\n\r", ch);
return;
}
if (arg3[0] == '\0')
{
stc
("What log do you wish to delete ?\n\rSetlog or Clearclass.\n\r",
ch);
return;
}
if (!str_cmp (arg3, "setlog"))
{
if (victim->beenset == NULL || strlen (victim->beenset) < 2)
{
stc ("They have never been set.\n\r", ch);
return;
}
if (victim->beenset != NULL && strlen (victim->beenset) > 1)
{
victim->del_log_count = victim->del_log_count + 1;
stc ("Log deleted from player and sent to log files.\n\r", ch);
sprintf (buf, "Set log deleted by: %s, belonged to %s * %s",
ch->name, victim->name, victim->beenset);
phist_string (buf, 0);
logchan (buf);
free_string (victim->beenset);
victim->beenset = str_dup ("");
if (victim->del_log != NULL && strlen (victim->del_log) > 1)
{
sprintf (buf, "%s * %s", ch->name, victim->del_log);
free_string (victim->del_log);
victim->del_log = str_dup (buf);
}
else
{
victim->del_log = str_dup (ch->name);
}
return;
}
}
else if (!str_cmp (arg3, "clearclass"))
{
if (victim->prev_classes == NULL
|| strlen (victim->prev_classes) < 2)
{
stc ("They have never been clearclassed.\n\r", ch);
return;
}
if (victim->prev_classes != NULL
&& strlen (victim->prev_classes) > 1)
{
victim->del_log_count = victim->del_log_count + 1;
stc ("Log deleted from player and sent to log files.\n\r", ch);
sprintf (buf,
"Prev classes log deleted by: %s, belonged to %s * %s",
ch->name, victim->name, victim->prev_classes);
phist_string (buf, 0);
logchan (buf);
free_string (victim->prev_classes);
victim->prev_classes = str_dup ("");
if (victim->del_log != NULL && strlen (victim->del_log) > 1)
{
sprintf (buf, "%s * %s", ch->name, victim->del_log);
free_string (victim->del_log);
victim->del_log = str_dup (buf);
}
else
{
victim->del_log = str_dup (ch->name);
}
return;
}
}
else
{
do_phistory (ch, "");
return;
}
}
else
{
do_phistory (ch, "");
return;
}
return;
}
char *
get_form (CHAR_DATA * ch)
{
static char form[400];
char *mage_col;
char dragonform[50];
int gen, chcolor;
gen = ch->pcdata->dpowers[DRAGON_AGE];
chcolor = ch->pcdata->dpowers[DRAGON_COLOR];
if (chcolor == 0)
chcolor = 3;
form[0] = '\0';
switch (ch->class)
{
default:
sprintf (form, "BUGGYFORM");
break;
case CLASS_NINJA:
if (IS_SET (ch->polyaff, POLY_NINJAFORM))
{
if (IS_XBITS (ch, X_LIGHTPATH))
{
sprintf (form, "#nA #7S#ctealthed #yG#olowing #7S#0hadow#n");
}
else if (IS_XBITS (ch, X_DARKPATH))
{
if (IS_SET (ch->xbits, X_YANG_MIGHT))
sprintf (form,
"#nA #oH#0orned #RL#rethal#o D#0emonic #7S#chadow#n");
else
sprintf (form, "#nA #RL#rethal #7S#chadow#n");
}
}
else
sprintf (form, "");
break;
case CLASS_ELF:
if (IS_POLYAFF (ch, POLY_ELFFORM))
sprintf (form, "#0A Tall #GE#glven #GA#grcher#n");
else
sprintf (form, "");
break;
case CLASS_WEAPONMASTER:
if (IS_POLYAFF (ch, POLY_MASTERFORM))
sprintf (form,
"#nAn #0A#rn#Rc#7i#Re#rn#0t#c M#Ca#7st#Ce#cr#n of the #cB#Cl#7a#Cd#ce#n");
else
sprintf (form, "");
break;
case CLASS_TIGRASHA:
if (IS_POLYAFF (ch, POLY_KAHNFORM) && IS_POLYAFF (ch, POLY_ANGELFORM)
&& IS_POLYAFF (ch, POLY_TIGERFORM))
sprintf (form,
"#nA #yF#oera#yl #CM#caj#7es#cti#Cc #oT#yige#or #0W#7arrio#0r#n");
else if (IS_POLYAFF (ch, POLY_KAHNFORM)
&& IS_POLYAFF (ch, POLY_ANGELFORM))
sprintf (form, "#nA #CB#cea#7uti#cfu#Cl #yF#oera#yl #cWere#0Tiger#n");
else if (IS_POLYAFF (ch, POLY_KAHNFORM)
&& IS_POLYAFF (ch, POLY_TIGERFORM))
sprintf (form, "#nA #yFerocious #CM#caj#7es#cti#Cc #0Tiger#n");
else if (IS_POLYAFF (ch, POLY_ANGELFORM)
&& IS_POLYAFF (ch, POLY_TIGERFORM))
sprintf (form,
"#nA #oG#yo#old#ye#on #CM#caj#7es#cti#Cc #yT#0i#yg#0e#yr#n");
else if (IS_POLYAFF (ch, POLY_KAHNFORM))
sprintf (form, "#nA #yFerocious #oFurry #cWere#0Tiger#n");
else if (IS_POLYAFF (ch, POLY_ANGELFORM))
sprintf (form,
"#nA #CB#cea#7uti#cfu#Cl #oG#yo#old#ye#on #7Warrior#n");
else if (IS_POLYAFF (ch, POLY_TIGERFORM))
sprintf (form, "#nA #CM#caj#7es#cti#Cc #yT#0i#yg#0e#yr#n");
else
sprintf (form, "");
break;
case CLASS_DEFYLER:
if (IS_SET (ch->act, PLR_WOLFMAN) && IS_SET (ch->polyaff, POLY_WWZULO)
&& IS_POLYAFF (ch, POLY_DJINNFORM))
sprintf (form,
"#nA #CG#cargantua#Cn #yH#oair#yy#n N#0ightmaris#nh#R F#rien#Rd#n");
else if (IS_SET (ch->act, PLR_WOLFMAN)
&& IS_SET (ch->polyaff, POLY_DJINNFORM))
sprintf (form, "#nAn #cEnormous#o Furry#y Were#0Monstrosity#n");
else if (IS_SET (ch->polyaff, POLY_DJINNFORM)
&& IS_SET (ch->polyaff, POLY_WWZULO))
sprintf (form, "#nA #0Hideous#r Scary#y Giant#n");
else if (IS_SET (ch->act, PLR_WOLFMAN)
&& IS_SET (ch->polyaff, POLY_WWZULO))
sprintf (form, "#nA #gGigantic#0 Furry#g Were#oWolf#n");
else if (IS_POLYAFF (ch, POLY_WWZULO))
sprintf (form, "#nA #0Hideous #cTowering #yGiant#n");
else if (IS_SET (ch->act, PLR_WOLFMAN))
sprintf (form, "#nA #gHuge#o Werewolf#n");
else if (IS_POLYAFF (ch, POLY_DJINNFORM))
sprintf (form, "#nA #cEnormous#r Scary#0 Djinn#n");
else
sprintf (form, "");
break;
case CLASS_PLANARSOHEI:
if (IS_SET (ch->polyaff, POLY_NINJAFORM)
&& IS_SET (ch->polyaff, POLY_ANGELFORM))
sprintf (form,
"#nA #7Cel#cest#Cial #0G#yolden #oW#yinged #CA#0ssassin#n");
else if (IS_SET (ch->polyaff, POLY_NINJAFORM))
sprintf (form, "#nA #7S#ctealthed #yG#olowing #7S#0hadow#n");
else if (IS_POLYAFF (ch, POLY_ANGELFORM))
sprintf (form,
"#nA #CB#cea#7uti#cfu#Cl#n #oG#yo#old#ye#on #7Warrior#n");
else
sprintf (form, "");
break;
case CLASS_DRAGON:
sprintf (dragonform, dform_data[gen].name, dcolor[chcolor]);
if (IS_POLYAFF (ch, POLY_DRAGONFORM) && IS_POLYAFF (ch, POLY_DRACOFORM))
sprintf (form, "#n%s%s", dragonform, get_dprof (ch));
else if (IS_POLYAFF (ch, POLY_DRACOFORM))
sprintf (form, "#nA Large %s Half-Dragon%s", dcolor[chcolor],
get_drank2 (ch));
else
sprintf (form, "");
break;
case CLASS_DRACONIAN:
if (IS_POLYAFF (ch, POLY_DRACOFORM))
sprintf (form, "#nA Large %s Half-Dragon%s", dcolor[chcolor],
get_drank2 (ch));
else
sprintf (form, "");
break;
case CLASS_ABOMINATION:
if (IS_SET (ch->act, PLR_WOLFMAN) && IS_SET (ch->polyaff, POLY_ZULO)
&& IS_SET (ch->polyaff, POLY_WWZULO))
// sprintf (form, "#nA #0Foul#n #rIncarnation#n of #0Death#n and #RClaws#n");
sprintf (form,
"#0a #Rtwi#rste#Rd #0and #gdistorted #Rbl#roo#Rd #ghunter#n");
else if (IS_SET (ch->act, PLR_WOLFMAN)
&& IS_SET (ch->polyaff, POLY_WWZULO))
sprintf (form, "#nA #gGigantic#0 Furry#g Were#oWolf#n");
else if (IS_SET (ch->act, PLR_WOLFMAN)
&& IS_SET (ch->polyaff, POLY_ZULO))
sprintf (form, "#nA #0Foul#r Shadow#n of #0Death#n");
else if (IS_SET (ch->polyaff, POLY_ZULO)
&& IS_SET (ch->polyaff, POLY_WWZULO))
sprintf (form, "#0An#c Enormous #0Hideous #yGiant#n");
else if (IS_POLYAFF (ch, POLY_WWZULO))
sprintf (form, "#nA #0Hideous #cTowering #yGiant#n");
else if (IS_SET (ch->act, PLR_WOLFMAN))
sprintf (form, "#nA #gHuge#o Werewolf#n");
else if (IS_SET (ch->polyaff, POLY_ZULO)
&& IS_SET (ch->polyaff, POLY_WWZULO))
sprintf (form, "#0An #cEnormous #0Shadow of #rDarkness#n");
else
sprintf (form, "");
break;
case CLASS_BLACK_SPIRAL_DANCER:
{
char armor[24];
if (IS_POLYAFF (ch, POLY_BSDFORM))
sprintf (armor, "#0Ar#rm#7o#rr#0ed#n ");
else
sprintf (armor, "");
if (IS_SET (ch->act, PLR_WOLFMAN)
&& IS_SET (ch->polyaff, POLY_DEMONFORM)
&& IS_SET (ch->polyaff, POLY_WWZULO))
sprintf (form, "#0A #gGigantic #cHideous #RDemonic %s#0Werewolf#n",
armor);
else if (IS_POLYAFF (ch, POLY_WWZULO)
&& IS_SET (ch->polyaff, POLY_DEMONFORM))
sprintf (form, "#nA #0Hideous#R Demonic %s#rGiant#n", armor);
else if (IS_SET (ch->act, PLR_WOLFMAN)
&& IS_SET (ch->polyaff, POLY_DEMONFORM))
sprintf (form, "#nA #rMassive#R Demonic %s#0Werewolf#n", armor);
else if (IS_SET (ch->act, PLR_WOLFMAN)
&& IS_SET (ch->polyaff, POLY_WWZULO))
sprintf (form, "#nA #gGigantic#0 Furry %s#gWere#oWolf#n", armor);
else if (IS_POLYAFF (ch, POLY_DEMONFORM))
sprintf (form, "#nA #0Massive #rDemonic #cCreature#n", armor);
else if (IS_POLYAFF (ch, POLY_WWZULO))
sprintf (form, "#nA #0Hideous #cTowering %s#yGiant#n", armor);
else if (IS_SET (ch->act, PLR_WOLFMAN))
sprintf (form, "#nA #gHuge %s#oWerewolf#n", armor);
else
sprintf (form, "");
}
break;
case CLASS_GAIAINQ:
if (IS_SET (ch->act, PLR_WOLFMAN) && IS_SET (ch->polyaff, POLY_WWZULO))
sprintf (form,
"#nA #CB#cea#7uti#cfu#Cl#n #7Ce#7le#os#yti#7al #0Were#oWolf#n");
else if (IS_POLYAFF (ch, POLY_WWZULO))
sprintf (form, "#nA #CB#cea#7uti#cfu#Cl#n #cTowering #yGiant#n");
else if (IS_SET (ch->act, PLR_WOLFMAN))
sprintf (form, "#nA #7Ce#7le#os#yti#7al#o Werewolf#n");
break;
case CLASS_WEREWOLF:
if (IS_SET (ch->act, PLR_WOLFMAN) && IS_SET (ch->polyaff, POLY_WWZULO))
sprintf (form, "#nA #gGigantic#0 Furry#y Were#oWolf#n");
else if (IS_POLYAFF (ch, POLY_WWZULO))
sprintf (form, "#nA #0Hideous #cTowering #yGiant#n");
else if (IS_SET (ch->act, PLR_WOLFMAN))
sprintf (form, "#nA #gHuge#o Werewolf#n");
else
sprintf (form, "");
break;
case CLASS_RAKSHASA:
if (IS_SET (ch->polyaff, POLY_RAKSHASA))
sprintf (form, "#nA #rGargantuan#c Savage #0Tiger#o Monstrosity#n");
else if (IS_SET (ch->polyaff, POLY_KAHNFORM)
&& IS_SET (ch->polyaff, POLY_DEMONFORM))
sprintf (form, "#nA #rDemonic #oBeastly #0Tiger#n");
else if (IS_POLYAFF (ch, POLY_DEMONFORM))
sprintf (form, "#nA #0Massive #rDemonic #cCreature#n");
else if (IS_POLYAFF (ch, POLY_KAHNFORM))
sprintf (form, "#nA #yFerocious #oFurry #cWere#0Tiger#n");
else
sprintf (form, "");
break;
case CLASS_KAHN:
if (IS_POLYAFF (ch, POLY_KAHNFORM))
sprintf (form, "#nA #yFerocious #oFurry #cWere#0Tiger#n");
else
sprintf (form, "");
break;
case CLASS_ANGELW:
if (IS_POLYAFF (ch, POLY_ANGELFORM))
sprintf (form,
"#nA #CB#cea#7uti#cfu#Cl#n #oG#yo#old#ye#on #7Warrior#n");
else
sprintf (form, "");
break;
case CLASS_DEMON:
if (IS_POLYAFF (ch, POLY_DEMONFORM))
sprintf (form, "#nA #0Massive #rDemonic #cCreature#n");
else
sprintf (form, "");
break;
case CLASS_BETRAYER:
if (IS_POLYAFF (ch, POLY_ANGELFORM) && IS_POLYAFF (ch, POLY_DEMONFORM))
/* sprintf (form,
"#nA #CB#cea#7uti#cfu#Cl#0 D#car#0k#r Demonic#0 Warrior#n"); */
sprintf (form,
"#nA #RR#ra#0va#rge#Rd#n and #yB#oattl#ye #7S#0carre#7d#n #CW#carrio#Cr #GO#gutcas#Gt#n");
else if (IS_POLYAFF (ch, POLY_ANGELFORM))
sprintf (form,
"#nA #CB#cea#7uti#cfu#Cl#n #oG#yo#old#ye#on #7Warrior#n");
else if (IS_POLYAFF (ch, POLY_DEMONFORM))
sprintf (form, "#nA #0Massive #rDemonic #cCreature#n");
else
sprintf (form, "");
break;
case CLASS_SAINT:
if (IS_POLYAFF (ch, POLY_ANGELFORM) && IS_POLYAFF (ch, POLY_SAINTFORM))
sprintf (form,
"#cA #CGo#Lr#7ge#Lo#Cus #7Sh#yim#7me#yri#7ng#o Wi#yng#oed #cF#Cighte#cr#n");
else if (IS_POLYAFF (ch, POLY_ANGELFORM))
sprintf (form,
"#nA #CB#cea#7uti#cfu#Cl#n #oG#yo#old#ye#on #7Warrior#n");
else if (IS_POLYAFF (ch, POLY_SAINTFORM))
sprintf (form, "#cA #CGo#Lr#7ge#Lo#Cus #cF#Cighte#cr#n");
else
sprintf (form, "");
break;
case CLASS_LICH:
if (IS_POLYAFF (ch, POLY_ZULO) && IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form, "#0A #cMenacing #0Dark#c Hooded#0 Necromancer#n");
// sprintf (form, "#nThe #cEm#Cbo#7di#Cme#cnt #nof the #oS#ya#on#yd#os #nof #CT#7im#Ce#n");
else if (IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form, "#cA #RH#rellish#c Being#n of #rF#Rl#ra#Rm#res#n");
else if (IS_SET (ch->polyaff, POLY_ZULO))
sprintf (form, "#0An #cEnormous#n #0Shadow#n of #rDarkness#n");
else
sprintf (form, "");
break;
case CLASS_CEVOYIA:
if (IS_POLYAFF (ch, POLY_ZULO))
sprintf (form, "#0A #7Pale #cSpectral #rWarrior#n");
else
sprintf (form, "");
break;
case CLASS_VAMPIRE:
if (IS_POLYAFF (ch, POLY_ZULO))
sprintf (form, "#0An #cEnormous#n #0Shadow#n of #rDarkness#n");
else
sprintf (form, "");
break;
case CLASS_TAKARRA:
if (IS_POLYAFF (ch, POLY_DJINNFORM))
sprintf (form, "#nA #CM#calevolen#Ct#y C#oloake#yd#r I#0ncubu#rs#n");
else
sprintf (form, "");
break;
case CLASS_DJINN:
if (IS_POLYAFF (ch, POLY_DJINNFORM))
sprintf (form, "#nA #cEnormous#r Scary#0 Djinn#n");
else
sprintf (form, "");
break;
case CLASS_GYPSY:
if (IS_POLYAFF (ch, POLY_NINJAFORM)
&& IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form, "#nA #lMy#Ls#7ti#Lc#lal #7S#0hadow#R A#rssassin#n");
else if (IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form, "#cAn #CEnlightened #oSp#yir#oit#yua#ol#c Manifest#n");
else if (IS_POLYAFF (ch, POLY_NINJAFORM))
sprintf (form, "#nA #7S#0tealthy#y G#glowing#0 W#oarrior#n");
else
sprintf (form, "");
break;
case CLASS_IKIRYU:
if (IS_POLYAFF (ch, POLY_ZULO) && IS_POLYAFF (ch, POLY_NINJAFORM))
sprintf (form, "#0A#o H#cumongous #RB#rloody#7 S#chadow#n");
else if (IS_POLYAFF (ch, POLY_ZULO))
sprintf (form, "#0An #cEnormous#n #0Shadow#n of #rDarkness#n");
else if (IS_POLYAFF (ch, POLY_NINJAFORM))
{
if (IS_SET (ch->xbits, X_YANG_MIGHT))
sprintf (form,
"#nA #oH#0orned #RL#rethal#o D#0emonic #7S#chadow#n");
else
sprintf (form, "#nA #RL#rethal #7S#chadow#n");
}
else
sprintf (form, "");
break;
case CLASS_NEPHANDI:
if (IS_POLYAFF (ch, POLY_DEMONFORM)
&& IS_SET (ch->mflags, MAGE_BETTERBODY))
/* sprintf (form, "#0A#r Massive#c Demonic#0 Warlock#n"); */
sprintf (form,
"#0A #rHe#Rll#rish #0Fiend #7of #rDi#Rabol#ric #CSo#crce#Cry#n");
else if (IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form, "#cA #RH#rellish#c Being#n of #rF#Rl#ra#Rm#res#n");
else if (IS_POLYAFF (ch, POLY_DEMONFORM))
sprintf (form, "#nA #0Massive #rDemonic #cCreature#n");
else
sprintf (form, "");
break;
case CLASS_ABERRATION:
if (IS_POLYAFF (ch, POLY_DJINNFORM) && IS_POLYAFF (ch, POLY_KAHNFORM))
sprintf (form,
"#nA #RR#repulsive#C H#carbinger#n of#o D#0eath#n and#P C#parnage#n");
else if (IS_POLYAFF (ch, POLY_DJINNFORM))
sprintf (form, "#nA #cEnormous#r Scary#0 Djinn#n");
else if (IS_POLYAFF (ch, POLY_KAHNFORM))
sprintf (form, "#nA #yFerocious #oFurry #cWere#0Tiger#n");
else
sprintf (form, "");
break;
case CLASS_MAGE:
if (IS_SET (ch->mflags, MAGE_BETTERBODY))
{
switch (ch->pcdata->runes[0])
{
default:
case WHITE_MAGIC:
mage_col = "#0A #7Lost One#n";
break;
case PURPLE_MAGIC:
mage_col = "#cA#P Forceful#c Gust#n of #pA#Pi#pr#n";
break;
case RED_MAGIC:
mage_col = "#cA #RH#rellish#c Being#n of #rF#Rl#ra#Rm#re#Rs#n";
break;
case YELLOW_MAGIC:
mage_col =
"#cAn #CEnlightened #oSp#yir#oit#yua#ol#c Manifest#n";
break;
case BLUE_MAGIC:
mage_col = "#cA#L S#Ce#Lr#Ce#Ln#Ce#l Being#n of#l Wa#Lt#ler#n";
break;
case GREEN_MAGIC:
mage_col = "#cA#G Collosal#g Ea#Gr#gthen#c Being#n";
break;
}
sprintf (form, mage_col);
}
else
sprintf (form, "");
break;
case CLASS_EFRETI:
if (IS_POLYAFF (ch, POLY_DJINNFORM) && IS_POLYAFF (ch, POLY_DEMONFORM))
sprintf (form,
"#0A#R B#ru#yr#7n#yi#rn#Rg#0 Form#n o#0f#R D#re#Rm#ro#Rn#ri#Rc#r H#Ra#7tr#Re#rd#n");
else if (IS_POLYAFF (ch, POLY_DJINNFORM))
sprintf (form, "#nA #cEnormous#r Scary#0 Djinn#n");
else if (IS_POLYAFF (ch, POLY_DEMONFORM))
sprintf (form, "A #0Massive #rDemonic #cCreature#n");
else
sprintf (form, "");
break;
case CLASS_SKINDANCER:
if (IS_SET (ch->act, PLR_WOLFMAN) && IS_SET (ch->polyaff, POLY_WWZULO)
&& IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form, "#oA#G G#gigantic#l My#Ls#7ti#Lc#lal#o Werewolf#n");
else if (IS_SET (ch->act, PLR_WOLFMAN)
&& IS_SET (ch->polyaff, POLY_WWZULO))
sprintf (form, "#nA #gGigantic#0 Furry#g Were#oWolf#n");
else if (IS_SET (ch->act, PLR_WOLFMAN)
&& IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form, "#nA #GCollosal#g Ea#Gr#gthen#o Werewolf#n");
else if (IS_POLYAFF (ch, POLY_WWZULO)
&& IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form, "#nA #0Hideous#g Ea#Gr#gthen#y Giant#n");
else if (IS_SET (ch->act, PLR_WOLFMAN))
sprintf (form, "#nA #gHuge#o Werewolf#n");
else if (IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form, "#cA#G Collosal#g Ea#Gr#gthen#c Being#n");
else if (IS_POLYAFF (ch, POLY_WWZULO))
sprintf (form, "#nA #0Hideous #cTowering #yGiant#n");
else
sprintf (form, "");
break;
case CLASS_WISHENCHANT:
if (IS_POLYAFF (ch, POLY_DJINNFORM)
&& IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form,
"#7A #lMy#Ls#7ti#Lc#lal #RN#rightmareis#Rh #0A#7pparitio#0n#n");
else if (IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form, "#cA#P Forceful#c Gust#n of #pA#Pi#pr#n");
else if (IS_POLYAFF (ch, POLY_DJINNFORM))
sprintf (form, "#nA #cEnormous#r Scary#0 Djinn#n");
else
sprintf (form, "");
break;
case CLASS_KRENSHAR:
if (IS_POLYAFF (ch, POLY_ZULO) && IS_POLYAFF (ch, POLY_KAHNFORM))
sprintf (form, "#0A #rHideous #7Skeletal#c Beast#0Tiger#n");
else if (IS_POLYAFF (ch, POLY_KAHNFORM))
sprintf (form, "#nA #yFerocious #oFurry #cWere#0Tiger#n");
else if (IS_POLYAFF (ch, POLY_ZULO))
sprintf (form, "#0An #cEnormous#n #0Shadow#n of #rDarkness#n");
else
sprintf (form, "");
break;
case CLASS_SHINOBI:
if (IS_POLYAFF (ch, POLY_NINJAFORM))
sprintf (form,
"#nA #yS#oi#yle#on#yt #7S#0hado#7w #cW#Car#cr#Cio#cr#n");
else
sprintf (form, "");
break;
case CLASS_SHAAHOUL:
if (IS_POLYAFF (ch, POLY_KAHNFORM))
sprintf (form,
"#nA #oF#0erociou#os #yS#ot#yr#oi#yp#oe#yd #cW#Car#cr#Cio#cr#n");
else
sprintf (form, "");
break;
case CLASS_SHIDOSHI:
if (IS_POLYAFF (ch, POLY_DEMONFORM) && IS_POLYAFF (ch, POLY_NINJAFORM))
{
if (IS_SET (ch->xbits, X_YANG_MIGHT))
sprintf (form,
"#nA #rMassive#o H#0orned#7 S#chadow#r Creature#n");
else
sprintf (form, "#nA #rMassive #7S#chadow#r Creature#n");
}
else if (IS_POLYAFF (ch, POLY_NINJAFORM))
{
if (IS_SET (ch->xbits, X_YANG_MIGHT))
sprintf (form,
"#nA #oH#0orned #RL#rethal#o D#0emonic #7S#chadow#n");
else
sprintf (form, "#nA #RL#rethal #7S#chadow#n");
}
else if (IS_POLYAFF (ch, POLY_DEMONFORM))
sprintf (form, "#nA #0Massive #RDemonic #cCreature#n");
else
sprintf (form, "");
break;
case CLASS_WRAITH:
if (IS_POLYAFF (ch, POLY_WRAITHFORM))
sprintf (form,
"#7A #0h#7ar#nr#0o#nw#7in#0g #rh#0al#rf#n-#0c#ro#0r#np#0o#nr#0i#ra#0l #0vi#nsa#0ge #nof #rh#0a#rtr#0e#rd#n");
else
sprintf (form, "");
break;
case CLASS_NECROMANCER:
if (IS_POLYAFF (ch, POLY_WRAITHFORM)
&& IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form, "#nA #nTw#0ist#ned #0A#rrcan#0e #nSpi#0r#nit#n");
else if (IS_SET (ch->mflags, MAGE_BETTERBODY))
sprintf (form, "#cAn #CEnlightened #oSp#yir#oit#yua#ol#c Manifest#n");
else if (IS_SET (ch->polyaff, POLY_WRAITHFORM))
sprintf (form,
"#7A #0h#7ar#nr#0o#nw#7in#0g #rh#0al#rf#n-#0c#ro#0r#np#0o#nr#0i#ra#0l #0vi#nsa#0ge #nof #rh#0a#rtr#0e#rd#n");
else
sprintf (form, "");
break;
case CLASS_PARAGON: //revstarthere
if (IS_POLYAFF (ch, POLY_WRAITHFORM) && IS_POLYAFF (ch, POLY_ANGELFORM))
sprintf (form,
"#nA #CB#cea#7uti#cfu#Cl #rH#0al#rf#n-#0c#ro#0r#np#0o#nr#0i#ra#0l #cSpe#7ct#cral #7Warrior#n");
else if (IS_POLYAFF (ch, POLY_ANGELFORM))
sprintf (form,
"#nA #CB#cea#7uti#cfu#Cl#n #oG#yo#old#ye#on #7Warrior#n");
else if (IS_SET (ch->polyaff, POLY_WRAITHFORM))
sprintf (form,
"#7A #0h#7ar#nr#0o#nw#7in#0g #rh#0al#rf#n-#0c#ro#0r#np#0o#nr#0i#ra#0l #0vi#nsa#0ge #nof #rh#0a#rtr#0e#rd#n");
else
sprintf (form, "");
break;
case CLASS_REVENANT: //revstarthere
if (IS_POLYAFF (ch, POLY_WRAITHFORM) && IS_POLYAFF (ch, POLY_ZULO))
sprintf (form,
"#0An #cEnormous #0vi#nsa#0ge #nof #0Ba#nl#0e#nf#0ul #rDarkness#n");
else if (IS_POLYAFF (ch, POLY_ZULO))
sprintf (form, "#0An #cEnormous#n #0Shadow#n of #rDarkness#n");
else if (IS_SET (ch->polyaff, POLY_WRAITHFORM))
sprintf (form,
"#7A #0h#7ar#nr#0o#nw#7in#0g #rh#0al#rf#n-#0c#ro#0r#np#0o#nr#0i#ra#0l #0vi#nsa#0ge #nof #rh#0a#rtr#0e#rd#n");
else
sprintf (form, "");
break;
case CLASS_BALEHOUND:
if (IS_SET (ch->act, PLR_WOLFMAN) && IS_SET (ch->polyaff, POLY_WWZULO)
&& IS_POLYAFF (ch, POLY_WRAITHFORM))
sprintf (form,
"#nA #gGigantic #0Vi#nsa#0ge #nof #gWere#oWolf #rH#0a#rtr#0e#rd#n");
else if (IS_SET (ch->act, PLR_WOLFMAN)
&& IS_SET (ch->polyaff, POLY_WWZULO))
sprintf (form, "#nA #gGigantic#0 Furry#g Were#oWolf#n");
else if (IS_SET (ch->act, PLR_WOLFMAN)
&& IS_POLYAFF (ch, POLY_WRAITHFORM))
sprintf (form,
"#nA #gHuge #rH#0al#rf#n-#0c#ro#0r#np#0o#nr#0i#ra#0l #0S#gna#0rl#gin#0g #oWerewolf#n");
else if (IS_POLYAFF (ch, POLY_WWZULO)
&& IS_POLYAFF (ch, POLY_WRAITHFORM))
sprintf (form,
"#nA #0Hideous #cTowering #0Vi#nsa#0ge #nof #rH#0a#rtr#0e#rd#n");
else if (IS_SET (ch->act, PLR_WOLFMAN))
sprintf (form, "#nA #gHuge#o Werewolf#n");
else if (IS_POLYAFF (ch, POLY_WRAITHFORM))
sprintf (form,
"#7A #0h#7ar#nr#0o#nw#7in#0g #rh#0al#rf#n-#0c#ro#0r#np#0o#nr#0i#ra#0l #0vi#nsa#0ge #nof #rh#0a#rtr#0e#rd#n");
else if (IS_POLYAFF (ch, POLY_WWZULO))
sprintf (form, "#nA #0Hideous #cTowering #yGiant#n");
else
sprintf (form, "");
break;
case CLASS_GRIMALKIN: //revstarthere
if (IS_POLYAFF (ch, POLY_WRAITHFORM) && IS_POLYAFF (ch, POLY_KAHNFORM))
sprintf (form,
"#nA #yFerocious #rH#0al#rf#n-#0c#ro#0r#np#0o#nr#0i#ra#0l #cWere#0Beast#n");
else if (IS_POLYAFF (ch, POLY_KAHNFORM))
sprintf (form, "#nA #yFerocious #oFurry #cWere#0Tiger#n");
else if (IS_SET (ch->polyaff, POLY_WRAITHFORM))
sprintf (form,
"#7A #0h#7ar#nr#0o#nw#7in#0g #rh#0al#rf#n-#0c#ro#0r#np#0o#nr#0i#ra#0l #0vi#nsa#0ge #nof #rh#0a#rtr#0e#rd#n");
else
sprintf (form, "");
break;
case CLASS_NEWWW:
if (IS_WOLFBIT (ch, WW_BEASTED))
sprintf (form,
"#0A #GF#0i#ner#0c#Ge#0 and #GS#0a#nva#0g#Ge #GLyc#0an#nt#0hr#Gope #GM#0o#nnst#0e#Gr#n");
else
sprintf (form, "");
break;
}
return form;
}
void
do_flags (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char dexp[MSL];
char hexp[MSL];
char ddam[MSL];
char hdam[MSL];
char dqps[MSL];
char hqps[MSL];
char dtra[MSL];
char htra[MSL];
char arma[MSL];
char hell[MSL];
bool hellstorm = FALSE;
if (IS_NPC (ch))
return;
if (IS_SET (mudconfig->world_affects, WORLD_HELLSTORM))
{
hellstorm = TRUE;
}
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLEXP))
sprintf (dexp, "#7ON#y for another#y %s",
get_time (mudconfig->dexptimer, "#y"));
else
sprintf (dexp, "#7OFF#n");
if (IS_SET (mudconfig->world_affects, WORLD_HALFEXP))
sprintf (hexp, "#7ON#y for another#y %s",
get_time (mudconfig->hexptimer, "#y"));
else
sprintf (hexp, "#7OFF#n");
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLECREDITS))
sprintf (dqps, "#7ON#y for another#y %s",
get_time (mudconfig->dcrtimer, "#y"));
else
sprintf (dqps, "#7OFF#n");
if (IS_SET (mudconfig->world_affects, WORLD_HALFCREDITS))
sprintf (hqps, "#7ON#y for another#y %s",
get_time (mudconfig->hcrtimer, "#y"));
else
sprintf (hqps, "#7OFF#n");
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLEDAMCAP))
sprintf (ddam, "#7ON#y for another#y %s",
get_time (mudconfig->ddctimer, "#y"));
else
sprintf (ddam, "#7OFF#n");
if (IS_SET (mudconfig->world_affects, WORLD_HALFDAMCAP))
sprintf (hdam, "#7ON#y for another#y %s",
get_time (mudconfig->hdctimer, "#y"));
else
sprintf (hdam, "#7OFF#n");
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLETRAIN))
sprintf (dtra, "#7ON#y for another#y %s",
get_time (mudconfig->dtrtimer, "#y"));
else
sprintf (dtra, "#7OFF#n");
if (IS_SET (mudconfig->world_affects, WORLD_HALFTRAIN))
sprintf (htra, "#7ON#y for another#y %s",
get_time (mudconfig->htrtimer, "#y"));
else
sprintf (htra, "#7OFF#n");
if (IS_SET (mudconfig->world_affects, WORLD_ARMAGEDDON))
sprintf (arma, " #7ON#n");
else
sprintf (arma, "#7OFF#n");
cban (ch);
cent_to_char ("#RFlags Currently Active.#n\n\r\n\r#n", ch);
sprintf (buf, " #yDouble Experience is Currently: %s#y.#n\n\r", dexp);
send_to_char (buf, ch);
sprintf (buf, " #yDouble Damcap is Currently: %s#y.#n\n\r", ddam);
send_to_char (buf, ch);
sprintf (buf, " #yDouble Credits is Currently: %s#y.#n\n\r", dqps);
send_to_char (buf, ch);
sprintf (buf, " #yDouble Training Speed is Currently: %s#y.#n\n\r", dtra);
send_to_char (buf, ch);
stc ("\n\r\n\r\n\r", ch);
sprintf (buf, " #yHalf Experience is Currently: %s#y.#n\n\r", hexp);
send_to_char (buf, ch);
sprintf (buf, " #yHalf Damcap is Currently: %s#y.#n\n\r", hdam);
send_to_char (buf, ch);
sprintf (buf, " #yHalf Credits is Currently: %s#y.#n\n\r", hqps);
send_to_char (buf, ch);
sprintf (buf, " #yHalf Training Speed is Currently: %s#y.#n\n\r", htra);
send_to_char (buf, ch);
stc ("\n\r\n\r\n\r", ch);
sprintf (buf, " #yArmageddon is Currently: %s#y.#n\n\r", arma);
send_to_char (buf, ch);
if (hellstorm)
{
sprintf (hell, " #yThe Storm of Belial is Raging. #n\n\r",
ch);
send_to_char (hell, ch);
}
stc ("\n\r", ch);
cban (ch);
sprintf (buf,
" #yDouble Exp: #7%5d#y/#720000#y Double Damcap: #7%5d#y/#720000#n\n\r",
mudconfig->dexppayd, mudconfig->ddcpayd);
stc (buf, ch);
sprintf (buf,
" #yDouble Credits: #7%5d#y/#720000#y Double Train: #7%5d#y/#720000#n\n\r",
mudconfig->dcrpayd, mudconfig->dtrpayd);
stc (buf, ch);
stc ("\n\r", ch);
cban (ch);
return;
}
void
do_status (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char arg[MIL];
CHAR_DATA *gch;
bool range = FALSE;
bool bridsafe = FALSE;
if (IS_NPC (ch))
return;
sprintf
(buf,
"\n\r#r[ #yName #r] [#y Generation #r] [ #yStatus #r] [ #yBounty #r] [#y In Range #r] [#y Glory #r]%s#n\n\r",
IS_COR (ch, COR_HYBRID) ? " [#y Protected#r ]" : "");
stc (buf, ch);
for (gch = char_list; gch != NULL; gch = gch->next)
{
if (IS_NPC (gch))
continue;
if (IS_IMMORTAL (gch))
continue;
if (can_see (ch, gch))
{
if (ch->race > 0 && gch->race < 1)
{
range = FALSE;
}
else if ((ch->race - gch->race) <= 10)
{
range = TRUE;
}
else
{
range = FALSE;
}
if (IS_COR (ch, COR_HYBRID) && range)
{
if (!IS_COR (gch, COR_HYBRID) && gch->max_hit < 100000
&& gch->max_move < 100000 && gch->max_mana < 100000)
{
range = FALSE;
}
}
if (!IS_COR (ch, COR_HYBRID) && range)
{
if (IS_COR (gch, COR_HYBRID) && ch->max_hit < 100000
&& ch->max_move < 100000 && ch->max_mana < 100000)
{
range = FALSE;
}
}
if (has_artifact (gch) && can_arti (ch))
range = TRUE;
if (ch == gch)
range = FALSE;
if (IS_COR (ch, COR_HYBRID))
{
if (gch->max_hit < 100000 && gch->max_move < 100000
&& gch->max_mana < 100000)
bridsafe = TRUE;
else
bridsafe = FALSE;
sprintf (buf,
"#r[#7%-12s#r] [#7%11d #r] [#7%8d #r] [#7%8d #r] [ #7%3s #r] [#7 %3d #r] [#7 %3s #r]#n\n\r",
capitalize (gch->name), gch->vampgen, gch->race,
gch->bounty, range ? "Yes" : "No", gch->glory,
bridsafe ? "Yes" : "No");
}
else
{
sprintf (buf,
"#r[#7%-12s#r] [#7%11d #r] [#7%8d #r] [#7%8d #r] [ #7%3s #r] [#7%8d #r] #n\n\r",
capitalize (gch->name), gch->vampgen, gch->race,
gch->bounty, range ? "Yes" : "No", gch->glory);
}
send_to_char (buf, ch);
}
}
return;
}
void
do_creditcheck (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char credit[MIL];
CHAR_DATA *gch;
if (IS_NPC (ch))
return;
send_to_char
("#c[ #yName #c] [ #CCredit #c] [#CCredits Owned#c] [#CCrystal#c/#C Earned#c]#n\n\r",
ch);
for (gch = char_list; gch != NULL; gch = gch->next)
{
if (IS_NPC (gch))
continue;
if (IS_IMMORTAL (gch))
continue;
if (!can_see (ch, gch))
continue;
if (HAS_CREDIT (gch))
{
sprintf (credit, "Has Credit");
}
else if (gch->pcdata->credit_timer > 0)
{
sprintf (credit, "Pending ");
}
else
{
sprintf (credit, "No Credit ");
}
sprintf (buf,
"#c[#7%-12s#c] [#7%s#c] [#7%12d #c] [#7%7d#c/#7%7d#c]#n\n\r",
capitalize (gch->name), credit, gch->pcdata->quest,
gch->pcdata->crystal, gch->pcdata->crysearned);
send_to_char (buf, ch);
}
return;
}
void
do_creditcard (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
char arg2[MIL];
char arg3[MIL];
char arg4[MIL];
char buf[MSL];
char col1[MSL];
char col2[MSL];
CHAR_DATA *victim;
int value;
int waittime = 0;
int cost = 5000000;
argument = one_argument (argument, arg);
argument = one_argument (argument, arg2);
argument = one_argument (argument, arg3);
argument = one_argument (argument, arg4);
if (IS_NPC (ch))
return;
waittime = ch->pcdata->credit_timer;
sprintf (col1,
"#o|#y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #n#o|#n\n\r");
sprintf (col2,
"#y|#o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #n#y|#n\n\r");
if (ch->level < LEVEL_JUDGE)
{
if (!IS_COR (ch, COR_CREDITCARD))
{
if (waittime > 0)
{
sprintf (buf, "You will recieve your credit card in %s.\n\r",
get_time (waittime, ""));
stc (buf, ch);
return;
}
if (arg[0] == '\0')
{
stc
("You dont have a credit card.\n\rTo get one type creditcard apply, it costs 5 million experience to apply for the Creditcard.\n\r",
ch);
return;
}
if (!str_cmp (arg, "apply"))
{
if (ch->exp < cost)
{
sprintf (buf,
"You need %d more experience to qualify for a creditcard.\n\r",
(cost - ch->exp));
stc (buf, ch);
return;
}
ch->exp -= cost;
ch->pcdata->credit_timer = 3600;
sprintf (buf,
"You send off your credit card application.\n\rYou will recieve your credit card as soon as you are approved.\n\r",
ch);
stc (buf, ch);
return;
}
else
{
do_creditcard (ch, "");
return;
}
}
}
if (arg[0] == '\0')
{
if (!IS_COR (ch, COR_COLORCARD))
{
stc
("\n\r#y.#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y.\n\r",
ch);
stc (col1, ch);
stc (col2, ch);
stc
("#o|#y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #n#CBANK#y#i #o#i #n#COF#y#i #o#i #n#CDREAMS#y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #n#o|#n\n\r",
ch);
stc (col2, ch);
stc
("#o|#y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #n#CGOLD#y#i #o#i #n#CCARD#y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #n#o|#n\n\r",
ch);
stc
("#y|#o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i_#y#i_#o#i_#y#i_#o#i_#y#i_#o#i_#y#i_#o#i_#y#i_#o#i #y#i #o#i #y#i #o#i #n#y|#n\n\r",
ch);
stc
("#o|#y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #n #y#i #o#i #y#i #o#i #y#i #n#o|#n\n\r",
ch);
sprintf (buf,
"#y|#o#i #y#i #n#CCREDITS#y#i #o#i #n#CAVAILABLE#o#i #y#i #n#R %8d #o#i #y#i #o#i #y#i #o#i #n#y|#n\n\r",
ch->pcdata->quest);
stc (buf, ch);
stc
("#o|#y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #n#y_#o_#y_#o_#y_#o_#y_#o_#y_#o_#y#i #o#i #y#i #o#i #y#i #n#o|#n\n\r",
ch);
stc
("#y|#o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #y#i #o#i #n#y|\n\r",
ch);
stc (col1, ch);
stc
("#o '#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'#y'#o'\n\r",
ch);
return;
}
else
{
stc ("\n\r", ch);
stc ("._____________________________________.\n\r", ch);
stc ("| |\n\r", ch);
stc ("| |\n\r", ch);
stc
("| #yB#oA#yN#oK#y O#oF#y D#oR#yE#oA#yM#oS#n |\n\r",
ch);
stc ("| |\n\r", ch);
stc
("| #yG#oO#yL#oD#y C#oA#yR#oD#n |\n\r",
ch);
stc ("| .________. |\n\r", ch);
stc ("| | | |\n\r", ch);
sprintf (buf,
"| #yC#oR#yE#oD#yI#oT#yS#o A#yV#oA#yI#oL#yA#oB#yL#oE#n |#R%8d#n| |\n\r",
ch->pcdata->quest);
stc (buf, ch);
stc ("| |________| |\n\r", ch);
stc ("| |\n\r", ch);
stc ("| |\n\r", ch);
stc (" ''''''''''''''''''''''''''''''''''''' \n\r", ch);
return;
}
}
if (!HAS_CREDIT (ch))
SET_BIT (ch->corbits, COR_CREDITCARD);
if (!str_cmp (arg, "transfer"))
{
bool credit = FALSE;
bool crystal = FALSE;
if (arg2[0] == '\0')
{
stc ("Transfer what? Crystals or Credits?\n\r", ch);
return;
}
else if (!str_cmp (arg2, "crystals"))
{
crystal = TRUE;
}
else if (!str_cmp (arg2, "credits"))
{
credit = TRUE;
}
else
{
stc ("Transfer what? Crystals or Credits?\n\r", ch);
return;
}
if (arg3[0] == '\0')
{
stc ("Who do you wish to transfer to?\n\r", ch);
return;
}
if (ch->level >= LEVEL_JUDGE)
{
if ((victim = get_char_world (ch, arg3)) == NULL)
{
stc ("No one with that name on.\n\r", ch);
return;
}
}
else
{
if ((victim = get_char_room (ch, arg3)) == NULL)
{
stc ("No one with that name here.\n\r", ch);
return;
}
}
if (victim == ch)
{
stc ("You can't transfer to your self.\n\r", ch);
return;
}
if (IS_NPC (victim))
{
stc ("Only to players.\n\r", ch);
return;
}
if (!IS_COR (victim, COR_CREDITCARD))
{
stc
("They do not have an account with the Bank of Dreams, hence you cannot transfer anything to them.\n\r",
ch);
return;
}
if (arg4[0] == '\0')
{
stc ("How much do you wish to transfer.\n\r", ch);
return;
}
if (!is_number (arg4))
{
stc ("Heh, make sure its a number.\n\r", ch);
return;
}
value = atoi (arg4);
if (credit)
{
if (value < 1 || value > 20000)
{
stc
("The bank limits transfers to be between 1 and 20000 credits.\n\r",
ch);
return;
}
if (value > ch->pcdata->quest && !IS_JUDGE (ch))
{
sprintf (buf,
"You dont have enough credits to cover that transfer.\n\rYou only have #7%d#n credits left in your account.\n\r",
ch->pcdata->quest);
stc (buf, ch);
return;
}
if ((victim->pcdata->quest + value) > 2100000000)
{
act
("$N has to many credits in $S account to receive your transfer.",
ch, NULL, victim, TO_CHAR);
return;
}
sprintf (buf, "%s to %s of %d credits.", ch->name, victim->name,
value);
credit_string (buf, 0);
sprintf (buf, "%s transfers %d credits to %s.", ch->name, value,
victim->name);
logchan (buf);
ch->pcdata->quest -= value;
if (ch->pcdata->quest < 0)
ch->pcdata->quest = 0;
victim->pcdata->quest += value;
sprintf (buf, "You transfer %d credits to $N's account.", value);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"Your account has just recieved a %d credits transfer from $n.",
value);
act (buf, ch, NULL, victim, TO_VICT);
return;
}
else if (crystal)
{
if (value < 1 || value > 5000)
{
stc
("The bank limits transfers to be between 1 and 5000 crystals.\n\r",
ch);
return;
}
if (value > ch->pcdata->crystal && !IS_JUDGE (ch))
{
sprintf (buf,
"You dont have enough crystals to cover that transfer.\n\rYou only have #7%d#n crystals left.\n\r",
ch->pcdata->crystal);
stc (buf, ch);
return;
}
if ((victim->pcdata->crystal + value) > 2100000000)
{
act
("$N has to many crystals in $S account to receive your transfer.",
ch, NULL, victim, TO_CHAR);
return;
}
sprintf (buf, "%s to %s of %d crystals.", ch->name, victim->name,
value);
credit_string (buf, 0);
sprintf (buf, "%s transfers %d crystals to %s.", ch->name, value,
victim->name);
logchan (buf);
ch->pcdata->crystal -= value;
if (ch->pcdata->crystal < 0)
ch->pcdata->crystal = 0;
victim->pcdata->crystal += value;
sprintf (buf, "You transfer %d crystals to $N.", value);
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf,
"You have just recieved %d crystals transfered from $n.",
value);
act (buf, ch, NULL, victim, TO_VICT);
return;
}
} /*
else if (!str_cmp (arg, "repop"))
{
if (!str_cmp (arg2, "buy"))
{
if (ch->pcdata->quest < 20000)
{
stc ("You Don't have the required credits!\n\r", ch);
return;
}
stc ("Ok, done, this area has now repoped!\n\r", ch);
reset_area (ch->in_room->area);
}
else
{
stc ("Eather buy or use another area!\n\r", ch);
return;
}
} */
else if (!str_cmp (arg, "color"))
{
if (!IS_COR (ch, COR_COLORCARD))
{
SET_BIT (ch->corbits, COR_COLORCARD);
stc ("You switch to the color free credit card.\n\r", ch);
return;
}
else
{
REMOVE_BIT (ch->corbits, COR_COLORCARD);
stc
("You switch back to the #yg#oo#yl#od#n plated credit card.\n\r",
ch);
return;
}
}
else if (!str_cmp (arg, "double"))
{
int dbcost = 20000;
int totalcost = 0;
int amount = 0;
if (arg2[0] == '\0')
{
stc
("#oChose either <#7Exp#o/#7Damcap#o/#7Train#o/#7Credits#o>.#n\n\r",
ch);
stc
("#oSyntax : #7Creditcard Double #o<#7Choice#o> <#7Buy#o/#7Value#o>.\n\r",
ch);
return;
}
else if (!str_cmp (arg2, "exp"))
{
totalcost = (dbcost - mudconfig->dexppayd);
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLEXP))
{
stc ("#oDouble Experience is already active.#n\n\r", ch);
return;
}
if (IS_SET (mudconfig->world_affects, WORLD_HALFEXP))
{
stc ("#oNot while Half Experience is active.#n\n\r", ch);
return;
}
if (arg3[0] == '\0')
{
stc
("#oChose either Buy to pay all thats left of the cost, or pay a certain amount of Credits.\n\r",
ch);
return;
}
else if (!str_cmp (arg3, "buy"))
{
if (ch->pcdata->quest < totalcost)
{
sprintf (buf,
"#oYou need #7%d#o more credits to buy this bonus.#n\n\r",
(totalcost - ch->pcdata->quest));
stc (buf, ch);
return;
}
SET_BIT (mudconfig->world_affects, WORLD_DOUBLEXP);
ch->pcdata->quest -= totalcost;
mudconfig->dexppayd = 0;
mudconfig->dexptimer = 3600;
sprintf (buf,
"#C%s#7 has bought 1 hour of Double Experience.#n",
ch->name);
bonusmes (buf);
save_config ();
return;
}
else if (is_number (arg3))
{
amount = atoi (arg3);
if (amount < 1)
{
stc ("#oHey, you got to at least pay 1 credit.#n\n\r", ch);
return;
}
if (ch->pcdata->quest < amount)
{
stc ("#oYou dont have that many Credits.#n\n\r", ch);
return;
}
if (amount > totalcost)
{
amount = totalcost;
}
mudconfig->dexppayd += amount;
ch->pcdata->quest -= amount;
if (mudconfig->dexppayd >= dbcost)
{
sprintf (buf,
"#C%s#7 has enabled 1 hour of Double Experience.#n",
ch->name);
bonusmes (buf);
SET_BIT (mudconfig->world_affects, WORLD_DOUBLEXP);
mudconfig->dexptimer = 3600;
mudconfig->dexppayd = 0;
}
else
{
sprintf (buf,
"#C%s#7 has added #y%d#7 Credits to the Double Experience pool, need #y%d#7 more.#n",
ch->name, amount, (20000 - mudconfig->dexppayd));
bonusmes (buf);
}
save_config ();
return;
}
else
{
stc
("#oChose either Buy to pay all thats left of the cost, or pay a certain amount of Credits.\n\r",
ch);
return;
}
return;
}
else if (!str_cmp (arg2, "damcap"))
{
totalcost = (dbcost - mudconfig->ddcpayd);
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLEDAMCAP))
{
stc ("#oDouble Damcap is already active.#n\n\r", ch);
return;
}
if (IS_SET (mudconfig->world_affects, WORLD_HALFDAMCAP))
{
stc ("#oNot while Half Damcap is active.#n\n\r", ch);
return;
}
if (arg3[0] == '\0')
{
stc
("#oChose either Buy to pay all thats left of the cost, or pay a certain amount of Credits.\n\r",
ch);
return;
}
else if (!str_cmp (arg3, "buy"))
{
if (ch->pcdata->quest < totalcost)
{
sprintf (buf,
"#oYou need #7%d#o more credits to buy this bonus.#n\n\r",
(totalcost - ch->pcdata->quest));
stc (buf, ch);
return;
}
SET_BIT (mudconfig->world_affects, WORLD_DOUBLEDAMCAP);
ch->pcdata->quest -= totalcost;
mudconfig->ddcpayd = 0;
mudconfig->ddctimer = 3600;
sprintf (buf, "#C%s#7 has bought 1 hour of Double Damcap.#n",
ch->name);
bonusmes (buf);
save_config ();
return;
}
else if (is_number (arg3))
{
amount = atoi (arg3);
if (amount < 1)
{
stc ("#oHey, you got to at least pay 1 credit.#n\n\r", ch);
return;
}
if (ch->pcdata->quest < amount)
{
stc ("#oYou dont have that many Credits.#n\n\r", ch);
return;
}
if (amount > totalcost)
{
amount = totalcost;
}
mudconfig->ddcpayd += amount;
ch->pcdata->quest -= amount;
if (mudconfig->ddcpayd >= dbcost)
{
sprintf (buf,
"#C%s#7 has enabled 1 hour of Double Damcap.#n",
ch->name);
bonusmes (buf);
SET_BIT (mudconfig->world_affects, WORLD_DOUBLEDAMCAP);
mudconfig->ddctimer = 3600;
mudconfig->ddcpayd = 0;
}
else
{
sprintf (buf,
"#C%s#7 has added #y%d#7 Credits to the Double Damcap pool, need #y%d#7 more.#n",
ch->name, amount, (20000 - mudconfig->ddcpayd));
bonusmes (buf);
}
save_config ();
return;
}
else
{
stc
("#oChose either Buy to pay all thats left of the cost, or pay a certain amount of Credits.\n\r",
ch);
return;
}
return;
}
else if (!str_cmp (arg2, "train"))
{
totalcost = (dbcost - mudconfig->dtrpayd);
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLETRAIN))
{
stc ("#oDouble Train is already active.#n\n\r", ch);
return;
}
if (IS_SET (mudconfig->world_affects, WORLD_HALFTRAIN))
{
stc ("#oNot while Half Train is active.#n\n\r", ch);
return;
}
if (arg3[0] == '\0')
{
stc
("#oChose either Buy to pay all thats left of the cost, or pay a certain amount of Credits.#n\n\r",
ch);
return;
}
else if (!str_cmp (arg3, "buy"))
{
if (ch->pcdata->quest < totalcost)
{
sprintf (buf,
"#oYou need #7%d#o more credits to buy this bonus.#n\n\r",
(totalcost - ch->pcdata->quest));
stc (buf, ch);
return;
}
SET_BIT (mudconfig->world_affects, WORLD_DOUBLETRAIN);
ch->pcdata->quest -= totalcost;
mudconfig->dtrpayd = 0;
mudconfig->dtrtimer = 3600;
sprintf (buf,
"#C%s#7 has bought 1 hour of Double Train Speed.#n",
ch->name);
bonusmes (buf);
save_config ();
return;
}
else if (is_number (arg3))
{
amount = atoi (arg3);
if (amount < 1)
{
stc ("#oHey, you got to at least pay 1 credit.#n\n\r", ch);
return;
}
if (ch->pcdata->quest < amount)
{
stc ("#oYou dont have that many Credits.#n\n\r", ch);
return;
}
if (amount > totalcost)
{
amount = totalcost;
}
mudconfig->dtrpayd += amount;
ch->pcdata->quest -= amount;
if (mudconfig->dtrpayd >= dbcost)
{
sprintf (buf,
"#C%s#7 has enabled 1 hour of Double Train Speed.#n",
ch->name);
bonusmes (buf);
SET_BIT (mudconfig->world_affects, WORLD_DOUBLETRAIN);
mudconfig->dtrtimer = 3600;
mudconfig->dtrpayd = 0;
}
else
{
sprintf (buf,
"#C%s#7 has added #y%d#7 Credits to the Double Train pool, need #y%d#7 more.#n",
ch->name, amount, (20000 - mudconfig->dtrpayd));
bonusmes (buf);
}
save_config ();
return;
}
else
{
stc
("#oChose either Buy to pay all thats left of the cost, or pay a certain amount of Credits.#n\n\r",
ch);
return;
}
return;
}
else if (!str_cmp (arg2, "credits"))
{
totalcost = (dbcost - mudconfig->dcrpayd);
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLECREDITS))
{
stc ("#oDouble Credits is already active.#n\n\r", ch);
return;
}
if (IS_SET (mudconfig->world_affects, WORLD_HALFCREDITS))
{
stc ("#oNot while Half Credits is active.#n\n\r", ch);
return;
}
if (arg3[0] == '\0')
{
stc
("#oChose either Buy to pay all thats left of the cost, or pay a certain amount of Credits.#n\n\r",
ch);
return;
}
else if (!str_cmp (arg3, "buy"))
{
if (ch->pcdata->quest < totalcost)
{
sprintf (buf,
"#oYou need #7%d#o more credits to buy this bonus.#n\n\r",
(totalcost - ch->pcdata->quest));
stc (buf, ch);
return;
}
SET_BIT (mudconfig->world_affects, WORLD_DOUBLECREDITS);
ch->pcdata->quest -= totalcost;
mudconfig->dcrpayd = 0;
mudconfig->dcrtimer = 3600;
sprintf (buf, "#C%s#7 has bought 1 hour of Double Credits.#n",
ch->name);
bonusmes (buf);
save_config ();
return;
}
else if (is_number (arg3))
{
amount = atoi (arg3);
if (amount < 1)
{
stc ("#oHey, you got to at least pay 1 credit.#n\n\r", ch);
return;
}
if (ch->pcdata->quest < amount)
{
stc ("#oYou dont have that many Credits.#n\n\r", ch);
return;
}
if (amount > totalcost)
{
amount = totalcost;
}
mudconfig->dcrpayd += amount;
ch->pcdata->quest -= amount;
if (mudconfig->dcrpayd >= dbcost)
{
sprintf (buf,
"#C%s#7 has enabled 1 hour of Double Credits.#n",
ch->name);
bonusmes (buf);
SET_BIT (mudconfig->world_affects, WORLD_DOUBLECREDITS);
mudconfig->dcrtimer = 3600;
mudconfig->dcrpayd = 0;
}
else
{
sprintf (buf,
"#C%s#7 has added #y%d#7 Credits to the Double Credits pool, need #y%d#7 more.#n",
ch->name, amount, (20000 - mudconfig->dcrpayd));
bonusmes (buf);
}
save_config ();
return;
}
else
{
stc
("#oChose either Buy to pay all thats left of the cost, or pay a certain amount of Credits.#n\n\r",
ch);
return;
}
return;
}
else
{
stc
("#oChose either <#7Exp#o/#7Damcap#o/#7Train#o/#Showing the first 100 KB of 250.2 KB. Download the archive for the full file.