Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

act_wiz.c File Reference

#include <sys/types.h>
#include <sys/time.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include "merc.h"
#include "interp.h"
#include "recycle.h"
#include "tables.h"
#include "lookup.h"

Include dependency graph for act_wiz.c:

Go to the source code of this file.

Defines

#define COPYOVER_FILE   "copyover.data"
#define EXE_FILE   "../src/rom"
#define KEY(literal, field, value)

Functions

ROOM_INDEX_DATA *find_location args ((CHAR_DATA *ch, char *arg))
void do_advance (CHAR_DATA *ch, char *argument)
void do_asleep (CHAR_DATA *ch, char *argument)
void do_at (CHAR_DATA *ch, char *argument)
void do_bamfin (CHAR_DATA *ch, char *argument)
void do_bamfout (CHAR_DATA *ch, char *argument)
void do_building (CHAR_DATA *ch, char *argument)
void do_clone (CHAR_DATA *ch, char *argument)
void do_crash (CHAR_DATA *ch, char *argument)
void do_cset (CHAR_DATA *ch, char *argument)
void do_cshow (CHAR_DATA *ch, char *argument)
void do_deny (CHAR_DATA *ch, char *argument)
void do_disconnect (CHAR_DATA *ch, char *argument)
void do_echo (CHAR_DATA *ch, char *argument)
void do_force (CHAR_DATA *ch, char *argument)
void do_freeze (CHAR_DATA *ch, char *argument)
void do_globalpeace (CHAR_DATA *ch, char *argument)
void do_goto (CHAR_DATA *ch, char *argument)
void do_gstat (CHAR_DATA *ch, char *argument)
void do_guild (CHAR_DATA *ch, char *argument)
void do_holylight (CHAR_DATA *ch, char *argument)
void do_immtitle (CHAR_DATA *ch, char *argument)
void do_incognito (CHAR_DATA *ch, char *argument)
void do_invis (CHAR_DATA *ch, char *argument)
void do_kcshow (CHAR_DATA *ch, char *argument)
void do_lag (CHAR_DATA *ch, char *argument)
void do_load (CHAR_DATA *ch, char *argument)
void do_log (CHAR_DATA *ch, char *argument)
void do_mfind (CHAR_DATA *ch, char *argument)
void do_mload (CHAR_DATA *ch, char *argument)
void do_mset (CHAR_DATA *ch, char *argument)
void do_mstat (CHAR_DATA *ch, char *argument)
void do_mwhere (CHAR_DATA *ch, char *argument)
void do_newlock (CHAR_DATA *ch, char *argument)
void do_nochannels (CHAR_DATA *ch, char *argument)
void do_noemote (CHAR_DATA *ch, char *argument)
void do_noshout (CHAR_DATA *ch, char *argument)
void do_notell (CHAR_DATA *ch, char *argument)
void do_notrans (CHAR_DATA *ch, char *argument)
void do_ofind (CHAR_DATA *ch, char *argument)
void do_oload (CHAR_DATA *ch, char *argument)
void do_oset (CHAR_DATA *ch, char *argument)
void do_ostat (CHAR_DATA *ch, char *argument)
void do_outfit (CHAR_DATA *ch, char *argument)
void do_owhere (CHAR_DATA *ch, char *argument)
void do_pardon (CHAR_DATA *ch, char *argument)
void do_peace (CHAR_DATA *ch, char *argument)
void do_pecho (CHAR_DATA *ch, char *argument)
void do_pload (CHAR_DATA *ch, char *argument)
void do_port (CHAR_DATA *ch, char *argument)
void do_prefi (CHAR_DATA *ch, char *argument)
void do_prefix (CHAR_DATA *ch, char *argument)
void do_protect (CHAR_DATA *ch, char *argument)
void do_punload (CHAR_DATA *ch, char *argument)
void do_purge (CHAR_DATA *ch, char *argument)
void do_reboo (CHAR_DATA *ch, char *argument)
void do_reboot (CHAR_DATA *ch, char *argument)
void do_recho (CHAR_DATA *ch, char *argument)
void do_restore (CHAR_DATA *ch, char *argument)
void do_return (CHAR_DATA *ch, char *argument)
void do_rset (CHAR_DATA *ch, char *argument)
void do_rstat (CHAR_DATA *ch, char *argument)
void do_set (CHAR_DATA *ch, char *argument)
void do_show_skill (CHAR_DATA *ch, char *argument)
void do_shutdow (CHAR_DATA *ch, char *argument)
void do_shutdown (CHAR_DATA *ch, char *argument)
void do_slookup (CHAR_DATA *ch, char *argument)
void do_smote (CHAR_DATA *ch, char *argument)
void do_snoop (CHAR_DATA *ch, char *argument)
void do_sockets (CHAR_DATA *ch, char *argument)
void do_sset (CHAR_DATA *ch, char *argument)
void do_stat (CHAR_DATA *ch, char *argument)
void do_string (CHAR_DATA *ch, char *argument)
void do_switch (CHAR_DATA *ch, char *argument)
void do_transfer (CHAR_DATA *ch, char *argument)
void do_trust (CHAR_DATA *ch, char *argument)
void do_violate (CHAR_DATA *ch, char *argument)
void do_vnum (CHAR_DATA *ch, char *argument)
void do_wizlock (CHAR_DATA *ch, char *argument)
void do_wiznet (CHAR_DATA *ch, char *argument)
void do_zecho (CHAR_DATA *ch, char *argument)
ROOM_INDEX_DATAfind_location (CHAR_DATA *ch, char *arg)
void null_class (CHAR_DATA *ch, char *argument)
bool obj_check (CHAR_DATA *ch, OBJ_DATA *obj)
void recursive_clone (CHAR_DATA *ch, OBJ_DATA *obj, OBJ_DATA *clone)
void show_classes (CHAR_DATA *ch, char *argument)
void wiznet (char *string, CHAR_DATA *ch, OBJ_DATA *obj, long flag, long flag_skip, int min_level)

