nym_elf.c
demise/src/nym_elf.c · 82.8 KB
From the archive dodbackup-final.tar.gz
Download the archive « Back to the archive contents
/*****************************
* *
* This Elf Class Coded *
* originaly by Nymph *
* *
*****************************/
#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 elffog args ((CHAR_DATA * ch, char *argument));
void
do_wisdoms (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char arg[MIL];
char arg2[MIL];
char wis[MIL];
int cost = 0;
int inpart = 0;
argument = one_argument (argument, arg);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (arg[0] == '\0')
{
send_to_char ("Choose your Wisdom\n\r", ch);
sprintf
(buf,
"#pAir#r [#7%d#r]#n, #gEarth#r [#7%d#r]#n, #ySpirit#r [#7%d#r]#n, #RFire#r [#7%d#r]#n, #LWater#r [#7%d#r]#n, #oArchery#r [#7%d#r]#n.\n\r",
ch->pcdata->wisdoms[0], ch->pcdata->wisdoms[1],
ch->pcdata->wisdoms[2], ch->pcdata->wisdoms[3],
ch->pcdata->wisdoms[4], ch->pcdata->wisdoms[5]);
stc (buf, ch);
return;
}
else if (!str_cmp (arg, "Air"))
{
inpart = ELF_AIR;
sprintf (wis, "#pAir#n");
if (arg2[0] == '\0')
{
if (ch->pcdata->wisdoms[inpart] == 0)
{
sprintf (buf, "You haven't learned any %s wisdoms.\n\r", wis);
stc (buf, ch);
return;
}
if (ch->pcdata->wisdoms[inpart] > 0)
stc ("1. #pEagle#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 1)
stc ("2. #pPass#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 2)
stc ("3. #pLightning Arrow\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 3)
stc ("4. #pElf Form#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 4)
stc ("5. #pCall upon the Air#n\n\r", ch);
return;
}
if (str_cmp (arg2, "Learn"))
{
sprintf (buf, "syntax: wisdoms %s learn.\n\r", arg);
stc (buf, ch);
return;
}
}
else if (!str_cmp (arg, "Archery"))
{
inpart = ELF_ARCHERY;
sprintf (wis, "#oArchery#n");
if (arg2[0] == '\0')
{
if (ch->pcdata->wisdoms[inpart] == 0)
{
sprintf (buf, "You haven't learned any %s wisdoms.\n\r", wis);
stc (buf, ch);
return;
}
if (ch->pcdata->wisdoms[inpart] > 0)
stc ("1. #oBowyer, Fletcher#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 1)
stc ("2. #oArcher#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 2)
stc ("3. #oProximity#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 3)
stc ("4. \n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 4)
stc ("5. #oHail of Arrows#n\n\r", ch);
return;
}
if (str_cmp (arg2, "Learn"))
{
sprintf (buf, "syntax: wisdoms %s learn.\n\r", arg);
stc (buf, ch);
return;
}
}
else if (!str_cmp (arg, "Earth"))
{
inpart = ELF_EARTH;
sprintf (wis, "#gEarth#n");
if (arg2[0] == '\0')
{
if (ch->pcdata->wisdoms[inpart] == 0)
{
sprintf (buf, "You haven't learned any %s wisdoms.\n\r", wis);
stc (buf, ch);
return;
}
if (ch->pcdata->wisdoms[inpart] > 0)
stc ("1. #gElven Shield#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 1)
stc ("2. #gBull Strength#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 2)
stc ("3. #gPoison Arrows#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 3)
stc ("4. #gListen#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 4)
stc ("5. #gCall upon the Earth#n\n\r", ch);
return;
}
if (str_cmp (arg2, "Learn"))
{
sprintf (buf, "syntax: wisdoms %s learn.\n\r", arg);
stc (buf, ch);
return;
}
}
else if (!str_cmp (arg, "Spirit"))
{
inpart = ELF_SPIRIT;
sprintf (wis, "#ySpirit#n");
if (arg2[0] == '\0')
{
if (ch->pcdata->wisdoms[inpart] == 0)
{
sprintf (buf, "You haven't learned any %s wisdoms.\n\r", wis);
stc (buf, ch);
return;
}
if (ch->pcdata->wisdoms[inpart] > 0)
stc ("1. #ySpiritvision#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 1)
stc ("2. #ySpirit Sense#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 2)
stc ("3. #ySpirit Dust#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 3)
stc ("4. #ySlaying Arrows#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 4)
stc ("5. #yCall upon the Spirits#n\n\r", ch);
return;
}
if (str_cmp (arg2, "Learn"))
{
sprintf (buf, "syntax: wisdoms %s learn.\n\r", arg);
stc (buf, ch);
return;
}
}
else if (!str_cmp (arg, "Fire"))
{
inpart = ELF_FIRE;
sprintf (wis, "#RFire#n");
if (arg2[0] == '\0')
{
if (ch->pcdata->wisdoms[inpart] == 0)
{
sprintf (buf, "You haven't learned any %s wisdoms.\n\r", wis);
stc (buf, ch);
return;
}
if (ch->pcdata->wisdoms[inpart] > 0)
stc ("1. #RQuickness#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 1)
stc ("2. #RFlaming Arrows#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 2)
stc ("3. #RSmokescreen#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 3)
stc ("4. #RBlinding#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 4)
stc ("5. #RCall upon the Flames#n\n\r", ch);
return;
}
if (str_cmp (arg2, "Learn"))
{
sprintf (buf, "syntax: wisdoms %s learn.\n\r", arg);
stc (buf, ch);
return;
}
}
else if (!str_cmp (arg, "Water"))
{
inpart = ELF_WATER;
sprintf (wis, "#LWater#n");
if (arg2[0] == '\0')
{
if (ch->pcdata->wisdoms[inpart] == 0)
{
sprintf (buf, "You haven't learned any %s wisdoms.\n\r", wis);
stc (buf, ch);
return;
}
if (ch->pcdata->wisdoms[inpart] > 0)
stc ("1. #LMagical Aura#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 1)
stc ("2. #LFrost Arrows#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 2)
stc ("3. #LWall of Water#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 3)
stc ("4.#LHagswrinkle#n\n\r", ch);
if (ch->pcdata->wisdoms[inpart] > 4)
stc ("5. #LCall upon the Water\n\r", ch);
return;
}
if (str_cmp (arg2, "Learn"))
{
sprintf (buf, "syntax: wisdoms %s learn.\n\r", arg);
stc (buf, ch);
return;
}
}
else
{
do_wisdoms (ch, "");
return;
}
if (ch->pcdata->wisdoms[inpart] > 4 && !IS_XXX (ch, XXX_CANPICK))
{
sprintf (buf, "You are full of %s Wisdom.\n\r", wis);
stc (buf, ch);
return;
}
if (IS_XXX (ch, XXX_CANPICK) && IS_XXX (ch, XXX_HASPICKED)
&& ch->pcdata->wisdoms[inpart] < 6 && ch->pcdata->wisdoms[inpart] > 4)
{
sprintf (buf, "You are full of %s Wisdom.\n\r", wis);
stc (buf, ch);
return;
}
if (ch->pcdata->wisdoms[inpart] > 9)
{
sprintf (buf, "You are full of %s Wisdom.\n\r", wis);
stc (buf, ch);
return;
}
if (ch->pcdata->wisdoms[inpart] > 4)
SET_BIT (ch->xxxbits, XXX_HASPICKED);
cost = (ch->pcdata->wisdoms[inpart] + 1) * 5000;
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
sprintf (buf,
"You need %d more %s power points to gain another %s wisdom\n\r",
(cost - ch->pcdata->power[POWER_CURRENT]), get_class (ch),
wis);
stc (buf, ch);
return;
}
ch->pcdata->wisdoms[inpart]++;
ch->pcdata->power[POWER_CURRENT] -= cost;
sprintf (buf, "You have gained your next level in the %s wisdom.\n\r", wis);
stc (buf, ch);
return;
}
void
gen_piece (CHAR_DATA * ch, OBJ_DATA * corpse)
{
char buf[MSL];
OBJ_INDEX_DATA *pObjIndex;
OBJ_DATA *obj;
int chance = 0;
int arrow = 0;
int part = 0;
int vnum = 0;
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
return;
if (corpse->item_type != ITEM_CORPSE_NPC)
return;
chance = number_percent ();
if (chance > 10) //find arrow part
{
arrow = number_percent ();
if (arrow > 40)
{
part = number_range (1, 100);
if (part <= 34)
{
vnum = 29627; //arrow shafts
}
else if (part <= 67)
{
vnum = 29628; //arrow heads
}
else if (part <= 100)
{
vnum = 29629; //feathers
}
}
else
{
part = number_range (1, 100);
if (part <= 20)
{
vnum = 29633; //sulphur
}
else if (part <= 36)
{
vnum = 29630; //thunder stone
}
else if (part <= 52)
{
vnum = 29631; //nightshade
}
else if (part <= 68)
{
vnum = 29632; //honing stone
}
else if (part <= 84)
{
vnum = 29633; //sulpher
}
else
{
vnum = 29635; //frost shard
}
}
}
else //find bow part
{
part = number_range (1, 100);
if (part <= 35)
{
vnum = 29636; //short bow handle
}
else if (part <= 70)
{
vnum = 29639; //bow string
}
else if (part <= 85)
{
vnum = 29637; //long bow handle
}
else if (part <= 95)
{
vnum = 29638; //piece of bone
}
else
{
vnum = 29640; //pulleys
}
}
if ((pObjIndex = get_obj_index (vnum)) == NULL)
{
sprintf (buf, "Missing vnum %d, please inform Corim.\n\r", vnum);
stc (buf, ch);
return;
}
obj = create_object (pObjIndex, 60);
obj_to_obj (obj, corpse);
return;
}
/* #0A Tall #GE#glven#n #GA#grcher#n */
/*
* 29627 Bundle of arrow shafts
* 29628 Arrowheads
* 29629 A bunch of feathers
* 29630 Thunder Stone (lightning)
* 29631 Nightshade (poison)
* 29632 Honing Stone (slaying)
* 29633 Sulphur (flaming)
* 29634 Gunpowder (explosive)
* 29635 Frost Shard (freezing)
* 29636 A Short Bow Handle
* 29637 A Long Bow Handle
* 29638 A Piece of Bone
* 29639 An Intricate String
* 29640 A Pair of Pulleys
* 29641 A Bundle of Arrows
* 29642 A Bundle of Lightning Arrows
* 29643 A Bundle of Poison Arrows
* 29644 A Bundle of Slaying Arrows
* 29645 A Bundle of Flaming Arrows
* 29646 A Bundle of Exploding Arrows
* 29647 A Bundle of Frost Arrows
* 29648 A Short Bow
* 29649 An Elven Quiver
*/
void
do_ecall (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 (!IS_ELF (ch))
{
do_huh (ch, "");
return;
}
if (arg1[0] == '\0')
{
stc ("What do you wish to call upon?\n\r", ch);
stc ("(#pAir#n, #gEarth#n, #ySpirit#n, #RFire#n, #LWater#n)\n\r", ch);
}
else if (!str_cmp (arg1, "Air"))
{
if (ch->pcdata->wisdoms[ELF_AIR] < 5)
{
stc ("You need level 5 air to use this,\n\r", ch);
return;
}
elffog (ch, "");
return;
}
else if (!str_cmp (arg1, "Earth"))
{
if (ch->pcdata->wisdoms[ELF_EARTH] < 5)
{
stc ("You need level 5 earth to use this,\n\r", ch);
return;
}
if (IS_XX (ch, XX_ELFEARTH))
{
stc
("You release the earth elements that helped you in combat!\n\r",
ch);
REMOVE_BIT (ch->xxbits, XX_ELFEARTH);
act ("the earth around $n's arms fall off.", ch, NULL, NULL,
TO_ROOM);
return;
}
stc ("You call upon the earth elements to help you in combat!\n\r", ch);
SET_BIT (ch->xxbits, XX_ELFEARTH);
act ("$n summons the power of earth to help $m in combat!", ch, NULL,
NULL, TO_ROOM);
return;
}
else if (!str_cmp (arg1, "Spirit"))
{
if (ch->pcdata->wisdoms[ELF_SPIRIT] < 5)
{
stc ("You need level 5 spirit to use this,\n\r", ch);
return;
}
if (ch->fighting != NULL || has_fighttimer (ch))
return;
if (IS_AFFECTED (ch, AFF_ETHEREAL))
{
stc
("You call upon the spirit elements to take you to back to the normal realm!\n\r",
ch);
REMOVE_BIT (ch->affected_by, AFF_ETHEREAL);
act ("$n fades into view from the spirit realm!", ch, NULL, NULL,
TO_ROOM);
return;
}
stc
("You call upon the spirit elements to take you to the spirit realm!\n\r",
ch);
SET_BIT (ch->affected_by, AFF_ETHEREAL);
act ("$n fades into the spirit realm!", ch, NULL, NULL, TO_ROOM);
return;
}
else if (!str_cmp (arg1, "Fire"))
{
if (ch->pcdata->wisdoms[ELF_FIRE] < 5)
{
stc ("You need level 5 fire to use this,\n\r", ch);
return;
}
do_engulf (ch, arg2);
return;
}
else if (!str_cmp (arg1, "Water"))
{
if (ch->pcdata->wisdoms[ELF_WATER] < 5)
{
stc ("You need level 5 water to use this,\n\r", ch);
return;
}
do_jail (ch, arg2);
return;
}
else
{
do_ecall (ch, "");
return;
}
return;
}
/***Air***
*1. Eagle
*2. Pass
*3. Lightning Arrow
*4. Elf Form
*5. Call Upon the Air
*/
void
do_eagle (CHAR_DATA * ch, char *argument)
{
char arg1[MIL];
char arg2[MIL];
OBJ_DATA *obj;
CHAR_DATA *victim;
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_AIR] < 1)
{
send_to_char ("You need level 1 air to use this power.\n\r", ch);
return;
}
if (arg1[0] == '\0')
{
if (IS_MORE (ch, MORE_GUARDIAN))
{
guardian_message (ch);
send_to_char ("I shall return when you call me, Master.\n\r", ch);
send_to_char
("You're eagle companion takes off from your shoulder and flies away.\n\r",
ch);
act
("A beautiful eagle takes off from $n's shoulder and flies away.",
ch, NULL, NULL, TO_ROOM);
REMOVE_BIT (ch->more, MORE_GUARDIAN);
return;
}
send_to_char
("A magnificent eagle flies down from the sky and lands on your shoulder.\n\r",
ch);
act
("A beautiful eagle flies down from the sky and lands on $n's shoulder.",
ch, NULL, NULL, TO_ROOM);
guardian_message (ch);
send_to_char ("I have arrived, Master.\n\r", ch);
SET_BIT (ch->more, MORE_GUARDIAN);
return;
}
if (!IS_MORE (ch, MORE_GUARDIAN))
{
send_to_char
("First you need to type 'eagle' to summon your eagle.\n\r", ch);
return;
}
act ("$n whispers something to the eagle perched on $s shoulder.", ch, NULL,
NULL, TO_ROOM);
if (arg2[0] == '\0')
{
send_to_char ("Have your eagle transport what to whom?\n\r", ch);
return;
}
if ((victim = get_char_world (ch, arg2)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
if (victim == ch)
{
send_to_char ("Your eagle looks confused!\n\r", ch);
return;
}
if (victim->in_room == NULL || victim->in_room == ch->in_room)
{
send_to_char ("But they are already here!\n\r", ch);
return;
}
if ((obj = get_obj_carry (ch, arg1)) == NULL)
{
send_to_char ("You are not carrying that item.\n\r", ch);
return;
}
if (obj->weight > 50)
{
send_to_char ("That item weighs too much for your eagle to carry.\n\r",
ch);
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to send $p to you via an eagle.", ch, obj,
victim, TO_VICT);
}
return;
}
if (!IS_NPC (victim) && !IS_IMMUNE (victim, IMM_TRANSPORT))
{
send_to_char ("You are unable to transport anything to them.\n\r", ch);
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to send $p to you via an eagle.", ch, obj,
victim, TO_VICT);
}
return;
}
if (IS_SET (obj->quest, QUEST_ARTIFACT))
{
stc ("You can't seem to let go of it.\n\r", ch);
return;
}
if (IS_AFFECTED (ch, AFF_ETHEREAL) || IS_AFFECTED (victim, AFF_ETHEREAL))
{
send_to_char ("Nothing happens.\n\r", ch);
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to send $p to you via an eagle.", ch, obj,
victim, TO_VICT);
}
return;
}
if (victim->carry_number + 1 > can_carry_n (victim))
{
act ("$N has $S hands full.", ch, NULL, victim, TO_CHAR);
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to send $p to you via an eagle.", ch, obj,
victim, TO_VICT);
}
return;
}
if (victim->carry_weight + get_obj_weight (obj) > can_carry_w (victim))
{
act ("$N can't carry that much weight.", ch, NULL, victim, TO_CHAR);
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to send $p to you via an eagle.", ch, obj,
victim, TO_VICT);
}
return;
}
if (!can_see_obj (victim, obj))
{
act ("$N can't see it.", ch, NULL, victim, TO_CHAR);
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to send $p to you via an eagle.", ch, obj,
victim, TO_VICT);
}
return;
}
act ("You give $p to your eagle companion.", ch, obj, NULL, TO_CHAR);
act ("$n gives $p to the eagle on $s shoulder.", ch, obj, NULL, TO_ROOM);
send_to_char
("Your eagle companion takes off from your shoulder and flies away.\n\r",
ch);
act ("The eagle takes off from $n's shoulder and flies away.", ch, NULL,
NULL, TO_ROOM);
obj_from_char (obj);
obj_to_char (obj, victim);
send_to_char
("A magnificent eagle flies down from the sky and lands on your shoulder.\n\r",
victim);
act ("An eagle flies down from the sky and lands on $n's shoulder.", victim,
NULL, NULL, TO_ROOM);
act ("The eagle gives you $p.", victim, obj, NULL, TO_CHAR);
act ("The eagle gives $n $p.", victim, obj, NULL, TO_ROOM);
send_to_char ("The eagle takes off from your shoulder and flies away.\n\r",
victim);
act ("The eagle takes off from $n's shoulder and flies away.", victim, NULL,
NULL, TO_ROOM);
send_to_char
("Your eagle companion flies down from the sky and returns to your shoulder.\n\r",
ch);
act
("The beautiful eagle flies down from the sky and returns to $n's shoulder.",
ch, NULL, NULL, TO_ROOM);
do_autosave (ch, "");
do_autosave (victim, "");
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just sent $p to you via an eagle.", ch, obj, victim, TO_VICT);
}
return;
}
void
do_pass (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
char buf[MSL];
CHAR_DATA *victim;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
{
do_huh (ch, "");
return;
}
if (ch->pcdata->wisdoms[ELF_AIR] < 2)
{
stc ("You need level 2 air to use this.\n\r", ch);
return;
}
if ((victim = get_char_world (ch, arg)) == NULL)
{
stc ("They arent here.\n\r", ch);
return;
}
if (is_inarena (victim))
return;
if (is_inarena (ch))
return;
if (travelsafe (ch, victim))
return;
if ((victim == ch) || victim->in_room == NULL)
{
stc ("You failed.\n\r", ch);
return;
}
if (!IS_NPC (victim) && !IS_IMMUNE (victim, IMM_SUMMON))
{
stc ("They dont want you close to them.\n\r", ch);
return;
}
if (IS_IMMORTAL (victim))
{
stc ("No stepping to Immortals.\n\r", ch);
act ("$n tried to step to you.", ch, NULL, victim, TO_VICT);
return;
}
// Use act will take care of mobs short descriptions etc, Corim
act ("You easily pass through the wilderness towards $N.", ch, NULL, victim,
TO_CHAR);
act ("$n disappears into the wilderness before you.", ch, NULL, NULL,
TO_ROOM);
char_from_room (ch);
char_to_room (ch, victim->in_room);
do_look (ch, "");
act ("You emerge from the wilderness infront of $N", ch, NULL, victim,
TO_CHAR);
act ("$n appears from the wilderness before $N.", ch, NULL, victim,
TO_NOTVICT);
act ("$n appears from the wilderness before you.", ch, NULL, victim,
TO_VICT);
return;
}
void
do_elfform (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if ((ch->pcdata->wisdoms[ELF_AIR] < 4))
{
send_to_char
("You need to be at 4 in the air wisdom to use that power.\n\r", ch);
return;
}
if (ch->stance[0] != -1)
do_stance (ch, "");
if (ch->mounted == IS_RIDING)
do_dismount (ch, "");
if (IS_AFFECTED (ch, AFF_POLYMORPH) && !IS_VAMPAFF (ch, VAM_DISGUISED))
{
send_to_char ("Not while polymorphed.\n\r", ch);
return;
}
if (!IS_SET (ch->polyaff, POLY_ELFFORM))
{
send_to_char ("Your body grows and distorts.\n\r", ch);
act ("$n's body grows and distorts.", ch, NULL, NULL, TO_ROOM);
SET_BIT (ch->affected_by, AFF_POLYMORPH);
SET_BIT (ch->vampaff, VAM_DISGUISED);
SET_BIT (ch->polyaff, POLY_ELFFORM);
free_string (ch->morph);
ch->morph = str_dup (get_form (ch));
return;
}
else if (IS_SET (ch->polyaff, POLY_ELFFORM))
{
send_to_char ("Your body shrinks and distorts.\n\r", ch);
act ("$n's body shrinks and distorts.", ch, NULL, NULL, TO_ROOM);
REMOVE_BIT (ch->polyaff, POLY_ELFFORM);
free_string (ch->morph);
ch->morph = str_dup (get_form (ch));
if (strlen (ch->morph) < 2)
{
REMOVE_BIT (ch->affected_by, AFF_POLYMORPH);
REMOVE_BIT (ch->vampaff, VAM_DISGUISED);
}
return;
}
return;
}
/***Earth***
*1. Elven Shield
*2. Bull Strength
*3. Poison Arrows
*4.
*5. Call upon the Earth
*/
void
do_elvenshield (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_EARTH] < 1)
{
send_to_char ("You need level 1 earth to use this power.\n\r", ch);
return;
}
if (!IS_IMMUNE (ch, IMM_SHIELDED))
{
send_to_char ("You shield your aura from those around you.\n\r", ch);
SET_BIT (ch->immune, IMM_SHIELDED);
return;
}
else
{
send_to_char ("You stop shielding your aura.\n\r", ch);
REMOVE_BIT (ch->immune, IMM_SHIELDED);
return;
}
return;
}
void
do_bullstrength (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_EARTH] < 2)
{
send_to_char ("You need level 2 earth to use Bull Strength.\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_MIGHT] < 1)
{
send_to_char ("You feel the strength of the bull rush through you.\n\r",
ch);
act ("$n seems to grow in size and prowess.", ch, NULL, NULL, TO_ROOM);
ch->pcdata->wisdoms[ELF_MIGHT] += 120;
return;
}
else if (ch->pcdata->wisdoms[ELF_MIGHT] < 120)
{
send_to_char ("You increase the length of the Bull Strength spell.\n\r",
ch);
ch->pcdata->wisdoms[ELF_MIGHT] += 120;
return;
}
else if (ch->pcdata->wisdoms[ELF_MIGHT] > 120)
{
send_to_char
("You can not lengthen the effect of this spell any more.\n\r", ch);
return;
}
return;
}
/***Spirit***
*1. Spiriteyes
*2. Spirit Sense
*3. Spirit Dust
*4. Slaying Arrows
*5. Call of the Spirits
*/
void
do_elfsight (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_SPIRIT] < 1)
{
send_to_char
("You must obtain at least level 1 in Spirit to use Elfsight.\n\r",
ch);
return;
}
if (IS_SET (ch->mflags, MAGE_PERCEPTION))
{
REMOVE_BIT (ch->mflags, MAGE_PERCEPTION);
REMOVE_BIT (ch->vampaff, VAM_NIGHTSIGHT);
REMOVE_BIT (ch->act, PLR_HOLYLIGHT);
REMOVE_BIT (ch->affected_by, AFF_SHADOWSIGHT);
stc ("Your vision returns to normal.\n\r", ch);
return;
}
SET_BIT (ch->mflags, MAGE_PERCEPTION);
SET_BIT (ch->vampaff, VAM_NIGHTSIGHT);
SET_BIT (ch->act, PLR_HOLYLIGHT);
SET_BIT (ch->affected_by, AFF_SHADOWSIGHT);
stc ("You call upon your elven heritage to enhance your vision.\n\r", ch);
return;
}
void
do_spiritsense (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
ROOM_INDEX_DATA *chroom;
ROOM_INDEX_DATA *victimroom;
DESCRIPTOR_DATA *d;
char arg[MIL];
char buf[MSL];
bool found = FALSE;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_SPIRIT] < 2)
{
send_to_char ("You need level 2 spirit to use this.\n\r", ch);
return;
}
act ("$n closes $s eyes and a look of concentration crosses $s face.", ch,
NULL, NULL, TO_ROOM);
if (arg[0] == '\0')
{
send_to_char
("You close your eyes and mentally survey the surrounding area.\n\r",
ch);
for (d = descriptor_list; d != NULL; d = d->next)
{
if (d->connected != CON_PLAYING)
continue;
if ((victim = d->character) == NULL)
continue;
if (IS_NPC (victim) || victim->in_room == NULL)
continue;
if (victim == ch)
continue;
if (!can_see (ch, victim))
continue;
if (IS_IMMORTAL (victim))
continue;
if (IS_AFFECTED (victim, AFF_POLYMORPH))
sprintf (buf, "(%s) %s: ", victim->name, victim->morph);
else
sprintf (buf, "%s: ", victim->name);
stc (buf, ch);
if (IS_SAINT (victim) && victim->monkab[HOLY] > 1
&& !IS_IMMORTAL (ch))
sprintf (buf, "(guarded by angel).");
else if (victim->in_room->area->plane == PLANE_PAND)
sprintf (buf,
"Unable to establish a lock on the victim\'s location.");
else if (!IS_IMMUNE (victim, IMM_SHIELDED))
sprintf (buf, "%s.", victim->in_room->name);
else if (IS_IMMORTAL (ch))
sprintf (buf, "%s.", victim->in_room->name);
else if (ch->lstatus >= 9)
sprintf (buf, "%s.", victim->in_room->name);
else
sprintf (buf, "(shielded).");
stc (buf, ch);
stc ("\n\r", ch);
found = TRUE;
}
if (!found)
send_to_char ("You cannot seem to locate anyone.\n\r", ch);
return;
}
if ((victim = get_char_world (ch, arg)) == NULL)
{
send_to_char ("You are unable to locate them.\n\r", ch);
return;
}
if (victim->in_room->area->plane == PLANE_PAND)
{
stc ("Unable to establish a lock on the victim\'s location.", ch);
return;
}
if (!IS_NPC (victim) && IS_IMMUNE (victim, IMM_SHIELDED)
&& !IS_ITEMAFF (ch, ITEMA_VISION) && !IS_IMMORTAL (ch))
{
if (ch->lstatus < 9)
{
send_to_char ("You are unable to locate them.\n\r", ch);
if (!IS_NPC (victim) && ch != victim
&& IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just failed to use spirit sense on you.", ch, NULL,
victim, TO_VICT);
}
if (IS_SAINT (victim) && victim->monkab[HOLY] > 1
&& !IS_IMMORTAL (ch))
{
free_string (victim->scryperp);
victim->scryperp = str_dup (ch->name);
victim->gangtime = number_range (5, 7);
guardian_message (victim);
act ("Do you want me to BRING $m to you master.", ch, NULL,
victim, TO_VICT);
}
}
return;
}
if (IS_IMMORTAL (victim) && !IS_NPC (victim))
{
stc ("Your are totaly unable to locate them.\n\r", ch);
act ("$n just tried to use Spirit Sense on you.", ch, NULL, victim,
TO_VICT);
return;
}
chroom = ch->in_room;
victimroom = victim->in_room;
char_from_room (ch);
char_to_room (ch, victimroom);
if (IS_AFFECTED (ch, AFF_SHADOWPLANE)
&& (!IS_AFFECTED (victim, AFF_SHADOWPLANE)))
{
REMOVE_BIT (ch->affected_by, AFF_SHADOWPLANE);
do_look (ch, "auto");
SET_BIT (ch->affected_by, AFF_SHADOWPLANE);
}
else if (!IS_AFFECTED (ch, AFF_SHADOWPLANE)
&& (IS_AFFECTED (victim, AFF_SHADOWPLANE)))
{
SET_BIT (ch->affected_by, AFF_SHADOWPLANE);
do_look (ch, "auto");
REMOVE_BIT (ch->affected_by, AFF_SHADOWPLANE);
}
else
do_look (ch, "auto");
char_from_room (ch);
char_to_room (ch, chroom);
if (!IS_NPC (victim) && ch != victim && IS_MORE (victim, MORE_GUARDIAN))
{
guardian_message (victim);
act ("$n just used spirit sense on you.", ch, NULL, victim, TO_VICT);
if (IS_SAINT (victim) && victim->monkab[HOLY] > 1 && !IS_IMMORTAL (ch))
{
free_string (victim->scryperp);
victim->scryperp = str_dup (ch->name);
victim->gangtime = number_range (5, 7);
guardian_message (victim);
act ("Do you want me to BRING $m to you master.", ch, NULL, victim,
TO_VICT);
}
if (IS_DRACONIAN (victim))
{
int dam = number_range (1000, 3000);
sprintf (buf,
"An Ancient Spirit Dragon breathes a blast of ghostly fire at you #7[#R%d#7]#n.\n\r",
dam);
stc (buf, ch);
sprintf (buf,
"Your Ancient Dragon Spirit breathes a blast of ghostly fire at $n #7[#R%d#7]#n.",
dam);
act (buf, ch, NULL, victim, TO_VICT);
act
("An Ancient Dragon Spirit breathes a blast of ghostly fire at $n.",
ch, NULL, NULL, TO_ROOM);
hurt_person (ch, ch, dam, 0);
}
}
return;
}
/***fire***
*1. Quickness
*2. Flaming Arrows
*3. Exploding Arrows
*4.
*5. Call upon the Flames
*/
void
do_quickness (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_FIRE] < 1)
{
send_to_char ("You need level 1 Fire to use Quickness.\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_HASTE] < 1)
{
send_to_char ("You movements takes on a supernatural quickness.\n\r",
ch);
act ("$n's movements takes on a supernatural quickness", ch, NULL, NULL,
TO_ROOM);
ch->pcdata->wisdoms[ELF_HASTE] += 120;
return;
}
else if (ch->pcdata->wisdoms[ELF_HASTE] < 120)
{
send_to_char ("You increase the length of the Quickness spell.\n\r",
ch);
ch->pcdata->wisdoms[ELF_HASTE] += 120;
return;
}
else if (ch->pcdata->wisdoms[ELF_HASTE] > 120)
{
send_to_char
("You can't lengthen the effect of this spell any more.\n\r", ch);
return;
}
return;
}
/***Water***
*1. Magical Aura
*2. Frost Arrows
*3. Wall of Water
*4.
*5. Call upon the Water
*/
/*Archery
*1. Bow/fletch
* Vnums 29627+
*2. Archer
*3. Proximity
*4. Not Coded
*5. Hail of Arrows
*/
void
do_bowcraft (CHAR_DATA * ch, char *argument)
{
char arg1[MIL];
char buf[MSL];
OBJ_INDEX_DATA *pObjIndex;
OBJ_INDEX_DATA *pObjIndex2;
OBJ_DATA *obj;
OBJ_DATA *obj2;
OBJ_DATA *part1;
OBJ_DATA *part2;
argument = one_argument (argument, arg1);
if (IS_NPC (ch))
return;
if (!IS_CREATOR (ch))
{
if (!IS_ELF (ch))
{
do_huh (ch, "");
return;
}
if (ch->pcdata->wisdoms[ELF_ARCHERY] < 1)
{
send_to_char ("You need level 1 Archery to use this.\n\r", ch);
return;
}
}
if (arg1[0] == '\0')
{
send_to_char ("Do you wish to Create or Upgrade a bow?\n\r", ch);
return;
}
else if (!str_cmp (arg1, "Create"))
{
if (IS_XX (ch, XX_ELFBOW) && !IS_IMMORTAL (ch))
{
send_to_char ("You can only make 1 bow.\n\r", ch);
return;
}
else
{
if (((part1 = get_part_carry (ch, 29636)) == NULL)
|| ((part2 = get_part_carry (ch, 29639)) == NULL))
{
send_to_char
("You need a Short Bow Handle and a String to make a bow.\n\r",
ch);
return;
}
else
{
if ((pObjIndex = get_obj_index (29648)) == NULL)
{
send_to_char ("Missing the bow, please inform Corim.\n\r",
ch);
return;
}
if ((pObjIndex2 = get_obj_index (29649)) == NULL)
{
send_to_char ("Missing quiver, please inform Corim.\n\r",
ch);
return;
}
obj = create_object (pObjIndex, 50);
obj2 = create_object (pObjIndex2, 50);
SET_BIT (obj->quest, QUEST_RELIC);
SET_BIT (obj2->quest, QUEST_RELIC);
obj->level = 100;
obj2->level = 200;
free_string (obj->short_descr);
obj->short_descr = str_dup ("#GE#glven #Gs#ghort #Gb#gow#n");
free_string (obj->description);
obj->description = str_dup ("#GE#glven #Gs#ghort #Gb#gow#n");
free_string (obj->questowner);
free_string (obj2->questowner);
obj->questowner = str_dup (ch->name);
obj2->questowner = str_dup (ch->name);
free_string (obj->creator);
free_string (obj2->creator);
sprintf (buf, "%s (Elven Bow)", ch->name);
obj->creator = str_dup (buf);
sprintf (buf, "%s (Quiver)", ch->name);
obj2->creator = str_dup (buf);
obj_to_char (obj, ch);
obj_to_char (obj2, ch);
obj_from_char (part1);
extract_obj (part1);
obj_from_char (part2);
extract_obj (part2);
obj->item_type = ITEM_BOW;
obj2->item_type = ITEM_QUIVER;
SET_BIT (obj->spectype, SITEM_ELF);
SET_BIT (obj2->spectype, SITEM_ELF);
act ("You carefully craft an #GE#glven#G s#ghort#G b#gow#n.",
ch, NULL, NULL, TO_CHAR);
act ("You see $n craft a strange looking bow.", ch, NULL, NULL,
TO_ROOM);
if (!IS_XX (ch, XX_ELFBOW))
SET_BIT (ch->xxbits, XX_ELFBOW);
return;
}
}
}
else if (!str_cmp (arg1, "Upgrade"))
{
if (!IS_SET (ch->xxbits, XX_ELFBOW))
{
stc
("You need to create a bow and quiver before you can upgrade them.\n\r",
ch);
return;
}
if (((obj = get_part_carry (ch, 29648)) == NULL)
|| ((obj2 = get_part_carry (ch, 29649)) == NULL))
{
stc
("You need to have your bow and quiver in your inventory to upgrade them.\n\r",
ch);
return;
}
if (obj->level == 100)
{
if ((part1 = get_part_carry (ch, 29637)) == NULL)
{
send_to_char
("You need a long bow handle to upgrade your bow.\n\r", ch);
return;
}
do_mclear (ch, "self");
do_remove (ch, "all");
if (ch->max_hit < 25000)
{
send_to_char
("You need 25000 life essence to upgrade your bow.\n\r", ch);
return;
}
else if (ch->max_mana < 25000)
{
send_to_char
("You need 25000 mystical power to upgrade your bow.\n\r",
ch);
return;
}
else if (ch->max_move < 25000)
{
send_to_char
("You need 25000 vitality to upgrade your bow.\n\r", ch);
return;
}
else
{
obj_from_char (part1);
extract_obj (part1);
obj->level = 200;
obj2->level = 400;
free_string (obj->name);
obj->name = str_dup ("elf long bow");
free_string (obj->short_descr);
obj->short_descr = str_dup ("#GE#glven #Gl#gong #Gb#gow#n");
free_string (obj->description);
obj->description = str_dup ("#GE#glven #Gl#gong #Gb#gow#n");
act
("You carefully remove the string and extend the length of the handle on your #GE#glven #Gs#ghort #Gb#gow#n.",
ch, NULL, NULL, TO_CHAR);
act
("You see $n extend the handle on thier bow before restringing it.",
ch, NULL, NULL, TO_ROOM);
}
}
else if (obj->level == 200)
{
if ((part1 = get_part_carry (ch, 29638)) == NULL)
{
send_to_char
("You need a piece of bone to upgrade your bow.\n\r", ch);
return;
}
do_mclear (ch, "self");
do_remove (ch, "all");
if (ch->max_hit < 50000)
{
send_to_char
("You need 50000 life essence to upgrade your bow.\n\r", ch);
return;
}
else if (ch->max_mana < 50000)
{
send_to_char
("You need 50000 mystical power to upgrade your bow.\n\r",
ch);
return;
}
else if (ch->max_move < 50000)
{
send_to_char
("You need 50000 vitality to upgrade your bow.\n\r", ch);
return;
}
else
{
obj_from_char (part1);
extract_obj (part1);
obj->level = 300;
obj2->level = 600;
free_string (obj->name);
obj->name = str_dup ("elf composite bow");
free_string (obj->short_descr);
obj->short_descr =
str_dup ("#GE#glven #Gc#gomposite #Gb#gow#n");
free_string (obj->description);
obj->description =
str_dup ("#GE#glven #Gc#gomposite #Gb#gow#n");
act
("You cautiously apply the bone to your #GE#glven #Gl#gong #Gb#gow#n.",
ch, NULL, NULL, TO_CHAR);
act ("You watch in interest while $n adds bone to thier bow.",
ch, NULL, NULL, TO_ROOM);
}
}
else if (obj->level == 300)
{
if ((part1 = get_part_carry (ch, 29640)) == NULL)
{
send_to_char
("You need a pair of pulleys to upgrade your bow.\n\r", ch);
return;
}
do_mclear (ch, "self");
do_remove (ch, "all");
if (ch->max_hit < 75000)
{
send_to_char
("You need 75000 life essence to upgrade your bow.\n\r", ch);
return;
}
else if (ch->max_mana < 75000)
{
send_to_char
("You need 75000 mystical power to upgrade your bow.\n\r",
ch);
return;
}
else if (ch->max_move < 75000)
{
send_to_char
("You need 75000 vitality to upgrade your bow.\n\r", ch);
return;
}
else
{
obj_from_char (part1);
extract_obj (part1);
obj->level = 400;
obj2->level = 800;
free_string (obj->name);
obj->name = str_dup ("elf compound bow");
free_string (obj->short_descr);
obj->short_descr = str_dup ("#GE#glven #Gc#gompound #Gb#gow#n");
free_string (obj->description);
obj->description = str_dup ("#GE#glven #Gc#gompound #Gb#gow#n");
act
("You meticulously add pulleys to the ends of your #GE#glven# #Gc#gomposite #Gb#gow#n.",
ch, NULL, NULL, TO_CHAR);
act ("You watch in awe as $n attaches pulleys to thier bow.",
ch, NULL, NULL, TO_ROOM);
}
}
else if (obj->level == 400)
{
do_mclear (ch, "self");
do_remove (ch, "all");
if (ch->max_hit < 100000)
{
send_to_char
("You need 100000 life essence to upgrade your bow.\n\r", ch);
return;
}
else if (ch->max_mana < 100000)
{
send_to_char
("You need 100000 mystical power to upgrade your bow.\n\r",
ch);
return;
}
else if (ch->max_move < 100000)
{
send_to_char
("You need 100000 vitality to upgrade your bow.\n\r", ch);
return;
}
else if (ch->practice < 1000)
{
send_to_char
("You need 1000 primal to upgrade your bow.\n\r", ch);
return;
}
else
{
obj->level = 500;
obj2->level = 1000;
free_string (obj->name);
obj->name = str_dup ("elf mystical bow");
free_string (obj->short_descr);
obj->short_descr =
str_dup ("#lM#Lys#7ti#Lca#ll #GE#glve#Gn #GB#go#Gw#n");
free_string (obj->description);
obj->description =
str_dup ("#lM#Lys#7ti#Lca#ll #GE#glve#Gn #GB#go#Gw#n");
act
("You call upon the forces of magic to enhance your #lM#Lys#7ti#Lca#ll #GE#glve#Gn #GB#go#Gw.",
ch, NULL, NULL, TO_CHAR);
act ("You watch in awe as $n attains the final bow upgrade.",
ch, NULL, NULL, TO_ROOM);
}
}
else if (obj->level == 500)
{
send_to_char ("You can not upgrade your bow any more.\n\r", ch);
return;
}
else
{
send_to_char
("Your bow is bugged, please note immortal immediatly.\n\r", ch);
return;
}
}
return;
}
void
do_fletch (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
OBJ_INDEX_DATA *pObjIndex;
OBJ_DATA *obj;
OBJ_DATA *part1;
OBJ_DATA *part2;
OBJ_DATA *part3;
OBJ_DATA *part4;
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_CREATOR (ch))
{
if (!IS_ELF (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_ARCHERY] < 1)
{
send_to_char ("You need level 1 Archery to use this.\n\r", ch);
return;
}
}
if (arg[0] == '\0')
{
send_to_char ("Please select the type of arrows you wish to make.\n\r",
ch);
send_to_char
("Normal, #pLightning#n, #gPoison#n, #ySlaying#n, #rFlaming#n, #RExploding#n, #LFrost#n.\n\r",
ch);
return;
}
part1 = get_part_carry (ch, 29627);
part2 = get_part_carry (ch, 29628);
part3 = get_part_carry (ch, 29629);
if (!str_cmp (arg, "Normal"))
{
if (part1 == NULL || part2 == NULL || part3 == NULL)
{
send_to_char
("You need arrow shafts, feathers, and arrowheads to make this type of arrow.\n\r",
ch);
return;
}
else
{
if ((pObjIndex = get_obj_index (29641)) == NULL)
{
stc ("Missing object, tell Corim!\n\r", ch);
return;
}
obj_from_char (part1);
extract_obj (part1);
obj_from_char (part2);
extract_obj (part2);
obj_from_char (part3);
extract_obj (part3);
obj = create_object (pObjIndex, 50);
obj_to_char (obj, ch);
send_to_char ("You make some arrows.\n\r", ch);
obj->value[0] = number_range (15, 25);
free_string (obj->questowner);
obj->questowner = str_dup (ch->name);
free_string (obj->creator);
obj->creator = str_dup (ch->name);
}
}
else if (!str_cmp (arg, "Lightning"))
{
if (ch->pcdata->wisdoms[ELF_AIR] < 3)
{
send_to_char ("You need level 3 Air to make this arrow.\n\r", ch);
return;
}
if (part1 == NULL
|| part2 == NULL
|| part3 == NULL || ((part4 = get_part_carry (ch, 29630)) == NULL))
{
send_to_char
("You need arrow shafts, feathers, arrowheads, and lightning element to make this type of arrow.\n\r",
ch);
return;
}
else
{
if ((pObjIndex = get_obj_index (29642)) == NULL)
{
stc ("Missing object, tell Corim!\n\r", ch);
return;
}
obj_from_char (part1);
extract_obj (part1);
obj_from_char (part2);
extract_obj (part2);
obj_from_char (part3);
extract_obj (part3);
obj_from_char (part4);
extract_obj (part4);
obj = create_object (pObjIndex, 50);
obj_to_char (obj, ch);
send_to_char ("You make some #plightning#n arrows.\n\r", ch);
obj->value[0] = number_range (15, 25);
free_string (obj->questowner);
obj->questowner = str_dup (ch->name);
free_string (obj->creator);
obj->creator = str_dup (ch->name);
}
}
else if (!str_cmp (arg, "Poison"))
{
if (ch->pcdata->wisdoms[ELF_EARTH] < 3)
{
send_to_char ("You need level 3 Earth to make this arrow.\n\r", ch);
return;
}
if (part1 == NULL
|| part2 == NULL
|| part3 == NULL || ((part4 = get_part_carry (ch, 29631)) == NULL))
{
send_to_char
("You need arrow shafts, feathers, arrowheads, and nightshade to make this type of arrow.\n\r",
ch);
return;
}
else
{
if ((pObjIndex = get_obj_index (29643)) == NULL)
{
stc ("Missing object, tell Corim!\n\r", ch);
return;
}
obj_from_char (part1);
extract_obj (part1);
obj_from_char (part2);
extract_obj (part2);
obj_from_char (part3);
extract_obj (part3);
obj_from_char (part4);
extract_obj (part4);
obj = create_object (pObjIndex, 50);
obj_to_char (obj, ch);
send_to_char ("You make some #gpoison#n arrows.\n\r", ch);
obj->value[0] = number_range (15, 25);
free_string (obj->questowner);
obj->questowner = str_dup (ch->name);
free_string (obj->creator);
obj->creator = str_dup (ch->name);
}
}
else if (!str_cmp (arg, "Slaying"))
{
if (ch->pcdata->wisdoms[ELF_SPIRIT] < 4)
{
send_to_char ("You need level 4 Spirit to make this arrow.\n\r",
ch);
return;
}
if (part1 == NULL
|| part2 == NULL
|| part3 == NULL || ((part4 = get_part_carry (ch, 29632)) == NULL))
{
send_to_char
("You need arrow shafts, feathers, arrowheads, and a honing stone to make this type of arrow.\n\r",
ch);
return;
}
else
{
if ((pObjIndex = get_obj_index (29644)) == NULL)
{
stc ("Missing object, tell Corim!\n\r", ch);
return;
}
obj_from_char (part1);
extract_obj (part1);
obj_from_char (part2);
extract_obj (part2);
obj_from_char (part3);
extract_obj (part3);
obj_from_char (part4);
extract_obj (part4);
obj = create_object (pObjIndex, 50);
obj_to_char (obj, ch);
send_to_char ("You make some #yslaying#n arrows.\n\r", ch);
obj->value[0] = number_range (15, 25);
free_string (obj->questowner);
obj->questowner = str_dup (ch->name);
free_string (obj->creator);
obj->creator = str_dup (ch->name);
}
}
else if (!str_cmp (arg, "Flaming"))
{
if (ch->pcdata->wisdoms[ELF_FIRE] < 2)
{
send_to_char ("You need level 2 Fire to make this arrow.\n\r", ch);
return;
}
if (part1 == NULL
|| part2 == NULL
|| part3 == NULL || ((part4 = get_part_carry (ch, 29633)) == NULL))
{
send_to_char
("You need arrow shafts, feathers, arrowheads, and sulphur to make this type of arrow.\n\r",
ch);
return;
}
else
{
if ((pObjIndex = get_obj_index (29645)) == NULL)
{
stc ("Missing object, tell Corim!\n\r", ch);
return;
}
obj_from_char (part1);
extract_obj (part1);
obj_from_char (part2);
extract_obj (part2);
obj_from_char (part3);
extract_obj (part3);
obj_from_char (part4);
extract_obj (part4);
obj = create_object (pObjIndex, 50);
obj_to_char (obj, ch);
send_to_char ("You make some #rfire#n arrows.\n\r", ch);
obj->value[0] = number_range (15, 25);
free_string (obj->questowner);
obj->questowner = str_dup (ch->name);
free_string (obj->creator);
obj->creator = str_dup (ch->name);
}
}
else if (!str_cmp (arg, "Exploding"))
{
if (ch->pcdata->wisdoms[ELF_FIRE] < 3)
{
send_to_char ("You need level 3 Fire to make this arrow.\n\r", ch);
return;
}
if (part1 == NULL
|| part2 == NULL
|| part3 == NULL || ((part4 = get_part_carry (ch, 29634)) == NULL))
{
send_to_char
("You need arrow shafts, feathers, arrowheads, and gunpowder to make this type of arrow.\n\r",
ch);
return;
}
else
{
if ((pObjIndex = get_obj_index (29646)) == NULL)
{
stc ("Missing object, tell Corim!\n\r", ch);
return;
}
obj_from_char (part1);
extract_obj (part1);
obj_from_char (part2);
extract_obj (part2);
obj_from_char (part3);
extract_obj (part3);
obj_from_char (part4);
extract_obj (part4);
obj = create_object (pObjIndex, 50);
obj_to_char (obj, ch);
send_to_char ("You make some #Rexploding#n arrows.\n\r", ch);
obj->value[0] = number_range (15, 25);
free_string (obj->questowner);
obj->questowner = str_dup (ch->name);
free_string (obj->creator);
obj->creator = str_dup (ch->name);
}
}
else if (!str_cmp (arg, "Frost"))
{
if (ch->pcdata->wisdoms[ELF_WATER] < 2)
{
send_to_char ("You need level 2 Water to make this arrow.\n\r", ch);
return;
}
if (part1 == NULL
|| part2 == NULL
|| part3 == NULL || ((part4 = get_part_carry (ch, 29635)) == NULL))
{
send_to_char
("You need arrow shafts, feathers, arrowheads, and ice element to make this type of arrow.\n\r",
ch);
return;
}
else
{
if ((pObjIndex = get_obj_index (29647)) == NULL)
{
stc ("Missing object, tell Corim!\n\r", ch);
return;
}
obj_from_char (part1);
extract_obj (part1);
obj_from_char (part2);
extract_obj (part2);
obj_from_char (part3);
extract_obj (part3);
obj_from_char (part4);
extract_obj (part4);
obj = create_object (pObjIndex, 50);
obj_to_char (obj, ch);
send_to_char ("You make some #Lfrost#n arrows.\n\r", ch);
obj->value[0] = number_range (15, 25);
free_string (obj->questowner);
obj->questowner = str_dup (ch->name);
free_string (obj->creator);
obj->creator = str_dup (ch->name);
}
}
else
{
send_to_char ("Please select the type of arrows you wish to make.\n\r",
ch);
send_to_char
("Normal, #pLightning#n, #gPoison#n, #ySlaying#n, #rFlaming#n, #RExploding#n, #LFrost#n.\n\r",
ch);
return;
}
return;
}
void
do_archer (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
CHAR_DATA *victim;
CHAR_DATA *vch;
CHAR_DATA *vch_next;
OBJ_DATA *obj;
OBJ_DATA *quiver;
OBJ_DATA *obj2;
AFFECT_DATA af;
char buf[MIL];
int atype, dam, number_hit, sn, damkind, critical;
ROOM_INDEX_DATA *old_room;
if (IS_NPC (ch))
return;
argument = one_argument (argument, arg);
if (!IS_ELF (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_ARCHERY] < 2)
{
send_to_char ("You must have level 2 Archery to use this\n\r", ch);
return;
}
quiver = get_eq_char (ch, WEAR_QUIVER);
if (quiver == NULL)
{
stc ("You arnt wearing your quiver!\n\r", ch);
return;
}
if ((obj2 = get_eq_char (ch, WEAR_WIELD)) == NULL)
{
if ((obj2 = get_eq_char (ch, WEAR_HOLD)) == NULL)
{
stc ("You arnt wearing your bow!\n\r", ch);
return;
}
}
if (obj2->item_type != ITEM_BOW)
{
stc ("You arnt wearing your bow!\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_ARROW] == ANORMAL && quiver->arrows[0] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == ALIGHTNING
&& quiver->arrows[1] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == APOISON
&& quiver->arrows[2] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == ASLAYING
&& quiver->arrows[3] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == AFLAMING
&& quiver->arrows[4] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == AEXPLODE
&& quiver->arrows[5] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == AFROST && quiver->arrows[6] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == ANONE)
{
stc ("You havent set your arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == AFROST)
{
atype = 6;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == AEXPLODE)
{
atype = 5;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == AFLAMING)
{
atype = 4;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == ASLAYING)
{
atype = 3;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == APOISON)
{
atype = 2;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == ALIGHTNING)
{
atype = 1;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == ANORMAL)
{
atype = 0;
}
else
{
stc ("Bug, please inform Linksys\n\r", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
if ((victim = get_char_area (ch, arg)) == NULL)
{
send_to_char ("You can't find your victim anywhere.\n\r", ch);
return;
}
}
if (IS_NPC (victim))
{
send_to_char ("Not on mobs.\n\r", ch);
return;
}
// dam = ch->max_move / 4;
// dam += number_range (150, 600);
if (obj2->level == 100)
{
// if (dam > 3000)
dam = 3000 + number_range (150, 1200);
}
else if (obj2->level == 200)
{
// if (dam > 5000)
dam = 5000 + number_range (150, 1200);
}
else if (obj2->level == 300)
{
// if (dam > 7000)
dam = 7000 + number_range (150, 1200);
}
else if (obj2->level == 400)
{
// if (dam > 10000)
dam = 10000 + number_range (150, 1200);
}
else if (obj2->level == 500)
{
// if (dam > 15000)
dam = 15000 + number_range (150, 1200);
}
dam *= 1.5;
if (IS_AFFECTED (victim, AFF_SANCTUARY) && dam > 1)
dam /= 2;
if (IS_AFFECTED (victim, AFF_PROTECT) && IS_EVIL (ch) && dam > 1)
dam -= dam * 0.25;
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLEDAMCAP)
&& IS_NPC (victim))
dam *= 2;
if (global_safe (ch, victim))
return;
sprintf (buf, "You shoot an arrow at $N.");
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "Your arrow strikes $N hard #r[#R%d#r]#n.", dam);
act (buf, ch, NULL, victim, TO_CHAR);
if (!IS_NPC (victim) && victim != NULL)
{
sprintf (buf, "An arrow strikes you hard in the chest #r[#R%d#r]#n.",
dam);
act (buf, ch, NULL, victim, TO_VICT);
}
sprintf (buf, "An arrow strikes $N hard in the chest.");
act (buf, ch, NULL, victim, TO_NOTVICT);
if (ch->pcdata->wisdoms[ELF_ARROW] != AEXPLODE)
{
// damage (ch, victim, dam, sn, DAM_COLD, FALSE, TRUE, TRUE);
hurt_person (ch, victim, dam, TRUE);
update_pos (victim);
}
if (!IS_NPC (victim) && ch->pcdata->wisdoms[ELF_ARROW] == ASLAYING
&& !limbsafe (ch, victim))
{
critical = number_range (1, 4);
if (number_percent () <= 75)
{
if (critical == 1)
{
if (IS_ARM_R (victim, LOST_ARM))
return;
if (!IS_ARM_R (victim, LOST_ARM))
SET_BIT (victim->loc_hp[3], LOST_ARM);
if (!IS_BLEEDING (victim, BLEEDING_ARM_R))
SET_BIT (victim->loc_hp[6], BLEEDING_ARM_R);
if (IS_BLEEDING (victim, BLEEDING_HAND_R))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_HAND_R);
sprintf (buf, "The slaying arrow blows your right arm off.");
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "The slaying arrow blows $N's right arm off.");
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "The slaying arrow blows $N's right arm off.");
act (buf, ch, NULL, victim, TO_NOTVICT);
make_part (victim, "arm");
if ((obj = get_eq_char (victim, WEAR_ARMS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_WIELD)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_HANDS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_WRIST_R)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_FINGER_R)) != NULL)
take_item (victim, obj);
}
else if (critical == 2)
{
if (IS_ARM_L (victim, LOST_ARM))
return;
if (!IS_ARM_L (victim, LOST_ARM))
SET_BIT (victim->loc_hp[2], LOST_ARM);
if (!IS_BLEEDING (victim, BLEEDING_ARM_L))
SET_BIT (victim->loc_hp[6], BLEEDING_ARM_L);
if (IS_BLEEDING (victim, BLEEDING_HAND_L))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_HAND_L);
sprintf (buf, "The slaying arrow blows your left arm off.");
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "The slaying arrow blows $N's left arm off.");
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "The slaying arrow blows $N's left arm off.");
act (buf, ch, NULL, victim, TO_NOTVICT);
make_part (victim, "arm");
if ((obj = get_eq_char (victim, WEAR_ARMS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_HOLD)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_HANDS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_WRIST_L)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_FINGER_L)) != NULL)
take_item (victim, obj);
}
else if (critical == 3)
{
if (IS_LEG_L (victim, LOST_LEG))
return;
SET_BIT (victim->loc_hp[4], LOST_LEG);
if (IS_BLEEDING (victim, BLEEDING_FOOT_L))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_FOOT_L);
sprintf (buf, "The slaying arrow blows your left leg off.");
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "The slaying arrow blows $N's left leg off.");
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "The slaying arrow blows $N's left leg off.");
act (buf, ch, NULL, victim, TO_NOTVICT);
make_part (victim, "leg");
if (IS_LEG_L (victim, LOST_LEG) && IS_LEG_R (victim, LOST_LEG))
{
if ((obj = get_eq_char (victim, WEAR_LEGS)) != NULL)
take_item (victim, obj);
}
if ((obj = get_eq_char (victim, WEAR_FEET)) != NULL)
take_item (victim, obj);
}
else if (critical == 4)
{
if (IS_LEG_R (victim, LOST_LEG))
return;
SET_BIT (victim->loc_hp[5], LOST_LEG);
if (IS_BLEEDING (victim, BLEEDING_FOOT_R))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_FOOT_R);
sprintf (buf, "The slaying arrow blows your right leg off.");
act (buf, ch, NULL, victim, TO_VICT);
sprintf (buf, "The slaying arrow blows $N's right leg off.");
act (buf, ch, NULL, victim, TO_CHAR);
sprintf (buf, "The slaying arrow blows $N's right leg off.");
act (buf, ch, NULL, victim, TO_NOTVICT);
make_part (victim, "leg");
if (IS_LEG_L (victim, LOST_LEG) && IS_LEG_R (victim, LOST_LEG))
{
if ((obj = get_eq_char (victim, WEAR_LEGS)) != NULL)
take_item (victim, obj);
}
if ((obj = get_eq_char (victim, WEAR_FEET)) != NULL)
take_item (victim, obj);
}
}
}
if (ch->in_room->vnum != victim->in_room->vnum)
stop_fighting (ch, TRUE);
waiting (ch, 10);
if (ch->pcdata->wisdoms[ELF_ARROW] == APOISON && !saves_spell (200, victim))
{
spell_poison (gsn_poison, 25, ch, victim);
}
if (!IS_NPC (victim) && ch->pcdata->wisdoms[ELF_ARROW] == ALIGHTNING)
{
if (number_range (1, 100) <= 25)
{
act
("Lightning strikes your arrow just as it hits $N, knocking $M unconscious.",
ch, NULL, victim, TO_CHAR);
act
("Lightning strikes the arrow just as it hits $N, knocking $M unconscious.",
ch, NULL, victim, TO_NOTVICT);
act
("You feel a odd tingling sensation as lightning strikes the arrow $n shot at you, then all you can see are stars.",
ch, NULL, victim, TO_VICT);
stop_fighting (victim, TRUE);
victim->position = POS_STUNNED;
}
}
if (!IS_AFFECTED (victim, AFF_FLAMING)
&& ch->pcdata->wisdoms[ELF_ARROW] == AFLAMING && !IS_NPC (victim))
{
send_to_char ("You are engulfed in flames!\n\r", victim);
act ("$n is engulfed in flames!", victim, NULL, NULL, TO_ROOM);
SET_BIT (victim->affected_by, AFF_FLAMING);
}
if (ch->pcdata->wisdoms[ELF_ARROW] == AFROST && number_range (1, 100) <= 25)
waiting (victim, 16);
quiver->arrows[atype]--;
victim->fight_timer = 30;
return;
}
void
do_hailofarrows (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *vch;
CHAR_DATA *vch_next;
OBJ_DATA *obj;
OBJ_DATA *obj2;
int number_hit, atype;
char buf[MSL];
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_ARCHERY] < 5)
{
send_to_char ("You need level 5 archery to use hail of arrows.\n\r",
ch);
return;
}
obj = get_eq_char (ch, WEAR_QUIVER);
if (obj == NULL)
{
stc ("You arnt wearing your quiver!\n\r", ch);
return;
}
if ((obj2 = get_eq_char (ch, WEAR_WIELD)) == NULL
|| obj2->item_type != ITEM_BOW)
{
if ((obj2 = get_eq_char (ch, WEAR_HOLD)) == NULL
|| obj2->item_type != ITEM_BOW)
{
stc ("You arnt wearing your bow!\n\r", ch);
return;
}
}
if (obj2->item_type != ITEM_BOW)
{
stc ("You arnt wearing your bow!\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_ARROW] == ANORMAL && obj->arrows[0] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == ALIGHTNING
&& obj->arrows[1] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == APOISON && obj->arrows[2] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == ASLAYING && obj->arrows[3] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == AFLAMING && obj->arrows[4] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == AEXPLODE && obj->arrows[5] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == AFROST && obj->arrows[6] <= 0)
{
stc ("You don't have any of that type of arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == ANONE)
{
stc ("You havent set your arrows!\n\r", ch);
return;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == AFROST)
{
atype = 6;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == AEXPLODE)
{
atype = 5;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == AFLAMING)
{
atype = 4;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == ASLAYING)
{
atype = 3;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == APOISON)
{
atype = 2;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == ALIGHTNING)
{
atype = 1;
}
else if (ch->pcdata->wisdoms[ELF_ARROW] == ANORMAL)
{
atype = 0;
}
else
{
stc ("Bug, please inform Linksys\n\r", ch);
return;
}
act ("You shoot arrows into the room trying to kill anything that moves.",
ch, NULL, NULL, TO_CHAR);
act ("$n goes crazy and shoots arrows at everything that moves.", ch, NULL,
NULL, TO_ROOM);
number_hit = 0;
for (vch = char_list; vch != NULL; vch = vch_next)
{
vch_next = vch->next;
if (vch->in_room == NULL)
continue;
if (!IS_NPC (vch))
continue;
if (ch == vch)
continue;
if (number_hit > 10)
continue;
if (obj->arrows[0] <= 0)
continue;
if (vch->in_room == ch->in_room)
{
if (can_see (ch, vch))
{
one_hit (ch, vch, gsn_elvenarrow, 0, 0, FALSE);
one_hit (ch, vch, gsn_elvenarrow, 0, 0, FALSE);
one_hit (ch, vch, gsn_elvenarrow, 0, 0, FALSE);
one_hit (ch, vch, gsn_elvenarrow, 0, 0, FALSE);
number_hit++;
}
}
}
obj->arrows[atype]--;
waiting (ch, 15);
return;
}
void
place_arrow (CHAR_DATA * ch, OBJ_DATA * quiver, OBJ_DATA * arrow)
{
char buf[MSL];
char type[MSL];
int value = 0, total = 0, extra = 0;
int t1 = 0, t2 = 0, t3 = 0, t4 = 0;
int t5 = 0, t6 = 0, t7 = 0, room = 0;
bool empty = TRUE;
if (quiver->item_type != ITEM_QUIVER)
return;
if (arrow->item_type != ITEM_ARROW)
return;
value = arrow->value[0];
t1 = quiver->arrows[0];
t2 = quiver->arrows[1];
t3 = quiver->arrows[2];
t4 = quiver->arrows[3];
t5 = quiver->arrows[4];
t6 = quiver->arrows[5];
t7 = quiver->arrows[6];
total = t1 + t2 + t3 + t4 + t5 + t6 + t7;
if (total >= quiver->level)
{
act ("$p is already full of arrows.", ch, quiver, NULL, TO_CHAR);
return;
}
if ((total + value) >= quiver->level)
{
room = quiver->level;
room -= total;
extra = value - room;
value = room;
empty = FALSE;
}
if (arrow->pIndexData->vnum == 29641)
{
sprintf (type, "Elven");
quiver->arrows[0] += value;
}
else if (arrow->pIndexData->vnum == 29642)
{
sprintf (type, "#pLightning#n");
quiver->arrows[1] += value;
}
else if (arrow->pIndexData->vnum == 29643)
{
sprintf (type, "#gPoison#n");
quiver->arrows[2] += value;
}
else if (arrow->pIndexData->vnum == 29644)
{
sprintf (type, "#ySlaying#n");
quiver->arrows[3] += value;
}
else if (arrow->pIndexData->vnum == 29645)
{
sprintf (type, "#rFlaming#n");
quiver->arrows[4] += value;
}
else if (arrow->pIndexData->vnum == 29646)
{
sprintf (type, "#RExploding#n");
quiver->arrows[5] += value;
}
else if (arrow->pIndexData->vnum == 29647)
{
sprintf (type, "#LFrost#n");
quiver->arrows[6] += value;
}
else
{
stc ("Uknown arrow type. Tell Corim.\n\r", ch);
return;
}
sprintf (buf,
"You put %d %s arrows into your $p leaving %d left in the bundle.",
value, type, extra);
act (buf, ch, quiver, NULL, TO_CHAR);
act ("$n puts some arrows into $s $p.", ch, quiver, NULL, TO_ROOM);
if (!empty)
{
arrow->value[0] = extra;
}
else
{
extract_obj (arrow);
}
return;
}
void
show_quiver (CHAR_DATA * ch, OBJ_DATA * quiver)
{
char buf[MSL];
act ("$p contains:\n\r", ch, quiver, NULL, TO_CHAR);
if (quiver->arrows[0] > 0)
{
sprintf (buf, "Elven Arrows: %d.\n\r", quiver->arrows[0]);
stc (buf, ch);
}
if (quiver->arrows[1] > 0)
{
sprintf (buf, "#pLightning#n Arrows: %d.\n\r", quiver->arrows[1]);
stc (buf, ch);
}
if (quiver->arrows[2] > 0)
{
sprintf (buf, "#gPoison#n Arrows: %d.\n\r", quiver->arrows[2]);
stc (buf, ch);
}
if (quiver->arrows[3] > 0)
{
sprintf (buf, "#ySlaying#n Arrows: %d.\n\r", quiver->arrows[3]);
stc (buf, ch);
}
if (quiver->arrows[4] > 0)
{
sprintf (buf, "#rFlaming#n Arrows: %d.\n\r", quiver->arrows[4]);
stc (buf, ch);
}
if (quiver->arrows[5] > 0)
{
sprintf (buf, "#RExploding#n Arrows: %d.\n\r", quiver->arrows[5]);
stc (buf, ch);
}
if (quiver->arrows[6] > 0)
{
sprintf (buf, "#LFrost#n Arrows: %d.\n\r", quiver->arrows[6]);
stc (buf, ch);
}
sprintf (buf, "\n\r$p can hold %d Arrows.", quiver->level);
act (buf, ch, quiver, NULL, TO_CHAR);
return;
}
void
do_set_arrow (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->wisdoms[ELF_ARCHERY] < 2)
{
stc ("You must have level 2 archery to use this.\n\r", ch);
return;
}
/*
if (ch->fighting != NULL)
{
send_to_char ("Not while fighting!", ch);
return;
}*/
if (arg[0] == '\0')
{
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING))
send_to_char ("#7You have set your arrows to (#RFIRE#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING))
send_to_char
("#7You have set your arrows to (#yLIGHTNING#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], APOISON))
send_to_char
("#7You have set your arrows to (#CPOISON#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFROST))
send_to_char ("#7You have set your arrows to (#LFROST#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL))
send_to_char
("#7You have set your arrows to (#gNORMAL#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING))
send_to_char
("#7You have set your arrows to (#PSLAYING#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE))
send_to_char
("#7You have set your arrows to (#0EXPLODING#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANONE))
send_to_char ("#7You havent set your arrow type.#n\n\r", ch);
send_to_char ("#7You can set your arrow to the following types:#n\n\r",
ch);
send_to_char ("#7Syntax: setarrow <arrow>.#n\n\r", ch);
send_to_char ("#7None#n\n\r", ch);
send_to_char ("#PSlayingarrow#n\n\r", ch);
send_to_char ("#RFirearrow#n\n\r", ch);
send_to_char ("#yLightningarrow#n\n\r", ch);
send_to_char ("#gNormalarrow#n\n\r", ch);
send_to_char ("#CPoisonarrow#n\n\r", ch);
send_to_char ("#LFrostarrow#n\n\r", ch);
send_to_char ("#0EXPLODINGarrow#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "slayingarrow"))
{
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING))
{
send_to_char
("#7You already have your arrow set to slaying.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], APOISON))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], APOISON);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFROST))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFROST);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANONE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANONE);
SET_BIT (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING);
send_to_char ("#7You now shoot slaying arrows.#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "flamingarrow"))
{
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING))
{
send_to_char ("#7You are already shooting fire arrows.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], APOISON))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], APOISON);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFROST))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFROST);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANONE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANONE);
SET_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING);
send_to_char ("#7You now shoot fire arrows.#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "lightningarrow"))
{
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING))
{
send_to_char
("#7You are already shooting lightning arrows.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], APOISON))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], APOISON);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFROST))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFROST);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANONE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANONE);
SET_BIT (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING);
send_to_char ("#7You now shoot lightning arrows.#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "poisonarrow"))
{
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], APOISON))
{
send_to_char ("#7You are already shooting fire arrows.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFROST))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFROST);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANONE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANONE);
SET_BIT (ch->pcdata->wisdoms[ELF_ARROW], APOISON);
send_to_char ("#7You shoot poison arrows.#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "normalarrow"))
{
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL))
{
send_to_char ("#7You are shooting normal arrows.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], APOISON))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], APOISON);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFROST))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFROST);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANONE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANONE);
SET_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL);
send_to_char ("#7You shoot normal arrows.#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "frostarrow"))
{
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFROST))
{
send_to_char ("#7You are already freezing your victims.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], APOISON))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], APOISON);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANONE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANONE);
SET_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFROST);
send_to_char
("#7You will now freeze your opponents while fighting.#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "EXPLODINGarrow"))
{
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE))
{
send_to_char
("#7You are already shooting EXPLODING arrows.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], APOISON))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], APOISON);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFROST))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFROST);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANONE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANONE);
SET_BIT (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE);
send_to_char ("#7You will now shoot EXPLODING arrows.#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "none"))
{
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANONE))
{
send_to_char
("#7You are not yet shooting any type of arrow.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], APOISON))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], APOISON);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFROST))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AFROST);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING))
REMOVE_BIT (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING);
SET_BIT (ch->pcdata->wisdoms[ELF_ARROW], ANONE);
send_to_char ("#7You will no longer shoot any type of arrow.#n\n\r",
ch);
return;
}
else if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFLAMING))
send_to_char ("#7You have set your arrows to (#RFIRE#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ALIGHTNING))
send_to_char ("#7You have set your arrows to (#yLIGHTNING#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], APOISON))
send_to_char ("#7You have set your arrows to (#CPOISON#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANORMAL))
send_to_char ("#7You have set your arrows to (#gNORMAL#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AFROST))
send_to_char ("#7You have set your arrows to (#LFROST#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], AEXPLODE))
send_to_char ("#7You have set your arrows to (#0EXPLODING#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ASLAYING))
send_to_char ("#7You have set your arrows to (#PSLAYING#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->wisdoms[ELF_ARROW], ANONE))
send_to_char ("#7You havent set your arrow type.#n\n\r", ch);
send_to_char ("#7You can set your arrow to the following types:#n\n\r", ch);
send_to_char ("#7Syntax: setarrow <arrow>.#n\n\r", ch);
send_to_char ("#7None#n\n\r", ch);
send_to_char ("#PSlayingrrow#n\n\r", ch);
send_to_char ("#Rflamingarrow#n\n\r", ch);
send_to_char ("#yLightningarrow#n\n\r", ch);
send_to_char ("#gNormalarrow#n\n\r", ch);
send_to_char ("#gEXPLODINGarrow#n\n\r", ch);
send_to_char ("#LFrostarrow#n\n\r", ch);
send_to_char ("#0Poisonarrow#n\n\r", ch);
return;
}
void
surlisten (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
DESCRIPTOR_DATA *d;
char buf[MSL];
char name[MSL];
char class[MSL];
char hps[MSL];
if (IS_NPC (ch))
return;
stc ("You cup your hand to your ears, listening for intruders.\n\r", ch);
ch->serpent = 10;
for (d = descriptor_list; d != NULL; d = d->next)
{
if (d->connected == CON_PLAYING
&& (victim = d->character) != NULL
&& !IS_NPC (victim)
&& !IS_IMMORTAL (victim)
&& !is_same_group (victim, ch)
&& victim->in_room != NULL
&& victim->in_room->area == ch->in_room->area
&& victim->pcdata->chobj == NULL)
{
if (ch->in_room == victim->in_room)
{
if (can_see (victim, ch))
act_brief
("$n cups $s hands to $s ear, listening to $s surroundings.",
ch, NULL, victim, TO_VICT, PLR_BRIEF4);
if (!can_see (ch, victim))
sprintf (buf, "Someone is in the room with you.");
else
sprintf (buf, "#y%s#n is in the room with you.\n\r",
capitalize (victim->name));
}
else
{
if (!can_see (ch, victim))
sprintf (buf,
"Someone is stalking around somewhere in this area.");
else
sprintf (buf,
"#y%s#n is stalking around somewhere in this area.\n\r",
capitalize (victim->name));
}
stc (buf, ch);
}
}
return;
}
void
do_elflisten (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
{
do_huh (ch, "");
return;
}
if (ch->pcdata->wisdoms[ELF_EARTH] < 4)
{
send_to_char ("You haven't studyed your earth wisdom far enough.\n\r",
ch);
return;
}
if (IS_XX (ch, XX_ELFLISTEN))
{
stc ("You stop listening to your surroundings.\n\r", ch);
REMOVE_BIT (ch->xxbits, XX_ELFLISTEN);
return;
}
ch->serpent = 10;
SET_BIT (ch->xxbits, XX_ELFLISTEN);
stc ("You begin listening to your surroundings.\n\r", ch);
return;
}
void
elffog (CHAR_DATA * ch, char *argument)
{
DESCRIPTOR_DATA *d;
CHAR_DATA *victim;
char buf[MIL];
if (IS_NPC (ch))
return;
if (ch->in_room == NULL)
{
send_to_char ("Nothing happens.\n\r", ch);
return;
}
act ("A look of concentration crosses $n's face.", ch, NULL, NULL, TO_ROOM);
if (IS_SET (mudconfig->world_affects, WORLD_FOG))
{
send_to_char ("You banish the fog.\n\r", ch);
REMOVE_BIT (mudconfig->world_affects, WORLD_FOG);
for (d = descriptor_list; d != NULL; d = d->next)
{
if (d->connected != CON_PLAYING)
continue;
if ((victim = d->character) == NULL)
continue;
if (IS_NPC (victim))
continue;
if (victim->in_room == NULL)
continue;
if (ch == victim)
continue;
if (victim->in_room->sector_type == SECT_INSIDE)
continue;
if (ch->in_room == victim->in_room)
act ("$n holds up his arms and the fog disperses.", ch, NULL,
victim, TO_VICT);
else
send_to_char ("The fog disperses.\n\r", victim);
}
}
else
{
send_to_char ("You summon a thick blanket of fog.\n\r", ch);
SET_BIT (mudconfig->world_affects, WORLD_FOG);
for (d = descriptor_list; d != NULL; d = d->next)
{
if (d->connected != CON_PLAYING)
continue;
if ((victim = d->character) == NULL)
continue;
if (IS_NPC (victim))
continue;
if (victim->in_room == NULL)
continue;
if (ch == victim)
continue;
if (victim->in_room->sector_type == SECT_INSIDE)
continue;
if (ch->in_room == victim->in_room)
act
("$n holds up his arms and calls forth a thick blanket of fog.",
ch, NULL, victim, TO_VICT);
else
send_to_char ("A thick blanket of fog rises from the ground.\n\r",
victim);
}
}
return;
}
void
do_spiritdust (CHAR_DATA * ch, char *argument)
{
int i, test = 0;
if (IS_NPC (ch))
return;
if (!IS_ELF (ch))
return;
if (ch->pcdata->wisdoms[ELF_SPIRIT] < 3)
{
send_to_char ("You must have level 3 spirit to use spirit dust.\n\r",
ch);
return;
}
for (i = 0; i < 7; i++)
{
if (ch->loc_hp[i] > 0)
test++;
}
if (ch->hit == ch->max_hit && ch->mana == ch->max_mana
&& ch->move == ch->max_move && test == 0)
{
send_to_char ("You are in perfect condition!\n\r", ch);
return;
}
if (ch->loc_hp[6] > 0)
{
send_to_char ("Your wounds seal and stop #rbleeding#n.\n\r", ch);
ch->loc_hp[6] = 0;
}
if ((ch->loc_hp[0] + ch->loc_hp[1] + ch->loc_hp[2] + ch->loc_hp[3] +
ch->loc_hp[4] + ch->loc_hp[5]) != 0)
{
send_to_char
("Your bones mend themselves together and new limbs grow out of your body.\n\r",
ch);
ch->loc_hp[0] = 0;
ch->loc_hp[1] = 0;
ch->loc_hp[2] = 0;
ch->loc_hp[3] = 0;
ch->loc_hp[4] = 0;
ch->loc_hp[5] = 0;
}
send_to_char ("A warm feeling spreads through your body.\n\r", ch);
waiting (ch, 18);
return;
}
void
do_elfevolve (CHAR_DATA * ch, char *argument)
{
do_mclear (ch, "self");
if (IS_XXX (ch, XXX_CANPICK))
{
do_huh (ch, "");
return;
}
if (ch->max_hit < 100000 || ch->max_mana < 100000 || ch->max_move < 100000)
{
stc ("You dont have the requirements yet!\n\r", ch);
return;
}
SET_BIT (ch->xxxbits, XXX_CANPICK);
stc ("You may now specialize in a wisdom!\n\r", ch);
return;
}