/****************************************************************** * Jedi and Sith Class by Sebeq (C) 2004 for Eternal Darkness * * Please email me at Acadian_lord@hotmail.com if you find any * * bugs or questions about this class * ******************************************************************/ #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" #include "interp.h" #include "player.h" #include "magic.h" void do_jediarmor( CHAR_DATA *ch, char *argument ) { OBJ_INDEX_DATA *pObjIndex; OBJ_DATA *obj; char arg[MAX_INPUT_LENGTH]; int vnum = 0; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_JEDI)) { send_to_char("Huh?\n\r",ch); return; } if (arg[0] == '\0') { send_to_char("#RPlease specify what kind of equipment you want to make#7:#n\n\r", ch ); send_to_char("#RLightsaber#0,#R Belt#0,#R Robes#0,#R Cloak#0.#n\n\r", ch ); return; } if (!str_cmp(arg,"lightsaber")) vnum = number_range( 60200, 60204 ); else if (!str_cmp(arg,"belt")) vnum = 60206; else if (!str_cmp(arg,"robes")) vnum = 60207; else if (!str_cmp(arg,"cloak")) vnum = 60208; else { send_to_char("That is an invalid type.\n\r", ch ); return; } if ( ch->exp < 1000000000) { send_to_char("It costs 1bil exp to make a piece of jedi equipment.\n\r",ch); return; } if ( vnum == 0 || (pObjIndex = get_obj_index( vnum )) == NULL) { send_to_char("Missing object, please inform an Implementor.\n\r",ch); return; } ch->exp -= 1000000000; obj = create_object(pObjIndex, 50); obj->questowner = str_dup(ch->pcdata->switchname); obj_to_char(obj, ch); act("You mold the force into $p ",ch,obj,NULL,TO_CHAR); act("$p appears in $n's hands.",ch,obj,NULL,TO_ROOM); return; } void do_sitharmor( CHAR_DATA *ch, char *argument ) { OBJ_INDEX_DATA *pObjIndex; OBJ_DATA *obj; char arg[MAX_INPUT_LENGTH]; int vnum = 0; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_SITH)) { send_to_char("Huh?\n\r",ch); return; } if (arg[0] == '\0') { send_to_char("#RPlease specify what kind of equipment you want to make#7:#n\n\r", ch ); send_to_char("#RLightsaber#0,#R Belt#0,#R Robes#0,#R Cloak#0.#n\n\r", ch ); return; } if (!str_cmp(arg,"lightsaber")) vnum = number_range( 60209, 60213 ); else if (!str_cmp(arg,"belt")) vnum = 60215; else if (!str_cmp(arg,"robes")) vnum = 60216; else if (!str_cmp(arg,"cloak")) vnum = 60217; else { send_to_char("That is an invalid type.\n\r", ch ); return; } if ( ch->exp < 1000000000) { send_to_char("It costs 1bil exp to make a piece of sith equipment.\n\r",ch); return; } if ( vnum == 0 || (pObjIndex = get_obj_index( vnum )) == NULL) { send_to_char("Missing object, please inform an Implementor.\n\r",ch); return; } ch->exp -= 1000000000; obj = create_object(pObjIndex, 50); obj->questowner = str_dup(ch->pcdata->switchname); obj_to_char(obj, ch); act("You mold the force into $p ",ch,obj,NULL,TO_CHAR); act("$p appears in $n's hands.",ch,obj,NULL,TO_ROOM); return; } void do_student( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; char arg [MAX_INPUT_LENGTH]; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if( !IS_IMMORTAL(ch) ) { if( !IS_CLASS(ch, CLASS_JEDI )) { send_to_char( "Huh?\n\r", ch); return; } if( ch->pcdata->disc_a[jedirank] < J_MASTER) { send_to_char( "You must be Jedi Master to appoint a Student.\n\r", ch ); return; } if( ch->pcdata->disc_a[student] >= 5) { send_to_char( "You already have 5 Students.\n\r", ch ); return; } if (!IS_CLASS(ch, CLASS_JEDI)) { send_to_char( "Huh?\n\r",ch); return; } } if ( arg[0] == '\0' ) { send_to_char( "Make whom a Jedi?\n\r", ch ); return; } if ( ( victim = get_char_room( ch, arg ) ) == NULL ) { send_to_char( "They aren't here.\n\r", ch ); return; } if ( IS_NPC(victim) ) { send_to_char( "Not on NPC's.\n\r", ch ); return; } if ( ch == victim ) { send_to_char( "You cannot make yourself a Jedi.\n\r", ch ); return; } if ( victim->level != LEVEL_AVATAR && !IS_IMMORTAL(victim) ) { send_to_char( "You can only make Jedi's from avatars.\n\r", ch ); return; } if (IS_CLASS(victim, CLASS_DEMON) || IS_CLASS(victim, CLASS_DRAGON) || IS_CLASS(victim, CLASS_MAGE) || IS_CLASS(victim, CLASS_WEREWOLF) || IS_CLASS(victim, CLASS_VAMPIRE) || IS_CLASS(victim, CLASS_DROW) || IS_CLASS(victim, CLASS_NINJA) || IS_CLASS(victim, CLASS_MONK) || IS_CLASS(victim, CLASS_SAMURAI) || IS_CLASS(victim, CLASS_LICH) || IS_CLASS(victim, CLASS_SHAPESHIFTER) || IS_CLASS(victim, CLASS_TANARRI) || IS_CLASS(victim, CLASS_ANGEL) || IS_CLASS(victim, CLASS_UNDEAD_KNIGHT) || IS_CLASS(victim, CLASS_CYBORG) || IS_CLASS(victim, CLASS_JEDI) || IS_CLASS(victim, CLASS_SITH) || IS_CLASS(victim, CLASS_WRAITH) || IS_CLASS(victim, CLASS_TRUEMAGE) || IS_CLASS(victim, CLASS_ZOMBIE) ) { send_to_char( "They already have a class.\n\r", ch ); return; } if (ch->exp < 1000000000 ) { send_to_char("You need 1000000000 exp to Begin to teach them the Jedi Way.\n\r",ch); return; } if (victim->exp < 1000000000) { send_to_char("You need 1000000000 exp to be made a Jedi.\n\r",victim); send_to_char("They need 1000000000 exp to be made a Jedi.\n\r",ch); return; } act("You swear $N to the Jedi Way, and begin to teach them!", ch, NULL, victim, TO_CHAR); act("$N has sworn allegiance to $n the Jedi Way!", ch, NULL, victim, TO_NOTVICT); act("$n has sworn you to the Jedi Way!", ch, NULL, victim, TO_VICT); victim->class=CLASS_JEDI; victim->pcdata->disc_a[jedirank] = 1; victim->generation = 1; victim->special = 0; victim->level = LEVEL_AVATAR; ch->pcdata->disc_a[student] += 1; ch->pcdata->stats[DEMON_CURRENT] -= 5000000; ch->exp -= 50000000; victim->exp -= 5000000; save_char_obj(ch); save_char_obj(victim); return; } void do_allegiance( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; char arg [MAX_INPUT_LENGTH]; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if( !IS_IMMORTAL(ch) ) { if( !IS_CLASS(ch, CLASS_SITH ) ) { send_to_char( "Huh?\n\r", ch); return; } if( ch->pcdata->disc_a[sithrank] < S_LORD) { send_to_char( "You must be Sith Lord to appoint a Student.\n\r", ch ); return; } if( ch->pcdata->disc_a[student] >= 5) { send_to_char( "You already have 5 Students.\n\r", ch ); return; } if (!IS_CLASS(ch, CLASS_SITH)) { send_to_char( "Huh?\n\r",ch); return; } } if ( arg[0] == '\0' ) { send_to_char( "Make whom a Sith?\n\r", ch ); return; } if ( ( victim = get_char_room( ch, arg ) ) == NULL ) { send_to_char( "They aren't here.\n\r", ch ); return; } if ( IS_NPC(victim) ) { send_to_char( "Not on NPC's.\n\r", ch ); return; } if ( ch == victim ) { send_to_char( "You cannot make yourself a Sith.\n\r", ch ); return; } if ( victim->level != LEVEL_AVATAR && !IS_IMMORTAL(victim) ) { send_to_char( "You can only make Sith's from avatars.\n\r", ch ); return; } if (IS_CLASS(victim, CLASS_DEMON) || IS_CLASS(victim, CLASS_DRAGON) || IS_CLASS(victim, CLASS_MAGE) || IS_CLASS(victim, CLASS_WEREWOLF) || IS_CLASS(victim, CLASS_VAMPIRE) || IS_CLASS(victim, CLASS_DROW) || IS_CLASS(victim, CLASS_NINJA) || IS_CLASS(victim, CLASS_MONK) || IS_CLASS(victim, CLASS_SAMURAI) || IS_CLASS(victim, CLASS_LICH) || IS_CLASS(victim, CLASS_SHAPESHIFTER) || IS_CLASS(victim, CLASS_TANARRI) || IS_CLASS(victim, CLASS_ANGEL) || IS_CLASS(victim, CLASS_UNDEAD_KNIGHT) || IS_CLASS(victim, CLASS_CYBORG) || IS_CLASS(victim, CLASS_JEDI) || IS_CLASS(victim, CLASS_WRAITH) || IS_CLASS(victim, CLASS_TRUEMAGE) || IS_CLASS(victim, CLASS_ZOMBIE) ) { send_to_char( "They already have a class.\n\r", ch ); return; } if (ch->exp < 1000000000 ) { send_to_char("You need 1000000000 exp to Begin to teach them the Sith Way.\n\r",ch); return; } if (victim->exp < 1000000000) { send_to_char("You need 1000000000 exp to be made a Sith.\n\r",victim); send_to_char("They need 1000000000 exp to be made a Sith.\n\r",ch); return; } act("You swear $N to the Sith Way, and begin to teach them!", ch, NULL, victim, TO_CHAR); act("$N has sworn allegiance to $n the Sith Way!", ch, NULL, victim, TO_NOTVICT); act("$n has sworn you to the Sith Way!", ch, NULL, victim, TO_VICT); victim->class=CLASS_SITH; victim->pcdata->disc_a[sithrank] = 1; victim->generation = 1; victim->special = 0; victim->level = LEVEL_AVATAR; ch->pcdata->disc_a[student] += 1; ch->pcdata->stats[DEMON_CURRENT] -= 5000000; ch->exp -= 50000000; victim->exp -= 5000000; save_char_obj(ch); save_char_obj(victim); return; } void do_smature( CHAR_DATA *ch, char *argument ) { char buf[MAX_INPUT_LENGTH]; if( !IS_CLASS(ch, CLASS_SITH)) return; if(ch->pcdata->disc_a[sithrank] == 6) { sprintf( buf, "You cannot mature any further\n\r"); send_to_char( buf, ch ); return; } if(ch->pcdata->stats[DEMON_CURRENT] < (ch->pcdata->disc_a[sithrank] * 500000)) { sprintf( buf, "You need %d sith points to mature as a Sith \n\r", (ch->pcdata->disc_a[sithrank] * 500000)); send_to_char( buf, ch ); return; } if(ch->max_hit < (ch->pcdata->disc_a[sithrank] * 500000)) { sprintf( buf, "You need %d more hitpoints to mature as a Sith.\n\r", (ch->pcdata->disc_a[sithrank] * 500000)); send_to_char( buf, ch ); return; } if (IS_IMMORTAL(ch)) { ch->pcdata->disc_a[sithrank] = 7; return; } ch->pcdata->stats[DEMON_CURRENT] -= (ch->pcdata->disc_a[sithrank] * 500000); ch->pcdata->disc_a[sithrank] +=1; send_to_char( "You have matured as a Sith.\n\r", ch ); return; } void do_jmature( CHAR_DATA *ch, char *argument ) { char buf[MAX_INPUT_LENGTH]; if( !IS_CLASS(ch, CLASS_JEDI)) return; if(ch->pcdata->disc_a[jedirank] == 6) { sprintf( buf, "You cannot mature any further\n\r"); send_to_char( buf, ch ); return; } if(ch->pcdata->stats[DEMON_CURRENT] < (ch->pcdata->disc_a[jedirank] * 500000)) { sprintf( buf, "You need %d jedi points to mature as a Jedi \n\r", (ch->pcdata->disc_a[jedirank] * 500000)); send_to_char( buf, ch ); return; } if(ch->max_hit < (ch->pcdata->disc_a[jedirank] * 500000)) { sprintf( buf, "You need %d more hitpoints to mature as a Jedi.\n\r", (ch->pcdata->disc_a[jedirank] * 500000)); send_to_char( buf, ch ); return; } if (IS_IMMORTAL(ch)) { ch->pcdata->disc_a[jedirank] = 7; return; } ch->pcdata->stats[DEMON_CURRENT] -= (ch->pcdata->disc_a[jedirank] * 500000); ch->pcdata->disc_a[jedirank] +=1; send_to_char( "You have matured as a Jedi.\n\r", ch ); return; } void do_jediform( CHAR_DATA *ch, char *argument) { char buf[MAX_STRING_LENGTH]; char RANK_STRING [MAX_STRING_LENGTH]; if (IS_NPC(ch)) return; if( !IS_CLASS(ch, CLASS_JEDI)) { send_to_char( "Huh?\n\r",ch); return; } if (IS_POLYAFF(ch, POLY_JEDI)) { REMOVE_BIT(ch->polyaff, POLY_JEDI); REMOVE_BIT(ch->affected_by, AFF_POLYMORPH); act( "Your glow fades around you.", ch, NULL, NULL, TO_CHAR ); act( "$n's glow fades around them.", ch, NULL, NULL, TO_ROOM ); ch->max_hit = (ch->max_hit - (ch->pcdata->disc_a[jedirank] * 250)); if (ch->hit < 1) ch->hit = 1; ch->damroll -= ch->pcdata->disc_a[jedirank] * 500; ch->hitroll -= ch->pcdata->disc_a[jedirank] * 500; ch->armor += ch->pcdata->disc_a[jedirank] * 750; free_string( ch->morph ); ch->morph = str_dup( "" ); return; } else if (IS_AFFECTED(ch,AFF_POLYMORPH)) { send_to_char("You cant bring the force opon yourself when changed.\n\r",ch); return; } if (ch->pcdata->disc_a[jedirank] == 1 ) sprintf(RANK_STRING,"Padawan"); else if (ch->pcdata->disc_a[jedirank] == 2 ) sprintf(RANK_STRING,"Jedi Student"); else if (ch->pcdata->disc_a[jedirank] == 3 ) sprintf(RANK_STRING,"Jedi"); else if (ch->pcdata->disc_a[jedirank] == 4 ) sprintf(RANK_STRING,"Jedi Knight"); else if (ch->pcdata->disc_a[jedirank] == 5 ) sprintf(RANK_STRING,"Jedi Elder"); else if (ch->pcdata->disc_a[jedirank] == 6 ) sprintf(RANK_STRING,"Master Jedi"); else if (ch->pcdata->disc_a[jedirank] == 7 ) sprintf(RANK_STRING,"Immortal Jedi"); else return; switch(ch->pcdata->disc_a[jedirank]) { default: if (ch->pcdata->disc_a[jedirank] == 0) { send_to_char("Your glow is gone.\n\r",ch); } ch->pcdata->disc_a[jedirank] = number_range(1,6); do_jediform(ch,""); return; break; case 1: sprintf(buf, "%s the #L%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; case 2: sprintf(buf, "%s the #L%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; case 3: sprintf(buf, "%s the #L%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; case 4: sprintf(buf, "%s the #L%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; case 5: sprintf(buf, "%s the #L%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; case 6: sprintf(buf, "%s the #L%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; case 7: sprintf(buf, "%s the #L%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; } act( "Your body glows as you bring the force opon yourself.", ch, NULL, NULL, TO_CHAR ); act( "$n's body glows as they bring the force opon themselves.", ch, NULL, NULL, TO_ROOM ); ch->pcdata->mod_str = 15; ch->pcdata->mod_dex = 15; SET_BIT(ch->polyaff, POLY_JEDI); SET_BIT(ch->affected_by, AFF_POLYMORPH); ch->max_hit += ch->pcdata->disc_a[jedirank] * 250; ch->hit += ch->pcdata->disc_a[jedirank] * 250; ch->damroll += ch->pcdata->disc_a[jedirank] * 500; ch->hitroll += ch->pcdata->disc_a[jedirank] * 500; ch->armor -= ch->pcdata->disc_a[jedirank] * 750; return; } void do_sithform( CHAR_DATA *ch, char *argument) { char buf[MAX_STRING_LENGTH]; char RANK_STRING [MAX_STRING_LENGTH]; if (IS_NPC(ch)) return; if( !IS_CLASS(ch, CLASS_SITH)) { send_to_char( "Huh?\n\r",ch); return; } if (IS_POLYAFF(ch, POLY_SITH)) { REMOVE_BIT(ch->polyaff, POLY_SITH); REMOVE_BIT(ch->affected_by, AFF_POLYMORPH); act( "Your glow fades around you.", ch, NULL, NULL, TO_CHAR ); act( "$n's glow fades around them.", ch, NULL, NULL, TO_ROOM ); ch->max_hit -= ch->pcdata->disc_a[sithrank] * 250; if (ch->hit < 1) ch->hit = 1; if (ch->hit > ch->max_hit) ch->hit = ch->max_hit; ch->damroll -= ch->pcdata->disc_a[sithrank] * 500; ch->hitroll -= ch->pcdata->disc_a[sithrank] * 500; ch->armor += ch->pcdata->disc_a[sithrank] * 750; free_string( ch->morph ); ch->morph = str_dup( "" ); return; } else if (IS_AFFECTED(ch,AFF_POLYMORPH)) { send_to_char("You cant bring the force opon yourself when changed.\n\r",ch); return; } if (ch->pcdata->disc_a[sithrank] == 1 ) sprintf(RANK_STRING,"Apprentice"); else if (ch->pcdata->disc_a[sithrank] == 2 ) sprintf(RANK_STRING,"Jedi Outcast"); else if (ch->pcdata->disc_a[sithrank] == 3 ) sprintf(RANK_STRING,"Sith"); else if (ch->pcdata->disc_a[sithrank] == 4 ) sprintf(RANK_STRING,"Sith Elder"); else if (ch->pcdata->disc_a[sithrank] == 5 ) sprintf(RANK_STRING,"Sith Master"); else if (ch->pcdata->disc_a[sithrank] == 6 ) sprintf(RANK_STRING,"Sith Lord"); else if (ch->pcdata->disc_a[sithrank] == 7 ) sprintf(RANK_STRING,"Immortal Sith"); else return; switch(ch->pcdata->disc_a[sithrank]) { default: if (ch->pcdata->disc_a[sithrank] == 0) { send_to_char("Your evil glow fades away.\n\r",ch); } ch->pcdata->disc_a[sithrank] = number_range(1,6); do_sithform(ch,""); return; break; case 1: sprintf(buf, "%s the #0%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; case 2: sprintf(buf, "%s the #0%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; case 3: sprintf(buf, "%s the #0%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; case 4: sprintf(buf, "%s the #0%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; case 5: sprintf(buf, "%s the #0%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; case 6: sprintf(buf, "%s the #0%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; case 7: sprintf(buf, "%s the #0%s#n", ch->name,RANK_STRING); free_string( ch->morph ); ch->morph = str_dup( buf ); break; } act( "Your body glows as you bring evil opon yourself.", ch, NULL, NULL, TO_CHAR ); act( "$n's body glows as they bring evil opon themselves.", ch, NULL, NULL, TO_ROOM ); ch->pcdata->mod_str = 15; ch->pcdata->mod_dex = 15; SET_BIT(ch->polyaff, POLY_SITH); SET_BIT(ch->affected_by, AFF_POLYMORPH); ch->max_hit += ch->pcdata->disc_a[sithrank] * 250; if (ch->hit > ch->max_hit) ch->hit = ch->max_hit; ch->hit += ch->pcdata->disc_a[sithrank] * 250; ch->damroll += ch->pcdata->disc_a[sithrank] * 500; ch->hitroll += ch->pcdata->disc_a[sithrank] * 500; ch->armor -= ch->pcdata->disc_a[sithrank] * 750; return; } void do_ftouch( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; char buf[MAX_STRING_LENGTH]; char arg [MAX_INPUT_LENGTH]; int touchdamage; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; else if (!IS_CLASS(ch, CLASS_JEDI) && !IS_CLASS(ch, CLASS_SITH) ) { send_to_char("Huh?\n\r", ch); return; } else if (ch->move < 100) { send_to_char("You do not have the vitality to do this\n\r", ch); return; } else if ( arg[0] == '\0' ) { send_to_char( "Who do you wish to attack with the force?\n\r", ch ); return; } else if ( ( victim = get_char_room( ch, arg ) ) == NULL ) { send_to_char( "They aren't here.\n\r", ch ); return; } else if (victim->level < 3) { send_to_char("You cannot do that to them.\n\r", ch); return; } else if ( victim->position == POS_FIGHTING) { send_to_char("They are already in a fight.\n\r", ch); return; } else if ( is_safe( ch, victim ) ) { send_to_char("You cannot seem to do it.\n\r", ch); return; } else if (victim->hit < (victim->max_hit) ) { send_to_char("They are hurt.\n\r", ch); return; } else { ch->move -= 500; touchdamage = 150000; sprintf(buf,"You concentrate and create a force wave engulfing $N [%d]\n\r",touchdamage); act(buf,ch,NULL,victim,TO_CHAR); sprintf(buf,"You are thrown off your feet as a wave of energy is hurled at you from $n [%d]\n\r",touchdamage); act(buf,ch,NULL,victim,TO_VICT); sprintf(buf,"$n lashes out with the force at $N knocking them over [%d]\n\r",touchdamage); act(buf,ch,NULL,victim,TO_NOTVICT); hurt_person(ch, victim, touchdamage); victim->position = POS_STUNNED; WAIT_STATE(ch, 8); } } void do_knowalign(CHAR_DATA *ch, char *argument) { CHAR_DATA *victim; OBJ_DATA *obj; char arg [MAX_INPUT_LENGTH]; char buf [MAX_INPUT_LENGTH]; one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_IMMORTAL(ch)) { if (!IS_CLASS(ch, CLASS_JEDI) && !IS_CLASS(ch, CLASS_SITH)) { send_to_char( "Huh?!?\n\r", ch ); return; } } if( arg[0] == '\0' ) { send_to_char( "Sense who?\n\r", ch ); return; } if ( ( victim = get_char_room( ch, arg ) ) == NULL ) { if ( ( obj = get_obj_carry( ch, arg ) ) == NULL ) { send_to_char( "Sense what?\n\r", ch ); return; } act("$n examines $p intently.",ch,obj,NULL,TO_ROOM); return; } act("$n examines $N intently.",ch,NULL,victim,TO_NOTVICT); act("$n examines you intently.",ch,NULL,victim,TO_VICT); if (IS_NPC(victim)) sprintf(buf, "%s is an NPC.\n\r",victim->short_descr); else { if (victim->level == 12) sprintf(buf, "%s is an Archangel.\n\r", victim->name); else if (victim->level == 11) sprintf(buf, "%s is a High Judge.\n\r", victim->name); else if (victim->level == 10) sprintf(buf, "%s is a Judge.\n\r", victim->name); else if (victim->level == 9 ) sprintf(buf, "%s is an Enforcer.\n\r", victim->name); else if (victim->level == 8 ) sprintf(buf, "%s is a Builder.\n\r", victim->name); else if (victim->level == 7 ) sprintf(buf, "%s is a Helper.\n\r", victim->name); else if (victim->level >= 3 ) sprintf(buf, "%s is an Avatar.\n\r", victim->name); else sprintf(buf, "%s is a Mortal.\n\r", victim->name); } send_to_char(buf,ch); if (!IS_NPC(victim)) { sprintf(buf,"Hitroll:%d, Damroll:%d, AC: %d.\n\r",char_hitroll(victim),char_damroll(victim),char_ac(victim)); } else sprintf(buf,"AC:%d.\n\r",char_ac(victim)); send_to_char(buf,ch); if (!IS_NPC(victim)) { sprintf(buf,"Status:%d, ",victim->pStatus); send_to_char(buf,ch); if (IS_CLASS(victim, CLASS_VAMPIRE)) { sprintf(buf,"Blood:%d, ",victim->pcdata->condition[COND_THIRST]); send_to_char(buf,ch); } } sprintf(buf,"Alignment:%d.\n\r",victim->alignment); send_to_char(buf,ch); if (!IS_NPC(victim) && IS_EXTRA(victim, EXTRA_PREGNANT) && victim->sex == SEX_FEMALE) act("$N is pregnant.",ch,NULL,victim,TO_CHAR); return; } void do_jedi( CHAR_DATA *ch, char *argument ) { char buf[MAX_STRING_LENGTH]; char arg[MAX_INPUT_LENGTH]; CHAR_DATA *gch; one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_JEDI)) { send_to_char("Huh?\n\r",ch); return; } send_to_char("#L(#C Name#L ) (#C Hits %#L ) ( #CMana %#L ) (#C Move %#L ) (#C Exp#L )#n\n\r", ch ); for ( gch = char_list; gch != NULL; gch = gch->next ) { if ( IS_NPC(gch) ) continue; if ( !IS_CLASS(gch, CLASS_JEDI) ) continue; if ( gch->level >=7) continue; { sprintf( buf, "#L(#C%-16s#L) (#C%-8d%3d#L) (#C%-6d%3d#L) (#C%-6d%3d#L) (#C%7d#L)#n\n\r", capitalize( gch->name ), gch->hit, (gch->hit * 100 / gch->max_hit ), gch->mana, (gch->mana * 100 / gch->max_mana), gch->move, (gch->move * 100 / gch->max_move), gch->exp); send_to_char( buf, ch ); } } return; } void do_sith( CHAR_DATA *ch, char *argument ) { char buf[MAX_STRING_LENGTH]; char arg[MAX_INPUT_LENGTH]; CHAR_DATA *gch; one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_SITH)) { send_to_char("Huh?\n\r",ch); return; } send_to_char("#R(#0 Name #R ) (#0 Hits %#R ) (#0 Mana %#R ) (#0 Move %#R ) ( #0 Exp#R )#n\n\r", ch ); for ( gch = char_list; gch != NULL; gch = gch->next ) { if ( IS_NPC(gch) ) continue; if ( !IS_CLASS(gch, CLASS_SITH) ) continue; if ( gch->level >= 7) continue; { sprintf( buf, "#R(#0%-16s#R) (#0%-8d%3d#R) (#0%-6d%3d#R) (#0%-6d%3d#R) (#0%7d#R)#n\n\r", capitalize( gch->name ), gch->hit, (gch->hit * 100 / gch->max_hit ), gch->mana, (gch->mana * 100 / gch->max_mana), gch->move, (gch->move * 100 / gch->max_move), gch->exp); send_to_char( buf, ch ); } } return; } void do_levitate(CHAR_DATA *ch, char *argument) { char arg[MAX_INPUT_LENGTH]; ROOM_INDEX_DATA *location; CHAR_DATA *victim; one_argument (argument, arg); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_JEDI) && !IS_CLASS(ch, CLASS_SITH) ) { stc("Huh?\n\r", ch); return; } if ((victim = get_char_world(ch, arg)) == NULL) { send_to_char("Levitate to whom?\n\r", ch ); return;} if( IS_SET(victim->in_room->room_flags, ROOM_ASTRAL)) { stc( "Jaba laughs at you for attempting to enter the astral plane.\n\r",ch); return; } if( IS_SET(ch->in_room->room_flags, ROOM_ASTRAL)) { stc( "Jaba laughs at you for attempting to leave the astral plane.\n\r",ch); return; } location = victim->in_room; if (ch->move < 100) { send_to_char("You are too tired to levitate.\n\r", ch ); return;} if ((ch->in_room->vnum >= 50) && (ch->in_room->vnum <= 68)) { send_to_char("You cannot levitate whilst you are in the arena.\n\r", ch); return; } if ((victim->in_room->vnum >= 50) && (victim->in_room->vnum <= 68)) { send_to_char("You cannot levitate inside the arena.\n\r", ch); return; } if (!can_travel(ch,victim)) return; act("Your feet lift off the ground then you disappear from the room.", ch, NULL, NULL, TO_CHAR); act("$n levitates and disappears from the room.", ch, NULL, NULL, TO_ROOM); ch->move -= 100; char_from_room(ch); char_to_room(ch, location); do_look(ch, "auto"); act("Your feet touch the ground.", ch, NULL, NULL, TO_CHAR); act("$n feet hit the ground as they levitate into the room.", ch, NULL, NULL, TO_CHAR); return; } void do_fsense( CHAR_DATA *ch, char *argument) { if ( IS_NPC(ch) ) return; if (!IS_CLASS(ch, CLASS_JEDI) && !IS_CLASS(ch, CLASS_SITH)) { send_to_char("Huh?\n\r", ch ); return; } if (IS_SET(ch->act, PLR_HOLYLIGHT)) { REMOVE_BIT(ch->act, PLR_HOLYLIGHT); send_to_char( "Your senses return to normal.\n\r", ch ); } else { SET_BIT(ch->act, PLR_HOLYLIGHT); send_to_char( "Your senses increase to incredible proportions.\n\r", ch ); } return; } void do_mindcontrol( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; char arg[MAX_INPUT_LENGTH]; char buf[MAX_STRING_LENGTH]; argument = one_argument( argument, arg ); if ( IS_NPC(ch) ) return; if ( !IS_CLASS(ch, CLASS_JEDI) && !IS_CLASS(ch, CLASS_SITH)) { stc("Huh?\n\r",ch); return; } if ( ( victim = get_char_room( ch, arg) ) == NULL ) { stc("They aren't here.\n\r",ch); return; } arg[0] = UPPER(arg[0]); if ( ch->fighting == NULL ) { stc("You must be fighting to use mind control on them.\n\r",ch); return; } if ( victim->fighting == NULL ) { sprintf(buf, "%s is not fighting anyone.", arg); stc(buf, ch); return; } if ( IS_NPC(victim) ) { stc("Not on mobiles!\n\r",ch); return; } WAIT_STATE( ch, 10 ); if ( number_range(1, 100 ) > 15 ) { act("Your force flows into $N, $E seems to be getting weaker mentally.",ch,NULL,victim,TO_CHAR); act("$n stares at you, your mind feels weaker against them.",ch,NULL,victim,TO_VICT); act("$n stares at $N, $E seems to be getting weaker mentally.",ch,NULL,victim,TO_NOTVICT); WAIT_STATE(victim, 15 ); } else { act("Your force flows into $N, but nothing happens.",ch,NULL,victim,TO_CHAR); act("$n stares at you, wonder why.",ch,NULL,victim,TO_VICT); act("$n stares at $N, but nothing seem to happen.",ch,NULL,victim,TO_NOTVICT); } return; } void do_flightning(CHAR_DATA *ch, char *argument) { CHAR_DATA *victim; int i=0; int dam = 0; int chance =0; char buf[MAX_STRING_LENGTH]; char buf2[MAX_STRING_LENGTH]; if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_JEDI) && !IS_CLASS(ch, CLASS_SITH) ) { send_to_char("Huh?\n\r",ch); return; } if (ch->mana < 100 ) { send_to_char("You dont have enough mana.\n\r",ch); return; } if ((victim = ch->fighting) == NULL) { send_to_char( "You aren't fighting anyone.\n\r", ch ); return; } ch->mana -= 100; chance = number_range (1, (5000 + ch->lstatus)); if (chance <= 94) i = 1; else if (chance > 94 && chance <= 110) i = 2; else if (chance > 110 && chance <= 125) i = 3; else if (chance > 125 && chance <= 128) i = 4; else if (128 < chance ) i = 5; for(i=i;i>0;i--) { dam = number_range(20000 , ( ch->pStatus > 20 ? ( 1000 * ch->pStatus ) : 20000 ) ); if (dam < 20000) dam =50000; sprintf(buf, "%s shoots #olightning #7out of their fingers #0elec#7tric#0utes#n you [#y%d#n]\n\r", ch->name, dam); send_to_char( buf, victim ); sprintf(buf2,"Your shoot #olig#yhtn#oing #7out of your fingers #0elec#7tric#0utes#n %s [#y%d#n]\n\r",victim->name, dam); send_to_char( buf2, ch ); act( "$n shoots #olig#yhtn#oing #7out of their fingers and #0elec#7tric#0utes#n $N.",ch,NULL,victim,TO_NOTVICT); hurt_person(ch,victim,dam); if (victim->hit < 1) break; shock_effect(victim,ch->explevel,dam,TARGET_CHAR); } chance = number_range (1,10); if(ch->pcdata->disc_a[jedirank] == 6) chance += 5; if(ch->pcdata->disc_a[sithrank] == 6) chance += 5; if (chance >= 9) { act( "Your force of #yl#oi#yg#oh#yt#on#yi#on#yg#n stuns $N.",ch,NULL,victim,TO_CHAR); act( "$n's force of #yl#oi#yg#oh#yt#on#yi#on#yg stuns you.",ch,NULL,victim,TO_VICT); act( "$n's force of #yl#oi#yg#oh#yt#on#yi#on#yg stuns $N.",ch,NULL,victim,TO_NOTVICT); victim->position = POS_STUNNED; } WAIT_STATE(ch,12); return; } void do_fthrow(CHAR_DATA *ch, char *argument) { CHAR_DATA *victim = NULL; char buf[MAX_STRING_LENGTH]; if (!IS_CLASS(ch, CLASS_JEDI) && !IS_CLASS(ch, CLASS_SITH)) { stc("Huh?\n\r",ch); return; } if (argument[0] == '\0') { stc("Who do you wish to force throw?\n\r", ch); return; } if ( ch->fighting == NULL ) { stc("You must be fighting to use force throw on them.\n\r",ch); return; } if ((victim = get_char_room(ch, argument)) == NULL) { stc("They aren't here.\n\r", ch); return; } if (is_safe(ch, victim)) return; WAIT_STATE(ch, 12); act("$n throws $N against the wall.", ch, NULL, victim, TO_NOTVICT); act("You begin to shake and tremble as $N is thrown against the wall.", ch, NULL, victim, TO_CHAR); act("$n shakes and trembles, you fly into the wall behind you.", ch, NULL, victim, TO_VICT); if (victim->hit >= 1000) { long dam; if (!IS_NPC(ch)) dam = dice(60, 20 * (ch->lstatus + ch->pStatus)); else dam = ch->level * 8; victim->hit -= dam; ch->hit += dam; sprintf(buf,"You take %ld hitpoints from their life!\n\r",dam); stc(buf,ch); sprintf(buf,"%s take %ld hitpoints from your life!\n\r",ch->pcdata->switchname,dam); stc(buf,victim); if ( ch->hit > ( ch->max_hit * 2.5 ) ) ch->hit = ch->max_hit * 2.5; } else stc("Nothing seemed to happen.\n\r",ch); return; } void do_altermind( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; char arg[MAX_INPUT_LENGTH]; AFFECT_DATA af; int amount = 0; int sn; one_argument( argument, arg ); if( !IS_IMMORTAL(ch)) { if( !IS_CLASS(ch, CLASS_JEDI)&& !IS_CLASS(ch, CLASS_SITH) ) { send_to_char( "Huh?!?\n\r", ch ); return; } } if( arg[0] == '\0' ) { send_to_char( "Alter who's Mind?\n\r", ch ); return; } if( (victim = get_char_room(ch, arg)) == NULL ) { send_to_char( "They aren't here.\n\r", ch ); return; } if ( ( sn = skill_lookup( "curse" ) ) < 0 ) return; if ( is_affected(victim,sn) ) { stc("Their Mind is alread Altered.\n\r",ch); return; } if ( is_affected(ch,sn) ) { stc("You cannot alter someone elses mind if you are confused.\n\r",ch); return; return; } amount = number_range ( -1000, -4000 ); af.type = gsn_curse; af.duration = 20; af.location = APPLY_HITROLL; af.modifier = amount; af.bitvector = 0; affect_to_char( victim, &af ); af.location = APPLY_DAMROLL; af.modifier = amount; affect_to_char( victim, &af ); gain_condition( ch, COND_FULL, -(number_range(40,50))); WAIT_STATE(ch,10); send_to_char("In there confusion there fighting skills decrease\n\r", ch); return; } void do_fchoke( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; int dam; if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_SITH) && !IS_CLASS(ch, CLASS_JEDI)) { send_to_char("Huh?\n\r", ch ); return; } if ( ( victim = ch->fighting ) == NULL ) { send_to_char( "You aren't fighting anyone.\n\r", ch ); return; } WAIT_STATE(ch, 8); dam = number_range(ch->damcap[DAM_CAP] / 1,ch->damcap[DAM_CAP]); //dam = number_range(4 * ch->damcap[DAM_CAP] / 5 ,ch->damcap[DAM_CAP]); act("#RYou pinch your fingers together as $N's throat begins to close.#n",ch,NULL,victim,TO_CHAR); act("#R$n pinches their fingers together, $s clenches are your throat begins to close.#n",ch,NULL,victim,TO_VICT); act("#R$n grins then $s pinches his fingers as $N's throat begins to close.#n",ch,NULL,victim,TO_NOTVICT); damage( ch, victim, dam, gsn_sweep ); damage( ch, victim, dam, gsn_sweep ); damage( ch, victim, dam, gsn_sweep ); //if ( number_range( 1, 2 ) == 1 ) damage( ch, victim, dam, gsn_sweep ); return; } void do_illuminate( CHAR_DATA *ch, char *argument ) { char arg [MAX_INPUT_LENGTH]; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if ( !IS_CLASS(ch, CLASS_JEDI) && !IS_CLASS(ch, CLASS_SITH)) { stc("Huh?\n\r",ch); return; } if (IS_VAMPAFF(ch,VAM_NIGHTSIGHT) ) { send_to_char("The red glow in your eyes fades.\n\r",ch); act("The red glow in $n's eyes fades.", ch, NULL, NULL, TO_ROOM); REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT); return; } send_to_char("Your eyes start glowing red.\n\r",ch); act("$n's eyes start glowing red.", ch, NULL, NULL, TO_ROOM); SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT); return; } void do_mindtrick( CHAR_DATA *ch, char *argument ) { char arg[MAX_STRING_LENGTH]; argument = one_argument( argument, arg ); if(IS_NPC(ch))return; if(!IS_CLASS(ch, CLASS_JEDI) && !IS_CLASS(ch, CLASS_SITH)) { send_to_char("Huh?\n\r",ch); return; } if ( arg[0] == '\0' ) { if (ch->move < 1000) { send_to_char("You don't have 1000 move to activate your power.\n\r", ch); return; } if (ch->fight_timer > 0 ) { send_to_char("Not until your fight timer expires.\n\r", ch ); return; } if( IS_AFFECTED(ch, AFF_HIDE)) { REMOVE_BIT(ch->affected_by, AFF_HIDE); act("$n appears from the shadows.",ch,NULL,NULL,TO_ROOM); send_to_char("You appear from the shadows.\n\r", ch); } else { act("$n disappears into the shadows.",ch,NULL,NULL,TO_ROOM); send_to_char("You disappear into the shadows.\n\r",ch); ch->move -= 1000; SET_BIT(ch->affected_by, AFF_HIDE); } return; } } void do_forceheal( CHAR_DATA *ch, char *argument ) { char arg[MAX_INPUT_LENGTH]; CHAR_DATA *victim; one_argument(argument, arg ); if( !IS_IMMORTAL(ch) ) { if( !IS_CLASS(ch, CLASS_JEDI) && !IS_CLASS(ch, CLASS_SITH)) { send_to_char( "Huh?!?\n\r", ch ); return; } if(ch->hit <= 0) return; } if( arg[0] != '\0' ) { if ( ( victim = get_char_room( ch, arg ) ) == NULL ) { send_to_char( "They aren't here.\n\r", ch ); return; } } if( arg[0] == '\0' ) victim = ch; if (victim->loc_hp[6] > 0) { stc("Your wounds close up and stop bleeding.\n\r",victim); victim->loc_hp[6] = 0; } if ((victim->loc_hp[0] + victim->loc_hp[1] + victim->loc_hp[2] + victim->loc_hp[3] + victim->loc_hp[4] + victim->loc_hp[5]) != 0) { stc("Your bones mend themselves together and new limbs grow out of your body.\n\r",victim); victim->loc_hp[0] = 0; victim->loc_hp[1] = 0; victim->loc_hp[2] = 0; victim->loc_hp[3] = 0; victim->loc_hp[4] = 0; victim->loc_hp[5] = 0; } victim->hit += 15500 ; victim->move += 15500 ; victim->mana += 15500 ; if( victim->hit > victim->max_hit ) victim->hit = victim->max_hit; if( victim->move > victim->max_move ) victim->move = victim->max_move; if( victim->mana > victim->max_mana ) victim->mana = victim->max_mana; update_pos(victim); act( "You touch $N's wounds and heal $M.",ch,NULL,victim,TO_CHAR); act( "$n touch your wounds and heals $M.",ch,NULL,victim,TO_VICT); act( "$n touch $N's wounds and heals $M.",ch,NULL,victim,TO_NOTVICT); gain_condition( ch, COND_FULL, -(number_range(10,30))); WAIT_STATE(ch,6); return; } void do_fweb( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; char arg [MAX_INPUT_LENGTH]; int sn; int level; int spelltype; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_JEDI) && !IS_CLASS(ch, CLASS_SITH)) { send_to_char("Huh?\n\r",ch); return; } if ( ( victim = get_char_room( ch, arg ) ) == NULL ) { send_to_char( "They aren't here.\n\r", ch ); return; } if ( ch == victim ) { send_to_char( "You cannot web yourself.\n\r", ch ); return; } if ( IS_AFFECTED(victim, AFF_ETHEREAL) ) { send_to_char( "You cannot web an ethereal person.\n\r", ch ); return; } if ( ( sn = skill_lookup( "web" ) ) < 0 ) return; spelltype = skill_table[sn].target; level = ch->spl[spelltype] * 0.25; (*skill_table[sn].spell_fun) ( sn, level, ch, victim ); WAIT_STATE( ch, 12 ); return; } void do_fillusion( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; char buf[MAX_INPUT_LENGTH]; if (IS_NPC(ch)) return; if ( !IS_CLASS(ch, CLASS_JEDI) && !IS_CLASS(ch, CLASS_SITH) ) { stc("Huh?\n\r",ch); return; } if (ch->pcdata->followers > 4) { send_to_char("Nothing happens.\n\r",ch); return; } if(IS_SET(ch->in_room->room_flags,ROOM_ASTRAL)){ stc("Not here.\n\r",ch); return; } ch->pcdata->followers++; victim = create_mobile( get_mob_index( 33004 ) ); victim->short_descr = str_dup(ch->name); sprintf(buf, "%s is hovering here.\n\r",ch->name); victim->long_descr = str_dup(buf); victim->name = str_dup(ch->name); victim->level = 200; victim->max_hit = ch->max_hit; victim->hit = victim->max_hit; victim->max_mana = ch->max_mana; victim->mana = victim->max_mana; victim->max_move = ch->max_move; victim->move = victim->max_move; victim->hitroll = ch->hitroll; victim->damroll = ch->damroll; SET_BIT(victim->flag2, VAMP_CLONE); SET_BIT(victim->act, ACT_NOEXP); char_to_room( victim, ch->in_room ); ch->pcdata->condition[COND_THIRST] -= 30; act( "You wave your hands and form an Illusion of yourself.", ch, NULL, victim, TO_CHAR ); act( "$n waves $s hands and forms an Illusion of $sself in two.", ch, NULL, victim, TO_ROOM ); return; }