Variables

descriptor original


Define Documentation

#define COPYOVER_FILE   "copyover.data"
 

Referenced by send_to_all_copyover().

#define EXE_FILE   "../src/rom"
 

#define KEY literal,
field,
value   ) 
 

Value:

if ( !str_cmp( word, literal ) )    \
        {                   \
            field  = value;         \
            fMatch = TRUE;          \
            break;              \
        }

Definition at line 54 of file act_wiz.c.

Referenced by fread_char(), fread_obj(), fread_pet(), and new_load_area().


Function Documentation

ROOM_INDEX_DATA* find_location args (CHAR_DATA *ch, char *arg)   ) 
 

void do_advance CHAR_DATA ch,
char *  argument
 

Definition at line 3427 of file act_wiz.c.

References advance_level(), exp_per_level(), get_char_world(), get_trust(), IS_NPC, is_number(), MAX_INPUT_LENGTH, MAX_LEVEL, MAX_STRING_LENGTH, one_argument(), save_char_obj(), send_to_char(), TRUE, and UMAX.

03428 {
03429     char buf[MAX_STRING_LENGTH];
03430     char arg1[MAX_INPUT_LENGTH];
03431     char arg2[MAX_INPUT_LENGTH];
03432     CHAR_DATA *victim;
03433     int level;
03434     int iLevel;
03435 //if (ch->level < 55)
03436 //{
03437 //send_to_char("I'm sorry, you can't preform this function yet.",ch);
03438 //return;
03439 //}
03440 
03441     argument = one_argument (argument, arg1);
03442     argument = one_argument (argument, arg2);
03443 
03444     if (arg1[0] == '\0' || arg2[0] == '\0' || !is_number (arg2))
03445     {
03446         send_to_char ("Syntax: advance <char> <level>.\n\r", ch);
03447         return;
03448     }
03449 
03450     if ((victim = get_char_world (ch, arg1)) == NULL)
03451     {
03452         send_to_char ("That player is not here.\n\r", ch);
03453         return;
03454     }
03455 
03456     if (IS_NPC (victim))
03457     {
03458         send_to_char ("Not on NPC's.\n\r", ch);
03459         return;
03460     }
03461 
03462     if ((level = atoi (arg2)) < 1 || level > MAX_LEVEL)
03463     {
03464         sprintf (buf, "Level must be 1 to %d.\n\r", MAX_LEVEL);
03465         send_to_char (buf, ch);
03466         return;
03467     }
03468    /*if (ch->level < 60 && level > 51)
03469     {
03470         send_to_char("Sorry, only implimenters can create new immortals.\n\r",ch);
03471         return;
03472     }*/
03473 
03474 
03475     if (level > get_trust (ch))
03476     {
03477         send_to_char ("Limited to your trust level.\n\r", ch);
03478         return;
03479     }
03480 
03481     /*
03482      * Lower level:
03483      *   Reset to level 1.
03484      *   Then raise again.
03485      *   Currently, an imp can lower another imp.
03486      *   -- Swiftest
03487      */
03488     if (level <= victim->level)
03489     {
03490         int temp_prac;
03491 
03492        send_to_char ("Lowering a player's level!\n\r", ch);
03493        // send_to_char ("**** OOOOHHHHHHHHHH  NNNNOOOO ****\n\r", victim);
03494         temp_prac = victim->practice;
03495         victim->level = 1;
03496         victim->exp = exp_per_level (victim, victim->pcdata->points);
03497         victim->max_hit = 10;
03498         victim->max_mana = 100;
03499         victim->max_move = 100;
03500         victim->practice = 0;
03501         victim->hit = victim->max_hit;
03502         victim->mana = victim->max_mana;
03503         victim->move = victim->max_move;
03504         advance_level (victim, TRUE);
03505         victim->practice = temp_prac;
03506     }
03507     else
03508     {
03509         send_to_char ("Raising a player's level!\n\r", ch);
03510        // send_to_char ("**** OOOOHHHHHHHHHH  YYYYEEEESSS ****\n\r", victim);
03511     }
03512 
03513     for (iLevel = victim->level; iLevel < level; iLevel++)
03514     {
03515         victim->level += 1;
03516         advance_level (victim, TRUE);
03517     }
03518   //  sprintf (buf, "You are now level %d.\n\r", victim->level);
03519   //  send_to_char (buf, victim);
03520     victim->exp = exp_per_level (victim, victim->pcdata->points)
03521         * UMAX (1, victim->level);
03522     victim->trust = 0;
03523     save_char_obj (victim);
03524     return;
03525 }

