/*************************************************************************** * Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, * * Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. * * * * Merc Diku Mud improvments copyright (C) 1992, 1993 by Michael * * Chastain, Michael Quan, and Mitchell Tse. * * * * In order to use any part of this Merc Diku Mud, you must comply with * * both the original Diku license in 'license.doc' as well the Merc * * license in 'license.txt'. In particular, you may not remove either of * * these copyright notices. * * * * Much time and thought has gone into this software and you are * * benefitting. We hope that you share your changes too. What goes * * around, comes around. * ***************************************************************************/ /*************************************************************************** * God Wars Mud copyright (C) 1994, 1995, 1996 by Richard Woolcock * * * * Legend of Chrystancia copyright (C) 1999, 2000, 2001 by Matthew Little * * This mud is NOT to be copied in whole or in part, or to be run without * * the permission of Matthew Little. Nobody else has permission to * * authorise the use of this code. * ***************************************************************************/ #if defined(macintosh) #include <types.h> #else #include <sys/types.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "merc.h" void do_pset (CHAR_DATA * ch, char *argument) { char arg1[MAX_INPUT_LENGTH]; char arg2[MAX_INPUT_LENGTH]; char arg3[MAX_INPUT_LENGTH]; char arg4[MAX_INPUT_LENGTH]; char buf[MAX_STRING_LENGTH]; CHAR_DATA *victim; int value; int i; sprintf (buf, "%s: Pset %s", ch->name, argument); if (ch->level < NO_WATCH) do_watching (ch, buf); smash_tilde (argument); argument = one_argument (argument, arg1); argument = one_argument (argument, arg2); argument = one_argument (argument, arg3); strcpy (arg4, argument); if (arg1[0] == '\0' || arg2[0] == '\0' || arg3[0] == '\0') { send_to_char ("Syntax: pset <victim> <area> <field> <value>\n\r", ch); send_to_char ("\n\r", ch); send_to_char ("Area being one of:\n\r", ch); send_to_char (" quest quest+ quest- weapon immune beast\n\r", ch); send_to_char (" blue red yellow green purple spellall\n\r", ch); send_to_char (" mongoose crane crab viper bull mantis stanceall\n\r", ch); send_to_char (" dragon tiger monkey swallow \n\r", ch); send_to_char (" aura dps status status+ status- spouse legend\n\r", ch); send_to_char (" pkills pdeaths mkills mdeaths akills adeaths\n\r", ch); send_to_char (" recall kingrank\n\r", ch); send_to_char ("\n\r", ch); send_to_char ("Field being one of:\n\r", ch); send_to_char ("Weapon: slice stab slash whip claw blast \n\r", ch); send_to_char ("Weapon: pound crush grep bite pierce suck \n\r", ch); send_to_char ("Immune: slash stab smash animal misc charm\n\r", ch); send_to_char ("Immune: heat cold acid summon voodoo \n\r", ch); send_to_char ("Immune: hurl backstab shielded kick disarm\n\r", ch); send_to_char ("Immune: steal sleep drain sunlight\n\r", ch); send_to_char (" all\n\r", ch); send_to_char ("\n\rSpecial being one of:\n\r", ch); send_to_char (" married ftalk testchar roomflags channel\n\r", ch); send_to_char (" whine dcolor map outcast newbiehelper\n\r", ch); return; } if ((victim = get_char_world (ch, arg1)) == NULL) { send_to_char ("They aren't here.\n\r", ch); return; } if (IS_SET (victim->act, PLR_GODLESS) && ch->level < NO_GODLESS) { send_to_char ("You failed.\n\r", ch); return; } /* * Snarf the value (which need not be numeric). */ value = is_number (arg3) ? atoi (arg3) : 5; /* * Set something. */ if (!str_cmp (arg2, "special")) { if (!str_cmp (arg3, "dcolor")) { if (IS_NPC (victim)) { stc ("Not on NPC's!\n\r", ch); return; } if (!IS_CLASS (victim, CLASS_DRAGON)) { stc ("They are not a dragon, they dont need a Dragon COlor!\n\r", ch); return; } victim->pcdata->disc_a[DRAGON_COLOR] = number_range (1, 9); stc ("You change their color\n\r", ch); return; } if (!str_cmp (arg3, "map")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's!\n\r", ch); return; } if (IS_SET (victim->extra2, MAP)) { send_to_char ("Removed.\n\r", ch); REMOVE_BIT (victim->extra2, MAP); } else { send_to_char (" Set.\n\r", ch); SET_BIT (victim->extra2, MAP); } return; } if (!str_cmp (arg3, "favor")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's!\n\r", ch); return; } if (IS_SET (victim->act, PLR_RIGHTHAND)) { send_to_char ("Removed.\n\r", ch); REMOVE_BIT (victim->act, PLR_RIGHTHAND); } if (IS_SET (victim->act, PLR_LEFTHAND)) { send_to_char ("Removed.\n\r", ch); REMOVE_BIT (victim->act, PLR_LEFTHAND); } stc ("You are now able to set your favor again!\n\r", victim); return; } if (!str_cmp (arg3, "newbiehelper")) { if (!IS_CREATOR (ch)) { stc ("You cannot do that!\n\r", ch); return; } if (IS_NPC (victim)) { send_to_char ("Not on NPC's!\n\r", ch); return; } if (IS_SET (victim->extra2, NHELPER)) { send_to_char ("Removed.\n\r", ch); REMOVE_BIT (victim->extra2, NHELPER); } else { send_to_char (" Set.\n\r", ch); send_to_char ("You are now a designated NEWBIE HELPER\n\rThis means you are now unable to be PKilled, or PKill\n\rThis is IRREVERSIBLE\n\r", victim); SET_BIT (victim->extra2, NHELPER); } return; } if (!str_cmp (arg3, "wanted")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's!\n\r", ch); return; } if (IS_SET (victim->newbits, WANTED)) { send_to_char ("Removed.\n\r", ch); REMOVE_BIT (victim->newbits, WANTED); } else { send_to_char (" Set.\n\r", ch); SET_BIT (victim->newbits, WANTED); } return; } if (!str_cmp (arg3, "whine")) { if (!IS_CREATOR (ch)) { stc ("You cannot do that!\n\r", ch); return; } if (IS_NPC (victim)) { send_to_char ("Not on NPC's!\n\r", ch); return; } if (IS_SET (victim->extra2, WHINER)) { send_to_char ("Removed.\n\r", ch); REMOVE_BIT (victim->extra2, WHINER); } else { send_to_char (" Set.\n\r", ch); send_to_char ("You have been classified a whiner!\n\r", victim); SET_BIT (victim->extra2, WHINER); } return; } if (!str_cmp (arg3, "demented")) { // if (!IS_CREATOR (ch)) // { // stc ("You cannot do that!\n\r", ch); // return; // } if (IS_NPC (victim)) { send_to_char ("Not on NPC's!\n\r", ch); return; } if (IS_SET (victim->extra2, DEMENTED)) { send_to_char ("Removed.\n\r", ch); sprintf(buf, "%s is no longer demented!", victim->name); do_info(ch, buf); REMOVE_BIT (victim->extra2, DEMENTED); send_to_char ("You receive a day pass and make a break for it!\n\r", victim); } else { send_to_char (" Set.\n\r", ch); sprintf(buf, "Uh-oh watch out! %s is now demented!", victim->name); do_info(ch, buf); send_to_char ("You have been sent to the asylum!\n\r", victim); SET_BIT (victim->extra2, DEMENTED); } return; } if (!str_cmp (arg3, "channel")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's!\n\r", ch); return; } if (IS_SET (victim->more, CANCHAN)) { send_to_char ("Removed.\n\r", ch); REMOVE_BIT (victim->more, CANCHAN); } else { send_to_char (" Set.\n\r", ch); SET_BIT (victim->more, CANCHAN); } return; } if (!str_cmp (arg3, "roomflags")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's!\n\r", ch); return; } if (!IS_IMMORTAL (victim)) { stc ("Only on Immortals!\n\r", ch); return; } if (IS_SET (victim->more, MORE_ROOMFLAGS)) { send_to_char ("Removed.\n\r", ch); REMOVE_BIT (victim->more, MORE_ROOMFLAGS); } else { send_to_char (" Set.\n\r", ch); SET_BIT (victim->more, MORE_ROOMFLAGS); } return; } if (!str_cmp (arg3, "outcast")) { if (IS_NPC (victim)) { stc ("Not on NPC's!\n\r", ch); return; } if (IS_SET (victim->more, MORE_NOKING)) { send_to_char ("REMOVED.\n\r", ch); REMOVE_BIT (victim->more, MORE_NOKING); } else { send_to_char ("ADDED.\n\r", ch); SET_BIT (victim->more, MORE_NOKING); } return; } if (!str_cmp (arg3, "testchar")) { if (IS_NPC (victim)) { stc ("Not on NPC's!\n\r", ch); return; } if (IS_SET (victim->more, MORE_TEST)) { send_to_char ("You remove their test char status.\n\r", ch); stc ("You are NO Longer a test char.\n\r", victim); REMOVE_BIT (victim->more, MORE_TEST); } else { send_to_char ("You make them a test char.\n\r", ch); stc ("You are now a test char.\n\r", victim); SET_BIT (victim->more, MORE_TEST); } return; } if (!str_cmp (arg3, "afk")) { if (IS_NPC (victim)) { stc ("Not on NPC's!\n\r", ch); return; } if (IS_SET (victim->flag2, EXTRA_AFK)) { send_to_char ("You remove their afk status.\n\r", ch); REMOVE_BIT (victim->flag2, EXTRA_AFK); } else { send_to_char ("You set them afk.\n\r", ch); SET_BIT (victim->flag2, EXTRA_AFK); } return; } if (!str_cmp (arg3, "married")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's!\n\r", ch); return; } if (IS_EXTRA (victim, EXTRA_MARRIED)) { send_to_char ("Marriage Removed.\n\r", ch); REMOVE_BIT (victim->extra, EXTRA_MARRIED); free_string (victim->pcdata->marriage); victim->pcdata->marriage = str_dup (" "); } else { send_to_char (" Marriage bit set.\n\r", ch); SET_BIT (victim->extra, EXTRA_MARRIED); } return; } if (!str_cmp (arg3, "ftalk")) { if (str_cmp(ch->name, "Tadaken") && (ch->trust < 13)) { send_to_char ("Sorry, you can't do that!", ch); return; } if (IS_NPC (victim)) { send_to_char ("Not on NPC's!\n\r", ch); return; } if (IS_SET (victim->more, MORE_FTALK2)) { send_to_char ("You remove them from the FTALK channel.\n\r", ch); send_to_char ("You are no longer on the FTALK channel!\n\r", victim); REMOVE_BIT (victim->more, MORE_FTALK2); } else { send_to_char ("You add them to the FTALK channel.\n\r", ch); send_to_char ("You have been added to the FTALK channel.\n\rSyntax is: ftalk <message>\n\r", victim); SET_BIT (victim->more, MORE_FTALK2); } return; } } if (!str_cmp (arg2, "impset")) { if (!IS_CREATOR (ch) || IS_NPC (ch)) { send_to_char ("Sorry, you can't do that!", ch); return; } send_to_char ("You have made them implementor!\n\r", ch); send_to_char ("You have been made implementor!\n\r", victim); victim->level = MAX_LEVEL; victim->trust = MAX_LEVEL; return; } if (!str_cmp (arg2, "paradox")) { if (!IS_CREATOR (ch)) { stc ("Sorry, no can do...\n\r", ch); return; } if (value < 0 || value > 100) { stc ("Paradox range is 0 - 100.\n\r", ch); return; } victim->paradox[1] = value; stc ("Paradox set.\n\r", ch); return; } if (!str_cmp (arg2, "fullsphere")) { if ((!IS_CLASS (victim, CLASS_MAGE) || IS_NPC (victim)) && !IS_IMMORTAL (ch)) { send_to_char ("Sorry, only on mage chars.\n\r", ch); return; } for (i = 0; i < 9; i++) { victim->spheres[i] = value; } send_to_char ("Their spheres have been set.\n\r", ch); send_to_char ("You now have all spheres.\n\r", ch); return; } if (!str_cmp (arg2, "spouse")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } free_string (victim->pcdata->marriage); victim->pcdata->marriage = str_dup (capitalize(arg3)); send_to_char ("Spouse set!\n\r", ch); return; } if (!str_cmp (arg2, "kingrank")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 5) { send_to_char ("Ranks can be from 0 to 5\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->pcdata->kingrank = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "mkills")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->mkill = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "mdeaths")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->mdeath = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "pkills")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->pkill = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "pdeaths")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->pdeath = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "akills")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->awins = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "adeaths")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->alosses = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "beast")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 100) { send_to_char ("Beast range is 0 to 100.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->beast = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } /* psetting dps is possible - Loki */ if (!str_cmp (arg2, "dps")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 1 || value > 2000000) { send_to_char ("Demon points range is 1 to 2000000.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->pcdata->stats[DEMON_CURRENT] = value; victim->pcdata->stats[DEMON_TOTAL] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } /* Pset Status - Loki */ if (!str_cmp (arg2, "legend")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 10) { send_to_char ("Status range is 1 to 10.\n\r", ch); return; } if (IS_IMPLEMENTOR (ch)) { victim->lstatus = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "status")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 100) { send_to_char ("Status range is 1 to 100.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->race = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "status+")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || (value + victim->race) > 100) { send_to_char ("Status range is 1 to 100.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->race += value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "status-")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value > 100 || (victim->race - value) < 0) { send_to_char ("Status range is 1 to 100.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->race -= value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "bounty")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 1500) { send_to_char ("Status range is 1 to 1500.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->pcdata->bounty = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "recall")) { if (IS_NPC (victim)) { stc ("Not on NPC's.\n\r", ch); return; } victim->home = value; stc ("Recall Set.\n\r", ch); return; } if (!str_cmp (arg2, "quest")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 1 || value > 150000) { send_to_char ("Quest range is 1 to 150000.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->pcdata->quest = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "quest+")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 1 || value + victim->pcdata->quest > 100000) { send_to_char ("Quest range is 1 to 15000.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->pcdata->quest += value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "quest-")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (victim->pcdata->quest - value < 0 || value > 100000) { send_to_char ("Quest range is 1 to 15000.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->pcdata->quest -= value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "viper")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 200) { send_to_char ("Stance Viper range is 0 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->stance[STANCE_VIPER] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "crane")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 200) { send_to_char ("Stance Crane range is 0 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->stance[STANCE_CRANE] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "crab")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 200) { send_to_char ("Stance Crab range is 0 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->stance[STANCE_CRAB] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "mongoose")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 200) { send_to_char ("Stance Mongoose range is 0 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->stance[STANCE_MONGOOSE] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "bull")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 200) { send_to_char ("Stance Bull range is 0 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->stance[STANCE_BULL] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "mantis")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 200) { send_to_char ("Stance Mantis range is 0 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->stance[STANCE_MANTIS] = value; victim->stance[STANCE_CRANE] = 200; victim->stance[STANCE_VIPER] = 200; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "dragon")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 200) { send_to_char ("Stance Dragon range is 0 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->stance[STANCE_DRAGON] = value; victim->stance[STANCE_CRAB] = 200; victim->stance[STANCE_BULL] = 200; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "tiger")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 200) { send_to_char ("Stance Tiger range is 0 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->stance[STANCE_TIGER] = value; victim->stance[STANCE_BULL] = 200; victim->stance[STANCE_VIPER] = 200; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "monkey")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 200) { send_to_char ("Stance Monkey range is 0 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->stance[STANCE_MONKEY] = value; victim->stance[STANCE_MONGOOSE] = 200; victim->stance[STANCE_CRANE] = 200; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "swallow")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 200) { send_to_char ("Stance Swallow range is 0 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->stance[STANCE_SWALLOW] = value; victim->stance[STANCE_CRAB] = 200; victim->stance[STANCE_MONGOOSE] = 200; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "stanceall")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (value < 0 || value > 200) { send_to_char ("Stance range is 0 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { int i; for (i = 1; i <= 10; i++) victim->stance[i] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "purple")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (IS_CLASS (victim, CLASS_MAGE) && (value < 4 || value > 240)) { send_to_char ("Spell range is 4 to 240.\n\r", ch); return; } else if (value < 4 || value > 200) { send_to_char ("Spell range is 4 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->spl[PURPLE_MAGIC] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "spellall")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (IS_CLASS (victim, CLASS_MAGE) && (value < 4 || value > 240)) { send_to_char ("Spell range is 4 to 240.\n\r", ch); return; } else if (value < 4 || value > 200) { send_to_char ("Spell range is 4 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->spl[PURPLE_MAGIC] = value; victim->spl[RED_MAGIC] = value; victim->spl[BLUE_MAGIC] = value; victim->spl[GREEN_MAGIC] = value; victim->spl[YELLOW_MAGIC] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "red")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (IS_CLASS (victim, CLASS_MAGE) && (value < 4 || value > 240)) { send_to_char ("Spell range is 4 to 240.\n\r", ch); return; } else if (value < 4 || value > 200) { send_to_char ("Spell range is 4 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->spl[RED_MAGIC] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "blue")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (IS_CLASS (victim, CLASS_MAGE) && (value < 4 || value > 240)) { send_to_char ("Spell range is 4 to 240.\n\r", ch); return; } else if (value < 4 || value > 200) { send_to_char ("Spell range is 4 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->spl[BLUE_MAGIC] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "green")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (IS_CLASS (victim, CLASS_MAGE) && (value < 4 || value > 240)) { send_to_char ("Spell range is 4 to 240.\n\r", ch); return; } else if (value < 4 || value > 200) { send_to_char ("Spell range is 4 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->spl[GREEN_MAGIC] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "yellow")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (IS_CLASS (victim, CLASS_MAGE) && (value < 4 || value > 240)) { send_to_char ("Spell range is 4 to 240.\n\r", ch); return; } else if (value < 4 || value > 200) { send_to_char ("Spell range is 4 to 200.\n\r", ch); return; } if (IS_JUDGE (ch)) { victim->spl[YELLOW_MAGIC] = value; send_to_char ("Ok.\n\r", ch); } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "immune")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } if (arg3 == '\0') { send_to_char ("pset <victim> immune <immunity>.\n\r", ch); return; } if (IS_JUDGE (ch)) { if (!str_cmp (arg3, "voodoo")) { if (IS_SET (victim->immune, IMM_VOODOO)) { REMOVE_BIT (victim->immune, IMM_VOODOO); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_VOODOO); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "slash")) { if (IS_SET (victim->immune, IMM_SLASH)) { REMOVE_BIT (victim->immune, IMM_SLASH); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_SLASH); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "stab")) { if (IS_SET (victim->immune, IMM_STAB)) { REMOVE_BIT (victim->immune, IMM_STAB); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_STAB); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "smash")) { if (IS_SET (victim->immune, IMM_SMASH)) { REMOVE_BIT (victim->immune, IMM_SMASH); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_SMASH); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "anmial")) { if (IS_SET (victim->immune, IMM_ANIMAL)) { REMOVE_BIT (victim->immune, IMM_ANIMAL); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_ANIMAL); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "misc")) { if (IS_SET (victim->immune, IMM_MISC)) { REMOVE_BIT (victim->immune, IMM_MISC); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_MISC); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "charm")) { if (IS_SET (victim->immune, IMM_CHARM)) { REMOVE_BIT (victim->immune, IMM_CHARM); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_CHARM); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "heat")) { if (IS_SET (victim->immune, IMM_HEAT)) { REMOVE_BIT (victim->immune, IMM_HEAT); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_HEAT); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "cold")) { if (IS_SET (victim->immune, IMM_COLD)) { REMOVE_BIT (victim->immune, IMM_COLD); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_COLD); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "lightning")) { if (IS_SET (victim->immune, IMM_LIGHTNING)) { REMOVE_BIT (victim->immune, IMM_LIGHTNING); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_LIGHTNING); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "acid")) { if (IS_SET (victim->immune, IMM_ACID)) { REMOVE_BIT (victim->immune, IMM_ACID); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_ACID); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "shield")) { if (IS_SET (victim->immune, IMM_SHIELDED)) { REMOVE_BIT (victim->immune, IMM_SHIELDED); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_SHIELDED); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "hurl")) { if (IS_SET (victim->immune, IMM_HURL)) { REMOVE_BIT (victim->immune, IMM_HURL); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_HURL); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "backstab")) { if (IS_SET (victim->immune, IMM_BACKSTAB)) { REMOVE_BIT (victim->immune, IMM_BACKSTAB); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_BACKSTAB); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "kick")) { if (IS_SET (victim->immune, IMM_KICK)) { REMOVE_BIT (victim->immune, IMM_KICK); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_KICK); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "disarm")) { if (IS_SET (victim->immune, IMM_DISARM)) { REMOVE_BIT (victim->immune, IMM_DISARM); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_DISARM); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "steal")) { if (IS_SET (victim->immune, IMM_STEAL)) { REMOVE_BIT (victim->immune, IMM_STEAL); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_STEAL); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "sleep")) { if (IS_SET (victim->immune, IMM_SLEEP)) { REMOVE_BIT (victim->immune, IMM_SLEEP); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_SLEEP); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "sunlight")) { if (IS_SET (victim->immune, IMM_SUNLIGHT)) { REMOVE_BIT (victim->immune, IMM_SUNLIGHT); send_to_char ("Ok Immunity Removed.\n\r", ch); return; } else { SET_BIT (victim->immune, IMM_SUNLIGHT); send_to_char ("Ok Immunity Added.\n\r", ch); return; } } if (!str_cmp (arg3, "all")) { SET_BIT (victim->immune, IMM_DRAIN); SET_BIT (victim->immune, IMM_VOODOO); SET_BIT (victim->immune, IMM_SLASH); SET_BIT (victim->immune, IMM_STAB); SET_BIT (victim->immune, IMM_SMASH); SET_BIT (victim->immune, IMM_ANIMAL); SET_BIT (victim->immune, IMM_MISC); SET_BIT (victim->immune, IMM_CHARM); SET_BIT (victim->immune, IMM_HEAT); SET_BIT (victim->immune, IMM_COLD); SET_BIT (victim->immune, IMM_LIGHTNING); SET_BIT (victim->immune, IMM_ACID); SET_BIT (victim->immune, IMM_HURL); SET_BIT (victim->immune, IMM_BACKSTAB); SET_BIT (victim->immune, IMM_KICK); SET_BIT (victim->immune, IMM_DISARM); SET_BIT (victim->immune, IMM_STEAL); SET_BIT (victim->immune, IMM_SLEEP); send_to_char ("Ok All Immunities Added.\n\r", ch); return; } send_to_char ("No such immunity exists.\n\r", ch); return; } else send_to_char ("Sorry, no can do...\n\r", ch); return; } if (!str_cmp (arg2, "weapon")) { if (IS_NPC (victim)) { send_to_char ("Not on NPC's.\n\r", ch); return; } argument = one_argument (argument, arg4); /* * Snarf the value (which need not be numeric). */ value = is_number (arg4) ? atoi (arg4) : -1; if (value < 0 || value > 1000) { send_to_char ("Weapon skill range is 0 to 1000.\n\r", ch); return; } if (IS_JUDGE (ch)) { if (!str_cmp (arg3, "unarmed")) { victim->wpn[0] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "slice")) { victim->wpn[1] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "stab")) { victim->wpn[2] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "slash")) { victim->wpn[3] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "whip")) { victim->wpn[4] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "claw")) { victim->wpn[5] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "blast")) { victim->wpn[6] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "pound")) { victim->wpn[7] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "crush")) { victim->wpn[8] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "grep")) { victim->wpn[9] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "bite")) { victim->wpn[10] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "pierce")) { victim->wpn[11] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "suck")) { victim->wpn[12] = value; send_to_char ("Ok.\n\r", ch); return; } if (!str_cmp (arg3, "all")) { victim->wpn[0] = value; victim->wpn[1] = value; victim->wpn[2] = value; victim->wpn[3] = value; victim->wpn[4] = value; victim->wpn[5] = value; victim->wpn[6] = value; victim->wpn[7] = value; victim->wpn[8] = value; victim->wpn[8] = value; victim->wpn[9] = value; victim->wpn[10] = value; victim->wpn[11] = value; victim->wpn[12] = value; send_to_char ("Ok.\n\r", ch); return; } send_to_char ("No such weapon skill exists.\n\r", ch); return; } else send_to_char ("Sorry, no can do...\n\r", ch); return; } /* * Generate usage message. */ do_pset (ch, ""); return; } void strip_obj (CHAR_DATA * ch) { OBJ_DATA *obj; if (IS_NPC (ch)) return; if ((obj = ch->pcdata->chobj) == NULL) return; ch->pcdata->obj_vnum = 0; obj->chobj = NULL; ch->pcdata->chobj = NULL; REMOVE_BIT (ch->affected_by, AFF_POLYMORPH); REMOVE_BIT (ch->extra, EXTRA_OSWITCH); REMOVE_BIT (ch->extra, EXTRA_ASH); REMOVE_BIT (ch->extra, EXTRA_PLASMA); FILL_STRING (ch->morph, ""); act ("$p transforms into $n.", ch, obj, NULL, TO_ROOM); act ("You reform your human body.", ch, obj, NULL, TO_CHAR); extract_obj (obj); if (ch->in_room->vnum == ROOM_VNUM_IN_OBJECT) { char_from_room (ch); char_to_room (ch, get_room_index (3054)); } return; } /*Tidied up*/ void paradox (CHAR_DATA * ch) { char buf[MAX_STRING_LENGTH]; char paradoxlog[MAX_STRING_LENGTH]; sprintf (paradoxlog, "Name: %s Paradox Points: %d", ch->name, ch->paradox[1]); log_string (paradoxlog, ch); if (ch->level < 3) return; if (IS_CLASS (ch, CLASS_NINJA) && IS_AFFECTED (ch, AFF_HIDE)) { stc ("You emerge from the shadows!\n\r", ch); REMOVE_BIT (ch->affected_by, AFF_HIDE); } send_to_char ("The sins of your past strike back!\n\r", ch); send_to_char ("The paradox has come for your soul!\n\r", ch); sprintf (buf, "%s is struck by a paradox.", ch->name); //SET_BIT(ch->newbits, WANTED); do_info (ch, buf); ch->paradox[1] = 0; ch->paradox[2] = 0; strip_obj (ch); // if (ch->race > 1) // ch->race--; ch->hit = -10; update_pos (ch); do_escape (ch, ""); SET_BIT (ch->extra, TIED_UP); SET_BIT (ch->extra, GAGGED); SET_BIT (ch->extra, BLINDFOLDED); return; } void do_pmort (CHAR_DATA * ch, char *argument) { char arg[MAX_INPUT_LENGTH]; CHAR_DATA *victim; DESCRIPTOR_DATA *d; argument = one_argument (argument, arg); if (arg[0] == '\0') { send_to_char ("Mort whom?\n\r", ch); return; } if (get_trust (ch) >= MAX_LEVEL - 1 && !str_cmp (arg, "all")) { for (d = first_descriptor; d != NULL; d = d->next) { victim = d->character; if (victim == NULL || IS_NPC (victim) || IS_IMMORTAL (victim)) continue; { victim->hit = -10; update_pos (victim); } } } if ((victim = get_char_world (ch, arg)) == NULL) { send_to_char ("They aren't here..\n\r", ch); return; } if (ch == victim) { send_to_char ("Does pain give you pleasure?\n\r", ch); return; } if (IS_NPC (victim)) { send_to_char ("Not on MOBS.\n\r", ch); return; } if (IS_IMMORTAL (victim)) { send_to_char ("You are unable to Pmort Imms.\n\r", ch); return; } victim->hit = -10; update_pos (victim); send_to_char ("Ok, they're morted!\n\r", ch); } void do_paradox (CHAR_DATA * ch, char *argument) { char arg[MAX_INPUT_LENGTH]; CHAR_DATA *victim; DESCRIPTOR_DATA *d; argument = one_argument (argument, arg); if (arg[0] == '\0') { send_to_char ("Paradox whom?\n\r", ch); return; } if (get_trust (ch) >= MAX_LEVEL - 2 && !str_cmp (arg, "all")) { for (d = first_descriptor; d != NULL; d = d->next) { victim = d->character; if (victim == NULL || IS_NPC (victim) || IS_IMMORTAL (victim)) continue; { paradox (victim); } } } /* if IS_NPC(victim) { send_to_char("Not on MOBILES!\n\r",ch); return; } */ if ((victim = get_char_world (ch, arg)) == NULL || IS_NPC (victim)) { send_to_char ("They aren't here.\n\r", ch); return; } /* if (ch == victim) { send_to_char("I dont think so.\n\r",ch); return; } */ if IS_IMMORTAL (victim) { send_to_char ("You are unable to paradox Imms,\n\r", ch); return; } paradox (victim); send_to_char ("PARADOXED!\n\r", ch); }