Here is the call graph for this function:

void do_asleep CHAR_DATA ch,
char *  argument
 

Definition at line 1269 of file act_wiz.c.

References BTS_SLEEP, IS_SET, REMOVE_BIT, send_to_char(), and SET_BIT.

01270 {
01271     if (IS_SET(ch->sleep, BTS_SLEEP))
01272     {
01273         send_to_char ("Sleep status removed.\n\r",ch);
01274         REMOVE_BIT (ch->sleep, BTS_SLEEP);
01275         return;
01276     }
01277     if (!IS_SET(ch->sleep, BTS_SLEEP))
01278     {
01279         send_to_char("Sweet dreams...\n\r",ch);
01280         SET_BIT(ch->sleep, BTS_SLEEP);
01281         return;
01282     }
01283 }

Here is the call graph for this function:

void do_at CHAR_DATA ch,
char *  argument
 

Definition at line 1584 of file act_wiz.c.

References char_from_room(), char_list, char_to_room(), find_location(), get_trust(), interpret(), is_room_owner(), MAX_INPUT_LENGTH, MAX_LEVEL, char_data::next, obj_data::on, one_argument(), original, room_is_private(), and send_to_char().

01585 {
01586     char arg[MAX_INPUT_LENGTH];
01587     ROOM_INDEX_DATA *location;
01588     ROOM_INDEX_DATA *original;
01589     OBJ_DATA *on;
01590     CHAR_DATA *wch;
01591 
01592     argument = one_argument (argument, arg);
01593 
01594  //  if (ch->level < 60)
01595    // {
01596 //      send_to_char("You are not high enough level to do this.\n\r",ch);
01597 //      return;
01598   //  }
01599 
01600     if (arg[0] == '\0' || argument[0] == '\0')
01601     {
01602         send_to_char ("At where what?\n\r", ch);
01603         return;
01604     }
01605 
01606     if ((location = find_location (ch, arg)) == NULL)
01607     {
01608         send_to_char ("No such location.\n\r", ch);
01609         return;
01610     }
01611 
01612     if (!is_room_owner (ch, location) && room_is_private (location)
01613         && get_trust (ch) < MAX_LEVEL)
01614     {
01615         send_to_char ("That room is private right now.\n\r", ch);
01616         return;
01617     }
01618 
01619     original = ch->in_room;
01620     on = ch->on;
01621     char_from_room (ch);
01622     char_to_room (ch, location);
01623     interpret (ch, argument);
01624 
01625     /*
01626      * See if 'ch' still exists before continuing!
01627      * Handles 'at XXXX quit' case.
01628      */
01629     for (wch = char_list; wch != NULL; wch = wch->next)
01630     {
01631         if (wch == ch)
01632         {
01633             char_from_room (ch);
01634             char_to_room (ch, original);
01635             ch->on = on;
01636             break;
01637         }
01638     }
01639 
01640     return;
01641 }

Here is the call graph for this function:

void do_bamfin CHAR_DATA ch,
char *  argument
 

Definition at line 1096 of file act_wiz.c.

References pc_data::bamfin, free_string(), IS_NPC, MAX_STRING_LENGTH, char_data::pcdata, send_to_char(), smash_tilde(), and str_dup().

01097 {
01098     char buf[MAX_STRING_LENGTH];
01099 
01100     if (!IS_NPC (ch))
01101     {
01102         smash_tilde (argument);
01103 
01104         if (argument[0] == '\0')
01105         {
01106             sprintf (buf, "Your poofin is %s\n\r", ch->pcdata->bamfin);
01107             send_to_char (buf, ch);
01108             return;
01109         }
01110 
01111         if (strstr (argument, ch->name) == NULL)
01112         {
01113             send_to_char ("You must include your name.\n\r", ch);
01114             return;
01115         }
01116 
01117         free_string (ch->pcdata->bamfin);
01118         ch->pcdata->bamfin = str_dup (argument);
01119 
01120         sprintf (buf, "Your poofin is now %s\n\r", ch->pcdata->bamfin);
01121         send_to_char (buf, ch);
01122     }
01123     return;
01124 }

Here is the call graph for this function:

void do_bamfout CHAR_DATA ch,
char *  argument
 

Definition at line 1126 of file act_wiz.c.

References pc_data::bamfout, free_string(), IS_NPC, MAX_STRING_LENGTH, send_to_char(), smash_tilde(), and str_dup().

01127 {
01128     char buf[MAX_STRING_LENGTH];
01129 
01130     if (!IS_NPC (ch))
01131     {
01132         smash_tilde (argument);
01133 
01134         if (argument[0] == '\0')
01135         {
01136             sprintf (buf, "Your poofout is %s\n\r", ch->pcdata->bamfout);
01137             send_to_char (buf, ch);
01138             return;
01139         }
01140 
01141         if (strstr (argument, ch->name) == NULL)
01142         {
01143             send_to_char ("You must include your name.\n\r", ch);
01144             return;
01145         }
01146 
01147         free_string (ch->pcdata->bamfout);
01148         ch->pcdata->bamfout = str_dup (argument);
01149 
01150         sprintf (buf, "Your poofout is now %s\n\r", ch->pcdata->bamfout);
01151         send_to_char (buf, ch);
01152     }
01153     return;
01154 }

Here is the call graph for this function:

void do_building CHAR_DATA ch,
char *  argument
 

Definition at line 3958 of file act_wiz.c.

References is_building_area, send_to_char(), and wiznet().

03959 {
03960     extern bool is_building_area;
03961     is_building_area = !is_building_area;
03962 
03963     if (is_building_area)
03964     {
03965         wiznet("$N is building an area. Copyovers will now use ticks.", ch, NULL, 0, 0, 0);
03966         send_to_char("Building set. Remember to remove it when you're done.\n\r",ch);
03967     }
03968     else
03969     {
03970         wiznet("$N is no longer building an area. Copyovers may now use 'now'", ch, NULL, 0, 0, 0);
03971         send_to_char("Building removed.\n\r",ch);
03972     }
03973     return;
03974 }

Here is the call graph for this function:

void do_clone CHAR_DATA ch,
char *  argument
 

Definition at line 3111 of file act_wiz.c.

References act, ANGEL, AVATAR, obj_data::carried_by, char_to_room(), clone_mobile(), clone_object(), create_mobile(), create_object(), DEMI, get_char_room(), get_obj_here(), get_trust(), GOD, IMMORTAL, char_data::in_room, obj_data::in_room, IS_NPC, IS_TRUSTED, MAX_INPUT_LENGTH, MAX_STRING_LENGTH, new_obj(), obj_data::next_content, obj_check(), obj_to_char(), obj_to_room(), one_argument(), obj_data::pIndexData, recursive_clone(), send_to_char(), char_data::short_descr, str_prefix(), TO_CHAR, TO_ROOM, obj_data::wear_loc, WIZ_LOAD, WIZ_SECURE, and wiznet().

03112 {
03113     char arg[MAX_INPUT_LENGTH];
03114     char *rest;
03115     CHAR_DATA *mob;
03116     OBJ_DATA *obj;
03117 
03118     rest = one_argument (argument, arg);
03119 
03120     if (arg[0] == '\0')
03121     {
03122         send_to_char ("Clone what?\n\r", ch);
03123         return;
03124     }
03125 
03126     if (!str_prefix (arg, "object"))
03127     {
03128         mob = NULL;
03129         obj = get_obj_here (ch, rest);
03130         if (obj == NULL)
03131         {
03132             send_to_char ("You don't see that here.\n\r", ch);
03133             return;
03134         }
03135     }
03136     else if (!str_prefix (arg, "mobile") || !str_prefix (arg, "character"))
03137     {
03138         obj = NULL;
03139         mob = get_char_room (ch, rest);
03140         if (mob == NULL)
03141         {
03142             send_to_char ("You don't see that here.\n\r", ch);
03143             return;
03144         }
03145     }
03146     else
03147     {                            /* find both */
03148 
03149         mob = get_char_room (ch, argument);
03150         obj = get_obj_here (ch, argument);
03151         if (mob == NULL && obj == NULL)
03152         {
03153             send_to_char ("You don't see that here.\n\r", ch);
03154             return;
03155         }
03156     }
03157 
03158     /* clone an object */
03159     if (obj != NULL)
03160     {
03161         OBJ_DATA *clone;
03162 
03163         if (!obj_check (ch, obj))
03164         {
03165             send_to_char
03166                 ("Your powers are not great enough for such a task.\n\r", ch);
03167             return;
03168         }
03169 
03170         clone = create_object (obj->pIndexData, 0);
03171         clone_object (obj, clone);
03172         if (obj->carried_by != NULL)
03173             obj_to_char (clone, ch);
03174         else
03175             obj_to_room (clone, ch->in_room);
03176         recursive_clone (ch, obj, clone);
03177 
03178         act ("$n has created $p.", ch, clone, NULL, TO_ROOM);
03179         act ("You clone $p.", ch, clone, NULL, TO_CHAR);
03180         wiznet ("$N clones $p.", ch, clone, WIZ_LOAD, WIZ_SECURE,
03181                 get_trust (ch));
03182         return;
03183     }
03184     else if (mob != NULL)
03185     {
03186         CHAR_DATA *clone;
03187         OBJ_DATA *new_obj;
03188         char buf[MAX_STRING_LENGTH];
03189 
03190         if (!IS_NPC (mob))
03191         {
03192             send_to_char ("You can only clone mobiles.\n\r", ch);
03193             return;
03194         }
03195 
03196         if ((mob->level > 20 && !IS_TRUSTED (ch, GOD))
03197             || (mob->level > 10 && !IS_TRUSTED (ch, IMMORTAL))
03198             || (mob->level > 5 && !IS_TRUSTED (ch, DEMI))
03199             || (mob->level > 0 && !IS_TRUSTED (ch, ANGEL))
03200             || !IS_TRUSTED (ch, AVATAR))
03201         {
03202             send_to_char
03203                 ("Your powers are not great enough for such a task.\n\r", ch);
03204             return;
03205         }
03206 
03207         clone = create_mobile (mob->pIndexData);
03208         clone_mobile (mob, clone);
03209 
03210         for (obj = mob->carrying; obj != NULL; obj = obj->next_content)
03211         {
03212             if (obj_check (ch, obj))
03213             {
03214                 new_obj = create_object (obj->pIndexData, 0);
03215                 clone_object (obj, new_obj);
03216                 recursive_clone (ch, obj, new_obj);
03217                 obj_to_char (new_obj, clone);
03218                 new_obj->wear_loc = obj->wear_loc;
03219             }
03220         }
03221         char_to_room (clone, ch->in_room);
03222         act ("$n has created $N.", ch, NULL, clone, TO_ROOM);
03223         act ("You clone $N.", ch, NULL, clone, TO_CHAR);
03224         sprintf (buf, "$N clones %s.", clone->short_descr);
03225         wiznet (buf, ch, NULL, WIZ_LOAD, WIZ_SECURE, get_trust (ch));
03226         return;
03227     }
03228 }

Here is the call graph for this function:

void do_crash CHAR_DATA ch,
char *  argument
 

Definition at line 5022 of file act_wiz.c.

References char_to_room().

05023 {
05024 
05025     char_to_room(ch, (ROOM_INDEX_DATA*)-1);
05026     return;
05027 }

Here is the call graph for this function:

void do_cset CHAR_DATA ch,
char *  argument
 

Definition at line 332 of file act_wiz.c.

References pc_data::bodytype, pc_data::eyecolor, pc_data::facialhair, FALSE, free_string(), get_char_world(), pc_data::haircolor, pc_data::hairlength, pc_data::hairtype, IS_NPC, MAX_STRING_LENGTH, char_data::name, one_argument(), char_data::pcdata, send_to_char(), str_dup(), str_prefix(), and TRUE.

00333 {
00334     CHAR_DATA *victim;
00335     char arg[MAX_STRING_LENGTH];
00336     char arg2[MAX_STRING_LENGTH];
00337     char buf[MAX_STRING_LENGTH];
00338     bool same;
00339     same = FALSE;  /* to shut the compiler the hell up! */
00340     
00341     argument = one_argument(argument, arg);
00342     argument = one_argument(argument, arg2);
00343 
00344     if (arg[0] == '\0' || arg2[0] == '\0' || argument[0] == '\0')
00345     {
00346         send_to_char("Syntax - cset <person> <field> <info>\n\r"
00347                 "Field - eyes, hairlength, hairtype, haircolor, bodytype, facialhair\n\r",ch);
00348         return;
00349     }
00350     if ((victim = get_char_world(ch, arg)) == NULL)
00351     {
00352         send_to_char("They are currently not playing.\n\r",ch);
00353         return;
00354     }
00355     if (IS_NPC(victim))
00356     {
00357         send_to_char("Not on NPCs!\n\r",ch);
00358         return;
00359     }
00360     if (victim == ch)
00361         same = TRUE;
00362     
00363     /*if (str_prefix(arg2, "eyes") || str_prefix(arg2, "hairlength") 
00364             || str_prefix(arg2, "hairtype") || str_prefix(arg2, "haircolor")
00365             || str_prefix(arg2, "bodytype") || str_prefix(arg2, "facialhair"))
00366     {
00367         send_to_char("Invalid field. Valid fields:\n\r"
00368                 "eyes, hairlength, hairtype, haircolor, bodytype, facialhair\n\r",ch);
00369         return;
00370     }
00371     */
00372     if (!str_prefix(arg2, "eyes"))
00373     {
00374         free_string(victim->pcdata->eyecolor);
00375         victim->pcdata->eyecolor = str_dup(argument);
00376         if (!same)
00377         {
00378             sprintf(buf, "%s's eye color set to %s\n\r", victim->name, argument);
00379             send_to_char(buf,ch);
00380         }
00381         sprintf(buf, "Your eye color has been set to %s\n\r", argument);
00382         send_to_char(buf,victim);
00383         return;
00384     
00385     }
00386     if (!str_prefix(arg2, "hairlength"))
00387     {
00388         free_string(victim->pcdata->hairlength);
00389         victim->pcdata->hairlength = str_dup(argument);
00390         if (!same)
00391         {
00392             sprintf(buf, "%s's hairlength has been set to %s\n\r", victim->name, argument);
00393             send_to_char(buf,ch);
00394         }
00395         sprintf(buf, "Your hair length has been set to %s\n\r",argument);
00396         send_to_char(buf,victim);
00397         return;
00398     }
00399     if (!str_prefix(arg2, "hairtype"))
00400     {
00401         free_string(victim->pcdata->hairtype);
00402         victim->pcdata->hairtype = str_dup(argument);
00403         if (!same)
00404         {
00405             sprintf(buf, "%s's hair type set to %s\n\r", victim->name, argument);
00406             send_to_char(buf,ch);
00407         }
00408         sprintf(buf, "Your hair type has been set to %s\n\r",argument);
00409         send_to_char(buf,victim);
00410         return;
00411     }
00412     if (!str_prefix(arg2, "haircolor"))
00413     {
00414         free_string(victim->pcdata->haircolor);
00415         victim->pcdata->haircolor = str_dup(argument);
00416         if (!same)
00417         {
00418             sprintf(buf, "%s's hair color set to %s\n\r", victim->name, argument);
00419             send_to_char(buf,ch);
00420         }
00421         
00422         sprintf(buf, "Your hair color has been set to %s\n\r", argument);
00423         send_to_char(buf, victim);
00424         return;
00425     }
00426     if (!str_prefix(arg2, "bodytype"))
00427     {
00428         free_string(victim->pcdata->bodytype);
00429         victim->pcdata->bodytype = str_dup(argument);
00430         if (!same)
00431         {
00432             sprintf(buf, "%s's body type set to %s\n\r", victim->name, argument);
00433             send_to_char(buf,ch);
00434         }
00435         
00436         sprintf(buf, "Your boy type set to %s\n\r", argument);
00437         send_to_char(buf, victim);
00438         return;
00439     }
00440     if (!str_prefix(arg2, "facialhair"))
00441     {
00442         free_string(victim->pcdata->facialhair);
00443         victim->pcdata->facialhair = str_dup(argument);
00444         if (!same)
00445         {
00446             sprintf(buf, "%s's facial hair set to %s\n\r", victim->name, argument);
00447             send_to_char(buf,ch);
00448         }
00449         sprintf(buf, "Your facial hair set to %s\n\r", argument);
00450         send_to_char(buf, victim);
00451         return;
00452     }
00453     send_to_char("Invalid Field.\n\r",ch);
00454     return;
00455 }

Here is the call graph for this function:

void do_cshow CHAR_DATA ch,
char *  argument
 

Definition at line 619 of file act_wiz.c.

References add_buf(), buf_string(), conts_table, free_buf(), MAX_CONT, MAX_STRING_LENGTH, new_buf(), and page_to_char().

00620 {
00621     BUFFER *buffer;
00622     char buf[MAX_STRING_LENGTH];
00623     int runner,col=0;
00624     buffer = new_buf();
00625     add_buf(buffer, "\n\r{xContinents:{x\n\r");
00626 
00627     for (runner =1;runner < MAX_CONT; runner++)
00628     {
00629         sprintf(buf, "{c%-2d{x) {W%-15.15s{x", runner, conts_table[runner].name);
00630         add_buf(buffer,buf);
00631         if (++col % 2 == 0)
00632             add_buf(buffer, "\n\r");
00633     }
00634     add_buf(buffer, "\n\r");
00635     page_to_char(buf_string(buffer),ch);
00636     free_buf(buffer);
00637     return;
00638 }

Here is the call graph for this function:

void do_deny CHAR_DATA ch,
char *  argument
 

Definition at line 1158 of file act_wiz.c.

References do_function(), do_quit(), get_char_world(), get_trust(), IS_NPC, MAX_INPUT_LENGTH, MAX_STRING_LENGTH, one_argument(), PLR_DENY, save_char_obj(), send_to_char(), SET_BIT, stop_fighting(), TRUE, WIZ_PENALTIES, WIZ_SECURE, and wiznet().

01159 {
01160     char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH];
01161     CHAR_DATA *victim;
01162 if (ch->level < 59)
01163 {
01164 send_to_char("Only imps can perform this function.\n\r",ch);
01165 return;
01166 }
01167 
01168     one_argument (argument, arg);
01169     if (arg[0] == '\0')
01170     {
01171         send_to_char ("Deny whom?\n\r", ch);
01172         return;
01173     }
01174 
01175     if ((victim = get_char_world (ch, arg)) == NULL)
01176     {
01177         send_to_char ("They aren't here.\n\r", ch);
01178         return;
01179     }
01180 
01181     if (IS_NPC (victim))
01182     {
01183         send_to_char ("Not on NPC's.\n\r", ch);
01184         return;
01185     }
01186 
01187     if (get_trust (victim) >= get_trust (ch))
01188     {
01189         send_to_char ("You failed.\n\r", ch);
01190         return;
01191     }
01192 
01193     SET_BIT (victim->act, PLR_DENY);
01194     send_to_char ("You are denied access!\n\r", victim);
01195     sprintf (buf, "$N denies access to %s", victim->name);
01196     wiznet (buf, ch, NULL, WIZ_PENALTIES, WIZ_SECURE, 0);
01197     send_to_char ("OK.\n\r", ch);
01198     save_char_obj (victim);
01199     stop_fighting (victim, TRUE);
01200     do_function (victim, &do_quit, "");
01201 
01202     return;
01203 }

Here is the call graph for this function:

void do_disconnect CHAR_DATA ch,
char *  argument
 

Definition at line 1207 of file act_wiz.c.

References act, bug(), close_socket(), char_data::desc, descriptor_data::descriptor, descriptor_list, get_char_world(), is_number(), MAX_INPUT_LENGTH, descriptor_data::next, one_argument(), send_to_char(), and TO_CHAR.

01208 {
01209     char arg[MAX_INPUT_LENGTH];
01210     DESCRIPTOR_DATA *d;
01211     CHAR_DATA *victim;
01212 
01213     one_argument (argument, arg);
01214     if (arg[0] == '\0')
01215     {
01216         send_to_char ("Disconnect whom?\n\r", ch);
01217         return;
01218     }
01219 
01220     if (is_number (arg))
01221     {
01222         int desc;
01223 
01224         desc = atoi (arg);
01225         for (d = descriptor_list; d != NULL; d = d->next)
01226         {
01227             if (d->descriptor == desc)
01228             {
01229                 close_socket (d);
01230                 send_to_char ("Ok.\n\r", ch);
01231                 return;
01232             }
01233         }
01234     }
01235 
01236     if ((victim = get_char_world (ch, arg)) == NULL)
01237     {
01238         send_to_char ("They aren't here.\n\r", ch);
01239         return;
01240     }
01241 
01242     if (victim == ch)
01243     {
01244         send_to_char("Do not disconnect yourself...\n\r",ch);
01245         return;
01246     }
01247 
01248     if (victim->desc == NULL)
01249     {
01250         act ("$N doesn't have a descriptor.", ch, NULL, victim, TO_CHAR);
01251         return;
01252     }
01253 
01254     for (d = descriptor_list; d != NULL; d = d->next)
01255     {
01256         if (d == victim->desc)
01257         {
01258             close_socket (d);
01259             send_to_char ("Ok.\n\r", ch);
01260             return;
01261         }
01262     }
01263 
01264     bug ("Do_disconnect: desc not found.", 0);
01265     send_to_char ("Descriptor not found!\n\r", ch);
01266     return;
01267 }

Here is the call graph for this function:

void do_echo CHAR_DATA ch,
char *  argument
 

Definition at line 1340 of file act_wiz.c.

References descriptor_data::character, CON_PLAYING, descriptor_data::connected, descriptor_list, get_trust(), descriptor_data::next, and send_to_char().

Referenced by do_reboot(), and do_shutdown().

01341 {
01342     DESCRIPTOR_DATA *d;
01343 
01344     if (argument[0] == '\0')
01345     {
01346         send_to_char ("Global echo what?\n\r", ch);
01347         return;
01348     }
01349 
01350     for (d = descriptor_list; d; d = d->next)
01351     {
01352         if (d->connected == CON_PLAYING)
01353         {
01354             if (get_trust (d->character) >= get_trust (ch))
01355                 send_to_char ("global> ", d->character);
01356             send_to_char (argument, d->character);
01357             send_to_char ("\n\r", d->character);
01358         }
01359     }
01360 
01361     return;
01362 }

Here is the call graph for this function:

void do_force CHAR_DATA ch,
char *  argument
 

Definition at line 5032 of file act_wiz.c.

References act, char_list, descriptor_data::character, CON_PLAYING, descriptor_data::connected, descriptor_list, get_char_world(), get_trust(), IMPLEMENTOR, char_data::in_room, interpret(), IS_NPC, is_room_owner(), IS_TRUSTED, LEVEL_HERO, MAX_INPUT_LENGTH, MAX_LEVEL, MAX_STRING_LENGTH, char_data::next, descriptor_data::next, one_argument(), room_is_private(), send_to_char(), str_cmp(), str_prefix(), and TO_VICT.

05033 {
05034     char buf[MAX_STRING_LENGTH];
05035     char arg[MAX_INPUT_LENGTH];
05036     char arg2[MAX_INPUT_LENGTH];
05037 
05038     
05039    argument = one_argument (argument, arg);
05040 
05041     if (arg[0] == '\0' || argument[0] == '\0')
05042     {
05043         send_to_char ("Force whom to do what?\n\r", ch);
05044         return;
05045     }
05046 
05047     one_argument (argument, arg2);
05048 
05049     if (ch->level < 60 && (!str_cmp (arg2, "delete") || !str_prefix (arg2, "mob")))
05050     {
05051         send_to_char ("That will NOT be done.\n\r", ch);
05052         return;
05053     }
05054 
05055     sprintf (buf, "$n forces you to '%s'.", argument);
05056 
05057     /* Replaced original block with code by Edwin to keep from
05058      * corrupting pfiles in certain pet-infested situations.
05059      * JR -- 10/15/00
05060      */
05061     if ( !str_cmp( arg, "all" ) )
05062     {
05063         DESCRIPTOR_DATA *desc,*desc_next;
05064 
05065         if (get_trust(ch) < MAX_LEVEL - 3)
05066         {
05067             send_to_char("Not at your level!\n\r",ch);
05068             return;
05069         }
05070 
05071         for ( desc = descriptor_list; desc != NULL; desc = desc_next )
05072         {
05073             desc_next = desc->next;
05074 
05075             if (desc->connected==CON_PLAYING &&
05076                 get_trust( desc->character ) < get_trust( ch ) )
05077             {
05078                 act( buf, ch, NULL, desc->character, TO_VICT );
05079                 interpret( desc->character, argument );
05080             }
05081         }
05082     }
05083     else if (!str_cmp (arg, "players"))
05084     {
05085         CHAR_DATA *vch;
05086         CHAR_DATA *vch_next;
05087 
05088         if (get_trust (ch) < MAX_LEVEL - 2)
05089         {
05090             send_to_char ("Not at your level!\n\r", ch);
05091             return;
05092         }
05093 
05094         for (vch = char_list; vch != NULL; vch = vch_next)
05095         {
05096             vch_next = vch->next;
05097 
05098             if (!IS_NPC (vch) && get_trust (vch) < get_trust (ch)
05099                 && vch->level < LEVEL_HERO)
05100             {
05101                 act (buf, ch, NULL, vch, TO_VICT);
05102                 interpret (vch, argument);
05103             }
05104         }
05105     }
05106     else if (!str_cmp (arg, "gods"))
05107     {
05108         CHAR_DATA *vch;
05109         CHAR_DATA *vch_next;
05110 
05111         if (get_trust (ch) < MAX_LEVEL - 2)
05112         {
05113             send_to_char ("Not at your level!\n\r", ch);
05114             return;
05115         }
05116 
05117         for (vch = char_list; vch != NULL; vch = vch_next)
05118         {
05119             vch_next = vch->next;
05120 
05121             if (!IS_NPC (vch) && get_trust (vch) < get_trust (ch)
05122                 && vch->level >= LEVEL_HERO)
05123             {
05124                 act (buf, ch, NULL, vch, TO_VICT);
05125                 interpret (vch, argument);
05126             }
05127         }
05128     }
05129     else
05130     {
05131         CHAR_DATA *victim;
05132 
05133         if ((victim = get_char_world (ch, arg)) == NULL)
05134         {
05135             send_to_char ("They aren't here.\n\r", ch);
05136             return;
05137         }
05138 
05139         if (victim == ch)
05140         {
05141             send_to_char ("Aye aye, right away!\n\r", ch);
05142             return;
05143         }
05144 
05145         if (!is_room_owner (ch, victim->in_room)
05146             && ch->in_room != victim->in_room
05147             && room_is_private (victim->in_room)
05148             && !IS_TRUSTED (ch, IMPLEMENTOR))
05149         {
05150             send_to_char ("That character is in a private room.\n\r", ch);
05151             return;
05152         }
05153 
05154         if (get_trust (victim) >= get_trust (ch))
05155         {
05156             send_to_char ("Do it yourself!\n\r", ch);
05157             return;
05158         }
05159 
05160         if (!IS_NPC (victim) && get_trust (ch) < MAX_LEVEL - 3)
05161         {
05162             send_to_char ("Not at your level!\n\r", ch);
05163